flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Duplicate symbols on proc not checked |
Author |
|
Tomasz Grysztar 15 Nov 2008, 23:34
Yeah, this is a good idea. Those collisions are not really a serious issue.
|
|||
15 Nov 2008, 23:34 |
|
LocoDelAssembly 18 Jun 2010, 15:55
I almost report this twice
There are two things I noticed today, one is that a local using the same name than one of the params triggers no errors and the parameter takes priority over the local unless it was defined in a "locals" block. The second, is that if it happens that the same symbol is used somewhere else in source and the proc either defines the same parameter twice, or use the same symbol in the parameters list and in a locals block, it will interfere with the global variable and even make the code uncompilable. Example: Code: format PE GUI 4.0 entry start include 'win32wx.inc' proc start alpha locals alpha dd ? endl mov eax, [alpha] int3 endp alpha: ; "Error: Symbol already defined." ; Instruction: "..arg?QE:" Contrary to my first report, I don't feel so confident about my proposal to fix this. Can duplicates be checked with match instead or something? |
|||
18 Jun 2010, 15:55 |
|
edemko 18 Jun 2010, 19:48
Code: format pe gui 4.0 include 'win32wx.inc' entry $ hlt call p1 call p2 call p3 ret /* push ebp mov ebp,esp sub esp,4 push [word ss:ebp-3] ;a dw ? leave retn */ proc p1 locals a db ? a dw ? endl push [a] ret endp /* push ebp mov ebp,esp sub esp,4 leave retn */ proc p2 locals a dw ? a db ? endl ; push [a] ; a db ? ret endp /* push ebp mov ebp,esp sub esp,4 push [dword ss:ebp-4] ; a dd ? leave retn 4 */ proc p3 a locals a dd ? endl push [a] ret endp |
|||
18 Jun 2010, 19:48 |
|
ouadji 18 Jun 2010, 22:51
Code: /* <------------ push ebp mov ebp,esp sub esp,4 push [word ss:ebp-3] ;a dw ? leave retn */ <------------ |
|||
18 Jun 2010, 22:51 |
|
edemko 19 Jun 2010, 04:27
that is real necessity(not TG humbling), we use assemblers(or compilers ) instead of hex editors...
|
|||
19 Jun 2010, 04:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.