Re: A83: Sub-routines
[Prev][Next][Index][Thread]
Re: A83: Sub-routines
you could pop the return address for the subroutine from the stack, so when the
ret comes, the returnaddress of your entire program is on top of the stack, and
the program quits.. but that only works if you havn't pushed anything before the
call to the subroutine..
to get around that, you can, in the beginning of the program, pop the
returnaddress, save it in a variable, an push it back on.. then if you want to
quit in a subroutine, you just load the saved address and push it on the stack
before the ret.
//Olle
Edub311@aol.com wrote:
>
> hello folks,
> I was wonderin, how do you completely stop an ASM program from inside
> a subroutine without just returning to the original program?
>
>
> Bud
>
> And why are all assemblers in C++ and stuff, and all in DOS? Wouldn't a VB
> application be much easier and user friendly (remember DOS syntax)??? And you
> wouldn't have to open a DOS box either, whoa!
Follow-Ups:
References: