I am confused about how to handle assembly multiplication. I am working on a few problems described like so:
Given these hex values for the 8086 registers
AX = E204 BX = 30C2 CX = 5C08 DX = 38F1
What are the hex values in DX and AX after executing this instruction:
mul cl
For mul operations, are we only multiplying using al and the multiplier? For example, would this multiplication simply be 4 * 8 = 32 (decimal) with the result stored in ax?
When imul is used, then we would multiply the entire value in ax and the multiplier and then store the results in dx:ax, correct?
For this problem, if I am indeed approaching it the right way, al * cl = 4 * 8 = 32. Then:
al = 20
Do I keep ah the same (E2) or do I zero it out for the answer?
Please download complete Intel x86 CPU documentation from here.
For details on just this one instruction you can read here.