Vault 7: Projects

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

© 2005-2011 Microchip Technology Inc. DS70157F-page 65
Section 4. Instruction Set Details
Instruction Set
Details
4
Example 4-9: Sample Byte Math Operations
CLR.B [W6--] ; byte clear [W6], then post-dec W6
Before Instruction:
W6 = 0x1001
Data Memory 0x1000 = 0x5555
After Instruction:
W6 = 0x1000
Data Memory 0x1000 = 0x0055
SUB.B W0, #0x10, W1 ; byte subtract literal 0x10 from W0
; and store to W1
Before Instruction:
W0 = 0x1234
W1 = 0xFFFF
After Instruction:
W0 = 0x1234
W1 = 0xFF24
ADD.B W0, W1, [W2++] ; byte add W0 and W1, store to [W2]
; and post-inc W2
Before Instruction:
W0 = 0x1234
W1 = 0x5678
W2 = 0x1000
Data Memory 0x1000 = 0x5555
After Instruction:
W0 = 0x1234
W1 = 0x5678
W2 = 0x1001
Data Memory 0x1000 = 0x55AC

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh