flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Annonymous... |
Author |
|
vid 22 Dec 2006, 22:07
there is no such posibility, and i bet you don't even really need it
|
|||
22 Dec 2006, 22:07 |
|
kohlrak 23 Dec 2006, 15:08
"Don't need" are the keyword, but it does help with nested macro. Since it's not actually doable (rather than undocumented), i'll drop the subject.
|
|||
23 Dec 2006, 15:08 |
|
vid 23 Dec 2006, 15:39
how does it help?
|
|||
23 Dec 2006, 15:39 |
|
kohlrak 23 Dec 2006, 16:51
If you're having trouble comming up with unique names... Take the following for example...
Code: macro loopingthing args { @@: [insert code here] loop @@ } @@: [random code here] loopingthing [more random code here] jmp @@ ;for the interface But, like said, it's not really needed but it can help. That thing using loopything could also have been a macro as well. Now, of course, there is no real point to implimenting this if it's not already implimented. I was asking incase there was something i missed and it was already implimented. |
|||
23 Dec 2006, 16:51 |
|
LocoDelAssembly 23 Dec 2006, 17:01
Code: macro loopingthing args { local ..interfase, ..l2 ..interfase: [insert code here] loop ..interfase} ..l2: [random code here] loopingthing [more random code here] jmp ..interfase;for the interface} This macro will not interfere with any other label nor affect the scope. Some time ago there was a discution about adding even more annonymous label to be able to do thing like Code: @@:nop @@@: xor eax, eax jmp @b ; jumps to nop jmp @@b ; jumps to xor eax, eax |
|||
23 Dec 2006, 17:01 |
|
kohlrak 23 Dec 2006, 17:16
... hm... I just came up with an idea to use my passgen to come up with things as well... Local.... i think i read about it before and forgot about it. Setting anonymous (or something else) by local, it shouldn't become global, and then it dosn't loop to the internal part of the macro when using an annonymous label.
Quote: The label whose name begins with dot is treated as local label, and its name is attached to the name of last global label (with name beginning with anything but dot) to make the full name of this label. So you can use the short name (beginning with dot) of this label anywhere before the next global label is defined, and in the other places you have to use the full name. Label beginning with two dots are the exception - they are like global, but they don't become the new prefix for local labels. That is a bit unclear... Suppose i made a macros, and prefixed it with a . Would the new lable of the variable be "[insertmacronamehere].[insertnameofvariablehere]" or would it be something other than the macro name as a prefix label? I guess we have two ways of going about this. lol It often helps to try to come up with more than one way to solve a problem. |
|||
23 Dec 2006, 17:16 |
|
LocoDelAssembly 23 Dec 2006, 17:30
The quoted text means this
Code: jmp a ; Works ; jmp .b ; Does not work jmp a.b ; Works jmp ..c ; Works jmp a.d ; Works a: .b: jmp .d ; Works ..c: .d: If you just need that your labels inside the macro becomes invisible then use local and use labels prefixed with double dot to not break the current scope. The macro name doesn't define a label by itself so the macro name is not required to start with any dot. |
|||
23 Dec 2006, 17:30 |
|
kohlrak 24 Dec 2006, 07:45
Well, i didn't know if the macro name counted as a label or not, thus why i asked.
|
|||
24 Dec 2006, 07:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.