aboutsummaryrefslogtreecommitdiff
path: root/tr8as.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-01 21:44:35 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-01 21:44:35 +0100
commitef84fb6fcb45a86fce97acda58606a76a937a1da (patch)
treea3e049b858724837cc9ce0106e30c9e1c028ddc6 /tr8as.c
parentc081dfe226c6e92865cbb97d8e9a2ef86d8c6acb (diff)
downloadtr8vm-ef84fb6fcb45a86fce97acda58606a76a937a1da.tar.gz
tr8vm-ef84fb6fcb45a86fce97acda58606a76a937a1da.zip
Added the VM player using SDL
- Wired basic functionality (fram-buffer, frame interrupt) - Bug fixes in the assembler
Diffstat (limited to 'tr8as.c')
-rw-r--r--tr8as.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tr8as.c b/tr8as.c
index fde3278..e450288 100644
--- a/tr8as.c
+++ b/tr8as.c
@@ -530,8 +530,8 @@ static uint8_t parse_r1_r2_or_imm(As *as, char *c, uint8_t *r1, uint8_t *r2, uin
if (*imm > 0xff)
return error_l("Overflow in immediate", &as->loc, word);
}
- /* AND r1, label */
- else if (!new_ref(as, word, 0xff, as->addr + 1))
+ /* ? r1, label */
+ else if (!new_ref(as, word, 0xff, as->addr))
return 0;
return 1;
@@ -1204,7 +1204,7 @@ static uint8_t parse_ld(As *as, char *c)
return error_l("Overflow in immediate", &as->loc, word);
}
/* LD r1, label */
- else if (!new_ref(as, word, 0xff, as->addr + 1))
+ else if (!new_ref(as, word, 0xff, as->addr))
return 0;
emit(as, 1, r1, 0, imm);