Path: utzoo!attcan!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!udel!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.sys.ibm.pc Subject: Re: shift-print sreen from .bat file Message-ID: <237ae1c0@ralf> Date: 11 Nov 88 12:49:04 GMT Sender: ralf@b.gp.cs.cmu.edu Lines: 23 In-Reply-To: <772@wsccs.UUCP> In article <772@wsccs.UUCP>, rargyle@wsccs.UUCP (Bob Argyle) writes: }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. As a matter of fact, there is ALWAYS a zero on the stack, because DOS pushes it there just before transferring control to the program. Actually, both INT 20h and JMP 0 are now officially frowned upon, you should be using INT 21h/AH=4Ch (but since when has that stopped any programmer?) -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school) ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/31 Disclaimer? I |Ducharm's Axiom: If you view your problem closely enough claimed something?| you will recognize yourself as part of the problem.