flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Tricky data macro |
Author |
|
revolution 01 Feb 2014, 16:32
|
|||
01 Feb 2014, 16:32 |
|
Roman 01 Feb 2014, 16:39
revolution
Sorry, but show me simple macro on my example. Please. |
|||
01 Feb 2014, 16:39 |
|
revolution 01 Feb 2014, 16:44
Code: ;<--- put the list_builder macro here list_builder xcod section '.code' code readable writeable executable start: .xcod { dd 1 } .xcod { dd 2 } .xcod { dd 4 } .xcod { dd 5 } ret section '.data' readable writeable xcod_list |
|||
01 Feb 2014, 16:44 |
|
Roman 01 Feb 2014, 16:47
I have to use this macro ? Am I right?
macro list_builder name { local m,c ;avoid name clashing c equ 0 ;initialise the counter macro .#name [a] \{ \common rept 1 x:c+1 \\{ c equ x ;update the counter macro m\\#x a ;open the macro \\} \} macro name#_list \{ rept c x \\{ m\\#x ;replay each line \\} \} } list_builder list2 Last edited by Roman on 01 Feb 2014, 16:48; edited 1 time in total |
|||
01 Feb 2014, 16:47 |
|
revolution 01 Feb 2014, 16:48
All except for the last line which is not part of the macro.
|
|||
01 Feb 2014, 16:48 |
|
Tomasz Grysztar 01 Feb 2014, 16:51
Roman wrote:
|
|||
01 Feb 2014, 16:51 |
|
Roman 01 Feb 2014, 16:59
Tomasz Grysztar
This can be useful in 3d games !!! I seriously ! If user create texture ( interface ID3D11Texture2D = 4 bytes in data), macro put all textures in data. DataBgn: put all textures DataEnd: When we go out of the game, DX11 release all textures from DataBgn to DataEnd. We got the automatic creation and deletion textures for Directx 11 !!! Do not need hands to write every texture in date !!! Its very good ! Last edited by Roman on 01 Feb 2014, 17:04; edited 1 time in total |
|||
01 Feb 2014, 16:59 |
|
Roman 01 Feb 2014, 17:02
revolution
Big thanks ! |
|||
01 Feb 2014, 17:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.