Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site timeinc.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!harpo!whuxlm!whuxl!houxm!vax135!timeinc!greenber From: greenber@timeinc.UUCP (Ross M. Greenberg) Newsgroups: net.micro.pc Subject: Weirdness in PC??? Message-ID: <256@timeinc.UUCP> Date: Tue, 18-Jun-85 15:07:14 EDT Article-I.D.: timeinc.256 Posted: Tue Jun 18 15:07:14 1985 Date-Received: Sun, 23-Jun-85 11:48:13 EDT Reply-To: greenber@timeinc.UUCP (Ross M. Greenberg) Organization: Time, Inc. - New York Lines: 63 It seemed simple enough: I merely wanted to set a flag when there was a DOS call being processed. So I took over int21h and had it point to a routine called 'myint' myint: mov flag, 1 int 62h mov flag, 0 iret And it didn't work from a terminate and stay resident program, although it works in the debugger! As soon as the terminate code is run I get a whole bunch of "Insufficient disk spaces" error messages forever and ever. Time to reset. So I figured that maybe dos cares about the stack displacement (sounds reasonable, right?). okay: myint: pop [pop1] pop [pop2] pop [pop3] mov flag, 1 int 62h mov flag,0 push [pop3] push [pop2] push [pop1] iret No good --- same problem. So therefore it appears that dos is making recurssive calls to itself and cares about the current "called from" CS:IP on the stack? What is going on here? I know that I can play massive games and save dos's stack and so forth, but why should it bomb out like it does? Additionally, I made up a little terminate and stay resident piece of code for a friend of mine to give him keyclicks. I futzed with the timer to increase the sound/duration. Works like a charm on my PC --- but the timer stuff seems to have no effect on his PC-XT. What are the weirdnesses betwixt the PC and XT? And finally, what would cause a terminate and stay resident piece of code to not give its memory back to dos upon final exit? Is dos as wierd as it seems? Did Microsoft get paid by some peculiar "strangness" factor (the stranger the system, the more you get...). Or am I missing something? Mail to me, and I'll post..... -- ------------------------------------------------------------------ Ross M. Greenberg @ Time Inc, New York --------->{ihnp4 | vax135}!timeinc!greenber<--------- I highly doubt that Time Inc. they would make me their spokesperson. ------ "There's something wrong in the world. There's always been. Something no one has ever named or explained" --- Francisco d'Anconia