flat assembler
Message board for the users of flat assembler.
Index
> Windows > Problem assembly small code |
Author |
|
RedGhost 05 Jan 2006, 15:19
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 |
|||
05 Jan 2006, 15:19 |
|
Tomasz Grysztar 05 Jan 2006, 15:33
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.
|
|||
05 Jan 2006, 15:33 |
|
alorent 05 Jan 2006, 15:37
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 |
|||
05 Jan 2006, 15:37 |
|
Reverend 05 Jan 2006, 19:23
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 |
|||
05 Jan 2006, 19:23 |
|
Tomasz Grysztar 05 Jan 2006, 19:50
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.
|
|||
05 Jan 2006, 19:50 |
|
Reverend 05 Jan 2006, 21:02
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 |
|||
05 Jan 2006, 21:02 |
|
RedGhost 06 Jan 2006, 13:45
Reverend wrote: RedGhost: BTW. what Tomasz said , i just wanted to show the equivalents, i do realize it is not correct syntax for either syntax (hmm, does that sound right ) _________________ redghost.ca |
|||
06 Jan 2006, 13:45 |
|
alorent 06 Jan 2006, 23:43
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 |
|||
06 Jan 2006, 23:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.