Sub %r,%r, Sub %r,imm4 – Epson S1C63000 User Manual
Page 141
S1C63000 CORE CPU MANUAL
EPSON
135
CHAPTER 4: INSTRUCTION SET
SUB %r,%r’
Subtract r’ reg. from r reg.
1 cycle
Function:
r
←
r - r’
Subtracts the content of the r’ register (A or B) from the r register (A or B).
Code:
Mnemonic
MSB
LSB
SUB %A,%A
1
1
0
0
0
0
1
1
1
0
0
0
X
1870H, (1871H)
SUB %A,%B
1
1
0
0
0
0
1
1
1
0
0
1
X
1872H, (1873H)
SUB %B,%A
1
1
0
0
0
0
1
1
1
0
1
0
X
1874H, (1875H)
SUB %B,%B
1
1
0
0
0
0
1
1
1
0
1
1
X
1876H, (1877H)
Flags:
E
I
C
Z
↓
–
↕
↕
(r
≠
r’)
↓
–
↓
↑
(r = r’)
Mode:
Src: Register direct
Dst: Register direct
Extended addressing: Invalid
SUB %r,imm4
Subtract immediate data imm4 from r reg.
1 cycle
Function:
r
←
r - imm4
Subtracts the 4-bit immediate data imm4 from the r register (A or B).
Code:
Mnemonic
MSB
LSB
SUB %A,imm4
1
1
0
0
0
0
1
0
0 i3 i2 i1 i0
1840H–184FH
SUB %B,imm4
1
1
0
0
0
0
1
0
1 i3 i2 i1 i0
1850H–185FH
Flags:
E
I
C
Z
↓
–
↕
↕
Mode:
Src: Immediate data
Dst: Register direct
Extended addressing: Invalid