diff options
Diffstat (limited to 'headers/6502.h')
-rw-r--r-- | headers/6502.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/headers/6502.h b/headers/6502.h index 0835f36..3a48edc 100644 --- a/headers/6502.h +++ b/headers/6502.h @@ -1,8 +1,11 @@ // 6502.h // Core elements of the 6502 CPU -typedef unsigned char byte; -typedef unsigned short address; +typedef unsigned char\ + byte; +typedef unsigned short\ + address; + byte acc, X, Y, P, S = 0x00; address PC = 0x0000; byte* Memory; // TO DO. Add expansion capability to memory. @@ -106,8 +109,15 @@ void setFlagZ(int x){ }*/ +// Memory Manipulation +//need to add special conditions for D0 and FF +byte getMemory(address x){ + return Memory[x]; +} - +void setMemory(address x, byte y){ + Memory[x] = y; +} |