diff options
Diffstat (limited to 'headers/addressing.h')
-rw-r--r-- | headers/addressing.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/headers/addressing.h b/headers/addressing.h index 58df3f5..d1b8371 100644 --- a/headers/addressing.h +++ b/headers/addressing.h @@ -33,7 +33,7 @@ typedef struct AddData AddData; //Holds address of current instruction. void* current_instruction; -Addressing fAddressGetLength(Addressing addr){ +int fAddressGetLength(Addressing addr){ switch(addr){ case eAbsolute: case eAbsoluteIndexedX: case eAbsoluteIndexedY: return 3; @@ -44,6 +44,20 @@ Addressing fAddressGetLength(Addressing addr){ } } +int fAddressGetLengthPrempt(int i){ //Check the functions to make sure that there isnt some incorrect values being given for length. + switch(i){ + case 0x6D: case 0x7D: case 0x79: case 0x2D: case 0x3D: case 0x39: case 0x0E: case 0x1E: case 0x2C: case 0xCD: case 0xD0: case 0xD9: case 0xEC: + case 0xCC: case 0xCE: case 0xDE: case 0x4D: case 0x5D: case 0x59: case 0xEE: case 0xFE: case 0x4C: case 0x20: case 0xAD: case 0xBD: case 0xB9: + case 0xAE: case 0xBE: case 0xAC: case 0xBC: case 0x4E: case 0x5E: case 0x0D: case 0x1D: case 0x19: case 0x2E: case 0x3E: case 0x6E: case 0x7E: + case 0xED: case 0xFD: case 0xF9: case 0x8D: case 0x9D: case 0x99: case 0x8E: case 0x8C: + return 3; + case 0x0A: case 0x2A: case 0x4A: case 0x6A: + return 1; + default: + return 2; + } +} + AddData fAddress(Addressing addr, short x) { AddData ret; |