From 0e6d133cc45a0891833d86d5c214a2f30d919a13 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Thu, 24 Apr 2025 05:24:59 +0200 Subject: [PATCH] assert: added new parameter to assert macro --- src/macros.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/macros.inc b/src/macros.inc index b1fefaa..728eeac 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -80,11 +80,12 @@ ; asserts. if $1 != $2 causes a ld b, b ; inputs: - ; $1: register to assert + ; $1: comparison (z, nz, c, nz) + ; $2: register to assert ; $2: value to assert #macro assert - cp $1, $2 - jr nz, @noassert REL + cp $2, $3 + jr $1, @noassert REL ld b, b @noassert: #endmacro -- 2.30.2