diff options
Diffstat (limited to 'headers')
-rw-r--r-- | headers/addressing.h | 2 | ||||
-rw-r--r-- | headers/include.h | 4 | ||||
-rw-r--r-- | headers/instructions/definitions.h (renamed from headers/instructions.h) | 6 | ||||
-rw-r--r-- | headers/instructions/illegal/definitions.h | 0 | ||||
-rw-r--r-- | headers/instructions/illegal/init.h | 0 | ||||
-rw-r--r-- | headers/instructions/illegal/table-append.h | 0 | ||||
-rw-r--r-- | headers/instructions/init.h (renamed from headers/instructions-init.h) | 8 | ||||
-rw-r--r-- | headers/instructions/table.h (renamed from headers/instruction-table.h) | 6 |
8 files changed, 19 insertions, 7 deletions
diff --git a/headers/addressing.h b/headers/addressing.h index d1b8371..af102fd 100644 --- a/headers/addressing.h +++ b/headers/addressing.h @@ -28,7 +28,7 @@ struct AddData{ typedef struct AddData AddData; -#include"instructions-init.h" +#include"instructions/init.h" //Holds address of current instruction. void* current_instruction; diff --git a/headers/include.h b/headers/include.h index c4a2ef8..8f067c2 100644 --- a/headers/include.h +++ b/headers/include.h @@ -4,6 +4,6 @@ #include"string.h" #include"6502.h" #include"addressing.h" -#include"instructions.h" -#include"instruction-table.h" +#include"instructions/definitions.h" +#include"instructions/table.h" #include"apple.h"
\ No newline at end of file diff --git a/headers/instructions.h b/headers/instructions/definitions.h index bdcd442..bdeb54e 100644 --- a/headers/instructions.h +++ b/headers/instructions/definitions.h @@ -347,4 +347,8 @@ void fNOP(Addressing addr, address val){ idata = fAddress(addr, val); void fBRK(Addressing addr, address val){ idata = fAddress(addr, val); flagSet(flag_B); -}
\ No newline at end of file +} + +#ifdef ILLEGAL +#include"illegal/definitions.h" +#endif
\ No newline at end of file diff --git a/headers/instructions/illegal/definitions.h b/headers/instructions/illegal/definitions.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/headers/instructions/illegal/definitions.h diff --git a/headers/instructions/illegal/init.h b/headers/instructions/illegal/init.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/headers/instructions/illegal/init.h diff --git a/headers/instructions/illegal/table-append.h b/headers/instructions/illegal/table-append.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/headers/instructions/illegal/table-append.h diff --git a/headers/instructions-init.h b/headers/instructions/init.h index 6fddec4..dd2d477 100644 --- a/headers/instructions-init.h +++ b/headers/instructions/init.h @@ -1,5 +1,5 @@ // instruction-init.h -// Initializes every instruction function prior to addressing.h so that function addresses are accessible +// Initializes every instruction function prior to addressing.h // Load and Store Instructions void fLDA(Addressing, address); @@ -67,4 +67,8 @@ void fSED(Addressing, address); void fSEI(Addressing, address); // NOP/BRK Instructions void fNOP(Addressing, address); -void fBRK(Addressing, address);
\ No newline at end of file +void fBRK(Addressing, address); + +#ifdef ILLEGAL +#include"illegal/init.h" +#endif
\ No newline at end of file diff --git a/headers/instruction-table.h b/headers/instructions/table.h index bb51adb..f37814b 100644 --- a/headers/instruction-table.h +++ b/headers/instructions/table.h @@ -261,6 +261,10 @@ void initInstructionTable(){ setInstructionTable(0xEA, (uintptr_t)&fNOP, eImplied); //BRK(Addressing, address); setInstructionTable(0x00, (uintptr_t)&fBRK, eImplied); -} + #ifdef ILLEGAL + #include"illegal/table-append.h" + #endif + +} |