Add debug printing macros and replace print statements with %print_debug in multiple files

This commit is contained in:
scawful
2025-10-01 12:39:51 -04:00
parent 4137d5bf7c
commit 3066aae151
6 changed files with 117 additions and 257 deletions

12
Util/macros.asm Normal file
View File

@@ -0,0 +1,12 @@
; Defines common macros for the project.
; Set to 1 to enable debug printing, 0 to disable.
!DEBUG = 1
; Prints a message and the current PC value during assembly, but only if !DEBUG is enabled.
; Usage: %print_debug("My message")
macro print_debug(message)
if !DEBUG == 1
print "<message> ", pc
endif
endmacro