Antarr Byrd
Antarr Byrd

Reputation: 26061

Assembly problem

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
mul ax, bh
mul ax, cl
mul ax, ch
aam

Upvotes: 0

Views: 122

Answers (1)

Hans Passant
Hans Passant

Reputation: 941218

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.

Upvotes: 2

Related Questions