Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!cunyvm!byuvax!taylorj From: taylorj@yvax.byu.edu Newsgroups: comp.lang.pascal Subject: re: Readkey without "use crt" (Was Re: Strobing the keyboard) Message-ID: <922taylorj@yvax.byu.edu> Date: 21 Nov 89 03:39:59 GMT Lines: 38 There are two solutions to this problem: 1) Use CRT but make the I/O go through DOS. All you have to do is add the lines Assign(input, ''); reset(input); Assgign(output, ''); rewrite(output); to the start of your program. (TP 5.0 manual p.135) 2) Go directly to DOS or BIOS to read a key. To read a key using DOS, you'll need something like var regs :registers; regs.ah := 8; msdos(regs); if regs.al = 0 then begin msdos(regs); {do whatever you want to recognize extended key codes} end; key = regs.al; This can be redirected, so if you want to always read from the keyboard you might want to use BIOS instead: regs.ah = 1; intr($16, regs); if regs.al > 0 then key := regs.al else begin key := regs.ah; {do whatever to recognize extended key codes} end; Both of these wait until a character is pressed. There are other calls to check to see if a key has been pressed. Jim Taylor Microcomputer Support for Curriculum Brigham Young University taylorj@yvax.byu.edu