FUNCTION KEY PROGRAMMER ----------------------- This program allows users to program up to eight (F0 TO F7) function keys from DOS. All 16 keys (F8 to F16 being shifted) could be programmed but for various very good reasons I have used only eight. 40 COLUMNS ---------- If you have forty columns, put a key strip under the clear plastic cover just above the keyboard. 80 COLUMNS ---------- If you have an 80 column card fitted to your Einstein you will see the key numbers in inverse video and the key functions displayed at the bottom of the screen. This display is unaffected by a full and scrolling screen. The only way to clear the line is to perform a form-feed, this is done by either printing CHR$(&0C) or typing + where means press the enter key. You will find that a CLS (clear screen) from BASIC also clears the line. To avoid this write a small routine as follows:- PRINT CHR$(&1E) PRINT CHR$(&16) RETURN When called by means of a GOSUB or PROC this will clear the screen but leave the line intact. The two codes mean. CURSOR HOME and CLEAR TO END OF SCREEN. Some programs do a clear screen as soon as they run e.g. the new 80 column basic from Xtal, others like BBCBASIC(Z80), MBASIC, ZEN, DEBUG, KFORTH, HPEIN and loads more do not, so the line will stay intact. DEFAULT KEYS ------------ The program has a list of default settings programmed into it, these are as follows:- DIR, LOAD, DIR 1:, SAVE, MOS, DISP, GO and REN. To use these key settings simply choose option 'D' from the menu. REDEFINE KEYS ------------- If you want to redefine the keys choose option 'R' You will see a message telling you to enter up to six characters only, this is to keep the 80 column display tidy. So therefore any files with longer names need to be renamed e.g. our BBCBASIC.COM could be made BBC.COM If you want to run a .COM file do not enter the file descriptor that is the .COM bit of the filename. After each filename you will be prompted 'Auto carriage return Y/N' If you answer Y your filename will act just as if you had entered it from the keyboard and pressed the enter key. So, to run, say, the auto boot utility you would type AUTO and at the next prompt, Y . When all the keys are defined you will again see the opening menu. Your key entries are now in the part of memory used to hold the default settings, so if you now press 'D' you will program the keys to your own specification. If you find you need more than six characters it is possible to combine two or more keys e.g. say you want to DIR all the files with the descriptor ".COM" from DOS you would enter DIR *.COM this as you can see is more than six characters long but can be represented by programming one key with DIR (no auto CR) and another key with *.COM (plus auto CR). Pressing both keys will now perform the required function.. KEEPING REDEFINED KEYS ON DISC ------------------------------ Follow the steps above and return to DOS either by pressing 'D' or 'E'. Once in DOS enter the following:-"SAVE 5 KEY1.COM" this will put the program on disc with your key settings as the default settings. Now enter KEY1 and try the default option. You could, of course, have several different sets of key functions on one disc, all with different filenames e.g. KEYBBC.COM KEYXBAS.COM etc. NOTE ---- BBCBASIC(Z80) "star" commands are accepted. As an example *.*.* is allowed. This will produce a complete directory of the logged disc. Another example, *DR.1: will change the logged drive to drive 1 if fitted.