flat assembler
Message board for the users of flat assembler.

Index > Windows > EQUATE expected

Author
Thread Post new topic Reply to topic
dacid



Joined: 31 Aug 2008
Posts: 57
dacid 28 Nov 2008, 18:15
LOCAL things[THREADS]:THING_INFO

I need to make this but with a variable ... how can be done?
Post 28 Nov 2008, 18:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 29 Nov 2008, 01:41
Do you have some code to show what you are trying to do?
Post 29 Nov 2008, 01:41
View user's profile Send private message Visit poster's website Reply with quote
dacid



Joined: 31 Aug 2008
Posts: 57
dacid 29 Nov 2008, 09:04
Its about threads...

Code:
THREADS EQU 255

threads_program PROC
   LOCAL things[THREADS]:THING_INFO

   ....

threads_program ENDP
    


But i need to make THREADS a variable not a constant.
Post 29 Nov 2008, 09:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 29 Nov 2008, 09:38
dacid wrote:
But i need to make THREADS a variable not a constant.
You will have to allocate the stack dynamically at runtime. The assembler can't do that for you.
Code:
mov eax,[THREADS]
imul eax,sizeof.THING_INFO
sub esp,eax
mov ebx,esp  ;ebx is the address of the 'things' structure    
And don't forget to restore the stack pointer before you exit the procedure.
Post 29 Nov 2008, 09:38
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.