Download March 1980 - Nascom / Gemini / 80 Bus

Transcript
62
Liverpool Software Gazette March 1980
Mike Shannon
Engineering Dept
Microdigital Ltd
The Machine Language Program SP-1002 is the latest
software from the Sharp stable for their MZ-80K Personal Computer. It allows the user to write, debug and
save on tape machine code programs, to be used either
by themselves, or in time critical parts of high level
language programs.
The software comes in the form of a cassette tape
which is loaded into the machine, and an instruction
manual, which explains both the commands of the program and the instruction set of the Z80 microprocessor,
which is the CPU in the Sharp MZ-80K.
The programs availability on tape, rather than in
R.O.M. follows Sharp's policy with their BASIC Language tape. They claim it has the advantage of easier and
cheaper updating of the software in the future.
Certainly the disadvantage of waiting for the tape to
load in is not great. It takes just under 30 seconds for the
tape to be read in, and the amount of free R.A.M. on
board to be checked. The program lies from 1200 H
through 2000 H and like the BASIC program the cold
start is at 1200 H. On start up the program announces
itself on screen and then proceeds to check the amount
of R.A.M. present in the machine. In so doing it sets all
this area to zero, thus destroying any data present.
Therefore if the Machine Code Program is to be reexecuted, after jumping back to the monitor, say, then
the warm start at 1260 H can be used. This does not
perform a R.A.M. check and consequently any data in
the free area from 2000 H upwards is safe.
Incidentally, since the Machine Language Program lies
in the same area in memory as the BASIC program, the
BASIC load command cannot be used to load this tape,
loading must be done via the monitor or an overlay error
will be detected. Once the tape is loaded we are ready to
do some machine code programming. All the commands
in this program use single character codes followed by
hexadecimal arguments as appropriate.
A printer command implemented by typing a
# character, enables anything printed on screen to be
duplicated on an external printer (not available as yet).
A second# character will disable the printer drive. Note
that trying to use this command without a printer
attached will give an error message and terminate the
command.
Typing '!' as a command will return control to the
monitor. When using this command take note of what
was said earlier if a jump back to the Machine Code
Program is to be performed.
The first command to use for actually placing your
own program in memory is the Memory Write Command or W for short. After pressing W, the program
inserts its own space and waits for a four digit hexadecimal address to start the writing operation. Any invalid
characters (non hexadecimal) typed in for the address
are not accepted and the 'bell' is sounded.
If the format of the arguments is not correct i.e. carriage return is pressed before typing the full argument,
then several bells are sounded and the command is terminated, with the message 'INVALID' being displayed.
If any of the arguments fall outside the free memory
area, some question marks are printed and the command
is again terminated.
These features, along with the auto spacing applies to
most of the commands and takes a bit of getting used to,
compared to 'dumb' executive programs on other
machines. Once the start address has been specified,
hexadecimal data may be typed in with the display showing 8 bytes to a line. The start address of each block of 8
bytes is shown at the left of the line. The command may
be terminated by pressing Carriage Return.
One annoying feature is that the Delete Key is
ignored. Thus if the wrong address is typed by mistake
the command must be terminated and re-given. This
problem does not occur with incorrectly typed data
entries. This is because the 'cursor left' key can be used
to step back up memory and make corrections. Another
useful feature of this command is that if relative jumps
are being used in a program, there is no need to work out
the offsets yourself.
When the point has been reached where the offset
must be typed, a full stop followed by the four digit
actual address may be typed instead. The program will
automatically calculate the relative offset in 2's compliment and insert it at the relevant point in the program.