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 238 © 2005-2011 Microchip Technology Inc.
Cycles: 2
DO
Initialize Hardware Loop Wn
Example 1:
002000 LOOP6: DO W0, END6 ; Initiate DO loop (W0 reps)
002004 ADD W1, W2, W3 ; First instruction in loop
002006 . . .
002008 . . .
00200A . . .
00200C REPEAT #6
00200E SUB W2, W3, W4
002010 END6: NOP ; Last instruction in loop
; (Required NOP filler)
Before
Instruction
After
Instruction
PC 00 2000 PC 00 2004
W0 0012 W0 0012
DCOUNT 0000 DCOUNT 0012
DOSTART FF FFFF DOSTART 00 2004
DOEND FF FFFF DOEND 00 2010
CORCON 0000 CORCON 0100 (DL = 1)
SR 0000 SR 0080 (DA = 1)
Example 2:
002000 LOOPA: DO W7, ENDA ; Initiate DO loop (W7 reps)
002004 SWAP W0 ; First instruction in loop
002006 . . .
002008 . . .
00200A . . .
002010 ENDA: MOV W1, [W2++] ; Last instruction in loop
Before
Instruction
After
Instruction
PC 00 2000 PC 00 2004
W7 E00F W7 E00F
DCOUNT 0000 DCOUNT 200F
DOSTART FF FFFF DOSTART 00 2004
DOEND FF FFFF DOEND 00 2010
CORCON 0000 CORCON 0100 (DL = 1)
SR 0000 SR 0080 (DA = 1)
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf