主题:恳求大虾的讲解与演示这个进制数的转换
编制一个程序把bx的二进制数用十六进制的形式在屏幕上显示出来。(这个是书上例子)
prognam segment
main proc far
assume cs:prognam
start: push ds
sub ax,ax
push ax
mov ch,4
rotate: mov cl,4
rol bx,cl
mov al,bl
and al,0fh
add al,30h
cmp al,3ah
jl printit
printit:
mov dl,al
mov ah,2
int 21h
dec ch
jnz rotate
ret
main endp
prognam ends
end
假设bx二进制数是10011100,那么怎样来进行加加减减,比较的,能不能演示出来呢?
prognam segment
main proc far
assume cs:prognam
start: push ds
sub ax,ax
push ax
mov ch,4
rotate: mov cl,4
rol bx,cl
mov al,bl
and al,0fh
add al,30h
cmp al,3ah
jl printit
printit:
mov dl,al
mov ah,2
int 21h
dec ch
jnz rotate
ret
main endp
prognam ends
end
假设bx二进制数是10011100,那么怎样来进行加加减减,比较的,能不能演示出来呢?