flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
shutdownall 08 Jun 2012, 22:36
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 09 Jun 2012, 08:25
Code: i=imgbase ImageBase = 400000 |
|||
![]() |
|
Picnic 09 Jun 2012, 08:44
@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 09 Jun 2012, 08:57
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 09 Jun 2012, 16:05
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 09 Jun 2012, 17:03
@JohnFound
It really works! Thank you. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.