 |
"E97" has different addressing of operands OP1 and OP2.
All possible cases are represanted in the
folloving table:
0 - R0 |
1 - R1 / operand is a value
2 - R3 \ from the register
3 - R3 |
4 - (R0) |
5 - (R1) / operand is value from memory cell
6 - (R2) \ with address in register
7 - (R3) |
D - constant in the next word of command
E - address in the next word of command
Examples:
0141 |
(R0) ==> R1 |
the value from memory, which address is stored in register R0, will be copied to R1 |
01D2 0080 |
80 ==> R2 |
constant 80, arranged in the second word of instruction, will be copied to R2 |
020E 0030 |
(30) + R0 ==> (30) |
memory address 30, arranged in the second word of instruction,
will be increased by R0 value. |
"Short constant" (-15 <= const <= 15) may be placed directly
in OP1. If const >= 0, the modifier of such instruction must be 2,
else it is 3.
Examples:
2153 |
5 ==> R3 |
"short constant" 5 (OP1 number is a constant itself!) will be copied to R3. Modifier=2 for positive numbers |
3123 |
2 ==> R3 |
"short constant" -2 will be copied to R3. Modifier=3 for negative numbers |
26A1 |
R1 / 10 ==> R1 |
R1 will be divided by "short constant" 10 (10d = Ah). |
When both operands are bytes, modifier is not zero and is equal to C.
Examples:
0120 |
R2 ==> R0 |
the value of the word from R2 will be copied to R0 |
C120 |
R2b ==> R0b |
the value of the low byte from R2 will be copied to R0 |
Back to:
|