
CHAPTER 2: ARCHITECTURE
| Program memory |
|
| Program memory |
| Program memory | ||||||
0000H |
|
|
|
| 0000H | ∗ |
| 0000H |
|
|
| |
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| LDB %EXT,imm8 |
|
|
|
|
| ||
xxxxH | JR sign8 |
|
| xxxxH | JR sign8 |
| xxxxH | JR %A |
| |||
xxxxH+128 |
|
|
|
|
|
|
| xxxxH+16 |
|
|
| |
|
|
| xxxxH+32768 |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
| ∗ |
|
|
|
|
| |
FFFFH |
|
|
|
| FFFFH |
|
|
| FFFFH |
|
|
|
|
|
|
|
| ∗ In the extended addressing mode, |
| A=0 → | xxxxH+1 | ||||
|
|
|
|
| this instruction can branch the |
| A=15 → | : |
| |||
|
|
|
|
| entire 64K program memory. |
| xxxxH+16 | |||||
| Program memory |
|
| Data memory |
|
|
|
| ||||
0000H |
|
|
|
|
|
|
| 0000H |
|
| ||
|
|
|
|
|
|
|
| addr6 |
|
| 0000H | |
|
|
|
|
|
|
|
| 003FH |
|
| ||
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
xxxxH | JR [addr6] |
|
|
|
|
|
|
|
|
|
| |
xxxxH+16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FFFFH |
|
|
|
|
|
|
| FFFFH |
|
| ||
| [addr6]=0 → | xxxxH+1 |
|
|
|
|
| FFFFH | ||||
| : |
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
| |
| [addr6]=15 → | xxxxH+16 |
|
|
|
|
|
|
|
Program memory
0000H
xxxxH JR %BA
xxxxH+256
FFFFH
BA=0 → xxxxH+1
:
BA=255 → xxxxH+256
Program memory
JP %Y
Y → Branch destination absolute address
PC relative jump instructions | Indirect jump instruction |
Fig. 2.2.3.1 Operation of jump instructions
•Absolute call instruction (CALZ)
The absolute call instruction "CALZ imm8" calls a subroutine within addresses 0000H to 00FFH. A subroutine start address (absolute address) should be specified to imm8. When the call instruction is executed, the PC value (address of the next instruction) is saved into the stack for return, then it branches to the specified address.
Generally common subroutines that are called from two or more modules are placed in this area when the program is developed as multiple modules.
Example: |
|
CALZ 0x50 | ...Calls the subroutine located at the address 0050H |
See Section 2.3.3, "Stack and stack pointer" for stack.
•PC relative call instructions (CALR)
The PC relative call instruction adds the relative address specified in the operand to the PC that has indicated the next address, and calls a subroutine started from that address. It permits relocatable programming.
The relative address to be specified in the operand is same as the PC related jump instruction. The PC value (address of the next instruction) is saved into the stack before branching.
(1)Instructions with a signed
CALR sign8
This instruction branches the program sequence with the sign8 specified in the operand as a signed
14 | EPSON | S1C63000 CORE CPU MANUAL |