flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Strtbl and struct macros |
Author |
|
kaafe 10 Nov 2003, 02:02
i suppose first one creates a string table
from "win32asmboard", Quote:
good luck |
|||
10 Nov 2003, 02:02 |
|
Tommy 10 Nov 2003, 07:24
The StrTbl-macro will as you said, kaafe, generate a string table.
Code: macro strtbl name,[string] { common label name dword forward local label dd label forward label db string,0 } Code: strtbl test_list,"string1","string2","string3" Code: test_list: dd pointer_to_string1 dd pointer_to_string2 dd pointer_to_string3 db "string1",0 db "string2",0 db "string3",0 Code: macro struct name { virtual at 0 name name sizeof.#name = $ - name name equ sizeof.#name end virtual } Code: struc a_struc { .a dd ? .b db ? .c dw ? } struct a_struc Do you understand? Regards, Tommy |
|||
10 Nov 2003, 07:24 |
|
Guest 10 Nov 2003, 10:30
Hi friends,
Thanks for your help. What I don't understand is that how can the same local "label" can be defined 3 or 5 times?(depending on the parameter number) |
|||
10 Nov 2003, 10:30 |
|
scientica 10 Nov 2003, 17:15
Anonymous wrote: What I don't understand is that how can the same local "label" can be defined 3 or 5 times?(depending on the parameter number) please, rtfm (fasm.txt or fasm.pdf), there you find that local variables gett a uniqe name for every forwrard/reverse. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
10 Nov 2003, 17:15 |
|
Guest 10 Nov 2003, 22:09
Ok thank you,
But i tested this macro in "dialog.asm"(example in fasm), strtbl stringTb, "one","two","tree" thats all, dialog compiled w/o error but crashed on running. Code: topmost_ok: strtbl stringTb, "one","two","tree" ;; <- Here invoke EndDialog,[hwnddlg],1 Regards |
|||
10 Nov 2003, 22:09 |
|
aaro 10 Nov 2003, 22:18
I think you must use StrTbl macro in data section instead of code section
|
|||
10 Nov 2003, 22:18 |
|
kaafe 10 Nov 2003, 23:07
yeah you were right. Thanks but it was not in code section, in fact. But between the constants and data section.
Thank you |
|||
10 Nov 2003, 23:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.