Article View: comp.lang.pascal.borland
Article #701Re: What's wrong with this little TSR?
From: Osmo Ronkanen
Date: Sat, 22 Aug 1998 00:00
Date: Sat, 22 Aug 1998 00:00
56 lines
2015 bytes
2015 bytes
In article <35ded96b.41078299@news.rz.uni-karlsruhe.de>,
Andreas Maurer <alphamike@t-online.de> wrote:
>Hello folks,
>
>I have a problem with a TSR I've written that looks for a special
>value on an inport.
>
>The TSR itself works ok, but I'm unable to start another program after
>I've loaded the TSR - anything else crashes the computer immediately.
>I'm sure it's a memory problem, but I don't find it... ;)
>
>Compiler: Turbo Pascal 7.0
>
>Any ideas?
>
>
>
>Here's the complete code:
>
>{$M 4096,0,0}
>
>Program TimerTest;
>uses Dos, Crt;
>var Timer : Procedure;
> x : longint;
> InPort : word;
>
>{$F+}
>
>Procedure Beep;
>begin
> Sound(200);
> Delay(100);
> NoSound;
>end;
>
>procedure CountTime; interrupt;
>begin
> inc(x);
> if x >= 20 then
> begin
> InPort := PortW[$370];
> x := 0;
> if InPort = 72 then Beep;
> end;
> Timer;
> asm
> pushf
> end;
>end;
>
You have the pushf and timer in wrong order. Also I think having a 100
ms delay in the int 8 handler could cause some problems.
Osmo
Technical Details
Message-ID:
<6rmk9d$duh@kruuna.Helsinki.FI>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35ded96b.41078299@news.rz.uni-karlsruhe.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10261c,9bcc55cc3c0b88c1 X-Google-Attributes: gid10261c,public X-Google-Thread: 110467,9bcc55cc3c0b88c1 X-Google-Attributes: gid110467,public X-Google-Thread: 110930,9bcc55cc3c0b88c1 X-Google-Attributes: gid110930,public X-Google-Thread: 1006de,9bcc55cc3c0b88c1 X-Google-Attributes: gid1006de,public X-Google-Thread: 111659,9bcc55cc3c0b88c1 X-Google-Attributes: gid111659,public From: ronkanen@cc.helsinki.fi (Osmo Ronkanen) Subject: Re: What's wrong with this little TSR? Date: 1998/08/22 Message-ID: <6rmk9d$duh@kruuna.Helsinki.FI> X-Deja-AN: 383651819 References: <35ded96b.41078299@news.rz.uni-karlsruhe.de> Organization: University of Helsinki Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,de.comp.lang.pascal.misc,fido.ger.pascal,z-netz.sprachen.pascal