MZ-800 course Chapter 5
|5. Pokes, Peeks, tricks, tips and things like that|
Even some tricks you can find or figure out for yourself. It is hard to explain how to find them. It is often the case that you will stumble upon them by accident. Here are a couple of useful tricks and tips.
CHECK-SUM ERROR on load, what now?
Once in a while a program is not loaded correctly from cassette and
a CHECK-SUM ERROR will appear. There is a solution to get rid of this
message by loading the
Unclear screen, what now?
In BASIC it sometimes occurs that the background- and foreground color are the same, or that the computer is frozen. In that case you could try to get an acceptable caller combination (black and white) by pressing the CTRL-key in combination with the reset button. If this does not work you will have to reload BASIC.
Transfer a program from QD to cassette
In the ROM-monitor there is no explicit instruction to transfer a program from QD to cassette. This means you have to use the program TRANS, which can be a cumbersome process. Fortunately there also is a solution which works in the ROM-monitor and it goes as follows:
Controlling the QUICK-DISK from a program
10 ON ERROR GOTO "ERROR" 20 LOAD "XXXXXX" 30 END 40 LABEL "ERROR" 50 IF ERN=50 THEN PRINT "THE QUICK-DISK IS NOT READY." 60 IF ERN=40 THEN PRINT "THIS PROGRAM IS NOT ON THE CURRENT QUICK-DISK." 70 END
The name "XXXXXX" at line 20 can be any name.
KEYWORDS for the game MOTY
Repeated GET with PEEK
This PEEK should be in the first part of this chapter, but you will
probably not mind that we did not mention it earlier.
10 GET A$:PRINT CHR$(PEEK(4965)):GOTO 10
Go to the ROM-monitor immediately
When you have got a QD in the QD-drive and turn on the computer, the computer will automatically search for and load the first program on the QD. It is likely you do not want this, you could for example want to load something from cassette or you might want to work with the ROM-monitor. You can solve this by opening the QD-drive or by pressing the M or C key while pressing the reset button or turning on the computer.
Switching back from the ROM-monitor to BASIC
This can be done in three ways. The first one is to press the CTRL
key in combination with the reset button. The second one is to enter
G005A in the ROM-monitor
This program shows all BASIC-instructions, except the ones for the
printer (like PRINT/P).
10 INIT "CRT:M1":B=0 20 FOR A=$5973 TO $5C59 30 IF PEEK(A)>$40 AND PEEK(A)<$5B THEN PRINT CHR$(PEEK(A)); 40 IF PEEK(A)>$BF AND PEEK(A)<$DB THEN PRINT CHR$(PEEK(A)-$80),:B=B+1 50 IF PEEK(A)=$A4 THEN PRINT"$",:B=B+1 60 IF B=84 THEN PRINT:PRINT "PRESS RETURN TO CONTINUE.":GOSUB 90 70 NEXT A 80 GET A$:IF A$="" THEN 80 ELSE END 90 GET A$:IF ASC(A$)=13 THEN B=0 :CLS:RETURN ELSE GOTO 90
Loading a program in a simple way
If more than one program resides on one QD and you want to load a machine code program from QD which is not the first one, you can do this by typing QL and then the name of the program, but we can also do this in an other way. (This is particularly convenient for programs with long or complicated names). It goes as follows:
A QD with OBJ as well as BTX programs
It is common that both BTX as well as OBJ programs reside on one diskette. If the first program is a BTX program and you would like to load the first OBJ program, you would have to do what is discussed above. However, there is an easier way: