Epson S1C63000 Core Cpu Manual page 42

Seiko epson s1c63000 cmos 4-bit single chip microcomputer core cpu manual
Table of Contents

Advertisement

CHAPTER 4: INSTRUCTION SET
Examples:
LDB
%EXT,0x15
LDB
%XL,0x7D
LDB
%EXT,0xB8
ADD
%X,0x4F
LDB
%EXT,0xE6
CMP
%X,0xA2
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
• 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]
EX
%r,[%X]
ADD
%r,[%X]
ADC
%r,[%X]
%B,[%X],n4
[%X],0,n4
SUB
%r,[%X]
SBC
%r,[%X]
%B,[%X],n4
[%X],0,n4
INC
[%X],n4
DEC
[%X],n4
CMP
%r,[%X]
AND
%r,[%X]
OR
%r,[%X]
XOR
%r,[%X]
BIT
%r,[%X]
SLL
[%X]
SRL
[%X]
RL
[%X]
RR
[%X]
"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]
LDB
%EXT,0x9C
ADD
[%Y],5
36
...Works as "LD %X, 0157D"
...Works as "ADD %X, 0xB84F"
...Works as "CMP %X, 0x19A2"
19H = FFH - [EXT] (E6H)
[FFH - High-order 8-bit data]
%r,[%Y]
[%X],%r
%r,[%Y]
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
%B,[%Y],n4
[%Y],0,n4
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
%B,[%Y],n4
[%Y],0,n4
[%Y],n4
[%Y],n4
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
%r,[%Y]
[%X],%r
[%Y]
[%Y]
[%Y]
[%Y]
...Works as "LD %A, [0x0037]"
...Works as "ADD [0xFF9C]"
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%X],%B,n4
[%Y],%B,n4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%X],%B,n4
[%Y],%B,n4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
[%Y],%r
[%X],imm4
EPSON
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
[%Y],imm4
S1C63000 CORE CPU MANUAL

Advertisement

Table of Contents
loading

Table of Contents