Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

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

  • A BOOT.CLI file (with the unique name of BOOT.CLI) runs after the Z88 has a Soft or Hard Reset.  The previously written CLI program, stored on an EPROM or Flash card, is run automatically. This is a useful facility as after a HARD RESET, all settings are lost. The starting point for these files is in the INDEX.
  • Any other file with the extension of .cli is run by selecting it in the Filer F withEX, Execute. The starting point for these files is in the Filer

When using OZ 3.0 cli's can

  • set up the Default RAM Device in the Panel
  • change the Device in the Filer
  • create some Directories in the Filer
  • load the Printer Driver file
  • select the Clock - to enter the time manually.

Moving on to OZ 4.7 advanced functions cli's can

  • fetch, unzip, install RAM Applications then delete the any working files used left in RAM
  • fetch, unzip and view a file in Pipedream 

Writing a .cli File

Planning

Prerequisites

  • OZ 4.7 with Unzip *
  • At least 128K RAM
  • Flash card
  • Connection to the desktop to get files off the internet

The typical configuration would either be a

  • 512K/512K Flash/RAM card in slot 1 or
  • 1M Flash card in slot 1 and at least 128K RAM in slot 2

Unzip*

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 supplied with the upgrade version. If Unzip is not available,

  1. It may be added as a separate exercise
  2. It may be run as a RAM application
  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

Writing Loadgame.cli

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

  • Start Unzip
  • Unzip bounder.zip from the file area
  • Install bounder.app
  • erase the files used

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, 

  • Load the file in PipeDream then 
  • Save as 'Plain Text file'.

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.-. 


  • No labels