Loading Terminal Function Keys - Examples
Description |
Example |
Resets the fifth function key to the default value. The "0" invokes the reset function and the CHR(4) specifies the fifth function key. (Function key numbers are zero based.) |
1000 PRINT 'FL',"0"+CHR(4), |
Resets all function keys to their defaults. |
1000 PRINT 'FL',"1", |
Reads the value loaded into function key 4. Upon completion, A$ contains the text loaded in function key 4 |
0900 OPEN (1) FID(0) |
Loads the string "END" into function key 10. After execution, function key 10 will transmit the ASCII sequence "END" followed by a carriage return. |
1000 PRINT 'FL',"2"+CHR(9)+CHR(4)+"END"+$0D$, |
Reads the label for the first edit key. After execution, the string variable A$ will contain the first edit key label. |
0900 OPEN (1) FID(0) |
Reads all the values for the edit key set. Upon exit, the numeric variable KEYS contains the number of edit keys and the string array KEYS$ contains the keys and the loaded values. KEYS$[KEY,0] contains the key number and length of loaded text and KEYS$[KEY,1] contains the key text. If the function were changed to a "7", this would load the KEYS$ array with the edit key labels. If the 'EL' mnemonic in line 1010 were changed to an 'FL' mnemonic, this would read the function key load data. |
1000 REM 1000 "read load key set into KEYS$[] |
Reloads the edit keys using the data returned from the previous function. |
1200 REM 1200"load the edit keys using KEYS$[] |
Saves and restores the function key settings by an alternate method to the previous example. |
1000 REM 1000"save the function key setting in KEYS$ |