home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
tdossigi
/
time.a
< prev
next >
Wrap
Text File
|
1986-07-05
|
732b
|
63 lines
#TITLE "CONTINUOUS TIME DISPLAY"
#PAGE 132,66
MODULE "CTIME"
;
LOC Data#
;
TIME: BYTE "\r "
HOUR: BYTE "00:"
MIN: BYTE "00:"
SEC: BYTE "00$"
CSEC: BYTE 0
;
MESS1: BYTE "\r\n\n\n$"
;
ALIGN
RES 100
STACK == .
;
LOC Code#
;
START: MOV AX,DS
MOV SS,AX
MOV SP,&STACK
MOV DX,&MESS1
CALL PRINTM
LOOP: MOV CL,=10
INT 0XDF
CMP CSEC,CH
JNZ CVRT
MOV CL,=11
INT 0XE0
OR AL,AL
JZ LOOP
MOV DX,&MESS1
CALL PRINTM
MOV CL,=0
INT 0XE0
;
CVRT: MOV AL,DH
CALL DEC
MOV WORD HOUR,AX
MOV AL,DL
CALL DEC
MOV WORD MIN,AX
MOV AL,CH
MOV CSEC,AL
CALL DEC
MOV WORD SEC,AX
MOV DX,&TIME
CALL PRINTM
JMPS LOOP
;
DEC: AAM
XCHG AH,AL
OR AX,=0X3030
RET
;
PRINTM: MOV CL,=9
INT 0XE0
RET
;
END