Specifications

Multiple Precision Operations-It is sometimes convenient to d6 arithmetic
on operands considered as multiple words.‘The
PDP-11
makes special pro-
vision for such operations with the instructions ADC (ADd Carry) and SBC
(SuBtract Carry).
ADd carry
ADC dst
2.3YS
01 IO, 1 I I I I 1
5 5
dst
1 I
I I
15
6 5
0
Operation: (dst) + (F) + (dst)
Condition Cobes:
Z: set if result = 0; cleared otherwise
N: set if result < 0; cleared otherwise
c: set if (dst) was 177777 and (C) was 1; cleared other-
wise
V: set if (dst) was 077777 and (C) was 1; cleared other-
wise.
Description: Adds the contents of the C-bit into the destination. This permits
the carry from the addition of
the two low-order words to be carried into the
high-order result.
Double precision addition may be done with the following instruction se-
quence:
ADD AO, BO
; add low-order parts
ADC Bl, ; add carry into high-order
ADD
Al,Bl
; add high-order parts
suatract
Carry SEC dst 2.3~
0 1 0 ,.. 5
I I I I I I I I J
6
dst
t5 6 5 0
Operation: (dst) - (C) -, (dst)
Condition Codes: Z: set if the result 0;‘cleared otherwise
N: set if the result < 0; cleared otherwise
C: cleared if the result is 0 and C = 1; set otherwise
V: set if the result is
100000;
cleared otherwise
Description: Subtracts the contents of the C-bit from the-destination. This
permits the carry from the subtraction of two low-order wdtds to be sub-
tracted from the high-order part of the result.
Double precision subtraction is done by:-
SUB AO, BO
SBC
Bl
SUB Al, Bl
Double precision negation is accomplisheg bith:
NEG BO
;negate low-order part; sets C unless BO = 0
SBC Bl
;makes “NEG Bl” = “COMB Bl” unless BO = 0
l
NEG Bl
;negate high-order part
Rotates-Testing of sequential bits of’s word and detailed bit manipulation
are aided with rotate operations. The instructions ROR (RDtate Right) and
ROL (ROtate Left) cause the C-bit of the status register to be effectively
appended to the destination operand in circular bit shifting.
33