assume cs:code
code segment
db 32 dup(0)
s: db 9, 8, 7, 4, 2, 0
s1: db '// ::$'
start: mov ax, cs
mov ds, ax
mov bx, 0 ;要显示的字符串指针
mov si, offset s ;内存单元地址数组指针
mov di, offset s1 ;间隔符号数组指针
mov cx, 6
ok: push cx
mov al, [si]
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 [bx], ah
mov [bx + 1], al
mov al, [di]
mov [bx + 2], al
add bx, 3
inc di
inc si
pop cx
loop ok
mov dx, 0
mov ah, 9
int 21h
mov ax, 4c00h
int 21h
code ends
end start
07-17
119
07-22
350