anyone have anything similair to the NASM debug macros written for MASM?

the nasm ones look pretty cool. you can do things like:
debug 'This is a regular string'
debug 'And this one is like fprintf %x', eax
all with the same macro.

Don't know enough nasm syntax to really translate it but here's the short macros that do the above:

%assign debug_count 1
%imacro debug 1-*
debug2 debug_count, %1
%assign debug_count_tmp 0
%rep %0-1
push eax
add esp, 4
mov eax, %2
debug3 debug_count, debug_count_tmp
sub esp, 4
pop eax
%assign debug_count_tmp debug_count_tmp + 4
%rotate 1
%endrep
debug4 debug_count
%assign debug_count debug_count + 1
%endmacro
%imacro debug2 2

debug_str_%1 db %2,0
align 4
__SECT__

debug_str_%1_array resd (%0 - 1)
debug_str_%1_buffer resb 1024
__SECT__
%endmacro
%imacro debug3 2
mov , eax
%endmacro
%imacro debug4 1
sc wvsprintf, debug_str_%1_buffer, debug_str_%1, debug_str_%1_array
sc OutputDebugString, debug_str_%1_buffer
%endmacro
Posted on 2001-11-25 20:40:10 by grv575
hi, ernie coded up some macros for debugging purposes. visit his page at http://ourworld.compuserve.com/homepages/ernies_world/debug.htm. maybe they will be of use to you.
Posted on 2001-11-25 21:26:56 by smurf
Just thought i would add that i use Ernie's macro work in pretty well every project.. (they are close)

NaN
Posted on 2001-11-25 23:34:26 by NaN