Epson S1C63000 Personal Computer User Manual


 
136 EPSON S1C63000 CORE CPU MANUAL
CHAPTER 4: INSTRUCTION SET
SUB %r,[%ir]
SUB %r,[%ir]+ Subtract location [ir reg.] from r reg. and increment ir reg. 1 cycle
Function: r r - [ir], ir ir + 1
Subtracts the content of the data memory addressed by the ir register (X or Y) from the r
register (A or B). Then increments the ir register (X or Y). The flags change due to the operation
result of the r register and the increment result of the ir register does not affect the flags.
Code:
Mnemonic MSB LSB
SUB %A,[%X]+ 11000011000011861H
SUB %A,[%Y]+ 11000011000111863H
SUB %B,[%X]+ 11000011001011865H
SUB %B,[%Y]+ 11000011001111867H
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Invalid
Subtract location [ir reg.] from r reg. 1 cycle
Function: r r - [ir]
Subtracts the content of the data memory addressed by the ir register (X or Y) from the r
register (A or B).
Code:
Mnemonic MSB LSB
SUB %A,[%X] 11000011000001860H
SUB %A,[%Y] 11000011000101862H
SUB %B,[%X] 11000011001001864H
SUB %B,[%Y] 11000011001101866H
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Valid
Extended LDB %EXT,imm8
operation: SUB %r,[%X] r r - [00imm8] (00imm8 = 0000H + 00H to FFH)
LDB %EXT,imm8
SUB %r,[%Y] r r - [FFimm8] (FFimm8 = FF00H + 00H to FFH)