This seems like an elementary question that I should know the answer to, having coded X86 assembly for decades, but I don't.
I have an array of dwords:
RandCounts DD 10 DUP(0)
And I need to access them individually as arguments to a function. I thought I could do this:
INVOKE wsprintf, ADDR buffer, OFFSET OutFmt, RandCounts, RandCounts[1], RandCounts[2], RandCounts[3],
RandCounts[4], RandCounts[5], RandCounts[6], RandCounts[7], RandCounts[8], RandCounts[9]
but that doesn't work: the assembler takes the subscripts as byte offsets from zero of the base of the array, which is totally wrong. Instead I had to do this:
INVOKE wsprintf, ADDR buffer, OFFSET OutFmt, RandCounts, RandCounts+4, RandCounts+8, RandCounts+12,
RandCounts+16, RandCounts+20, RandCounts+24, RandCounts+28, RandCounts+32, RandCounts+36
which seems really stupid. What am I missing here? Is there some way to declare and access this array so I can use numbers--[1], [2], etc.--to access each element?