From: sl8nl@cc.usu.edu
Newsgroups: rec.games.programmer
Subject: Re: DOS experts please help (io stuff)
Date: 16 Dec 92 10:19:50 MDT
Organization: Utah State University

> So how in the hell do I get it to check the keyboard faster?

Here is a nice bit of code...

Joshua Jensen

begin 750 kbstate.pas
M>R1'*RQ3+7T*"G5N:70@2T)3=&%T93L*"FEN=&5R9F%C90H*8V]N<W0*"6M?
M97-C(`D)/2`@,3L*"6M?,2`)"0D]("`R.PH):U\R(`D)"3T@(#,["@EK7S,@
M"0D)/2`@-#L*"6M?-"`)"0D]("`U.PH):U\U(`D)"3T@(#8["@EK7S8@"0D)
M/2`@-SL*"6M?-R`)"0D]("`X.PH):U\X(`D)"3T@(#D["@EK7SD@"0D)/2`Q
M,#L*"6M?,"`)"0D](#$Q.PH):U]M:6YU<R`)/2`Q,CL*"6M?97%U86P@"3T@
M,3,["@EK7V)A8VL)"3T@,30["@EK7W1A8B`)"3T@,34["@EK7W$@"0D)/2`Q
M-CL*"6M?=R`)"0D](#$W.PH):U]E(`D)"3T@,3@["@EK7W(@"0D)/2`Q.3L*
M"6M?="`)"0D](#(P.PH):U]Y(`D)"3T@,C$["@EK7W4@"0D)/2`R,CL*"6M?
M:2`)"0D](#(S.PH):U]O(`D)"3T@,C0["@EK7W`@"0D)/2`R-3L*"6M?;&)R
M86-K"3T@,C8["@EK7W)B<F%C:PD](#(W.PH):U]E;G1E<B`)/2`R.#L*"6M?
M8W1R;`D)/2`R.3L*"6M?82`)"0D](#,P.PH):U]S(`D)"3T@,S$["@EK7V0@
M"0D)/2`S,CL*"6M?9B`)"0D](#,S.PH):U]G(`D)"3T@,S0["@EK7V@@"0D)
M/2`S-3L*"6M?:B`)"0D](#,V.PH):U]K(`D)"3T@,S<["@EK7VP@"0D)/2`S
M.#L*"6M?<V5M:0D)/2`S.3L*"6M?87!O<PD)/2`T,#L*"6M?86-C96YT"3T@
M-#$["@EK7VQS:&EF=`D](#0R.PH):U]B<VQA<V@)/2`T,SL*"6M?>B`)"0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