Path: utzoo!attcan!uunet!husc6!bloom-beacon!apple!bionet!agate!helios.ee.lbl.gov!lll-tis!oodis01!uplherc!sp7040!obie!wsccs!rargyle From: rargyle@wsccs.UUCP (Bob Argyle) Newsgroups: comp.sys.ibm.pc Subject: Re: shift-print sreen from .bat file Summary: how to get out of a program! Message-ID: <772@wsccs.UUCP> Date: 9 Nov 88 16:27:29 GMT References: <421@caldwr.UUCP> <394@megatek.UUCP> Lines: 17 In article <394@megatek.UUCP>, hollen@spot.megatek.uucp (Dion Hollenbeck) writes: > A> debug > - A100 assemble at location 100 > xxxx:0100 INT 5 software interrupt 5 > xxxx:0102 RET program return this is a very good way to lose control of the machine: what is on the stack to return to? NOTHING! use INT 20 instead of RET, or JMP 0 if you don't want to be 'obsolescent' (it's MS-DOS we're talking here, not OS/2); if there is BY CHANCE a zero on the stack then the above code will work. Not the sort of thing to depend on. -- Bob Argyle @ wsccs ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ ! Has SIGPLAN approved _your_ .signature and .plan files? ! ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~