Calr [Addr - Epson S1C63000 Core Cpu Manual

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

Advertisement

This instruction permits the extended addressing with the E flag, and the 8-bit relative address can
be extended into 16 bits (the contents of the EXT register becomes the high-order 8 bits). In this
case, the range that can be branched is from the next instruction address -32768 to +32767. Conse-
quently, in the extended addressing mode this instruction can call subroutines over a 64K program
memory.
Examples:
CALR -50
LDB
%EXT,50
CALR 50
(2) Instruction with a data memory address within 0000H to 003FH in which the content specifies a 4-bit
relative address

CALR [addr6]

This instruction branches the program sequence with the content of the data memory specified by
the [addr6] as an unsigned 4-bit relative address. The operand [addr6] can specify a data memory
address within 0000H to 003FH. The range that can be branched is from the next instruction
address +0 to +15. Same with the "JR [addr6]", this call instruction can be used as a conditional
call according to the flags that are set in the memory specified with [addr6].
Example: When the content of the address 0010H is 4 (0100B).
[0x0010],0 ...Sets the bit 0 in the address 0010H to "1" ([0010H] = 5)
SET
CALR [0x0010]
Figure 2.2.3.2 shows the operation of the call instructions and the branch range.
Program memory
0000H
xxxxH-127
xxxxH
CALR sign8
xxxxH+128
FFFFH
S1C63000 CORE CPU MANUAL
...Calls the subroutine 49 steps before
...(50
256) = 17800
...Calls the subroutine 17851 steps after
...Calls the subroutine 6 steps after
Program memory
0000H
xxxxH-32767
xxxxH-1
LDB
%EXT,imm8
xxxxH
CALR sign8
xxxxH+32768
FFFFH
In the extended addressing mode,
this instruction can call subroutines
over a 64K program memory.
PC relative call instructions
Program memory
0000H
00FFH
CALZ imm8
FFFFH
imm
Branch destination
absolute address
Absolute call instruction
Fig. 2.2.3.2 Operation of call instructions
EPSON
Program memory
xxxxH CALR [addr6]
xxxxH+16
FFFFH
[addr6]=0
xxxxH+1
:
[addr6]=15
xxxxH+16
CHAPTER 2: ARCHITECTURE
Data memory
0000H
addr6
003FH
FFFFH
15

Advertisement

Table of Contents
loading

Table of Contents