flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
kc5tja
And, actually, it appears that EQU symbols do not span section boundaries. A big pity.
![]() |
|||
![]() |
|
mike.dld
It compiles OK with '=' and without 'extrn'... And, actually 'extrn' means that 'banner' isn't defined in your source elsewhere.
Code: format elf use32 section ".text" myFunction: ... mov eax,banner mov ebx,bannerLength call textOut ... section ".data" public banner banner: db "Hello world",13,10,0 bannerLength = $-banner Last edited by mike.dld on 17 Mar 2005, 23:08; edited 1 time in total |
|||
![]() |
|
kc5tja
mike.dld wrote: It compiles OK with '=' and without 'extrn'... And, actually 'extrn' means that 'banner' isn't defined is your source elsewhere. Thanks for the help and clarification. I think I understand the intended use of extrn (err...any reason why we're missing the 'e' in extern? Is this anything like creat? ;D Although, being that I come from an Amiga/Commodore background, I much prefer XREF and XDEF myself). I am still confused by the difference in semantics between = and EQU though. To me, they are identical. I'll re-read the documentation again to make sure I didn't miss anything important. Thanks again! |
|||
![]() |
|
mike.dld
The first striking thing for me is that you cannot write 'abc = esp' i.e. '=' is only (and preffered) for numeric expressions AFAIK.
|
|||
![]() |
|
JohnFound
kc5tja wrote: I am still confused by the difference in semantics between = and EQU though. To me, they are identical. I'll re-read the documentation again to make sure I didn't miss anything important. "equ" is not equal to "=". Actually they are very different and intended for different things. Just stop using "equ" until you really need it. Actually its use is needed only in very few cases, mainly in macro declaration and other preprocessor tricks. Regards. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.