;time to screen.
org 100h
section .text
mov ah,2Ch      ;time of day INT
int 21h         ;CH hour (00 - 23), CL minutes (00 - 59),  DH seconds (00 - 59).

mov ah,0	;ensure AH is 0
mov al,ch	;hours to AL
mov dl,0Ah	;10 to DL.  can't DIV by immediate value
div dl          ;quotient AL: tens of hours =AX/10, remainder (ones of hours) to AH
mov ch,ah	;save remainder AH (ones of hours)
add al,30h	;offset to ASCII digit char.
mov dl,al	;char param to display
mov ah,02	;write char to screen INT
int 21h
add ch,30h      ;offset one hours number to digit char
mov dl,ch
int 21h         ;display it
mov dl,3Ah	; ':'
int 21h

mov ah,0        ;ensure AH is 0
mov al,cl	;minutes to AL
mov dl,0Ah	;10 to DL.  can't DIV by immediate value
div dl          ;quotient AL: tens of minutes =AX/10, remainder (ones of minutes) to AH
mov ch,ah	;save remainder AH (ones of minutes)
add al,30h	;offset to ASCII digit char.
mov dl,al	;char param to display
mov ah,02	;write char to screen INT
int 21h
add ch,30h      ;offset one minutes number to digit char
mov dl,ch
int 21h         ;display it

;exit to DOS
mov ah,4Ch
int 21h
