INMC 80 News

  

February–April 1981 · Issue 3

Page 50 of 55

A) Drive level interface with routines for –

Rewinding a cartridge
Erasing a cartridge
Pre-marking a cartridge
Finding a sector
Reading a sector
Writing a sector

B) File level interface which sits on top of the drive level interface and offers routines for –

Creating a file
Erasing a file
Opening a file
Writing a sector of a file
Reading a sector of a file
Returning the status of a file

C) Operator level interface which sits on top of both the other levels and which offers the following commands, augmenting those of Nasbug –

  1. Drive level commands

    W3 to rewind the cartridge in drive 3 and initialise the PIO

    V5 to display the catalogue of files on the cartridge in drive 5

    P6 1234 to initialise a new cartridge in drive 6 as number 1234

  2. File level commands

    R5:Printfile to remove the file Printfile from the cartridge in drive 5

    A3:Printfile 12 to add file Printfile, 12 sectors long, to the cartridge in drive 3

    L3: Progfile to load the object code in file Progfile on the cartridge in drive 3

    D1:Progfile 400 800 to dump the contents of memory between 400H and 800H to the file Progfile on the cartridge in drive 1

So what does the tape actually look like when viewed under a magnetic microscope, how are the sectors formatted, what does the directory look like, how do I fit it all into 1K bytes? Indeed do I? I will refuse to answer here but will try to draw some morals. (Cor, what a cop-out. Come on lets have a listing of it for the library. Ed.)

* Make the hardware as simple as possible at first. Software is more flexible and once you know the interface really well it is easy to increase the load on the hardware and decrease the software.

* Separate the software functions into clearly defined layers, decide whether subroutines will save registers or not (of course they will! Ed.) and start the design at the top (what do I want it to do?) and the coding at the bottom (how will I do it?).

* When you have only 1K bytes of memory do not stick too rigidly to the strict Layering of the design.

Page 50 of 55