home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / CT / CT9401 / CAPSLCK / CAPSLOCK.PAS < prev    next >
Pascal/Delphi Source File  |  1980-01-01  |  695b  |  33 lines

  1. {$M $800,0,0 }   { 2K stack, no heap }
  2. uses Dos;
  3. var
  4.   KbdIntVec : Procedure;
  5.   Veertig17 : Byte Absolute $0040:$0017;
  6.   Veertig18 : Byte Absolute $0040:$0018;
  7.   NoLock    : Boolean;
  8.  
  9. {$F+}
  10. procedure Keyclick; interrupt;
  11. begin
  12.  
  13.   if NoLock and ((Veertig18 and 64) = 0) then
  14.        begin
  15.             Veertig17 := Veertig17 xor 64;
  16.             NoLock := False;
  17.        end
  18.   else if (Port[$60] < 128) and (Port[$60] <> 58) and
  19.           ((Veertig18 and 64) = 64) and (Not NoLock) then
  20.             NoLock := True;
  21.  
  22.   inline ($9C); { PUSHF }
  23.   KbdIntVec;
  24.  
  25. end;
  26. {$F-}
  27.  
  28. begin
  29.   GetIntVec($9,@KbdIntVec);
  30.   SetIntVec($9,Addr(Keyclick));
  31.   NoLock := False;
  32.   Keep(0);
  33. end.