flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 |
Author |
|
LocoDelAssembly 24 Dec 2009, 23:35
Code: format pe dll alpha = $401000 mov eax, someLabel mov edx, alpha someLabel: How do you detect which one is just a mere constant and which one is a label? Or do you plan to force programmers to add something extra to address references to be able to detect them? |
|||
![]() |
|
Azu 24 Dec 2009, 23:38
I don't. I just avoid using constants that fall within that range.
I guess I could put the whole thing in a virtual block to move it away from the constant, or use a loop with eq to compare the argument against a list of labels and make sure it matches one of them directly, but I haven't bothered yet. Or maybe the in directive. Or putting an ! in front if I want it relocated and using match. |
|||
![]() |
|
Borsuc 25 Dec 2009, 01:13
To compare with a list of labels is easy if you have the list, you can use match. The list has to begin and end with an extra symbol, like '+' (invalid label name anyway), because otherwise the first and last labels would get skipped (i.e no 'a' or 'b' before/after so match would not "match"
![]() Code: macro testlabel label { match a =label b, list \{ display 'found' \} } define list + la1 jo2 cc + testlabel dd testlabel cc _________________ Previously known as The_Grey_Beast |
|||
![]() |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.