aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-04-25 18:41:34 +0100
committerIan C <ianc@noddybox.co.uk>2016-04-25 18:41:34 +0100
commitae3e76a90ce0b6c810471d6602ffadf6bd182337 (patch)
tree97d66d072a45f904db8fb5345752d23f607934bd
parent6ca71dd7a7f10fa6857f1a1bc586059cd78e275a (diff)
Pre-merge
-rw-r--r--src/65c816.c44
-rw-r--r--src/parse.c4
2 files changed, 46 insertions, 2 deletions
diff --git a/src/65c816.c b/src/65c816.c
index 0fbf8bc..7313905 100644
--- a/src/65c816.c
+++ b/src/65c816.c
@@ -207,6 +207,50 @@ static void CalcAddressMode(int argc, char *argv[], int quoted[],
}
+ /* Absolute Indirect
+ */
+ if (argc == 1 && quoted[1] == '(')
+ {
+ if (!ExprEval(argv[1], address))
+ {
+ snprintf(err, errsize, "%s: expression error: %s",
+ argv[1], ExprError());
+ *mode = ADDR_MODE_ERROR;
+ return;
+ }
+
+ CMD_RANGE_ADDR_MODE(mode,
+ DIRECT_PAGE_INDIRECT,
+ ABSOLUTE_INDIRECT,
+ ADDR_MODE_ERROR,
+ address);
+
+ return;
+ }
+
+
+ /* Absolute Indirect Long
+ */
+ if (argc == 1 && quoted[1] == '[')
+ {
+ if (!ExprEval(argv[1], address))
+ {
+ snprintf(err, errsize, "%s: expression error: %s",
+ argv[1], ExprError());
+ *mode = ADDR_MODE_ERROR;
+ return;
+ }
+
+ CMD_RANGE_ADDR_MODE(mode,
+ DIRECT_PAGE_INDIRECT_LONG,
+ ABSOLUTE_INDIRECT_LONG,
+ ADDR_MODE_ERROR,
+ address);
+
+ return;
+ }
+
+
/* Absolute,[XY]
*/
if (argc == 3 && !quoted[1])
diff --git a/src/parse.c b/src/parse.c
index abcd149..38d5f90 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -111,13 +111,13 @@ int ParseLine(Line *line, const char *source)
static const char *quote_start_chars[2] =
{
"",
- "\"'("
+ "\"'(["
};
static const char *quote_end_chars[2] =
{
"",
- "\"')"
+ "\"')]"
};
const char *p = NULL;