aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-11 18:40:47 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-11 18:42:52 +0100
commit38a7a2d28a79fa061cc31b142f622a47838553be (patch)
treebffeada81194b7dba623dc668054eed19a03d3a9
parentb2489c87ee1ca3ee28f260cb7b1972da1181f44e (diff)
downloadtr8vm-38a7a2d28a79fa061cc31b142f622a47838553be.tar.gz
tr8vm-38a7a2d28a79fa061cc31b142f622a47838553be.zip
Equivalent code
-rw-r--r--tr8as.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tr8as.c b/tr8as.c
index ed6659a..dc08277 100644
--- a/tr8as.c
+++ b/tr8as.c
@@ -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));
}