blob: 52a15090eeb7d428cdf84b5994c4943dd7afd464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
%ifndef DEBUG_INC
%define DEBUG_INC
%ifndef ZSTRING_INC
%include "zstring.inc"
%endif
%ifndef DTOS_INC
%include "dtos.inc"
%endif
;; TODO: Make print without newlineg
%macro DEBUG_HERE 0-1 ""
section .data
make_zstring %%head, "Log: ", __?FILE?__,":"
make_zstring %%text, %1,10
section .text
lea rax, [rel %%head]
call print_zstring
mov rax, __?LINE?__
call data_to_zstring_md
mov rax, [rax]
call print_zstring
lea rax, [rel %%text]
call print_zstring
%endm
%endif
|