diff options
Diffstat (limited to 'addressing.h')
-rw-r--r-- | addressing.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/addressing.h b/addressing.h index ccde083..3d67b33 100644 --- a/addressing.h +++ b/addressing.h @@ -19,6 +19,17 @@ enum Addressing { typedef int Addressing; +int getLength(Addressing addr){ + switch(addr){ + case eAbsolute: case eAbsoluteIndexedX: case eAbsoluteIndexedY: + return 3; + case eAccumulator: + return 1; + default: + return 2; + } +} + /* * Any addressing method which is single line commented out without definition * implies that handling should be hard-coded in the switch case of the |