Extended Commands ================= Introduction ------------ Extended Commands gives 12 new functions controlled by 27 new command words. Please note that the AUTO-REPEAT, CLOCK and the character FLASH functions are all interrupt-driven. This means that during cassette operations the clock will stop. Also this tape is not compatible with a disk-based system. All the new functions of Extended Commands may be used from within a Basic program and, with the exception of the error-trapping function, all may be used in the command mode. In the examples given X is used as a dummy variable. This dummy variable may be any of the normally allowed combinations of characters that would be used as variables. In the command mode only single statement lines are allowed. Instructions ------------ REVERSE PRINT Allows printing to the text screen in either green or orange on black. X=%REVON ... turns the reverse print on. X=%REVOFF ... turns off the reverse print. X=%PRGR ... prints in green on black. X=%PROR ... prints in orange on black. AUTO REPEAT Gives full auto-repeat on all character keys. X=%REPON ... switches auto repeat on. X=%REPOFF ... switches auto repeat off. ERROR TRAPPING Allows full error trapping from within a Basic program. e.g. 10 X=%TRAP1000 20 REM rest of program 1000 REM program jumps here if error occurs 1010 PRINT %ERR 1020 PRINT %ERL 1030 END %ERR gives the error number. $ERL gives the line number that the error occured in. The main advantage of error trapping is that an error need no longer cause a program to crash. Instead the program may deal with the error and then continue. PROGRAM MERGE X = %MERGE Allows a Basic program from tape to be "added" to a program in memory. The line numbers of the second program must be greater than the last line number of the program in memory. CHARACTER FLASH Flashes any selected on-screen character. X=%FLASH ASC('#') ... flashes the '*' character. This is the same as FLASH 42. X=%FLOFF ... switches off the FLASH function. X=%RATE ... X=%RATE 50 sets the flash rate to one per second. X=%RATE 25 ... sets the flash rate to two per second. RAM$ PRINT %RAM$ ... prints the current string space allocation. A=%RAM$ ... sets the variable A to the value of the current string space. RAM PRINT %RAM ... prints the amount of free RAM A=%RAM ... sets the variable A to the value of the amount of free RAM. BASL PRINT %BASL ... prints the length of the Basic program in memory A=%BASL ... sets the variable A to the value of the length of the Basic program in memory. BASMEM PRINT %BASMEM ... prints the highest memory location available to Basic. A=%BASMEM ... sets the variable A to the value of the highest memory location available to Basic. KEYGET A=%KEYGET ... waits for a key to be pressed and then assigns the ASCII value for that key to the variable A. WAIT X=%WAIT 50 ... program waits for one second. X=%WAIT 200 ... program waits for four seconds. REAL TIME CLOCK Gives an on-screen real time display. X=%CLON ... switches on the clock function. X=%CLOFF ... switches off the clock function. X=%DISOFF ... switches off the clock display, clock continues. X=%DISON ... switches on the clock display. X=%HRS ... X=%HRS 12 sets the hours to 12. X=%MINS ... X=%MINS 22 sets the minutes to 22. X=%SECS ... X=%SECS 45 sets the seconds to 45. Loading ======= CLEAR 200,31000 (ENTER) CLOADM (ENTER)