CPU16
REFERENCE MANUAL
COMPARISON OF CPU16/M68HC11 CPU ASSEMBLY LANGUAGE
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
A-11
A.4.17 SEI
The SEI instruction has been replaced by ORP. ORP performs inclusive OR between
the content of the condition code register and an unsigned immediate operand, then
replaces the content of the CCR with the result. The PK extension field (CCR[3:0]) is
not affected.
The following code can be used to set all the bits in the CCR IP field:
ORP #$00E0
The ORP instruction can set all CCR bits, except the PK extension field, at once.
A.4.18 SEV
The SEV instruction has been replaced by ORP. ORP performs inclusive OR between
the content of the condition code register and an unsigned immediate operand, then
replaces the content of the CCR with the result. The PK extension field (CCR[3:0]) is
not affected.
The following code can be used to set the CCR V bit:
ORP #$0200
The ORP instruction can set all CCR bits, except the PK extension field, at once.
A.4.19 STOP (LPSTOP)
LPSTOP is used to minimize microcontroller power consumption. The CPU16 has
seven levels of interrupt priority. If an interrupt request of higher priority than the prior-
ity value stored when the microcontroller enters low-power stop mode is received, the
microcontroller is activated, and the CPU16 processes an interrupt exception.
A.5 Instructions that Operate Differently
A.5.1 BSR
The CPU16 stack frame differs from the M68HC11 CPU stack frame. The CPU16
stacks the current PC and CCR, but restores only the return PK: PC. The programmer
must designate (PSHM) which other registers are stacked during a subroutine.
Because SK : SP point to the next available word address, stacked CPU16 parameters
are at a different offset from the stack pointer than stacked M68HC11 CPU parame-
ters. In order for RTS to work with all three calling instructions, the PK : PC value
stacked by BSR is decremented by two before being pushed on to the stack. Stacked
PC value is the return address + $0002.
A.5.2 JSR
The CPU16 stack frame differs from the M68HC11 CPU stack frame. The CPU16
stacks the current PC and CCR, but restores only the return PK : PC. The programmer
must designate (PSHM) which other registers are stacked during a subroutine.
Because SK : SP point to the next available word address, stacked CPU16 parameters
are at a different offset from the stack pointer than stacked M68HC11 CPU
parameters.
F
Freescale Semiconductor, Inc.
n
.