flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > fasmg as preprocessor Goto page Previous 1, 2, 3 |
Author |
|
emil 22 Feb 2017, 17:22
ok , i got it.
|
|||
22 Feb 2017, 17:22 |
|
revolution 24 Feb 2017, 10:15
1 > "buffer" is defined as "op" with a colon (:) appended.
2 > match will define "sym" as the first symbol from "buffer", and "tail" as the all of the remaining symbols from "buffer" 3 > Not sure what you question is here? |
|||
24 Feb 2017, 10:15 |
|
emil 24 Feb 2017, 10:43
thanks you
may you kindly explain each line in the macro !! |
|||
24 Feb 2017, 10:43 |
|
Tomasz Grysztar 24 Feb 2017, 17:01
As I mentioned earlier, this macro is especially tricky. I'd suggest you first take some time to get accustomed with the simpler ones, including the operation of MATCH. You can start with reading the section on MATCH in the manual and then the increasingly complex examples in my introduction to fasmg.
|
|||
24 Feb 2017, 17:01 |
|
emil 26 Feb 2017, 05:51
any way i have deleted my last two posts ,
thank you all for your help. |
|||
26 Feb 2017, 05:51 |
|
ProMiNick 26 Jun 2017, 14:32
Quote:
Is there any way to catch this lines in macro to output: Code: invoke MessageBoxA,0,_message,_caption,0 ;iterate arg,0,_message,_caption,0 ;this ;indx 4-1+1 ;and this push 0 ;end iterate ;and this ;indx 4-2+1 ;and this push _caption ;end iterate ;and this ... ; ... I mean how to catch them not in time of macro definition but in time params go throw macro? I tryed to play Code: macro preprocess local Preprocessor macro gate list& iterate instr, list macro Preprocessor.instr?! args& ;db `instr `args esc instr args end macro end iterate end macro gate end,macro,iterate,indx,irp,irpv,repeat,rept,while,break,if,else,match,rmatch,rawmatch,include,postpone,namespace,display macro make_interceptor instr struc (label) ? decl& instr `label,' ',`decl,13,10 end struc end macro make_interceptor db;display namespace Preprocessor postpone end namespace end postpone end macro preprocess;launch CMD line '"%SystemRoot%\system32\notepad.exe" "%OUTPUT%"' macro ?! args& line `args,args args end macro macro invoke name,args& iterate arg,args indx %%-%+1 push arg end iterate call [name] end macro invoke MessageBoxA,0,_message,_caption,0 and output Code: line '', line '', line '', line 'macro invoke name,args&',macro invoke name,args& line '', line 'invoke MessageBoxA,0,_message,_caption,0',invoke MessageBoxA,0,_message,_caption,0 line 'iterate arg,args',iterate arg,0,_message,_caption,0 line 'indx %%-%+1',indx 4-1+1 line 'push arg',push 0 push 0 line 'end iterate',end iterate line 'indx %%-%+1',indx 4-2+1 line 'push arg',push _caption push _caption line 'end iterate',end iterate line 'indx %%-%+1',indx 4-3+1 line 'push arg',push _message push _message line 'end iterate',end iterate line 'indx %%-%+1',indx 4-4+1 line 'push arg',push 0 push 0 line 'end iterate',end iterate line 'call [name]',call [MessageBoxA] call [MessageBoxA] line 'end macro',end macro line 'end namespace',end namespace line 'end postpone',end postpone insted of word "line" I wished ";" and instead of blank lines skip them |
|||
26 Jun 2017, 14:32 |
|
Tomasz Grysztar 29 Jun 2017, 14:51
ProMiNick wrote: I mean how to catch them not in time of macro definition but in time params go throw macro? |
|||
29 Jun 2017, 14:51 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.