flat assembler
Message board for the users of flat assembler.
Index
> Main > Short help with glcall macro |
Author |
|
revolution 12 Sep 2021, 19:13
What error do you get?
Is it from push or glcall line? |
|||
12 Sep 2021, 19:13 |
|
macomics 12 Sep 2021, 19:19
Hotwire wrote: However fasm returns an error when I try to write something like this try that Hotwire wrote:
https://flatassembler.net/docs.php?article=manual#2.3.3 |
|||
12 Sep 2021, 19:19 |
|
Hotwire 13 Sep 2021, 06:52
Quote:
From glcall line Code: addr=arg error: invalid value Quote:
Now fasm returns Code: error: illegal instruction on glcall line |
|||
13 Sep 2021, 06:52 |
|
macomics 13 Sep 2021, 10:34
Hotwire wrote:
documentation wrote:
maybe Hotwire wrote: macro glcall procedure,[arg] |
|||
13 Sep 2021, 10:34 |
|
Hotwire 13 Sep 2021, 17:16
macomics
Thanks for the help. I've really messed up with compiling I was changing the wrong file. Now it works perfectly. However I would like to like to ask several associated questions 1) Added lines to the code of glcall macro simply checks if there are any arguments at all? 2) Could you please explain the line addr=arg ? It looks like it simply renames arg to addr Am I allowed to write simply glpushv arg I've tried on some examples, everything works but I wonder if this line was introduced for pure convenience or really means something conceptually? |
|||
13 Sep 2021, 17:16 |
|
macomics 13 Sep 2021, 17:25
Hotwire wrote: 1) Added lines to the code of glcall macro simply checks if there are any arguments at all? Hotwire wrote: 2) Could you please explain the line addr=arg ? It looks like it simply renames arg to addr Am I allowed to write simply glpushv arg I've tried on some examples, everything works but I wonder if this line was introduced for pure convenience or really means something conceptually? https://flatassembler.net/docs.php?article=manual#2.2.1 wrote: 2.2.1 Numerical constants Code: glpushv qword value value dd ?, ? ; then addr = qword value equal to addr = value and then ; push dword [addr+4] ; instead push dword [qword label + 4] <- incorrect ; push dword [addr+0] ; instead push dword [qword label + 0] <- incorrect ADD: You can also add something else to your macro Quote: macro glpushrv raddr ADD: Oops. I forgot about my own old fixes. Last edited by macomics on 14 Sep 2021, 21:15; edited 2 times in total |
|||
13 Sep 2021, 17:25 |
|
Hotwire 14 Sep 2021, 20:10
macomics
I really appreciate your help but could you add some comments to your code. I am completely fine with assembly but I am not used to macro language of fasm yet. |
|||
14 Sep 2021, 20:10 |
|
macomics 14 Sep 2021, 21:14
add. see above
|
|||
14 Sep 2021, 21:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.