王爽汇编实验14

assume cs:code

code segment
s:    
    db '20xx/xx/xx xx:xx:xx','$'
s1:    
    db 9,8,7,4,2,0

start:
    mov ax,cs
    mov ds,ax
    mov si,offset s
    mov di,offset s1

    add si,2
    mov cx,6
s2:
    push cx
    mov al,[di]
    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 [si],ah
    mov [si+1],al
    inc di
    add si,3
    pop cx
    loop s2

    mov ah,2  ;设置光标
    mov bh,0
    mov dh,5
    mov dl,12
    int 10h

    mov dx,offset s ;显示数据
    mov ah,9
    int 21h

    jmp short start;动态刷屏

    mov ax,4c00h
    int 21h
code ends
end start
原文地址:https://www.cnblogs.com/hellow0rd/p/6936426.html