Epson S1C63000 Core Cpu Manual page 20

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

Advertisement

CHAPTER 2: ARCHITECTURE
Program memory
0000H
xxxxH-127
xxxxH
JR sign8
xxxxH+128
FFFFH
Program memory
0000H
xxxxH JR [addr6]
xxxxH+16
FFFFH
[addr6]=0
:
[addr6]=15
• 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
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 8-bit immediate data sign8 that specifies a relative address
CALR
sign8
This instruction branches the program sequence with the sign8 specified in the operand as a
signed 8-bit relative address. The range that can be branched is from the next instruction address -
128 to +127. A value within the range from -128 to +127 should be used if specifying a value for
calling in the assembler. Generally branch destination labels such as "CALR LABEL" are used, and
they are expanded into the actual address by the assembler.
14
Program memory
0000H
xxxxH-32767
xxxxH-1
LDB %EXT,imm8
xxxxH
JR
sign8
xxxxH+32768
FFFFH
In the extended addressing mode,
this instruction can branch the
entire 64K program memory.
Data memory
xxxxH+1
xxxxH+16
PC relative jump instructions
Fig. 2.2.3.1 Operation of jump instructions
...Calls the subroutine located at the address 0050H
Program memory
0000H
xxxxH JR %A
xxxxH+16
FFFFH
A=0
xxxxH+1
:
A=15
xxxxH+16
0000H
addr6
0000H
003FH
FFFFH
FFFFH
EPSON
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
Indirect jump instruction
S1C63000 CORE CPU MANUAL

Advertisement

Table of Contents
loading

Table of Contents