
Chapter 5
Syntax
SUB R, A
Encoding
0 0001
01rr rrrr
Operation
R-A
→
R
Status Affected
Z, C, DC
Description
Subtract the contents of the accumulator from data memory R. Place the
result in R.
Example
SUB 0x10, A
;
R10 = R10 – Acc
SUB 0x01, A
;
R10 = R1 – Acc
Synta SUB A, @k
Encoding
1 1101
kkkk
kkkk
Operation
k-A
→
A
Status Affected
Z, C, DC
Description
Subtract the contents of the accumulator from the immediate data (8-bit
literal). Place the result in the accumulator.
Example
SUB A, @100
;
Acc = 100 – Acc
SUB A, @10
;
Acc = 10 – Acc
5.3.39 SWAP – Swap High/Low Nibble
Syntax SWAP R
Encoding
0 0111
01rr rrrr
Operation
R (3:0)
↔
R (7:4)
Status Affected
None
Description
Swap the upper and lower nibbles of data memory R.
Example
MOV A, @0xF0
;
R10 = 0xF0
MOV 0x10, A
SWAP 0x10
;
R10 = 0x0F
EM60000 Series User’s Manual
Instruction Set
•
69