Motorola HC12 Refrence Manual page 83

Table of Contents

Advertisement

ASR
Operation:
Description:
Shifts all bits of memory location M one place to the right. Bit 7 is held
constant. Bit 0 is loaded into the C status bit. This operation effectively
divides a two's complement value by two without changing its sign. The
carry bit can be used to round the result.
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
ASR opr16a
ASR oprx0_xysp
ASR oprx9,xysp
ASR oprx16,xysp
ASR [D ,xysp ]
ASR [ oprx16,xysp ]
CPU12
REFERENCE MANUAL
Arithmetic Shift 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 other-
wise (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
b0
C
V
C
Object Code
77 hh ll
67 xb
67 xb ff
67 xb ee ff
67 xb
67 xb ee ff
ASR
Cycles
Access Detail
4
rOPw
3
rPw
4
rPOw
5
frPPw
6
fIfrPw
6
fIPrPw
MOTOROLA
6-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents