summaryrefslogtreecommitdiff
path: root/src/cpu/table.h
blob: 18cac90af5ebecc528ac7c99ee65c05d22f71b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//	table.h
//	Defines the instruction table, and the functions to access it.
#pragma once

#include"stdint.h"
#include"stdlib.h"
#include"string.h"
#include"addressing.h"


#define InstructionTableSize (256 * (sizeof(uintptr_t) + sizeof(Addressing)))

uintptr_t* GetInstructionTableFunction(int i);

Addressing* GetInstructionTableAddressing(int i);

void CallInstructionTable(int i, address val);

// Sets an individual portion of an instruction set
void SetInstructionTable(int i, uintptr_t p, Addressing r);

// Initializes instruction table in memory.
void InitInstructionTable();