flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Data Structures in FASM (tree, list, stack...) |
Author |
|
edfed 04 Oct 2010, 19:52
a tree is a succession of lists.
a list is a succession of words to dynamically create lists and trees (nodes), you should provide two fields: the datastructure type, a word signifiyng the method to use to expoit the structure. the size of the structure that can be dynamically changed, but needs a lot more datas at the end in case of expanssion. personnaly, i code in asm for the methods and i code in trees for the applications. it gives this result: Code: Template: .x=20 .y=40 .xl=250 .yl=100 .tyl=20 .c1=Blue .c2=Silver .c3=Green .c4=Teal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Gnode .x,.y,.xl,.yl,\ .frm,\ .titlebar,\ .workspace,\ grabber .frm: Frame 0,0,.xl,.yl,.c4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .titlebar: Gnode 1,1,.xl-2,.tyl,\ .xbut,@f,.box @@: Txt 20,3,0,0,.c2,.title,1,font85 .box: Box 0,0,.xl-2,.tyl,.c1-18 .xbut: But 4,5,11,11,.c4,poussoirx,exit.x .title: db 'Template',0 align 4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .workspace: Gnode 1,.tyl+1,.xl-2,.yl-.tyl-2,\ .app,.back .back: Box 0,0,.xl-2,.yl-.tyl-2,.c1-20 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .app: Gnode 0,0,.xl-2,.yl-.tyl-2,\ .txt,\ .hex ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .hex dd f.numhex,.str,0,8 .txt: Txt 6,15,0,0,.c2,.str,0,led85 .str: db '00000000',0 Gnode means Graphic Node Node means Node the rest are items. the useage of the macro for lists Code: List elem1,elem2,elem3,elem4,elem5,elem6 the macro for list Code: macro List [element] { common local .a dd .a-$-4 forward dd element common .a: } |
|||
04 Oct 2010, 19:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.