flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
comrade 20 Feb 2004, 18:00
For some reason that repeat block causes "illegal instruction" error, but does not when is inside a macro block.
|
|||
![]() |
|
Tommy 20 Feb 2004, 18:09
If I'm not wrong, concating of symbols as this are only allowed inside macros...
|
|||
![]() |
|
comrade 20 Feb 2004, 18:11
Well, it still does not work even inside macro.
|
|||
![]() |
|
pelaillo 20 Feb 2004, 18:14
Same with symbol < and >. I find it useful to use them outside macros sometimes.
|
|||
![]() |
|
comrade 20 Feb 2004, 18:20
Code: macro foobar name,value { pos#name = value } repeat 5 param = % foobar param,% end repeat display posparam+30h,13,10 This define posparam 5 times, finally making it equal to 5. Looks like FASM just pass by reference in macro, not value? |
|||
![]() |
|
pas 21 Feb 2004, 05:20
macro IdNum strt,[equat]
{ common local count count = strt forward equat = count count = count + 1 } IdNum 1,\ IDM_NEW,\ IDM_OPEN,\ IDM_SAVE,\ IDM_EXIT,\ IDM_ADD_TO,\ IDM_CLOSE,\ IDM_DIALOG It creates 7 macro variable. You wanted it to achieve? |
|||
![]() |
|
S.T.A.S. 21 Feb 2004, 11:11
Here's my try
Code: macro foo name,first,[list] { common local counter counter = first forward name#list = counter counter = counter + 1} nums fix .1,.2,.3,.4,.5,.6,.7,.8 foo pos,1,nums ;or ;foo pos,1,.1,.2,.3,.4,.5 display pos.2+30h,13,10 display pos.5+30h,13,10 ------ BTW, # directive outside maros would be really handy sometimes |
|||
![]() |
|
comrade 21 Feb 2004, 17:15
Spasibo!
That is almost it, because num has to be variable though. |
|||
![]() |
|
pelaillo 23 Feb 2004, 16:32
S.T.A.S. wrote:
Yes, it will. Also this outside macros: Fasm Manual wrote:
i.e. Code: mov eax,<'a',09h,'1'> cmp dx,<'b',0> |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.