开发者

Assembly problem

开发者 https://www.devze.com 2023-01-29 04:01 出处:网络
I\'m trying to multiply 5 decimals using DEBUG in windows command prompt but I fear i\'ve very far off. My program results in the decimal value 1303. When it should be 4320. The decimals are 15, 12, 4

I'm trying to multiply 5 decimals using DEBUG in windows command prompt but I fear i've very far off. My program results in the decimal value 1303. When it should be 4320. The decimals are 15, 12, 4, 2, 3.

mov al, 15
mov bl, 12
mov bh, 4
mov cl, 2
mov ch, 3
mul ax, bl
mu开发者_开发技巧l ax, bh
mul ax, cl
mul ax, ch
aam


You are doing byte x byte multiplies, obviously the intermediate result is going to need more than a byte. You are also multiplying by AH instead of CH.

0

精彩评论

暂无评论...
验证码 换一张
取 消