Article View: comp.lang.pascal.borland
Article #699What's wrong with this little TSR?
From: Andreas Maurer
Date: Fri, 21 Aug 1998 00:00
Date: Fri, 21 Aug 1998 00:00
59 lines
2049 bytes
2049 bytes
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;
{$F-}
begin
x := 0;
GetIntVec($8,@Timer);
SetIntVec($8,Addr(CountTime));
Keep(0);
end.
Bye
Andreas
Technical Details
Message-ID:
<35ded96b.41078299@news.rz.uni-karlsruhe.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10261c,9bcc55cc3c0b88c1,start X-Google-Attributes: gid10261c,public X-Google-Thread: 111659,9bcc55cc3c0b88c1,start X-Google-Attributes: gid111659,public X-Google-Thread: 110467,9bcc55cc3c0b88c1,start X-Google-Attributes: gid110467,public X-Google-Thread: 1006de,9bcc55cc3c0b88c1,start X-Google-Attributes: gid1006de,public X-Google-Thread: 110930,9bcc55cc3c0b88c1,start X-Google-Attributes: gid110930,public From: alphamike@t-online.de (Andreas Maurer) Subject: What's wrong with this little TSR? Date: 1998/08/21 Message-ID: <35ded96b.41078299@news.rz.uni-karlsruhe.de> X-Deja-AN: 383452441 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@rz.uni-karlsruhe.de X-Trace: rz.uni-karlsruhe.de 903731602 25363 (none) 129.13.220.240 Organization: University of Karlsruhe, Germany Mime-Version: 1.0 Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,de.comp.lang.pascal.misc,fido.ger.pascal,z-netz.sprachen.pascal