flat assembler
Message board for the users of flat assembler.

Index > Main > Recursive Procedures?

Author
Thread Post new topic Reply to topic
keyoke



Joined: 18 Jun 2003
Posts: 56
Location: London
keyoke 07 Oct 2003, 07:04
I have a procedure which must call itself over and over again, if i declare it like this.

Code:
proc sumproc,avalue
.sumlocalvariable dd ?
enter
push watevaregs

push sumvalue
call sumproc

pop watevaregs
return
    


will the variable .sumlocalvariable be local for each instance of the procedure?
Post 07 Oct 2003, 07:04
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 07 Oct 2003, 07:50
Quote:
will the variable .sumlocalvariable be local for each instance of the procedure?


Yes, the variable will be local (on different address in the stack) for every call of the procedure. BTW:instance is not corect word. Smile
Post 07 Oct 2003, 07:50
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
keyoke



Joined: 18 Jun 2003
Posts: 56
Location: London
keyoke 07 Oct 2003, 08:23
Quote:

BTW:instance is not corect word.

heh i know im thinking in terms of classes or controls or something hehe.
Post 07 Oct 2003, 08:23
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.