Vault 7: Projects

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

© 2005-2011 Microchip Technology Inc. DS70157F-page 103
Section 5. Instruction Descriptions
Instruction
Descriptions
5
Example 1:
ADD.B W5, W6, W7 ; Add W5 to W6, store result in W7
; (Byte mode)
Before
Instruction
After
Instruction
W5 AB00 W5 AB00
W6 0030 W6 0030
W7 FFFF W7 FF30
SR 0000 SR 0000
Example 2:
ADD W5, W6, W7 ; Add W5 to W6, store result in W7
; (Word mode)
Before
Instruction
After
Instruction
W5 AB00 W5 AB00
W6 0030 W6 0030
W7 FFFF W7 AB30
SR 0000 SR 0008 (N = 1)
ADD
Add Accumulators
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X
Syntax: {label:} ADD Acc
Operands: Acc [A,B]
Operation: If (Acc = A):
(ACCA) + (ACCB) ACCA
Else:
(ACCA) + (ACCB) ACCB
Status Affected: OA, OB, OAB, SA, SB, SAB
Encoding: 1100 1011 A000 0000 0000 0000
Description: Add the contents of Accumulator A to the contents of Accumulator B and
place the result in the selected accumulator. This instruction performs a
40-bit addition.
The ‘A’ bit specifies the destination accumulator.
Words: 1
Cycles: 1
Example 1:
ADD A ; Add ACCB to ACCA
Before
Instruction
After
Instruction
ACCA 00 0022 3300 ACCA 00 1855 7858
ACCB 00 1833 4558 ACCB 00 1833 4558
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