-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgagrader8051jmptable.h
More file actions
33 lines (26 loc) · 896 Bytes
/
gagrader8051jmptable.h
File metadata and controls
33 lines (26 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef GAGRADER8051JMPTABLE_H
#define GAGRADER8051JMPTABLE_H
/* This grader looks for jump tables within 8051
* code, as a way to confirm that the architecture is 8051.
* This is usually right when it matches, but it won't match
* code that doesn't use this technique.
*
* In the DirecTV H card, jump tables look like this:
* mov dptr, #0xDEAD ; Launcher code.
* jmp (a, dptr) ; Do the launch.
* ...
* 0xdead: ljmp 0xdead ; Jump table entry, first of many.
* ...
*/
/* For other ideas, check out 8051Enthusiast's repo of 8051 tools.
* https://github.com/8051Enthusiast/at51
*/
#include "gagrader.h"
class GAGrader8051JmpTable : public GAGrader
{
public:
GAGrader8051JmpTable();
uint64_t isValid(GoodASM *goodasm) override; // Is it real?
bool isCompatible(GALanguage *lang) override; // Is this grader compatible?
};
#endif // GAGRADER8051JMPTABLE_H