120
On the T/S 2068, it is possible to mess up the joystick ports if a wildly erroneous value is put into the SOUND command.
Parameters to the SOUND command are not fully validated, therefore it is possible to specify a number beyond the valid range for a given operation and not get an error.
For example, you can write a value greater than 63 to the Enable Register (Reg. 7), possibly changing the I/0 port used for reading the joysticks from input to output.
If you specify a number larger than 255 (FFH), only the least significant byte will be actually written to the Programmable Sound Generator.
Access to PSG Reg. 14 (IO-A) used for the joysticks is also not precluded via the SOUND command.
If you experience difficulty in reading the joysticks, do a write to PSG Reg. 7 clearing bit 6 to 8 to guarantee that the joystick path is enabled for input. This write can be done by executing a SOUND 7,63 (or any value less than 63).
121
Use the following machine language program when you want to clear just the bottom portion of the screen during a program. The program takes just six bytes to do the work. Actually it calls a much longer routine in RON and passes on a single byte parameter which is first loaded into the B register.
PCLS LD B,n
CALL 0A2C
RET
where n (the number of lines from the botton of the screen which you wish cleared) is the byte to be loaded into B. It must not be more than 24 (decimal or 18 hex), as this is the number of lines on the ZX display. This idea was taken from a book by David Woods and was reported by Jim Pitts in the SLUG newsletter. A BASIC program which does the same thing is as follows.
Make a 1 REM line with 6 periods in it.
1 REM ......
POKE 16514,6
POKE 16515,0
POKE 16516,205
POKE 16517,44
POKE 16518,10
POKE 16519,201
Now further down in your BASIC program, when you want to partially clear your screen, place the line POKE 16516, n when n is the number of lines from the botton which you wish cleared, and then in the next BASIC line call the routine with RAND USR 16514.
122
Here is a programing hint especially useful if you are using one of the Sinclair computers like the ZX81 which does not have a RENUMBER command as the QL does.
Do not number your program lines consecutively. Leave gaps between every line number so that corrections and additions can be easily inserted.
Most people program using every 10 or every 100 line numbers as 100, 118, 128, … or 180, 280, 380, …
123
Warning. SuperBASIC on the QL does not assume that the pointer is at the start of the data line.
To ensure that it is before the execution of a READ, you must include a RESTORE.
If YOU do not, you will get an error message saying that you have reached end of file in the READ statement.
124
The T/S 2068 certainly was not made with the ham in mind. The crystal oscillator which drives the counter chain to get the video timing runs at 14.112 MHz. The Z80 CPU runs on a 3.538 MHz clock signal. The pixel data is shifted out to the video generation circuitry at a 7.056 MHz rate.
Products
Media
Image Gallery
Source Code
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.