gedwards@ncratl.AtlantaGA.NCR.COM (Gordon Edwards) (01/01/91)
I am trying to write a TSR program using Turbo Pascal 5.5. I have no
problem with output but my programs always lockup when it's time to get
input from the keyboard. Here is a short example of what I am doing:
---------- begin -------------
program tsr;
uses dos, crt;
{$M 10000, 0, 0}
const
altshift = $08;
ctrlshift = $04;
rightshift = $01;
var
kbflag : byte absolute $0040:$0017;
procedure mypart( flags,cs,ip,ax,bx,cx,dx,si,di,ds,es,bp : word);
interrupt;
var
s : string;
begin
if ( ((kbflag and altshift ) = altshift ) and
((kbflag and ctrlshift ) = ctrlshift ) and
((kbflag and rightshift) = rightshift) ) then
begin
writeln;
writeln(' This is my TSR routine');
writeln;
readln(s)
end
end;
begin
setintvec( $1c, @mypart);
keep(0)
end.
------------- end -----------------
Anyone know why this doesn't work? I have tried all sorts of different
ways to get input from the keyboard but the all don't work.
--
Internet: Gordon.Edwards@AtlantaGA.NCR.COM NCR Corporation
UUCP: ...!gatech!kong!ncratl!gedwards 2651 Satellite Blvd.
Amateur Radio: N4VPH Duluth, GA 30136