Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

© 2005-2011 Microchip Technology Inc. DS70157F-page 335
Section 5. Instruction Descriptions
Instruction
Descriptions
5
NEG
Negate Accumulator
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X
Syntax: {label:} NEG Acc
Operands: Acc [A,B]
Operation: If (Acc = A):
-ACCA ACCA
Else:
-ACCB ACCB
Status Affected: OA, OB, OAB, SA, SB, SAB
Encoding: 1100 1011 A001 0000 0000 0000
Description: Compute the two’s complement of the contents of the specified
accumulator. Regardless of the Saturation mode, this instruction
operates on all 40 bits of the accumulator.
The ‘A’ bit specifies the selected accumulator.
Words: 1
Cycles: 1
Example 1:
NEG A ; Negate ACCA
; Store result to ACCA
; CORCON = 0x0000 (no saturation)
Before
Instruction
After
Instruction
ACCA 00 3290 59C8 ACCA FF CD6F A638
CORCON 0000 CORCON 0000
SR 0000 SR 0000
Example 2:
NEG B ; Negate ACCB
; Store result to ACCB
; CORCON = 0x00C0 (normal saturation)
Before
Instruction
After
Instruction
ACCB FF F230 10DC ACCB 00 0DCF EF24
CORCON 00C0 CORCON 00C0
SR 0000 SR 0000

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh