I expect I can access infinity macro argument in specified position in x64 machine.
For example
.macro myMacro infinityParam
mov rax, \infinityParam[0]
mov rbx, \infinityParam[1]
mov rcx, \infinityParam[2]
.endm
So I can use that macro like this:
myMacro 5,9,8,6
rax
will be 5.
rbx
will be 9.
rcx
will be 8.
So how do I make infinity argument in macro?
I'm sure it's possible because
.int
,.word
, and another data declaration is supported to do it.
Eg:
.word 2,7,4,9, ...
UPDATE: I have clue but it's not what I want.
.macro myMacroB param1, param2
mov rax, \param1
mov rbx, \param2
.endm
.macro myMacroA infParam
myMacroB \infParam
.endm
_start:
myMacroA "6,9"
As you see I can make infinity parameter with using string parameter,rax will be 6
and rbx will be 9
.
But it's not what I want because myMacroB
still finite param, I'm just giving clue.