aboutsummaryrefslogtreecommitdiff
path: root/src/casm.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-04-25 18:41:46 +0100
committerIan C <ianc@noddybox.co.uk>2016-04-25 18:41:46 +0100
commitb52143315d3c9393c2ff62ab12f29549e3d629ef (patch)
tree249ff512be84a699ae5f79e97aec150ace1fdc4c /src/casm.c
parentae3e76a90ce0b6c810471d6602ffadf6bd182337 (diff)
parentf05ec1b1da3b29a2ff82eec3bbf69b7fe4ffa4b6 (diff)
Merge branch 'master' of https://github.com/noddybox/casm
Diffstat (limited to 'src/casm.c')
-rw-r--r--src/casm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/casm.c b/src/casm.c
index 771a7e3..6733ad5 100644
--- a/src/casm.c
+++ b/src/casm.c
@@ -151,6 +151,15 @@ static CommandStatus ORG(const char *label, int argc, char *argv[],
CMD_ARGC_CHECK(2);
CMD_EXPR(argv[1], result);
+ /* See if a bank was added
+ */
+ if (result > 0xffff)
+ {
+ int bank = (result >> 16);
+ SetAddressBank(bank);
+ result &= 0xffff;
+ }
+
SetPC(result);
/* If there was a label, set that as well