回 帖 发 新 帖 刷新版面

主题:恳求大虾的讲解与演示这个进制数的转换

编制一个程序把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,那么怎样来进行加加减减,比较的,能不能演示出来呢?

回复列表 (共1个回复)

沙发

不好意思,在printit:上一行还有add  al,7h忘记写了。

我来回复

您尚未登录,请登录后再回复。点此登录或注册