DATA SEGMENT
STR DB 'PRESS RIGHT SHIFT TO END THE PROGRAM','$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
PSHIFT PROC FAR
MOV AL,0
MOV AH,2
INT 16H
CMP AL,0
JNZ EXIT
STI ;KAI ZHONG
CALL DISXY
CALL DIST
EXIT: DB 0EAH
OLDOFF DW ?
OLDSEG DW ?
;***************************
;DISPLAY THE TIME
DIST PROC NEAR
MOV AH,2CH
INT 21H
MOV DL,CH
JMP DIS
MOV DL,':'
JMP DIS
MOV DL,CL
JMP DIS
MOV DL,':'
JMP DIS
MOV DL,DH
JMP DIS
DIS: MOV AH,02H
INT 21H
RET
DIST ENDP
;**************************
;SET THE X,Y
DISXY PROC NEAR
MOV BH,0
MOV DH,30
MOV DL,30
MOV AH,2
INT 10H
RET
DISXY ENDP
;**************************
;THE MAIN
START:
MOV AX,DATA
MOV DS,AX
LEA DX,STR
MOV AH,09H
INT 21H
MOV AX,351CH
INT 21H ;取得旧的int 1cH的向量
MOV OLDOFF,BX ;保存旧的int 1cH的向量,以便到时候能返回
MOV OLDSEG,ES
;接下来是设置自己的新的INT 1CH向量
MOV AX,SEG PSHIFT
MOV DS,AX
MOV DX,OFFSET PSHIFT
MOV AX,251CH
INT 21H ;设置新的int 1ch向量
MOV DX,OLDOFF
MOV DS,OLDSEG
MOV AX,251CH
INT 21H ;退出程序前恢复系统原来的int 1ch的向量
MOV AH,4CH
INT 21H
CODE ENDS
END START
我想让他显示当前的时间 为什么不行 只是输出了STR