Time to delay with port 61

xiaoxiao2021-03-06  50

The compilation modification clock interrupt is some examples of COM files, but because the program generates an executable, I am still ready to implement the delay function with the 61st port, the most open like C's bean game You can choose speed Title a demall .stack 64 .Data .code main proc MoV AX, @Data MoV DS, AX MOV CX, 15; test L: MOV AH, 02H with cycling 15 times; each cycle Display a character MOV DL, 'D' Int 21h Push CX MOV CX, 4; Delayed Level Control CALL DELAY POP CX LOOP L MOV AH, 4CH INT 21HMAIN ENDP

Delay Proc Push AX PUSH CX M_1: Push CX; Outer Loop Control Delay Speed ​​MOV CX, 33144M_2: IN AL, 61H And Al, 10H CMP AL, AH JE M_1 MOV AH, Al LOOP M_2 POP CX LOOP M_1 POP CX POP AX RETDELAY ENDP End Main

转载请注明原文地址:https://www.9cbs.com/read-81706.html

New Post(0)