
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.
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: Indirect addressing with the Y register:
Instructions which have [%X] or [%X]+ as the operand 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
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
(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 |
34 | EPSON | S1C63000 CORE CPU MANUAL |