Motorola HC12 Refrence Manual page 233

Table of Contents

Advertisement

ROR
Operation:
Description:
Shifts all bits of memory location M one place to the right. Bit 7 is loaded
from the C status bit. The C bit is loaded from the least significant bit of
M. Rotate operations include the carry bit to allow extension of shift and
rotate operations to multiple bytes. For example, to shift a 24-bit value
one bit to the right, the sequence LSR HIGH, ROR MID, ROR LOW
could be used where LOW, MID and HIGH refer to the low-order, middle,
and high-order bytes of the 24-bit value, respectively.
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
ROR opr16a
ROR oprx0_xysp
ROR oprx9,xysp
ROR oprx16,xysp
ROR [D ,xysp ]
ROR [ oprx16,xysp ]
CPU12
REFERENCE MANUAL
Rotate Right Memory
b7
– – – – – –
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $00; cleared otherwise.
N ⊕ C = [N • C] + [N • C] (for N and C after the shift)
Set if (N is set and C is cleared) or (N is cleared and C is set); cleared oth-
erwise (for values of N and C after the shift).
M0
Set if the LSB of M was set before the shift; cleared otherwise.
Address Mode
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
C
b0
V
C
Object Code
76 hh ll
66 xb
66 xb ff
66 xb ee ff
66 xb
66 xb ee ff
ROR
Cycles
Access Detail
4
rOPw
3
rPw
4
rPOw
5
frPPw
6
fIfrPw
6
fIPrPw
MOTOROLA
6-173

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents