试编制一个程序,把BX寄存器内的二进制数以八进制数的形式在屏幕上显示出来
data segment
N dw 0111111100001101b
data ends
stack segment stack
dw 20h dup(?)
top label word
stack ends
code segment
assume ds:data,cs:code,ss:stack
p proc far
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
lea sp,top
mov bx,n
rol bx,1
mov dl,bl
and dl,1
add dl,30h
mov ah,02h
int 21h
mov cx,5
l1: push cx
mov cl,3
rol bx,cl
mov dl,bl
and dl,111b
add dl,30h
mov ah,02h
int 21h
pop cx
loop l1
mov ah,4ch
int 21h
p endp
code ends
end p