beautypg.com

Epson S1C63000 User Manual

Page 40

background image

34

EPSON

S1C63000 CORE CPU MANUAL

CHAPTER 4: INSTRUCTION SET

• Register direct addressing

The register direct addressing is the addressing mode when specifying a register for the source and/
or destination. Register names should be written with % in front.
Instructions in which the operand has the following register name operate in this addressing mode.

4-bit registers:

%A,%B,%F

8-bit registers:

%BA,%XH,%XL,%EXT,%SP1,%SP2

16-bit registers:

%X,%Y

Examples:

ADD

%A,%B

...Adds the data in the B register to the A register

LDB

%BA,%XL

...Loads the data in the XL register into the BA register

DEC

%SP1

...Decrements the stack pointer SP1

JR

%A

...Jumps using the content of the A register as a relative address

JP

%Y

...Jumps to the address indicated with the Y register

• Register indirect addressing

The register indirect addressing is the addressing mode for accessing the data memory and it indi-
rectly specifies the data memory address with the index register X or Y. To write the instructions,
place % in front of the index register name and enclose them with [ ].

Indirect addressing with the X register:

Instructions which have [%X] or [%X]+ as the operand

Indirect addressing with the Y register:

Instructions which have [%Y] or [%Y]+ as the operand

The content of the X register or Y register regarded as an address, and operations and transfers are
performed for the data stored in the address or the address.
"+" in the [%X]+ and [%Y]+ indicates a post-increment function. Instructions that have these operands
increment the content of the X register or Y register after executing the transfer or operation. This
function is useful to access a continuous addresses in the data memory.

Examples:

SUB

%A,[%X]

...Subtracts the content of a memory specified with the X register from the A

register

LD

[%X]+,[%Y]+

...Transfers the content of a memory specified with the Y register to a memory

specified with the X register. Then increments the contents of the X register
and Y register

• 6-bit absolute addressing

The 6-bit absolute addressing is the addressing mode for accessing within the 6-bit address range
from 0000H or FFC0H. Instructions that have [addr6] as the operand operate in this addressing mode.
The address range that can be specified with the addr6 is 0000H to 003FH or FFC0H to FFFFH.

(1) Instructions that access from 0000H to 003FH

For this area, the following instructions, which are used in this area as counters and flags, are
provided. An address within 0000H to 003FH is specified with the addr6.

INC

[addr6]

...Increments the content of a memory specified with the addr6

DEC

[addr6]

...Decrements the content of a memory specified with the addr6

CLR

[addr6],imm2

...Clears a bit specified with the imm2 in a memory specified with the addr6

SET

[addr6],imm2

...Sets a bit specified with the imm2 in a memory specified with the addr6

TST

[addr6],imm2

...Tests a bit specified with the imm2 in a memory specified with the addr6

In addition, the following branch instructions, which permit a conditional branch according to the
contents of this area, are provided.

JR

[addr6]

...PC relative jump instruction that uses the content of a memory specified

with addr6 as a relative address

CALR [addr6]

...PC relative call instruction that uses the content of a memory specified with

addr6 as a relative address