Boolean Logic Instructions; Clear, Complement, And Negate Instructions - Motorola HC12 Refrence Manual

Table of Contents

Advertisement

5.9 Boolean Logic Instructions

These instructions perform a logic operation between an 8-bit accumulator or the CCR
and a memory value. AND, OR, and exclusive OR functions are supported.
8
summarizes logic instructions.
Mnemonic
ANDA
ANDB
ANDCC
AND CCR with Memory (Clear CCR Bits)
EORA
EORB
ORAA
ORAB
ORCC
OR CCR with Memory (Set CCR Bits)

5.10 Clear, Complement, and Negate Instructions

Each of these instructions performs a specific binary operation on a value in an accu-
mulator or in memory. Clear operations clear the value to zero, complement opera-
tions replace the value with its one's complement, and negate operations replace the
value with its two's complement.
negate instructions.
Table 5-9 Clear, Complement, and Negate Instructions
Mnemonic
CLC
CLI
CLR
CLRA
CLRB
CLV
COM
COMA
COMB
NEG
NEGA
NEGB
MOTOROLA
5-6
Table 5-8 Boolean Logic Instructions
Function
AND A with Memory
AND B with Memory
Exclusive OR A with Memory
Exclusive OR B with Memory
OR A with Memory
OR B with Memory
Table 5-9
Function
Clear C Bit in CCR
Clear I Bit in CCR
Clear Memory
Clear A
Clear B
Clear V bit in CCR
One's Complement Memory
One's Complement A
One's Complement B
Two's Complement Memory
Two's Complement A
Two's Complement B
INSTRUCTION SET OVERVIEW
Operation
(A) • (M) ⇒ A
(B) • (M) ⇒ B
(CCR) • (M) ⇒ CCR
(A)
(B)
(A) + (M) ⇒ A
(B) + (M) ⇒ B
(CCR) + (M) ⇒ CCR
is a summary of clear, complement and
Operation
0 ⇒ C
$00 ⇒ M
$00 ⇒ A
$00 ⇒ B
0 ⇒ V
$FF – (M) ⇒ M or (M) ⇒ M
$FF – (A) ⇒ A or (A) ⇒ A
$FF – (B) ⇒ B or (B) ⇒ B
$00 – (M) ⇒ M or (M) + 1 ⇒ M
$00 – (A) ⇒ A or (A) + 1 ⇒ A
$00 – (B) ⇒ B or (B) + 1 ⇒ B
Table 5-
(M) ⇒ A
(M) ⇒ B
0 ⇒ I
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents