Yeah, thanks, that's a great piece. I would use it if I needed to get the length at run-time. [And it Definitely uses more code than I wanted :)) ] That's not exactly what I actually want to do, though.
I'm writing a DOS app just for fun. I'm upgrading from TASM to NASM and I want to make the procedure call interface like in TASM. For example, I want to be able to write stuff like
proc hex2ascii HexNumber:dword,pOutputBuffer:word
mov di,pOutputBuffer
..... and so on ....
endp hex2ascii
So we need 'proc' and 'endp' macros. To distinguish between word and dword params, I need to analyze the arguments passed to 'proc' at compile-time. There are macros %substr and %strlen, but they seem to require quotes. I thought it would be silly to write
proc hex2ascii "hexNumber:dword","pOutputBuffer:word"
....
endp hex2ascii
,wouldn't it? So what should I do?
By the way, how would you implement the following TASM macro:
irpc character,
db ’&character&’,0Fh
endm
It's taken from a book and is intended to prepare strings to copy directly into video-memory at B8000h.
Thanks in advance.