Epson S1C63000 Personal Computer User Manual


 
128 EPSON S1C63000 CORE CPU MANUAL
CHAPTER 4: INSTRUCTION SET
SBC %B,[%ir],n4 Subtract with carry location [ir reg.] from B reg. in specified radix 2 cycles
Function: B N’s adjust (B - [ir] - C)
Subtracts the content of the data memory addressed by the ir register (X or Y) and carry (C)
from the B register. The operation result is adjusted with n4 as the radix. The C flag is set
according to the radix.
Code:
Mnemonic MSB LSB
SBC %B,[%X],n4 111001100n3n2n1n01CC0H1CCFH
SBC %B,[%Y],n4 111001110n3n2n1n01CE0H–1CEFH
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Valid
Extended LDB %EXT,imm8
operation: SBC %B,[%X],n4 B N’s adjust (B - [00imm8] - C) (00imm8 = 0000H + 00H to FFH)
LDB %EXT,imm8
SBC %B,[%Y],n4 B N’s adjust (B - [FFimm8] - C) (FFimm8 = FF00H + 00H to FFH)
Note: n4 should be specified with a value from 1 to 16. When 16 is specified for n4, the low-order 4
bits of the machine code (n3–n0) become 0000B.
SBC %B,[%ir]+,n4
Subtract with carry location [ir reg.] from B reg. in specified radix and increment ir reg. 2 cycles
Function: B N’s adjust (B - [ir] - C), ir ir + 1
Subtracts the content of the data memory addressed by the ir register (X or Y) and carry (C)
from the B register. The operation result is adjusted with n4 as the radix. Then increments the ir
register (X or Y). The flags change due to the operation result of the B register and the incre-
ment result of the ir register does not affect the flags. The C flag is set according to the radix.
Code:
Mnemonic MSB LSB
SBC %B,[%X]+,n4 111001101n3n2n1n01CD0H1CDFH
SBC %B,[%Y]+,n4 111001111n3n2n1n01CF0H1CFFH
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Invalid
Note: n4 should be specified with a value from 1 to 16. When 16 is specified for n4, the low-order 4
bits of the machine code (n3–n0) become 0000B.