flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
shutdownall
One way is to pass two arguments, one which is used for type or handling of data.
For what exactly is it needed ? What is variable "i" in your example ? |
|||
![]() |
|
Kazyaka
Code: i=imgbase ImageBase = 400000 |
|||
![]() |
|
Picnic
@Kazyaka, you may find useful eqtype operator to distinguish types.
detailed "eqtype" evaluation determining the type of macro arguments If they don't suit your needs, shutdownall approach is a fairly easy solution. |
|||
![]() |
|
Kazyaka
It won't help me because Val1 has the same eqtype as 42.
@shutdownall It was only example. I can't use your solution in this example: Code: macro Test [Arg] { if Arg is count cmp eax, Arg else cmp eax, [i+Arg] end if } Now I think it is impossible. ![]() |
|||
![]() |
|
JohnFound
With FASM macro engine, "impossible" can be only relative.
![]() Try with something like: Code: macro test_type arg { if defined arg#0 & arg#0+1 = arg * 10+1 display 1, 'constant', 13, 10 else display 1, 'label', 13, 10 end if } Start: test_type 1234 test_type Start It will not work only if you test the label with some name "name" and you have defined label with name "name0" at the same address as the tested label. |
|||
![]() |
|
Kazyaka
@JohnFound
It really works! Thank you. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.