Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!bpa!cbmvax!vu-vlsi!lehi3b15!lafcol!pilgrimk From: pilgrimk@lafcol.UUCP (Guru Jee) Newsgroups: comp.lang.pascal Subject: Int 1CH Keywords: quest qe ce? Message-ID: <369@lafcol.UUCP> Date: 31 Jan 89 05:03:46 GMT Organization: Academic Computer Center, Lafayette College Lines: 51 I'm using INT 1CH to install a clock on my screen. Problem is that it works when it wants to. The problematic part of the code (at least I think that this might be it) is: .... GetIntVec($1C, Int1C); SetIntVec($1C, @ClockProcedure); {call ClockProcedure ~ 18 time/sec} .... then there is an exit procedure (yes, I did force a far call using $F+) which contains, among other things .... SetIntVec($1C, Int1C); .... which is supposed to reset the INT 1C to its original address. When the program works, it works FINE. I can simultaneously display a clock and have the user type in stuff. When it doesn't, it may do any of the following: i. Never return to the C> prompt but the computer can be rebooted using the Ctrl-Alt-Del sequence ii. Never return the C> prompt and lock the keyboard up so to reset, the ON/OFF switch must be used. While running the program from within the integrated environment, both of the afore-mentioned errors show up as stack overflow errors. (at which point the computer crashes.) I have tried setting the stack size to its limit (65520) but no way jose - same problem. One last word. Without the INT 1C part, everthing works as I expect it to - ALL THE TIME. Introduce the INT 1C and I have a temperamental program. Do I have to use STI and CLI instructions? If so, should these be installed in the interrupt procedure? Should I be using INT 1C in the first place? One more thing. The code to display the time onscreen is contained in a unit. The procedure which is global looks like DisplayDate(X,Y: byte); {X,Y are screen coords} Any helpful hints would be appreciated. If this made no sense to you, or if you'd like to see the source code, I be happy to mail it to you.