Yes I don't like macros but there are cases when they really help the programmer.
I am trying to write a macro that completes a string with one to four ZEROes.
This is to have not to write 'ALIGN 4' between each line.
I have imagined something like CSTRING4(LABEL,"String")
I have tried to write it but the SIZESTR and the @SIZESTR are not my friends.
Is there some wants that wants to help me?
After the string one must add four zeroes because if the string length is a multiple of four it is not null terminated.
Examples :
"1234" => "1234",0,0,0,0 ; The worst case
"123" => "123",0 ; The best case
"12" => "12",0,0
"1" => "1",0,0,0
Actually I count each byte by hand and sometimes I use ObjConv to verify the aligment.
Not very easy.