Intel UPI- 41A User Manual page 39

Microprocessor peripherals
Table of Contents

Advertisement

DA A Decimal Adjust Accumulator
Opcode
0 1 0 1
The 8-bit accumulator value is adjusted to form two 4-bit Binary Coded Decimal (BCD) digits
following the binary addition of BCD numbers The carry bit C is affected If the contents of
bits 0 – 3 are greater than nine or if AC is one the accumulator is incremented by six
The four high-order bits are then checked If bits 4 – 7 exceed nine or if C is one these bits are
increased by six If an overflow occurs C is set to one otherwise it is cleared to zero
Example
Assume accumulator contains 9AH
DEC A Decrement Accumulator
Opcode
0 0 0 0
The contents of the accumulator are decremented by one
w
(A)
Example
Decrement contents of data memory location 63
DEC Rr Decrement Register
Opcode
1 1 0 0
The contents of working register 'r' are decremented by one
w
(Rr)
Example
DECR1 DEC R1
DIS I Disable IBF Interrupt
Opcode
0 0 0 1
The input Buffer Full interrupt is disabled The interrupt sequence is not initiated by WR and
CS however an IBF interrupt request is latched and remains pending until an EN I (enable
IBF interrupt) instruction is executed
Note
The IBF flag is set and cleared independent of the IBF interrupt request so that handshaking
protocol can continue normally
0 1 1 1
DA A
C
AC
0
0
0
0
1
0
0 1 1 1
(A)
1
b
MOV R0
3FH
MOV A
R0
DEC A
MOV
R0 A
1 r
r
r
2
1
0
(Rr)
1
b
0 1 0 1
UPI-41A 41AH 42 42AH USER'S MANUAL
ACC ADJUSTED TO 01H with C set
ACC
9AH INITIAL CONTENTS
06H
ADD SIX TO LOW DIGIT
A1H
60H
ADD SIX TO HIGH DIGIT
01H
RESULT
MOVE '3F' HEX TO REG 0
MOVE CONTENTS OF LOCATION 63
TO ACC
DECREMENT ACC
MOVE CONTENTS OF ACC TO
LOCATION 63
r
0– 7
e
DECREMENT ADDRESS REG 1
35

Advertisement

Table of Contents
loading

Table of Contents