TIPS FROM DAVE SCHOENWETTER
Here are some tips for machine code programming on the TIMES-SINCLAIR machines which I have found to be very useful especially when working with the 2K system. all tips will work with the 16K systems too.
(1) I have accidentally deleted my 1 REM statement when editing the BASIC part of my program on many occasions. To eliminate the possibility of deleting your 1 REM statement which contains your machine code program, ENTER 1REM followed by enough characters to hold your MC program. POKE16570,0 which will change 1REM to 0REM ! THE PROGRAM WILL NOW LIST and RUN but the 0 REM cannot accidentally be deleted!
(2) With large 1 REM machine code programs on 2K systems te computer often gets into a loop when attempting to edit BASIC. This causes a continuous loop LISTING (or trying to) the 1 REM statement. To prevent this I added a couple of HEX 76’s near the beginning of 1 REM text. this prevents a LIST beyond the “Hex 76” . One disadvantage is that you must ENTER LIST 2 to see your BASIC program. However it’s better than losing your program to the LIST LOOP.
(3) For anyone interested in ENTERing machine code, I wrote a machine code program that loads itself above RAMTOP 2K or 16K and uses 128 bytes of storage. By using four lines of BASIC THE PROGRAM THEN WAITS FOR THE USER TO enter A FOUR DIGIT HEX address. the MC program then PRINTS to the screen 128 bytes of Hex data. The decimal address of the entered Hex address is also printed. The program is then in INPUT mode for Hex data. Any number of bytes may be ENTERed on one line. The character “G” will skip over a byte and move the cursor by one byte. Any incomplete byte or non-valid Hex character (except G) will terminate the program with an error. I will bring a copy of the program to the next meeting.
Dave Schoenwetter
SINCUS, March 1984