Hello... i'm sorry... i haven't used the "search" function because i don't know what keywords to use and i haven't seen anything similar, yet... and i spent the entire day, yesterday, poring over the manuals included with hutch--'s MASM32 package... anyway, my question is this: i have some macro to display text (in real-mode) like this:
The problem is that i want to display "special" characters such as CRLF... i tried using a textequ to expand CRLF into ODh OAh... no avail... so was wondering how i would call the macro (or rewrite it)...
right now, i'm calling it like this:
but it passes sizeof returns 0dh,0ah, and the quotes as part of the string... (as a hack, i used a second parameter to specify length of string and if left blank, it uses the regular sizeof macro)
any help would be greatly appreciated :)
vga_print macro text:vararg
LOCAL textstuff
jmp @F
textstuff db text
@@:
mov cx,@sizeof(text)
lea si,textstuff
call vga_display
endm
The problem is that i want to display "special" characters such as CRLF... i tried using a textequ to expand CRLF into ODh OAh... no avail... so was wondering how i would call the macro (or rewrite it)...
right now, i'm calling it like this:
vga_print <'Chunky Monkey',0dh,0ah>
but it passes sizeof returns 0dh,0ah, and the quotes as part of the string... (as a hack, i used a second parameter to specify length of string and if left blank, it uses the regular sizeof macro)
any help would be greatly appreciated :)
vga_print macro text:vararg
LOCAL textstuff, _1
jmp _1
textstuff db text
_1:
mov cx, _1 - textstuff
lea si,textstuff
call vga_display
endm
It is not a good idea to use @@ in a macro. As you suspected, @SizeOf doesn't work with the type of strings your passing to the macro.thanks... you have put my mind at ease... i wasn't missing out on any action :)