Add %r,imm4, Add %r,[%ir – Epson S1C63000 User Manual
Page 75
S1C63000 CORE CPU MANUAL
EPSON
69
CHAPTER 4: INSTRUCTION SET
ADD %r,imm4
Add immediate data imm4 to r reg.
1 cycle
Function:
r
←
r + imm4
Adds the 4-bit immediate data imm4 to the r register (A or B).
Code:
Mnemonic
MSB
LSB
ADD %A,imm4
1
1
0
0
1
0
1
0
0 i3 i2 i1 i0
1940H–194FH
ADD %B,imm4
1
1
0
0
1
0
1
0
1 i3 i2 i1 i0
1950H–195FH
Flags:
E
I
C
Z
↓
–
↕
↕
Mode:
Src: Immediate data
Dst: Register direct
Extended addressing: Invalid
ADD %r,[%ir]
Add location [ir reg.] to r reg.
1 cycle
Function:
r
←
r + [ir]
Adds the content of the data memory addressed by the ir register (X or Y) to the r register (A or
B).
Code:
Mnemonic
MSB
LSB
ADD %A,[%X]
1
1
0
0
1
0
1
1
0
0
0
0
0
1960H
ADD %A,[%Y]
1
1
0
0
1
0
1
1
0
0
0
1
0
1962H
ADD %B,[%X]
1
1
0
0
1
0
1
1
0
0
1
0
0
1964H
ADD %B,[%Y]
1
1
0
0
1
0
1
1
0
0
1
1
0
1966H
Flags:
E
I
C
Z
↓
–
↕
↕
Mode:
Src: Register indirect
Dst: Register direct
Extended addressing: Valid
Extended
LDB
%EXT,imm8
operation:
ADD
%r,[%X]
r
←
r + [00imm8] (00imm8 = 0000H + 00H to FFH)
LDB
%EXT,imm8
ADD
%r,[%Y]
r
←
r + [FFimm8] (FFimm8 = FF00H + 00H to FFH)