注册 登录
编程论坛 汇编论坛

imul指令of问题

aiyulunhui 发布于 2016-05-04 16:35, 5119 次点击
The following instructions multiply -4 by 4, producing 16 in AX. AH is a sign extension
of AL so the Overflow flag is clear:
mov al,-4
mov bl,4
imul bl ; AX = FFF0h, OF = 0


The following instructions multiply 48 by 4, producing 192 in DX:AX. DX is a sign extension
of AX, so the Overflow flag is clear:
mov ax,48
mov bx,4
imul bx ; DX:AX = 000000C0h, OF = 0

符号扩展是什么?
第二个应该不是符号扩展吧,是书错了还是什么原因?


[此贴子已经被作者于2016-5-4 16:48编辑过]

2 回复
#2
aiyulunhui2016-05-04 16:53
查了一下书,符号扩展是把低16位的最高位填充高16位
#3
aiyulunhui2016-05-04 17:04
懂了,of=0时高位可忽哟
1