home *** CD-ROM | disk | FTP | other *** search
- _saver38 dw ?
- NUMB DW ?
- BASE DW 10
- _OFFSET DW ?
- ;
- HOUR DB '00' ;time block.
- _hour DB ':'
- MINUTE DB '00'
- _min DB ':'
- SECOND DB '00'
- _sec DB '.'
- HUNDRED DB '00'
- _hund db ' '
- _CX DW ?
- _DX DW ?
- ;
- _get_time:
- mov ds,cs
- pop _saver38
-
- Mov AH,2CH ;get system time.
- Int 21H
-
- MOV _CX,CX
- MOV _DX,DX
- ;
- Mov CL,0 ;SEND out hour.
- XCHG CH,CL
- MOV NUMB,CX
- MOV _OFFSET,OFFSET HOUR
- CALL _get_time1
- MOV _hour,':'
- ;
- MOV CX,_CX
- Mov CH,0 ;SEND OUT MIN
- MOV NUMB,CX
- MOV _OFFSET,OFFSET MINUTE
- CALL _get_time1
- MOV _min,':'
- ;
- MOV DX,_DX
- MOV DL,0
- XCHG DH,DL
- MOV NUMB,DX
- MOV _OFFSET,OFFSET SECOND
- CALL _get_time1
- MOV _sec,'.'
- ;
- MOV DX,_DX
- MOV DH,0
- MOV NUMB,DX
- MOV _OFFSET,OFFSET HUNDRED
- CALL _get_time1
- MOV _hund,' '
- ;
- MOV AX,OFFSET HOUR
- PUSH AX
- ;
- mov ds,cs
- push _saver38
- Ret
- ;
- _get_time1:
- PUSH NUMB
- PUSH _OFFSET
- PUSH BASE
- MOV AX,3
- CALL _INTOSB
- ADD SP,6
- RET
-