I\'m rather confused about how the multiply and divide operations work in x86 assembly. For example, the code below doesn\'t seem too difficult since deals with 8-bit.
8
A quick glance at the documentation shows that there are 4 possible operand sizes for MUL
. The inputs and outputs are summarized in a handy table:
------------------------------------------------------
| Operand Size | Source 1 | Source 2 | Destination |
------------------------------------------------------
| Byte | AL | r/m8 | AX |
| Word | AX | r/m16 | DX:AX |
| Doubleword | EAX | r/m32 | EDX:EAX |
| Quadword | RAX | r/m64 | RDX:RAX |
------------------------------------------------------