Vault 7: Projects

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

16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 68 © 2005-2011 Microchip Technology Inc.
Example 4-11: Illegal Word Move Operations
MOV 0x1001, W0 ; move the word at 0x1001 to W0
Before Instruction:
W0 = 0x5555
Data Memory 0x1000 = 0x1234
Data Memory 0x1002 = 0x5678
After Instruction:
W0 = 0x1234
Data Memory 0x1000 = 0x1234
Data Memory 0x1002 = 0x5678
ADDRESS ERROR TRAP GENERATED
(source address is misaligned, so MOV is performed)
MOV W0, 0x1001 ; move W0 to the word at 0x1001
Before Instruction:
W0 = 0x1234
Data Memory 0x1000 = 0x5555
Data Memory 0x1002 = 0x6666
After Instruction:
W0 = 0x1234
Data Memory 0x1000 = 0x5555
Data Memory 0x1002 = 0x6666
ADDRESS ERROR TRAP GENERATED
(destination address is misaligned, so MOV is not performed)
MOV [W0], [W1++] ; word move [W0] to [W1],
; then post-inc W1
Before Instruction:
W0 = 0x1235
W1 = 0x1000
Data Memory 0x1000 = 0x1234
Data Memory 0x1234 = 0xAAAA
Data Memory 0x1236 = 0xBBBB
After Instruction:
W0 = 0x1235
W1 = 0x1002
Data Memory 0x1000 = 0xAAAA
Data Memory 0x1234 = 0xAAAA
Data Memory 0x1236 = 0xBBBB
ADDRESS ERROR TRAP GENERATED
(source address is misaligned, so MOV is performed)

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh