I wander how could I use
integer (or other numeric params) with irp.
I usualy used string and had no problems,
lately I tried to write a macro that would
set bits indexes of wich specified in param with VARARG.
I tried this way:


sbits macro bits:VARARG
result=0
irp n,bits
ind = 1 SHL n
result = result OR ind
endm
exitm %result
endm

But I got error warning from MASM about integer usage.

I'm pretty sure about the end.
'Cause I wrote lots of macs like this
(set bits in spesified ranged of least and most segnificant
set)


stmb macro msb,lsb
exitm %(0-(1 SHL lsb)) AND ((1 SHL (msb+1))-1)
endm


So I think I did something wrong in this part


irp n,bits
ind = 1 SHL n
result = result OR ind
endm


Could you help, please.
I must admit I'm quite a dummy in macro writing :)
Posted on 2003-08-11 09:43:24 by The Svin
The problem is solved.
Posted on 2003-08-11 10:16:51 by The Svin