Did you ever do a lot of repetitive keying or wish you had programmable function keys?
Here’s a clever little utility which will do just that. I found it in an old ‘SINC TIMES’ newsletter. It was originally written for the Spectrum and uses the interrupt mode 2. I’ve modified it to run on the TS2068.
As written, the code is not relocateable, but if you understand the Interrupt Mode, you can move the code anywhere above 32767.
This utility will allow you to assign any alphanumeric key a user definable function which you write in BASIC. Type in the following listing and run line 9900. If there are no DATA errors, the program will RUN. You may delete line 9900 to the end.
Here are some rules to follow: The functions are set-up in REM statements at the beginning of BASIC. Study the demo examples given below.
The key you wish to program should come after the REM keyword, and followed by a colon. The entire function should be on one line unless you use a GOTO line #. If you add a “#” to the end of your BASIC, it will simulate a carriage return (ENTER), and your function will execute itself.
If you omit a “#” at the end, your function will appear at the input line and wait for you to press ENTER. If you want to use a normal REM statement, just place a “*” after the REM and no colon.
To disable this program, type RANDOMIZE USR 64399. Note that line 3 is a CAT for Larken Disk drive.
Have fun, and write to me if you discover any unique ways to usethis utility and I’ll pass them along to the readers.
Reprints:
Source Code
1 REM !: PRINT INK 2; FLASH 1;AT 10,5;"This is a DEMO...": BEEP .1,.1: PRINT : PRINT "Hit '@' For Another DEMO"#
2 REM @: INPUT "Input Number (0 TO 65535) ";N: RANDOMIZE N: PRINT "Lo Byte=";PEEK 23670,"Hi byte=";PEEK 23671#
3 REM CAT : RANDOMIZE USR 100: CAT "",
10 PRINT "Press '!' or '@' or' CAT ' For DEMO"
20 STOP
9900 CLEAR 64249: LET on=64381:LET off=64399: LET c=0
9910 FOR n=64250 TO 64405: READ a: POKE n,a: LET c=c+a
9920 NEXT n: IF c<>19476 THEN PRINT "DATA error!": STOP
9930 RANDOMIZE USR on: RUN
9940 DATA 255,243,229,213,197,245,205,9,251,241,193,209,225,251,201,253,203,1,110,200,33,0,0,57,235,237,123,61,92,225,1,229,11,167,237,66,235,249,192,42,83,92,24,2,235,9,35,35,78,35
9950 DATA 70,35,84,93,126,254,234,192,35,58,8,92,190,32,235,35,126,254,58,32,229,35,126,254,13,40,223,11,11,11,11,197,229,42,91,92,205,187,18,19,237,83,91,92,35,235,225
9960 DATA 193,237,176,235,43,126,254,35,40,8,205,131,12,253,203,1,174,201,1,1,0,205,80,23,62,13,50,8,92,253,203,1,238,201,33,0,254,1,250,0,113,35,16,252,113,62,254,237,71,237,94,201,62,62,237,71,237,86,201Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.