blob: 43ccf0055396ab0516a67d0951c9c2ae8381fcb0 (
plain) (
tree)
|
|
#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
|