diff options
Diffstat (limited to 'src/cpu/addressing.c')
-rw-r--r-- | src/cpu/addressing.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cpu/addressing.c b/src/cpu/addressing.c index e5625fa..60ec4f0 100644 --- a/src/cpu/addressing.c +++ b/src/cpu/addressing.c @@ -8,7 +8,7 @@ //Holds address of current instruction. void* current_instruction; -address fAddressGetAddress(Addressing mode, short x) { +address fAddressGetAddress(Addressing mode, address x) { switch(mode){ case eImplied: case eRelative: @@ -47,12 +47,11 @@ int fAddressGetLength(Addressing mode){ } } -byte fAddressGetValue(Addressing mode, short x, address addr) { +byte fAddressGetValue(Addressing mode, address x, address addr) { switch(mode){ case eImplied: - case eIndirectAbsolute: return 0; - case eRelative: // TODO: MARKER FOR 3/12/2023 + case eRelative: case eImmediate: return x; case eAccumulator: @@ -62,7 +61,7 @@ byte fAddressGetValue(Addressing mode, short x, address addr) { } } -int fAddressGetCycles(Addressing mode, short x, address addr) { +int fAddressGetCycles(Addressing mode, address x, address addr) { int cycles; //case &fADC: case &fAND: case &fBIT: case &fCMP: case &fCPX: case &fCPY: case &fEOR: case &fLDA: @@ -170,7 +169,7 @@ int fAddressGetCycles(Addressing mode, short x, address addr) { return cycles; } -AddData fAddress(Addressing mode, short x) { +AddData fAddress(Addressing mode, address x) { AddData ret; ret.add = fAddressGetAddress (mode, x); ret.value = fAddressGetValue (mode, x, ret.add); |