foo
[ld45_start_nothing] / src / dbglog.inc
diff --git a/src/dbglog.inc b/src/dbglog.inc
new file mode 100644 (file)
index 0000000..c0699dc
--- /dev/null
@@ -0,0 +1,23 @@
+; vi:filetype=nasm ts=8 sts=8 sw=8:
+
+       extern dbglog_str
+       extern dbglog_str_num
+
+%macro dbglog 1
+       mov esi, %%msg
+       call dbglog_str
+
+       section .data
+%%msg: db %1,0
+       section .text
+%endmacro
+
+%macro dbglog 2
+       mov esi, %%msg
+       mov eax, %2
+       call dbglog_str_num
+
+       section .data
+%%msg: db %1,0
+       section .text
+%endmacro