diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-03 13:36:27 +1000 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-03 13:36:27 +1000 |
commit | c9df40c99f40418d869712b31de1b59d7654362f (patch) | |
tree | 86ee085c3df1e90fcdab0b1cc8a1e56c69df0a15 /addressing.h | |
parent | 970f76b28ff07206b9e7bdfdce84a7bf8f5aecd0 (diff) |
removed some files
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 |