flat assembler
Message board for the users of flat assembler.
Index
> Main > define and init array of structures |
Author |
|
JohnFound 10 Oct 2003, 11:44
Hi _ensein. Welcome on board.
Well, structures in standard Win32 include files are undefined. You have to redefine the structure, using parameters. In FASM, structures and mactoses have similar behaviour, so you can use parameters for "struc" operator. I have no time to write TBBUTTON for you, but will give you small example and you can try to make it: Code: ; definition struc MyStruc fld1, fld2, fld3 { .Field1 dd fld1 .Field2 db fld2 .Field3 db fld3 } virtual at 0 ; This is instead of "struct" macro, because of arguments. MyStruc MyStruc ?, ?, ? sizeof.MyStruc = $ end virtual ; using: You have to put label before structure. ; Fortunately FASM allows equal names for macroses and structures, so ; you can define macros with same name: macro MyStruc fld1, fld2, fld3 { local lbl lbl MyStruc fld1, fld2, fld3 } ; Now you can use it this way: var1 MyStruc 1234, 123, 21 MyStruc 3424, 32, 27 MyStruc 234, 1, 2 |
|||
10 Oct 2003, 11:44 |
|
_ensein 10 Oct 2003, 12:06
thank you !
I'll be working on it |
|||
10 Oct 2003, 12:06 |
|
Tomasz Grysztar 13 Oct 2003, 08:07
Please look also at this thread: http://board.flatassembler.net/topic.php?t=273
|
|||
13 Oct 2003, 08:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.