Specifications
DECrment
DEC drt 2.3~
01 10, I 15‘ I 13, I I I I I
15
6 5 ‘0
Operation: (dst) - 1 + (dst)
Condition Codes 2: set if the result is 0; cleared otherwise
N:-set if the result is < 0;cleared otherwise
V: not affected
C: set if (dst) was 100000; cleared otherwise
Description: Subtracts 1 from the contents of the destination.
NEGate
NEG dst
2.3~
0 1 0
I I t I I I I I I I I I
5
4
drt
15
6 5 0
Operation: - (dst) + (dst)
Condition Codes: as in SUB dst, #0
z:
set if the result is 0; cleared otherwise
N:
set if the result is < 0; cleared otherwise
c: cleared if the result is 0; set otherwise
v:
set if the result is 100000; cleared otherwise
Description: Replaces the contents of the destination address by their two’s
complement. (However, 100000. is replaced by itself-in two’s complement
notation the most negative number has no positive counterpart.)
To-ST TST dst 2.3~s *
0 1 0
I t 1. I , I I I’1 I I I
5 7
dst
15 6 5
0
Operation: 0 - (dst)
Condition Codes: as in CMP #0, dst
Z: set if the result is 0; cleared otherwise
N: set if the result is < 0; cleared otherwise
C: cleared
V: cleared
Description: Sets the condition codes Z and N according to the contents of
the destination address.
COMplement
COM dst
2.31~ *
01 IO, I 15, I I’,
dst
t I I I I
15 6 5 0
Operation: - (dst) + (dst)
Condition Codes: Z: set if result is 0; cleared otherwise
N: set if most significant bit. of result set; cleared other-
wise
C: set
V: cleared
Description: Replaces:. the co.nten)s. of tl$’ destination address by their
logical complement (each: bit .equal- to. 0 is .set.and each bit e&al to1 is
cleared).
l See the note for the CMP instruction.
32