flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
RedGhost
Quote:
hi, you should read fasm documentation i think, it explains this and many other things (i know i didnt read it at first either :p) Code: mov [a], eax ;now a holds eax "a" by itself, (not in brackets) refers to the address here are some equivalents Code: ;in MASM mov a, eax ;in FASM mov [a], eax Code: ;in MASM mov offset a, eax ;in FASM mov a, eax Quote:
i dont know too much about the fasm compiler, since i havn't studied the source very much, but i assume that it will not error because since "MyFunc" is never called, the code in MyFunc is never assembled in runtime so it doesn't matter also welcome to FASM, imo MASM is kind of crap ![]() _________________ redghost.ca |
|||
![]() |
|
Tomasz Grysztar
If you'd also like to know why after commenting out the call it assembled fine: there's an "if used MyFunc" buried withing the "proc MyFunc" macro, which causes the whole procedure to be skipped (not assembled) when it is not used anywhere else.
|
|||
![]() |
|
alorent
Thanks RegGhost, it works now
![]() I read about the use of the brackets, but I just copy paste from my MASM code and I got the weird error message and it did not happen when I remove the "call" instruciton. So, I was kind of blind and couldn't see the forest by the trees ![]() Thanks, I also think that FASM is great...I'm just too used to MASM, hence I'm still suffering with FASM learning curve ![]() |
|||
![]() |
|
Reverend
RedGhost: BTW.
Code: ;in MASM mov offset a, eax ;in FASM mov a, eax ![]() Code: ;in MASM mov eax, offset a ;in FASM mov eax, a |
|||
![]() |
|
Tomasz Grysztar
He just wanted to show the analogy to explain why "mov a,eax" causes an error in fasm - in the same way as "mov offset a,eax" would cause an error with MASM.
|
|||
![]() |
|
Reverend
I thought it was a try to show how to access offsets. If so, the given example was incorrect.
But if it's the way you, Tomasz, say, so I am sorry for misleading anyone |
|||
![]() |
|
RedGhost
Reverend wrote: RedGhost: BTW. what Tomasz said ![]() ![]() _________________ redghost.ca |
|||
![]() |
|
alorent
Thanks guys for all your posts. I have been these days with FASM and I love it each day even more!!!
![]() Tomasz, you did a great work with FASM ![]() Cheers |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.