From: Lukas Krickl Date: Mon, 14 Apr 2025 13:51:24 +0000 (+0200) Subject: tests: Added tests for using macros with defines and .defs in an X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=90ae4673b393e530bea38440c7778c0e35ade695;p=ulas%2F.git tests: Added tests for using macros with defines and .defs in an expression --- diff --git a/BUGS.md b/BUGS.md index e450286..97fed4b 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,17 +1,2 @@ # Known Bugs -## It is not possible to use #define as macro arguments - -To reproduce: - -- Create a macro -- #define a constnat -- Pass the constant as argument - -Expected - -- The macro uses the constant as is - -Acrual: - -- The constant fails to resolve diff --git a/tests/t0.bin b/tests/t0.bin index 28305dd..d41e184 100644 Binary files a/tests/t0.bin and b/tests/t0.bin differ diff --git a/tests/t0.s b/tests/t0.s index cf5d7ac..89c6143 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -202,3 +202,11 @@ test_scoped: @behind_scope: nop +.def int arg_p = 2 + +#macro defarg2 + .db $1 + 1, $2 + .db $1 +#endmacro + +defarg2 DEFARG * arg_p, arg_p diff --git a/tests/t0_dasm.s b/tests/t0_dasm.s index 3a4aa2b..4191bb5 100644 --- a/tests/t0_dasm.s +++ b/tests/t0_dasm.s @@ -131,4 +131,7 @@ ld bc, 0x0 jp 0x1e4 jp 0x1f2 -.db 0x0 + nop + inc bc + ld [bc], a +.db 0x2