DAC

Name

Decrement accumulator

Function

The content of the accumulator is decremented by 1.

Syntax

DAC

Assembled

Binary

11111000

Decimal

248

Hexadecimal

0xF8

Symbolic

../../_images/dac-sym.png

Execution

1 word, 8-bit code and an execution time of 10.8 \({\mu}\) sec

Side-effects

No borrow sets the carry/link to 1;
Borrow sets the carry/link to a 0.

Implemented

iac

Detailed Description

The contents of the accumulator are decremented by one. The carry bit is set if there is no borrow out of the high-order bit position, and reset if there is a borrow.

Note

Subtracting a number is carried out using the complement of the number and adding. Therefore subtracting 1 becomes adding -1.

The opcode for this instruction does not contain any additional data:

../../_images/iac.png

Examples

Example 1

If the accumulator contains 9, then the DAC operation will be as follows:

Accumulator   =   1 0 0 1
    + (-1)        1 1 1 1
                 ---------
 Result      1    1 0 0 0
           Carry (indicating no borrow)

Example 2

If the accumulator contains 0, then the DAC operation will be as follows:

Accumulator   =   0 0 0 0
    + (-1)        1 1 1 1
                 ---------
 Result      0    1 1 1 1
           Carry (indicating a borrow)