Found the solution, it wasn't actually that difficult...
include \masm32\include\masm32rt.inc
.code
testxa macro ThingsToTest:VARARG
for arg,<ThingsToTest>
forc nnx,<&arg> ;; get first character
ifidni <&nnx>,</> ;; check for line feeds
crcnt=0
dxflg = 6
forc slashx,<&arg>
ifidn <&slashx>,</>
crcnt = crcnt + 1
endif
endm
mov dl,crcnt
goto Doit
endif
ifidni <&nnx>,<.> ;; check for spaces
crcnt=0
forc slashx,<&arg>
ifidn <&slashx>,<.>
crcnt = crcnt + 1
endif
endm
mov eax,crcnt
goto Doit
endif
:Doit
tmp$ CATSTR <found [>, <nnx>, <]>
% echo tmp$
exitm ; only want to test first character
endm
; do a whole bunch of other stuff here
; do more stuff here
endm
endm
program:
if 1
testxa .,d ecx,":",d eax,...,"test 3 < 4 ",/// ; works only with UAsm
else
testxa .,d ecx,":",d eax,...,"test 3 lt 4 ",/// ; works with UAsm and ML 6.14+
endif
ret
end program