mul乘法指令

assume cs:code,ss:stack
stack segment
    db 16 dup(0)
stack ends

code segment
    s:
        mov al,5
        mov bl,3
        ret;return to block clode behind the call
    start:
        mov ax,stack
        mov ss,ax
        mov ax,16
        call s
        mul bl ;only bl, ax=al*bl
        
        ;mul ax,bx ;ax*bx=ax&dx
        ;mul al,bl ;ax=al*bl
code ends
end start

mul bl好像只能是bl,就是把al*bl结果存到ax

如果你要ax*bx就是mul bx结果存在dx放高位,ax放低位

posted @ 2022-11-27 13:18  Z_Chan  阅读(189)  评论(0编辑  收藏  举报