aboutsummaryrefslogtreecommitdiff
path: root/src/casm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/casm.c')
-rw-r--r--src/casm.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/casm.c b/src/casm.c
index 9f685f8..1340eb7 100644
--- a/src/casm.c
+++ b/src/casm.c
@@ -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},