flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Unicode labels not local (PROC32.INC)

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17475
Location: In your JS exploiting you and your system
revolution
The follwing code shows the problem:
Code:
include 'win32ax.inc'
.code
MAX_PATH=260
proc WinMain stdcall,hInstance,hPrevInstance,lpCmdLine,nCmdShow
    locals
        unicode du MAX_PATH dup (?)
    endl
        stdcall AnotherFunction
        invoke  ExitProcess,0
        ret
endp
proc AnotherFunction stdcall
    locals
        unicode du 64 dup (?) ;<-- Error: symbol already defined
    endl
        ret
endp
.end WinMain    

I think this an easy fix in PROC32 (also PROC64):
Code:
      ...
      struc dq [val] \\{ \common deflocal@proc .,dq,val \\}
      struc du [val] \\{ \common deflocal@proc .,du,val \\} ;<-- add this
      struc rb cnt \\{ deflocal@proc .,rb cnt, \\}
      ...
      restruc db,dw,dp,dd,dt,dq,du ;<-- also change here
      ...    
Post 04 May 2006, 16:23
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
that is not a bug, you are supposed to prefix all of your local labels with .
Post 07 May 2006, 00:51
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17475
Location: In your JS exploiting you and your system
revolution
Quote:
you are supposed to prefix all of your local labels with .
This is true for normally defined labels but with the locals/endl macros the labels do no need the '.'. Try it with any other data type (db,dw,rt, etc.) and it will work properly without the '.'
Post 07 May 2006, 03:27
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7756
Location: Kraków, Poland
Tomasz Grysztar
I didn't include DU in this list as I thought DW should be enought. DU is useful only when you define initialized data.
Since, however, the current "local" macros allow to define initialized local variables, too, this addition may be a good idea.
Post 07 May 2006, 10:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.