1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| assume cs:code,ds:data
data segment db '00/00/00 00:00:00',0 data ends
code segment start:mov bl,9 mov di,0 date: mov al,bl dec bl out 70h,al in al,71h mov ah,al mov cl,4 shr ah,cl and al,00001111b add ah,30H add al,30H mov dh,al mov dl,ah mov ax,data mov ds,ax mov ds:[di],dx add di,3 cmp bl,7 jnb date
mov bl,4 time: mov al,bl sub bl,2 out 70h,al in al,71h mov ah,al mov cl,4 shr ah,cl and al,00001111b add ah,30H add al,30H mov dh,al mov dl,ah mov ds:[di],dx add di,3 cmp bl,11111110b jne time mov ax,0B800H mov es,ax mov si,0 mov bx,0 call show_str mov ax,4c00H int 21h
show_str: mov ch,0 mov cl,ds:[bx] jcxz over mov dl,ds:[bx] mov dh,11000010b mov es:[si],dx inc bx add si,2 jmp short show_str
over: ret code ends end start
|