flat assembler
Message board for the users of flat assembler.
Index
> Main > how to declare an array of struc vars? |
Author |
|
MHajduk 06 Nov 2007, 12:13
Maybe this way:
Code: stars rd 10 * (sizeof.Star/4) |
|||
06 Nov 2007, 12:13 |
|
0.1 06 Nov 2007, 12:29
Kludgey! But Works!
Isn't there a more direct, simpler way? _________________ Code: o__=- ) (\ /\ |
|||
06 Nov 2007, 12:29 |
|
shoorick 06 Nov 2007, 12:54
stars rb 10 * sizeof.Star
|
|||
06 Nov 2007, 12:54 |
|
bitRAKE 06 Nov 2007, 20:28
Code: repeat 10
rb sizeof.Star
end repeat |
|||
06 Nov 2007, 20:28 |
|
LocoDelAssembly 06 Nov 2007, 21:47
Note that actually does exist dup in fasm, the problem is that the win32 headers does not "overload" it to support structures defined with the struct macro.
hmmm, would be so hard to implement it? I gonna give it a try but don't expect much |
|||
06 Nov 2007, 21:47 |
|
vid 06 Nov 2007, 23:05
Loco: main problem will be, of course, that you can't overload operator in FASM
|
|||
06 Nov 2007, 23:05 |
|
LocoDelAssembly 06 Nov 2007, 23:59
But I can match the macro argument and react accordingly. However I don't understand why match is not working inside the struc, even if I do "match times =dup (values), 10 dup (5)" it doesn't match while it matchs perfectly when I test it outside
I will try more before posting something. |
|||
06 Nov 2007, 23:59 |
|
vid 07 Nov 2007, 00:22
you must be messing something, matching inside struc works:
Code: struc XXX arg { match =special, arg \{ display 'oh yeah' \} } foobar XXX special maybe it's because you use reservered word "times" as name of match argument? |
|||
07 Nov 2007, 00:22 |
|
LocoDelAssembly 07 Nov 2007, 00:30
No, just because I'm stupid. I've misplaced the "display 'reachable?',13,10" so I believed that the sub struc was overriding the one generated by the original headers but NO, so the match wasn't ever processed by the preprocessor.
Seems that I need some rest before continuing [edit]After my dinner I realized what is the problem but now I'm lazy to finish it Tomorrow (GMT-3) I'll post the code[/edit] |
|||
07 Nov 2007, 00:30 |
|
MHajduk 07 Nov 2007, 12:53
Vinita, try this:
Code: proc X ; Local table of 10 copies of 'Star' structure. ; local stars[10]:Star ; Some code. ret endp |
|||
07 Nov 2007, 12:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.