summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorvin <git@vineetk.net>2024-06-30 19:10:29 -0400
committervin <git@vineetk.net>2024-06-30 19:10:29 -0400
commita4b39966aed8d41ad4ddc6700683c4779e8d1cb2 (patch)
tree8fab3574f3d83199a4965ffecd0db549105ff96c /cpu.c
parentf28733401ebfe5457a4a79a37fbd5d2001de90bd (diff)
start refactoring opcode defs into an array
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/cpu.c b/cpu.c
index 0bbbc75..edfe172 100644
--- a/cpu.c
+++ b/cpu.c
@@ -4,6 +4,8 @@
#include <stdlib.h>
#include <string.h>
+#include "cpu.h"
+#include "opcodes.h"
#include "rom.h"
#define MAX(a, b) ((a > b) ? a : b)
@@ -52,22 +54,6 @@ struct registers regs = {0};
struct Rom rom = {0};
-enum addressing_mode {
- AM_ACC,
- AM_IMPLICIT,
- AM_IMM,
- AM_ZP,
- AM_ZP_X,
- AM_ZP_Y,
- AM_REL,
- AM_ABS,
- AM_ABS_X,
- AM_ABS_Y,
- AM_IND,
- AM_IND_X,
- AM_IND_Y,
-};
-
/* 64K address space, 16bit words */
uint8_t memory[0x16000];