CHAPTER 4: INSTRUCTION SET
Examples:
LDB %EXT,0x15
LDB %XL,0x7D
LDB %EXT,0xB8 ADD %X,0x4F
LDB %EXT,0xE6 CMP %X,0xA2

...Works as "LD %X, 0157D"

...Works as "ADD %X, 0xB84F"

...Works as "CMP %X, 0x19A2"

19H = FFH - [EXT] (E6H)

Above examples use the X register, but they work the same even when the Y register is used.

Note: The CMP instruction performs a subtraction with a complement, therefore it is necessary to set the complement (1’s complement) of the high-order 8-bit data in the EXT register.

EXT register [FFH - High-order 8-bit data]

8-bit absolute addressing

The 8-bit absolute addressing is the addressing mode for accessing within the 8-bit address range from 0000H or FF00H. To enter this mode, write the low-order 8 bits (00H to FFH) of the address to the EXT register, then execute an indirect addressing instruction which has [%X] or [%Y] as the source operand or the destination operand. When [%X] is used, the memory from 0000H to 00FFH can be accessed, and when [%Y] is used, FF00H to FFFFH can be accessed.

Instructions that operate in the 8-bit absolute addressing mode with the E flag

Instruction

Operand

 

 

 

 

 

 

 

LD

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

EX

%r,[%X]

%r,[%Y]

 

 

 

 

 

ADD

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

ADC

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

 

%B,[%X],n4

%B,[%Y],n4

[%X],%B,n4

[%Y],%B,n4

 

 

[%X],0,n4

 

[%Y],0,n4

 

 

 

 

SUB

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

SBC

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

 

%B,[%X],n4

%B,[%Y],n4

[%X],%B,n4

[%Y],%B,n4

 

 

[%X],0,n4

 

[%Y],0,n4

 

 

 

 

INC

[%X],n4

[%Y],n4

 

 

 

 

 

DEC

[%X],n4

[%Y],n4

 

 

 

 

 

CMP

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

AND

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

OR

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

XOR

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

BIT

%r,[%X]

%r,[%Y]

[%X],%r

[%Y],%r

[%X],imm4

[%Y],imm4

SLL

[%X]

[%Y]

 

 

 

 

 

 

SRL

[%X]

[%Y]

 

 

 

 

 

 

RL

[%X]

[%Y]

 

 

 

 

 

 

RR

[%X]

[%Y]

 

 

 

 

 

 

"r" indicates the A or B register. Instructions with an operand other than above or the post-incre- ment function do not have the extended addressing function.

Examples:

 

LDB

%EXT,0x37

 

LD

%A,[%X]

...Works as "LD %A, [0x0037]"

LDB

%EXT,0x9C

 

ADD

[%Y],5

...Works as "ADD [0xFF9C]"

36

EPSON

S1C63000 CORE CPU MANUAL