Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2005-2011 Microchip Technology Inc. DS70157F-page 427
Section 5. Instruction Descriptions
Instruction
Descriptions
5
TBLRDH
Table Read High
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X X X
Syntax: {label:} TBLRDH{.B} [Ws], Wd
[Ws++], [Wd]
[Ws--], [Wd++]
[++Ws], [Wd--]
[--Ws], [++Wd]
[--Wd]
Operands: Ws ∈ [W0 ... W15]
Wd ∈ [W0 ... W15]
Operation: For byte operation:
If (LSB(Ws) = 1)
0 → Wd
Else
Program Mem [(TBLPAG),(Ws)] <23:16> → Wd
For word operation:
Program Mem [(TBLPAG),(Ws)] <23:16> → Wd <7:0>
0 → Wd <15:8>
Status Affected: None
Encoding: 1011 1010 1Bqq qddd dppp ssss
Description: Read the contents of the most significant word of program memory and
store it to the destination register Wd. The target word address of program
memory is formed by concatenating the 8-bit Table Pointer register,
TBLPAG<7:0>, with the effective address specified by Ws. Indirect
addressing must be used for Ws, and either register direct or indirect
addressing may be used for Wd.
In Word mode, zero is stored to the Most Significant Byte of the destination
register (due to non-existent program memory) and the third program
memory byte (PM<23:16>) at the specified program memory address is
stored to the Least Significant Byte of the destination register.
In Byte mode, the source address depends on the contents of Ws. If Ws is
not word-aligned, zero is stored to the destination register (due to
non-existent program memory). If Ws is word-aligned, the third program
memory byte (PM<23:16>) at the specified program memory address is
stored to the destination register.
The ‘B’ bit selects byte or word operation (‘0’ for word, ‘1’ for byte).
The ‘q’ bits select the destination Address mode.
The ‘d’ bits select the destination register.
The ‘p’ bits select the source Address mode.
The ‘s’ bits select the source register.
Note: The extension .B in the instruction denotes a byte move rather
than a word move. You may use a .W extension to denote a
word move, but it is not required.
Words: 1
Cycles: 2 (PIC24F, PIC24H, dsPIC30F, dsPIC33F)
5 (PIC24E, dsPIC33E)
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf