MUL (BINARY)
MUL, MULP, DMUL, DMULP (Binary)
MUL instruction multiplies S1 with S2 and save the result in Destination (assigned device address).
| |
S1, S2 | Source |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
MUL(P) DMUL(P) | S1 | o | o | o | o | o | o | o | o | - | o | o | o | o | 4 | o | - | - |
S2 | o | o | o | o | o | o | o | o | - | o | o | o | o | |||||
D | o | - | o | o | o | - | o | o | - | o | o | o | - |
MUL
Function
Multiply S1 with S2 and save the result as double word type to D (Low byte) and D+1 (High byte).
Example)
If X10 is ON, multiply H777(D1) with HCCC(D2) and save low byte(h06D4) to D20 and save high byte(h5F92) to D21.
DMUL
Function
Multiply S1(Double word) with S2(Double word) and save the result as 4 word type to D, D+1, D+2, and D+3 in sequence.
Example)
If X10 is ON, multiply H000F4240(D0) with H0012D687(D2) and then save H6FC0 to D4, H71ED to D5, H011F to D6, and H0000 to D7 in sequence.