RUN within GOSUB
Archiver
Posts: 46,084
Calling a subroutine saves the program counter to the stack, if I
call another program slot using the run command will I eventually run
into trouble or is the stack cleared everytime a new program slot is
run.
call another program slot using the run command will I eventually run
into trouble or is the stack cleared everytime a new program slot is
run.
Comments
the Scratchpad to pass parameters back-and-forth and to save your
position in the calling program. This N&V article shows how:
http://www.parallax.com/dl/docs/cols/nv/vol3/col/87.pdf
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: dangerduckula [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=2wNL2gXRUY7QwzrqR30Dk5n3lb_Fudwp0XOKmRNmd4yjz6HVRmS2j-_mE-oosSGRhoD5pGNifP13Cy3E-O3yEw]countduckula@o...[/url
Sent: Friday, January 16, 2004 5:03 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] RUN within GOSUB
Calling a subroutine saves the program counter to the stack, if I
call another program slot using the run command will I eventually run
into trouble or is the stack cleared everytime a new program slot is
run.