blob: ded8d63b5f1a4a129d6af70f44b53b9f078f5945 (
plain)
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
|
// table.h
// Defines the instruction table, and the functions to access it.
#ifndef TABLE_H
#define TABLE_H
#include"cstdint"
#include"string"
#include"addressing.h"
void* InstructionTable;
void (*func)(Addressing, address);
#define InstructionTableSize (256 * (sizeof(uintptr_t) + sizeof(Addressing)))
uintptr_t* getInstructionTableFunction(int i);
Addressing* getInstructionTableAddressing(int i);
void callInstructionTable(int i, address val);
void setInstructionTable(int i, uintptr_t p, Addressing r);
// Sets an individual portion of an instruction set
void initInstructionTable();
// Initializes entirety of the instruction table in memory.
#endif
|