diff options
Diffstat (limited to 'applesystem.h')
-rw-r--r-- | applesystem.h | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/applesystem.h b/applesystem.h index 469fcb3..f561d36 100644 --- a/applesystem.h +++ b/applesystem.h @@ -2,14 +2,7 @@ typedef unsigned char byte; typedef unsigned short address; byte acc, X, Y, P, S = 0x00; address PC = 0x0000; -byte Memory[4096]; // TO DO. Add expansion capability to memory. - -/* -To Do. - + Find variables better passed as pointers instead - + Clean up this messy code -*/ - +register byte Memory[4096]; // TO DO. Add expansion capability to memory. // FLAGS const byte flag_N = 0x80; // Negative (Note that byte cast is necessary here only) @@ -45,7 +38,7 @@ void flagClear(byte flag){ // BCD - +// need to actually look into BCD on the 6502 byte toBCD(byte x){ if (x < 100){ byte a = ((x / 10) << 4); @@ -63,21 +56,6 @@ byte fromBCD(byte x){ return (a + b); } -// addBCD() - - - -// Class of instructions -//each one has every type of addressing mode, inherited from a base class. -// the different addressing modes will be distinguished when the bytecode is called, it will run the instructions function with a selection for the -/* example - -Immediate ADC #$44 $69 2 2 -instruction(0x69); -> ADC({enum for immediate}); - -Zero Page ADC $44 $65 2 3 -instruction(0x65); -> ADC({enum for Zero Page}); -*/ // Set particular flags // Functions which quickly set specific flags that are straightforward checks, and are repeated often. void setFlagN(byte x){ |