# Vault 7: Projects

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

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 402
- 403
- 404
- 405
- 406
…
- 501
- 502

16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 404 © 2005-2011 Microchip Technology Inc.
SL
Shift Left by Wns
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X X X
Syntax: {label:} SL Wb, Wns, Wnd
Operands: Wb ∈ [W0 ... W15]
Wns ∈ [W0 ...W15]
Wnd ∈ [W0 ... W15]
Operation: Wns<4:0> → Shift_Val
Wnd<15:Shift_Val> = Wb<15 – Shift_Val:0>
Wd<Shift_Val – 1:0> = 0
Status Affected: N, Z
Encoding: 1101 1101 0www wddd d000 ssss
Description: Shift left the contents of the source register Wb by the 5 Least Significant
bits of Wns (only up to 15 positions) and store the result in the
destination register Wnd. Any bits shifted out of the source register are
lost. Register direct addressing must be used for Wb, Wns and Wnd.
The ‘w’ bits select the address of the base register.
The ‘d’ bits select the destination register.
The ‘s’ bits select the source register.
Note 1: This instruction operates in Word mode only.
2: If Wns is greater than 15, Wnd will be loaded with 0x0.
Words: 1
Cycles: 1
Example 1:
SL W0, W1, W2 ; Shift left W0 by W1<0:4>
; Store result to W2
Before
Instruction
After
Instruction
W0 09A4 W0 09A4
W1 8903 W1 8903
W2 78A9 W2 4D20
SR 0000 SR 0000
Example 2:
SL W4, W5, W6 ; Shift left W4 by W5<0:4>
; Store result to W6
Before
Instruction
After
Instruction
W4 A409 W4 A409
W5 FF01 W5 FF01
W6 0883 W6 4812
SR 0000 SR 0000

- 1
- 2
…
- 402
- 403
- 404
- 405
- 406
…
- 501
- 502