Sharp logo

MZ-800 course Chapter 5 
5. Pokes, Peeks, tricks, tips and things like that


5.3 Tips and Tricks

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
program with the program TRANS and saving it again afterwards.

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:

  • Turn on the computer.

  • Press M to enter the ROM-monitor.

  • Place the QD with the program in the QD-drive.

  • Enter QC and then the filename. If you do not know the name of the program, first enter QD to see all programs on the QD

  • Press N.

  • Enter M1104.

  • Press <cr> until all addresses up to 1109 are on the screen.

  • Press SHIFT/BREAK.

  • Enter M1102.

  • Now enter the hexadecimal value that is at address 1104.

  • Repeat this for addresses 1103 and 1105. The hexadecimal value at address 1103 is copied to 1103.

  • Repeat this until the value of 1109 is at 1107.

  • Press SHIFT/BREAK again
    .
  • Enter GE80A.

  • If all is well, the program is now on cassette. Please check to make sure.

  • Do not forget to press <cr> each time!

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

1- 6   MAJOR   51- 56   SHARK   101-106   PERKY   151-156   SHOOT
6-11   6MOTY   56- 61   RODEO   106-111   E002H   156-161   TRACK
11-16   LAKAI   61- 66   ALIEN   111-116   SONIC   161-166   TRACE
16-21   TUTOR   66- 71   PIO80   116-121   PYROL   166-171   VAULT
21-26   JEANS   71- 76   ASCII   121-126   GYROS   171-176   PAPUA
26-31   ROHAN   76- 81   METRO   126-131   04136   176-181   RELAX
31-36   SUM5Y   81- 86   BIMBO   131-136   SOLID   181-186   LOAVR
36-41   EAGLE   86- 91   NOOSE   136-141   SPARK   186-191   JAMOI
41-46   RSB55   91- 96   ERROR   141-146   STDAR   191-196   55296
46-51   LEICA   96-101   TASTE   146-151   TRAMP   106-200   NP2IJ

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
or by typing G00AD followed by #. (Do not forget to enter <cr> each time). BASIC must be in memory for this to work!!

All BASIC-instructions

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:

  • Press M and turn on the computer.

  • Enter QD.

  • You will now see all names of the programs on the QD.

  • Enter QL.

  • Now go up with the cursor keys until the cursor is at the name of the program you want to load and press <cr>

    .
  • If all is well, the program of your choice is now being loaded

    .
  • In the case that there are 32 programs on the QD and you would like to load one of the first ones, you must use the ‘old’ method.

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:

  • Press M and turn on the computer.

  • Enter QL.

  • On FILENAME? just press <cr>.

  • Now the first OBJ-program is loaded, even though the first program is a BTX-file.

  • This tip only works when we want to load the first OBJ-program!

Previous page
Next page
Contents


Go to the top of this page Home

last updated March 22, 2006
Arjan Habing, Mark de Rover, Jeroen F. J. Laros, sharpmz@sharpmz.org