Motorola HC12 Refrence Manual page 84

Table of Contents

Advertisement

ASRA
Operation:
Description:
Shifts all bits of accumulator A one place to the right. Bit 7 is held con-
stant. Bit 0 is loaded into the C status bit. This operation effectively di-
vides 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
ASRA
MOTOROLA
6-24
Arithmetic Shift Right A
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).
A0
Set if the LSB of A was set before the shift; cleared otherwise.
Address Mode
INH
INSTRUCTION GLOSSARY
b0
C
V
C
Object Code
47
ASRA
Cycles
Access Detail
1
O
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents