GETKEY.DO Bob Andersen CLUB 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE PROGRAM IS AT THE END OF THIS FILE A new and improved BASIC keyscan subroutine, intended to replace INKEY$ where it is necessary to recognize F-Keys with ^C and ^S break characters disabled. The Basic program GETKEY.BA is for the Model 100 only. It is a demo program which contains the keyscan subroutine and illustrates it's use. Provided by Bob Andersen of Micro Analog Associates, Monroe, CT. and dedicated to Phil Wheeler for his contributions to our SIG. I sure hope he can use this one! 100 ' Demonstration Routine to show use of the "new and improved" keyscan 110 ' subroutine which scans for all keys, including F1-F9 , and which shuts 120 ' off ^S and ^C within BASIC while scanning 130 PRINT"waiting for key input" 140 GOSUB 220 150 ' The subroutine returns B%=0 for ASCII characters and B% =255 160 ' for F keys. A% contains the ASCII character value or F key number 170 CLS:IFB%=0THENPRINT"ASCII ";A%ELSEPRINT"the F";A%+1;" key" 180 ' Shows the results. Breaks and F key interrupts are now re-enabled. 190 PRINT "Continue demonstration (y/n)?";:A$=INPUT$(1) 200 IF A$="y" OR A$= "Y"THENCLS:GOTO100 210 END 220 ' Bob Andersen's "new and improved" keyscan routine for the Model 100 230 POKE63056,128 240 ' Disable breaks 250 IF PEEK(65450)=0GOTO250 260 ' Wait for a character in the keyboard buffer 270 A%=PEEK(65451):B%=PEEK(65452):CALL29250:POKE63056,0 280 ' Grab the character codes, remove character from buffer, reenable breaks 290 RETURN