assume cs:code
code segment
start:    mov ax,0b800h
        mov es,ax
        mov di,160*12+30*2
        mov al,0ah
        push di
rdata:    dec al
        cmp al,7
        jb rtime
        call show
        add di,6
        jmp short rdata
rtime:    sub al,2
        cmp al,0feh
        je    sign
        call show
        add di,6
        jmp short rtime
sign:    pop di
        add di,4
        mov byte ptr es:[di],'/'
        add di,6
        mov byte ptr es:[di],'/'
        add di,12
        mov byte ptr es:[di],':'
        add di,6
        mov byte ptr es:[di],':'
        mov ax,4c00h
        int 21h
show:    push ax
        push cx
        out 70h,al
        in al,71h
        mov cx,4
        mov ah,al
        shr ah,cl
        and al,0fh
        add ah,30h
        add al,30h
        mov es:[di],ah
        mov es:[di+2],al
        pop cx
        pop ax
        ret
code ends
end start
 
 
 
