#ifndef _CPU_H #define _CPU_H #include #include /* 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