summaryrefslogtreecommitdiffstats
path: root/src/emu/cpu.h
diff options
context:
space:
mode:
authorBenedikt Böhm <bb@xnull.de>2009-05-18 20:53:42 +0200
committerBenedikt Böhm <bb@xnull.de>2009-05-18 20:53:42 +0200
commit49f510d2d60129526832bfcd9c0f4049962bc80e (patch)
tree2828b773c75bdbc4014a3421c8046778a1a2b11b /src/emu/cpu.h
parent144258f0196b69cbdd2f29bd501276942efc3182 (diff)
downloadswppy-49f510d2d60129526832bfcd9c0f4049962bc80e.tar.gz
swppy-49f510d2d60129526832bfcd9c0f4049962bc80e.tar.xz
swppy-49f510d2d60129526832bfcd9c0f4049962bc80e.zip
move stuff around and create initial source structure
Diffstat (limited to 'src/emu/cpu.h')
-rw-r--r--src/emu/cpu.h29
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