diff options
author | Ian C <ianc@noddybox.co.uk> | 2016-03-16 11:31:21 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2016-03-16 11:31:21 +0000 |
commit | 4564c7906be89463b8f9637685e1785dd900f4b3 (patch) | |
tree | c80bcbcbca885485199ae77960570e973328c03a /src/casm.c | |
parent | e23a3e98bf4afc6bc900a427c20c01feac476d1a (diff) |
Updated banking to work with output.
Diffstat (limited to 'src/casm.c')
-rw-r--r-- | src/casm.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -139,6 +139,27 @@ static CommandStatus ORG(const char *label, int argc, char *argv[], LabelSet(label, result, ANY_LABEL); } + /* See if an optional bank was supplied + */ + if (argc > 2) + { + CMD_EXPR(argv[2], result); + SetAddressBank(result); + } + + return CMD_OK; +} + +static CommandStatus BANK(const char *label, int argc, char *argv[], + int quoted[], char *err, size_t errsize) +{ + int result; + + CMD_ARGC_CHECK(2); + CMD_EXPR(argv[1], result); + + SetAddressBank(result); + return CMD_OK; } @@ -410,6 +431,8 @@ static struct {".eq", EQU}, {"org", ORG}, {".org", ORG}, + {"bank", BANK}, + {".bank", BANK}, {"ds", DS}, {".ds", DS}, {"defs", DS}, |