7
DETAILS OF INSTRUCTIONS
72
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
call
%rb
/ call.d
%rb
Function
Subroutine call
Standard)
sp
←
sp -
4
, W[sp]
←
pc +
2
, pc
←
rb
Extension
1
) Unusable
Extension
2
) Unusable
Code
15
12
11
8
7
4
3
0
0
0
0
0
0
1
1
d
0
0
0
0
r b
0x060_, 0x070_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call
%rb
when d bit (bit
8
) =
0
call.d
%rb
when d bit (bit
8
) =
1
Flag
IE C V Z N
– – – – –
|
|
|
|
Mode
Register direct
%rb
=
%r0
to
%r15
CLK
call
Four cycles
call.d
Three cycles
Description
(
1
) Standard
call
%rb
Stores the address of the following instruction into the stack, then sets the contents of the
rb
register to the PC for calling the subroutine that starts from the address set to the PC. The LSB
of the
rb
register is invalid and is always handled as
0
. When the
ret
instruction is executed in
the subroutine, the program flow returns to the instruction following the
call
instruction.
(
2
) Delayed branch (d bit =
1
)
call.d
%rb
When
call.d
is specified, the d bit in the instruction code is set and the following instruction
becomes a delayed instruction.
The delayed instruction is executed before branching to the subroutine. Therefore the address (PC
+
4
) of the instruction that follows the delayed instruction is stored into the stack as the return
address.
When the
call.d
instruction is executed, interrupts and exceptions cannot occur because traps
are masked between the
call.d
and delayed instructions.
Example
call %r0
; Calls the subroutine that starts from the
; address stored in the R0 register.
Caution
When the
call.d
instruction (delayed branch) is used, be careful to ensure that the next
instruction is limited to those that can be used as a delayed instruction. If any other instruction
is executed, the program may operate indeterminately. For the usable instructions, refer to the
instruction list in the Appendix.
Содержание S1C33 Series
Страница 1: ...CMOS 32 BIT SINGLE CHIP MICROCOMPUTER Core Manual S1C33 Family C33 PE ...
Страница 4: ......