aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;