Multiplication And Division Instructions; Bit Test And Manipulation Instructions - Motorola HC12 Refrence Manual

Table of Contents

Advertisement

5.11 Multiplication and Division Instructions

There are instructions for signed and unsigned 8- and 16-bit multiplication. Eight-bit
multiplication operations have a 16-bit product. Sixteen-bit multiplication operations
have 32-bit products.
Integer and fractional division instructions have 16-bit dividend, divisor, quotient, and
remainder. Extended division instructions use a 32-bit dividend and a 16-bit divisor to
produce a 16-bit quotient and a 16-bit remainder.
Table 5-10
is a summary of multiplication and division instructions.
Table 5-10 Multiplication and Division Instructions
Mnemonic
EMUL
EMULS
MUL
Mnemonic
EDIV
EDIVS
FDIV
IDIV
IDIVS

5.12 Bit Test and Manipulation Instructions

These operations use a mask value to test or change the value of individual bits in an
accumulator or in memory. BITA and BITB provide a convenient means of testing bits
without altering the value of either operand.
manipulation instructions.
Table 5-11 Bit Test and Manipulation Instructions
Mnemonic
BCLR
BITA
BITB
BSET
CPU12
REFERENCE MANUAL
Multiplication Instructions
Function
16 by 16 Multiply (Unsigned)
16 by 16 Multiply (Signed)
8 by 8 Multiply (Unsigned)
Division Instructions
Function
32 by 16 Divide (Unsigned)
32 by 16 Divide (Signed)
16 by 16 Fractional Divide
16 by 16 Integer Divide (Unsigned)
16 by 16 Integer Divide (Signed)
Function
Clear Bits in Memory
Bit Test A
Bit Test B
Set Bits in Memory
INSTRUCTION SET OVERVIEW
Operation
(D) × (Y) ⇒ Y : D
(D) × (Y) ⇒ Y : D
(A) × (B) ⇒ A : B
Operation
(Y : D) ÷ (X)
Quotient ⇒ Y
Remainder ⇒ D
(Y : D) ÷ (X)
Quotient ⇒ Y
Remainder ⇒ D
(D) ÷ (X) ⇒ X
remainder ⇒ D
(D) ÷ (X) ⇒ X
remainder ⇒ D
(D) ÷ (X) ⇒ X
remainder ⇒ D
Table 5-11
is a summary of bit test and
Operation
(M) • (mm) ⇒ M
(A) • (M)
(B) • (M)
(M) + (mm) ⇒ M
MOTOROLA
5-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents