push \ pop macros to process multiple values in one line :
@ArgCount MACRO arglist:VARARG
LOCAL count
count = 0
FOR arg, <arglist>
count = count + 1
ENDM
EXITM count
ENDM
@ArgI MACRO index:REQ, arglist:VARARG
LOCAL count, retstr
count = 0
FOR arg, <arglist>
count = count + 1
IF count EQ index
retstr TEXTEQU arg
ENDIF
ENDM
EXITM retstr
ENDM
push2 MACRO args:VARARG
FOR p,<args>
push p
ENDM
ENDM
pop2 MACRO args:VARARG
FOR p,<args>
pop p
ENDM
ENDM
pushREV MACRO args:VARARG
LOCAL paramcount,arg
paramcount=@ArgCount(args)
WHILE paramcount
push @ArgI(paramcount,args)
paramcount = paramcount - 1
ENDM
ENDM
popREV MACRO args:VARARG
LOCAL paramcount,arg
paramcount=@ArgCount(args)
WHILE paramcount
pop @ArgI(paramcount,args)
paramcount = paramcount - 1
ENDM
ENDM