如何制作无限循环以保持8086连续显示时钟?

时间:2017-01-14 09:42:50

标签: loops assembly x86-16 processor 16-bit

以下是我编写的代码,但它显示了我希望它在循环中继续更新的时间。我试过.while循环和简单的循环,但它们没有帮助。

MAIN PROC

L1:
     mov cx, 100
     push cx

     MOV AX, @DATA                ; initialize DS
     MOV DS, AX


     mov BX,offset time           ; BX=offset address of string TIME

     CALL GET_TIME                ; call the procedure GET_TIME

     CALL clrscr

     MOV DX,offset time           ; DX=offset address of string PROMPT
     MOV AH, 09H                  ; print the string PROMPT
     INT 21H                                          

     MOV AH, 4CH                  ; return control to DOS
     INT 21H

     pop cx
     inc cx

     loop L1

MAIN ENDP

0 个答案:

没有答案