The basic (meaning fundamental) intelligence of your Sorcerer is a program called thePower-On Monitor. Should you ever get lost, confused, even bewildered, an understanding of the Power-On Monitor will prove to be a useful tool in regaining your composure and discovering where your problem lies.
The Monitor program is buried inside the Sorcerer and has nothing to, do with program cartridges. It does, however, look to see if a program cartridge is installed in the unit and if so, it will pass control to the cartridge. When a program cartridge isn't installed, the Power-On Monitor program will take control and print >.
Hint ... if you have a program cartridge plugged into Sorcerer and a > is displayed on the screen, you don't have the cartridge inserted properly.
The greater than [ > ] character is referred to as a prompt; it lets you know that Sorcerer is awaiting a command from you. The underscore character [ _ ] is called a cursor and tells you where the next character will appear on the screen.
The Monitor program can be called upon at any time. Not everyone will want to escape into the Monitor because it isn't nearly as fun as BASIC or other higher-level languages. Its main purpose in life is to diagnose hardware and software programs. For those of you who want that challenge, here is a list of Monitor commands.
The commands are listed in the left column; only the first two letters
are necessary. The parameters of each command are listed
to the right; parameters enclosed in parentheses are optional. You must
use spaces or other delimiters between the command and its parameters, and
between parameters. Follow the last parameter with a RETURN.
DUMP XXXX (XXXX)
addr addr
Displays memory on the screen. If you give one address, you get the contents of that address; if you give two addresses, you get the contents of all addresses from the first to the second.
Examples:
DU 0100 Displays the contents of address 0100.
DU FE00 FE07 Displays the contents of all address from FE00 to FE07.
ENTER XXXX
addr
Lets you enter hexadecimal numbers into the memory address. When you hit the carriage return, Sorcerer advances to the next address; when you hit carriage return alone, you just get the current address. A / (slash), followed by the carriage return, gets you out of ENTER.
Examples:
Entering data one address at a time:
EN FE00 The command to enter data, starting at FE00.
FE00: FF Sorcerer prints the addresses and colons;
FE01: 00 You must enter the numbers (following each with a RETURN.
FE02: FF
FE03: 00
FE04: / The slash terminates the EN command.
Entering a block of data:
EN FE04 The command to enter data, starting at FE04.
FE04: FF 00 FF 00 Sorcerer prints the address and colon;
you must enter the numbers, separated by delimiters
(in this case, spaces).
FE08: / Sorcerer reports the next available address;
the slash terminates the EN command.
SAVE NAMEX XXXX XXXX (X)
name addr addr unit
Saves memory on tape from the first address to the second address, on the tape unit specified (or on unit #1, if you don't specify). The header on the tape will contain the name (which must start with a letter), the beginning address, block size, file type, and GO address.
Example:
SA TEST1 0100 0240 2 Saves the program in addresses 0100 to 0240
on tape unit #2, under the name TEST1.
LOAD(G) (NAMEX) (X) (XXXX)
name unit addr
Loads the file named NAMEX into memory, from the tape unit specified (or unit #1, if you don't specify). Starts loading at the given address if specified; otherwise at the addres's in the file header on the tape. If you specify an address you must also specify the unit. If you don't give a name, then the first file will be loaded. If you include the G after LO, Sorcerer will run the program starting at the GO address in the file header, immediately after loading. This command will only load files saved in the Monitor. A file saved in Standard BASIC must be loaded with the command CLOAD; a file saved in the Monitor can be loaded with CLOAD.
Examples:
LO TEST1 Loads the program TEST1 from tape unit #1,
starting at the address in the file header.
LO TEST1 2 Loads the program TEST1 from tape unit #2,
starting at the address in the file header.
LO TEST1 1 0100 Loads the program TEST1 from tape unit #1
starting at address 0100.
LOG Loads the first program on tape unit #1 starting
at the address in the file header, and runs the program.
LOG 2 0100 Loads and runs the first program on tape unit #2,
starting at address 0100; then jumps to the GO address
in the file header.
LOG TEST1 Loads and runs the program TEST1 from tape unit #1,
starting at the address on the file header.
FILES (X)
unit
Lists all cassette files and header information from the specified unit. CTRL C stops the listing and returns you to the Monitor. This command will list BASIC programs stored with CSAVE, but will not list arrays saved with CSAVE *.
GO XXXX
addr
Calls a program at the given address.
MOVE xxxx xxxx (s)xxxx
addrl addr2 block/addr3
Copies the contents of a block of successive memory addresses into another block of addresses. Use this command two ways:
Examples:
MO FC00 FE00 S0010 Ihis copies the 16 addresses (10 Hex)
starting at FC00, into the 16 addresses starting at FE00.
MO FC00 FC0F FE00 This copies the 16 addresses from FC00 to FC0F into
the 16 addresses starting at FE00.
TEST XXXX XXXX (C)
addrl addr2
Tests each bit of RAM from address 1 to address 2 (8 bits per word). A blinking * appears while the test is running. No message if memory is good; otherwise prints BAD or OK for each bit. With C, tests continuously, giving a PASS COMPLETED message at each pass. Use this command only for testing RAM; all ROM addresses will be reported BAD, no matter what their condition.
The bit test (command TE) will not give reliable results on the area of RAM occupied by the Monitor stack. If you wish to test this portion of RAM, first relocate the Monitor stack, as described under that heading. For the addresses of the stack, see Figure 9, Appendix A.
You must also take special precautions when testing screen RAM and video scratch RAM (addresses F000 to F7FF. For details, refer to the Sorcerer Technical Manual.
PROMPT =X
Changes the Monitor prompt from > to whatever you specify. For example, PR = # changes the prompt to #.
CREAT
Creates a batch tape on tape unit i. Enter your batch commands a line at a time after the * prompts, and end each line with a carriage return. The tape will start, record your line, and stop. To reenter the Monitor, hit the carriage return alone.
LIST
Lists all the commands on your batch tape.
BATCH
Tells Sorcerer to read the batch tape on tape unit 1 and execute all the commands on that tape. You can stop the routine by typing CTRL C; Sorcerer will stop automatically if it reads an invalid command, or if any error occurs.
OVER
This is the batch command which terminates the batch mode and returns you to Monitor. This is similar to the END statement in Standard BASIC.
SET
S=XX Changes display delay to XX.
T=X Sets tape rate to 0=1200 baud (default);
1=300 baud.
F=XX Sets file type in header to ASCII value XX.
If D8 is set, then file is non-auto-execute.
X=XXXX Sets auto execution address in tape header.
O=V Sets current output to VIDEO
=P PARLOT (parallel output)
=L CENTRONICS PRINTER DRIVER
=S OUTAPE (tape output)
=XXXX ADDRESS I=K Sets current input port to KEYBRD
=P PARLIN (parrallel input)
=S INTAPE (tape input)
=XXXX ADDRESS
There are 256 file types (00 through FF). D8 is non-auto-execute. All others are arbitarily user assignable. However, BASIC will only load a file of type BX (i.e., most significant digit is B).
Examples :
SE S = FF Sets the display delay to FF.
SE F = D8 Sets file type to non-auto-execute.
SE O = L Sets output to Centronics Printer.
SE O = 1000 If you have loaded an output driver routine at address 1000,
this command sets the Sorcerer's output to that routine.
PP (X)
Jumps to ROM PAC. If no parameter, then warm start, otherwise cold.
NOTE: Each address is a four digit hexadecimal (base 16) number, from 0000 to FFFF (0 to 65535 in decimal notation). The content of each address is a two digit hexadecimal number, from 00 to FF (0 to 255 decimal).
Until the list of Monitor commands came along your tour of personal computing was pretty civilized. In this chapter you're about to have a close encounter with the stuff the computer world is famous for ... abbreviations, mneumonics, hexadecimal notation and never enough explanation in the instructions. Never fear ... Your Sorcerer will help you through all this because if you don't understand an instruction experiment until you get a resonable response.
Let's go back and look at that list again. DU is an abbreviation for "dump memory," and in fact that is exactly what happens if you type DU followed by an address that you want to display, followed by a carriage return. The problem now is to understand this memory address notation. Each digit of the four shown is a hexadecimal (base 16) digit. Hexadecimal is a number system often used by computers. It uses digits 0 through 9 and the letters A through F. The letters are used because it is necessary to represent 16 different values with a single digit for each value; the letters A through F represent the number values 10 through 15.
Using letters in counting may appear awkward until you become familiar with the system. Hexadecimal address 1E equals the decimal address 30.
DECIMAL HEXADECIMAL DECIMAL HEXADECIMAL
0 = 0 9 = 9
1 = 1 10 = A
2 = 2 11 = B
3 = 3 12 = C
4 = 4 13 = D
5 = 5 14 = E
6 = 6 15 = F
7 = 7 16 = 10
8 = 8 17 = 11
When conversation turns to talk of computer address and instructions you will always find yourself with foreign number systems. Most likely binary (base 2), octal (base 8), hexadecimal (base 16) and not often enough, decimal. For this reason you will find conversion tables in many computer publications. Since IBM is partial to hexadecimal you will find our reference to address and instructions in hexadecimal also. Computer instructions in hexadecimal are also referred to as machine language code which is described in great detail in the manual that accompanies the development program cartridge.
EXIDY STANDARD MONITOR
VERSION 1.O
COPYRIGHT (C) 1978 BY EXIDY INC.
THE TOP OF RAM IS XXXX HEX.
STACK BEGINS FROM XXXX HEX.
The Monitor has three (3) entry points:
COLD
WARM
USER
E000 -- COLD - is always entered from power on. The RAM is searched and the top is found. The video is initialized and default parameters are set up.
E003 -- WARM - establishes a stack from information from COLD or USER and re-enters the Monitor.
E006 -- USER - uses the HL register pair as the top of RAM and then jumps to WARM.
The Monitor has nine (9) I/O entry points:
E009 -- RECEVE - gets character from current input device to the A register; if no character, then sets the A register to zero. If character is present, Z is reset; otherwise, Z flag is set.
E00C -- SEND - outputs the A register to current output device.
E300F -- INTAPE - inputs to the A register from tape.
E012 -- OUTAPE - outputs the A register to tape.
E015 -- QUICKCK - does a quick check for CTRL C, ESCAPE or RUN/STOP. Returns with Z set if none.
E018 -- KEYBRD - inputs to the A register from the keyboard, if a key was pressed. Z flag is reset or set, depending on whether a key was pressed.
EO1B -- VIDEO - Outputs the A register to screen
CTRL
W = cursor up
CTRL A =
cursor left
CTRL S = cursor right
CTRL
Z = cursor down
CTRL H
= character delete
CLEAR or form feed = clear screen
CTRL
Q = cursor home
The form feed also resets the standard graphics to their normal values (the symbols shown on the key caps).
EO1E -- PARLIN - inputs to the A register from parallel input port.
E021 -- PARLOT - outputs the A register to a parallel output port.
The Monitor will use any of the following to delimit or to space between Monitor parameters on a line:
SPACE ! " # $ % & ' ( ) * + , - .
The Monitor has three error messages:
INVALID COMMAND
INVALID PARAMETER
TAPE CRC ERROR
The first two are self explanatory; these are syntax errors and often result from incorrect use of delimiters. A tape error message usually indicates incorrect tone or volume settings of the tape recorder, but may also indicate a malfunction in the Sorcerer's tape interface or in the tape cartridge itself.
The Monitor batch system lets the Sorcerer automatically run a sequence of files. The four batch commands are explained above (see Power-On Monitor Command Set).
A batch tape is a sequence of user created Monitor commands, recorded on a tape cassette. Use the Monitor command CR to create this tape, and the command LI to verify its contents. Use the command BA to automatically execute the commands on the batch tape, and use the command OV as the last command on the tape, to return control to the Monitor. Note that the monitor does not have any commands which would allow you to edit a batch tape. If you make a mistake while creating your tape, you will have to go back and start over.
Example:
Here is a sample batch routine. The following commands are on a batch tape ready to be played on tape unit #1. Tape unit #1 also contains the two programs PROG1 and PROG3. Tape unit #2 contains a blank tape, for recording the file FILE1.
LOG PROG1 1
PROG1 is here
LO PROG3 1 2000
PROG3 is here
SE O = L
GO 2000
SE F = AA
SA FILE1 0000 1000 2
OV
This batch routine loads the program PROG1 from tape unit #1 and executes it. Next, it loads the program PROG3 from tape unit #1 starting at address 2000. It then routes the output to a Centronics printer and executes PROG3. Then it sets the tape file type to AA and saves the memory from addresses 0000 to 1000 on tape unit #2, under the name FILE1. Finally, it returns control to the Monitor.
Any error will end the batch mode and return you to the Monitor. You can also return to the Monitor by hitting CTRL C, ESC, or RUN/STOP.
Only tape unit #1 can be used for creating or executing a batch tape; however, you can put a sequence of programs on tape unit #2 and run them with batch tape LOG commands. To use both tape units, you need a Serial Data Cable (Exidy Part No. DF4005); this cable also provides automatic control of the tape unit motors.
We strongly recommend you use the Serial Data Cable -- without automatic motor control, your batch tape may run past a command before the preceding command has been executed. If you do not use the data cable, you can avoid this problem in two ways:
First, you can put plenty of blank tape between commands on the batch tape. When you enter each command (under the CR command), let the tape run awhile before hitting RETURN.
Second, you can start and stop the tape unit manually (although this defeats the purpose of the batch system). The Sorcerer prints each command on the screen after reading it from the batch tape; this is the time to stop the recorder. After executing the command, Sorcerer prints a prompt; you can then turn on the recorder.
The Monitor puts your commands onto a batch tape in this format:
One hundred 0s and a 1 a command in ASCII one byte CRC (CyclicRedundancy Check)
As each character is written on (or read from) the batch tape, Sorcerer performs a CRC routine to update the CRC byte. The final value of this byte is then written on the tape (under the CR command) or compared with the value already on the tape (under the BA command).
The stack is a term which loosely denotes three separate areas of memory in the Sorcerer:
To relocate the stack means to simultaneously move the Monitor RAM and stack proper, and reset the stack pointer.
At power-on, Sorcerer searches RAM for the top RAM address. The 112 addresses (70 hexadecimal) from the top downward are used as the Monitor RAM; the next 64 addresses approximately (40 hexadecimal) are the Monitor stack proper.
Example:
In the 8K Sorcerer at power-on, the top of RAM is 1FFF and the stack starts at 1F90. This means that addresses 1F91 to 1FFF are Monitor RAM storage, and 1F90 to approximately 1F50 are the Monitor stack proper.
If the stack is disturbed, the system may crash. This usually happens when a tape file or user program overwrites the stack. You can recover from the crash by hitting the RESET keys, but you will still lose the contents of all RAM. To prevent a crash, you must relocate the stack to an area of RAM which won't be used by your program or tape file. This area must contain at least 176 bytes (B0 hexadecimal) -- 112 bytes for Monitor RAM storage, and 64 bytes for the Monitor stack proper.
You must also relocate the stack before using the Monitor RAM test (command TE) on the area of RAM occupied by the stack.
To relocate the stack, first, choose a suitable address XXYY for the top of the Monitor RAM; here, XX and YY are the high order and low order bytes of the address, respectively. Second, use the Monitor EN command to put these Z80 instructions into the addresses 0000 to 0005:
21 YY XX C3 06 E0
This Z80 program loads the address XXYY into the HL register pair and then jumps to the Monitor USER entry point. Finally, give the command GO 0000.
Example:
To move the stack so that the top of RAM is at 0750:
You type: EN 0000
Sorcerer replies: 0000:_
You type: 21 50 07 C3 06 E0 /
Then type: GO 0000
Sorcerer moves the stack and prints this message:
EXIDY STANDARD MONITOR
VERSION 1.0
COPYRIGHT (C) 1978 BY
EXIDY INC.
THE TOP OF RAM IS 0750 HEX.
STACK BEGINS FROM 06E1
HEX.