From ae3e76a90ce0b6c810471d6602ffadf6bd182337 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 25 Apr 2016 18:41:34 +0100 Subject: Pre-merge --- src/65c816.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/parse.c | 4 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3