03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INSTRUCTION SET DESCRIPTIONS<br />

NEG<br />

NOP<br />

NOT<br />

Negate:<br />

When Source Operand is a Byte:<br />

NEG dest<br />

(dest) ← FFH – (dest)<br />

Subtracts the destination operand, (dest) ← (dest) + 1 (affecting flags)<br />

which may be a byte or a word, from 0 When Source Operand is a Word:<br />

and returns the result to the destination.<br />

This forms the two's<br />

(dest) ← (dest) + 1 (affecting flags)<br />

(dest) ← FFFFH – (dest)<br />

complement of the number, effectively<br />

reversing the sign of an integer. If the<br />

operand is zero, its sign is not<br />

changed. Attempting to negate a byte<br />

containing –128 or a word containing –<br />

32,768 causes no change to the<br />

operand and sets OF.<br />

Instruction Operands:<br />

NEG reg<br />

NEG mem<br />

No Operation:<br />

NOP<br />

Causes the CPU to do nothing.<br />

Instruction Operands:<br />

none<br />

Logical Not:<br />

NOT dest<br />

Inverts the bits (forms the one's<br />

complement) of the byte or word<br />

operand.<br />

Instruction Operands:<br />

NOT reg<br />

NOT mem<br />

Table C-4. Instruction Set (Continued)<br />

Name Description Operation<br />

NOTE:<br />

AF ü<br />

CF ü<br />

DF –<br />

IF –<br />

OF ü<br />

PF ü<br />

SF ü<br />

TF –<br />

ZF ü<br />

None AF –<br />

CF –<br />

DF –<br />

IF –<br />

OF –<br />

PF –<br />

SF –<br />

TF –<br />

ZF –<br />

When Source Operand is a Byte:<br />

(dest) ← FFH – (dest)<br />

When Source Operand is a Word:<br />

(dest) ← FFFFH – (dest)<br />

The three symbols used in the Flags Affected column are defined as follows:<br />

– the contents of the flag remain unchanged after the instruction is executed<br />

the contents of the flag is undefined after the instruction is executed<br />

üthe flag is updated after the instruction is executed<br />

Flags<br />

Affected<br />

AF –<br />

CF –<br />

DF –<br />

IF –<br />

OF –<br />

PF –<br />

SF –<br />

TF –<br />

ZF –<br />

C-31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!