diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-11 18:40:47 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-11 18:42:52 +0100 |
commit | 38a7a2d28a79fa061cc31b142f622a47838553be (patch) | |
tree | bffeada81194b7dba623dc668054eed19a03d3a9 | |
parent | b2489c87ee1ca3ee28f260cb7b1972da1181f44e (diff) | |
download | tr8vm-38a7a2d28a79fa061cc31b142f622a47838553be.tar.gz tr8vm-38a7a2d28a79fa061cc31b142f622a47838553be.zip |
Equivalent code
-rw-r--r-- | tr8as.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1348,10 +1348,10 @@ static uint8_t parse_jmp(As *as, char **c) return error_l("Syntax error", &as->loc, "expected label or immediate"); /* JMP imm */ - if (!next_imm(as, word, &imm)) - /* JMP label */ - if (!new_ref(as, word, 0xffff, as->addr + 2)) - return 0; + if (!next_imm(as, word, &imm) + /* JMP label */ + && !new_ref(as, word, 0xffff, as->addr + 2)) + return 0; return (emit(as, 9, 0, FHH, FL) && emit_imm(as, imm)); } @@ -1382,10 +1382,10 @@ static uint8_t parse_call(As *as, char **c) return error_l("Syntax error", &as->loc, "expected label or immediate"); /* CALL imm */ - if (!next_imm(as, word, &imm)) - /* CALL label */ - if (!new_ref(as, word, 0xffff, as->addr + 2)) - return 0; + if (!next_imm(as, word, &imm) + /* CALL label */ + && !new_ref(as, word, 0xffff, as->addr + 2)) + return 0; return (emit(as, 9, 0, FHH, 0) && emit_imm(as, imm)); } |