Branching Instructions - Panasonic PanaXSeries MN1030 Series User Manual

Panasonic microcomputer user's manual
Table of Contents

Advertisement

12.3.5 Branching Instructions

CALL Subroutine
Mnemonic
CALL label
CALLS (An)
CALLS label
RET
RETF
RETS
JSR (An)
JSR label
RTS
RTI
TRAP
label is either (d16,PC) or (d32,PC). Push the program counter containing the address
of the next instruction and necessary registers onto the stack, secure the necessary
stack area, and branch to the specified address.
This instruction is used paired with either a RET or RETF instruction. This pair
provides high-speed saving and restoring of registers to and from the stack and the
securing and release of the stack area.
Push the program counter containing the address of the next instruction onto the stack
and branch to the specified address. This instruction is used paired with a RETS
instruction for table jumps and other situations where the registers to be saved and the
size of the stack area are not known and for situations requiring backward
compatibility with JSR.
label is either (d16,PC) or (d32,PC). Push the program counter onto the stack and
branch to the specified address. This instruction is used paired with a RETS
instruction for table jumps and other situations where the registers to be saved and the
size of the stack area are not known and for situations requiring backward
compatibility with JSR.
Restore saved registers from the stack, free the stack area, and branch to the return
address saved on the stack. RET is used paired with CALL and the funcinfo directive.
Restore saved registers from the stack, free the stack area, and branch to the return
address stored in MDR. RETF is used paired with CALL and the funcinfo directive.
Branch to the return address saved on the stack. RETS is used paired with CALLS. It
is also used to maintain backward compatibility with RTS.
Push the program counter containing the address of the next instruction onto the stack
and branch to the specified address.
label is either (d16,PC) or (d32,PC). Push the program counter containing the address
of the next instruction onto the stack and branch to the specified address.
Branch to the return address saved on the stack.
RTS is used paired with JSR to maintain backward compatibility.
Return from an interrupt service routine.
Restore the PSW stored on the stack and branch to the return address saved on the
stack.
Push the program counter containing the address of the next instruction onto the stack
and branch to the predefined address (0x40000010).
This instruction is used for system calls to the operating system and libraries.
Chapter 12 List of Machine Language Instructions
Description of operation
List of Machine Language Instructions 243

Advertisement

Table of Contents
loading

Table of Contents