home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!newsroom.utas.edu.au!bruny.cc.utas.edu.au!u910826
- From: u910826@bruny.cc.utas.edu.au (Louis siuoL)
- Subject: Re: interrupts and neat things of these sorts
- Message-ID: <u910826.724907973@bruny>
- Sender: news@newsroom.utas.edu.au
- Organization: University of Tasmania, Australia.
- References: <1992Dec17.225939.939453@sue.cc.uregina.ca>
- Date: Mon, 21 Dec 1992 03:19:33 GMT
- Lines: 42
-
- beuker@hercules.cs.uregina.ca (Craig Beuker) writes:
-
-
- > Season's Greetings all. I have a question about interrupts. quite simple
- > actually.. How do I implement one? Is there any documentation out there
- > on how these little suckers work? I am using T.Pascal 5.5 and the example
- > they give in the help file is not very enlightening..
- > Any, or all help will be much appreciated.
- > (I want to implement an interrupt that will monitor the comm port for
- > characters, if one is encountered, add it to w QUE(circular) for later
- > processing.) Thanx for your help.
-
- > Craig..
-
- ok, here is a possible way (off the top of my head, so there may be errors).
-
- USES
- Dos;
- VAR
- OldInt:PROCEDURE;
-
- PROCEDURE MyInt; Interrupt;
- BEGIN
-
- Do stuff here
-
- ASM PUSHF;END;OldInt; { This line is chains to the old int handler, and may not be necessary for all ints }
- END;
-
- BEGIN
- GetIntVec(IntNum,@OldInt);
- SetIntVec(IntNum,@MyInt);
-
- Do main stuff here
-
- SetIntVec(IntNum,@OldInt);
- END.
- --
- Louis Solomon - a student at The University of Tasmania
- e-mail: u910826@bruny.cc.utas.edu.au
-
- "If wishes were fishes, we'd all cast nets" - Dune
-