# Vault 7: Projects

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

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 44
- 45
- 46
- 47
- 48
…
- 501
- 502

16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 46 © 2005-2011 Microchip Technology Inc.
Table 3-7: Compare/Skip and Compare/Branch Instructions
Assembly Syntax Description Words Cycles
(1)
Page
Number
BTSC f,#bit4 Bit test f, skip if clear 1 1 (2 or 3)
(5)
160
BTSC Ws,#bit4 Bit test Ws, skip if clear 1 1 (2 or 3)
(5)
162
BTSS f,#bit4 Bit test f, skip if set 1 1 (2 or 3)
(5)
164
BTSS Ws,#bit4 Bit test Ws, skip if set 1 1 (2 or 3)
(5)
166
CP f Compare (f – WREG) 1 1
(5)
191
CP Wb,#lit5
(2)
Compare (Wb – lit5) 1 1 192
CP Wb,#lit8
(3)
Compare (Wb – lit8) 1 1 193
CP Wb,Ws Compare (Wb – Ws) 1 1
(5)
194
CP0 f Compare (f – 0x0000) 1 1
(5)
196
CP0 Ws Compare (Ws – 0x0000) 1 1
(5)
197
CPB f Compare with Borrow (f – WREG – C) 1 1
(5)
198
CPB Wb,#lit5
(2)
Compare with Borrow (Wb – lit5 – C) 1 1 199
CPB Wb,#lit8
(3)
Compare with Borrow (Wb – lit8 – C) 1 1 200
CPB Wb,Ws Compare with Borrow (Wb – Ws – C) 1 1
(5)
201
CPBEQ Wb,Wn,Expr
(3)
Compare Wb with Wn, branch if = 1 1 (5)
(4)
203
CPBGT Wb,Wn,Expr
(3)
Signed compare Wb with Wn, branch if > 1 1 (5)
(4)
204
CPBLT Wb,Wn,Expr
(3)
Signed compare Wb with Wn, branch if < 1 1 (5)
(4)
205
CPBNE Wb,Wn,Expr
(3)
Compare Wb with Wn, branch if ≠ 1 1 (5)
(4)
204
CPSEQ Wb, Wn Compare (Wb – Wn), skip if = 1 1 (2 or 3) 207
CPSGT Wb, Wn Signed compare (Wb – Wn), skip if > 1 1 (2 or 3) 211
CPSLT Wb, Wn Signed compare (Wb – Wn), skip if < 1 1 (2 or 3) 212
CPSNE Wb, Wn Compare (Wb – Wn), skip if ≠ 1 1 (2 or 3) 214
Note 1: Conditional skip instructions execute in 1 cycle if the skip is not taken, 2 cycles if the skip is taken over a
one-word instruction and 3 cycles if the skip is taken over a two-word instruction.
2: This instruction is only available in PIC24F, PIC24H, dsPIC30F, and dsPIC33F devices.
3: This instruction is only available in dsPIC33E and PIC24E devices.
4: Compare-branch instructions in dsPIC33E/PIC24E devices execute in 1 cycle if the branch is not taken
and 5 cycles if the branch is taken.
5: In dsPIC33E and PIC24E devices, read and read-modify-write operations on non-CPU Special Function
Registers require an additional cycle when compared to dsPIC30F, dsPIC33F, PIC24F and PIC24H
devices.

- 1
- 2
…
- 44
- 45
- 46
- 47
- 48
…
- 501
- 502