Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!kilroy!cyamamot From: cyamamot@kilroy.jpl.nasa.gov (Cliff Yamamoto) Newsgroups: comp.os.msdos.programmer Subject: Is _chain_int safe in MSC 5.1? Summary: Does it pop the stack before calling? Keywords: interrupts, stack Message-ID: <1991Feb28.081734.21649@elroy.jpl.nasa.gov> Date: 28 Feb 91 08:17:34 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 33 Originator: cyamamot@kilroy Nntp-Posting-Host: kilroy.jpl.nasa.gov Greetings! I'm about to redirect some interrupts into some code I'm hooking onto Int 8 or 1C. When I comes down to calling the 'savedintvector' I'd like to call it safely. Can I just call it or should I call it through the _chain_int function? I'm also using _dos_setvect and _dos_getvect which use the Int 21 interface but I'm still don't understand where a new stack is created for the interrupt routine. Since DOS is not reentrant, I know its stack has to be left alone while the interrupt uses its own stack. Does _dos_setvect and _dos_getvect take care of creating and deleting a new stack for me? The reason I'm wondering whether to use _chain_int or not is because I'm not sure exactly what it does. I just don't want to risk clobbering the DOS stack (which probably isn't very big) if my interrupt routine starts using the stack heavily. I don't intend to call any DOS routines in my interrupt. BTW. What the heck does the keyword 'interrupt' mean in MSC 5.1? I can't find it described anywhere. Does this somehow take care of keeping the DOS stack in order for me? Any info or pointers to good literature/PD code would be appreciated. Regards, Cliff Yamamoto ----------------------------------------+-------------------------------------- Email: cyamamot@kilroy.jpl.nasa.gov | cyamamot@grissom.jpl.nasa.gov cyamamot@jato.jpl.nasa.gov | cky@euclid.jpl.nasa.gov cky@hydra.jpl.nasa.gov | ----------------------------------------+-------------------------------------- MaBell: (818) 354-1242 - off. (818) 354-6042 - alt. (818) 354-6426 - lab.