From: Lukas Krickl Date: Mon, 4 Dec 2023 09:16:12 +0000 (+0100) Subject: Added test for relative jump X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=645843dc103f07c05200a2c89fcdc6ddde240075;p=ulas%2F.git Added test for relative jump --- diff --git a/src/ulas.c b/src/ulas.c index 03f57cb..dffac69 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -1757,9 +1757,9 @@ const struct ulas_instr ULASINSTRS[] = { // jr ULAS_INSTR_R8_EXPR8("jr", 0x20, ULAS_REG_NOT_ZERO), ULAS_INSTR_R8_EXPR8("jr", 0x30, ULAS_REG_NOT_CARRY), - {"jr", {ULAS_E8, 0}, {0x18, ULAS_E8, 0x00}}, ULAS_INSTR_R8_EXPR8("jr", 0x28, ULAS_REG_ZERO), ULAS_INSTR_R8_EXPR8("jr", 0x38, ULAS_REG_CARRY), + {"jr", {ULAS_E8, 0}, {0x18, ULAS_E8, 0x00}}, // ret ULAS_INSTR_REG("ret", 0xC0, ULAS_REG_NOT_ZERO), diff --git a/tests/t0.bin b/tests/t0.bin index 5d2bc3a..6cc5630 100644 Binary files a/tests/t0.bin and b/tests/t0.bin differ diff --git a/tests/t0.s b/tests/t0.s index f6eb38d..fe99822 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -79,3 +79,4 @@ l1: l2: @local: ld bc, @local ld bc, $ + jr z, $ - l2