CPU16
REFERENCE MANUAL
INSTRUCTION GLOSSARY
MOTOROLA
6-117
JSR
Operation:
Jump to Subroutine
JSR
Push (PC)
(SK : SP)
$0002
SK : SP
Push (CCR)
(SK : SP)
$0002
SK : SP
Effective Address
PK : PC
Description:
Causes a branch to a subroutine. After the current content of the
program counter and the condition code register are stacked, a 20-
bit effective address is placed in the concatenated program counter
extension field and program counter. The next instruction is fetched
from the new address. The effective address can be generated in
two ways:
1. Effective Address
=
Extension: 16-bit Extended Address
When extended addressing mode is employed, the effective ad-
dress is formed by a zero-extended 4-bit right-justified address
extension and a 16-bit extended address that are both contained
in the instruction. The EK field is not changed.
2. Effective Address
=
$0 : (index register)
+
0 : 20-bit Offset
When indexed addressing mode is employed, the effective ad-
dress is calculated by adding a zero-extended 20-bit signed off-
set to the zero-extended content of an index register. The
associated extension field is not changed.
Syntax:
JSR (effective address)
JSR (offset)
Condition Code Register:
Not affected.
Instruction Format:
Addressing Mode
EXT20
IND20, X
IND20, Y
IND20, Z
Opcode
FA
89
99
A9
Operand
zb hh ll
zg gggg
zg gggg
zg gggg
Cycles
10
12
12
12
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.