;To display CMOS time on line 5 col 12. ;It can be terminated by ^c; ;by:double; date:2009-09-26; ver:0.1 assume cs:codesg,ds:datasg,ss:stacksg datasg segment db '??/??/?? ??:??:??','$' datasg ends stacksg segment db 64 dup (0) stacksg ends codesg segment s1: db 0,2,4,7,8,9 s2: db 15,16,12,13,9,10,6,7,3,4,0,1 start: mov ax,datasg mov ds,ax mov ax,stacksg mov ss,ax mov sp,64 ok: mov cx,6 mov si,offset s1 mov di,offset s2 s: mov al,cs:[si] out 70h,al in al,71h mov ah,al push cx mov cl,4 shr al,cl pop cx add al,30h mov bl,cs:[di] mov bh,0 mov ds:[bx],al and ah,00001111b add ah,30h inc di mov bl,cs:[di] mov bh,0 mov ds:[bx],ah inc si inc di loop s mov ah,2 mov bh,0 mov dh,5 mov dl,12 int 10h mov ah,9 mov dx,0 int 21h mov al,1 cmp al,0 jne ok mov ax,4c00h int 21h codesg ends end start