EasyManua.ls Logo

Motorola 68000 - Page 42

Motorola 68000
60 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
40
The 68000's Instruction Set
Attributes: Size = byte
Description: The operand addressed as the destination and the extend bit in
the CCR are subtracted from zero. The subtraction is performed
using binary coded decimal (BCD) arithmetic. This instruction
calculates the tens complement of the destination if the X-bit is
clear, and the nines complement if X = 1. This is a byte-only
operation. Negating a BCD number (with X = 0) has the effect of
subtracting it from 100
10
.
Condition codes: X N Z V C
* U * U *
The Z-bit is cleared if the result is non-zero and is unchanged
otherwise. The C-bit is set if a decimal borrow occurs. The X-bit
is set to the same value as the C-bit.
Destination operand addressing modes
NEG Negate
Operation: [destination] 0 - [destination]
Syntax: NEG <ea>
Attributes: Size = byte, word, longword
Description: Subtract the destination operand from 0 and store the result in
the destination location. The difference between NOT and NEG
instructions is that NOT performs a bit-by-bit logical complemen-
tation, while a NEG performs a twos complement arithmetic sub-
traction. All bits of the condition code register are modified by a
NEG operation. For example, if D3.B=11100111
2
, the logical op-
eration NEG.B D3 results in D3=00011001
2
(XNZVC=10001) and
NOT.B D3=00011000
2
(XNZVC=-0000).
Condition codes: X N Z V C
* * * * *
Note that the X-bit is set to the value of the C-bit.

Other manuals for Motorola 68000

Related product manuals