汇编实验二 2进制转16进制

prognam segment
main proc far
    assume cs:prognam
start:
    push ds
    sub ax,ax
    push ax
    mov ch,4
    mov bx,0001111000111100B
rotate:
    mov cl,4
    rol bx,cl
    mov al,bl
    and al,0fh
    add al,30h
    cmp al,3ah
    jl printit
    add al,7h
printit:
    mov dl,al
    mov ah,2
    int 21h
    dec ch
    jnz rotate
    ret
main endp
prognam ends
    end

posted @ 2017-10-13 17:03  wydxry  阅读(835)  评论(0编辑  收藏  举报
Live2D