aboutsummaryrefslogtreecommitdiff
path: root/src/65c816.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/65c816.c')
-rw-r--r--src/65c816.c44
1 files changed, 44 insertions, 0 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])