What is a .CLI File?

A CLI file is a 'plain text' or ASCII file that is read by Command Line Interpreter. The Z88 can then use this file to interpret a list of keystrokes to fulfil a particular function. There are other commands apart from keystrokes, but these are the ones being used here,

Types of .cli files

There are two types of .cli files

When using OZ 3.0 cli's can

Moving on to OZ 4.7 advanced functions cli's can

Writing a .cli File

Planning

Prerequisites

The typical configuration would either be a

Having Unzip as an application allows smaller files to be stored in the File Area which can be unzipped when required. The image of OZ 4.7 leaves a 32K hole before the File area begins. This hole may be used to add other applications.

Ziputils, which consists of Unzip and ZipUp together with ZetiZ is supplied to fill the hole with new flash cards. These files are not included with the upgrade version. If Unzip is not available,

  1. It may be added as a separate exercise - see RomCombiner
  2. It may be run as a RAM application - added to the .cli file
  3. the file may be unzipped on the desktop and stored on the Z88 as a RAM file. The Unzip component of this example is then omitted.

Collecting the files

These files are RAM applications

ApplicationDownload Area
All RAM Applicationshttps://sourceforge.net/projects/z88/files/Z88%20RAM%20Applications/
Ziputils.ziphttps://sourceforge.net/projects/z88/files/Z88%20RAM%20Applications/ziputils/
bounder.ziphttps://sourceforge.net/projects/z88/files/Z88%20RAM%20Applications/bounder/

Fetch the RAM applications needed. If Ziputils is required, the files need to be unzipped on the desktop before downloading them to the file area of the Z88.

Writing Loadgame.cli

Here are the steps to write a cli file to do the following:-

Check List


CheckNotes

Make the first action of the cli file
to go into the INDEX I

If at any time the cli file (which starts in the Filer) needs to be a BOOT.CLI file (which starts in the INDEX), putting this command here ensures that both start at the same place.

Use the keys to select Applications and menu commands.


Do not use cursor keys to select files or functions

unless there is no other way of using that function

















Using the Keyboard

Editing the file

Testing

(This is being written up - not complete yet)

.CLI Comments

If the line endings in CLI files are not correct, OZ gets confused.

This happens if a different editor is used other than PipeDream, the Line Feed character may be different i.e. LF (ASCII 10 / 0Ah). 

To correct this, 

This corrects the file and the comment identifier works correctly (those lines are skipped by CLI).

.CLI Examples

The following example shows a simple BOOT.CLI file with comments.

Comments

.; Here is a sample BOOT.CLI file. 
.; Anything typed after a .;
.; at the beginning of a line is a comment. 
.; You can use this to remind
.; yourself what you are trying to do, 
.; so when you look at it
.; later on, you will understand 
.; what you have done.
.; First we change the Default Device 
.; on the Panel to use
.; RAM.1 (You can't use the Z88 
.; very well using the internal
.; ram, :RAM.0)
.;

OZ 4.7

Loading and installing a Game

OZ 3.0

Change the Default RAM in the Panel

~As
.; []S Select Panel
.;
~D~D~D
.; Move down 3 lines with the Down Arrow key
.;
~C~R
.; Diamond Right Arrow to move to end of line
.;
~X
.; DELETE key to remove the 0
.;
1
.; Figure 1 put in to change to :RAM.1
.;
.; You could also turn the Keyclick On 
.; (optional) if you prefer
~U~U
.; Move the cursor UP two lines
.;
Y
.; Type 'Y' for Yes
.;
.; *** End of Option ***
~E
.; ENTER key to save the changes 
.; and leave Panel

Create Directories in the Filer

.;
~Af
.; []F into the Filer
.;
~Csv
.; Diamond SV to Change Device
.;
~C~R~X1~E
.; from :RAM.0 to :RAM.1 (like before)
.; At this point you can 
.; Add your Directories. I have
.; used a simple tree.
.; |
.; ---------------
.; | |
.; PIPEDREAM DIARY
.; |
.; |
.; |
.; ---------------------
.; | |
.; LETTERS SSHEETS
.;
.; At this point we're still 
.; in the Filer, carrying on
.;
~Ccd
.; Diamond CD (Create Directory)
.;
PIPEDREAM
.; the name of it
.;
~E
.; followed by the ENTER Key
.;
~CcdDIARY~E
.; Create DIARY Directory
.;
~Csi
.; Diamond SI (Select Directory)
.;
PIPEDREAM~E
.; the name of it and the ENTER Key
.;
~Ccd
.; Create Directory
.;
LETTERS~E
.; the name of it and the ENTER Key
.;
~Ccd
.; Create Directory
.;
SSHEETS~E
.; the name of it and the ENTER Key
.;
~Csi
.; Select Directory
.;
~Cd
.; Diamond D Delete to end of line 
.; (clear any text)
.;
~E
.; then press the ENTER Key
.;

Printer Drivers

.; LOAD your Printer Driver (Optional)
.; First you need to FETCH FROM EPROM 
.; a copy of your
.; Printer Driver File
.;
~Cef
.; Diamond EF (Fetch from EPROM)
.;
DRIVER.PDR
.; the filename
.;
~E~E
.; followed by TWO ENTER Keys
.; Now select the Printer Editor
.;
~Ae
.; Square E
.;
~Cfl
.; Diamond FL (File load)
.;
DRIVER.PDR~E
.; the filename and the ENTER Key
.;
~Cfu
.; Diamond FU (Update Driver)
.; *** END of Printer Driver Option ***

Set the Clock

.;
.; Now all that remains is to select
.;
~At
.; Square T so that you can set the Time 
.; and Date manually
.; at the end.

After a BOOT.CLI file is used

You should check and clear any files in :RAM.-. See Bug - :RAM.-.