Calr [addr6, Calr sign8 – Epson S1C63000 User Manual
Page 88
82
EPSON
S1C63000 CORE CPU MANUAL
CHAPTER 4: INSTRUCTION SET
CALR [addr6]
Call subroutine at relative location [addr6]
2 cycles
Function:
([(SP1-1)*4+3]~[(SP1-1)*4])
←
PC + 1, SP1
←
SP1 - 1, PC
←
PC + [addr6] + 1
(addr6 = 0000H–003FH)
Saves the address next to this instruction to the stack as a return address, then adds the content
of the data memory (0000H–003FH) specified with the addr6 to that address to unconditionally
call the subroutine started from the address. Branch destination range is the next address of
this instruction +0 to 15.
Code:
Mnemonic
MSB
LSB
CALR [addr6]
1
1
1
1
1
0
0 a5 a4 a3 a2 a1 a0 1F00H–1F3FH
Flags:
E
I
C
Z
↓
–
–
–
Mode:
6-bit absolute
Extended addressing: Invalid
CALR sign8
Call subroutine at relative location sign8
1 cycle
Function:
([(SP1-1)*4+3]~[(SP1-1)*4])
←
PC + 1, SP1
←
SP1 - 1, PC
←
PC + sign8 + 1 (sign8 = -128~127)
Saves the address next to this instruction to the stack as a return address, then adds the related
address specified with the sign8 to that address to unconditionally call the subroutine started
from the address. Branch destination range is the next address of this instruction -128 to +127.
Code:
Mnemonic
MSB
LSB
CALR sign8
0
0
0
1
0 s7 s6 s5 s4 s3 s2 s1 s0 0200H–02FFH
Flags:
E
I
C
Z
↓
–
–
–
Mode:
Signed 8-bit PC relative
Extended addressing: Valid
Extended
LDB
%EXT,imm8
operation:
CALR sign8
([(SP1-1)
∗
4+3]~[(SP1-1)
∗
4])
←
PC + 1, SP1
←
SP1 - 1,
PC
←
PC + sign16 + 1
(sign16 = -32768 to 32767, upper 8-bit: imm8, lower 8-bit: sign8)