forked from SonicPixelation/DASM
-
Notifications
You must be signed in to change notification settings - Fork 1
Error with macro arguments and reordering #21
Copy link
Copy link
Open
Description
.def _counter, 0
; These are broken.
.macro dbg_inner=.asciiz %1 %n .def _counter, %e0 + 1
.macro dbg_log=dbg_inner _counter, %0
.macro op_log=dbg_log %0
; Reordering the arguments to dbg_inner fixes it:
;.macro fixed_inner=.asciiz %0 %n .def _counter, %e1 + 1
;.macro fixed_log=fixed_inner %0, _counter
;.macro fixed_op_log=fixed_log %0
op_log "text"
op_log "more text"
This produces an error for each usage of op_log:
Outputing to test.bin
Loading test.asm
Error: Could not evaluate expression:%0
Error: Could not evaluate expression:%0
Switching the order of arguments fixes it, see the commented version.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels