From dd194bf4de0d54cef7e14aeb7576d799acb61840 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 6 May 2023 12:05:38 +0100 Subject: Fixes port parsing and r3 --- tr8as.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tr8as.c') diff --git a/tr8as.c b/tr8as.c index fcc2c21..1b354ce 100644 --- a/tr8as.c +++ b/tr8as.c @@ -1037,6 +1037,11 @@ static uint8_t parse_port(As *as, char **c) if (r1 == 0xff) return error_l("Syntax error", &as->loc, word); + *c = skip_whitespace(*c); + if (**c != ',') + return error_l("Syntax error", &as->loc, "expected ,"); + (*c)++; + if (!next_word(as, c, word, &wlen)) return 0; @@ -1047,7 +1052,7 @@ static uint8_t parse_port(As *as, char **c) if (r2 == 0xff) return error_l("Syntax error", &as->loc, word); - return emit(as, 0, r1, FHH, r2); + return emit(as, 0, r1, FHH, r2 << 6); } static uint8_t parse_pop(As *as, char **c) -- cgit v1.2.3