home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!caen!umeecs!quip.eecs.umich.edu!joy
- From: joy@quip.eecs.umich.edu (Chien-Chung Chen)
- Subject: Re: reading alternate keys on ibm from turbo
- Message-ID: <1992Nov6.211128.19865@zip.eecs.umich.edu>
- Sender: news@zip.eecs.umich.edu (Mr. News)
- Organization: University of Michigan EECS Dept., Ann Arbor
- References: <1dbruiINNbai@uwm.edu> <73862@hydra.gatech.EDU> <1deij2INNnva@uwm.edu>
- Distribution: usa
- Date: Fri, 6 Nov 1992 21:11:28 GMT
- Lines: 47
-
- In article <1deij2INNnva@uwm.edu> randyd@csd4.csd.uwm.edu (Randall Elton Ding) writes:
- >In article <73862@hydra.gatech.EDU> gtd205a@prism.gatech.EDU (James Houghton Crouch) writes:
- >>>procedure keyread (var ch: char; var alt: boolean);
- >>> begin
- >>> ch:= readkey;
- >>> alt:= (ch=#0) and keypressed;
- >>> if alt then ch:= readkey;
- >>> end;
- >>
- >>I think that this program will also return the arrow
- >>keys, PageUp, PageDown, and quite a few others.
- >>
- >>I'm pretty sure that TP firsts reads a #0 and then a code for these keys
- >>too
- >
- >Yes, That was the whole purpose for posting that function.
- >The origional question was "how do I read page up/page down ...etc..."!
- >My keyread function does in fact read everything except function keys
- >11 and 12. Does anyone know how to read these two function keys
- >from TP?
- >
- >randyd@csd4.csd.uwm.edu
-
- The following is a TP program that I wrote long time ago. I think it
- might help.
-
-
- -- Chien-Chung Chen
-
- ---------------
-
- { This program generates the scan code for the enhanced (101) keyboard. }
- program scan_enhance;
- uses crt, dos;
- const
- zf = $40;
- var
- regs: registers;
- begin
- repeat
- regs.ah := $11;
- intr($16, regs);
- until (regs.flags and zf)=0;
- regs.ah := $10;
- intr($16, regs);
- writeln(regs.al:3, regs.ah:10)
- end.
-