🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #8075

Re: Alternative to bioskey

#8075
From: grafbobo
Date: Fri, 23 Oct 1998 00:00
71 lines
2933 bytes
In article <909033101.316451@neptune.uniserve.ca>,
  "Alexander Russell" <alexad3@uniserve.com> wrote:
> Under dos you can hook int9 (the keyboard hardware interrupt) for complete
> control.
> >
> >I need to use an alternative to bioskey() to read characters. I know I
> >can use getch() but this does not pick up
> >
> >CTRL, INS, SHIFT, ALT, NUMLOCK etc.
> >
> >Does anyone know what function I can use. If there is not a DOS
> >alternative is there a win32 API alternative
> >
Check The State Of The Keyboard State Registers $0040:$0017/8.

An Old Example (Sorry, In Pascal):


   Key_ShiftR    =   1;
   Key_ShiftL    =   2;
   Key_Ctrl      =   4;
   Key_Alt       =   8;
   Key_Scroll    =  16;
   Key_Num       =  32;
   Key_Caps      =  64;
   Key_Insert    = 128;

   Keyp_CtrlL    =   1*256;
   Keyp_AltL     =   2*256;
   Keyp_CtrlR    =   4*256;
   Keyp_AltR     =   8*256;
   Keyp_Scrll    =  16*256;
   Keyp_NumL     =  32*256;
   Keyp_CapsL    =  64*256;
   Keyp_SysReq   = 128*256;

 clrscr;
 repeat
   REPEAT
   UNTIL (MEM[$0040:$0017]>0) OR (MEM[$0040:$0018]>0);

   gotoxy(2,wherey);
   write(MEM[$0040:$0017] AND 128 DIV 128:4);
   write(MEM[$0040:$0017] AND  64 DIV  64:4);
   write(MEM[$0040:$0017] AND  32 DIV  32:4);
   write(MEM[$0040:$0017] AND  16 DIV  16:4);
   write(MEM[$0040:$0017] AND   8 DIV   8:4);
   write(MEM[$0040:$0017] AND   4 DIV   4:4);
   write(MEM[$0040:$0017] AND   2 DIV   2:4);
   write(MEM[$0040:$0017] AND   1 DIV   1:4);

   gotoxy(42,wherey);
   write(MEM[$0040:$0018] AND 128 DIV 128:4);
   write(MEM[$0040:$0018] AND  64 DIV  64:4);
   write(MEM[$0040:$0018] AND  32 DIV  32:4);
   write(MEM[$0040:$0018] AND  16 DIV  16:4);
   write(MEM[$0040:$0018] AND   8 DIV   8:4);
   write(MEM[$0040:$0018] AND   4 DIV   4:4);
   write(MEM[$0040:$0018] AND   2 DIV   2:4);
   write(MEM[$0040:$0018] AND   1 DIV   1:4);

   writeln;

   if keypressed then c:=readkey;
 until MEM[$0040:$0017] =255; { 3 }


 Thomas.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <70q063$apr$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <362EA84C.97C0DC8E@realware.com.au> <909033101.316451@neptune.uniserve.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f6aa,e440d4fa3ab9ad35
X-Google-Attributes: gid10f6aa,public
X-Google-Thread: 103bde,e440d4fa3ab9ad35
X-Google-Attributes: gid103bde,public
From: grafbobo@my-dejanews.com
Subject: Re: Alternative to bioskey
Date: 1998/10/23
Message-ID: <70q063$apr$1@nnrp1.dejanews.com>
X-Deja-AN: 404268175
References: <362EA84C.97C0DC8E@realware.com.au> <909033101.316451@neptune.uniserve.ca>
X-Http-Proxy: 1.0 x6.dejanews.com:80 (Squid/1.1.22) for client 193.98.108.129
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Fri Oct 23 13:26:28 1998 GMT
Newsgroups: comp.os.msdos.programmer,borland.public.cpp.winapi
X-Http-User-Agent: Mozilla/4.01 [de] (WinNT; I)