
M68HC11
REFERENCE MANUAL
CENTRAL PROCESSING UNIT
MOTOROLA
6-19
6.3.4.2 Jumps
The jump instruction allows control to be passed to any address in the 64-Kbyte mem-
ory map.
6.3.4.3 Subroutine Calls And Returns (BSR, JSR, RTS)
These instructions provide an easy way to divide a programming task into manageable
blocks called subroutines. The CPU automates the process of remembering the ad-
dress in the main program where processing should resume after the subroutine is fin-
ished. This address is automatically pushed onto the stack when the subroutine is
called and is pulled off the stack during the RTS instruction that ends the subroutine.
6.3.4.4 Interrupt Handling (RTI, SWI, WAI)
This group of instructions is related to interrupt operations.
The software interrupt (SWI) instruction is similar to a JSR instruction, except the con-
tents of all working CPU registers are saved on the stack rather than just the return
address. SWI is unusual in that it is requested by the software program as opposed to
other interrupts that are requested asynchronously to the executing program.
Wait for interrupt (WAI) has two main purposes. WAI is executed to place the MCU in
a reduced power-consumption standby state (WAIT mode) until some interrupt occurs.
It is also used to reduce the latency time to some important interrupt. The reduction of
latency occurs because the time-consuming task of storing the CPU registers on the
stack is performed as soon as the WAI instruction begins executing. When the inter-
rupt finally occurs, the CPU is ready to fetch the appropriate vector so the delay asso-
ciated with register stacking is eliminated from latency calculations.
6.3.4.5 Miscellaneous (NOP, STOP, TEST)
NOP, which can be used to introduce a small time delay into the flow of a program, is
often useful in meeting the timing requirements of slow peripherals. By incorporating
NOP instructions into loops, longer delays can be produced.
Function
Jump
Mnemonic
JMP
DIR
X
EXT
X
INDX
X
INDY
X
INH
Function
Mnemonic
BSR
JSR
RTS
REL
X
DIR
EXT
INDX
INDY
INH
Branch to Subroutine
Jump to Subroutine
Return from Subroutine
X
X
X
X
X
Function
Mnemonic
RTI
SWI
WAI
INH
X
X
X
Return from Interrupt
Software Interrupt
Wait for Interrupt