From 38a7a2d28a79fa061cc31b142f622a47838553be Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 11 May 2023 18:40:47 +0100 Subject: Equivalent code --- tr8as.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tr8as.c') 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)); } -- cgit v1.2.3