🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #443

Re: ASCII Codes...

#443
From: Rudi Polzer
Date: Sat, 19 Sep 1998 00:00
301 lines
7780 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_002A_01BDE3C8.415E37E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

This is described in Ralph Brown's Interrupt list.
They are assigned to the keys following F12, so one could treat them as F13
and F14.
The BIOS call doesn't support them, but my kb-handler does.
(I don't have a Win95 kb, but it should work [if r.b. is right])

Source:
{$DEFINE ALPHA}

unit keyboard;

interface

(**should be after F12, but is pasted here (that's the
trick!)**************)
const kbLeftWin95 = $59;
      kbRightWin95 = $5A;
      kbMenuWin95 = $5B;
(**should be after F12, but is pasted here (that's the
trick!)**************)



procedure InitKbd (kb: boolean);
procedure CloseKbd;
var InitVGA: Procedure;

const kbEsc = $01;
      kb1 = $02;
      kb2 = $03;
      kb3 = $04;
      kb4 = $05;
      kb5 = $06;
      kb6 = $07;
      kb7 = $08;
      kb8 = $09;
      kb9 = $0A;
      kb0 = $0B;

      kbACC = $0D;              { '` }
      kbCaret = $29;

      kbA = $1E;
      kbAE = $28;
      kbB = $30;
      kbC = $2E;
      kbD = $20;
      kbE = $12;
      kbF = $21;
      kbG = $22;
      kbH = $23;
      kbI = $17;
      kbJ = $24;
      kbK = $25;
      kbL = $26;
      kbM = $32;
      kbN = $31;
      kbO = $18;
      kbOE = $27;
      kbP = $19;
      kbQ = $10;
      kbR = $13;
      kbS = $1F;
      kbSS = $0C;               { �  }
      kbT = $14;
      kbU = $16;
      kbUE = $1A;
      kbV = $2F;
      kbW = $11;
      kbX = $2D;
      kbY = $2C;                { GERMAN! }
      kbZ = $15;                { GERMAN! }
      kbComma = $33;
      kbLt = $56;
      kbMinus = $35;
      kbNumber = $2B;           { # }
      kbPlus = $1B;
      kbPoint = $34;
      kbSpc = $39;

      kbBk = $0E;
      kbCR = $1C;
      kbTab = $0F;

      kbAlt = $38;
      kbCtrl = $1D;
      kbLShift = $2A;
      kbRShift = $36;
      kbGrey = $37;

      kbCaps = $3A;
      kbNum = $45;
      kbScroll = $46;
      kbSysRq = $54;

      kbGreyMinus = $4A;
      kbGreyPlus = $4E;

      kbDown = $50;
      kbLeft = $4B;
      kbRight = $4D;
      kbUp = $48;

      kbPageUp = $49;
      kbPageDown = $51;

      kbEnd = $4F;
      kbHome = $47;

      kbDelete = $53;
      kbInsert = $52;

      kbNum5 = $4C;

      kbF1 = $3B;
      kbF2 = $3C;
      kbF3 = $3D;
      kbF4 = $3E;
      kbF5 = $3F;
      kbF6 = $40;
      kbF7 = $41;
      kbF8 = $42;
      kbF9 = $43;
      kbF10 = $44;
      kbF11 = $57;
      kbF12 = $58;

var keytable: array [0..$5F] of boolean;
    kbActive: boolean;


implementation

uses Crt,Dos;

var
  KbdIntVec : Procedure;
  x, last: byte;
  make, loaded: boolean;
  kbd1, kbd2: word;

{$F+}
procedure Keyclick; interrupt;
begin
     kbd1 := memw[$0040:$001A];
     kbd2 := memw[$0040:$001C];

     x := port[$60];
     while x <> last do begin
           last := x;
           if x and 127 < $60 then begin
              make := x < 128;
              x := x and 127;
              keytable [x] := make;
              x := port[$60]
           end;
           if keytable [kbCtrl] and keytable [kbAlt] and keytable [kbInsert]
then
              InitVGA
     end;
     inline ($9C); { PUSHF }
     KbdIntVec;
     if not (kbActive or keytable[kbF10]) then begin
        mem[$0040:$001A] := kbd1;
        mem[$0040:$001C] := kbd2
     end
end;
{$F-}

procedure InitKbd (kb: boolean);
begin
     kbActive := kb;
     if not loaded then begin
        for x := 0 to $5F do keytable[x]:=false;
        GetIntVec($9,@KbdIntVec);
        SetIntVec($9,Addr(Keyclick));
        loaded := true
     end
end;

procedure CloseKbd;
begin
     if loaded then begin
        setintvec($9,Addr(KbdIntVec));
        loaded := false
     end
end;


begin
     textmode (co40);

     loaded := false;

     clrscr;

     gotoxy (1, 25);

     textcolor (lightblue);
     writeln ('Unit Keyboard (c) 1998 Rudolf Polzer');
     writeln ('written in Borland Turbo Pascal 6.01');
     writeln ('====================================');
{$IFDEF ALPHA}
     textcolor (blink+lightred);
     writeln ('ALPHA VERSION:      BUILD 1.000.000�');
     writeln ('NO WARRANTY  AND LIABILITY IF SYSTEM');
     writeln ('CRASHES - FIRST  ALPHA VERSION - USE');
     writeln ('THIS UNIT ON YOUR OWN RISK!!!');
     textcolor (lightblue);
     writeln ('====================================');
{$ENDIF}
     writeln ('Internet:');
     writeln ('        http://rpolzer.home.pages.de');
     writeln ('eMail:     einhardschule@t-online.de');
     writeln ('====================================');
     writeln ('INITIALIZATION: PLEASE WAIT A MOMENT');

     randomize;

     for x := 1 to 32 do begin
         write ('.');
         delay (Random({$IFDEF ALPHA}200{$ELSE}20{$ENDIF}))
     end;
     writeln ('DONE');
     writeln ('     press any key to continue');

     readkey;

     gotoxy (1, 25);
     for x := 0 to 24 do begin
         writeln;
         delay (10)
     end;

     textmode (co80);
     textcolor (lightgray);

     @InitVGA := Ptr ($C000, $0003);
end.




--
visit my homepage: http://rpolzer.home.pages.de
eMail: rpolzer.REMOVE@THIS.gmx.de
(remove REMOVE and THIS)

John schrieb in Nachricht <6ttvag$526$1@news3.cableinet.co.uk>...
>Does anyone know how to detect the windows 95/98 start menu keys within a
>T.P. 7 program?
>Do they have specific codes, or can they be detected is any other way?
>
>Any help appreciated,
>
>John Skilbeck.
>
>Ian W.Derrick wrote in message <3600FFBD.518F@GECM.COM>...
>>As a follow on ..... (perhaps not related)
>>
>>A while ago I was trying something along these lines but I could not
>>detect F11 and F12 from my keyboard F1 through F10 were OK. Is there
>>something different about these two keys, I never did manage to detect a
>>key press from F11 or F12. I never found an answer to this, would anyone
>>like to pass comment now .....
>>
>>Thanks
>>Ian W.Derrick
>
>

------=_NextPart_000_002A_01BDE3C8.415E37E0
Content-Type: text/x-vcard;
	name="Rudolf E. Polzer.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Rudolf E. Polzer.vcf"

BEGIN:VCARD
VERSION:2.1
N:Polzer;Rudolf;E.
FN:Rudolf E. Polzer
TEL;HOME;VOICE:061065994
TEL;HOME;FAX:061065994
ADR;HOME:;;Kolpingstr. 5;Rodgau;Hessen;63110;BRD
LABEL;HOME;ENCODING=3DQUOTED-PRINTABLE:Kolpingstr. 5=3D0D=3D0ARodgau, =
Hessen 63110=3D0D=3D0ABRD
URL:http://rpolzer.home.pages.de
URL:http://einhardschule.home.pages.de
EMAIL;PREF;INTERNET:rpolzer@gmx.de
REV:19980919T102252Z
END:VCARD

------=_NextPart_000_002A_01BDE3C8.415E37E0--
Technical Details
Message-ID: <6u5q0u$74j$1@zimt01.dillingen.baynet.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6ton52$ip0$1@news3.cableinet.co.uk> <yT_L1.1904$VW6.13569796@news.magma.ca> <3600FFBD.518F@GECM.COM> <6ttvag$526$1@news3.cableinet.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111659,6641efc813030989
X-Google-Attributes: gid111659,public
X-Google-Thread: 10cc59,6641efc813030989
X-Google-Attributes: gid10cc59,public
X-Google-Thread: 108ebd,6641efc813030989
X-Google-Attributes: gid108ebd,public
From: "Rudi Polzer" <rpolzer.REMOVE@THIS.gmx.de>
Subject: Re: ASCII Codes...
Date: 1998/09/19
Message-ID: <6u5q0u$74j$1@zimt01.dillingen.baynet.de>
X-Deja-AN: 393306036
References: <6ton52$ip0$1@news3.cableinet.co.uk> <yT_L1.1904$VW6.13569796@news.magma.ca> <3600FFBD.518F@GECM.COM> <6ttvag$526$1@news3.cableinet.co.uk>
Content-Type: multipart/mixed; boundary="----=_NextPart_000_002A_01BDE3C8.415E37E0"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Buergernetz Dillingen
Mime-Version: 1.0
Newsgroups: comp.lang.pascal.borland,comp.lang.pascal,borland.public.turbopascal