Few Useful Z88 CLI Routines

From: [e-mail address omitted]

I apologize for the lack of Z88 articles from myself over the last few years. I am not a programmer. I mostly just use Pipedream. I tend to create databases putting data in Pipedream spreadsheet cells.

However I have experimented a bit with the Z88’s Command Line Interpreter or CLI. For those of you not familiar with the Z88, the CLI is sort of like batch files in MSDOS. Every keystroke on the Z88 can be interpreted into a sequence of characters. You can program these characters into a file. But the Z88 also includes a facility to record your keystrokes. You press []+K, do the desired operation on the Z88, then press []-K. The [] is the square key. The file will be in :RAM.-. Copy this file to :RAM.1 or :RAM.0. then erase the file in :RAM.-. One of the CLI routines here does this operation.

There is a bug in versions 3.0 and earlier of OZ which will cause the Z88 to become confused if you do a soft reset with a file in :RAM.-

You may have to edit the resulting file to get it to work properly. You can do this in Pipedream then save it as plain text. I would give it a name such as ????.CLI. To execute the file in the Filer, highlight it with the marker then type <> EX. The <> is the diamond key. All the operations that you performed will be performed again. It will be faster too because there is no delay between keystrokes. It looks like some robot has taken control of the Z88. For more information on CLI files, look in “The BBCBASIC (Z80) Reference Manual for the Z88” by DJ Mounter.

Here are a few CLI files that I have come up with. Type these into Pipedream and save as plain text.

This CLI file will copy a file in :Ram.- into a file called :RAM.1s.txt. It will erase the :RAM.- file and load s.txt into Pipedream.

You can also use []+S and []-S which will save any character that appear on the screen into a :RAM.- file. This is especially useful to save your on-line session with a modem.

The e.cli in my article is by Keith Winsor.

s.cli
~A-S
|SV~R~R~R~R~R~R~X-
~E~R~E~L|CO:RAM.1/s.txt~E~E~R~E~L|ER~E
|SV~R~R~R~R~R~R~X1~E
#P|FLs.txt~E|W80~Dya~E

This cli file will erase any :RAM.- file.

e.cli
#F|ER:RAM.-/*~EN~E|[

This CLI file will set your baud rate. Substitute any baud rate that you choose.

9600.cli
~As~Un~U~U9600~U9600~E

This CLI file changes the default :RAM device. Note that you must change this in both the Filer and the Panel. This CLI does it for you. Note that it does not return you to the Filer, it is designed to be run from BASIC or Pipedream. You press [] F to go to the Filer. Execute the CLI and it returns you to your application. But now you have access to the other :RAM device. Put 0.cli in :RAM.1 and 1.cli in :RAM.0

0.cli
~Csv~R~R~R~R~R~R~X0~E~As~D~D~D~R~R~R~R~R
~R~X0~E

Finally I wanted to be able to run a program from the Filer. It was a pain in the neck to go to BASIC then type the filename in. Substitute the name of your BASIC program and put the same name in the CLI file. The following example is for zfu.bas.

zfu.cli
#BRUN ":RAM.1/zfu.bas"~E

Have fun with the Command Line Interpreter and the Z88 !