diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-06 12:05:38 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-06 12:05:38 +0100 |
commit | dd194bf4de0d54cef7e14aeb7576d799acb61840 (patch) | |
tree | 65f9c75121368ca11862ab689cd575c49931937a /tr8as.c | |
parent | e55d0bef8fdaa1c5a1b963968d12c40b29dcba3b (diff) | |
download | tr8vm-dd194bf4de0d54cef7e14aeb7576d799acb61840.tar.gz tr8vm-dd194bf4de0d54cef7e14aeb7576d799acb61840.zip |
Fixes port parsing and r3
Diffstat (limited to 'tr8as.c')
-rw-r--r-- | tr8as.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |