diff options
Diffstat (limited to 'src/emu/cpu.h')
-rw-r--r-- | src/emu/cpu.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/emu/cpu.h b/src/emu/cpu.h new file mode 100644 index 0000000..43ccf00 --- /dev/null +++ b/src/emu/cpu.h @@ -0,0 +1,29 @@ +#ifndef _CPU_H +#define _CPU_H + +#include <stdint.h> +#include <stdbool.h> + +/* cpu traps */ +enum { + TRP_UNALIGNED, + TRP_DIVBYZERO, + TRP_SYSCALL, + TRP_ILL, +}; + +void trap(int num); + +/* program counter */ +extern uint32_t PC; + +/* status bits */ +extern bool N, Z; + +/* 32 general purpose registers */ +extern uint32_t GPR[32]; + +/* main cpu execution function */ +void execute(uint32_t IR); + +#endif |