STEVE Version 3.28, July 1989 (aka The yellow book).

© Primož Jakopin 1986, 1987, 1988, 1989 - 2022. All rights reserved.

(Adapted to HTML format in July 1998, May 2021 and June 2022 by Primož Jakopin using EVA)

 

 

Contributors:

Andrej Vučkovič - additional graphics & calculator
Jure Dimec - "Animals" file
M. Gogala & B. Kryštufek - lesson on bats
Gitica Jakopin - English-German dictionary
Andrej & Maja Kranjc - Adriatic data base
Milan Orožen-Adamič - the map of Slovenia
Tihomil Šlenc - lesson on metereology
Philip J. Burt - proof reading

 

 

     A great effort has been undertaken to assure an error-free program and a correct manual yet no warranty, express or implied, can be given with respect to any of the two.
     All comments and suggestions, concerning the operation of STEVE or the contents of this manual will, of course, be very welcome.
     Possible differences between the program and the manual are described on the READ_ME file from the distribution disk.
     Updates to the program and this manual are available through your dealer.

 

This manual (including the index and the "Contents" chapter) has been produced by STEVE, using an ATARI Mega ST 4 computer and a Hewlett Packard Laserjet II printer; the ATARI SLM 804 laser printer has been used for draft printing and to print the chapter on scanning (pages 475 to 484).

 

CONTENTS

I.  ABOUT STEVE

II. GETTING STARTED

    The numeric keypad
    Block operations
    Rectangular block
    Screen up and down the file
    Searching
    Center line
    Split line, join lines & clear line
    Delete word
    Insert mode on/off
    Adjust right margin

III. MAIN MENU

    Disk operations
    Reading file from disk
    Saving file to disk
    Disk directory
    Other file formats
    ASCII file format
    PIC file format
    Degas and snap file format
    Raw file format
    Terminal-raw file format
    GEM font file format
    Bitstream fontware
    First word file format

IV. BLOCK OPERATIONS

    Delete block
    Delete complement
    Move block, copy block
    Adjust right margin
    Lower to upper, upper to lower case
    Save block to disk

V. SEARCHING IN TEXT

    Find, repeat find
    Find & replace
    1 to 1 replace
    Page & line
    Record & byte
    Free memory
    Binary search
    Find setup

VI. PRINTING

    Printer selection
    Printing the file and block
    Printer setup
    9-needle matrix printers
    24-needle matrix printers
    HP Deskjet & HP Laserjet printers
    Line spacing & end of page
    Breaking file into pages
    Undoing the page breaking
    Printing on both sides of paper

VII. PRINTER TUNING

    Proportional spacing
    Downloading
    9-pin printers
    24-pin printers
    Download does not work

VIII. VARIA

    Changing position in the file
    Varia
    Screen font selection
    Travelling through the file
    System setup
    Making setup changes permanent
    System setup, part II
    File overview
    Spell checking and translation
    Line statistics
    Calculation
    Addition
    Adding columns
    Inserting blocks
    Get any character
    Terminal

IX. FORM PROCESSING

    Abbreviations
    Designing a new form

X. SYSTEM

    Text compression
    Text decompression

XI. SYSTEM TABLES

    Blocks
    Keyboard
    Function keys
    Abbreviations
    Tabulators
    Screen characters
    Additional screen characters
    Desktop publishing tables
    Page headers and footers
    Printer tables
    Printer line spacing
    Lower and upper case table
    Letters and special characters
    Special characters/spell-checker
    Display entry layouts
    Data dictionary, mailing list
    Sort collating sequence
    Picture library
    Fill patterns
    Screen forms
    Lesson commands
    Alarm clock
    Message file
    System variables
    Start sequence
    Other system tables
    Saving the steve.rsf file

XII. HELP

XIII. END

    Stand by mode
    Removing the file
    Reloading the STEVE.RSF file

XIV. DATA BASE

    Mailing list made simple
    More on display data entry
    Record formatting
    Cards

XV. SORTING & SEARCHING

    Verify
    Data base overview
    Field selection
    Sorting
    Searching
    Data base setup

XVI. DATA PROCESSING

    Permute and simplify
    Compound field
    Frequencies
    Sequence numbers
    Rank
    Lengths
    Number of parts
    Add field
    Fold first two fields
    Turn around
    Breaking file into words
    Index
    Columns
    Anagrams
    Simplify field
    From fixed format to free
    Data replacement
    Data verification
    Field to upper and lower case
    Repeated data
    Random numbers
    Chapters
    Concordances
    Compute field

XVII. CHAINED DATA BASE

    Overview
    Verify
    Chained binary search
    On the spot mappings
    Copy and move
    Field selection
    Chained sorting
    Chained searching
    Union
        Record merging
        Field merging
        Record cross-section
        Record complement

XVIII. BATCH MODE

    Sorting
    Searching
    Record formatting
    Breaking file into pages
    Substitution
    Setup value definitions
    Branching - if statement
    Batch procedures
    End of batch
    Input from keyboard
    Conclusion

XIX. GRAPHICS

    Main menu
    Exit
    Rectangular transformations
    General remarks
    Description of transformations
    Data base to graphics connection
    Measuring distances
    Scale
    Shapes
    Pen
    Line
    Box
    Polygon
    Circle
    Arc
    Fine movement of picture parts
    DTP character set handling
    Diminished character set
    Copying characters home
    Compute character size
    Various graphic commands
    Fill
    Black painting
    White painting
    Graphic setup
    Picture library
    Picture from block
    Immediate graphic commands
    Text in graphics

XX. ADDITIONAL GRAPHICS

XXI. PICTURE SCANNING

    Handy scanners
    200 dot/inch page scanners
    Professional page scanners
    Video-camera

XXII. DESKTOP PUBLISHING

    Page layout setup
    Page preview
    Right margin justification
    Block centering
    Right margin of indented text
    Font variations
    Block moving
    Main menu entries
    Exit
    Block commands
    Line commands
    Scale
    Page commands
    Various
    Immediate DTP commands
    Function key modification
    Breaking file into pages
    Comment lines & index
    Printing in DTP mode
    Atari SLM 804
    Hewlett Packard Laserjet
    Matrix printers

XXIII. COMPUTER AIDED INSTRUCTION

    Lesson layout
    Lesson commands
    Get screen
    Replace screen
    Replace screen slowly
    Show screen over
    Show screen over slowly
    Clear screen
    Clear screen slowly
    Wait
    Wait until any key
    Get text answer at
    Save position screen
    Get position answer
    Do not know & end of do not know
    On answer go to
    Gosub
    Running the lesson
    Command test
    Saving the lesson
    Conclusion

XXIV. MACHINE CODE to GFA BASIC

XXV. IMMEDIATE COMMANDS

    The MAIN and the MIDDLE KEYPAD
    The NUMERIC KEYPAD
    FUNCTION KEYS
    The MOUSE
    CONTROL KEY COMMANDS
    IMMEDIATE DATA BASE COMMANDS

XXVI. COMMAND CODES

    Disk related commands
    Miscellaneous
    Line-to-line block commands
    Find group commands
    Miscellaneous
    Data base commands
    Miscellaneous
    Get system table routines I
    Put system table routines I
    Get system table routines II
    Miscellaneous
    Miscellaneous
    Chained data base commands
    Get & put system table routines III
    Graphic rectangular block routines
    Miscellaneous graphic routines
    Graphic scaling routines
    Further graphic routines
    Page preview commands
    More graphic routines

XXVII. SYSTEM VARIABLES

    Variable locations

XXVIII. WHAT NEXT

XXIX. SOURCES and LITERATURE

XXX. INDEX

ABOUT STEVE

STeve - ST EVent Editor - is a general-purpose software tool that can handle text, pictures, data records, full pages (in DTP mode) and computer-aided-instruction units. It has been designed to get the most out of the ATARI ST range of computers - to be as fast as possible, to save as much space as is feasible and last, but not least, to be easy on the eyes. Processing of Mega-byte files, containing hundreds of pages with text and graphics, makes sense with STEVE. The program comes from Slovenia, a small country at the north-west of Yugoslavia, situated between the Adriatic Sea, the Alps, Pannonian Plain and the Balkan Peninsula.

Besides lines with text, STEVE also handles graphic lines, where pictures are stored in a point-by-point fashion. A graphic line is 18 points (pixels) high, and up to 14400 points long. Text lines (usually white on black) and graphic ones (black on white) can be mixed at will. A set of adjacent graphic lines forms a picture. There are two raster-oriented graphic editors - the virtual one which handles pictures up to 16380 x 14400 pixels (tall by wide) and the additional one (invoked from the virtual editor), which is closer to standard paint-type programs and operates on one-screen-sized picture parts (396 x 640 pixels).

The data base is information retrieval oriented with complete Boolean search, variable length records (up to 15 K), variable length fields (up to 500), simple and composite data items. There are sort, data entry, mailing list and a range of other unusual, but useful data base operators - the data base size is limited only by the hard disk size, as it can stretch over several disk partitions (25 Mb data base has actually been sorted).

Computer-aided-instruction units are made of screen-by-screen organized text and pictures, combined with questions that test the knowledge acquired by the user so far. It is possible to answer by typing and by a mouse click, there is a branching capability ("on answer go to") and there are subroutines to make a lesson-file shorter. Scanner interfaces enable a quick input of pictures and their compression allows storage of two typical, 30-question lessons on one flexible disk.

A 12-digit calculator, operated in text, is also included, as well as commands that sum up columns and compute numerical expressions from the data fields.

A usual range of output devices is supported: 9-pin and 24-pin matrix printers, daisywheel as well as ATARI laser and Hewlett-Packard Laserjet Plus-compatible printers. It is possible to attach four different image scanners to STEVE - with resolutions from 100 to 400 dpi. For data transmission a simple VT52 terminal emulator is built-in which can also send and receive files, including pictures. Two file-compression features are also offered: pictures are normally stored compressed (saving depends on amount of picture detail) and the selectable text compression saves from 25% to 49% of user space, in memory and on disk.

A file of information in STEVE can be illustrated by a sheet of paper, typically 64 characters wide and as long as necessary. On an ATARI 1040 ST the file can be approximately 500 Kb long; various accessories, different character fonts, abbreviations and the spell checking dictionary can reduce it; a trimmed-down STEVE.RSF file will expand the space for the user file.

The computer screen is a window through which part of a file, 22 lines high by 40-160 characters wide, can be observed and modified. This window can be moved up and down the file and, when the lines are longer (up to 1800 characters), to the left or right.

STEVE comes in three differently priced versions - STEVE, STEVE Professional and the STEVE OCR. STEVE Professional is a superset of STEVE and has been expanded by the following features:

 1. Laser printer interfaces
 2. Chained data base commands
 3. Batch processing

Besides the above capabilities STEVE OCR also includes the Optical Character Recognition. The differences are highlighted in the respective chapters of this manual.

II. GETTING STARTED

After the editor has been invoked (double click the STEVE.PRG icon), a title screen appears piecemeal (STEVE.PIC file) and, after the STEVE resource file (STEVE.RSF) is also loaded from disk, the following prompt should be answered (on ST computers without a hardware clock):

The correct data should be typed in as shown, pressing the <Return> key at the end. It may occur that the figures typed are not acceptable to the program (30.2., for instance); in such cases the bell rings and more suitable values should be input. Please note that the letters l and o and the digits 1 and 0 do not mean the same thing to the machine. An error discovered before the <Return> key has been pressed can be corrected using the <Backspace> key.

Next comes a new prompt, something like:

We've got the disk menu (explained later on) - the program would like to know whether a new file is to be made or an old one called from disk for editing. The computer's instant memory has a drawback in that it forgets, when the power is turned off, everything stored there. All files should therefore be saved on disk for permanent storage. On diskette, files are safe, in normal conditions, for several years.

Normal conditions assume a temperature range from 10 to 50 degrees Centigrade, storage away from sources of magnetism (many household appliances, like TV sets, use them), in a dry place and away from direct sunlight. Serious users also store all files in two copies (not on the same diskette), the most important ones in three. And after a year or two? The files should be copied onto new diskettes.

Let us try to make a new file first. Several words on screen are written in a frame and one of them, "EXIT", should be selected with the mouse:

How do we do this? The mouse, a small plastic box that can easily be moved here and there on the desk (it needs some space, preferably a legal-sized sheet of hard white paper), should be taken in the palm of one's right hand, so that the index finger rests on the left mouse button (L) and the middle finger rests on the right button (R). As you move the mouse a small white rectangle, the cursor, moves on screen. After it has been driven to the box marked "EXIT", the box changes colour, from black to white:

Pressing the left (L) mouse button confirms the selection. Pressure may be gentle, just that a "click" is heard, and it is not necessary to hold the button down for a long time. Now an empty screen:

awaits our new text. The cursor is positioned in the top left-hand corner of the screen, just below the upper "rope". The two ropes, the upper one and the lower one, delimit our worksheet and, as will be explained shortly, help to move the screen up or down the file. STEVE, unlike other editors, does not have the main menu (list of selections) permanently on screen as even the full screen is not particularly big; how to get it is explained in the next chapter ("Main menu").

Let us now key in some statements, like:

Errors have been made intentionally, to be corrected in an exercise, and should therefore all be typed as they are. While typing it is not necessary to watch the line endings; the program itself will move words too long to fit in at the end into a new line ("word wrapping"). Several keys help to restore the passage back to order:

The keyboard consists of four parts - the main keypad, the keyblock with arrows, the numeric keypad and the function keys. It resembles a typewriter keyboard with several additional keys. These and the mouse come into play when the text has to be corrected. Let us now examine the original, error-free version of our text:

There are three errors in the first line already. The first is "otfen" instead of "often". We move the mouse to get the cursor on "t":

and type "ft" to put it right. Now let us move on to the superfluous "n" in "thann":

Now press the right mouse button (R) to delete the unwanted character. Longer pressing of this button will delete more characters. The left mouse button (L) will do just the opposite - it inserts space.
     The way we rectify "diffixult" into "difficult" is very similar : push the cursor to "x" and type "c" over it. As demonstrated, any part of the text can be simply overwritten.
     All the errors mentioned so far could, of course, be corrected without the mouse. The arrow keys from the arrow keyblock would move the cursor (if up or down arrow has been held too long, use the left <Shift> key to stop), and the <Insert> key would insert spaces:

The <Delete> key (to the left of <Insert>) could be used to delete characters. Such a procedure, though slower and less convenient, is standard on mainframe terminals and PCs without mice.
     The mouse can also be used to insert and delete entire lines. Suppose that, while typing the old verse:

our thoughts strayed through the window for a moment, to the green of the trees, and produced a screen like:

There are three lines too many and one line is missing. Let us try to correct this. We move the cursor until it is located a bit beyond the end of an unwanted line (at least three spaces, as below):

and press the right mouse button to delete the line. In the case of full-screen wide lines it is enough to move to the line end; blank lines are removed at any cursor position. The insertion of a new line is performed in a similar way - the left mouse button is pressed when the cursor is at least three spaces beyond the end of the line, except when at the end of a long line or in an empty line.

Another way to delete or insert lines are the <Ctrl>d (<Control> key held down, <d> key typed) and <Ctrl>i commands.

What should one do if a line or two too many is deleted by accident? There is no need to despair - press the <Undo> key in the top line of the arrow keyblock:

as many times as there are lines to be returned. Deleted lines are kept until brought back by <Undo> or until some procedure from the main menu (described later) has been successfully selected.

The <Undo> key can also be used to restore a line which has been edited badly - too many deleted characters or some other excessive damage. It will be returned to its previous condition provided the cursor has not been moved to another line since the damage was done.

Suppose, for example, that we have accidentally modified the line:

into:

and that we have not moved the cursor away from this line. In such a case the <Undo> key will restores the line to its original condition.

Let us see once again what we have learnt to do with the mouse buttons:

(L) - the left button inserts one space, in the middle of text, and, if at the end of a line or in an empty line, it inserts a blank line. (D) - the right button deletes the character on which the cursor is resting; at the end of a line, or in an empty line, it deletes the entire line.

The mouse can also move the screen across the file. Whenever the cursor hits the top or the bottom rope:

the mouse buttons get a new meaning. The left button moves the screen up or down the file line by line, while the right button does it screen by screen. The direction of movement depends on the position of the cursor - from the top rope the screen is moved up (backwards), and from the bottom rope it is moved down (forwards).

 

THE NUMERIC KEYPAD

The keypad on the right hand side of the keyboard has a special role within STEVE's text editor:

The numeric keypad is used to carry out the most frequently used commands, like "Top of file", "Find", "Insert mode on/off". However, it may, if required, also be used for entering numbers. Included with STEVE and its manual is a small, self-adhesive transparent sheet, divided into 18 labels; there is one for every key-top. The labels:

should be cut out along the inside edge of the surrounding black lines, and pressed into place:

 

BLOCK OPERATIONS

The first two keys, "Begin Block" and "End Block", are used to delimit block start and block end. A block is a sequence of adjacent lines containing text, graphics, data records or any combination of the latter. Blocks can vary in length from one line to entire file length.

Blocks were not, of course, invented for fun. Part of a file is transformed into a block so that it can later be moved, copied, deleted and the like. Let us have a look at this example:

The list of months is nearly correct, just the summer months need to be moved past the spring ones. To put the summer months into a block we first push the cursor to July, then press the "Beg Blk" key (to mark the block start), draw the cursor to September and press the "End Blk" key. Whenever the "Beg Blk" or "End Blk" key is pressed, the corresponding line changes colour and a bell rings. The screen, after our block has been set, would look like this:

All that remains to be done is to move the block (lines "July", "August" and "September") up to the "October" line. We move the cursor to the word "October", and press:

The block has now been moved to the line directly behind the cursor line:

As you have probably noticed, it is of no importance where in the line the cursor rests, when the block start/end is set or a block is moved.

The command "Copy block" is not much different - the block is copied to a new position but it also remains where it was before. We shall use it to complete a verse of the poem "The Owl and the Pussy Cat" (by Edward Lear) with greater ease:

The last line of this verse is the same as the second line, and can therefore be copied. After we have typed all of the above, we move the cursor to "They danced" and press the "Beg Blk" key, followed by the "End Blk" key on the same line, since our block is only one line long. The line changes colour twice - from black to white ("Beg Blk") and, after pressing "End Blk", from white to black again. The block is now ready; we move the cursor below the last line (as shown) and press the:

key. The program will now copy the block, which contains just one line, placing the copy just in front of the current line. After the command has been executed, our verse is nearly complete:

One mouse move positions the cursor over the last comma, the full stop key is pressed and our work is done. Block movement and copying is fast - several hundred pages are moved in seconds.

 

RECTANGULAR BLOCK

Another form of block is also known to STEVE, the so-called rectangular block, which spans across a rectangle of text. To define it we hold down the <Shift> key, while pressing the "Beg Blk" or "End Blk", respectively. As the block beginning its left upper corner must be shown, and its right lower corner as the end. Let us now try to make two columns out of our month list by hand: we move cursor to "J" in July and apply the "Beg Blk" command together with <Shift> key:

The left upper corner of the rectangle has thus been set. The cursor should now be placed at the end of December - one place after it, in fact, to include the whole of September in our block:

<Shift> key and "End Blk" command now produce the following picture:

Through definition of its right lower corner the rectangular block has now been set and its area is shown on screen by inverse colour. To make two columns we now drive the cursor to the required position in the first line:

followed by <Shift>"Mov Blk", which completes the task:

The important difference between the usual, "Line-to-line" blocks and the rectangular block is that the latter's commands do not modify the number of lines in the file. So, for instance, moving such a block to a destination already occupied by some text results in overwriting. For obvious reasons graphic lines may also not be included in such block.

The size of a rectangular block is not particularly limited - it must fit into the remaining free RAM.

Rectangular blocks are a powerful tool, used to undo columns, adjust indented portions of text and perform many other tasks. Their investigation by the user will quickly be rewarded.

 

SCREEN UP AND DOWN THE FILE

The "Where" ("Whr") command requires some additional knowledge and will therefore be explained later (see "Break file into pages"). Instead, let us have a look at two simpler, but useful commands:

"Pg Up" stands for page up and "Pg Dn" for page down or, to be more precise, screen up and screen down. The first command changes our current position in the file by 22 lines (i.e. one screen) backwards, and the second one moves us one screen forwards. The same effect can be achieved faster with the mouse - for "Pg Up" we move to the top screen rope and press the right button; for "Pg Dn" the same button should be pressed when the cursor is hidden in the bottom screen rope.

The "Pg Up" command has no effect at the start of a file - there is no space to move upwards into, and the bell just rings to let the user know this. "Pg Dn" has a different effect at the file end - STEVE will continue to open screenfuls of blank lines beyond the file end for as long as is required, or for as long as there is memory available.

It is now the turn of two very frequently used commands: "Top Fle" and "End Fle". The first abbreviation stands for "Top of file", and the second for "End of file".

"Top Fle" moves the screen to the beginning of the file (i.e. to its top left-hand corner) and "End Fle" moves it to the bottom left-hand corner of the file. The latter command also checks if there are any blank lines at the end of the file; if found, they are discarded. How to move quickly to any file position (including start and end) with the mouse will be explained a bit later (see "Up and down the file").

 

SEARCHING

The command "Fnd" ("Find") comes next. It will try to find a given string within the file:

After we have pressed the key, a short prompt appears on screen:

STEVE wants to know what to search for. From the explanation frame we also learn that the string should get a <Return> at the end, that the left mouse button starts the search for the string last used with "Fnd", and that the right mouse button should be used to abort - in case we have changed our mind. The last line also tells us that pressing the left mouse button continues the search after a successful find.

Suppose we had the following honey-biscuit recipe:

with the cursor set at the beginning. Let us find the word "honey" in it:

Having typed in the word "honey", we now press <Return>. The screen is modified to:

The cursor has moved to the first occurrence of "honey", flashed three times at that position, and stopped. Let us try to see if the word "honey" occurs anywhere else in the text. As long as we have not moved the cursor from "h", pressing the left mouse button will do the task. If it has been moved than we select the "repeat find" key:

The cursor jumps to the next occurrence of the word "honey", in the second half of the third line:

Two more "Rep Fnd" commands give us the remaining two words "honey". The next "Rep Fnd" command will tell us:

i.e. that there is no other occurrence of the chosen word. This message stays on screen until the mouse is moved, or until some key is pressed.

The program normally searches from the current position to the end of the file. If we are already at the file end, then the "Rep Fnd" command will not find the desired word even though it may be just above the cursor (the "Top Fle" command returns the editor to file start).

In normal circumstances (standard text, uncompressed) the program will search through 100 K (approx. 50 printed pages, at a line spacing of 1.5) in one second. When space is more important than speed, and we decide to keep our text in the compressed mode, discussed later, it takes 5 seconds to search through 100 K. There is also another, much faster way to search (binary search), which albeit searches only at line start and requires a sorted file.

 

CENTER LINE

Sometimes, especially with titles, it is necessary to move the text to the middle of the line. The STEVE command:

"Center line" serves this purpose. The title to be centered should be typed at the left-hand edge of the screen, as follows:

and centered with "Cen Ln" command. The cursor remains where it is, but the text moves to the middle of the line, which is usually (as in this case) in the middle of the screen:

When line length differs from screen length (it can be set through the "System setup" selection from the "Various" menu), the "Center line" command keeps to the new line length.

 

SPLIT LINE, JOIN LINES AND CLEAR LINE

The next two commands, in close proximity, are "Split line" and "Join lines". The first command splits the current line into two parts, at the cursor position, while the second command joins the current line and the line following it into one line.

Let us show how they work on a short passage by John Ashbery:

The first line is too long and should be split into two, between the third and fourth word. Using the mouse we move to the second "R":

and press the "Spl Ln" key. The line breaks into two parts at the cursor:

and the cursor jumps to the start of the second line. The other part of the verse is in three lines instead of two. We move the cursor to any position in the first line:

and select the "Jn Ln" command. The first two lines will now be joined together, and the passage is now as it should be:

The command "Join lines" fails if, together, the two lines exceed 1800 characters. In this case the program displays a brief message:

and waits till the mouse is moved or any key is pressed. Both lines remain unchanged.

The next command, "Clr Ln", standing for "Clear Line", erases all the characters from the cursor to the end of the line (they turn into spaces):

We shall use this command to shorten the line:

The second statement is unnecessary. We move the cursor to its start:

and press the "Clr Ln" key to remove all characters to the right:

 

DELETE WORD

Next comes the "Delete word" command, or "Del Wrd" for short:

It removes one word from the line, or all the spaces from the cursor to the next word. Let us have a look at the statement:

One word is superfluous - the word before "head". How can we delete it? The first thing to do is to move the cursor to the start of the superfluous word:

The "Del Wrd" key now removes it:

The second task this command is capable of, as already mentioned, is to delete a sequence of empty spaces. We may, for instance, have centered the line by mistake. We first move the cursor to line start:

and then select the "Del Wrd" command once again. The sentence shifts itself to the beginning of the line:

 

INSERT MODE ON/OFF

It often happens that one or more words are missing in the middle of a text; all newly typed characters should therefore not overwrite the existing ones (which normally happens), but be inserted in front of them. With STEVE this is accomplished by means of the "Insert mode on/off" command, i.e. using the "Ins Md" key. When this key is pressed for the first time, the bell rings, and from now on all typed characters are inserted behind the cursor. After "Ins Md" has been pressed a second time, the insert mode is turned off, and any new text is again written over the previous text. We shall now make use of this command:

to correct the sentence:

Two words are missing: "cats" and "night". We press the "Ins Md" key, move the cursor to "and", type "cats ", move to "long", key in "night ", press once more the "Ins Md" key (end of insertion), and the job is finished:

 

ADJUST RIGHT MARGIN

The last command from the numeric keypad is the

"Adjust right margin". It will adjust the right margin of the text, from the current line to the end of the paragraph. Let us type the following recipe for the preparation of the freshwater king, the carp:

It is immediately evident that the lines are of different lengths. While typing, the editor has been ending them on whole words ("word wrapping") as we have not bothered to look at the screen. The paragraph would, however, be much more acceptable if the right number of additional spaces had been inserted between the words to make the length of all the lines equal. To do this, we move the cursor into the first line, no matter where, and press the "Adj Mrg" key:

We see a bit of snow in the third line, and the word "earthenware" at the top of the screen, with the cursor on "w". The program would like to divide the word, but is not sure if the position is correct. Not all the secrets of the English language are his, and the decision is therefore up to us. Hyphenating as follows: "earthenw-are" is not O.K. and so using the mouse, we move the cursor one place to the left, to "n":

We have decided to hyphenate as follows: "earthen-ware". To confirm this decision we press the left mouse button; should we not want to divide the word at all, we move the cursor to line start (i.e. to the left of the first "e") and press the left mouse button.

The program continues to adjust the lines. If the part of the word remaining in the line is longer than four letters, the whole word will be displayed on the screen to get our help. In the case of our recipe, "earthenware" was the only questionable word, so the result is quickly obtained:

All the lines have now been adjusted on the right, too - the editor has increased the word spacing from right to left as far as is necessary. The word "earthenware" has been divided as requested - the separator is a special character, resembling an equals sign on the screen, but printed as a hyphen (on the keyboard it is accessed through <Alternate>-).

When there is not much time, and dialogue with the program is not desired, it is enough to press the right mouse button. Words at line-endings will not be divided any more but will be ported to a new line. After the paragraph has been adjusted, the program moves to the first line below it and stops there. To adjust the right margin of a new paragraph, the "Adj Mrg" command should be used again.

As far as STEVE is concerned, paragraph are all the lines from the current line to the line starting with a space or some special, reserved character.

It may also happen that we have groups of connected words in the text where additional spaces, resulting from right margin justification, are unwanted. The statement:

would, if adjusted as previously described, turn into:

As "Škocjanske jame" is one semantic unit, the additional space must be avoided. So we modify the first line to:

The ordinary space between the two words "Skocjanske" and "jame" has been replaced by a special hyphen, a hard space. It is typed as <Alternate><Space> - the <Alternate> key is held down and <Space> is pressed. It differs from space only on the screen - when printed, they are the same.

This time "Adj Mrg" does the job as expected:

Sometimes it is necessary to adjust the right margin of a longer text which consists of many pages with a lot of paragraphs. How to do it in one go is described later, in the "Block" menu, selection "Adjust right margin".

It is also possible to adjust the right margin of a rectangular block, anywhere in the file, if the block type is permanently set to "rectangular"; it is done through "Various", "Additional setup".

Another command, somewhat related, brings a set of lines in disarray back to shape, where the right margin is not adjusted. It is selected through <Alternate><Adj Mrg> and would modify the lines:

describing a slightly more acceptable version of Vegemite, into:

This command could also be described as: adjust right margin of a paragraph and unadjust it.

Now the time has come for us to explore other features of the editor; most of them are accessible through the

III. MAIN MENU

The main menu is a list of selections displayed as required at the top of screen:

Unlike other editors STEVE does not have the main menu line on screen at all times - the screen area, even in its full size, has still been considered relatively small, and so such permanent information too distracting. The main menu can be accessed in three different ways. And how do we get rid of it? Move the cursor to any screen position outside the menus and press any of the two mouse buttons.

To access it, type the <Help> key or, more easily, move the cursor to the upper right-hand corner of the screen. The third way to do it is to move the mouse to any position along the upper rope and move the cursor here and there a bit - the fourth change of direction gets the menu.

Any word or special character in the menu selects a procedure if we move the cursor to it ("Drop-down" selection in the "Additional setup" of the "Various" menu; the default setting) or if we additionally press the left mouse button ("Click" setting in the same setup).

As submenus of the main menu are relatively large (especially the data-base related ones) it is not practical to travel from one main menu side to another horizontally. It takes some time for all of them to open up and close. It is therefore recommended to perform such move in an arc-like fashion, as shown below:

The main menu is also densely populated and the number and distribution of the submenus may not be the best match for all needs and wishes. It is, however, a fairly uncomplicated and straightforward procedure to modify or adapt STEVE menus. The task can be undertaken within the editor, as practically all its resources are open to the user, and all the procedures can be combined in menus at will (see "Message file").

First of all comes the input/output:

It provides two disk menu selections, a selection which caters for the image input and a Computer-Aided-Instruction (CAI) entry.

DISK OPERATIONS

give an overview of the current disk situation, whether a floppy or a hard disk is being used, and opens up a further menu of available disk operations. A disk is, as you probably already know, a permanent storage medium. Any text that has been typed or edited will vanish from the machine after the power is turned off, and must therefore be written onto a diskette on time, where, under normal circumstances, it will be safe, as already mentioned, for up to several years.

So we have selected "Disk" from the main menu, having pressed the left mouse button on it. Suppose this screen appeared:

The amount of space available, on disk and in memory, is displayed first. On the diskette (labeled A:) there is 711 kilobytes of total space - 338 are already used up and 373 are still free. Approximately two kilobytes are needed for one legal size page of printed text (at 1.5 line spacing). The memory has some smaller capacity, 604 Kilobytes; 177 are already occupied by our current file (list.stv) and 427 more are available; the menu has obviously been made on a 1 Mb computer.

On the lower part of the screen the disk contents are described - every file is shown: its name, extension (if any), length in kilobytes and, finally, its creation date. Several files have most probably been written with the STEVE editor, and therefore have the "STV" extension. The oldest file on the disk is ATARI.STV, dated October 18, 1987, while "MILAN.TXT" is the most recent one, created a year later. The longest file is "LETTERS", which is approximately 90.000 characters long, while SLOVENIA.STV and PREFACE.STV are only 2.000 bytes, or about one printed page long. The length of a file is limited only by the memory available - longer files than will fit onto the disk can be written ("Save block to disk" from the "Block" menu) and read in parts. A list of files can also be linked together for some chained operation, if the set of data records, say on a hard disk, is bigger than the memory on hand (see "Data base").

Files are ABC-sorted according to their names, which is the default setting. There are two other possible sort criteria, found in the additional system setup:

We also note that the file we are currently editing has the name "list.stv" and that the disk we have just looked at is the diskette in disk unit A. The framed down arrow below the "DIRECTORY" box is used to move out of the current folder, if necessary (folders are groups of files - see the grey ATARI ST Handbook).

Two lines below the file name we also find a list of disk units, from A to F; any of them can be selected by a mouse click. Suppose we have a hard disk installed, and C is one of its partitions. The cursor gets moved to "C" and the left mouse button clicked:

After a little while, its length depends on the selected hard disk partition size (in our case approximately 10 seconds) we get the main directory of disk C:

Almost all the names in the first column are folder names, as indicated by an upper arrow at the point where the file length usually comes. Folder names always come first in the directory, followed by file names. In our example there are two: program.asm and query.1. If the disk drive that has been selected does not exist or if a diskette is not present in the floppy disk unit, the

prompt is to be answered. And how do we get into the folder? Suppose it is the files from the "letters" folder that we want to inspect: we just move cursor to the required name (it is activated and changes colour):

and click. The directory of the "letters" folder now opens up:

We return to the main disk directory or to the lower folder by clicking the down arrow:

Three disk procedures stand, neatly framed, in the middle of the screen. The first one: "READ FILE from DISK to MEMORY" will add a selected file from the disk to the file that is already in the memory. The second command, "SAVE FILE from MEMORY to DISK" transfers the current file from memory to disk; it will be written in STEVE format (other formats are accessible through the extended disk menu - see the extended main menu). "DELETE FILE from DISK", the third choice, removes any file which is no longer necessary from the disk. How to recover it (with some additional work), and how to get back pieces of a file in case of eventual disk damage is described in the "Immediate commands" chapter at the end of the manual (<Ctrl>q1 and <Ctrl>q2).

There is also the "More?" command frame. It is used when we want to get the directory of a new diskette that has just been inserted (the cursor should be moved to "More?" and the left mouse button pressed), or whenever there are more than 26 files on the disk. In the latter case, the first 26 are displayed first, the next 26 after the "More?" command, and so on to the end. After the file list has been exhausted, the command gives us the first 26 files from the disk again.

READING FILE FROM DISK

Suppose "ATARI.STV" is the file we wish to call from disk to memory. We move the cursor to:

and press the left mouse button. The frame has now stayed in the inverse colour, and we move the cursor to the name of the file that is to be read. We select it, again with the left mouse button:

After the file has been successfully loaded, the editor moves to its start. If there was already something in memory, the new file, as already mentioned, gets added to the old text. If only the new file is wanted, it is necessary to clear the memory first. The easiest way to do this is "Start a new session" from the "Exit" menu.

Suppose that, by accident, you have now removed the diskette and tried to perform a "READ FILE". The "Disk drive does not respond" message is displayed and the machine waits. The diskette should now be inserted and the "RETRY" frame clicked on.

SAVING FILE TO DISK

Let us now try to save a file to disk. We move the cursor to "SAVE FILE":

After the left mouse button has been pressed we get an additional prompt - the system would like to know the file name:

The suggested name is the current file name. If agreed we press the left mouse button: the right mouse button will abort the "SAVE FILE" procedure, and the editor will return to the file. If we want a different file name, we type it, followed by a <Return>. Say we want to call it "state.87":

The file name must, of course, conform to the usual conditions - the name itself must not exceed 8 characters and the optional extension, typed after the full stop, must not be more than 3 characters long. After the <Return> key has been pressed the file is saved, provided there is enough space on the disk. If not, we get the

message. We take a new, formatted disk or delete something from the old diskette until there is enough room to save the file.

In case of trouble - no disk has been inserted, the diskette is write protected (the little switch in its left-hand lower corner) we insert the diskette, or move the switch up. As with failed "READ", we continue with a click on the "RETRY" frame.

Timing considerations: a standard flexible disk unit, part of the ATARI ST computer, will read a 600 Kb STEVE file in up to several minutes (worst case), whereas an SH 205 hard disk will read such a file in approximately seven seconds and a Megafile unit will take even less.

DISK DIRECTORY

can also be appended to the current STEVE file. This feature, most useful for keeping track of what is stored on flexible disks, is called through

It adds a small data base to the file end, where every record, in the STEVE data base format, corresponds to a file on disk. It scans all the folders of the current disk unit, and the fields of the record are as follows:

Such a file of records can then be further processed by the relevant data base commands like sorting, searching, formatted output etc.. The command asks for a disk name in the case of unit A: or B:, while a hyphen (-) is used as a name in the case of hard disk units.

Suppose we have a flexible disk, labelled "test_1" and we would like to see its directory in our file. After selecting "DIRECTORY" in the disk menu, there is a name to be input:

The disk menu reappears and, as we have no other diskette currently in mind, we select:

and the directory is now here, as promised:

The first two files are folders (file type = F, no length), followed by three files: LASERSTV.PRT, PLAN.8 and BODY.STV. LASERSTV.PRT is 222528 bytes long, was created on March 4, 1988 at 9.39, resides on diskette "test_1", while this directory was made on January 4, 1989, at 11.40. Folder "AUTO" contains just one file, the AHDI.PRG and the folder "NEW" has 9 files, from BIBLIO5.GER to STEVE.RSF.

Caution:

the command may not work properly with some TOS/third-source hard disk combinations.

OTHER FILE FORMATS

The disk menu, as described so far, will read or write files in STEVE's own file format. To enable communication with other software and/or computers, some other file formats are supported as well. They are all accessible through the

It presents a larger list of selections. For instance:

As explained by the simple disk menu, folders are marked by an up arrow instead of the file length, while the down arrow in the second line (after "427") is used to move down from the disk folder to the main directory, or to the lower folder. There are three folders here, "CHSETS", "DEMO" and "ORIGINAL"; to see, for instance, what files are for demonstration only, it is enough to move cursor to "DEMO" and click there.

Perhaps even more interesting is the middle part of the screen, where various file modes are offered for reading and, most of them, for writing:

First, the usual way, is to read and write files from/to disk in the format used by STEVE; it is all we need if there is no need to transfer the files to other programs.

ASCII FILE FORMAT

Sometimes this format is required - suppose, for instance, that we have written a program in C or FORTRAN, and would like to pass it over to a compiler. Such a program would not understand the file, as it is stored by STEVE, where every line is preceded by a two byte pointer. For compiler processing the file has to be written in an "ASCII" (American Standard Code for Information Interchange") format, where every line is terminated by a <CR><LF> character pair ("Carriage Return", "Line feed", codes 13 and 10). To save the file in such a format the cursor has to be moved to the right frame (WRITE ASCII):

and the left mouse button pressed. In a similar way ASCII files can be read, yet with a bit more freedom. STEVE will recognize an ASCII file and accept it correctly even if it has been read as a STEVE file, either in extended or in simple disk menu. The essential difference between the STEVE and ASCII formats are pictures - they are part of the STEVE file and can be read and written as such, alone or intermixed with text. The ASCII format, on the other hand, does not allow for pictures or some special characters - when a STEVE file is saved as ASCII, all pictures are discarded and so are the special null-characters (code 0).

PIC FILE FORMAT

The third mode, "PIC", is used to read pictures composed and saved in the LOGO language or in ST BASIC, from which they should be saved through a sequence of statements like:

Here the "vadd" variable ("video RAM address") has been used; with the "defdbl" keyword we declared it as real.

Saving a picture from GFA BASIC requires even less writing:

Let us illustrate the whole thing with a short program in ST BASIC (by the author); it draws a picture of an eye, using some simple geometry:

In line 20, the picture drawn by the program has been saved to disk, and the program terminated ("end"). We exit from BASIC, load STEVE, and after reading the picture through:

we obtain in the file, on the screen last used (to avoid overwriting something valuable it is recommended to have it blank) a picture like the one below:

(By the way - the program is executed in a more interesting way, if the word "return" in line 30 is substituted by "goto image").

We also notice that the picture is slightly cut off. Pictures as accepted by STEVE may be up to a full 640 pixels wide, but cannot be higher than 18 x 22, that is 396 dots. So a 400 x 640 gets truncated by two pixels on top and by two at the bottom. And how do we get rid of the BASIC's window border, how do we make the picture perfect? This is most easily done by STEVE's graphic editor - see "Graphics".

It is also necessary to make room for a picture. If there is some text on the screen when we decide to read a picture from a diskette, the text will be overwritten. The remedy is simple - at the place in the file where a picture should come we insert a full screen of empty lines (22) - with the mouse or through the repeated <Ctrl>i command. And how do we delete an unwanted picture line? The same way as with text - the <Ctrl>d immediate command does it.

DEGAS AND SNAP FILE FORMAT

The next entry in the line, "DEGAS", is used to read or write monochrome pictures in a format required by the graphic editor (extension PI3), named after the famous impressionist. Pictures composed by some drawing program, like EASYDRAW or GEMDRAW, or some other useful tool, like the VIP, are brought to STEVE by means of the "Snapshot" desktop accessory (by Tools & Software, 1986). It grabs any selected screen part from a program with access to "Desk", and saves it to disk in a packed form. Such a picture can later be added to a STEVE file through:

Pictures can also be saved from STEVE in some other format. When written by "PIC", a 32000 bytes long bit-image screen copy is saved, while "WRITE DEGAS" saves the screen in format as required by this graphic editor (or its "ELITE" version). "WRITE SNAP" saves the entire screen contents, packed in a "Snapshot" fashion.

RAW FILE FORMAT

Let us now examine the last mode to read and write files, "RAW", which is different. It is used to read the file from disk as it is, without any modifications, and, if necessary, to write it back again in the same way. This procedure is used for file copying (no RAM disk is necessary) and for the deciphering of files written in an unknown format. To illustrate it, let us write the following lines:

composed by an anonymous writer. Let us now save it as an "ASCII" file:

so that it will be acceptable to other programs or editors. We now read it back, this time in a "RAW" form:

Soon five lines pop up on the screen:

From the first line we find that the file is 158 bytes long; the next four lines bring the file contents, cut up into pieces 50 bytes long. Every ASCII line has a <CR><LF> pair at the end, shown as two special characters here. To check that their codes are correct, we move the cursor to the end of first original line:

and use the "Show character code" command - <Ctrl>. (Control dot). At the screen bottom a message is displayed:

The strange character obviously has a decimal code 13, or 0D in the hexadecimal number system. The command also moves the cursor one place to the right so that we can use it again on the next character. To avoid flashing in front of the user's eyes, STEVE does not clear the message away from screen - when it is no longer necessary, the <Ctrl>z command ("Refresh screen") should be used to do so.

The file, once read as "RAW", can be saved back to disk, either unchanged (to make a copy) or modified (to change a "PRG" file some precaution is of course required) for later use. As mentioned, it does not matter if the file is of the "PRG", "RSC", "BIN" or some other "system" type. The only limitation with the saving of "RAW" files is that such a file must be the only one in the current memory place at that time - no other text or pictures should be ahead of or after its contents. Suppose all the changes went fine (every line except the last one must have exactly 50 characters after the sequence number, there must be a correct length in the first line); after we save:

a useful copy is stored to disk. In the case of a bad "RAW" file - our modifications went too far - a message is shown:

TERMINAL-RAW FILE FORMAT

With the "RAW" mode of reading files it is possible to save any ATARI ST file in the STEVE format - its contents are only augmented by leading sequential numbers while the file bytes remain unchanged, byte by byte. Such representation has a drawback, as far as data communication is concerned: file sending over telephone lines, via modem, is possible directly from STEVE (TTY entry from the main menu), yet many codes from the set of 0 - 255 cannot be accepted by most receivers. Most software on mainframes and public data transmission services limit the user information to codes between 32 and 126. To overcome the problem, to enable the transmission of any files, to send pictures, a special "Terminal raw" mode of file writing and reading has been introduced.

Suppose we have a short file, two lines of text and a picture (by J. Dimec) in between:

and we save it to disk in a usual STEVE format, labeled as

"snail". We now read it using the

"Terminal raw" file type. We get a bunch of lines with not so obvious contents:

The text in the file has remained as such, while the picture has turned into an irregular pattern of characters. More detailed examination reveals that in the file there are no characters with codes outside the 32-126 code range and can therefore easily be transmitted over communication line. We send it over the line to another computer and save it onto disk there as

"Terminal raw" type. Any later, standard reading of the file from disk:

gives us back the original file with picture:

GEM FONT FILE FORMAT

As Desktop Publishing is supported by STEVE to a considerable extent, three of the font file formats are also supported, yet at the time being only in input mode. First of them, labelled "FNT" is used to import the GEM fonts, normally supplied on diskettes accompanying the Atari SLM 804 Laser printer (© Atari Corp.).

After we have selected the required file as in the example above, STEVE asks if the font is to be left as it is while importing ("NO") or if only the net character pictures are to be brought in:

"NO" is a proper selection for fonts like the "Typewriter" or some other non-proportional font, used for printing of tables, for instance. It would produce a file like this in our case:

Far better use of paper space results from proportional fonts, and even the typewriter font from our example can be made such. The selection:

discards all white space at the left and at the right of all non-space characters, as seen below:

The composition of both resulting files, from the "*Typewriter" line to the picture, is explained in the "Desktop Publishing" chapter towards the end of the manual.

There are software tools available which make it possible to convert other font formats, popular on the ATARI ST, to GEM format and from there bring them over to STEVE through the option of the extended disk menu that has just been discussed. Program Font-Expert (© Expert Software, 1987), for instance, can be used to convert character pictures between GEM, SIGNUM and DEGAS font file formats.

BITSTREAM FONTWARE

The professional application of STEVE's Desktop Publishing facilities, however, requires the widest possible selection of character fonts, in all styles and sizes, as used by specialized software like the Pagemaker or Ventura. There are several vendors of such fontware on the market, especially in the U.S. and with some additional resources (an industry standard microcomputer) it is possible to convert some of these font families into the STEVE format. The native family of fonts, supplied by Bitstream Inc. (file extension .BCO), can be scaled to any particular size using the SFIP program by SoftCraft Inc., and saved to a 3.5 inch floppy disk in Hewlett Packard Laserjet font file format (extension .SFP) or in the Bitstream's raster font file format (extension .FON). The procedure should be performed on an industry standard microcomputer, preferably equipped with both flexible disk sizes (5.25 inch and 3.5 inch). The resulting 3.5'' disk with font files (.SFP or .FON extension) can then be input to STEVE using, for instance, the

selection from the extended disk menu. As with GEM fonts, a short prompt follows - whether to discard white space at the left and right side of every non-blank character or not.

Fonts in the .SFP and .FON file formats, in various sizes, can also be purchased ready-made. Further processing of such fonts is explained in detail in the "Graphics" and "DeskTop Publishing" chapters. In the example below "YES" has been selected and the font is Times Roman, size 120 Pt. (© Bitstream Inc.; space character has been contracted to show the entire zero):

FIRST WORD FILE FORMAT

The last entry in the extended disk menu - DOC - handles the reading of files, written by the 1stWord plus word processing program. Such files are also recognized if entered through the "READ" option of the standard disk menu.

IV. BLOCK OPERATIONS

It is now time to have a look at the next entry in the main menu (how to get this menu is described on page 116):

Some of the selections we already know. The first and the second, "DEFINE START OF BLOCK" and "DEFINE END OF BLOCK", correspond to the keys "(" and ")" on the numeric keypad (see "Getting started"). The command "Clear block start & end" tells the editor to clear the pointers which define a block. The fourth and fifth selections provide assistance if we know a block has been defined, but have forgotten where it is. "Show start of block" brings the line where block starts to the top of the screen; the line is shown in reverse colour. With "Show end of block" the block ending is displayed at the screen bottom, reversed as well.

DELETE BLOCK

removes the entire block from the file - even the <Undo> key will not bring it back. It could also be deleted line by line, either by using the right mouse button at the line end or the <Ctrl>d key combination. "Delete block", however, does the job faster. Suppose we have a short poem, by Laura Gilpin, with four obviously superfluous lines. We make a block of them (cursor to the first line, "Beg Blk" command, cursor to the last, "End Blk"):

and, after "Delete block", the poem stands as it should:

There is, as usual, another way to delete such a block. Instead of using the menus, it could be done with <Ctrl><k> command (one finger holds <Control> down, while the other presses the <k> key). A block at the file end can be removed quicker through <Ctrl><q><k> which deletes lines from the cursor to the file end.

DELETE COMPLEMENT

keeps the block in the file and removes all other lines - those before the block and the lines after it.

MOVE BLOCK, COPY BLOCK

are equivalent to the "/" and "-" keys from the numeric keypad (see "Getting started" again).

ADJUST RIGHT MARGIN

differs from the "+" immediate command (from the numeric keypad); it adjusts not only the text from the current line to the end of the paragraph, but the entire block. Tables in text should therefore not be included in a block to be adjusted.

"Unadjust that margin" clears superfluous spaces from all the lines in a block, that have been inserted there by "Adjust right margin". The text again looks as if it has been written by a typewriter.

LOWER TO UPPER CASE, UPPER TO LOWER CASE

commands scan all the letters in a block and modify them according to the "Lower/upper case" system table (see "System tables"). These commands are straightforward and have no mercy with names: the first changes "James" to "JAMES" and the second "New Zealand" to "new zealand".

SAVE BLOCK TO DISK

comes in handy when it is necessary to save only part of a file. We make a block of it (using the "Beg Block" and "End Block" immediate commands, for instance) and save it, in STEVE format.

V. SEARCHING IN TEXT

FIND is the next main menu entry. It widens our horizons as far as searching through the file is concerned - some of the entries are already known, some are new.

FIND, REPEAT FIND

are used to search a string from the current position to the end of file, just like the "Fnd" and "Rep Fnd" commands from the numeric keypad (see "Getting started" once again). STEVE can also find blank lines (given an empty string) or strings, divided over the line end, like "attractively" or "distinctive flavour" in the paragraph below:

FIND & REPLACE

is used to replace a given word, or a group of words or characters, by another word or string of characters. Suppose we have acquired a strange salad recipe where the author obviously used the wrong word several times:

To correct it bear should be replaced by cucumber. We select:

and, after the message

we move the cursor to the start of the text ("Peel one") and press the left mouse button. Things do not stop here:

Bear<Return> should be typed first, followed by cucumber<Return>:

The editor now searches for the first occurrence of "bear", flashes the cursor three times on its first letter and waits for us to decide:

In the explanation frame at the bottom of previous page four alternatives to select from are mentioned:

    1. left mouse button confirms the replacement,
    2. right button rejects it,
    3. <g> key confirms this, and all other possible replacements from here to end of file (if any) and
    4. <q> key aborts the command.

This time we agree, but are not sure how the other "bears" will turn out. So we use the left mouse button, and not the <g> key. The editor makes the replacement and looks for another bear. It is found in the third line, but we are not happy with it:

It would be wrong to substitute here - cucumbering just does not make sense. We therefore press the right mouse button to reject it. The program now stops in the last line ("bear slices"). Using the left mouse button will now make the final replacement. There are no more bears, we get the "NOT FOUND" message, and after we have moved the mouse, the final text appears:

Both character strings, the old and the new, should not exceed 35 characters in length. The second string may be empty - in case we just want to remove some word from the text. If some line contains just that word, and nothing else, then it too will be deleted from the file.

There is another way to obtain the "Find & replace" command: instead of using the mouse we can request it through the keyboard. This is done through <Control><s> - the <Control> key is held down and the <s> key is pressed.

1 TO 1 REPLACE

on the other hand, is used when a group of characters has to be replaced with a new one. Suppose we brought over a file, written in some non-English language, from a mainframe computer with a 7-bit character set (128 characters instead of 256 as on an ST). On such installations special national letters have to be hidden in normal punctuation characters. For illustration, let us have a look at how it could be done with six special letters, used in Welsh, that are already included in the STEVE character set:

Suppose we encountered punctuation marks, shown in the first line, instead of the corresponding national letters, shown in the second line. We would like to substitute all characters from the first line with those from the second in one go. To have it let us now select:

Click and the editor now asks us where to start the substitution, at which line and at which place - substitution takes place from there to end of file:

We move the cursor to the place where replacement should start, click and enter both character sequences:

All characters from the first line ("Replace") will be replaced by their equivalents from the second one ("with"). The procedure continues as with ordinary substitution, only this time the program does not move from character to character, but from line to line. The left mouse button is used to confirm replacement for an entire line that is shown on screen, and the right mouse button to reject it. The "g" key requests replacements to end of file, and "q" quits from the command. "Byte by byte substitute" can also be selected through the <Ctrl>qs immediate command.

The next entry:

will help us jump to a selected line in the file. Suppose we would like to see the file from line 2000 onwards. We click on "Go to line" and enter the line number:

followed, as usual, by <Return>. If the file is at least 2000 lines long, the editor will jump to the desired line, if not, a message is displayed:

and the editor moves to the end of the file. The immediate version of the command is <Ctrl>\ (the key between the <Shift>, <a> and <Alternate>).

"Next picture" and "Last picture" are the entries that follow. As already mentioned at the beginning of the manual, there are two types of line that can be handled by the editor - text lines (usually black with white letters) and graphic lines (white with black lines, curves and patterns). "Next picture" finds the first graphic line from the top of the current screen on, and "Last picture" the last graphic line in the file. If no graphic lines are encountered, we receive the message:

PAGE & LINE

entry produces the same result as the "Whr" immediate command from the numeric keypad (described on page 103). It shows at which page and at which line on the paper the current line would be had we decided to print it.

RECORD & BYTE

entry tells us the current position in the data file. Suppose we have three addressees there (from the "Data base", "Mailing list" chapter), that we have selected the following:

and clicked on the last record in the set:

At the screen bottom we find that the cursor line belongs to the third data record and that it is 214 bytes from the file beginning:

FREE MEMORY

comes next. It displays the amount of the computer's immediate storage that is still available, such as:

Approximately 250 pages more, 1.5 spaced, of text may be typed and then the memory will be full. The same effect can be obtained through <Ctrl>o (letter, not number) or the <F7> function key.

reveals from where and to where the memory has been available at the time when STEVE gained control. Suppose we have a 1 Mb machine with TOS in ROM; we click on "Memory area" and obtain something like:

Not all of this area is available to the user, of course. From the beginning on, there is "STEVE.PRG", followed (if installed) by "STEVE.AGR" (the additional graphic editor), "STEVE.RSF" and some reserved working space (several K, not very much); on top of RAM some space is taken for the system stack. Depending on the size of the STEVE.RSF file (number of fonts installed etc.) and whether STEVE.AGR is on disk, the user file size (on a 1 Mb machine) may be about 500 Kilobytes.

BINARY SEARCH

is a very fast way to search for the first data item in a file of alphabetically-sorted data records; it is normally used for dictionary search. The algorithm used takes the record at the middle of the file and compares it with the string we are looking for. If the latter is smaller (i.e. it occurs earlier in an alphabetically-ordered list) the searched area is limited to the first half of the file, this is halved again and so on. This way not more than 2 comparisons are necessary for a file of 2 records, 3 for 4, 4 for 8, 5 for 16, 11 for 1000, 15 for a file of 10.000, 18 for 100.000 and 21 comparisons for a file of 1.000.000 records.

A small English-German dictionary is enclosed on the STEVE diskette (the "ENG-GER.DIC" file, 1156 English entries, 24456 bytes) to test this command. Suppose we have loaded the file into the ninth file space (see "File overview") and now we inspect the partition at letter n:

Every data record has two fields - the English word and its German translation or translations. Let us find the translation of the word "necklace" in it - after we have clicked on

or selected the command through <Ctrl>ad (for a ninth file it is even provided on the <F9> function key), we type the word we wish to search for:

The program has been searching while we have been typing and so it is not necessary to enter the entire word. There is no other word starting with "neckl" - after "l" the bell rings and the editor jumps to "necklace":

In a similar way we can find out very quickly that the word "nautical" is not included in the dictionary:

After a short pause (two seconds) the editor moves to the word in the list which would immediately follow "nautical" and before which "nautical" should be inserted. So the task of building one's own dictionary is not particularly hard. It is a standard STEVE data file - all that is necessary is to have it sorted (see "Sort" in the "Dbase" menu) and to avoid graphic lines: pictures would spoil the searching algorithm.

Let us end with a hint on how to use the dictionary for translation. The first action recommended would be, as before, to load the dictionary in file space 9 (<Ctrl>9, read file) and return to the original file (<Ctrl>1 or <F1>) afterwards. We now type in our translation and, as the need arises, look into the dictionary - function key <F9> does it and <F1> returns back to the translated text. As seen, the two function keys are already set to make life easier - <F1> returns to file 1, and <F9> moves to file number 9 and starts a dictionary search there.

FIND SETUP

The last entry in the "Find" menu is the:

It provides the possibility of influencing the way in which "Find" and "Find & replace" are performed:

The first entry defines whether the find algorithm (used with the "Find" and "Find & replace" commands) should search through entire lines or data records or should only consider the first data item of the latter. The first field is the part of the record from the beginning to the first data item separator (a centered dot, as used in the dictionary two pages back). Limited searching is used when it is necessary to substitute a value only in one field of a data record, whereas the others have to remain untouched. Something more must be said - in the case of first field substitution, this field must not extend over more than one line. If it is very long (more than 64 characters long, for instance) the record should be rearranged to have long lines - up to 1800 bytes are possible.

The second line of the setup tells the editor if lower and upper case characters are to be equalled during the search (first value) or not. If the second alternative is selected, the program will not find the name "Joe" if we are looking for "joe". The benefit, most evident with data base searching (query), is a slight gain in speed.

The third entry makes it possible to ignore spaces while performing a search:

Example: suppose it is the "ATARI ST" string that we want to find in any circumstances - whether as "ATARI ST", "ATARI   ST", "ATARI      ST" or the like. The "Spaces" entry in the above menu should be set as above, and the

command will perform the search in the way we want.

And how are the new settings made permanent? How do we get them without clicking in the setup whenever we start the computer? First it is necessary to have a diskette with a working copy of STEVE inserted. Next we select "Various" and the last selection there - "Save STEVE. RSF":

The command is executed: a new copy of the "STEVE.RSF" file is saved onto the "STEVE" disk and the old one is discarded.

VI. PRINTING

The next entry in the main menu, DeskTop Publishing, though greatly advancing, will still be explained in the second part of the manual. So let us now dedicate some time to standard printing:

be it to a matrix printer, a daisy-wheel, an ink-jet or a laser printer, used in a classic (non-DTP) way.

Matrix printers are nowadays the most widely used; they produce a letter picture as a network of small dots (needle imprints). According to the number of needles they can be divided into two large groups, the older 9 needle variety and the standard one having 24 needles, where the printout comes very close to typewriter quality. The speed of a matrix printer usually varies from 100 to 300 characters per second (draft quality) and 20 (9 needles) to 80 (24 needles) cps in a NLQ (near letter quality) mode. Matrix printers are also capable of graphics - pictures are made from a large number of dots with densities from 2 to 6 or more dots per millimetre (60 to 180 dots per inch). There are many brands, most from the Land of the Rising Sun, and it is wise to stick to the best-sellers or, in case of some special requirement, to consult a specialist before buying.

Daisywheel printers are very often standard electric typewriters, modified to accept input not only from the keyboard, but also from the computer. Negative letter shapes are stored on a special plastic ring with supports coming from the centre like the petals of a daisy. The imprint is made by a hammer which strikes the wheel which has just turned to position the selected character and prints the character image on paper. Characters are thus made all at once, and the printout is fine, bright and sharp. Daisywheel printers are therefore most appropriate for printing letters and forms where a strong impact is necessary for copies (especially if there are more than 2). The price is a bit higher than with matrix printers. There are, however, many drawbacks which limit the wider use of this printing technology. The speed is not high (15 characters per second being typical), and such printers also tend to be loud, heavy and bulky: they often take up more desk space than is available; it is also not possible to print pictures. This is why 24-needle matrix printers have become the standard paper output device for most users. When it comes to quality, however, there is no match for the

LASER PRINTERS. Character pictures are again formed from minute dots, but with much greater precision and density; 12 dots per millimetre (300/inch) is standard. Laser machines print the entire page at once: its usual mirror is 2.400 by 3.400 dots (A4 paper size). The technology is comparable to photocopying, and the printers are silent and fast. Ten pages per minute (600 letter quality characters per second) is nothing unusual. The only real snag is price - the least expensive laser printer is about twice the price of a 1 Mb ATARI ST. Maintenance costs (toner, drum etc.) are also comparable in price to those of a photocopying machine, and so are four times more expensive than those of the most cost-saving matrix printers (printer ribbon only). Yet the difference in quality, with letters, and even more so with pictures, is considerable (a laser-printed page must be inspected from a close distance to see the difference from standard book-quality print), so it is only a matter of time (a year or two) before lasers become standard for middle and high-volume output. STEVE currently supports two types of laser printers - the ATARI SLM 804 (see the DTP chapter) and the Hewlett Packard Laserjet II with its compatibles (most brands have the HP Laserjet emulation already built-in).

Ink-jet printers fall somewhere between matrix printers and the lasers. The print quality and fine detail of the latest models (like the HP Deskjet) is equal or better to that of a laser, but alas, the cost of ink per page is in the same range as well. The speed and the price of a machine is, on the other hand, closer to that of a matrix printer. The great advantage of ink-jets is very quiet operation - only paper transport and head movement can be heard.

PRINTER SELECTION

The first thing to do before printing, just to make sure, would be to check if the right printer has been selected:

This entry opens up a list to select from which may vary according to what printer tables are supplied in the "STEVE.RSF" file. Suppose we get something like:

Here a 24-needle NEC or Epson driver has been selected by default. To select a different one, just move the mouse to the required line and press the left mouse button. The first two drivers, the first being the standard 24-needle and the second the standard 9-needle printer driver, require no special printer setting (DIP switches or the like) and should produce the standard ASCII characters (codes from 32 to 126) and most Western European characters straight away. Other drivers define some additional characters (downloading), mostly the ones used in STEVE's native country, and may require some printer tuning; if the desired results do not show on paper, consult the printer manual to find which DIP switch ("mouse-keyboard") on the printer base is used to turn on the downloading facility. The HP Deskjet entry can be used to drive the HP Laserjet plus or II compatible laser printers as well.

If your printer is neither included in the above list (which may, as stated, be different) nor is it compatible with one of the printers listed (most of the less known brands are compatible with one of the Epsons), please ask your dealer if an adequate STEVE printer table can be ordered from the distributor. Another, most often quicker and cheaper solution is to modify an existing printer table or write a new one by yourself, as described further on in this chapter. The passage should also be consulted when a daisywheel printer does not produce the correct character mapping on paper.

Several printer-related values, like the left margin, the number of copies to be printed, whether to wait at the end of every page or not (for sheet paper on the printer without a cut-sheet feeder) can be set through the "Printer setup" selection, a page or two further on.

Suppose we have selected some other printer, not the default one, and want to make the selection permanent. As with any other setup values, we again insert the working STEVE diskette and select the option:

PRINTING THE FILE AND BLOCK

The first selection will try to send the entire STEVE file to the printer; when only part of it needs to be printed, we make a block (the start is delimited by "Beg Blk" command and the end by "End Blk" - see "Getting started") and print it through "Print block". Both commands can also be started from the keyboard, using the <Control><p> immediate command. If a block is set, it will be printed, if not, the entire file.

Let us now see what happens after we have pressed "Print". If there is no printer on the desk, or if it is not turned on properly, the

message is displayed and stays on screen until we move the mouse or until any key is pressed. If all is well, the file or its block starts to be printed. Every new page (they are delimited by "end of page" from the "Select line spacing" menu) updates the screen as well.

What if something goes wrong? How do we stop the printer if the paper starts to tear, or if it jams? The "OFF LINE" printer button should be pressed immediately, if there is one, or else we turn the "ON/OFF" switch to "OFF". The program waits for half a minute to see if the printer will be ready again; if not we get the message:

again and the editor moves back to the file start. We now fix the printer and print the file again - we put the part from the page where printing has been interrupted, to the end into block, and select "Print" once more.

Printing can also be interrupted from the computer, at the end of every line - just press any key. If some minor paper transport problem or the like occurs, printing can be temporarily halted ("On/off line" button on printer), the trouble fixed and printing resumed ("On line"); the computer will allow 30 seconds for this.

Characters can be printed in a multitude of fonts - double width letters, emphasized, in condensed mode, italics and more. Most of them can be requested from STEVE through special, printer controlling characters. To obtain them, hold down the <Alternate> key and press another key in the lower keyboard row - from y to the full stop. They have the following meanings:

Symbols as shown on screen for any of these key combinations are:

Let us try to compose the following line on screen:

A good magnifying lens does help with condensed letters.

so that "magnifying lens" will be printed emphasized, and the words "condensed letters" in condensed mode. On screen it should look like this:

Before "magnifying" we have typed <Alternate>c to turn the emphasized mode on, and <Shift><Alt>c after "lens" to switch it off. <Alt>x helped us get the condensed mode and <Shift><Alt>x to get rid of it. One line on a standard printer will allow up to 80 normal characters (with the left margin set to 0), 132 condensed and 40 double width characters.

STEVE has selectable screen character fonts (besides the standard 64 in a line) - from 40 to 160 places per line (see "Font" selection from the main menu). It is, however, not yet possible to combine them in one line and to avoid the above displayed printer control characters on screen. The only exception to the rule is the DTP mode of text processing and its "Page preview" facility (see "Desktop publishing").

It is also possible to have very big characters - two, three, four, eight or more times the normal size (see "Graphics" and "DTP").

PRINTER SETUP

Several adjustments are offered in the next selection:

With a click on the left mouse button we obtain the following:

LEFT MARGIN tells us how many spaces the left margin should have on every printed page; 10 gives an approximately one inch margin. The value, like all the other numeric values in all setups, can be increased with the left and decreased by the right mouse button. The left margin setting of 7 is recommended if the text is to be combined with pictures on a 24-pin printer (using screen character font 71). If only text is required, it is better to increase the left margin to 10 and to use the 64 characters per line screen font.

COPIES TO PRINT will print the file or block as many times as is given. The selection is also valid for the DTP printouts.

LINE SPACING setting can be of great importance. If left to STEVE, a special printer controlling character sequence will be sent to the printer at the end of every line, according to the line spacing we have requested (see the "Insert" entry, in text mode). Sometimes the preset values are not what the user wants or else, with most daisywheel printers, a completely different sequence is required. It can be modified (see "PRINTER DRIVER MODIFICATION") or rejected completely:

If the daisywheel printer's manual is not at hand, this is the quick way out of trouble.

The DOWNLOAD entry tells the editor whether a special character sequence should be sent to the printer (from STEVE's printer system table) before the file or its block are actually printed. Such a "Download sequence" normally contains new, user defined characters (most modern matrix printers have this capability), like special national letters, the greek alphabet, some scientific symbols or the like. It may, however, contain other useful printer commands - like the printer reset, the selection of a proper international character set and/or NLQ selection, turning the "Paper out" signal off (to use the full length of page on single sheets), no skipping at the end of page (for oversized output, like A3 format) etc. An explanation of how to build up such a sequence is found under the "PRINTER DRIVER MODIFICATION" on page 137. Carriage width is normally defined by "Printer selection", but can be modified here if necessary.

TRANSMISSION entry should normally be set to "OUT". The other entry, "TO EOF", is provided for diagnostic purposes only, during testing of a Hewlett-Packard Laserjet interface, especially character downloading, in the DTP printing mode. If set, the file is not transmitted to the printer but, character by character, added in a "RAW" form to the file end (the "HEX DUMP" facility becomes useless if there are tens of thousands of characters to inspect).

PAPER line gives an opportunity to select between fanfold and sheet paper. Fanfold paper is continuous, 2000 sheets in a box, and has perforated page junctions, so that it is not difficult to tear them apart. It also has small holes along the left and right border to ensure good paper transport. The "Fanfold" selection should also be set when the printer is equipped with a cut-sheet feeder. "Sheet" paper, on the other hand, is used when sheets of paper are fed into the machine manually. When selected, the option instructs the program to display the message:

at the end of every printed page and to wait until the mouse has been moved or any key pressed on the keyboard. We insert a new sheet of paper, move the mouse and the next page is printed.

INTERFACE TYPE & BAUD RATE states the way in which the computer is connected to the printer, over the serial (Modem) or parallel (Printer) port. Zero value denotes the parallel port while other values stand for serial transmission: all values supported by TOS can be selected - from 50 to 19200 Baud. If a smaller value is chosen, 4802 for instance, it is rounded up to the next larger one (9600 in this case).

ESC * IMAGE MODE is the dot density code for the printing of pictures. It is explained in the matrix printer's manual and illustrated on the next page.

9-NEEDLE MATRIX PRINTERS

ESC * 0 - 60 dpi horizontally, 80 dpi vertically: 480 pixels/line

ESC * 1 - 120 dpi horizontally, 80 dpi vertically: 960 pixels/line

ESC * 2 - 120 dpi horiz., 80 dpi vert.: 960 pixels/line; double speed

ESC * 3 - 240 dpi horizontally, 80 dpi vertically: 1920 pixels/line

ESC * 4 - 80 dpi horizontally, 80 dpi vertically: 640 pixels/line

ESC * 5 - 72 dpi horizontally, 80 dpi vertically: 566 pixels/line

ESC * 6 - 90 dpi horizontally, 80 dpi vertically: 720 pixels/line

ESC * 7 - 144 dpi horizontally, 80 dpi vertically: 1152 pixels/line

ESC * 98 - 80 dpi horizontally (made from from 240 dpi), 80 dpi vertically: 640 pixels per line; three passes over one line

ESC * 99 - 80 dpi horizontally (made from from 240 dpi), 80 dpi vertically (made from 216 dpi): 640 pixels per line

As may be seen in the picture of a salamander (courtesy of J. Dimec) and of a black circle, there is a wide choice of distortions and only one density, ESC * 4, which gives the true relation between horizontal and vertical, the x and the y axes (with its substitutes, the ESC * 98 and ESC * 99). With the ESC * 98 setting every graphic line gets printed in quadruple density, three times, one very close (vertically) to another. Printing is slow, yet the picture is quite black, even when the printer ribbon is worn out. The ESC * 99 variety, where every screen dot is mapped into one-and-a-half printer dots, is similar, yet much faster. In all the other examples the shape of the salamander is more or less acceptable, but that of the circle is not.

Densities 0, 98 and 99 are actually performed using the ESC K and ESC L printer commands, and may thus also be executed on printers which do not recognize the ESC * feature, like the OKI Microline series, all vintage Epsons (the MX series) and some others. The ESC * 99 variety, where every screen dot is mapped into one-and-a-half printer dots, may also be used in case the printer ribbon is not what it was and more darker rather than grey blacks are required. The ESC * 4 density, however, has the drawback that the full-screen picture width corresponds to 80 normal printer characters or the full text width of the (A4) paper. When the entire screen is used for a picture it is therefore necessary to set the left printer margin (see "Printer setup") to 0; ESC * 6, on the other hand, gives vertically slightly extended pictures, but is compatible with 71 characters on the printer, which allow 7 characters of left printer margin and 2 for the margin on the right, which is usually acceptable.

24-NEEDLE MATRIX PRINTERS

ESC * 32 - 60 dpi horizontally, 60 dpi vertically: 480 pixels/line

ESC * 33 - 60 dpi horizontally, 60 dpi vertically: 480 pixels/line

ESC * 38 - 90 dpi horizontally, 90 dpi vertically: 720 pixels/line; simulated

ESC * 39 - 180 dpi horizontally, 180 dpi vertically: 1440 pixels/line

As may be seen all the above values give a distortion-free output. Especially useful, like the ESC * 6 for 9-pin printers, is the ESC * 38 density. It is again compatible with the 71 characters per line screen font.

Besides the values just shown, 24-pin machines, like the EPSON LQ series, the NEC P series (from 6 on) and many others, can also print the 9-pin range of ESC * 0, 1, 2, 3, 4 and 6. The essential difference is in vertical resolution, being 60 dpi instead of 80. Pictures appear somewhat grey in the vertical direction, as only every third needle fires to produce an 8-pin result.

The density of 360 dpi, not directly available here, can be obtained in the DTP mode of printing (see the DeskTop Publishing chapter).

HP DESKJET & HP LASERJET +/II COMPATIBLE LASERS

ESC * 41 - 300 x 300 dpi

ESC * 42 - 150 x 150 dpi

ESC * 43 - 100 x 100 dpi

ESC * 44 - 75 x 75 dpi

The four above densities are a great help for draft output on a common ink-jet or laser printer or, on the other hand, if the computer is a 1 Mb variety which does not permit a full-page DTP.

It is also possible to combine different graphic densities on the same page by using a special printer control line:

A line like this is always used without padding:

for instance selects the ESC * 4 density.

LINE WIDTH FOR PROPORTIONAL SPACING contains the total width of an 8-inch wide printed line in units, given in the STEVE "printer tables" system file. It usually has a value of 80

for non-proportional (fixed) character spacings and 2880 for 24-needle printer proportional values (8 inches times 360 dots). For more information how to use it see the next chapter, "PRINTER TUNING".

END OF LINE is normally defined (besides the special escape sequence discussed on the next page) as a pair of special characters - "Carriage return" or <CR>, and "Line feed" or <LF>, for short. Some printers,

especially the daisy-wheels, perform the line-feed function on their own, after the <CR> has been received. If your printer makes two line spacings instead of one, the End-of-line entry should be set to "CR".

LINE SPACING & END OF PAGE

entry comes next; it will insert some special printer-control line into the file. Let us just try pressing the left mouse button. The screen is cleared and the following selection pops up:

STEVE itself is composed of four files - STEVE.PRG contains the program in MC 68000 machine language, STEVE.AGR the additional graphics editor, STEVE.PIC the title screen and STEVE.RSF various system tables. One of them is the line-spacing file. An end of page printer control line as well as several different line-spacing control lines are stored here. Suppose we have this text:

Everything is fine, except that the line "I N T R O D U C T I O N" should be printed on top of a new page. As it would make little sense to add a full page of blank lines, we call the "end of page" selection from "Insert":

Another prompt is now shown on screen - the editor would like to know in front of which line the selected passage should be inserted:

We move the cursor to the line "I N T R O D U C T I O N". End of page should be in front of it:

We now press the left mouse button. The screen changes to:

The spangled line, full of double diamond characters (there should be at least two of them, <Alt><~> or <Alt><key right of the RETURN key>), will not be printed; it merely tells the printer to move to the top of a new sheet of paper. So the introduction will start where it should - on a new page.

Now it is time to explain the use of the "Where am I" command from the top right-hand corner of the numeric keypad ("Whr" key):

It will tell us how far down in the file the current line is, on which printed page and at which printed line. Suppose our file is the example from the this page, with the cursor moved to the end of the first page:

The "Whr" command would now produce the following message at the screen bottom:

We move the cursor a bit lower:

and press "Whr" again. This time we find that the cursor is on the second page, at line four:

A page of paper is, of course, longer than one screen page, which only consists of 22 lines. It typically has 72 lines (European A4 format) or 66 (legal size); approximately 60 can be used for the text to leave a reasonable top and bottom margin. When wider line spacing is used, the number of lines per page changes of course - 40 for instance with a spacing of 1.5. How do we request wider line spacing?

"Select line spacing" again, this time "line spacing 1.5":

After it has been chosen (using the left mouse button) it is, as before, necessary to indicate from which line onwards the new spacing is to be applied:

We show it, and press the left mouse button to get:

This line, too, is only for reference - it tells the printer to increase the spacing from now on. When a different line spacing is requested (say back to 1.0, or up to 2.0) we do it as before - "Insert", line spacing selection (left mouse button), and indicating where in the text to start it (left button again). "Own line spacing" comes into play when an unusual value is wanted - a line spacing of 1.36 for example. We describe it with an escape sequence or, once and for all, in the printer table; see "PRINTER TUNING" towards the end of this chapter.

More flexible line spacing definitions are available in the DTP mode.

BREAKING FILE INTO PAGES

is next ("Get first table line" will be explained with PRINTER TUNING). This command comes into play when a longer text has been written, line by line. It is a long stream that can be scrolled on the screen as required, but is of no good use on paper. Here we are used to seeing every page with its number at the top, some lines free, the text and a suitable bottom margin. The command is used to do just that - it reshapes the file to the proper paper format. Suppose we have here the beginning of Chapter 40 from one of the Mark Twain's masterpieces, on the butter accident. To cut it into pages we first move to the beginning and select "Break file into pages" from the "Various". After the left mouse button has been clicked, a short setup appears at the top of the screen:

The editor wants to know the first page number and the number of lines per page. For the middle part of a very long text (300 pages fit into the ST's memory quite easily) the first page can be increased to a suitable number; in our case 1 is fine. The number of lines per page is now 60 (single spacing for one sheet of paper); to make smaller pages we decrease it to 35. To do this we move the cursor to "60" and hold down the right mouse button until 32 appears. After a click on "EXIT", the familiar prompt:

pops up on the screen. The cursor is moved to the start of the text:

and the left mouse button is pressed. On screen we now have the break between the first and second printed page:

The end of the first page is shown on a dark background and the start of the next one on a light background. If satisfied, we press the left mouse button to continue, if not, we move the border of the light section up a few lines (moving it down may produce an overlong page). In the above example, to have a question and its answer both on the same page, we move the border one line up, to "What you been doing there?" and press the left mouse button there. This procedure continues - the editor will now show the break between the second and the third page, and wait for our decision again. Sometimes it is desirable to leave the page breaking entirely to the program, i.e. if there are a lot of pages without paragraphs; pressing the right mouse button will tell the program to proceed without questioning. It may also happen that we have set an incorrect number of lines per page and would like to quit; pressing any key from the keyboard will have this effect. To summarize the possible decisions:

   1. left mouse button - cut and continue,
   2. right mouse button - cut this page and all the others,
   3. <Return> or any other key - abort the command.

Page breaking continues until the end of file has been reached or until the program finds an end-of-page mark:

In the latter case, the program believes that we have made the page-breaking by ourselves (by means of the "Whr" command and the "Insert", "end of page" selections), page by page, and will refuse to continue with further page-breaking operations, showing the message:

After the file has been divided into pages, the border between, for instance, the first and the second page looks like this:

All the above lines, starting with a double-diamond character, of course do not get printed. The "end-of-page" line merely tells the printer to move to the top of the next sheet of paper, while the

lines are simply delimiters. They help the "Undo the page breaking" command to find out what is "current page bottom/top of next page" block (page footer & header) that has to be removed and what is the original file.

Before breaking file into pages it is also possible to define the lines that consist of the page header and footer block and to request that the page number be moved to the right of the line for odd pages (3,5,7 etc.) and to the left for even page numbers and the like. This can all be accomplished through the

menu selection sequence. At the file end we now obtain the standard lines that would come into play during the page breaking:

As the page header/footer file is one of STEVE's system files (34 such files are contained in the STEVE.RSF file on disk and in memory) it must have a pair of lines with two zero bytes at the end:

How to get them, have they been deleted by accident? For an experienced user the quick way would be to type

where + denotes that the <Alt> key must be held down while <d> is typed. The comma tells us to lift the finger from the key that has been pressed.

And the other, more simple way? It is to use the "Varia" menu, one of its last entries:

Any character from the STEVE character set can now be pointed to and chosen using the left mouse button. It is the first we need now:

We click and move the mouse to required character position. Another click puts the desired character in place.

Let us now return to our "page headers/footers" system file:

It is not difficult to guess that we have two layouts here - one for the odd-numbered pages (1,3,5,7,9, ...) and one for the even-numbered pages (2,4,6,8,10, ...). The three centered dots between the hyphens define where the page number should be inserted while the text is being cut into numbered pages. Let us now try to compose a layout similar to that commonly found in books. In this case, pages on the right-hand side have a text like:

and its mirror version on even numbered pages:

Our system table should be changed to (the horizontal line underlining both titles has been written by the graphic editor - see "Graphics").

and returned to the editor in a way similar to the way the original table has been obtained:

The user is now asked to show the initial line of the system file that is to be returned to the editor:

We move the cursor to the first line, the one with "Left and right page endings", no matter at which character, and press the left mouse button:

The cursor blinks a little and STEVE has a new "Page headers/footers" system file; its lines, which have also remained at the file end, may now be removed (<Ctrl><d> several times).

So far, however, the change is only temporary. To make it permanent, to have the new "Page headers/footers" table whenever we start STEVE, a new copy of "STEVE.RSF" has to be made. We insert the "STEVE" disk (or move the "STEVE" folder on the hard disk) and select the last entry from "System":

Lines that should, during page breaking, be inserted at the page bottom, are defined in the "Page headers/footers" table in the same way: we insert them in front of:

"end of page" line.

And now a final remark concerning the speed of the "Page breaking" command: when the file is several hundred pages long, it takes two to three seconds per page. So the procedure without dialogue (the right mouse button is pressed at the decision point) may take several minutes.

UNDOING THE PAGE BREAKING

It often happens that a file of text, already cut into pages, must be extensively modified. Page structure will no longer hold and it is therefore better to have the file as one long piece again, correct it and cut it into pages once again. The

command serves the purpose. From

for instance, we again get the original situation:

PRINTING ON BOTH SIDES OF PAPER

The last two selections from the "Print" menu

open a way to print on both sides. Suppose we have our file already broken into pages and saved on disk. We now use the "Remove even pages" command which removes from the file pages number 2, 4, 6, 8 and so on until the file end. Once printed - pages 1, 3, 5, 7 and all the other odd pages - we delete them from memory (<Ctrl><q><k> at the file beginning), reload the file from disk and "Remove odd pages". All that remains to be done is to reload the paper with printed odd pages into the printer and print the current file (even pages).

VII. PRINTER TUNING

It quite often happens that none of the printer drivers supplied with STEVE (and contained in the STEVE.RSF file) suit all the needs the user might have. It is therefore necessary to modify an existing printer driver or to write a new one. Though it is true that such modifications, including the design of additional printer characters (downloading) are of course easier if some technical spirit, or a helpful person, more involved with computers, is at hand, it is nevertheless worth a try.

is an entry which opens up a way of making one's own printer table, to modify the values supplied. This command produces a set of printer tables, one for every printer available in the "Printer selection" list:

The table for every printer obviously has its own name (it should be no longer than 19 characters), is preceded by an asterisk and is followed by seven lines specifying various printer-related parameters. Each such line has 31 characters of text, carrying a description, a colon, and the table itself. Let us examine them, one by one. The first line provides us with the line spacing data (16 bytes), followed by the printer setup values. Line spacing is described by two tables, the first nine bytes long, and the second seven:

As it is not easily read, let us modify the characters into numbers. To do so, we move the cursor to the first character of the table (as above), and press <Ctrl>. (Control dot) several times. On the screen bottom we obtain the character codes, one by one (use <Ctrl>z to restore the screen after a set of <Ctrl>. commands):

The first part tells us which characters should be sent to the printer at the end of every line. The number 2 indicates there are two such characters, with codes 27 (also called Escape) and 51. A short look into the printer manual reveals that these two numbers, followed for example by 30, tell the printer: prepare to advance the paper 30/180 of an inch. Here the second table now comes into play. It starts with 180, the minimal printer vertical spacing, followed by six values, from 24 to 90, defining the line spacings given in the "Line spacing" STEVE system table:

We thus discover that a line spacing of 0.7 will advance the paper by 24/180 of an inch, a spacing of 0.8 by 26/180, single spacing (1.0) by 30/180, and so on up to triple spacing, of 90/180 of an inch. The line spacing 0.7 is used when pictures are output, and so is better left as it is while all other settings can safely be user modified. Suppose, for example, that we do not like the 30/180 inch standard line spacing. It is just a bit too narrow, and let us correct it to 36/180. How do we do that? We move the cursor to the required position:

and type <Alternate>d,0,3,6,<Return> (the commas denote moments when all fingers should be lifted from the keyboard). The line modifies to:

After the printer file has been returned via:

with a click on the first line from the printer file (starting with an asterisk, after a request by the editor), all subsequent printing with normal line spacing will produce the desired, slightly increased spacing (provided, of course, that the "NEC P6/P7,EPS LQ500" has been previously selected in the "Printer selection" entry of the "Print" menu). In the same way all other settings (from 0.8 to 3.0) can be adapted to suit individual requirements.

The rest of the first printer table line (also called the printer setup line) shows the values, combined from the "printer" setup and the "break file into pages" setup:

When expanded using the <Ctrl>. command, we get the numbers:

If written in pairs as above, it is not difficult to locate them in both setup tables, from top to bottom:

For every setting in the above table, whether it is numeric (like "Left margin") or discrete (like "End-of-line"), there is a two-digit number in the printer setup line. Two digits are necessary to enable numeric values greater than 255 (the first page of the second part of a large printout, for example). Within discrete parameters the numbering starts from zero (for instance "CR + LF" = 0, "CR" = 1, "LF" = 2).

When composing a new printer table, for a printer not given in the STEVE printer file, it is possible to get the setup line through:

In the case of our example from the previous page, this command would add the following line to the end of the current editor file:

whence it is easily moved (<Beg Blk>, <End Blk>, <Mov Blk>) to its proper position, returned to STEVE (<System>, <Put system table>, <Printer tables>) and saved permanently (<System>, <Save STEVE.RSF>).

PROPORTIONAL SPACING

The second line in every printer table contains the

for every character in the character set (there are 256 bytes in the line after the colon). If we examine the values above, with <Ctrl><.> command, we quickly see that all values are equal, namely 1. All characters in this printer driver have an equal width - we have a non-proportional printer font. A bit further down the printer file we find a different situation, in a proportionally spaced driver for the NEC P printer family:

The first 32 values are equal to 1, as in a fixed table, since they do not represent characters that would usually get printed - printer control characters and characters with codes from 0 to 12. A different picture opens up as we move in our line by one screen-width to the right - we click the right mouse button at the right screen border of a line (also see page 142):

The values for space (character with cursor in the last picture), <!>, <">, <#>, <$> and further on are not 1, but, as revealed by the <Ctrl><.> command, have the width values found in the printer manual under "Proportional printing":

In the table, character code is given first, followed by a full stop, character picture and its width (in 1/360 of an inch). In case of a new printer driver the numbers in this line ("Character width values") should be input according to the table from the printer manual, or, if not present, measured by hand - an obvious way would be to print as many lines of equal characters (A-s, B-s etc.) as necessary and use them for the table computation (a calculator is built into STEVE, see page 168). Any set of values can be typed in using the

where n1, n2 and n3 are decimal figures of a value (padded with leading zeroes if shorter than three digits). To input three codes: 26, 25 and 41, for instance, type:

where commas would of course not be typed; they denote moments when the finger should be lifted from the key. It is also important not to hold the <Alternate> key any more, after the <d> has been pressed. The other way to enter any character is, though more time consuming, through "Varia" and the "Get any character" menu sequence.

Let us now examine the third and the fourth line of the printer table: they both deal with how to decode characters before they are sent to the printer:

The first of them carries data concerning the draft mode of printing, and the second one the "Near Letter Quality" mode, as selected by the <Alternate><.> special character. The tables are not particularly impressive - at least not their initial parts, as shown above. Both tables are 256 bytes long (after the colon) and contain, for every character in the STEVE character set (see page 207), the value which should normally be sent to the printer instead. As seen, the characters with codes from 0 to 31 are sent to the printer unmodified. If we now move on in the table: we position the cursor to the end of screen line:

and as before press the right mouse button, we get the character mapping table for codes from 32 to 95:

When compared to the STEVE character set we again notice no difference. So we move the cursor to end of line and click the right mouse button:

to see the values for the codes from 96 to 159. As before, no change. The next screen line of the table (one more right mouse button click):

however, is different. Nothing new at first sight; only an eagle eye will find modifications in codes 182, 184, 185 and 188. The characters

are not sent to the printer as they are - they are substituted by:

One would ask - why are there two character mapping tables and not just one, for draft and NLQ mode? The reason lies in the deficiency of many matrix printers, user-defined ("Downloaded") characters are often possible only in the draft mode; so the NLQ table should be different.

To illustrate the use of this table, let us make a version suitable for the printing of the seven special letters in the German language:

From the printer manual (chapter "International character sets") we quickly find that they should be substituted by:

So we move to the third screen line of the character mapping table:

and modify both lines to:

When the table is now returned to STEVE ("Print", "Put printer file", move cursor to file beginning and left click), special German letters will be printed as required. How do we get them on an English keyboard? Just type <Shift><Alt>a, <Alt>a, <Shift><Alt>o to <Alt>s.

If moving the screen line left and right on a long table line is too difficult in the way we have used in these examples, the way to do it can be checked in more detail on page 142.

It is now time to see how the next two lines, the "Escape sequence tables" are constructed. They contain, for draft and NLQ mode, the information on how to get different printer character fonts - emphasized, condensed, italic characters, subscripts, superscripts and the like. Suppose we came upon these two lines:

The NLQ table is shorter, and if its contents (after the colon) are transformed into a sequence of numbers, through the <Ctrl><.> command (or <Beg><Blk>, <End Blk>, <Ctrl><a><n> - result at the file end) we get:

STEVE would read the table as two instructions, with the last zero terminating the table. The first instruction: instead of character with code 28 (the "NLQ" character) send to the printer 3 characters, with codes 27 (the so called ESCape character), 120 ("x") and 1. The second instruction - when the character with code 29 (the "DRAFT" character shown as a small bent hyphen, <Shift><Alternate><.>) is encountered, send to the printer again 3 characters, with codes 27, 120 and 0. As can be seen, every instruction is started by a printer control character, and a counter on how many characters should be sent instead of it, followed by the actual codes of the "ESCAPE" sequence. There may be as many instructions as necessary as long as their total length does not exceed 1768 bytes, as long as they conform to the described rule and, last but not least, they should be terminated by a zero character.

The draft mode escape sequence table is much longer:

It contains instructions for the printer controlling characters:

They start and end various printer fonts (see page 88), and are all described in the printer manual. Let us interpret the first four instructions, as usual through the <Ctrl>. command:

The instructions to start and end the double width characters both have three codes in a sequence, the start of the condensed mode has only two, whereas the end of condensed letters requires just one code (18).

DOWNLOADING

The last element of the printer table is the:

It is very short here, just codes 27, 64, 27, 82 and 0. The first two reset the printer (ESC @), while the last three select the US international printer character set. Suppose it is the German character set that is needed - as it has been installed in an example of the character mapping table modification. To request it we modify, according to the printer manual, the value 3 into 2:

The character with code 2 is not on the keyboard; so we have typed it as <Alternate>d,0,0,2,<Return>.

9-PIN PRINTERS

The normal use of the download table is, of course, not only to select the character set, but to define one's own characters, greek letters, mathematical symbols, for instance. To illustrate it, let us try to design the Welsh (and Dutch) special character

and install it wherever necessary (suppose we have an Epson FX 80 or compatible printer). From the printer manual we find that the following sets of "escape" sequences are necessary:

27 120 0    select draft mode (NLQ download is not possible);
27 58 0 0 0 copy ROM characters into user-defined set;
27 37 1 0   select the user-defined character set;
27 54       expand printable character set to codes 128-159;
            we do not want to lose the cornered brackets

27, 38, 0, n, n, descriptor, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; define
            user-defined character with code n and "descriptor".

The printable character set has been expanded so that the entire 7-bit ASCII range, characters with codes from 32 to 127, can be left untouched and the new, additional letter defined above code 127. Such a letter is usually defined using the last sequence written above, where n denotes the code of the character to be defined and where the descriptor tells us various data, above all whether the character is a descender (like g, j, y) or not. The usual descriptor for descenders is 11, and 139 for non-descenders (a, b, c ... and our Dutch letter). After the descriptor the 11 bytes of data describing the character's image, its dot pattern, come. An empty character would be composed entirely of zeros, as above. In our case the most obvious n would be 128 (the first free code) and 139 for the descriptor. We may now compose the download sequence - move the cursor to the position after the colon:

and a lot of typing follows:

<Alternate>d,027,120,000,027,058,000,000,000,027,037,001,000,
027,054,027,038,000,128,128,139,000,000,000,000,000,000,000,
000,000,000,000,<Return><Return>

The table transforms into:

The <Ctrl><.> command could now be used repeatedly on the characters from colon on to verify if all is well. The first part of the work is now done. All that remains to be done is to design the character. It would be a tedious task to count the bits, and so a short-cut is provided in the editor. As this operation is not particularly frequent, the data base setup is used to arrange what is necessary. It is requested it through:

and the first four numbers are relevant for our job:

The top number (0) tells the editor if the top character pixel has the value 128, and the bottom one 1 or vice versa (setting 1) as found on, for instance, several Star brand printers. The second number (1) is the number of bytes in the character descriptor - it is normally 1 for 9-needle printers and 3 for 24-bit ones. The third and fourth numbers describe the size of the character grid - how many pixel columns it has (11 in our case) and how many lines (this must be a multiple of 8). After we have arranged the values as shown above, we move the cursor to the descriptor byte:

and use the <Ctrl>qh (here) command (<Ctrl>q and fingers lifted from the keyboard and h pressed). At the file end such a set of lines gets added:

This is an empty character grid, 11 places wide by 8 places high. We design the desired character inside it (any non-blank character can be used, the full character - <Alternate>f - is, however, the most visible):

No horizontally adjacent dots (as instructed by the printer manual), and two empty places at the end to ensure inter-character spacing. To transform this picture into the printer escape sequence, we move the cursor to the preceding descriptor:

and the <Ctrl>qb (back) command does it. At the file end we get a line:

It is the descriptor, followed by 11 bytes with the character's graphic pattern. We move this line ("Mov Blk") past the "Download table" line:

set the cursor to the position above, delete the old pattern ("Clr Ln" command):

join the two lines ("Jn Ln" immediate command from the numeric keypad):

and delete the superfluous space to complete our line:

The character e with two dots above is now installed on code 128, where, in the STEVE character set at least, the French capital C normally resides. To have the Welsh e actually printed, it is still necessary to modify the character mapping table, the draft one:

We move to the third screen line of this table (to the right):

where the letter to be down-loaded is found. In its place we type the code which should be sent to the printer instead, the 128:

All that remains to be done is to return the updated printer file:

to editor, and the character we have prepared will be printed as required (on the keyboard it can be obtained through <Alternate>z). The same procedure could be used to prepare a set of down-loaded characters - both commands, <Ctrl>qh and <Ctrl>qb operate on one character as well as on several.

24-PIN PRINTERS

Let us add one more illustration, this time prepared for the NEC P6/P7 printer, a download of a 24 pixels high NLQ character. From the manual we copy the required starting sequence:

27 120 1     select NLQ mode;
27 58 0 0 0  copy ROM character set to user-defined set;
27 37 1      select the user-defined character set;
27, 38, 0, n, n, d1, d2, d3, c1, c2, c3, ... c84; define user character
             with code n, 28 dots wide and 24 high;
             (3 x 8 = 24, 3 x 28 = 84);

This printer has 24 needles in the printhead and so all its downloaded characters must be that number of pixels high; their width is more selectable. The descriptor is three bytes long: the number of empty dot places to the left of the character, the dot width of the character, and the number of empty dot places to the right of the character (between this and the next letter in the line). All three numbers added together must not exceed 36 for the normal, 10 characters per inch, NLQ mode. Some experimenting reveals a fairly general solution: d1 = 4, d2 = 28, d3 = 4. As the character is now 28 dots wide, and as there are three bytes for every column of graphic pattern necessary (3 x 8 = 24), the total number of bytes that define the entire image is 84 (3 x 28). It is only possible to download characters into the 0 - 127 range of codes and so we decide to use the first suitable code, that is 1 (zero is better left alone as a no-operation character). Our download table would therefore start with an empty character:

or codes (after the colon, use <Ctrl>. to verify): 27,120,1, 27,58,0,0,0, 27,37,1, 27,38,0,1,1, 4,28,4, 0,0, ...., 0. There are 84 zeros after 4, and not all of them are shown. The character grid should also be described:

The uppermost pixel in every byte has the value 128, and the first number is therefore 0. There are 3 descriptor bytes, the character is 28 dots wide and 24 dots high.

We now move the cursor to the start of the descriptor:

and the <Ctrl>qh command reveals the character grid, which we easily fill up (as has already been mentioned, <Alt>f is the full character). Let us try to design the Welsh consonant, written as an w with a roof:

We move the cursor to the descriptor line, and <Ctrl>qb prepares the 84 bytes of the character pattern:

The first 64 of them are shown above. As with the pattern from the 9-pin example, we move it up to the download table:

put the proper code (1) into the character mapping table at the place of lower case s with a reversed roof, return the printer file to editor ("Put printer file") and that's it.

The download table may sometimes, especially with 24 pin printers, be longer than 1768 bytes, which is the limit for one STEVE printer file line. In such a case it is possible to write the table as a set of lines; their number is not particularly limited. The <Ctrl>qh and <Ctrl>qb commands are then used as many times as there are lines. Care should also be taken that all lines are an even number of bytes long and that none of the continuation lines starts with an asterisk (* designates the start of a new printer table).

DOWNLOAD DOES NOT WORK

It may happen that despite all best efforts the downloaded characters do not come out on paper - just several lines of characters at random, an empty page or two, followed by the desired text, without wanted characters, of course. The remedy is often simpler than it seems - the majority of matrix printers have a set of tiny switches (DIP switches) and one of them is usually dedicated to the use of the printer's internal memory - be it for

a) the printer buffer (several pages of text usually fit into it) or
b) the downloaded characters.

It is necessary to set the required switch (see the printer manual) to the "download" position. On some printers with non-volatile battery powered memory (like several OKI models, NEC P6 plus, for instance) the setting is not through such hardware switches, but through the similar setup pocedure (again see the printer manual).

VIII. VARIA

CHANGING POSITION IN THE FILE

Before we move on to the "Varia" selection let us have a look at how we can quickly jump to another position in the file. The selection found right at the end of the main menu:

is not there because it is little used, but so that we can reach it faster. After the mouse has been moved to the upper right-hand screen corner to get the main menu, it is this selection which comes first to hand. It could be described as "Up and down the file":

The first column in the frame on the right-hand side of the screen (it has no numbers) shows the amount of memory used and how much of it is free. In the above example it can be seen that a bit over three quarters of the memory is occupied, and that one quarter is still available. The second column, which is labeled on one side, tells us the current location in the file.

From the position of the dotted line we can see that the current line is close to the file end, about 97 % from the beginning.

And how do we go somewhere else? We move the mouse, and as we do so the dotted line moves, too - to the half-way point, for instance:

After the left mouse button has been pressed the screen jumps to the middle of the file. To see its beginning or end the dotted line should be moved up to 0 or down to number 10 and - click.

The right mouse button can be, as usual, used to escape from the command.

Another way to move around the file is to jump to the specified line number. It is described at "Find", "Go to line".

VARIA

A lot of STEVE functions are available through the middle entry of the main menu:

SCREEN FONT SELECTION

First in "VARIA" comes the possibility to select between different screen character widths:

Up to now we have seen only one screen character font, the one with 64 places per screen line. It is the most pleasant to the eyes, and the splendid ATARI ST's monochrome monitor really comes into its own with it. 64 letters per line is also the standard setting for writing letters and manuscripts; as most matrix printers have 80 characters in one full line, 64 with some border to the left and right are just what we need. STEVE, however, provides at least seven additional screen fonts with 40, 48, 71, 80, 96, 137 and 160 characters per line. The fonts with 64, 71 and 80 characters per line are all fast, performed bytewise, while the others are brought on screen pixel by pixel, and are therefore considerably slower, though still quite on the acceptable side.

After a new font has been selected, all the text in the file is shown this way - at the time being it is not yet possible to combine various character widths in one line.

Let us now illustrate various fonts (40, 48, 64, 71, STEVE 80, ATARI 80, 96, 137, 160 cpl) with a "Tarragon roll" or "potica" (pronounced potitsa) recipe. The dish is very easy to digest, most pleasant to the palate and can even help keep stay slim:

How can we modify the character layouts for various fonts? It is as easy as with the standard font (the 64 and 71 fonts are both generated from it) and is described under "System", "Get system table", "Screen character set".

TRAVELLING THROUGH THE FILE

Let us now have a look at the other selections from the "Various" menu. The next to come is

It gives us an opportunity to scan the file in one of two directions - up and down (or forwards and backwards). After we click the left mouse button, there is the following table to select from:

It is possible to list the file in four ways: up, down, page by page or line by line. Down means from the current file position towards the file end and up back towards file start. Suppose we select:

and the file starts to scroll forwards, screen by screen, as fast as possible. The movement stops when the editor has reached the file end (the bell rings as well) or if the mouse has been displaced. The left mouse button can then be used to continue. Similar considerations hold for "Up page by page": travel stops at the file start or is interrupted if we move the mouse.

When travelling line by line the interrupt has to be a bit stronger - it is necessary to press either of the two mouse buttons.

SYSTEM SETUP

There are two selections in the "VARIA" main menu entry which deal with various general parameters that can be set in STEVE:

The first of them gives the following palette to choose from:

As it is perhaps the first setup selection, stumbled upon in this manual (there are the "Find" and the "Printer" setups before, but who reads the manual from beginning to an end anyway?), let us devote some time to general considerations.

The usual way to leave such "setup" is to press the left mouse button inside the "EXIT" box or to press the right button at some empty, meaningless location on screen. Within all "setup" selections, it is also possible to modify the status of any framed word - it can be turned on or off (left mouse button), and numeric values can be increased or decreased (using both mouse buttons). Discrete settings which have a colour different from the background are valid, whereas others are not.

LEFT MARGIN is normally set to 0. It influences the <Return> command and the word wrapping at the end of every newly written line. If set to some greater value, say, 5, <Return> key, for instance, won't jump to the beginning of the next line but to the sixth position in the next line (5+1, numbering here starts at zero). In combination with "Adjust right margin" of a rectangular block (see page 23) this capability can be used to write indented parts of text or columns directly.

RIGHT MARGIN, which could also be called line width, is usually set to 64, which is suitable for writing letters or other text where standard left and right margins on printed paper are desired. If wider lines are necessary (wide carriage printer, some big tables to print ...) there are two ways to solve the problem - to make the screen characters narrower (see the "Font" selection) or to shift the screen to the right and left in a file with long lines. Suppose we want to retain the standard characters and use a 132 characters wide line. The cursor has to be moved to number "64" and the left mouse button held down till the number comes to 132:

The number, should it grow too big, can be decreased with the right mouse button held down for a while. We now exit ("EXIT") and, to make things easier to see, let us type some numbers to mark the positions in a line (see also the <Ctrl><a><u> command, "Immediate commands" chapter):

After we press the dot at position 64, the screen shifts by ten places to the right, so that we can type on:

Let us continue to 130 (if we use the "Join lines" command - "Jn Ln" it is also possible to reach the true position 132):

and finish the line with <Return>. The editor moves back to line start. We may now enter some data to see who is in charge, where and which month:

The table will not fit on the screen with characters that big, but we can shift right and left. Let us first inspect the summer months, from May to September. We move the cursor to the right until it passes over the screen boundary. Had we set the line width to 64 characters, the cursor would have stopped at the screen edge; now it goes on, only modified into a vertical dotted line. It is now moved from the left towards the right until it is just in front of the word "May" - to shift it we press the left mouse button here:

The right mouse button, pressed any time while we have a dotted cursor line, would abort to our old cursor position. We have clicked the left one and the screen moves to positions from 52 to 115:

To see the right end of the list, we move the cursor on:

It can be pushed up to position 69; as we have set the line width to 132, it will not go further. We press the left mouse button, and the end of the year is here:

To move to the left the same technique may be applied. After the cursor has been pushed over the left screen boundary it turns into a dotted line again, which can now be moved from the right to the left:

We click the left mouse button after September, to see the table that far:

To return to the beginning of the line we move the cursor to the left as far as it will go (up to N in JUNE), and press the left mouse button for the last time. The screen is now back where we started from:

Travelling back to the start of line can also be made much simpler - the <Return> key does it in one go. In the same way it is possible to move along graphic lines. Pictures may be up to 14.400 pixels wide (up to 22 screenfuls), which comes in especially handy with map processing; the laser printer page mirror size is approx. 2.400 x 3.400 pixels. The other way to handle wide lines, is, as already mentioned, the "Font" selection from the "Main" menu.

One note with regard to wide carriage printers: they will print 132 pica characters in one line, provided the left margin (see "Printer setup" from "Various") is set to 0.

To move on, let us now return the line width to 64:

SCREEN COLOUR is the next selection after line width. It is set to black. To make it white, move the mouse to "light" and click it:

After leaving the setup ("EXIT"), the screen will be white with black characters. The SM 124 or SM 125 monochrome monitors provide a superb image, even black on white, but it is still more recommended to have it white on black. Experience of what happens after twenty years of monitor screen watching, several hours a day, is still scarce. However, it is clear that, disregarding the radiation of white screen parts, the nerves of the eye have a lot less to do if only the letters have to be stabilized, and not the entire screen.

TEXT COMPRESSION comes into play when text in the file has been compressed to save space and we now want to edit it a little bit, modify some lines, write several new ones. If the setup setting would remain

all the modified and new lines in the file would be stored uncompressed. To avoid this "YES" should be set (also see "System", "Compress text").

RIGHT KEYBLOCK MODE is next, and it is normally set to:

"Numeric" selection will return the right block on the keyboard, normally reserved for frequent editor commands, back to numbers.

FILE MODE WHEN SAVED feature will change the format of the file that has been saved to disk. The usual

setting may not be suitable at all times. If the file mode has been switched to "ascii" the file will not be saved through

in the STEVE format, but as an ASCII file. This would normally be done when STEVE is used as a source program editor (STEVE's assembly source has, as might be expected, been edited this way). The other way, not much more complicated, would be to use the "Extended disk menu" from the "I/O" main menu selection.

INTERMEDIATE SAVING often comes in handy. The setting will tell the editor when to save the text we type. If it is set to

the file saving is exclusively up to us. To save it we select "I/O", "Disk menu" and "SAVE FILE from MEMORY to DISK", we type the file name and the file is secured.

Some people, the optimists, prefer it that way. Under certain circumstances, however, this procedure can be dangerous. Suppose we have been typing for a couple of hours and then, who knows why, the power goes off. It may also happen that the machine "gets stuck", maybe by an air conditioner turned on next door, or a child has kicked the computer desk a bit too violently. There are many possible reasons, and the consequences are always the same - a lot of work turned to nothing.

To avoid such trouble it can be worthwhile to set the "Intermediate saving" to, say, 50 lines. Every 50 lines we type in or modify, a new copy of the file will supersede the old one on the disk: the name has been given to the new file after the memory has been cleared with <Ctrl><q><k> command at the file beginning or, after it has been saved to disk. With a file that has been read from the disk and edited, the original name is retained. So, after these 50 lines have been written or modified, we receive a prompt at the bottom of the screen:

The diskette starts turning, and until a new copy of the file has been saved it is better to wait. For files several pages long it takes a few seconds to save; for files several hundred pages long a hard disk is required to save in seconds - on a floppy, it may take a minute or more. This is why it is not wise to set the intermediate saving to, say, every 5 lines.

What safety margin have we achieved? If a power failure occurs immediately before the saving, 49 lines are lost, otherwise less.

One more tip: a short-cut to be used at the prompt which comes at every intermediate saving after the file is on disk already:

Do not use the mouse but just hit the <Return> key.

CONNECTED DISK PARTITIONS is an entry which is used with chained data base operations in case the chain size exceeds the 16 Mb hard disk partition limit. Suppose that we have an 80 Mb hard disk drive and would like to connect three partitions, the C, D and E, each 16 Mb long, into one, 48 Mb long continuous disk space. We select C as our current disk drive:

followed by the setup setting of

The activity light on the hard disk would turn to some real action and after ten or so seconds the partitions would get connected. Disk directory would now open a slightly different picture:

Every file now also has, besides its name, the disk partition as well (C, D or E). Now every disk saving, including those in chained data base operations, will save to the first partition of the three that still has sufficient disk space. To return to the usual mode (folders are not directly accessible in connected mode), the value should be set back to:

ADDITIONAL MESSAGES. A lot of editor prompts consist of two parts: the basic message, and an explanation in the frame below it, as with

After this

explanation frames will no longer be displayed.

NUMBERS definition:

tells the editor how to read numbers when adding (see "Addition" in "Varia" a bit further on) and how to write the results. When "Sums" setting is used, dots will be inserted after every three places to the left of the decimal point, i.e. 2.363.450.50.- (not 2363450.5), and all numbers must be either whole or have two decimal places. With "Usual" numbers, there may be any reasonable number of decimal places and the decimal point is the only dot (such as 2363450.5).

PAGE PREVIEW MODE is a DTP-related setting. It tells the editor if the standard, printer-sized page character fonts are to be used, which is the usual choice:

or if the twice diminished fonts are to be used. The latter is used if the greater speed is required during the page preview or, if manuscript should be prepared on a 1 Mb machine (in diminished mode of the page preview only 241 K of RAM is necessary for a full A4 page instead of 965). For more detailed explanation, see the DTP chapter.

MAKING SETUP CHANGES PERMANENT

To make the values selected during the "System setup" permanent (they are stored in the "system variables" portion of the STEVE.RSF file which during processing resides in computer RAM) it is, as already mentioned with printer tables, enough to insert the "STEVE" diskette or move to "STEVE" folder on hard disk and click the last keyword from the "System" menu:

SYSTEM SETUP, PART II

There are too many settings to fit in one menu and therefore an

is also provided. It allows nine more interventions:

ROPES are two delimiting lines, at screen top and bottom. They give text on screen better hold:

but can be disturbing to some users, especially as the cursor is not seen very well when in the "rope". When set to

both ropes disappear from the screen.

CONTROL KEY can be a nuisance, too. Some typists, especially those using all ten fingers, can hit the <Control> key by accident (instead of the <Shift> key), causing trouble, as this key is normally connected to some immediate editor command. For such occasions it may be suitable to disable the key - if set to

such commands are ignored. The other use of the "OFF" setting is when an additional keyboard is board is needed; "OFF" turns the <Control> key into an extra "Alternate" key, using the first line of STEVE's keyboard table:

(also see "System", "Get system table", "Keyboard"). As seen, it is normally a copy of the lower case table but may, if needed, also be used for special national letters or other symbols not provided on the "Alternate" table.

PICTURE MODE tells the editor what part of a picture to take when entering graphics. On most occasions the

setting is valid as the pictures we usually have fit into the available memory of the computer. As pictures are stored, if not requested otherwise, packed, they require the space for their full bit-image only during graphic editing. So it may happen (pictures can be easily put together in STEVE), for instance, that a ground-plan of the Postojnska jama cave, a small unretouched section of it (Big Mountain, courtesy of the Institute for Karst Research, Postojna) is shown below:

This plan has been input in parts by a scanner, and takes in its compressed form just 378 K, though measuring 16236 x 4560 pixels (y by x). When edited in graphics, however, the picture would expand to its full bit-image size of 9.254.520 bytes (16236 x 4560 / 8), too big even for an ATARI Mega ST 8, if one existed. In such circumstances a picture can only be edited block by block and after the setting of

we put, say, one third of the picture into a block (<Beg Blk>, <End Blk>) and the graphic editor of STEVE will then know that the image should be processed "per partes" (see also the "Graphics" chapter).

DIRECTION OF WRITING is normally set to from-left-to-right ("L-R"); the other possibility, from-right-to-left, required by Arab or Hebrew handwriting, for instance, may also be selected. It enables the mirrored displaying of characters as they are typed, from the right of the screen to the left. The required characters are not present in the basic STEVE character set but can, with moderate effort, be entered by the user (see Character set chapter, page 103). To transfer such a text to paper it is necessary to convert it to a picture (see Graphics) and print it as such.

BLOCK TYPE - a block in STEVE is normally a group of adjacent lines - it can be only one line long or it may span over the entire file. As we have already seen in the "Getting started" chapter it is, however, also possible to handle blocks which are rectangles of text, particularly useful while processing text in columns. To request such blocks we can use the <Shift> key with immediate block commands from the numeric keyboard or set the "Block type" to:

Let us illustrate the case with one more example. Suppose we have written the address at the top left corner of a letter:

and would now like to move it all to the top right corner. We mark block beginning ("Beg Blk" key on the numeric keyboard) on "T" (block's left upper corner):

and block end at its lower right corner ("End Blk" key from the right-hand keyblock):

The editor now changes the colour of the block to show that it has been marked:

The cursor may now be moved to the place on screen where the left upper corner of the moved block should be:

and the "Mov Blk" immediate command from the numeric keyblock does the rest:

Most commands from the "Block" menu are operational on rectangular text blocks:

Two missing commands, operational only in the "Line-to-line" mode are the "Save block to disk" and "Delete complement".

Rectangular text-block size can be much greater than in the previous example - it may span over many pages and is limited only by the available RAM size. Before "Copy" and "Move" commands are performed, for reasons of speed, an additional copy of the block is made in the free RAM, which must be large enough to accomodate it. Another point to take into consideration is the fact that while moving or copying rectangular blocks no additional lines are opened in the file. If there is some text already in the target position, it will be overwritten; it is therefore necessary to open enough empty lines before, for instance, undoing columns (with "Move").

DROP-DOWN MENUS are a feature standard to all GEM-based programs. STEVE has its own user interface, where it is possible to select the way the main menu entries come to the screen. The alternative way to bring the submenus to light is

which requires clicking on an entry before the menu drops down. As some STEVE menus are rather large - "Dbase" menu covers most of the screen - this is preferred by some users.

FILE SORTING CRITERION deals with how the files in the disk directory, accessible through the "Disk" or "Extended disk menu", will be sorted:

according to name, age or size.

BINARY SEARCH is the fastest available; it operates on sorted lists and is explained under "Find" main menu selection. With the following setting

we tell the editor if the lines in the file, where the search will be performed, are shorter than 256 bytes or not. If they are longer, which happens most often with chained files (see "Chained data base commands") a slower algorithm for record start location is required with the binary search, selected by "YES". In such a case the file or chain of files should also not be compressed.

LINE SCROLLING - there are two ways to scroll the lines in STEVE:

"smooth", which is very pleasing to the eyes and comforting to the nerves and "jumping", the way most other editors do it, faster but more stressful.

FILE OVERVIEW

The next selection in "Varia" after "Additional setup" is the "Spell checking", but let us get acquainted with

first, as it is needed to load the spell checker's word list. As already mentioned, it is possible to edit up to ten files at the same time, i.e., ten files can reside in the computer's memory. The command gives us a short overview of what we currently have there:

As can be seen, only the first file place is occupied - the file "novel" is currently being edited (its name is shown in reverse colour) and it is 183.736 characters long. Its length is also shown by a horizontal bar - if a file occupies the entire available memory, this bar would reach to the right-hand edge of the screen. The other nine file locations, to which STEVE has given the names file2.stv to fileA.stv, are all empty. To use the spell checking, its data base should be loaded from disk to file place number 10. We move the cursor there:

click and an empty file appears on the screen:

Our novel is gone. It has remained in place one, while we have moved to place 10. It is now time to load the list of correctly spelled English words:

will be selected, followed by

As can be seen, all the empty space in the memory (321 K in our case) has been allocated to the file place we have selected (place 10 with the default file name "fileA.stv"). After the disk operation is complete, we get the beginning of STEVE's English vocabulary on screen:

It is an ordinary STEVE file, except compressed to save space (see "System" and "Compress text"). It could easily be made up from some user's text (see "Dbase", "Break file into words", "Block", "Upper to lower case", "Dbase", "Sort"). "File overview" now gives us a different picture:

Place number ten has changed the name of the file from "fileA.stv" to the name of the file we have read from the disk: "SPELLING.ENG". It is 233.122 bytes long. Now we can move back to file #1, move the cursor to box #1, click,

and continue editing of the novel. It is also possible to move and copy blocks from one file to another. The immediate command

<Ctrl>acx   will copy the block from file #x (1,2,3,...,9,0) in front of the current line in our current file, and

<Ctrl>amx   moves the block from file #x in front of the cursor line.

There is also a different and quicker way to travel from one file to another. It is performed through the

<Ctrl>n   command, where n stands for the target file space, 1 for file 1, 2 for 2, 9 for 9 and 0 for file 10.

So, to make file 10 our current file, <Ctrl>0 should be typed (<Ctrl> is an abbreviation for the <Control> key).

SPELL CHECKING AND TRANSLATION

It is now time to see, how the

and word by word text translation is done. The first thing to do, as just described in "File overview", is to load the list of correct words into file place #10. The list is supplied on the STEVE disk and its file name is "SPELLING.ENG" (for the English language). After it has been done and "Spell checking" selected from "Various", a short menu is shown:

Suppose it is the immediate spell checking we are after - the program should verify every word as it has been typed. After the left mouse button has been pressed, and the

message has been read, we proceed with the text to be checked:

All went fine until <Space> after "nummers" has been pressed. The cursor stops, the bell sounds and is it up to us to decide. The word is wrong, so the mouse comes into play and we correct the second "m" into "b". The next sentence, however, contains a correct word, which is not, however, included in the vocabulary:

If it is likely that Valvasor will appear several more times in the text, it would be wise to add the word to the vocabulary. The <Return> key inserts it there, and we move on. If it is not wanted, typing may continue. The insertion of a word into the vocabulary takes less than one second (for the list of 30,000 words, as supplied). If spell checking is no longer necessary, it should be cancelled through:

Let us now explore the next two entries in the list: "Check file" and "Check block". They come into play when the text has been typed without on-line verification and the entire file, or a portion of it, is to be checked. The following verses, again from Mark Twain's masterpiece:

are not bad, but not quite correct either, at least as far as our spell checking is concerned. We make a block of it and after

has been selected, a line counter starts moving at the screen bottom, and in no time we get the message:

The block contained four lines and four words unknown to the spell checker. After pressing the mouse or any key the following text is shown

with the unknown words marked. Each of them has an additional "**" pair; so it is not difficult to find them ("Fnd" command on the numeric keypad). How to insert an entire batch of new words into the spell checker data base is described under "Dbase" selection from the main menu.

Block verification is fast, and file verification even faster. In the case of large blocks (over 100 K) it is therefore preferable to move it to another file (see "File overview") and check it there as a file.

Spell checking can thus be used to make a cross-section of two large word lists or, a complement of a cross section in one or another.

The last two entries from the "Spell checking":

can be used to translate words from one language to another, either the entire file of text or just one block (of a "Line-to-line" variety). The dictionary has to be of 1:1 type (one translation per entry) with first field all in lower case - a simple English-German is supplied on the ENG_GER.TRN file on disk - and like the spell-checker data base, loaded into the file number 10.

Let us illustrate the facility by two simple statements:

and suppose that the above mentioned file (ENG_GER.TRN) is already installed in the file space #10. We make a block of the two lines and select the "Translate block". In a short time we obtain the message:

and the word by word translated lines:

LINE STATISTICS

is the next

"Varia" entry. It tells how many lines of various types there are from the file beginning to the current line (the editor asks the user to click on this line). Let us illustrate this with two examples. At the first one:

we click at the last line (with cursor) and obtain the following message:

Pictures in STEVE are composed of lines as well as text, and the first is 8 lines high while the second, octopus, 5. For the second example, suppose we had used the command on part of this manual which has been stored compressed:

There are 2439 lines in total, 912 graphic ones and 1527 lines with text - 1044 compressed and 483 uncompressed. Why are so many of the latter variety? STEVE stores empty lines as two ordinary spaces, even if the file is compressed; as all lines must be an even number of bytes long (the editor adds a space to line end if the line originally had an odd length) it would be of no use to compress blank lines. The even-long-lines rule has been applied to get the maximum speed out of the MC 68000 microprocessor - one of its virtues is the capacity to move 16-bit entities around quickly.

CALCULATION

is also possible, in text, like most other operations. There are two entries in the "Varia" submenu for this purpose:

The first, "Calculator", performs, as the name suggests, simple tasks that are usually done by a tiny, hand held, credit-card sized device. We write an arithmetical expression simply as a text line:

for instance, and select the

The program now asks the user to show where on screen the numbers to compute are:

We move the cursor somewhere in the arithmetic expression to be computed (not necessarily in the middle):

and press the left mouse button. The computed result is now stored on the right:

Spaces in the numeric expression are optional; they are all discarded before the computation takes place. So the expression:

produces exactly the same result (495) as the:

If there is some text or numbers in the same line before or after the expression they should be clearly separated, by a colon, semicolon or some other delimiter (not a comma) which cannot be part of the formula. The line:

would be "calculated" into

which is correct, while the statement

brings an unwanted figure of 6687 ( = 1987 - 2500 + 700 + 7500 - 1000).

STEVE calculator is familiar with the usual arithmetic operators:

+ addition, - substraction, * multiplication, / division, ** power, some of the standard functions:

abs (absolute value), fint (integer part of), fract (decimal part)
sign (two arguments, separated by comma: arg1 times sign of arg2)
sqrt (square root),
alog (natural logarithm), exp (exponential function)
sin (sine), cos (cosine), atan (arctangent)

and the constant pi (3.141592653590).

Numbers can have up to 12 decimal digits and the result is saved with the greatest number of decimal places, encountered in the expression:

STEVE calculator can also be called immediately, without the menu, by moving the cursor to an expression and using the <Ctrl><a><a><c> command from the keyboard. For convenience the command is also accessible through the function key <F5>.

ADDITION

on the other hand, opens a submenu of three entries and the first of them,

gets the editor ready to add, subtract or compute percentages, in a different way than the calculator would do. Suppose we have written three numbers:

in the usual commercial fashion, and that we would like to obtain their sum. After ""Start to add numbers" we get the message:

It is now necessary to move cursor to every number to be added and press the left mouse button there. We click the first one:

It has changed colour to tell us that it has already been added. We click the second and the third number; the sum is computed but not yet visible. Suppose we want it two lines below the third number - we move the cursor to the end of the result space:

and press the left mouse button:

The sum is now stored in front of the cursor. Had we moved the cursor to the line start and clicked to get the sum there, it wouldn't have worked:

"Add" will also compute percentages. Suppose we have the following:

We click the sale value first and "7" afterwards. The cursor should now be moved to end of the line:

and the left mouse button pressed to get the desired number:

To compute the amount to be paid click the 100.500.- and -7.035.-.

STEVE will add sums or ordinary numbers. Sums must be either whole numbers or have two decimal places; with ordinary numbers there are no such limits. Sums may also have full stops after thousands, millions and the like and a ".-" at the end. How the numbers will be added - as commercial sums or ordinary ones is up to us - see the selection below:

Addition and subtraction are accurate to 100 decimal places and percentage computation (multiplication) to 50. After we have added up all the numbers it is time to move back to the normal mouse operation:

Without "End of addition" the left mouse button would continue to search for numbers to be added and the following prompt would continue to bother:

ADDING COLUMNS

The third "Addition" entry deals with summing up of vertical columns:

Let us write down the following set of supershopping numbers:

and let us make a rectangular block of it - <Shift><Beg Blk> at the "1" of 130, <Shift><End Blk> at "5" of 39.95

There are seven numbers to add and one to subtract. The selection:

pops up the above prompt which asks where in text to store the sum. We click two lines below the last number:

and the sum lands on the spot:

As with the serial addition of numbers one by one it is important that there is enough room to the left of the cursor when the sum is called for. Length of column is not particularly limited - several thousand numbers can be added in a short time.

There is also an immediate command to add rectangles - it is the <Ctrl><a><a><l> and the sum will be stored to the left of the current cursor position.

INSERTING BLOCKS

The next entry in the "Varia" menu, the

will obviously insert something into our file. Let us just try to press the left mouse button. The screen is cleared and the following selection pops up:

Let us have a look at what is hidden behind the first one:

After we have clicked (the left mouse button) the editor asks us, as with line spacing selection ("Print" main menu entry), in front of which line to insert the "end of letter":

We move the mouse and click on a chosen line on screen (any will do) and obtain the following:

passage. Evidently the text could often be used, and so someone has prepared it to be readily available, without typing (one only need change the date). There may be many such passages (63 names are shown on screen at a time, clicking on "More?" brings the next 63) and it is very easy to modify the old or add new - see "System", "Get system table", "Blocks". Such blocks may also include pictures and can be of variable length - from one line to several tens of pages or more.

GET ANY CHARACTER

has already been mentioned several times. It opens the full STEVE character set (256 values in all):

Any character from the STEVE character set can now be pointed to, chosen using the left mouse button and put into text at the desired location with another left click.

TERMINAL

A modest terminal (TTY, VT 52) emulator is also available in STEVE:

The setup is currently used to modify the Baud-rate only; other parameters (parity, number of stopbits etc.) should be, if necessary, set outside, before entering STEVE, using some Desktop accessory.

selection starts the receiving and sending over the line (directly or through an acoustic coupler or modem). All the text coming in is stored at the end of the current STEVE file so that it can be edited later.

<Help> key can be used to modify the Baud rate while communicating and
<Undo> key returns from terminal mode back to the editor

During emulation the 10 function keys can be used (if set to some useful values), as well as the abbreviations (for both see "System", "Get system table", "Function keys" and "Abbreviations").

It is also possible to send a block from the current file over the line: "<(><)> <Clr Home>" key sequnce does the task (open parenthesis, closed parenthesis (both from the upper row of the main keyboard, not the numeric keypad!), "Clr Home").

And how to send pictures? A special "Terminal raw" mode of file writing and reading has been introduced to serve the purpose. It is explained under "Extended disk menu".

IX. FORM PROCESSING

Screen data entry is one of the most frequent tasks, especially with data processing, and in the "Dbase" chapter we shall see how it is usually tackled by STEVE. It is done through a screen data entry layout composed of field names, terminated by special angular colons. The layout is user designed or, like the one for addresses:

can be selected from the supplied set. We type field by field and the <Return> key at the end of a value jumps to the starting point of the next.

There is, however, another way to enter data with STEVE, for many applications an even more satisfactory one. The data record is not typed on a uniform background (black or white), but on a background form, designed by the user through the graphic editor; either STEVE's own or some special program like DEGAS. Let us now have a look at one of the two forms that come with the editor, the "Mail order". To do so we first make a few arrangements:

followed by the screen font selection (it should be 64):

For the first form try we clear the memory:

and finally select the form:

Click on "Mail order" and a screen pops up, which is not plain white but has a picture of that form as a background. We start typing the values and <Return> is used to jump from field to field:

<Return>, typed on the place shown above - after the data is complete, would open up the next form. We also notice that the cursor is smaller than usual - one pixel of it is missing above and below, on the left and on the right. The characters displayed on the screen are made from a smaller matrix as well - 16 x 8 dots instead of the usual 18 x 10; they have, however, stayed in the same places as they would have otherwise. Reduction, which is most visible with descenders, like g or j, has been introduced to enable lines (up to two pixels wide) to be drawn between rows of text. The immediate commands "Delete line" and "Insert line" are no longer available when processing forms as they could spoil the record and all subsequent ones. It is possible, however, to delete some background features if for instance too many spaces have been typed. In such a case the background can be restored through the <Ctrl>z (restore screen) immediate command.

Let us now have a look at what else the "Form" submenu has to offer:

The first of the entries, the

does not open another menu to select from, but inserts an empty form before the current one.

is of help when there are two documents with nearly all the fields the same - maybe only the amount or aim of payment are different - and we do not want to type the same thing over again. The "Copy" command makes a copy of the current record immediately after it. Such a copy is then modified to obtain what is wanted.

selection has a moderately destructive effect. It deletes from the file (there is no way back) the current form with all its data.

are self-explanatory, an analogy to "Page Up" and "Page Down", while

selection tells us how many forms there are till the cursor, and at which line of the current record the cursor now rests (forms may, if necessary, be longer than one screen). When the command has been selected, we are asked to click on the desired line and we get a message like:

There are ten forms so far, and we have clicked on the sixth line of the current one.

entry is different from the other commands we have seen before. It deletes the graphic form background. From the mail order, to be paid by Mr. Bennett, typed in at the beginning of this chapter, we get an ordinary text:

which is not as self-explanatory as it was before. During the testing of a new form, when it is necessary to move from the test record to the "Screen forms" system table and back, this command is indispensable.

command helps to bring data, fairly scattered around a form, into the free shape as understood by STEVE data base commands. "To data base" regroups all the records in a file, and returns to the normal editor mode.

The command would translate the form on the previous page into:

The records may now be sorted, searched through by a query and so on.

ABBREVIATIONS

Let us now devote a word or two to the application of abbreviations with forms. As we shall see a bit further in "System tables", "Abbreviations" (page 203), an abbreviation in a dictionary has always been written all in upper case as the first field of a data record, followed by interpretation as the second field. Abbreviations destined for forms may have an additional, third data field that will be placed in the field after the current one. Let us illustrate this with our example. We request the abbreviations file:

and update it, at the proper place to maintain the alphabetical order, with Mr. Bennett's post code and address:

The line is longer than 64 characters and so it is not shown complete (the abbreviation record must all be in one line). We now return the updated abbreviations file back to the editor:

and when the mail orders have to be entered the next time:

the new abbreviation can be used straight away:

We type just "gb", followed by the <Clr Home> key, and fields one and two expand into:

DESIGNING A NEW FORM

And how do we design a new form? An example is given on page 224 - we call the "Screen forms" system file:

and supplement it; we shape the first part of the forms's description as text and the second part as a picture - either with STEVE's own graphic editor, or using some specialized graphic program (see the "Extended disk menu").

Care should be taken that lines between rows and columns are not wider than two pixels, and that they are in their proper places. As a sample, the "Transaction list" (supplied within the program) may be used:

All the lines here are one pixel wide, while some on the mail order are twice as thick (the lines below the addresses, for instance).

A final remark on printing records entered through the "Forms" facility - it is best if proper preprinted endless or sheet stationery is at hand. When properly positioned in the printer and with a really matching screen form, the values get printed precisely at the places where we would like to see them. It is, however, recommended to try the whole thing out on a form or two first before sending the lot to the printer. In the case of a matrix printer and a multi-copy form, it is also advisable to use an emphasized printer character font - it can be requested through <Alternate><c> from the keyboard.

X. SYSTEM

The next entry in the main menu deals mostly with the more or less internal affairs of STEVE, with its resources that are nearly all open for the user to modify and tune to his needs. The first two selections:

not available in the standard version of STEVE, are connected to batch processing which is explained in a separate chapter with the same name.

TEXT COMPRESSION

STEVE can store text lines in one of two modes. The first of them, the usual one, is similar to the method used by the majority of other text editing programs - every letter or special character occupies one byte (8 bits) of computer storage. On some occasions, when the space is running short or the hard disk is desperately full, for instance, or the data base to be sorted is just a bit overlong, STEVE's other method of text storage can be brought into play. It makes use of the commonly known fact that some letters in text are more frequent and some less. Without any special information theory research, it is immediately visible that a space is the most frequent character in a text file, that vowels are more common than consonants and that between the latter there are great differences as well. Several consonants, like n, r, t, s or c are present in virtually every sentence, while others are not.

In the compressed mode of text storage STEVE takes only 4 bits (half a byte) for any of the 12 most frequent characters, one byte (8 bits) for every character of the 32, ranked on frequency after the first 12, and 12 bits (1.5 byte) for the other 212 exotic, rare characters from the set. In this way approximately 25 % of space is saved with ordinary texts; with files containing only upper case letters or mostly numbers (tables, spread-sheets) the saving can come close to one half.

And what do we do to squeeze the file together in the computer's memory as well as on disk? If we plan to make further transformations on such a file before saving it to disk, for instance a data base operation like sort it is necessary to tell STEVE first that from now on all the text, even when edited, should be kept compressed:

If we want to compress the file just to save disk space, the above setting may remain to "NO". We may now select the:

command. It takes about a minute for an 800 K long file. When finished, it is wise to SAVE "STEVE.RSF" file as well. The file now has an optimally compressed structure (with respect to its characters) and all the lines we type anew will be compressed as entered. If a new copy of STEVE.RSF has been made, the same method of compression will remain active for all our future work. If a compressed file is stored to disk in a normal (STEVE) mode, the information on the 44 most frequent characters is written in the file header so that space is saved on disk as well. Which characters these are can be seen through the <Ctrl><u> command. When called, we get a line like this on the screen bottom (in case the text from this manual has been compressed):

A space is found in the first place (the program will always place it on top, even if it is not the most frequent), followed by other characters that occupy 4 bits (e to d) and those that take 8 bits (c to P).

Let us now see how the whole thing works in practice. Suppose we have 15414 lines of text in our file - most of this manual without pictures (the easiest way to discard them is to save the file to disk, or at least pretend to save, as an ASCII file - SAVE ASCII entry from the extended disk menu). The disk menu reveals a memory picture (obviously made on a Mega ST 4) where the file, stored in a standard way, occupies 705 K of memory:

We now compress it:

There is a snow storm at the top of the screen - the program computes the frequencies of individual characters (from the set of 256) in the file; after this is over, the line counter starts to roll:

In some 50 seconds the task is complete, and the disk menu now offers a more pleasant view:

The file is shorter by 249 K, or 35%. Before compression it would not fit onto the available diskette, now there would be some space left.

And the trade-offs? Weak points? There is no apparent difference in speed when typing in new text, when editing or scrolling through the file; it is in searching that loss of speed can be noticed. The "Find" command will search through 100 K of uncompressed text in one second; the same amount of compressed text takes five seconds to get through. A similar consideration is valid for the data base query, yet with a considerably smaller difference. File compression is also very suitable for vocabularies (spell checking, bilingual dictionaries) as the binary (dictionary) search is performed with no significant speed difference.

TEXT DECOMPRESSION

command will restore the file to its usual state; provided of course that there is enough free memory available.

XI. SYSTEM TABLES

are a set of over 30 user modifiable internal files, connected to the STEVE user interface and its whole environment. STEVE itself currently comes on four files - "STEVE.PRG" contains most of the editor, written in MC 68000 machine language, "STEVE.AGR" contains the additional graphic editor, again in machine code, "STEVE.PIC" keeps the editor's front screen whereas in the "STEVE.RSF" all the editor tables, which are not part of the actual program, are stored. It includes pictures of all screen characters, keyboard setup, messages through which the editor communicates with the user and so on. In the STEVE.RSF file, a copy of which during a STEVE session is also kept in computer memory (not only on disk), there are 36 such tables, or system files, and it is possible to modify them all; most of direct interest to the user are accessible through the

selections. The usual procedure would be to call some system file from STEVE.RSF to the end of the current file that we are editing ("Get system table"), modify it, and put it back to memory copy of the STEVE.RSF ("Put system table") and thus to STEVE itself. Anyhow, we click on "Get system table" and a list of system files opens up on screen:

BLOCKS

First comes the table that contains the frequently used text blocks, which can be inserted at any file line through two mouse clicks (see "Varia", "Insert text"):

A click and at the end of our current text some more lines show up:

It is the "Blocks" system file, composed of five units:

and ending, as most STEVE system files, with two double-zero-character lines:

How to get them back if destroyed - see "Print", "Break file into pages" or, for quick remedy, use the:

sequence. Let us now try to add another entry (suppose we use it often) at the end of the "Blocks" file:

We put it back to STEVE:

and, when asked to show where the "Blocks" table start:

click at the first line:

The next "Insert text" selection now gives a more complete choice:

where the ad text passage may also be taken from. In case of more than 21 documents the names are, as usual, displayed in two or three columns; in the case of more than 63, there is a "More?" selection to click.

And how to make the new "Blocks" file permanent? To get it whenever we start the computer? First it is necessary to have a diskette with a working copy of STEVE inserted, or to move to the "STEVE" folder on hard disk. Next comes the last selection from "System":

The command is executed: a new copy of the "STEVE.RSF" file is saved onto the "STEVE" disk, and the old one discarded.

The last thing that remains to be done is to get rid of the copy of "Blocks" table that is still at the end of our current file. We move the cursor to the first line of the table, the

and get rid of the lot through the <Ctrl><q><k> immediate command ("kill from here to the file end").

KEYBOARD

system table describes the keyboard layout. We select it:

and 10 lines get added to the file end:

Eight lines with some key settings, and the terminating two double-zero-byte lines. The eighth line (SYSTEM) is reserved and should be left as it is, whereas the remaining seven are up to us.

The second line, which starts with "Lower case", contains, to the right of the colon sign, the normal key values. The keys do not follow one another quite as on the keyboard, some being displaced according to the attitudes of the boys from Sunnyvale. The next line ("Upper case") brings us the keyboard values which result when the <Shift> key is held down, the fourth line ("Alternate") comes into play when the <Alternate> key is combined with another key, and the fifth ("Alt + Shift") tells the program what to do when both keys, <Alternate> and <Shift> are combined. The remaining two lines, the sixth and the seventh, contain values for the second keyboard, the lower and the upper case.

STEVE will handle two keyboards, a Latin one and another, one, usually the Cyrillic keyboard. <Ctrl><Space> command is used to switch between the two, from one to the other and back. Try to type the famous "Bloody Mary" ingredient, first in Latin:

and now in Cyrillic. To do so, hold the <Control> key down with one finger, and press the <Space> bar with another. The bell rings and the editor knows that the second alphabet is in. So vodka can be typed once again, in a different fashion:

Another <Ctrl><Space> returns us to the usual letters. Let us now try to modify keyboard a bit. Suppose we need the two Spanish special "n"

characters (as used in "canyon"). They are currently not on the keyboard, but as a quick look at page 207 confirms, are included in the STEVE character set, with codes 165 and 164, respectively. As the <Alternate><n> key combination is already reserved for the selection of the italic printer font, let us move it somewhere in the neighbourhood, say to key j. We therefore select the desired character:

then move cursor to the "Alternate" line, and to the required position, just below "J":

One more click puts the character in place:

Using the same steps we add the upper case character:

to the <Alternate><Shift> line:

The table is ready and we return it to the editor as with the "Blocks" file, through

and a click on the first line:

The user is now asked to show the initial line of the system file that is to be returned to the editor:

We move the cursor to the first line, the one with "Control", no matter where, and press the left mouse button:

The cursor blinks a little and STEVE has a new keyboard file. This time, as opposed to the "Put insert file" command, the system file does not disappear from our current file. To see the result of our endeavours, both Spanish letters, type <Alternate>j and <Shift><Alternate>j.

So far, however, the change is only temporary, as usual. To make it permanent, to save it to disk, a new copy of "STEVE.RSF" has to be made:

A brief remark in conclusion - the first keyboard line with the <Control> key comes to power after "Control" commands have been deactivated (see "VARIA", "Additional setup").

FUNCTION KEYS

The function keys, <F1> to <F10>, follow "Blocks" in the system-file list. They are grey, and located immediately above the main part of the keyboard:

With STEVE they are used for short, frequently used texts or sequences of immediate commands (normally accessed through the <Control> key on keyboard). The editor also permits two additional function keys, the left and the right mouse button, if necessary. Let us have a look at what is hidden there:

Twelve lines get added to the end of the file, one each for the ten function keys and two for the mouse buttons, all terminated by the usual pair of double-zero-byte lines:

The command sequences are stored on keys F1, F2, F3, F4, F5, F6, F7, F9 and F10, text item on F8, while the left and right mouse buttons (ML and MR) are empty.

The control sequences are easily identified by the "^" character - it denotes the <Control> key of an immediate command. So, if we press the "F1" key, the immediate command <Ctrl><1> is executed. As explained with "File overview" (from "Varia"), it selects the first user file (file #1). In a similar manner the F2 key selects the second file.

Keys F3 and F4 are reserved for DeskTop Publishing - to enter and to leave the page preview, respectively (see the "DTP" chapter).

The F5 key activates the calculator if the cursor resides on some arithmetic expression (see "Varia", "Calculator").

The F6 key is reserved for data entry - see "Dbase", while the F7 key, an equivalent of <Control><o> (letter o, not number), displays on screen the amount of free memory available. When pressed, it shows (say, on a 1 Mb machine) something like

The F8 key holds a short sequences of text. Press it and in no time "As already mentioned" appears.

The F9 key is used when we have a dictionary file (a short English- German one is supplied on the STEVE disk) in file space number 9 and would like, while translating a text, to have a quick look at it occasionally. The sequence "^9^ad" reads as: move to file No. 9 (<Ctrl><9>) and start a dictionary search there (<Ctrl>ad). It is explained in more detail under "Find", "Binary search".

The sequence on F10 is longer. It loads the spell checker's data base into file space 10, returns to file 1, inserts a line there, displays a message, waits for 4 seconds and deletes the message:

 ^0 - move to file No. 10;
 ^ar - read the file from disk, its name is spelling.eng,
        terminated by <Return> - character code 5, typed
        <Alternate>d,0,0,5,<Return>;
 ^1 - return to file No. 1;
 ^i - insert line;
 O.K. Spelling list loaded. - no ^ signs, so display this message;
 ^w400 - wait for 400 hundredths of a second;
 ^d - delete the current line (the one with the message).

The strange looking character after "spelling.eng" denotes the <Return> key. It has the code 5 and should be typed as <Alternate>d,0,0,5,<Return> (without commas, of course). The easier way to get would be the following selection sequence:

The left and right mouse buttons have no special definitions yet, and so retain the meaning described at the beginning of "Getting started". The left mouse button inserts a character or a line and the right button deletes a character or line. If we redefine them, the corresponding command sequence will be executed or text displayed at the current cursor position.

Function keys can also be used for more composite purposes. Let us illustrate it with an example of a file we have received and where every second line is empty:

Suppose the file is much larger and we would like to write a small program in STEVE to eliminate the superfluos blank lines. The series of operations would be:

1. go to the next line
2. delete the line
3. go back to step 1.

Let us call the function keys to the file end:

and put the command sequence to key F8:

A down arrow will go to the next line (we get it through "Varia", "Get any character" or through <Alt><d>,<0>,<0>,<2>,<Return>), ^d (<Ctrl><d>) would delete the line and ^#003 would jump three places back in the command sequence (to down-arrow). We return the modified function-key system file to the editor:

As before, the editor now asks where the beginning of the system file is - we move the cursor to the "F1 :" line, anywhere in it and press the left mouse button. The cursor blinks and the new function key set has been accepted. We now delete it from the file : cursor to "F1 :" and <Ctrl><q><k>.

To get rid of all the empty lines, we move to the title line ("Boiled lamb") and press the <F8> key. Everything goes fine, with one slight problem - the loop is endless and cannot stop. We close it through the left <Shift> key on the keyboard and the result is here:

Another example could be the sequence that searches the string "error" in the file (on F2, for instance):

It should be read as find (<Ctrl><f>) "error" <Return>. The character at the end of the sequence has the code 5 and simulates the <Return> key from the keyboard.

Additional command sequences can be composed from the list at the end of the manual - see "Immediate command overview".

If we need a large number of frequently used short texts or command sequences (there are only 10 function keys), it can be done by using "Abbreviations" - described next. And how long can an F-key sequence be? Not longer than one line, that is, not more than 1800 characters - 4, i.e. 1796 bytes. New F-key settings are made permanent, as with all the other system files, by ordering "Save STEVE.RSF" from the "System" menu.

ABBREVIATIONS

An abbreviations dictionary is a powerful STEVE tool, especially helpful when a lot of constantly repeated names of places, institutions and the like are to be entered. This table is most interesting, so let us devote some time to it:

Stored in an alphabetically ordered list, abbreviations and their explanations always occur in the same line:

As can be seen, abbreviations should all be in upper case, followed immediately by a data separator (a centered dot, to the right of the <Return> key, below <Delete>) and an explanation. And how do we use the abbreviations? Let us type the following line:

and press the <Clr Home> key (it is just below <Undo>). The abbreviation "l" immediately expands into its explanation:

and we may type on. Because of the binary search algorithm that is applied to find an explanation the interpretation is done in a moment even for a list of 10,000 or more abbreviations. If an abbreviation is not yet known to STEVE, the

message is displayed. When building up the abbreviations dictionary, attention should be paid to the upper case, and to have it sorted; there is a "Sort file" command, found in "Dbase" which does the job. After the new version of the dictionary is complete, it is returned to the editor in the usual way: "System", "Put system table", "Abbreviations". It is important to show the program the first abbreviation with the mouse now - if we indicate somewhere in the middle of the list, only the abbreviations from there to the end of list will be taken. Both an abbreviation and its explanation (which may, like with function keys, be a control command sequence, too) should, as stated, be written in the same line, that is not more than 1800 characters long. If an explanation is longer than one screen line, it will appear, after the <Clr Home> key has been pressed, in as many lines as necessary, divided into spaces.

How long an abbreviation list is possible? As much as will fit into the computer's memory. If the list is long, "STEVE.RSF" will grow bigger and that is all.

TABULATORS

which are activated by the <Tab> key on the keyboard follow as the next system table. They are a necessity for book-keeping or other data that must be keyed in columns. Suppose we need to enter a table like this:

The ruler line has been added for our convenience - to set the tabulators more easily. Let us have a look at the current tabulator setting:

Four lines get added to the end of file:

The tabulators, marked by ^ signs, are currently set to places 9, 17, 25, 33, 41, 49, 57 and on. For the above table they should stand at positions 3, 8, 18, 28, 39, 48, 58 ... and we rearrange the roof characters as required:

It is not difficult to guess how the new tabulator file should be returned to the editor. First:

then move the cursor to the "Tabulators:" line, and click.

SCREEN CHARACTERS

The character set comes after the message file:

One of the advantages of the ATARI ST series is how its screen character images are stored. They are not stored in read-only memory (as with most blue-striped machines), but in the user memory and so can easily be modified. STEVE does not rely on the character sets that are provided by TOS (the operating system), it keeps at least one of its own sets in the STEVE.RSF file. After we have clicked on "Character set", the following lines show up:

and others) known to the editor. They have codes from 0 to 255, and each is built from an 18 line by 8 column matrix of dots (here shown for code 0). The picture which we see above is, however, distorted: it is stretched vertically by a factor of two.

Let us now have a look at what codes the different letters have.

First comes a group of reserved characters, with codes from 0 to 31:

Some we already know, some will be met later. The codes from 32 to 64 are used for punctuation and numbers (an ordinary space has code 32):

Upper case letters (of the English alphabet) and some punctuation marks occupy the codes from 65 to 96:

They are followed by a similar group, lower case this time, with codes from 97 to 127:

and some special European letters, with four currency marks, all on codes from 128 to 159:

The codes from 160 to 181 bring further special letters (including 10 used in STEVE's native country), whereas codes from 182 to 188 are again reserved for special tasks within the editor: the copyright sign rests on code 189.

The Russian Cyrillic alphabet, its upper case characters, occupy the codes from 190 to 222:

followed by the lower case characters on codes 223 to 255:

As can be seen, the character set is a general from-the-Atlantic-to-the-Urals choice; yet it is by no means complete. It would take 530 characters (a 16-bit editor, the successor to STEVE) to cover the whole of Europe.

It may be that Greek letters, for instance, are of greater importance to the user than Cyrillic ones. The easiest way to achieve this would be to place the Greek characters on the codes previously used by Cyrillic letters, i.e. from 190 onwards. Let us, for instance, move to code 192 (Cyrillic V) and modify its picture to a Greek gamma - on the left is the old picture, on the right the new:

To make a picture from the full characters as used on the left (for B), an <Alternate>f should have been pressed for every dot of the gamma. Other characters may be used instead, and we have chosen zeros to make life easier. We now move to the beginning of the character set - the first line of zero character (the user who returns the character set system file and does not show its beginning will get very picturesque letters), followed by "System", "Put system table", "Character set", cursor to 0:

and click. After a few seconds, the cursor blinks and the editor is ready again. After <Alternate>d,1,9,2,<Return> (commas should not be typed) or after "Varia", "Get any character" we get gammas of the following shape:

It is now necessary to install the gamma in a suitable place on the keyboard. As gamma starts with g, <Alternate>g would be the obvious choice. We call up the keyboard table:

select "Get any character" from the "Help" main menu entry, click on gamma, move the cursor to "Alternate" line, to the place below "G" and one more click puts gamma where necessary:

After the keyboard table has been returned ("Put system table") to editor, gamma is available with <Alternate>g. And how do we install it on the printer? A procedure similar to the one above is described under "Print", "Printer tuning", "Downloading", provided of course, that the printer has a downloading capability. If not, the text can be printed using the DTP mode of STEVE (see "Desktop Publishing") or, converted to picture (see "Graphics") and then printed as such.

STEVE's basic screen character set as described above will always be full - it is possible to modify the character pictures, but there must be 256 of them.

ADDITIONAL SCREEN CHARACTERS

As we have just seen, STEVE has always installed a basic screen character font, used for 64 or 71 characters per screen line. It can be supplemented by additional screen fonts, 8 of which normally come with the editor. They cover different character widths, from 40 to 160 characters per line.

command takes several seconds to complete, as character pictures in STEVE.RSF have to be unpacked into over 16,000 lines:

Every character font starts with two identification lines. The first contains its name (not longer than 19 characters, "standard 80" in the above case) and the second four numbers: the set's sequence number (1), its height (this must be 18 in STEVE), and the width of every character in the font, in pixels (8) and 1/256-ths of a pixel (0). As it is now, STEVE does not allow mixing of different screen fonts and proportional spacing in standard editor mode; this task can be accomplished in the DTP mode (see "Desktop Publishing").

Character width is defined by two numbers - the first is the whole number of pixels (screen dots) and the second the number of 1/256-ths of a pixel in case the character is not a whole number of pixels wide. An example of this is the elite screen character set with 96 characters per screen line:

As 640 (screen width) is not divisible by 96, every character in the set is 6 171/256 of a pixel wide. How does it look in practice?

Let us write a line of capital O's on screen, in elite font:

The distances between the letters are not equal - sometimes one pixel, sometimes two, but all in all there are 96 characters in the line (the elite character set on the printer has 96 equally spaced characters).

Every character in every font, like the two below,

has a descriptor line in front, followed by the character picture, delimited by two lines composed of centered dots (the key just below <Delete> on the keyboard). Unlike the standard STEVE characters (see page 206), additional font characters are not stored as a full grid, but only their net contents, without empty lines. The descriptor line consists of four numbers - the character code (0 - 255), the starting height (how many pixels up from line bottom-level the character is located - "a" 3 pixels and " ` " 7), followed by character width, given with two numbers as explained above.

The character set should end with a double zero-character line:

and after the last font a pair of such lines is necessary:

What else needs to be taken care of? There may be up to 21 character fonts, two forms of the basic one (64, 71) and up to 19 additional ones. Their sequence numbers (the first number in the second line, after the font name) must start with 1 and go on uninterrupted till the last one. An extra bonus: it is not necessary for a font to have all its characters, with codes from 0 to 255 - it may have only the characters needed by the user and they are also not limited to a given range (as is the case with GEM fonts). It is possible, for instance, to have codes 126, 130, 131, and so on, with 127, 128 and 129 missing in between. In the extreme case an additional font may have only one character and - there must be at least one additional font.

DESKTOP PUBLISHING TABLES

The two tables that follow are both explained in the DeskTop Publishing chapter:

The first contains pictures of the characters used for the page buildup and the second the names of commands that govern the DTP page-block description language.

PAGE HEADERS AND FOOTERS

is the one we already know - it is used with the "Breaking file into pages" entry from the "Print" main menu selection and is explained there, too.

PRINTER TABLES

contain printer drivers, currently available in the "STEVE.RSF". For more detail, see "Print", "Printer tuning".

PRINTER LINE SPACING

is different, however. After:

we obtain a short system file that may, for most purposes, remain as it is:

A practical use of this table would be to translate the names (at best those after asterisks) to some other language in case STEVE should get translated.

LOWER AND UPPER CASE TABLE

tells STEVE how to convert letters from lower to upper case and vice-versa:

The table has a title line, followed by two lines, each 256 bytes long:

This doesn't really appear to be anything special, but things look different if we move one screen length to the right. We move the cursor to the right-hand border of the second line (as shown above) and click the right mouse button:

We now see the area for the codes from 64 to 127. In the upper line all the characters are shown in upper case, and below in lower case (the full character set table is on page 207). We press the right mouse button once more and this time we get:

which is the table for characters with codes from 128 to 192. One more click reveals the last part of the table, containing characters with codes from 193 to 255. We correct what is required due to the new characters we may have introduced and return the table to the editor. After "System", "Put system table", "Lower/upper case" we click on the first line of the table (the one with the comment: "Lower to upper ...").

As seen above, for every character in the character set (on page 207) the first line contains its upper case representative and the second line its lower case equivalent. The two lines should be corrected in case the STEVE character set has been modified - Cyrillic characters have been replaced by Greek, for instance. Such correction is necessary to ensure the proper operation of commands like "Find", which equates lower and upper case during the search, or the "Upper to lower case" and the "Lower to upper case" from the "Block" main menu selection.

And where to find more on how to move across lines wider than one screen? See "Varia", "System setup", "Right margin".

LETTERS AND SPECIAL CHARACTERS

The system table that follows is a bit unusual, too, but anyway it often comes in handy. When called through:

a list of characters that have "letter" status pops up:

The table is of course longer than one screen; all the characters from the set that are not present in the table are treated as special characters. As can be seen, numbers, too, have a "letter" status, as well as the hyphen, parenthesis and inverted commas. It is the "Delete word" and some other commands (like "Break file into words" from "Dbase") that will not operate properly if only true letters were treated as such. For example in the sentence:

the "Delete word" command should remove only 'if: ' and nothing more. If the inverted commas would not be included in the above list, the " would get deleted, too. The other operation affected by the table is word wrapping at end of every line when keying in a new text.

This system table is handled a bit differently from others: after it gets returned ("Put system table") it does not remain in the user file - the editor deletes it.

For the proper operation of batch processing (batch-command identification) it is important that the colon (:) character does not have the "letter" status.

LETTERS AND SPECIAL CHARACTERS/SPELL-CHECKER

is a familiar table, like the "Letters/special characters" that we have just discussed. It is, however, usually different, and tells the spell checking algorithm what characters are part of a word and what others should be ignored. In the "Letters/special characters table" numbers are usually treated the same as letters, as is the hyphen and some special characters (see above). Here we have a shorter list:

with numbers and special characters excluded. Should words to be tested by the spell-checking also include numbers or be just numbers, the numbers should be added to the above list. As with the table before, the "Put system table", "Spell-checker letters" command also deletes the table from the user's current screen file (it may be recalled through the "Get system table").

DISPLAY ENTRY LAYOUTS, DATA BASE DICTIONARY,

system tables all require some data-base environment to be better explained and are therefore found at the related parts of the "Data base" chapter.

SORT COLLATING SEQUENCE

is composed of two tables in STEVE:

The first of them defines the basic collating sequence, used by data base sort. When clicked, a set of lines get added to the file end:

As can be seen, all 256 characters from the STEVE character set are given here; if data items containing them are to be sorted, their order in the list would be determined by the above table. First in the table are low-code characters, usually reserved for special tasks (0-31), followed by special characters, including some STEVE reserved specials, numbers, Roman and Cyrillic letters. Every character is embedded in a pair of single quotation marks, and separated by commas or equals signs. A comma denotes a new character in the collating sequence, while an equals sign tells the sorting algorithm that all characters separated by this sign should be treated as equal when compared.

The collating table may of course be user modified as required, a task, which should be done especially if part of the character set has been modified, i.e. if Greek or other letters have been introduced. It is not necessary to specify all 256 characters in the table - those not given will all be given the collating value zero - in a sorted list they will appear ahead of all characters specified by the user. Like the "Letters/special characters" system table the collating table gets deleted from the current file as well when returned to the editor ("Put system table").

A second sort collating sequence table is used in case two record keys are found to be identical, according to the first collating sequence. As noticed, all versions of vowel characters have equal collating values in the first table:

so that the short sequence:

would get sorted properly, that is to:

Had the different versions of e been separated by commas, instead of equal signs, things would sort to

which is wrong. In the second sort collating sequence all the characters in the set are treated as different:

so that another set of words, which would sort to:

had both collating sequences been equal. Now, with the second collating sequence, where "i"-s are separated, we obtain the correct order:

PICTURE LIBRARY

is also included in STEVE. After we select the:

a sequence of 12 pictures, designed by J. Dimec, with their names in front, gets added to the file end:

These are all immediately available in the graphic mode (see "Graphics" chapter, "Get picture from library"). When enlarging the picture library with new pictures it is important that each of them has a name in front, preceded by an asterisk, and is no longer than 19 characters.

FILL PATTERNS

system file contains all the patterns that can be used to paint any closed shape in graphics:

There is no particular limit to the number of different patterns and 40 are built in:

New fill patterns can be added at will; they are returned to the system in the usual way - by the sequence

and a click on the first table line: "grey 11/20", in the above case.

For more detail on how to use the table, see "Graphics" and "Fill".

It seems as if there is no end to systems tables, but let us try to persist for a while anyway.

SCREEN FORMS

are used when data is to be entered at predefined places on screen, and output to some of the preprinted standard stationery (forms):

The lower part of the next page shows a picture of a Mail order, the second form supplied with STEVE (as with text blocks, to insert the number of forms is not limited) and the upper part of the page describes where each data item is located on the form. We find that the first data item (Post code) comes in the middle of the third line, the second data item (Paid by) on the left-hand side of lines five and six, and so on. Every field starts with its sequence digit (A for 10, B for 11 ...), followed by a sequence of dots up to the end of the field's place. Fields extending over several lines are described for every line (as in the case of items 2 or 3); their lines must, however, follow one another. Data fields must also be numbered appropriately - if there are fields 2 and 4, field 3 should not be missing. Screen form field description lines are normal text lines, while the form picture may be drawn with the supplied graphic editor (see "Graphics") or some other picture editor whose output is acceptable to STEVE (DEGAS or some other, draw-like program, from which images can be saved through "Snapshot" accessory).

More on how to use screen forms can be found under "Varia", "Form processing".

LESSON COMMANDS

Computer Aided Instruction is an important part of STEVE, and it has its own control command language which can be, like other system tables, supplied in some other language as well. The table is obtained through:

and is shown here in two columns to save space:

Every command is supplied with its full name (like "Get screen") and its abbreviation (like "gs"), so that both can be used. Command names, if modified or translated, should all be written in upper case and the table must be kept sorted (by means of STEVE's data base sort, for instance). "Computer Aided Instruction" is a special chapter towards the end of the manual.

ALARM CLOCK

is used to ring the bell and show user-supplied messages at predefined times in the future. The corresponding system file can be obtained through:

and is usually empty or delivers some New Year's greetings:

Suppose there are three important events, two in the near future and one more distant, that somebody wants STEVE to remind us of:

1. A visit to the dentist on May, 10, 1989, at 16.30;
2. The "Mutiny on the Bounty" movie on May 12, 1989, at 18.15 and
3. A cherished person's birthday on June 15, 1989.

The "Alarm clock" file could look like the lines below:

As can be seen all the entries start with a line which begins with an asterisk and contains the date and time written in the usual STEVE "start-of-the-session" format. This top line is followed by a message, which may include graphic lines (for picture); its first 22 lines (or less if not present) will be shown at the time indicated. The first message (dentist) will be displayed at 9.00 that day - the screen goes blank, the bell rings, the message pops up and stays there at least five seconds. After that time any key on the keyboard or any mouse movement returns the user to previous file editing. If the machine is turned on later, the last message previous to the current data and time will be shown.

The table would be returned to STEVE through:

and a click on the "*10.5.1989 9.00" line.

And how to get rid of the "Alarm clock" settings, once and for all? With the sequence:

a click on the above shown line (an empty one with cursor), followed by permanent saving of the STEVE.RSF to our working copy of the STEVE disk:

MESSAGE FILE

is next. It contains messages used by STEVE to communicate with the user. Once in the current file they can be modified - translated into some other language, shortened, expanded or just modified, to suit the user better (it is clear that the author's English should be improved). As with other system files it is recommended to handle the message file in a separate file space (see "Varia", "File overview"). After we have requested it:

the file is shown as a series of messages:

The first (to double-zero-byte line) and part of the second message are shown above. Every message has a sequence number (like "m 1") and, in its first line, 10 digits, i.e. five 2-digit numbers. They define where on the screen the message will be displayed, how big it will be, how wide a frame it will have and what type of message it is. The first 2-digit number (in our case 00) tells us in which line (numbered from 00 to 21, from the top of the screen to the bottom) the message starts. The second number (again 00) tells us in which place (from 00 to 63) it starts. The third number (01 in the case of "w 1") indicates the height of the message in lines, and the fourth (64) how wide it should be. The fifth, and last 2-digit number (00) tells us the window type. The text of the main menu line has been stored as graphics (see "Graphics") and cannot therefore be overwritten in the text mode.

Messages of type 00 have a narrow border, like the "m 9":

which is displayed on the screen as:

The numbers 1,2,3 and 4 after the text describe which selection in the message the current line is and that the corresponding line should change colour after it has been touched by the cursor (mouse). The first line returns a value of 1 if the left mouse button has been pressed on it, the second a value of 4, the third 2 and the fourth 3.

Messages of type 01 have a broader frame, thus:

which is displayed below the clock prompt at the start of every STEVE session (provided there is no battery powered clock):

Type 02 is reserved for setup-like messages, for instance:

which, when called, turns (on the screen) into:

As seen, the first message line is always followed by text lines and/or lines which define which words should be framed and mouse-button selectable. So, for instance, the lines:

tell us that in the fourth line (again numbered from 0) there is first a 6 character long frame with a value of 3, and somewhat further along the line an equally long frame with a value of 35 (the frames are numbered from 1 to 9, then there is A (instead of 10) and on to Z, valued at 35). Every message ends with one double-zero-byte line.

Let us now try to explain and modify the first entry of the main menu, i.e. message 181 ("Fnd" m181), which is usually displayed in the top left corner of the screen:

Five double-digit numbers from the first line are quickly unmasked - the message starts in line 1, at column 0, is 9 lines high and 22 places wide, with a single border line. The next four lines contain the submenu entries with their code numbers - there must be at least two spaces between the text end and the code number.

The last line of the message brings an explanation of the menu's entries; for each of them there are two alternatives - it invokes some STEVE command or calls another menu. Entry 1 executes STEVE command 2 (simple disk menu), entry 2 calls command 1 (extended disk menu), entry 3 asks for menu 206 and entry 4 for menu 322. As can be seen, every entry can perform an individual STEVE task if it is explained by a number, or call for another menu, if its explanation (menu sequence number) is preceded by an "m". The list of available STEVE commands is supplied in the "STEVE COMMAND CODES" chapter. It is ordered by command numbers; every command is described by a line - its sequence number, its name and a short explanation. Let us have a look at the two short sections from the "COMMAND CODES" list:

So it is always possible to change the STEVE menu contents, size and appearance or to add new menus. They could be appended to the end of the message file, but it is better (STEVE will expand) to use any of the messages from 142 to 160 which have been reserved for the user.

Let us now try to modify menu 181 slightly - suppose we are not interested in picture scanning, but would like to add the "show date and time" commands and "select any character" in the menu (both are otherwise available from different submenus). The menu itself should also be moved - to the middle of the screen:

When a new message file is returned to the editor, it is important to go to its beginning first (to the line with "m 1") and only then to select the:

sequence. It is now that we have to show the first message. If the file is returned with the mouse pointing to second or some other message instead of the first, there are three ways out of trouble - the <Ctrl>q4 command with the cursor positioned in the first file line (return message file immediate) or the <Ctrl>c<Ctrl>c<Ctrl>c command or, last but not least, the solution which involves the reset button.

Our I/O submenu is now modified to:

After STEVE has been customized to suit one's particular requirements it is usually useful to expand the "Help" menu, to add new entries with a short description of the most important points. A closer look at the help menu:

shows 11 entries - 10 messages - from "About STEVE" to "User message" and another task, the "Date and time". In the last two lines we also find where the corresponding messages are stored - m51 for entry 1:

m52 for entry 2 and m59 for entry 10 (A); entry 11 (B) displays the current date and time (STEVE command code 136). Entry 8 has obviously been added later - it calls for the message 141. As already mentioned, we discover further on in the message file a range of 19 reserved messages - from m142:

to m160:

Let us modify messages 142 and 143 to:

and the "Help" message as well, to reflect the change:

We have now made two columns of entries, and so the message is now wider - 40 places and has been moved more towards the middle of the screen; it now starts at column 12. Two new entries have been added, C and D, the "Abbreviations" and the "Character set"; the first calls for the menu (which can also be just a message) 142, while the other brings on screen message 143.

When now called, the "Help" menu has a different appearance:

The other message which would often get changed is m59; it is reserved for mail between different users of the same editor on the same machine.

SYSTEM VARIABLES

adds a 750 bytes long line to the end of the file. It contains data, most of little immediate value to the user:

However, it includes the settings, lower and upper limits for all the STEVE setups - the system setup, current printer setup, find setup, data base setup, data base local separator. A new copy of the STEVE.RSF file can always be made and saved to have a version tailored to the user's specific needs, and easily accessible (the "Reload STEVE.RSF" entry in the "Exit" main menu selection) but such a file can be several 100 K long. So when disk space is at a premium (as with single-sided disk drive, for instance), saving the system variables' line may be an effective way of saving screen colour, file mode (if it is not STEVE), data base style options and the like, for later recall if necessary.

Where to find something in this line is given in the special chapter "SYSTEM VARIABLES". And how to move across such a long line is described in more detail under "Varia", "System setup", "Right margin"; it is also advisable to turn the character counter on by the <Ctrl><a><u> immediate command.

START SEQUENCE

Every journey, both the more pleasant and the less pleasant ones, comes to an end some time, and so do STEVE's system tables. One of the last is the:

It gives the user an opportunity to define a sequence of immediate commands that should be performed at the start of every STEVE session. The current setting is not particularly long:

It only contains the command "<Ctrl><a><e>", which requests the standard disk menu. This familiar start can be substituted by a longer, more appropriate sequence, like the one which loads the spell-checker's data base into file 10 and is also stored on the function key <F10> (see page 199, the sequence here has been enlarged slightly):

It moves to file 10 (<Ctrl>0), requests reading a file from disk (<Ctrl>ar), with the name spelling.eng, returns to file 1 (<Ctrl>1), selects font 1 (71 characters per line, command <Ctrl>a+1), inserts a line (<Ctrl>i), displays the "O.K. Spelling list loaded." message, waits for 4 seconds (<Ctrl><w><4><0><0>) and finally deletes the line with this message (<Ctrl><d>).

The start command sequence may be up to 1800 bytes long; the commands to select from are described towards the end of the manual, in the "Immediate commands summary" chapter.

OTHER SYSTEM TABLES

System tables involved with batch processing and the OCR are supplied with the Professional and OCR versions of STEVE; they are explained in the "Batch processing" and the "Optical Character Recognition" chapters.

SAVING THE STEVE.RSF FILE

As we have seen on several occasions, there are two copies of the STEVE resources - one on disk and the other in RAM which can be modified by different setup menus, alteration of some system table and the like. Let us repeat once again that to make such changes permanent, many of them have been described in this chapter, it is necessary to save the RAM copy of the STEVE.RSF file to disk. We insert the working copy of the STEVE disk or move to the "STEVE" folder on a hard disk, followed by the

selection.

XII. HELP

Before we embark on data base, the domain of immense space, let us glance a bit at what has remained in the main menu beside it. The

help selection from the main menu offers quick information on this and that, how to use the mouse for instance, as selected above:

Each of the first ten selections produces a screen of comment which stays there until some mouse button is pressed; the last entry will tell us the date and time, according to the battery powered clock in the machine if there is one, or according to the time we have set at the start of an editing session, as follows:

In the "System", "System tables", "Message file" it can be seen in more detail how the help messages can be custom-designed, expanded and modified.

XIII. END

main menu entry opens four possibilities to select from:

The first is used to exit from the editor - to use some other program, maybe to compile something of our own. Before we leave, a short prompt is to be answered:

"YES" will move us to the ST's desktop program and the file we have just been editing will be gone for good unless we had previously saved it to disk. "NO" does not exit from the program - it returns us to the file where we were before.

STAND BY MODE

The second line in the menu:

comes into consideration in situations when it is necessary to leave the computer for a minute, and there is no need to turn it off. Maybe a phone needs answering, or we feel like a snack, or it is simply necessary to clear one's head with a long glance through the window or a short meditation with our eyes closed. Whatever the case, the screen will not be looked at for at least some minutes, and we want it to relax, too.

After the left mouse button has been pressed we get the impression of a curtain falling on stage - the screen goes black slowly, from the upper edge downwards. It stays dark until the mouse is moved or some key on the keyboard is pressed. The whole procedure is not for our sake only - bright screen contents can distract a conversation - but for the screen's own good as well; in this way it will not be burned. The white portions on the screen are traces left on the inner screen surface by an electron beam. And when the beam has been hitting the same place for hours on end, the surface gets tired and is no longer white when illuminated but light grey, and dark grey instead of black.

To get the "Wait for a while" command without using the mouse, type "<Ctrl><,>".

REMOVING THE FILE

clears the contents of the current file space. Another way to accomplish it is to move to the file beginning (like through the <Top> <Fle> command) and clear the rest by the <Ctrl><q>k> immediate command.

RELOADING THE STEVE.RSF FILE

The selection "Reload STEVE.RSF" will erase the entire memory (all 10 file spaces) and read the "STEVE.RSF" file from disk once again. The procedure is practically equivalent to departure from STEVE to GEM Desktop, and restarting another STEVE session. The command is used in case an experiment with the modification of some system table has failed and we want to return to the original state quickly.

It is also possible to reload a STEVE resource file which has a different name, not exactly the "STEVE.RSF" (suppose we have various resource environments for different purposes, all in the same disk subdirectory). The command sequence would be the <Ctrl><$><141>, or, if executed from a menu, command with code 141. The sequence, as it is not possible to execute it directly, should be put to some function key or, for easier access, on some menu entry (see "System", "System tables", "Message file").

XIV. DATA BASE

It often happens that information is not contained in free form, as a shorter or longer message, composed of text and pictures, but as a set of closed groups of data where each group describes an object (like a book, a person, a cave), an event or something else. Members of such a set are usually called data records, or records for short, and they are composed of data items or data fields (like the name of a cave, and its depth).

The capabilities of the ST machine and its heart, the MC 68000 microprocessor, its linear memory space, the opportunity to move big chunks of data around at great speed, are best exploited with data base tasks.

A good part of STEVE and its predecessors is devoted to data record manipulation and most is hidden under the

main menu entry. Let us tackle it, from simple tasks to composite and the more demanding.

MAILING LIST MADE SIMPLE

Suppose we would like to enter and make use of data records about addressees who are all to receive the same message (a mailing list). Every data record should contain the following data: title, name, last name, street, place, state and post code.

The annual convention of the "Save the songbirds" society is imminent, and we have to send an invitation to every member. First to come is the writing of their data - we select "Dbase" and "Start of display data entry":

The screen is cleared and a brief list to select from pops up:

Two layouts are offered - one for book-related data entry and one for the addresses. We select the one we want with the left mouse button:

Now the program wants to know in front of which line our data records are to be entered. We move the cursor to the first empty line, and one click opens a new screen:

The title is the first to be typed - attention should only be paid to the

space between the angular colon and the word we type - it must stay there and should not be deleted (the unusual colon can be accessed from the keyboard through <Alternate><backslash> - between the <Shift> and <Alternate> keys). After the title has been input, we move to the name; this is most easily performed with the <Return> key - the cursor jumps to the required position:

After the last data item of our data record (the Post code) we press <Return> again:

and a new, empty layout now fills the screen:

As mentioned, the space after the delimiting colon should be left where it is, whereas other corrections are possible. Finished data records are inserted at the place we have shown at the start of data entry.

We proceed with the other members of our society. After the last data record has been entered, we terminate our data entry session with the other selection from "Display data entry":

The screen layout vanishes, and we obtain a compacted list of addressees:

The data items follow one another, separated only by a centered dot, also known as a data separator. It can be obtained on the keyboard where the hash (#) sign normally is - immediately to the right of <Return>. To get the hash sign it is necessary to hold the <Shift> <Alternate> key while typing it. Every independent group of data (i.e. data for one member), which we have called a data record, begins at the line start. If longer than one line the data record is continued into one or more further lines. All continuation lines must start with at least one space. It is also recommended that no data record exceeds 7 typewritten pages in length (15 Kb), and that the number of data items per record is limited to 500. Let us now add the message, which should be sent to members, in front of the data records (command <Spl Ln> at the line beginning inserts an empty line, even in front of the first line in the file):

The first four lines contain the directives to output, for every member, the title in the first line (data item or field 1), the name and last name in the second line (fields 2 & 3), the street in the next line (item #4) followed by place, state and post code (fields 5,6,7). After "Dear" the name should be printed again, followed by a comma.

The serial number of every data item to be called from a data record when composing the mailing printout has always been given between two data separators (centered dots). We have also added an "end of page" line (diamond characters, with "Print", "Select line spacing" or <Alternate><Right of Return> key) at the end so that every letter will be printed on a new page.

As already stated, the message layout must precede the addressees' data records in the file - we may also prepare it after them and then move it (see "Move block") to the beginning when finished. When ready, we put our message layout into block - we press "Beg Blk" command from the numeric keypad in the first line (number 1 between data separators) and "End Blk" in the last line ("end of page"). All that remains to be done is to select "Mailing list to RAM", with the left mouse button:

The program now asks us to show the beginning line of the addressee who is the first to get the message:

We move the cursor as required and, of course, click the left mouse button:

There is a brief snow storm on the screen, some white dots and lines run across it (the video RAM is used as an intermediate buffer), and three messages are appended to the file; the first of them starts with:

In place of the lines with data field numbers we now find their values from the first member's data record. After the first letter there is another and then the third, for Jesse James.

To print them out (after inspection and possible modification) we put all three in a block; "Print block" selection from "Print" menu will now make a copy on paper. The memory of the ST computer will accomodate several hundred letters made in such a manner (up to several thousand on a Mega machine). Should we need more letters, several thousand or even more than ten thousand, only the message layout and the data records should be kept in memory. There is not enough room to store the finished letters and we therefore send them to printer immediately. As before, we first put the message layout into block ("Beg Blk" at its start and "End Blk" at the end), followed by a different selection from "Mail":

The first data record from the data base must be shown again - we move the cursor to it, click the left mouse button and the letters, one by one, now travel to the printer directly when composed.

Both commands, "Mailing list to RAM" as well as "Mailing list to printer" will produce the messages for all the data records from the cursor to end of file. It is therefore not recommended to keep some other text in the memory after the addressees' data.

If there are a lot of letters, it is best to try the message layout first with only one data record - the last. We put the layout into block, depart to the file end, select "Mailing list to RAM" and point to the last addressee.

It is possible to write an additional layout, to modify an existing one, or to delete some. Screen layouts are permanently stored in the "STEVE.RSF" file - we can call them back to the user file if necessary, modify some there and return them. These operations are usually performed at the file end or, for more advanced users, in one of the memory file places that is still free. STEVE can handle up to ten files at the same time and we move from one to another with the "<Control>n" command, where n is the requested file number: 1 for file 1, ..., 9 for file 9 and 0 for file 10 - (see "Varia, "File overview"). It makes no difference: after we have clicked the

sequence, the program will add the following lines to the file end:

There are two screen data entry layouts - the first, "Book", includes a set of data items describing a book, while the second, "Address", is already known to us. The screen layout name must have an asterisk (*) in front, and should not be longer than 19 characters; layout length is not limited. As the layout file is one of STEVE's system files, it must have a pair of lines with two zero bytes at the end:

How to get them; have they been deleted by accident? For an experienced user the quick way would be to type

where + denotes that the <Alt> key must be held down while <d> is typed. The comma tells us to lift the finger from the key that has been pressed.

And the other, more simple way? It is through the sequence:

Any character from the STEVE character set can now be pointed to and chosen using the left mouse button. It is the first we need - we click and move the mouse to the required screen position. Another click puts the desired character in place.

Suppose we would like to add a short layout for entry of data from caves or potholes (underground hollow objects, mostly formed in limestone). We insert it (left mouse button over the line end or <Ctrl><i>) under the name "Cave" before "Book" and "Address":

The angular colon, as already mentioned, is obtained through <Alt><backslash> (<Alt><<> on a German keyboard).

It is now time to return the new layout file back to STEVE:

We click at the first line ("*Cave") and the editor has taken the new layout file; it will be kept until the power is turned off or, after "System", "Save STEVE.RSF", for good. The "Screen data entry" selection from "Mail" now offers more:

Cave layout is now also available. There may be as many layouts as necessary (their total length must not exceed half the available RAM) - if there are many, the first 63 names are shown on the screen at once, and the "More?" selection gives another 63 to choose from.

And how do we make the new layout file permanent and get it whenever we start the computer? As with other system tables it is first necessary either to insert a diskette with a working copy of STEVE or move to the "STEVE" folder on the hard disk, followed by the "System" and its last selection - "Save STEVE.RSF":

The command is executed: a new copy of the "STEVE.RSF" file is saved onto the "STEVE" disk, and the old one is discarded. It is, of course, common practice to try the new screen data entry layouts with some data before making them permanent. Some polishing is always necessary before they are the way we would like them to be.

MORE ON DISPLAY DATA ENTRY

Suppose it is the cave data base we want to build up, and let every cave have a serial number, name, length, depth, exploration year and remarks as to its data. Suppose we have updated the "Display entry layouts" system table as described on the previous few pages and deleted it from our current file after it has been accepted (the <Ctrl><q><k> command at the "*Cave" line). So the entry of data can begin. After three clicks:

the program asks the user to show at which line to start building the new data records entered or, at which line to start picking the old records that are to be updated:

As there are no records yet, we move the cursor to the first empty line and press the left mouse button. A cave layout pops up on screen:

and the first cave's data entry may be entered:

As a field has been entered (like a name) we do not move to the start of a new field with the mouse or arrow keys; we always use <Return>. When pressed, the cursor jumps not to the start of the next line, but to the start of the next field. Any values of the current record may be corrected at will; it is only important not to delete the space between colon and data item value and to leave at least two spaces between the end of a field value and the start of the next field's name (like between "4720" and "Name").

After "Remarks" have been typed in, <Return> packs the record and produces a new layout. We fill this one in as well:

As can be seen, the layout expands dynamically when necessary: the cave name was too long to fit into one line, and a new one has opened by itself. Field length is not limited if there is no other field after it in the same line. <Return> has been used again to move from field to field, and to get a new layout. After we have filled in the last one, data entry can be terminated. The sequence:

can be used to do so, but there is quicker way to do it - calling the main menu does the job as well (it is not necessary to make any selection, just click the right mouse button):

A file of packed records is now here:

One of the records is three lines long, one is one line long and the others occupy two lines each. Data fields are separated by a special character, the data separator. It can be found to the right of the <Return> key, just below <Delete>. The records are packed to occupy as little space as possible.

Again a word or two on limitations - there may be up to 500 fields in a record, and most data base commands require records shorter than 15.000 characters (for sorting and searching, the limit is 30 K).

It is also interesting to see how the existing records can be corrected or updated using the screen layout; they can be edited as text, but for individual interventions the layout method is preferable. Suppose it is Baconfield cave we are to start with; after three clicks:

we move the cursor to the first line of the selected cave (no matter which character) and click again:

The data pop up on the screen, unpacked into the layout:

We may now correct some values (or just inspect them). And how do we move from record to record?

Nine of the keys on the numeric keypad can be used to browse through the file and help edit the records, without ever leaving the layout:

While in a layout "Top Fle", "End Fle", "Pg Up" and "Pg Dn" have new meanings - they should be read as "First record", "Last record", "Record up" and "Record down". Suppose we have been editing the Baconfield cave as at the bottom of the last page. After the

command, the Baconfield cave's data will be packed, replaced in the record file and the next record:

appears in the layout. The effect of the "Pg Up", "Top Fle" and "End Fle" immediate commands is similar - they obtain for us the previous record, the first and last record of the file. Before any of these commands is executed, the current record on screen is packed and replaced at the place where it belongs.

The "Find" and "Repeat find" commands search through the current record, in the layout, first. If a match to the requested string is found, the cursor jumps to the right line and the right position; if not, the record is repacked and replaced in the file and another search is performed, this time in the packed file from the current record onwards. In the case of a successful match, the record containing the string to be found is opened up in a layout and the cursor is positioned at the record beginning (another "Rep Fnd" jumps to searched string); if not, the usual

message is displayed.

The three keys at the top right corner of the numeric keypad also have, during the record layout processing, a different meaning:

Instead of "Move Block", "Where am I" and "Copy Block", one should read "Remove record", "Which record" and "Copy record". The first, on the "Mov Blk" key, removes current record from the data dase and shows the next one. "Whr" key now tells which record, from the beginning on, we are editing and how far in bytes it is (see "Find", "Record & byte"). "Copy record" command, on "Cpy Blk" key, packs the current record, adds a copy of it and opens it for layout editing.

As the unpacking of a record (the start of a display entry) is often used, one of the function keys is also used for the purpose. The immediate command <Ctrl><a><1>, read as: unpack the record with the cursor, using layout number 1 ("Cave" in our case) resides on key <F6>. Other layouts may be obtained using commands from <Ctrl><a><2> to <Ctrl><a><9>, for layouts from 2 to 9.

To illustrate this, let us move the cursor to the second cave in our list:

and press the <F6> key. As noticed, it is not necessary to show the starting line of the record - any line will do. This command opens the record up:

To sum up the display entry immediate commands:

Let us conclude the display entry with the question of how to insert new records in between the old. Suppose it is between Baconfield Cave and Little Well that a new record or some new records are to be inserted. We insert an empty line between the two, move the cursor to it:

and open a new record by pressing <F6> or using the <Ctrl><a><1> immediate command. Additional records are then typed as long as is necessary; to terminate them, the main menu should be called.

RECORD FORMATTING

In previous examples we have seen the compact way STEVE stores data. To make a report of them, or to send them elsewhere as a supplement to some other work, they should be better shaped. The three mailing list commands, the first and last we have already seen, are used for such work: two produce a file in the memory, and one sends it immediately to the printer:

Let us now explain several useful capabilities which, for the sake of simplicity, are not explained in the "Simple mailing list". We shall illustrate them on a slightly expanded cave file:

which needs a nice printout. Suppose we have nothing else in the file, we only add the report instructions, in front of the records:

The cave serial number should be printed in the middle of the first line, followed by its name two lines below and, again two lines lower, the exploration year, length (in metres), depth and, at the bottom, any remarks. The centered dot, the data separator, can be found, as has already been mentioned, below the <Delete> key. We put the instructions into a block (pressing the "Beg Blk" command at the top line, and "End Blk" at the bottom line):

select

and click on the first line of the first file record:

There is a brief snow storm on the screen as the screen part of the memory is, as on many other occasions, used as an intermediate storage, and our records appear once more at the file end:

The first two records are shown above. The program, as can be noticed, had broken into two the fields longer than one line, and expanded the instruction layout accordingly. The length of the lines has been made as defined in the "Right margin" of the "System setup" (see "Varia"). If it were set to, say,

120, the mailing list routine would make such lines; longer data fields would again be broken up into more lines, on the spaces between words. We also see that the second cave's output is not quite satisfactory - the length and depth are missing, and the string "length: m" is just not pleasant to look at. Let us therefore modify the instructions a bit:

The beginning of the fifth line ("explored") could be explained as: print field number 5, add "explored: " in front of it, and "; " after it. The second part of the description, the text to be added after the field, may also be omitted (as with "remarks"). We clear the file from the last packed record onwards (we have to, as the "Mailing list" command will process all the lines from the one we show to end-of-file):

- we have moved the cursor to the line shown above, and the <Ctrl>qk command (delete to end-of-file) has done the rest. If we had left the old output there, the new "Mailing list" command would treat it as records and try to process it according to the layout instructions; the result could hurt the eye. We again put the instructions into block, select "Dbase", "Mailing list to RAM", click on the line with the packed "Big Cave under East ..." and here is the new output:

There is no significant difference from the first record, whereas the second one turns out much better than before:

As you have probably noticed, every continuation line of a data field stretching over more than one line has been indented by three spaces (like the line starting with "upper way to ..."). The size of the indentation can be defined by the first parameter of the:

which should be set to the required number; the default value of the editor is three:

Texts that can be added in front or after data field values are not the only additional use of the mailing list command. Let us look at the second of the lines below:

The instruction line tells the editor to print the cave's serial number (1) first, occupying 4 places, and, if it is shorter, that it should be right justified (r). It is be followed by a full stop, a space and the second field, the cave name (2); we have reserved 33 places for it, and it will be left justified as no specific request has been made. What if a name happens to be longer? If not required otherwise, it becomes tailless: it will be truncated to the first 33 characters. The instruction line continues with cave length (3) in 5 spaces, right justified, and depth (field number 4), not longer than 4 spaces; exploration year (5) ends the line. We do not expect any year before 1000, and right justification is therefore not necessary.

The instruction line, put in a block and used on our set of cave records, would produce the following (the title line has been added after the "Mailing list to RAM" command):

It has turned out pretty well, only Pigeonhole's name has been truncated, not exactly at the best place.

Truncation can, in certain cases, be avoided. Provided that we have only one instruction line as above and that all fields have a limited length (as above), we may ask STEVE to make more than one target line for one record. For this purpose the second field of the data base setup has been borrowed:

If the value of "Columns - columns per page" is greater than 1, STEVE will make up to that number of target lines from one record. Our last example would improve to:

As such a setting to more lines slows down the procedure considerably, it is advisable to use it only when necessary.

Another interesting question concerns printing a data field value in a precisely defined number of lines. Suppose we would like to describe a book title, which is the second field of every record, always in five lines, no more, no less. If the right margin value in the system had been set to 64 (as usual), the description:

would be the right one; the reason is that 350 is greater than 5 x 64 (320) and less than 6 x 64 (384). Short titles will be followed by some empty lines, whereas those longer than 350 characters will be truncated. And why have we written more than 320? Because the program will not divide lines exactly at the 64-th place, but at the last preceding space.

is the second form of the "Mailing list to RAM" command. It considerably shortens the path to mailing lists that have to be performed often. Suppose we store the instruction layout for producing addresses in the "Mailing list" system table. It is requested through:

It usually contains just one entry, the Invitation layout. Let us now add the address mail layout to the end:

and return the whole lot to the editor:

followed by a click on the first line ("*Invitation layout"). The "Mailing list" system table is now no longer necessary, and can be removed from the file. Let us try it on a short data base of high-class American addresses:

We select:

and show the instruction layout, this time not as a file block, but from the "Mailing list" file:

One more click is necessary - on the first line of our list of addressees:

and the mailing list is here, after the packed data records:

The data base from which the above lines have been made is no longer in the file. This version of the "Mailing list" command deletes it during execution, to save space, to allow longer lists and, last but not least, for sheer user convenience.

The third form of "Mailing list", the

command, is very similar to "Mailing list to RAM". As seen with "Simple mailing list" the only difference is that is does not produce the resulting list in the memory (where it can be inspected and, if necessary, modified before printing), but sends every record to the printer as soon as it has been completed. It is therefore suitable for the preparation of very long lists (many thousand of records) or lists where the instruction layout is several pages long.

CARDS

Connected to the mailing list procedures is the

command. It is used to bring records which have been shaped through the mailing list into their final order, with the right margin set to the card width (suppose it had been 45 characters and we have subtracted two, to allow some space at the side):

Let us pay some more attention to the cave data from previous examples:

The instructions differ from the last used in one single character - the space at the beginning of the first line has been replaced by a so-called hard space: it is typed as <Alternate><Space>.

Evidently not all the records are of equal length: the first is nine lines long, and the second only seven. Suppose that none are longer than nine lines and that we want to expand all of them to that length - maybe we have some pre-printed stationery, semi-hard document paper cut to size, or self-adhesive labels. We set the required parameter:

Now the "Cards" command can be selected from the "Dbase" menu, and, after a prompt, the first line of the first record should be clicked on (the command operates from the line shown to end-of-file):

The file expands, and all the records get a padding of as many empty lines as necessary to achieve the desired length of nine lines:

Should it happen that a record had been found to be longer than 9 lines during the "Cards" command, as many empty lines as necessary would be added to make the total record length a multiple of 9. A 12-line record would become 18 lines long, 19 lines would turn into 27, etc.

XV. SORTING & SEARCHING

It is now the turn of the middle group of data base commands. This group forms the basic, most frequently used tools. They will help us to handle various composite tasks later.

VERIFY

There are five such commands; the one before last is used to check if the records have retained their proper shape after we have been editing them as text for some time:

It tests all the records from current one, which the user is asked to show, to the file end. It reads record by record, counts the data separators (centered dots, obtained by pressing the key below <Delete>) in every record, and compares their number for successive records; they should all have the same number of separators. Suppose we had a file on bunting birds:

and have started "Verifying" on the record shown above. The cursor would immediately jump to the little bird with a black head. It has only one field, and the Latin name, present in all other cases, is missing. We correct it:

and select "Verify" once again, from here on. An O.K. message pops up:

If the command has to be used often, it is better called from the keyboard. We move the cursor to the first line of the record from where verifying should be done, and type <Ctrl><v>.

DATA BASE OVERVIEW

adds a short report on record structure to the file end. If applied to the short example from the "Record formatting" chapter:

Like the verify command overview also operates from the line we show to the file end; we show the first and obtain the following result (at the file end):

where the figures stand for:

In our example there are 7 records with a total length of 672 bytes. Field 1 has been present (not empty) in all 7 and had an average, minimal and maximal length of 4 bytes. Field two, the cave name, has also never been missing and had an average length of 32 bytes; the shortest name has been 10 bytes long (Yeti's Den) and the longest 84 (Big Cave under ...). Further on we see that depth and length were present only 6 times (one cave didn't have the relevant data) and that the longest occurence of the "Remarks" field has been 79 bytes long.

FIELD SELECTION

The command which comes next is probably the most often used STEVE data base operation. It modifies the order of fields in a record, selects only some of them, or repeats a field if necessary. It is called

Let us illustrate it on an example of a more ample document (this is what records are sometimes called, especially in libraries) from the collection of articles on the Adriatic coastal Karst (372 records, by Andrej & Maja Kranjc, enclosed in two files on the STEVE disk ("ADRIATIC.SDB" contains the articles in STEVE data base format, whereas "ADRIATIC.SDL" contains the display data entry layout):

Most of the record is composed of keywords describing the contents of the article and the references, used by the author. Suppose we only need the keywords (field 13 in the record) and article identification (field 1, "Bahun,S.,1984" in the above case) for further processing. We click on "Dbase", "SELECT FIELDS" and the program asks from which record on it should select. We move the cursor to the first line of the first record to be reordered, click and the program asks which fields are to be selected:

It is a bit clumsy, with numbers instead of names (planned for some later release of STEVE), but it can be done. We add a <Return>, and the record modifies to:

where only the selected fields are present. When data records include pictures, as in the collection (after J. Dimec):

Three data fields are present - the English name, the Latin name and a short comment, followed by a picture. The picture always has to come after the data, at the end of the record (a display entry with pictures is also possible). If the "SELECT FIELDS" command is used on such records, it will ask if the pictures are to be retained during selection:

"YES" will select the data as given, and will add pictures to the data, whereas "NO" discards pictures from all the records.

With the "Select fields" command it is also possible to select the same field several times (to make more copies of it in every record) or to select some non-existent field (it acquires an empty status).

SORTING

is a procedure without which a data base system is like warm beer or cold soup. Sorting, either in alphabetical order or by magnitude of numbers, is a cumbersome and boring task where the computer really comes into its own. STEVE will sort textual and numeric data, with sorting keys from the beginning of the record on. Let us have a look at part of the file:

To obtain it, keywords and identification have been selected from the previously mentioned collection of records, followed by the "Permute/simplify" command (see "Permute/simplify"). It has made as many records from the original one as there were keywords in it. The identifications have remained. We decide to sort the file according to the first two fields - on the keywords, and when two keywords are the same, on identification. After

has been selected, the program again asks from which record on it should sort: like "SELECT FIELDS" and most other data base commands, sort always operates on records from the one chosen to end of file. We move the cursor to the first file line and click there. There is, as many times before, a brief snow storm on the screen: the program is counting the records and their lengths, and building an index file. Soon we have the table with a question to be answered:

It tells us how many records there are and the space that is occupied. A file of three byte long pointers is already built - each contains the starting address of one record. For sorting, there must be at least 32000 bytes of free space, if there are less than 10667 records; if there are more, the amount of free space (in bytes) should be equal to the number of records, multiplied by a factor of three. This is the space required for the pointer file; as records are of variable length, and the program has to be quick, it does not reorder the records first, but starts with the sorting of the pointers.

Be it this way or that, in our case there are 2092 records (each containing a keyword and a record ID), totalling 68194 bytes in length. In the lower part of the prompt we tell the editor how to sort the records: the key denotes a field on which the file should be sorted. As has already been mentioned, it is only possible to sort on the same key sequence as the field order in the record. Should we wish to sort the file from this example on identification it would be necessary to regroup the fields (to have ID first) using the "SELECT FIELDS" command. In our example, we need sorting on two consecutive ascending fields (keys) and we click the required second key box as well:

It is now time to move the cursor to the "EXIT" box, and click there. The message in the last line tells us that it is possible to interrupt sort when in motion, with the right mouse button (the sorting of 50.000 records or more takes quite a while to complete). Unfortunately, interruption does not leave the file partially sorted - an interrupted index sort leaves it as it was at the beginning.

When sorting, the first of the two counters starts to roll at the screen bottom, from n/2 down to 1:

followed by the second one, running from n (the number of records) to 1:

To slow down the sort as little as possible, counters do not decrease by 1 but by 8. The heapsort algorithm (see Knuth, 1973) has been applied - it is twice as slow (on average) as quicksort, but has other decisive advantages like stability - worst case time and best case time are not far apart. With our file it takes some 20 seconds to order it:

It starts with two records without keywords. Where keywords are the same ("abrasion" appears six times), the records are sorted with respect to the second field, the identification. Several screens further on, we see that the collating sequence is truly such as given in the "System tables" chapter, under "Sort collating sequence" - the special national characters are treated as required:

Sorting speed depends on the number of records and on how many different values the first key has: the more it has, the faster sort runs. On average, sorting times are within acceptable limits - it takes not much more than two minutes to sort 10,000 records, and 75,000 records (each a word) will be put in order in 20 minutes. Compressed files are suitable for sorting - the comparison algorithm decodes the keys only as far as is necessary, and the loss of speed is therefore not considerable.

The program leaves the records in place at first, as mentioned, and sorts only the pointer file. When pointers are sorted, it is necessary to reorder the actual data records. This task takes as much additional space as the original file length.

In brief, files shorter than half of the total memory can be sorted without difficulty; if this is true (how much RAM is occupied and how much remains) can be most easily seen by looking at the "barometer" at the end of the main menu: the first column tells just what we need:

If the file is longer, then the editor scans it as usual and, when the pointer file buildup is complete, displays the following message:

It is a list of 75,207 words from an ordinary text; to squeeze it to manageable size (on a 1 Mb machine), it has already been compressed (see "Various", "Compress text"). The program needs an additional 522,652 bytes of storage to complete the sort. As this is not available in the memory, it should be there on disk. If working from a hard disk (and not a too overcrowded one), we just click on "OK", and the matter, as far as we are concerned, is closed. If not, a diskette with the above free space has to be found. An empty one would suit us best; it must, however, be formatted: the editor will reject an unformatted diskette. "ABORT" returns to the unsorted file. If we find a proper diskette, we insert it into the disk drive and select "OK".

After both counters have stopped, the program continues with record regrouping. It does this on disk, where the "SORTSTV.TMP" temporary file gets built up. When complete, the editor deletes the records to be sorted from the memory and reads the sorted file from the disk. This file will not be deleted: the program leaves it on disk, just in case. If the user is sure it will never be needed (the sort has only been done as part of a composite task) it may, of course, be deleted.

While writing on disk, the program builds up 32 K long pieces of the file in the screen memory. The screen therefore resembles, more or less, coarse linen patterns. Nothing is wrong - all the machine resources are being used, and so the screen RAM must participate, too.

Let us add a remark on sorting records with pictures. There are no limitations, as long as the picture is at the end of the record.

For sorting of really big record collections even the Mega RAM may be too small. If even the text compression cannot help, the chained sorting is available in the P and OCR versions of STEVE (see "About STEVE"). It is described in the "Chained data base" chapter.

SEARCHING

The main purpose of a data base buildup, as well as the greatest charm of the data base itself is searching. The related command in STEVE:

will try to collect from the file only the information we want. It will search through the records and select those that correspond to a given logical expression.

Let us try to extract from the cave data base all caves that are longer than 100 metres, or longer than 50 metres and were first explored between the two world wars. Cave length is field number 3, cave depth is number 4, and exploration year is number 5:

The logical expression defining our request should be written as:

or, if translated into a more understandable form:

Let: (third field be more than 100 or fourth field more than 50) and fifth field more than 1918 and less than 1941.

The general form of the logical expression is a sequence of the following form:

The logical operator can be one of the three Boolean operators:

Signs after a hyphen are used in the STEVE search expression. Not is executed first, then and and finally or. In the cave example we wanted to have or first (length > 100 or depth > 50) with and after it; brackets have been used to change the execution flow. The use of brackets is permitted if it is in accordance with the usual rules - an equal number of open and closed brackets, proper sequence and the like.

The logical operand is generally composed of:

where field label has the form #n; n stands for field number (as #5 for exploration year), while the relational operator may be one of:

Value may also be a field label and some wild carding is also possible. Examples:

Inverted commas were called for with the last two examples: the space is otherwise discarded, while the last value, without inverted commas, would be interpreted as two operands:

And what if a word in inverted commas is part of the record, and should be searched for? It has to be put in double pairs of inverted commas, as in

Some shortcuts are also available as you may have noticed. 0, as a field label, for instance, denotes any field in the record. Any field in the record may also be reached if we omit the field label completely from the first operand; similar considerations are valid for the relational operator "contains". If we write the search expression simply as:

it will be understood as follows: any field in the record contains either Brockton or Culbertson or Bainville. The field label and relational operator may also be omitted when they are repeated. Suppose field 7 is the purpose of a scientific cave visit, and we want to exclude all sight-seeing or surface-only work (&! should be read as "and not"). The required expression:

can easily be shortened into:

DATA BASE SETUP

Before we test all this in practice, let us have a brief look at the data base setup; it can be tailored to suit our needs better:

Several settings become available - and two of them are connected to standard searching:

If the search expression is no longer than 45 characters (it is possible to enter longer sequences, up to 500 characters, but only the first 45 are visible) it is wise to declare it short; after a search is requested ("FIND RECORDS"), we type it directly, as with the "Find" command. If it is longer, "BLOCK" should be selected. Before searching, we write it at the file beginning, and mark it as a block. In this case the total search expression length must not exceed 2.000 bytes. Attention must also be paid to how to divide the lines; they should be divided on a logical operator (at the end of all the lines except the last a comma, or an & sign or not (!) should stand). The short search expression is obviously anticipated in the above case.

"Query - keep the data base" tells the editor what to do with records that do not fulfil our search expression. If we select "NO", they will be discarded during the search, and at the end of it only the corresponding records will remain in the current file. In case the data base is on a hard disk such a decision creates no problems - if necessary, even a long file can be recalled in seconds. If the search has not produced what was expected, reloading of a longer data base from a floppy disk can take minutes instead of seconds, and so "YES" is preferable. Now the unwanted records will not be discarded during the search, but will only be moved to end of file. Such reshuffling also takes time, but after the search is complete all the records will remain in the memory: those corresponding to the search criteria will be placed at the file beginning, followed by a clear delimiting line (end of page):

and the records not selected during the search. If a search through the entire data base is to be repeated with another expression, it is only necessary to delete the above delimiting line. We locate it with the find command - its unusual character, also used for end-of-page lines, can be reached through <Alternate> and the key just below <Delete>. The file now contains all the original records, and another search may begin.

One small but important thing also needs to be taken into consideration: searches are always performed on records from the current record to end of file. It is therefore advisable to move to the file beginning before selecting the "FIND RECORDS" command.

Let us now illustrate the whole matter with a longer search, on the spell-checker's vocabulary of English words (over 30,000 words, the "SPELLING.ENG" file from the STEVE disk). Suppose we have written an article on "Home, sweet home" in the most direct sense it could have, and it is therefore all the words containing "house" or "home" that we are after:

We have written "hous" instead of the whole word "house" to avoid losing words like "housing"; with "home" it has been unnecessary to use "hom", which would produce a lot of unwanted words (see for yourself!).

The search expression is completed by <Return>, and the program asks for the record from which the search should begin. We click on the first line of the vocabulary:

and the search begins. There is a small amount of snow at the top of the screen:

and two counters start to roll at the screen bottom:

The upper one counts the number of records already hit (i.e. records that correspond to our search expression), and the lower one shows the total number of records searched through so far. After 1 minute and 40 seconds (the file is stored in compressed form) the search is complete: the counters stop, the bell rings and we find that there are 55 hits from a total of 31150 records. The program now waits till we move the mouse or press a key.

Can the search be interrupted? Suppose we have had more than enough hits at one fourth of the file already, and would like to stop. Any key, say <Space>, has to be pressed and the search halts. There are now two alternatives:

   1. pressing the <c> key (continue) resumes the search or
   2. any other key terminates the command.

We have let it complete the task, and when the mouse has been moved, the first screen of records found pops up:

The end of the "hit-list" is two screens further on, followed by a delimiting line and, as we have set the "Query - keep the data base" setting to "YES", the remaining 31095 unsuitable records are kept. As already mentioned, the delimiting line can be found through the "Find" immediate command: we get the required special character by pressing <Alternate> and the key below <Delete>:

The records hit are not particularly bad, and there is not much "noise" (unwanted hits), like the words amorphous, thousand with its derivatives or, from home, the tachometer. The major nuisance are words in the plural - it is not in our interest to have both "greenhouse" and "greenhouses". We get rid of the remainder first - we move the cursor to the delimiting line:

and the <Ctrl>qk command removes all the lines from the cursor to end of file. We move to the file beginning, and another search will take care of the remaining unwanted words:

This expression translates into: not (contains "amor" or "sand" or "tacho" or end with "s"), or even better - find all the words that do not contain "amor" (for "amorphous") or "sand" (for derivatives of "thousand") or "tacho" (for "tachometer) and which do not end with "s" either. We click on the first word from the file, and in a flash we find that

23 words have been removed. The beginning of the list now looks better:

and so does the end:

As can be seen, we have also used some wildcarding in the last search expression - right truncation (*s).

Let us now see how searching can be speeded up. It may be fast enough as it is with data files of several hundred K; when the data base is a chain of files (searched with the "CHAINED FIND" command) and contains 50,000 or more records and 10 or so megabytes, it is just not the same if it takes six minutes or twelve or even twenty.

To start with, if the file has been kept in compressed form, it is usual to decompress it:

The file will now take up more disk space, but although the search speed will not be increased too much, the way to further, more radical waiting time reductions has been paved.

The second step to top speed is to make as many records as possible only one line long. We set the line length to the length of the longest record (but not to more than 1800 bytes, of course), to, say, 1500:

followed by the command:

which reshapes the records. Suppose we had the cave file where every record has six fields:

The data have remained as before, only the records do not now span over several lines, but are limited to one long line each. So the search procedure will be spared some additional work. It will not have to put several lines together to make a record. An additional bonus is a few percent of disk space which will also be saved, as every line has two to three bytes of overhead (a line pointer and an extra space at the end if it is an odd number of characters long).

Another step to speed up searching is to forbid the program to equal upper and lower case letters:

Searching will proceed more quickly but we have to be sure that the data in the file are all written in a uniform way. The string, "Loch Ness", in a search expression will be found only if it always appears as such. "LOCH NESS" or "loch ness" will remain unnoticed.

The last step to be taken does not come under consideration often, but let us get acquainted with it anyway. Suppose the entire record need not be searched through, but only several fields. It is wise to regroup the record in such a case, so that the fields to be searched are all situated at the record start (the "SELECT FIELDS" command will take care of this). If we now state the field to be searched through explicitly, as in:

the program will not scan the entire record, but only the part up to the first data separator.

All these time-saving measures may have sounded a bit dry, so let us add some numbers from a real-life situation. Suppose we have enlarged our data base on the Adriatic coastal karst ("ADRIATIC.SDB" on the STEVE disk) to 2176 records, stored in 14432 lines, and occupying 840 K (1K = 1024) bytes of computer memory (uncompressed). We are looking for all documents connected with "abrasion". The search expression:

has been composed so as to reflect the two ways in which the term is written in different languages. Let us have a look at the timings,

with "keep the data base" set to "NO" at all times:

As you may notice, the file in the third case, with very long lines (2176 instead of 14432 short ones), is also slightly shorter, by 36 K.

As with sorting there is also a way to to search longer files than will fit the memory (see "Chained data base").

XVI. DATA PROCESSING

After having seen the top guns from the "Dbase" arsenal, let us now devote some time to the smaller tools which open up the way to full use of the heavyweight machinery.

PERMUTE AND SIMPLIFY

is frequently used command, which, from one record with a composite first field, like "keywords" or "authors", makes as many records as there are parts of the field. This may sound complicated, but is not. Let us take the record:

from the collection on coastal karst (ADRIATIC.SDB). Suppose we are about to make a keyword index so that the user can find out who has written about what. We select keywords (field 13) and record identification (first field):

to reduce the data to the essential elements of such an index:

Things are nearly ready for the "Permute and simplify" command. It is only necessary to make an additional check to see if the editor knows that it is the comma which delimits the keywords. The "Set local separator" command is called for:

It is normally used to introduce a new local separator, but can also be used to find out its current value:

The comma is O.K., and so we move the mouse to select:

This command, like most of the others from this menu, operates from the current record to end of file, and so we click on the line:

and the record changes into

We produced 13 records from the original one, as many as there were keywords in it separated by commas. Every keyword is the first field of a new record, while the other fields are the same in both records, the old and the new.

Suppose we now select keywords and identifications from the entire "ADRIATIC.SDB" file, separate them using "Permute and simplify", and then sort them on two ascending keys (see page 184) (and delete the first two records which have no keyword):

This is fine, but not quite acceptable as a keyword index. We want to group all the authors who have written on abrasion, for instance, into the same record, after the keyword. We also want to have them separated by semicolons, not commas (already used to divide last name, initial and publication year). The "Set local separator" command has to be selected, and we type a semicolon instead of a comma:

COMPOUND FIELD

The reverse command of "Permute and simplify" will now collect identifications of equal keywords:

We click on the first record to show from where on we wish to proceed, and compounding joins together the records with the same first field:

We have now obtained the keyword index. Before printing it, we only need to cut it up into separate pages (see "Print", "Break file into pages").

FREQUENCIES

a very often used command, produce the so-called frequency vocabularies - lists of words or terms where each is supplemented by the number of occurences in a file. Suppose we have extracted keywords from the "ADRIATIC.SDB" file ("SELECT field" 13), reset the local separator to a comma, separated ("Permute and simplify") and sorted the keywords ("SORT FILE", one ascending key):

We now select "Frequencies", click on the first record (to process all the entries from there to end-of-file) and the long list shortens into:

At the end of every record different from adjacent ones we have a new field, the number of equal records. The command is also capable of adding up the frequencies computed earlier. Should the last field in the record be a number, it will be treated as a record frequency. The lines:

will, after the command "Frequencies", join together to give us:

The command can also be used to process longer records, such as those with more than one field. The two mosquito enemies:

quickly turn into one:

Finally let us have a look at how to find the most frequent values in a list. Suppose we have the keyword frequency list from the top of the previous page. We move frequencies to the record beginning ("SELECT FIELDS" 2,1"):

so that sort can now be performed, descending on the first and ascending on the second field (if two keywords have the same occurrence, let them be alphabetically ordered):

After the sort is complete the most frequent keyword has moved to the top of the list (it appeared in 201 records), followed by the second most frequent and other very frequent records:

At the end of the list we see that the keywords used in just one record are really sorted in alphabetical order (second field):

and that water problems are still far from being solved.

SEQUENCE NUMBERS

is a command that gives a sequence number, from 1 on, to all the records from the one shown to end of file. The records

acquire an additional field in front, after the "Sequence numbers" command:

RANK

adds, as may be guessed from the name, a rank in front of every record. Rank resembles a sequence number, except that it compares the first field values from subsequent records and adjusts itself to the outcome. To illustrate this let us have a look several years back, to the Fourth world cup slalom race of the season 1986/87, which took place in Kranjska gora and ended in one of the best possible ways for the home team:

Every record is composed of eight fields - classification, name, family name, starting number, country, total time, and the times of both runs. Let us now make a different selection, so that the outcome of the second run will be at the beginning and let us sort it, ascending, on the first two fields:

The "Rank" command adds a second run classification to every record:

The new first field does not differ much from a sequence number, only in the case of Mathias Berthold and Didier Bouvet is it different. As they had an equal time in the second run, they are both ranked fifth, while the Great Swede after them gets rank seven. The table would, of course, not be printed as such, but in a more appropriate form, using the "Mailing list" command.

LENGTHS

are used to compute the length of the first data field in every record. Let us employ the command to find the longest and shortest titles from the collection of articles on coastal karst. To begin with, we select:

the title (field number 4) and identification (field 1) to find out who the author was:

The "Lengths" command adds them as the first field in every record:

and the whole truth is shown up after sorting, which should again be descending on the first key and ascending on the second:

We have only shown the beginning and end of the file; both speak for themselves.

NUMBER OF PARTS

command is usually used to discover records where a selected field is composed from the largest number of parts. It adds up the number of such parts (they must be separated by a local separator) in front of every record. We shall try to find the articles with the largest number of references from our standard data base. The first step is to select references (field 21), identification (item 1) and the title (field 4):

Obviously there are quite a large number of records without references (like the first three above). Let us get rid of them:

The search expression requested the first field (references) to be, alphabetically, after A. If references are not present, the statement is not true, and so the record will be discarded; if a reference is there, it is surely at least two letters long and so alphabetically after A. The outcome reveals:

that only 39 records had references. As can be seen from the first hit:

the references are separated by semicolons. To prevent disappointment, let us verify if STEVE's local separator is set to it:

It had been a comma, and now we have changed it to a semicolon. Now the command:

will be used, and we quickly find out that the first of the records has 9 references:

The references are no longer necessary, and we throw them away by

selecting only fields number one, three and four:

To assemble the articles with the largest number of references at the beginning, we sort, descending on the first key:

ADD FIELD

The next command comes in handy when there are a lot of records to be entered which all have the same value in one or more fields. It is a boring task to keep entering the same thing over and over again, so we therefore skip this value and add it later, after the data entry. The command to do so is:

Let us illustrate it on a collection of long-eared and short-tailed animals:

They all belong to Leporidae, and let us add this name in front of every record. We select:

and type the string to be added. It may contain data separators if it is necessary to add more than one field; our hares now have three data fields each:

FOLD FIRST TWO FIELDS

command is used for similar short-cuts. Suppose we have written the upper set of records as

and added the word "Lepus" by using the "Add field" command:

Now it only remains to join the first and second field together. We select:

added when the fields are joined; a longer string could of course be added, e.g. " - ". The final records are as they should be:

TURN AROUND

command, whose turn it now is, will help us to put in order the values of a given field, not from first letter to last, but in the opposite direction, from last to first. So-called inverse dictionaries are useful not only for rhyme production, but also for more mundane tasks, too, like the correction of a keyword list.

Suppose we make such a list from the "ADRIATIC.SDB" file again (see "Frequencies", add "SELECT FIELD" 1):

and suppose we want to see all the keywords with the same endings grouped together. After:

the keywords transform into much less legible letter strings:

In every keyword the first and last letter have changed places, and so have the second and one before last and so on. We sort out the mess, ascending on the first field:

and turn the fields around once again:

to get:

Nothing special, is it? Just keywords which are not sorted by their beginnings, as we have been used to so far, but by endings. More useful lines show up towards the end of the list, say, in an archaeology group:

Two synonyms turn up which might otherwise have escaped our attention. "Turn around" can also be used on longer records, with more than one field. In such a case the first field only will be reversed. Reversed lists also usually get reshaped, so that the words are written one under another right justified (see "Mailing list") and in columns (see "Columns").

BREAKING FILE INTO WORDS

is a procedure that uses the "Letters/special characters" system table to determine what a word is (a set of adjacent letters and/or characters declared as letters) and then breaks the file up so that every word becomes its own data record. Such records can be processed further at will - sorted, their frequencies computed, turned around ...

Let us illustrate the command with a short poem:

"Break file into words" turns a file of sentences into a file of words:

Suppose the file is bigger and word analysis is what we are up to. What else should be done before we embark on sorting and frequencies? It would be wise to put the entire word list into block and turn all the upper case letters into lower case:

This measure is not quite harmless (it will spoil the names), but is hard to avoid because of capitals at the beginning of every sentence.

"Break file into words", combined with "Upper to lower case" is also the first step to take when building (or updating) the spell-checker's data base from one's own texts.

To assure the proper operation of this command it is of great importance that the

"Letters" system table does not include any unwanted special characters. It usually contains the above shown set, with "()- as well. To eliminate these four characters from the table we delete them:

and return the new table to the editor through:

followed by a click on the first line ("Letters"). For additional explanation see "System", "System tables", "Letters".

INDEX

A modified form of the "Break file into words" command can be used to produce an index containing all the interesting words of a book and their page references. It is called:

and builds a file of words from a file of text, where to every word is added the page number as its second field. At the start we are asked to set the first page value (it may not always be one):

Suppose we have started on the first page and would like to make an index from the file:

There are three pages of text, and the beginning of every new page is marked in the usual way (see "Print", "Break file into pages"). We now mark all the terms that we find relevant for inclusion in an index - the preferred character to do the task is the so-called hard blank; it is obtained through <Alternate><Space> and it prints as space. With single-word terms we append this character to their ends, and for multiple-word keywords we put it in place of spaces (to prevent the term split-up):

For more comfortable work with large files it is advisable to assign hard space temporarily to the left mouse button (see "System tables", "Function keys"). We have also converted some terms (like "irrigation systems") to the singular; this could also be done later, after sorting and terms selection. Be it this way or that way, we select "Break and index" and the file translates into:

To avoid wasting natural resources (too much paper used) we have produced the list in three columns - how to do it is described with the next command - "Columns" or, for a page or two, by moving rectangular text blocks (see "Various", "Additional setup"). Every word in the above list is its own record, with page number as the second field. To produce an index we would now select from the mess only the desired terms. As they are marked by a hard space, a short data base query can be used:

with the expected effect:

The list of words is now reduced to the wanted terms:

which need to be sorted, ascending on the first two fields (term and its page number):

The raw list is now nearly complete:

In general the list would have to be examined to see if all terms are written correctly (capitals and the like) and, as many terms would fill more than one page, the list would only be useful compounded. Suppose the longest term is 28 characters long and we want two columns of index per page, which is 64 characters wide; so we set the right margin to 30 (we have left two characters for intercolumn space):

and select the

command to put all page numbers for the same term together (see "Compound field"). Two commands complete the index: "Columns" and "Break file into pages". Quite a task, isn't it? But it is worth the effort.

COLUMNS

Let us now illustrate the use of columns on some longer passage. It is a bit unusual so that it could be of help with "Anagrams" command:

We tackle the text with "Break file into words" and it stretches into:

We scan the file and quickly find (the command "Lengths" could be applied to a long list) that the longest word, "everlasting", is 11 characters long. It would not look nice if the columns were to stick to one another; so we select 12 as the column width. The "Whr" immediate command, used on the last word, reveals that there are 158 words (we have deleted the hyphen after "prevailed" by hand). As we plan to retain not more than 64 characters in a line (using the standard printer character font, not the condensed) 5 columns will fit in: 5 x 12 < 64. And how many lines per page? It will evidently be less than one page, as 158 / 5 is 32 in whole numbers. We select:

and set the column parameters to the required values. Having selected the next command:

the editor wants to know what kind of file to make - a file where columns will be treated as text, or one where they will be handled as data:

In our case "text" is the right decision. Click, and one more prompt occurs to show the line where column composition should begin. We show the first line ("It") and - what will be, will be. Some snow-flakes start a wild dance at the top of the screen, and the screen memory is again working overtime. After a short while, the screen is cleared and the file, modified in the following manner, shows up:

The last column is not full to the end, as 5 x 32 is not exactly 158. What would we have got had we selected "DATA" instead of "TEXT"? A similar result, but more economically stored:

From this form it is still possible to get into the former one, with equidistant columns, using the "Mailing list" command.

In general, as with an author or keyword index, the file would be longer than one page in most cases. In such circumstances we set:

to a more suitable value, like 60 (on single-spaced printout, for instance). The file of lines is now modified into a file of columns, page by page. The program leaves an empty line between two consecutive pages of columns so that the user does not grope around too much during the "Break file into pages" procedure.

The inverse procedure, to transform pages of columns into pages of simple lines, is not available in an automatic form yet - the task can be done page by page through the moving of rectangular blocks (see "Getting started", "Blocks" or "Various", "Additional setup").

ANAGRAMS

are a rather exotic tool that helps us find all the words composed from equal sets of letters. It is used with puzzle solving and several linguistic tasks. Let us examine the passage from the previous example, already split up into words:

We make a block out of it and transform all capitals into lower case:

The commands to follow are sort and frequencies, so that equal words fall together:

Frequencies are not needed for further work, and so we throw them away:

It is now time to select "Anagrams". Every word will get all its letters in front, capitalized and alphabetically sorted:

We sort it, ascending on both fields:

and we are pretty close to the truth already:

After the "Compound fields" command, the anagram file is more or less complete:

All that remains to be done is to select the records where the second field is composed of more than one part. They contain a comma and so

can easily be identified. Inverted commas had to be used as the comma would otherwise be taken as the logical operator or. 16 records (out of 84) remain after the search:

To move the most interesting to the beginning, we limit our scope to field two ("SELECT FIELDS" 2) and compute the "Number of parts" (checking to see if the local separator is set to proper value, the comma, can be an additional measure of precaution):

The expected outcome pops up on the screen after

the file has been sorted again:

SIMPLIFY FIELD

The command which comes now is related to "Permute and simplify", especially to its last component. It will remove all parts of a composite field but the first one; a local separator setting is used to distinguish such parts one from another. Suppose we would like to retain only the first author from the records below:

Authors are separated by "&" characters, and we tell this to the editor:

After the command:

the file simplifies into:

FROM FIXED FORMAT TO FREE

command comes in handy when it is necessary to modify a set of shorter, one line long data records, stored in so-called fixed format, into a form acceptable to STEVE data base commands. Fixed format, where every field has an equal length and starting position in all the records, and where data separators are not necessary, is typical for most business data base systems, on micro as well as on mainframe computers. It is the least complicated and therefore also the standard format for application programs (written for instance in COBOL, FORTRAN or BASIC). Such a format is, however, less suited to information retrieval or other systems with data of variable length and number.

Let us illustrate the command on a set of nicely aligned cave data, as can be produced, for instance, by "Mailing list" (the top line with numbers is for reference only):

Every record contains a serial number, the cave name, cave length, depth and exploration year. To get it into free form, data separators should be inserted at positions 5,33,39,44, and superfluous spaces should be removed. We select:

and then type in the required numbers, show the first line to be processed (the command operates from current line to end of file) and the records translate into a less clear, but more space-saving form:

DATA REPLACEMENT

The next two, closely related, STEVE data base commands are:

They are used for massive replacement, translation or verification of data fields or their components. Suppose we have encountered a set of records:

where someone obviously did not care to write keywords and regional descriptions in full. For an experienced karstologist it is not difficult to decipher that "gm" in the first record stands for "geomorphology", "kar" for "karstology", "pk" for "paleokarst", "e" for "Europe" and so on. We also notice that some terms have not been shortened, like "Modra spilja" or "littoral spring". To complete the documents we build up a sorted file of abbreviations and interpretations:

(to save space only the beginning and end are shown) and install it as a dictionary:

(also see "System", "System tables"). It is important to write abbreviations exactly as they appear in documents, and upper/lower case letters are not the same (the abbreviations "AC" and "ac" are two different entities). As mentioned, the file must also be sorted.

It is now time to perform the replacement:

- the keywords and regional descriptors are fields 13 and 14, and we plan to make replacements in both. A click of the left mouse button on the first record line:

and the file upgrades to:

In a similar way, if space is badly needed, the above file can be shrunk in size again, installing the interpretations-to-abbreviations dictionary:

which should of course be sorted as well, and applying the "Replace data" command as before. The same procedure will come in handy if, for instance, keywords are to be translated from one language to another, large chunks of synonyms converted to proper terms, two thousand improperly written authors corrected in one go and the like.

DATA VERIFICATION

The other command, "Mark data", is used to "spell check" components of composite data fields. We can build up, for instance, a dictionary of all possible keywords, like the one we made with the "Frequencies" command:

To save space, it can be stripped of the second field contents (but not of the data separator), using, for instance, the:

sequence (field 3 is not present and we only get the separator):

We add the obvious end-of-system-file line pair to the end of the list:

and install it as a dictionary again. To test some new records like:

where several keywords are bad, the command:

will add two question marks to every component (they should be divided by a local separator, a comma in this case) of the field 13 (keywords) that is not found in the dictionary:

FIELD TO UPPER AND LOWER CASE

Two commands that now follow are used to perform a simple transformation of the first data field in every record. The first command turns all letters in the first field to upper case, while the second does it to lower case. And where could such an operation come in handy? Suppose we have some two-language dictionary, like the English-German one (ENG-GER.DIC file) from the STEVE diskette:

and would like to use it for more immediate translational help as we have been used to doing (see "Find" menu, "Binary search"); to make things more complicated, let us also assume that it is the inverse dictionary, German-English that we are up to. We first make a one-to-one dictionary (one translation only for every term):

After the two above steps (assuming that the local separator has not been changed from a comma) we get the list:

which comes closer to an "Abbreviations" dictionary, after the

"Field to upper case" command and an an obvious sort:

The only nasty thing is that we have obtained some German terms in more than one copy, like "Abendessen" or "Absicht". How to get out of the problem if we cannot afford the screening of the entire list? Four commands are necessary:

to get the list which really can be used as an "Abbreviations" dictionary:

The last two lines, a pair of double-zero-byte lines, have been added to the end manually, to fulfill the requirement of a STEVE system file. We move to file beginning and return it to the editor as a "Dictionary" file:

It is now ready to be used through the <Clr Home> key: just type an unknown German word, like while translating the statement:

press the <Clr Home> key and the word translates into English:

STEVE command, which translates an entire block of text wordwise according to the dictionary contained in the file space 10, is described under "Varia", "Spell checking".

The alternative command:

transforms, as already mentioned, the letters of the first field in every record to lower case.

REPEATED DATA

There is a STEVE data base command:

which is used to facilitate the data entry in the case of one or more fields having the same value through adjacent records. Let us illustrate the command with an example. In the set of records:

two fields in the second record (state, remarks) are the same as in the first, and three (family name, place, state) from the third are the same as in the second record. We could take advantage of this and enter the records as:

After such data records have been entered, the "Solve repetitions" command gives all repetition marks, the single quote characters ('), their full values.

Records, to be processes by this command, are limited to 6,000 bytes in length (when interpreted).

RANDOM NUMBERS

is a facility which can be used to regroup a collection of records in a random fashion, in a way an opposite of sort. Suppose we have made a fashion prize contest in our magazine and received ten correct answers from

Three prize winners have to be selected, purely by chance. The command

adds a random number as an additional field in front of every record:

As the 24-bit TOS random number generator is used the number can be up to 8 digits long and we always get a different sequence; the generator cannot be set to some particular seed. After some sorting:

the order of our contestants is very different from the one at the beginning - they have been mixed at random:

We add two more commands - first we throw away the random numbers which we no longer need and second we add the sequence numbers:

to obtain a clean, randomly intermixed list of participants:

The command can also be used to prepare some sports tournament start list, to select the flower pattern of a garden, to help with some tight decision on where to spend the holidays or for some even more exotic task.

CHAPTERS

are used to make an output of the record formatting facility ("Mailing list") more transparent, clear on some occasion. Let us try to present the data on ancient sources where the use of garlic has been documented:

to take the layout-description line like:

to obtain the more readable output (see also "Mailing list"):

To make it more transparent, we could have used the

command on the original, non-formatted data. In the resulting records:

the first field has been supplemented by an empty value if its predecessor (first field from the previous record) was the same. The "MAILING LIST to RAM" command, using the same layout as above, could now produce the desired list:

CONCORDANCES

could also be described by the longer name, as "keyword-in-context". It is an index, often used in linguistics, where every word from a book or an article is shown, together with a bit of text before it and after it, together with the page number and line number. We shall try to demonstrate it on the main part of the following recipe:

It has been cut into three pages so that we can observe the resulting page numbers as well. Just for reference let us add the first part of the recipe, less suited for some "in-context" procedure:

Before we embark on "Concordances", let us check the

system table first. It should be cleared of all unwanted special characters and, usually, of numbers as well:

How to do it is described in the "System tables" chapter, under "Letters and special characters". If special characters are also present in the above table, they will be treated as parts of the words which they stick to. Now let us also define how long the "context" length should be. We do it through the

parameter. We set it 20, for instance. Now let us select

and click on the first line ("Cottage cheese biscuits") when asked for. Our short file transforms into a long list:

of which only the beginning and end are shown here. The text has fallen apart - we get a collection of records, one record for every word. The first field is the word itself, the second 20 characters in front of that word in text and the third the 20 bytes after it. Fourth is the page number and the last, fifth field brings the line number on that page where the word has been located. As can be seen, only lines with text contents are counted, and the end of line is shown by an "<>" character pair.

What to do now? We could first modify the upper case words in the first field to lower case (provided that we take care of names that might get hurt later):

reorder the file before sorting:

so that the page number and line number come to places 2 and 3. Sort may now follow (three keys, all ascending):

to make the ordered list:

The word "add", for instance, appears twice: on page 1, line 3 and on page 2, line 1. To make the list more clear, we format it using the "Dbase", "Mailing list to RAM" sequence, with the following layout line:

It reads as: put field 4, 20 characters long, left justified, followed by space, field 1, 12 characters long, space, field 5, 20 bytes in length, semicolon, field 2, 3 places long, right justified, a comma, field 3, 3 characters long, right justified (see also the "Mailing list" chapter). The list now takes its final form:

COMPUTE FIELD

is the last standard data base command available at present. It computes an additional first field in the same way as the calculator would. An expression to be computed has to be entered first, such as:

explained as: let the new first field of every record be 120.50 times the difference of fields 2 and 3. Suppose we have the small collection:

where the records should be computed according to the just mentioned formula. After the

command selection we type the expression to be computed:

and, when the prompt where to begin pops up:

we show the first record ("London"). New records are computed and the file changes to:

For the expression, number of decimal places and the like all the rules, described under "Varia", "Calculator" are valid.

The capacity to make such computations in a vertical direction as well (besides the "Add rectangle" from "Varia", "Addition") is being considered.

XVII. CHAINED DATA BASE

It often happens, especially in the professional area of data processing, that the data base size exceeds the size of available computer memory (RAM) and has to be organized in parts, on disk. The standard version of STEVE does not support such mode of operation, while the other two - the Professional and OCR versions do.

The chained data base is a collection of STEVE files, all having the same first part of name and a hexadecimal sequence number for the extension, such as:

We see that some freedom concerning file names has gone - we can freely select only the first part, while name extension (the part of the name after the dot) is to be the chain link's sequence number. If a chain is short, the file names could have shorter extensions, like fabrics.1, fabrics.2, and longer ones, if the chain is large: recipes.001, recipes.002 ... Sequence numbers are in the hexadecimal number system - after 9 comes A (= 10), B (= 11), C (= 12), D (= 13), E (= 14) and F (= 15); 10 comes instead of 16. The usual decimal system has not been chosen - three decimal digits allow numbers up to only 999, while three hexadecimal digits go up to FFF, which is 4095 in decimal. 999 might seem a very large number - yet in some circumstances, where it is convenient to keep a large data base as a long chain of very small links for chained binary search, for instance, it may be too small, especially as bigger capacity disks (80 Mb and more) have come into an acceptable price range.

The above chain is composed of 32 links, all STEVE files that can be read individually from disk and edited if necessary; yet they are treated as chain for any of the chained data base operations:

We have met most of them before; some are new. Two commands are copies of commands from the standard "Data base" menu, added here for convenience - the "Set local separator" and the "Data base setup".

OVERVIEW

Most other commands first perform a "clear memory" operation, followed by some transaction over the chain. The simplest, which does not change the chain, is the

It clears the memory and asks the user for the name of the first chain link:

We type it and the overview proceeds: it reads file "words.001", the first chain link, from disk, computes the "overview" parameters from it, clears memory, reads the next link, "words.002" and so on. The procedure stops when there are no more links to process - until the link which has no successor has been evaluated. At the end we get the overview results, cumulative of all the links, on screen, and nothing else.

The chain links, however, must be numbered without gaps: if, for instance, after "words.006" there comes "words.008" and "words.007" is missing, the chained overview will stop at "words.006". It is also possible to start the command with some other chain link, not the first one. Had we declared

as the beginning, the command would proceed from that link to the end of the chain. It is a usual way of testing a new chained data base command - not on the entire chain, just on several links at the end.

VERIFY

Similar to standard "Verify" data base command, is its chained variety:

It proceeds from the beginning of the link we type as the starting point, to the chain end. Again the "O.K." message is displayed if all is fine or the programs stops at a faulty record in the respective link.

CHAINED BINARY SEARCH

In "Searching in text" we saw the standard binary search. It requires a file, sorted on the first data base field, and finds whatever is required in a moment. Chained binary search is an extension - it expects a chain of links, all together sorted on the first field (by the "Chained sort", for instance). The command treats the current file name as the name of the chain on which the search should be performed. There is an immediate command for this purpose: <Ctrl>qqbf - it defines the current file name.

As STEVE stores the disk directory internally (once some disk menu has been called for) the program knows in advance how many links the chain has and can therefore perform a double binary search - first to find in which chain link the searched for entry is and second, to get it in the link itself. After the search is complete the respective chain link will be in the memory and the cursor positioned at the beginning of the record found. In the case of "NOT FOUND" the same message is displayed; after any user action the program opens an empty line between the two records where the new entry should be inserted.

Let us add an example of chained binary search. Suppose it is to be done on an encyclopedia, stored as a chain of files, beginning with "words.001", where a word is the first data item, followed by an explanation in the following fields. We begin with the chain name definition:

(we could type the name of any other link in this chain as well) followed by the search itself:

Unlike the standard binary search, the chained one does not perform the search while the entry is being typed, but waits till it is ended by <Return>. On a 25 Mb long chain the command would take around two seconds to produce the desired record. Chain file name definition is also no longer required once the first chained binary search has been done.

With binary and chained binary search it is important to have the program informed if there are some lines longer than 255 bytes (usual line length in STEVE is 64 bytes):

Search is slower if lines are longer; if they are, and the setting has been left to "NO", the results of the search are unpredictable.

Like all the other chained data base commands, binary search can also be performed on connected disk partitions, to allow bigger chains than 16 Mb (the limit is 128 Mb, see "Varia", "System setup").

ON THE SPOT MAPPINGS

The above chained data base commands all work on the spot - that is they ask for the chain name, as the:

then they read every link of that chain from disk, process it and store it back to disk under the same name. If we want to keep the source chain unchanged, as well after any of the above transactions, we have to make a copy of it at first, through the "COPY" chained data base menu selection.

"COMPRESS" selection is the only one from "On the spot mappings" not explained under the standard data base commands. As the name reveals it will compress the file chain, yet not every link with regard to the frequencies of its own characters but to the characters in the whole chain together.

COPY AND MOVE

There is a lot of work before large data base such as are usually stored in form of a file chain, is built. And, if there is a big hard disk at hand - usually it is recommended to have disk space four times as big as the actual, living, data base - it is good to make a copy of the file chain before attempting some transformation on it. There are few streamers around and a backup from floppies is not really convenient. The

command will do just that and a little bit more. It will first ask for the name of the chain to be copied (source chain - first link file name):

and the name of the new, target or destination chain that will be made during copying:

When both have been typed in, the program computes the maximal possible target link length and asks for the suggested one:

Maximal target link length is set to one third of the available RAM so that unions and sorting could are also possible on the target chain. We have typed the value of 150000 and all the links in the destination chain will be just a little shorter - the program will not cut the data base records - every chain link must have a whole number of data records. Only the last link will, for obvious reasons, be shorter.

The companion command to "COPY":

will also make a copy: only the original chain will be deleted during the process. It is used when we have a chain where the records have very different link lengths and we would like to put things in order or when we want to increase or decrease the overall link size.

It is wise not to give the destination chain the same name as the source one - troubles may arise if we do and if the destination links are shorter than the source ones. In such a case the program will make new links faster than the old ones are discarded and so the target links, having the same names as the source ones, will not only overwrite the latter, but will also be input as the sources. The snake will start eating its tail and a loop will be closed - it may take quite a long time before the disk space will be used up and the command artificially terminated.

FIELD SELECTION

This command, like the "Copy" and "Move", is also of the SOURCE to DESTINATION variety - it asks for the names of the source and target chains, yet does not regroup records in the links. Every source chain link is read into memory, fields selected and the result written to the destination chain; in this way the number of links in both chains is equal, even if the destination links are far smaller. "Move" after "Select fields" can be used to make the resulting chain more balanced.

CHAINED SORTING

Sorting and searching is where it all comes to - and let us see chained sorting first. It is used to sort big record collections: 25 Mb (95.000 records) is the biggest that has been sorted by STEVE (on a 1040 ST with a 60 Mb hard disk) up to the issuing of this manual.

As mentioned at the beginning of this chapter, we form our data base as a chain of files (chasin links), all having the same first part of name and a hexadecimal sequence number for extension, such as:

The "Chained sort" command sorts the file chain, which must reside on hard disk. It is recommended that a prior backup of the chain be made for a case of power or disk failure during such a sort; to allow sorting of data base as big as the hard disk, virtually no extra disk space is taken. Intermediate temporary files are therefore deleted immediately after they are no longer necessary in the process; so chained sort cannot be resumed from the point of eventual interruption. The length of any file in the chain is limited to such a size that it can be sorted in RAM:

or, a more convenient formula (N = maximal number of records in any link of the chain):

i.e.: on a 1 Mb machine and a typical STEVE.RSF file approx. 520 K is left to the user. If the longest file in the chain contains 10,000 records, its size can be up to 198 K: (520,000/2 - 10,000*3 - 32,000).

As with "Copy" and "Move", the chained sorting command also asks the user to state the desired resulting chain link size and packs as many records as will fit that size into every link.

And how to sort a data base, larger than the hard disk partition limit (16 Mb), say, 30 Mb long? We write the chain of files as described in several disk partitions and connect them together:

(also see under "Varia", "System setup", "Connected disk partitions"). Currently up to 8 partitions can be connected, giving a total chain space of 128 Mb, for any of the chained data base commands.

CHAINED SEARCHING

It often happens with searching, as with sorting, that the file is too big, and despite best efforts it cannot be pushed to fit into the available memory. The "CHAINED FIND" command is used to search through several files in one go; the data base, split into links, forms a chain during the search. It is very convenient if the chain is on a hard disk.

As opposed to the usual query, no part of the file should be in the memory when a chained search begins: like most other chained data base commands, it clears the RAM before starting. We first enter the search expression, followed by the name of the first file in the chain, for example:

and the target chain name (its first link), such as:

With a non-chained search the source and target files are both in memory - the source is there by definition, the target cannot be bigger than the source and so fits in. Chained search, on the other hand, can produce the resulting file which will be a chain of its own.

Suppose we have organized the "books" data base as a chain of 24 files:

Every file in the chain is an independent entity, which can be edited at will. It should only be stored in STEVE format (ASCII is not recommended), to reduce the loading overhead.

Let us now have a look at the setup settings used in chained searches:

The SEARCH EXPRESSION length can be set to "BLOCK" for an immediate chained search, if longer than 40 characters like the one below:

We write this expression at the file beginning, and make a block of it; search expression lines should not be divided but on a logical operator (on a comma in our example).

In practice the search expression length would be left to "Short", as chained data base search is in most cases performed in batch mode (see "Batch processing" chapter).

QUERY - KEEP THE DATA BASE: the decision to keep the data base or not is irrelevant - chained search sets it to "NO" in any case.

The next setting tells the program if the file chain is on a hard disk or a flexible disk. If it is on a hard disk, which is highly recommended, the command proceeds with no need for user intervention. If not, it is necessary to confirm that the right diskette is in the disk drive for every link in the chain. The program waits till we press <Return>.

HIT LIMIT, the last setting, is especially important for the batch processing. If performing periodical information retrievals, like the ones connected to SDI (Selective Dissemination of Information) it usually does not make sense to get too large a number of records during the search. Computer resources are better used if we set some sensible limit like 51 records or so.

For an illustration of the chained search let us take a data base, composed of data on 80,000 articles from various fields, on 22 files, from "articles.01" to "articles.16". The current file is still empty, and we want to have all the records in which some cave decoration, either dripstones, stalagmites or stalactites, has been mentioned:

After <Return>, the program would like to know the name of the first chain file:

We type it, followed by, of course, the <Return> key:

The target chain name prompt is answered next, in the same way:

Interesting things start to happen on the screen: hit and record counters pop up at the screen bottom and the file name starts changing, from "articles.01" on. When the program has searched it through, the counters stop, the file name changes to "articles.02", the red light on the hard disk flashes several times, and the counters start to roll again. The procedure continues until the program has found that the file "articles.17" (after "articles.16") is not on disk; the bell rings and the search is completed:

Had the chain been stored on a set of floppy disks, the "Chained search" setting in "Data base setup" should have been turned to "FLEXIBLE disk". After the first file name has been given, a message shows on screen:

that prompts the user to confirm the presence of every chain link with <Return>. Even if several files of the same chain all reside on the same disk, <Return> should be pressed for each of them.

The search discovered 30 articles with some information on calcite cave decoration from the total of 85,264 articles. The screen remains as it is until we move the mouse or press any key and the selected records show up.

It is not always necessary to start with the first chain link. Had we, for instance, responded with "articles.08" on the "New file name" prompt, the search would have included the links from "articles.08" to "articles.16".

To conclude, let us say a few words on how long the files of a chained data base should be. For the sake of the "Union" command family it is wise to keep chain links below one third of the available machine memory. This would be 150 - 200 K on a 1 Mb ST, and correspondingly more on a 2 or 4 Mb computer. Very small files, particularly convenient for the chained binary search, are less suitable for chained search, as they increase the hard disk overhead. When putting a chain together, we normally read data and save them as they come, not paying too much attention to the chain link size. When the chain is complete, we balance the link size through the "Move" chained command to suitable links of, say, 1,000 or 2,000 records. Data compression can be called for as a last resort when there is a lack of disk space. And, as chained find does not operate on a chain where links have been individually compressed (for reasons of speed), there is a command which shortens an entire chain in one go:

And a faster way of information retrieval, using inverted structures, hypertext fashion? It is being seriously considered.

UNION

It is a set of four commands that are used to merge two sorted chains (both sorted in the same way), either records or their fields, to extract a large portion of records from one chain (to be corrected, for instance) or to extract the complement of such a portion. All union commands operate on two source chains and make one target chain as a result:

RECORD MERGING

Suppose we have two chains with selected fields on articles describing the coastal karst (the ADRIATIC.SDB file from the STEVE disk): one named "PERIODIC", with links from "PERIODIC.001" to "PERIODIC.004", which contains all the articles published in periodical publications, and a second chain, with links from "OTHER.001" to "OTHER.003", containing other articles - monographs, dissertations and the like. Both chains are sorted on the first field - the "PERIODIC.001" begins with:

while the link "OTHER.001" has a similar starting point:

Let us try to merge the two chains into one, named "ARTICLES":

The program would at first like to know how the chains have been sorted (see "Sorting and searching" chapter, "Sorting"):

Both chains must, of course, be sorted in the same way and here they are sorted ascending on the first field. So we click on "EXIT" and type in the chain names:

There are two source chains that will be merged into the destination chain. One more prompt pops up:

The standard answer, if there is enough space on disk, would be "NO" - after the union we want to retain not only the result but the two source chains as well; there is also a chance of stopping the process ("ABORT"). We click on "NO" and after some disk activity the disk menu shows three chains:

As can be seen, the size of the destination chain links is determined by the bigger of the source links (or by the size of available memory). The memory has been cleared and so we read in the "ARTICLES.001" to see if all is well. We get the expected:

FIELD MERGING

It often happens that we have put together a large data base and after a while it turns out that every record needs some additional fields. It may also happen that the additions are stored in a separate file or chain and that we would like to combine the whole lot together. Suppose we have two chains, "TITLES", where every record contains an identification (field 1), followed by the title and place:

and "KEYWORDS" which brings for every record again an identification (the same as in the "TITLES" chain), followed by a list of keywords and the language of the paper:

We would like to put the fields together and so we select the last entry from the "Union" submenu:

type the desired chain link names:

and obtain the records with combined fields. Here the first three records from the file "TITLKEYW.001" are shown:

An additional "Select fields" from 1-5 command is required to bring things into standard shape:

If, during the field merging, a record is found in the first source chain which has no match in the second source chain, or a record in the second source without a match in the first one, it is discarded.

RECORD CROSS-SECTION

During a large data base checkup - full records have been output to paper together with various indexes - it turns out that, say, 3,000 out of 50,000 records, picked here and there, have to be extracted from a file chain. Suppose we have the "ARTICLES" file chain from the example in record merging; part of the "ARTICLES.001" file is shown below:

whence the following list of records, the identifications of which (together with the terminating data item separator) we have stored in the "LIST" chain, has to be selected. The beginning of the "LIST.001" file is given here:

The "LIST" chain may have only one link - any chain with just one link is valid in any respect. We start the procedure and select the third option from the union:

The resulting chain, "SELECTED", is in fact the wanted selection from the chain "ARTICLES" - as is proved by the beginning of the "SELECTED.001" file:

RECORD COMPLEMENT,

the second selection from the "Union" submenu, is a supplement to the "Record cross-section" union command. If applied to the two source chains from the previous example:

From the command line it is not difficult to find that the destination file will contain the records from the first source chain, the identifications of which were not included in the second source chain. The beginning of the "NOTSELEC.001" file is shown here:

Let us add a remark at the end of the chained data base commands - it is usually advisable to perform them in the batch mode, described in the next chapter.

XVIII. BATCH MODE

Like the chained data base this feature is included in the Professional version of STEVE, but not in the standard one.

It is of great help when a sequence of, say, data base commands has to be performed often in the same order, or if the task is composite and needs some debugging before we are happy with it. Such a composite task, which would normally require a lot of menu selections, can be written as a procedure of commands in special batch control language. The batch mode of operation is especially recommended with a chained data base.

Let us have a look at the following lines:

It is a simple procedure aimed at producing a keyword-and- identification-numbers index from the "ADRIATIC.SDB" file (supplied on the STEVE disk). Would the above sequence be at the beginning of our current file space and had we selected

the command would process the file to the desired result. At the end the above procedure would disappear from memory and we would find the index there.

And where is the information that helps STEVE understand such a sequence kept? It is stored in the STEVE.RSF file, and can be seen and manipulated through:

The beginning of this table shows the following:

There is a set of data base records, each having a batch command name as the first field, a data item separator and a control command sequence (see "System tables", "Function keys") in the second field. Command names should be written in capital letters and should not include special characters - only letters, numbers and spaces. Most commands are simple and can quickly be found in the "Immediate commands" chapter at the end of the manual. The third command contains a longer sequence:

and let us try to explain it:

Additional batch commands may be added at will - with their names in capitals and kept alphabetically sorted, of course.

In general the batch sequence is a set of lines falling into one of the following four categories:

a) comment line. Any line which stands in place where a command line would normally be expected, and which begins with a slash (/), is treated as comment.

b) command line - name of command, optionally followed by a delimiter and command arguments; no spaces are required between the delimiter and the arguments. Examples of a simple command are "Clear memory" and "Permute and simplify", while "Sort filea,a" is delimited by a sharp colon <Alternate><key above Alternate>) and followed by arguments "a,a" (sorting in ascending order on the first two fields). A command may have several following lines as arguments, like "Define page headers and footers". Such lines are called

c) command continuation lines - they usually start with a space or some special character, but may not start with a letter or a number.

d) module name. Frequently used sets of batch commands can be grouped into procedures which are given a name and called by an "include" command. Any module begins with a line starting with a sharp colon (), after which the module name is written (<Alternate><key above Alternate>). It is followed by commands which constitute the module body and is terminated by the beginning of another module or the "end of batch" line.

Let us now rewrite the last example into a more convenient form: as a main routine, followed by module, serving as a subroutine.

It is possible to nest include statements (module contains reference of another module) to a depth of 5.

Let us now have a look at how several data base commands have been modified for batch use.

SORTING

There may be up to five sorting keys (shown above), where x may be either "a" (key with ascending order) or "d" (descending order). If the command is used without arguments, one ascending key will be assumed.

When sorting a file chain the keys are given first, followed by a <Return> character (code 005) and the name of the first chain link. The size of the sorted links will be determined as the biggest possible (RAM/3).

SEARCHING

Logical expression with the "Find records" command may extend over several lines (up to 408 characters is the currently installed limit - to enlarge it see "Sort file chain"); continuation lines must start with at least one space and every line but the last must be terminated by a logical operator (like a comma or an &).

With "Chained find", an expression may again extend over several lines; the names of the first file in the chain to be searched through and of the destination chain are written in front of the command. If after a chained search the resulting hit chain (destination chain) has only one link it remains in memory as well.

RECORD FORMATTING

command is followed by its layout (which is normally put into a block when executing the command directly), terminated by a single-zero-byte line.

An example:

The same consideration applies to the "mailing list to printer" command.

BREAKING FILE INTO PAGES

command normally precedes the "Break file into pages". It gives an opportunity to define the left and right page endings. If the second page ending is missing (as in the preceding example) the first ending will be used for both. As no command continuation line may begin with a letter, the titles which should begin at the line start must be moved one space to the right, or to trick the printer, start with a zero byte before the actual title, as in:

SUBSTITUTION

The command used to replace a selected string of characters with another:

normally waits at every found occurence of "Tony" (in the above case); the substitution has to be confirmed through the left mouse button or an automatic further replacement can be requested by the <g> key ("go"). A command sequence that would perform the task would be the following:

It could be read as: substitute, Tony, <Return> by Anthony, <Return>, go! The required batch command could have the form:

and would be used as:

The "g" at the end is not written as it is not necessary - substitute, if performed during batch, will assume a "go!" selection.

SETUP VALUE DEFINITIONS

During batch processing it can be necessary to change some setup value. For the most frequently used settings the required commands are already provided.

for instance has a 5-digit argument which may have values up to 1800. To set the right margin to 45, it should be written as

The same applies to the "Hit limit" setting:

00000, the usual setting, requests no limit with data base searching or chained searching.

Left indentation with mailing list, number of columns, column width and number of lines per page for columns can all be set in a similar way

For other setup parameters which may not be supplied in the "Batch commands" system table it is not difficult to write the required command (see also the "Immediate commands" and "System variables" chapters). Here is a list of some immediate command families, connected to setups:

^qqbs051x set any main setup variable - x : {1,B}
^qqbs121x set any printer setup variable - x : {1,B}
^qqbs231x set any additional setup value - x : {1,7}
^qqbs301x set any data base setup value - x : {1,9}

Example of command definition:

Actual command which sets first page to 85:

BRANCHING - IF STATEMENT

There is a command in batch, not accessible in direct mode. It is the IF statement which facilitates the handling of multiple searches from a data base. Its general form is:

It can only be applied after some data base search, a normal or a chained one, has been made. The first statements asks if the expression on the right is true (if number of hits: < 200 ... for instance) and then executes the "yes" or "no" command group. Besides the full "IF-ELSE-ENDIF", the short form,"IF-ENDIF", is also possible - else statement and the "no" command group may be missing.

IF statements may be nested, to a depth of 10.

Example: suppose we have accumulated a large collection of documents on speleology, at the Western Speleological Library. It is too big to fit into memory and is therefore organized as a file chain (see "Chained data base") - the first chain has the name articles.001, the second articles.002, 10-th articles.00A, 15-th articles.00F, 16-th articles.010 and so on. From time to time search requests from the users of the library are processed; suppose we have two at the moment, for Mrs. Kozlowski and Mr. Chamois. Let the structure of the data base be similar to that of the ADRIATIC.SDB file, so that field no. 19 is the language of the document. We compose the following batch sequence:

At the end of run the results of both searches, neatly formatted, are stored in file 2. All that remains to be done is to move there (<Ctrl>2) and save the file to disk or print it straightaway. The destination chain has in fact not been used - because of the hit limit the hit list could easily fit into memory - and we may therefore delete the superfluous file temporar.001 from disk.

The example can easily be expanded to more searches; most of the repetitive work is stored in the OUTPUT module.

BATCH PROCEDURES

As already mentioned there are batch sequences which are periodically used; we could have them ready on disk, but if there are many it is convenient to keep them in the STEVE.RSF file. There is a special system table dedicated to them:

where we find two procedures, similar to those from previous examples, ready made:

To execute a batch procedure, contained in the "Batch procedures" system file, there is a selection in the "System" menu:

The selected procedure is added in the front of the current RAM contents and then the whole lot is started as one batch task.

END OF BATCH

The above command is not there just for the sake of completeness - it is used to delimit the batch control sequence (it must be at the file beginning by definition) from the rest of the file; the rest is usually empty, but may also contain some data. The file below:

would after

turn into:

INPUT FROM KEYBOARD

During the execution of a batch sequence the mouse and the keyboard are turned off. The only exception is the left <Shift> key, which can be used to interrupt the procedure - STEVE tests if it is pressed at the end of every batch command.

However, a special command which activates the input from keyboard is also available. It is the <Ctrl>aqy and it works as follows. The standard command which reads the file from disk in batch is the:

It is used, for instance, as:

Once the batch sequence containing the above line is started there is no way to modify the file name - the sequence will always read the "ADRIATIC.SDB". Suppose that we want to enter the file name during execution - to use the same sequence to process various files. We add a new command to the batch command set ("System", "Get system table", "Batch commands"):

and use it without an argument:

when the batch execution comes to the above line it will not proceed, but stop and wait till we enter the file name:

We type it, we press <Return> and the batch sequence continues with the next line.

Command <Ctrl>aqy may also be used in the middle of a longer control command sequence - it will activate the keyboard at the next immediate command to have something typed - such as "Find", "Find records", "Go to line" and many others. After the <Return> key, the keyboard will no longer be used as the control command source and the batch line will continue.

CONCLUSION

Let us end with two final remarks on batch:

- batch sequence must be at the beginning of the current file space when executed and terminated by an "end of batch" line. It may have extra modules at the end that are not actually used.

- the mouse and most of the keyboard are turned off during batch processing. It can only be interrupted at the end of some command - using the left <Shift> key.

XIX. GRAPHICS

There are two ways to edit pictures in STEVE: either using the standard graphics editor (it operates on a virtual drawing area, as large as the available memory) and the additional one screen graphic editor, contributed by Andrej Vučkovič. Both are paint-type (raster oriented), but differ considerably - the standard one is better suited to the processing of large scanned pictures, aiding the DTP or doing highly specialized tasks such as connecting the data base to pictures. The additional graphic editor is more GEM-like, easier, faster to use and better suited, for instance, to making free-hand drawings. This editor is also not a part of the STEVE.PRG file but resides on a separate "STEVE.AGR" file and is loaded by STEVE at startup (if present on disk); it is started from the standard graphic editor, using the <Esc> key, but operates in its own environment. If the "STEVE.AGR" file is not on the STEVE disk or is hidden (has a different name, such as STEVE.AG) it will not be loaded at the start of the STEVE session; around 40 K more of RAM will be available to the user, but not the additional graphics.

It is also possible to edit pictures with some other graphic program like the DEGAS or EASYDRAW and add them to the STEVE file later (see "Disk operations", "Degas and snap file formats", page 56).

As mentioned already, each line in the STEVE file contains either text or picture. Text lines are usually black with white letters, while the graphic lines (they are white and it is not possible to type on them) are shown reversed - black patterns on white background. It is highly recommended to have the screen colour set to dark:

when mixing text and pictures - it is very difficult to distinguish one from the other if the text is black on white.

While text lines open up by themselves as necessary, the door to graphic lines is mainly the <Esc> key. This command transforms a text line into a graphic one if pressed on a text line (and jumps into the next line) or enters the standard graphic editor if <Esc> is pressed on a graphic line.

The other, also quite useful way to get a screenful of graphic line is to press the <Control><Alternate> key combination. It could be described as a "photo" function and adds to the file end the inverted contents of the current screen as a set of 22 graphic lines. This function is operational in menus, setups etc., as well, and comes in especially handy when a set of steps has to be documented; most illustrations in this manual were obtained in this way. To avoid problems in certain situations, the command also simulates a right mouse button click after it has been performed. If it has deleted a character or line of text use <Undo> to restore it.

So - to get an empty graphic line let us move the cursor to some empty line on screen (without text):

and press the <Esc> key. A prompt pops up:

and we have to decide if it is graphics that we really want; it may happen, especially during fast typing, that we hit the <Esc> key by accident. "YES" entry returns to text and ignores the <Esc> key, while the "NO" (or <Return> from the keyboard) either transforms the current text line into a graphic one or enters graphic editing, if selected on a graphic line. We select "NO" as shown, the line turns white and the cursor jumps to the next line:

Had we continued to hold the <Esc> key down, the second line and so on would be inverted and turn into picture. A picture may extend over several screens: the limit is the size of available computer memory - as long the vertical size of the picture does not exceed 16380 pixels, and the horizontal 14400. If some line contained text it would be inverted and turned into picture as well. How to get rid of graphic lines? There is no way with the mouse - the easiest way is to use the <Ctrl><d> immediate command or to put them in block and delete it in one go.

So we stay with our single graphic line, move the cursor into the white and press <Esc> key again. A short prompt has to be answered:

Here the current (minimal) picture size is displayed and some standard sizes along with it. A click on "NO" or anywhere outside the framed boxes tells the editor that we are satisfied with the current size, while the last three selections correspond to the sizes given (396 x 640 pixels for one screen and 3384 x 2336, 2322 x 1680 for the approximate Laser A4 and A5 sizes). If a bigger picture than the current is necessary, new height and width can be determined after "YES":

Width is always rounded to a multiple of 16 and height to a multiple of 18 (as STEVE's lines are 18 pixels high) - to 1008 x 1008 in the above example.

The "One screen" size is fine for first experiments so let us select it:

We now have a white screen with a large cross-like cursor and two small counters at the upper right screen corner:

The first one counts the y, from the top down, and the second x, from left to right (both in pixels). It is possible to change the scaling of the position counters to centimetres or inches - see "Various" from the graphic main menu, entry "Setup".

MAIN MENU

During graphic editing the right mouse button is used to call the main menu - sometimes after one click, sometimes (when exiting from a subprocedure) after two. The main menu:

currently has seven entries (STEVE and STEVE Professional).

EXIT

The last of them:

is exit. It provides several ways of exiting from the graphic editor, as well as several restart options.

"STORE & CONTINUE" is used to save the picture to the STEVE file in memory from its temporary workspace (like before some heavier operation) so that it can be restored from that point later, using an "Undo" command. "Store & continue" may also be requested from the keyboard through an immediate graphic command <s> (without <Control>).

"STORE & EXIT" saves the picture to the user file and returns to the text editor; the picture is stored in the usual, compressed, manner. It can also be performed through the <e> immediate command.

"STORE BIT-IMAGE & EXIT" saves the picture in a non-compressed way, which is required if preparing a character font for page printing (see "DeskTop Publishing"), a fill pattern or a character recognition font for the OCR.

"QUIT" returns to the text editor and discards the picture modifications that have been made during the graphic session. An alternative is the <q> immediate command.

"UNDO" recalls the old, unmodified picture from the file as it was before we have entered the graphic editor or at the last "Store & continue" exit command. It can also be called from the keyboard, through the key bearing the same name.

"STAND BY" darkens the screen and waits until some further action is undertaken by the user.

"STORE & UP or DOWN a BLOCK" commands are used for the processing of very large pictures that fit into the memory only in compressed form and cannot be edited in one piece (say 12.000 x 8.000 pixels). How to select such editing is described under "Varia", "Additional setup" of the text main menu.

Any exit operation, such as "Store & exit", "Store & continue" or "Store bit image & exit" saves a minimized picture - all the white space to the right and below is discarded.

RECTANGULAR TRANSFORMATIONS

There is quite a selection of operators available handling rectangular picture areas. The rectangle may be from one pixel in size to the entire picture area - many computers screens high or wide. All commands are available from the first two entries of the main graphic menu:

GENERAL REMARKS

The way the rectangular operations are performed in STEVE differs slightly from that of other graphic programs, so let us explain it in some more detail. At first every command is selected by clicking the left mouse button on it and then the rectangle has to be shown. To demostrate it we need a picture on screen; the easiest way is to call a picture from the ready-made picture library (a contribution of J. Dimec, designed on the late Sinclair ZX Spectrum and transferred over to the ATARI ST by means of the <Ctrl><q><p> command):

We select the picture of a domestic dog, and a box containing the picture appears on screen:

We move the mouse and the box moves with it. After we have reached the desired position, we click the left mouse button, and when the library menu reappears on screen, end the command with the right button. Now the dog picture is here:

To show how a rectangle is grasped, let us try to make a copy of it to have two dogs on screen. We select the standard copy (right mouse button to get the main menu, followed by the left button on "Copy"):

and now try to point at what is to be copied. The cursor is moved to the proximity of the dog's upper left side:

and we click on the left mouse button to show where the rectangle starts. It is important not to hold the button down; a click is enough. Now we drag the mouse towards the lower right side of the dog. During this dragging, contrary to Apple-Macintosh-like programs, the mouse button should not be held down! It is much easier to move the mouse this way:

We now click on the left mouse button again and the rectangle is now fixed. We now move the mouse (again without the button held down) to show where the copy should be positioned:

We now have three position counters on screen - the y,x for the lower right corner of the rectangle (189,470), for its upper left one (43,308) and for the current cursor position (200,280). Suppose we are satisfied with the current position and after one more left mouse button click the copy is where it should be:

We have copied the dog picture, and some white space around it as well. Sometimes it is important to have the frame as tight to an object as possible. There are two ways to achieve this - both easy, but useless without an explanation. Let us try to make one more copy of the dog, to the left of the first one. It is not necessary to select "Copy" entry once more as it is still valid - until we click the right mouse button. We show the rectangle as we did before up to the point where the lower right corner should be confirmed with a click (only click and drag):

Instead of the left mouse button which would end the selection of the rectangle, we now press the <Space> bar on the keyboard:

The frame has touched the picture on all four sides - the white part of it has fallen away. We now again move the mouse and position the copy through the left button:

The third, even simpler way to show a rectangle will be used to make one more copy of the dog - to the right of the picture. We now move the cursor somewhere in the area of the rightmost picture ("Copy" selection is still operational as the right mouse button has not been clicked so far):

and press the <Space> bar on the keyboard before making any click to start the rectangle definition. Now the program tries to find the black pixel nearest to the cursor, looking in all four directions (up, down, to the left and to the right). Once found, it looks for the smallest rectangle with white bordering lines having the black pixel inside. The inside of this rectangle is just what we are looking for:

What remains to be done is to position the box and press the left mouse button again:

Let us now sum up the role of the <Space> bar in the rectangle definition of any rectangular command:

1. When the rectangle has been initiated by the left mouse button, and an area shown by dragging the mouse, <Space> eliminates the white frame around the object.

2. When the <Space> bar has been pressed at the beginning of the rectangle definition it will grab the nearest object delimited by black pixels.

DESCRIPTION OF TRANSFORMATIONS

Let us now explain the rectangular transformations, one by one. In the examples a picture after the command selection and with the rectangle drawn are shown on the left and the result of the command on the right.

will clear the rectangle contents:

draws a black rectangle:

takes a rectangle's content and puts it in another position. All pixels are transferred - black as well as white. After having selected "Move" and moving the rectangle with the pig to the position shown:

the picture transforms into the one below:

"Move" command can also be selected from the keyboard, through <m>.

is similar to "Move" - the difference is that only black pixels are transferred:

copies the indicated rectangle to the destination position. It can also be used directly - by the <c> immediate command.

copies only the black pixels from the source rectangle. It will translate the picture:

to the finer composed:

is a special version of "Copy" where the source rectangle and its destination space are combined with the logical "and" operation. The resulting pixel colour can be determined from the table below:

It can be used to create some quite useful effects, though. Let us demonstrate "copy and" on the basket-pattern filled rectangle and the name of the Slovenian basket production heartland:

How to perform a fill, see "Various", "Fill". The result, if not devastating, is illustrative:

Here the colour of the target pixel is determined from the colours of the source and destination pixels according to the logical "exclusive or" operation:

The command has been used to copy "eor" the picture below to itself, with displacements of three pixels to the right and down - the result is shown on the left:

stands for "Center in the rectangle". Suppose that we have a picture which we want to have centered in an area, such as the one below:

After we have defined the rectangle - click on the left mouse button at the bottom right corner, the rectangle content is centered relative to the rectangle:

The command inverts the pixels in a rectangle - white becomes black and vice versa:

command swaps the x and y coordinates of every black pixel in the picture

There must, however be enough space to perform this operation - below or to the right of the rectangle (a square with the longer side of the rectangle should fit). If there is not enough room the bell will ring and the command will be aborted. The "Move" command should be used if required.

swaps, as the name suggests, all black rectangle points around its vertical axis:

will, on the other hand, mirror the black points around the horizontal rectangle axis:

The command removes the whole picture but the selected rectangle. It would modify the picture below (selected rectangle is shown with its frame):

to the butterfly alone:

The outline command turns all white pixels in the neighbourhood of every black rectangle pixel to black. Neighbourhood is here defined as the nearest point to the west, northwest, north, northeast, east, southeast, south and southwest of the given point. The rectangle shown must be at least one pixel larger than its contents (in all directions) to assure the proper operation of this command:

is much simpler. It blackens all the neighbouring pixels of every black pixel in the rectangle. This way outlined shapes are given a better impact:

As with "Outline" the frame has to be at least a pixel wider than its contents.

is a special form of outline required during the preparation of answers where something has to be shown on screen in a Computer Aided Instruction unit (see also the relevant chapter bearing the same name):

The process could be described as - widen the frame by two pixels in all directions, make a black fill starting at the left upper corner, remove all the black pixels that have not been added during the fill, inverse the picture and perform the standard outline. Therefore the frame can hold its contents quite tightly (rectangle can be defined through an immediate <Space>), only the distance between any frame side and the picture border must be at least two pixels.

is a mapping equal to the "Outer outline" without the two last steps. It makes a profile of an object:

turns every second pixel in the frame white:

command is used to add a black pixel to all the four possible, different L-shaped corners. It would turn the framed title which has evidently been enlarged from some smaller character set:

to the more acceptable form:

For best results the frame should again be kept a pixel greater than its contents.

command is used to enhance the contrast of scanned pictures - it turns every black pixel without black relatives in the neighbourhood (see "Outline" for the definition) to white, and all separated white pixels to black. It would transform the following rooftop view:

to the contrastier one below:

It is often necessary to enlarge or diminish a given picture by a proper factor. The results of such an operation on raster pictures cannot, of course, be compared to the outcomes on a vector graphics, but it is worth a try. In the standard graphics of STEVE there is a family of commands that will do the job, and "Resize" is the basic one, the slowest and most general of them all. Let us demonstrate it on the picture below:

After we have selected the command we frame the object and the following setup pops up:

There are two scaling factors to be determined - for the vertical and the horizontal direction. If both remain at the 100 setting, the picture will be unchanged - smaller than 100 will diminish it and larger than 100 enlarge. It is possible to vary both factors in a range from 10 to 1000 (factor 0.1 to factor 10). Suppose that we want to enlarge the picture vertically by one half and leave it unchanged horizontally, as indicated above. The image maps to the following:

The setting of 125 and 125:

will enlarge the picture in both directions by one quarter:

Several corrections would be welcome to bring the lines into a more uniform shape (see "Pen").

During every enlarging command it is necessary to have enough space above and to the right of the frame so that the destination picture can be constructed. If there is not enough room a bell will ring and the command will be aborted.

corresponds to the "Resize" with factors 200 and 200, but is much faster:

is similar to double, only from one source black pixel we do not get four black destination pixels, but one black and three white ones:

makes nine black destination pixels from one black source pixel; it is again an equivalent of the "Resize", this time with factors of 300 and 300, but much faster:

The command is an alternative to triple, yet makes one black destination dot and eight white ones out of every source black pixel:

As already mentioned, all the enlarging commands that we have discussed so far require the necessary space to the right and above the source frame. If it is not available, the bell rings and the command will not be completed. Repositioning of the source image is most easily done by the "Move" command.

There are two fast ways to reduce a picture and the first, "Diminish/2" will halve the framed picture in both directions. After we select the command and the frame has been defined, such as the entire picture below (familiar to deep-cave explorers in STEVE's native country, photo by T. Planina, 1972):

the program would ask how dark the target picture should be:

During reduction we get one destination pixel from the four source pixels (2 x 2 square); now we have to determine how many of that four must be black so that the destination pixel will also be black. If we select 1 as above, 1 black source pixel out of four is enough to make the destination one black, and the destination picture will be very dark (the upper left out of the four below). A selection of 2 requires at least two source pixels black to make the target one black, selection 3 at least three, and four that all four must be black to make a black point. The four pictures below are the outcome of four reduction commands of the same picture with the settings of 1, 2, 3 and 4 (upper left, upper right, lower left, lower right):

Just for reference, the result of the "Resize" operation on the same picture, using the factors 50 and 50, is also given:

is a command that will diminish the contents of a given frame by a factor of three. This time we get a list of numbers from 1 to 9 to select from - 9 steps of chiaroscuro.

DATA BASE TO GRAPHICS CONNECTION

There are two ways to transfer the data from data base to a picture in STEVE; the facility can be used to prepare various thematic maps, to be included in a paper or a book. Suppose we have scanned and arranged the following map of Slovenia (courtesy of M. Orožen Adamič, Slovenian Academy of Sciences and Arts, the SLOVENIA.2 file on the STEVE disk):

It shows the communes; let us prepare a small data base which contains, for every commune, a point (pixel coordinates) on the picture and its name. We enter the graphics editor and select the:

command. We now show a suitable point in the first commune and click the left mouse button on it:

The "Name" prompt pops up at the lower left screen corner and we type in the region name, followed by <Return> key. We now click on some point in the second region, type its name and continue in this way until we have completed the whole list. To end the selections a click on the right mouse button is required. We may now leave the graphic editor:

and at the file end our names and coordinates are stored as data records (first five are shown here).

For every click in our previous graphic session we have obtained both coordinates, x and y, as fields 1 and 2, with the location name as field three. Suppose that we want to show the share of the number of inhabitants in settlements in the 0-200 inhabitants size group (after Kokole, 1988). Let us divide the shares into ten classes; one of the standard ways would be to use different shadings for different class. We have a list of fill patterns already at hand, as we shall see under "Fill":

The easy way would be to make the following gray-scale legend:

We have selected white for the communes where the share of inhabitants living in settlements with 1-200 inhabitants, is from 0 to 10 percent, grey 1/8 for the share from 11-20 percent ... grey 7/8 for the share from 66-80 percent and black for communes where the share of population in small settlements is above 80 percent. We now move our data records before the picture in the file, augment them with the fill pattern name that every commune should have and put the whole lot into a block (<Beg Blk>, <End Blk>):

The first field is the x coordinate in pixels, second the y, third the fill pattern name, and the fields from 4 on are optional. We enter the graphics editor on our map (supplemented with a legend) again and we select the "Fill from dbase":

menu entry. After a while, combined with a snow storm at the screentop, we obtain the desired result:

It is important, as stated before, that the data records have the required structure and that they are put in a block, located before the picture in the file.

is a command similar to "Fill from dbase", yet a little different. This time a symbol, a small picture, will be drawn at the locations, the coordinates of which are written in text before the picture.

Suppose we have the coordinates of Slovenian locations where the purple moor flower, Epipactis purpurata Smith, named by James Edward Smith some two hundred years ago, has been observed:

(courtesy of P. Skoberne, from Wraber & Skoberne, 1989). We have put the three data records into a block and we now move the cursor to the picture (below the records) and enter the graphic editor (through the <Esc> key). We now draw a small flower picture there,

in some free space at the side, such as the one shown, using a different scale, perhaps 1:8 and the "Pen" facility:

When the picture has been completed, we select the

entry and put the flower picture into a frame (we move the cursor there and press the <Space> bar, for instance):

Very quickly the symbol is repeated at the locations, stored in the data records that have been put into block before the picture:

The symbols are placed at the given locations centered - that is, after the command, the given point would be situated at the horizontal and vertical middle point of the symbol.

It often happens that the coordinates we have in the data base are of some general form and not scaled to the pixel format of our picture. In such a case the

can help to put things in order. The two relevant formulas are:

Here the new x and y are the coordinates which we need in the picture; it is xp wide and yp tall (in pixels). The old x and y are the values in our original coordinates, where the picture extended from minimal x to maximal x and from minimal y to maximal - in the usual Cartesian manner.

MEASURING DISTANCES

The one before the last entry from the "Specials" menu deals with distances between selected points in the picture. Suppose we want to know the distance between the second and the third location of Epipactis purpurata Smith from the previous example. We enter the graphic editor, select

and click the left mouse button on the first selected point, followed by a mouse click on the second:

The program now asks for the name of the distance. We type it, followed, as usual by <Return>, click on the next two points and so on. The command is terminated by a click on the right mouse button. After we exit from the graphic editor, we notice the measured distance and its name at the file end:

SCALE

In the standard STEVE editor there is no "Lens" facility, as nearly all the commands can also be used in a different scale, not only the standard 1:1 - one pixel in memory, one pixel on screen. There are nine possible selections:

Four entries following the 1:1 are used to view the picture in a reduced scale, while the last four will enlarge the situation. So the 8 : 1 selection, for instance, shows almost the entire A4 Laser page on one screen, while the biggest magnifying lens is 1 : 16:

All the above selections can also be made from the keyboard: key <1> for 1:1, <2> for 2:1, <3> 4:1, <4> 8:1, <5> 16:1, <6> 1:2, <7> 1:4, <8> 1:8 and <9> 1:16. It is also possible to move the screen across the picture during editing in any of the scales. If the cursor hits the border of the screen and there is something on the other side, the editor waits till the mouse stops moving and updates the screen.

Some keys on the numeric keypad can also used to move the screen across an over-one-screen sized picture:

All rectangular operations as well as most other transformations can be used in any of the scales.

SHAPES

Here the "Pen" facility and five different geometric shapes - line, box, polygon, circle and arc can be chosen:

PEN

After "Pen" has been selected:

the left mouse button leaves a black footprint while the right button leaves a white trace. <Space> bar on the keyboard or both mouse buttons pressed simultaneously are used to end the "Pen" command and to return to the normal operation where the right mouse button calls the main menu.

Pen is usually used after the scale has been suitably magnified (see "Scale", just before "Shapes") or, if used in 1:1 or even some diminished scale, after the cursor size has been adjusted to "Small":

"Pen" always draws a trace which is one pixel wide. A pen with a selection of line widths is available in the additional graphic editor.

LINE

command will evidently draw lines. To use it, click the left mouse button on the starting point, move the mouse (without holding the button down) to the ending point of the line and click the left mouse button for a second time. Now the entire line will follow the mouse as it is moved:

until we "park" it in the final position with the third left mouse button click.

BOX

command follows steps similar to "Line". The starting mouse click defines the upper left corner of the box, we move the mouse (again it is not necessary to hold the button down) to the lower right corner. The second mouse button click here determines the box size; now the box is moved to its final position:

where it is fixed by another mouse click.

POLYGON

is used to draw a connected set of lines. It starts with a click on the starting point, moving the mouse (as usual, without holding the mouse button down) to the second point, a click there, moving the mouse again, click and so on. The last point is marked by a double mouse click on it. Now the whole polygon will follow the mouse - we can move it to another position and fix it there by clicking the left mouse button:

CIRCLE

starts with a click at its centre and grows bigger with subsequent mouse movement. After the second click its size is fixed; it can now be moved to the destination position and "parked" there by a third left mouse button click:

ARC

is a shape, in STEVE defined by three points on the border. We click the mouse on the starting point (1 on the picture below), move the mouse to the ending point (2), click there and move to some point in between (such as 3). We click there and the arc starts to bend as we move the mouse. A fourth click will set the arc to its final shape:

All that remains to be done is to move the mouse (and the arc) if required and to drop the arc to its destination with one more mouse click.

FINE MOVEMENT OF PICTURE PARTS

The next entry in the main menu has been added especially for filigree picture movements such as those required for the preparation of DeskTop Publishing character fonts:

The top nine are performed so that after the command has been selected we move the cursor to the desired position and execute the command once with one mouse click, twice with two and so on. Instead of the mouse button the <Space> bar on the keyboard may also be used, and if we hold it down for a little while, the command will be repeated the corresponding number of times.

Let us illustrate the movements on the deer picture below:

In each of the eight examples below the corresponding command has been executed ten times to show its effect better:

The command:

could best be described as: find the first black pixel to the right of the cursor and move part of the picture from that pixel to the right picture border leftwards to cursor. Sounds complicated - but is not. It would modify the picture:

to

The command is mostly used directly, from keyboard - through the "<" key.

DTP CHARACTER SET HANDLING

To understand the fine-movement command set still better, let us make a brief excursion to the DeskTop Publishing chapter of STEVE: let us load some of the fonts, supplied for use with the ATARI SLM 804 laser printer - the family of sans-serif ones in four sizes, and, again in four sizes, the serifed fonts (LASER.FT file). The first and the last of them are shown below:

The picture font system file is never particularly small - the above mentioned file is 308 Kb long and will, if installed through the sequence:

push the STEVE.RSF file to well over 400 Kb. If page composition is not required and more space is required for some other, say data base, tasks, all fonts but one may be discarded from the working copy of STEVE. The minimum required is one font with one character.

As can be seen all the fonts are proportional and every of them consists of four text lines, followed by a picture (which must be saved through "Exit", "Store bit-image", if edited).

The first font line begins with an asterisk and contains the font name. It must be in capitals and not longer than 19 characters.

It is followed by a line, which is reserved for future use by STEVE - it will contain data required to export STEVE picture fonts to GEM when the facility becomes available (importing is possible and is described under "Disk operations", "GEM font file format")

The third line is modified when the picture font file is returned to STEVE - it contains the information on font height (first two bytes) and two-byte end-of-character-position (in pixels) for every character in the picture. The user does not need to bother with it - something must simply be there (just do not delete that line!). The fourth line has to be supplied by the user when a new font is created - it contains all the characters in the font, written as text and in ascending order (as they appear in the "Screen character set" system table). It is not necessary that all the characters be there - the user will determine which should be included and which not. That the characters are really in ascending order can most easily be tested by the <Ctrl>. (<Control><full-stop>) command - if used repeatedly it jumps from character to character and shows its code.

The last element of every font is its picture. As can be seen, it is composed of character images, separated by a white vertical line, black vertical line (of equal length for all characters in the font) and another white vertical line. There must be the same number of characters in the picture as there are in the textual line above it - STEVE counts both numbers and reports a difference if it is found. If everything seems well at first sight, yet the editor is still not satisfied then some vertical black line is missing, is too thick (more than one pixel) or some character is connected to its separating black line (white separating line is missing).

As seen there are three spaces of different width at the beginning of every picture font (their codes are 30, 31 and 32, respectively). They help the right-margin-justification routine to disperse any white space as evenly between words as is possible.

Let us now try to add a new character to the CH 10 picture font - say the French capital C:

We first check its position in the character set ("Various", "Get any character") and we find that it should be inserted a few places after the end of lower case characters, at a place shown with cursor below:

We insert it there:

It is now in place in the text line and only needs to be added to the picture. We enter the graphic editor on the character picture line:

and augment the picture width by, say, 100 ("YES", left mouse button to "2384", click till it becomes "2480" or so, click "EXIT"). Additional width is required to accomodate the new character.

We now move the cursor till we find an adequate position:

press the right mouse button and select "To the right" as we need to push the remaining characters in that direction:

We click on the position shown above several times, till the opening is wide enough. A faster way to widen the hole is to hold <Space> bar down for a little while after the first click - its repetitions are registered and accumulated. It is now necessary to draw the character. We make it easier by copying:

the standard capital C character to the required position:

A different scale will be better suited to draw the remaining part of the character:

We now select "Pen"

and make the tail of the letter (<Space> bar ends the pen command):

All that remains to be done is to delete the superfluous white space at the right of the C's vertical black line. We could select the

"Kill to black right" command or, more quickly, type the "<" from the keyboard:

The picture font is now in order and we can save it, in a non-compressed manner, that is through the:

To give it back to STEVE, for inclusion in the STEVE.RSF file, we may select the standard procedure:

An additional help, especially when making a completely new picture font, maybe one that has been copied through a scanner from some suitable source, are two additional keys on the keyboard. When editing pictures, a comma (,) will erase the vertical black line at the cursor position, while the full stop (.) will draw it. The use of the full-stop immediate command can be demonstrated in the example below:

We enter the graphic editor on it, move to some position between characters and press the ".":

The last two commands from the "Fine movement" submenu and three from "Various" have all been added especially to facilitate the DTP character set handling:

The first of them, "Font/kill margins" is usually used to transform a fixed-width character set into a proportional one. It removes the white space to the left and to the right of every non-space character. In the example below:

the resulting picture is much narrower:

The complementary command, "Font/margins to maximal", adds as much space to every character as is required to make them all equally wide. It would modify the above picture to:

Here "G" was the widest and so remained unchanged while the other characters have been expanded to its width.

The command, it could also be named "Make a fixed-width font out of a proportional one", requires that there is enough room at the right of the original character set - so that the resulting characters will fit.

DIMINISHED CHARACTER SET

The next command from this group, the "Generate diminished font":

is used to prepare a DTP character set, diminished by a factor of two. Such diminished sets come in handy when a text should be brought to the final DTP format on a 1 Mb machine. The book or the article will later still have to be printed out to a laser printer from a 2 or 4 Mb computer; yet it is often convenient, if possible, to prepare it on a more accessible smaller machine. More on how to use the diminished fonts can be found in the "DeskTop Publishing" chapter - now let us just show how they are made. We take the smallest sans-serif font from the "LASER.FT" file:

and enter the graphic editor on its picture:

To make a diminished font we have to augment the picture approximately three times in height and some ten percent in width:

We now select the:

"Generate diminished font" command and put the entire font picture into the rectangle - click at its left upper corner, move the mouse to the lower right corner - a bit further on and a <Space> to have the frame tight:

In a little while a slightly wider font appears below the original one:

We move the cursor to its beginning (right mouse button click, <7> from the numeric keypad) and the whole truth shows up:

The copy of the original font has been rounded - every character which was an odd number of pixels wide received an additional white line at the right to make the length a multiple of two. The procedure is necessary so that an exact 1:2 mapping can be made from the normal to diminished character font and vice versa. We now exit from the editor through "Store bit-image & exit", delete the original character font picture and copy its textual lines to the diminished picture:

We have also added an asterisk to the name of the diminished font - that addition will help STEVE recognize the normal and diminished versions of the same font. The diminished version of the font will be used to write, edit and prepare the layout of text (it requires only 250 K of RAM to make a page preview of a DIN A4 sized page) and the normal version to print it (with 1 Mb for a virtual page).

COPYING CHARACTERS HOME

It is another command from the DTP character set handling group. It copies every frame selected to the "home" position, i.e. to the left upper picture corner. Suppose we have scanned the following title:

and would now like to make a DTP character set out of it. We move it to the lower screen part, as indicated above, so that the upper left part is clear for the characters that are to come there. We select the

command, move cursor to the proximity of "A":

and press the <Space> bar:

We move the mouse a little bit and our character is copied to the upper left corner:

"B" is next - so we mouse the cursor there, press the <Space> bar again, move the mouse to "C" and so on - up to F in our case:

The remaining part of the job would be to insert the delimiting vertical lines between characters. We can use the <.> immediate command to do it - the job is not too difficult as the "Copy characters home" command leaves a five pixel gap between characters:

COMPUTE CHARACTER SIZE

is the last command from the group. It computes the vertical and horizontal size of every connected shape discovered in the frame. Suppose we had the following images:

We select the:

and show the entire picture in the frame. After a little while the cursor is back again and even a detailed examination of the picture shows that nothing has changed in it. However, after we exit from the graphic editor, say, through the "q" ("quit") immediate command, we find some more lines at the file end:

They are shown in columns here to save some tree; in the file each would be in its own line. The first 25 lines contain the height and width (in pixels) of the 25 identified images,while the last line, where R stands for "result" contains:

1. number of objects (25)
4. maximal height, maximal width (122,96)
3. minimal height, minimal width (96,18) and
2. average height, average width (100,53).

VARIOUS GRAPHIC COMMANDS

The last main menu entry not explained yet is the:

FILL

The first three selections are devoted to the painting of pictures with various black & white patterns. After we click on "Fill" the following selection of fill patterns pops up:

We select one with the left mouse button, move the cursor to the desired position in the picture and paint the surrounding area by another mouse click. One more click somewhere else will paint another area - the painting sequence is terminated by the right mouse button. The above patterns are built in - how they look and how new ones can be added to the list can be seen under "System tables", "Fill patterns". Fill patterns are not particularly limited in size - a large image can itself be a fill pattern.

Let us illustrate the case with a naval scene, contributed by A. Vitek:

Five areas in the picture are not filled in yet - the three sails and two dark cloud partitions. We enter the graphic editor and paint the front and the back sail with "grey 1/8":

the two cloud partitions with "grey 6/8":

and the middle sail, a bit out of style of the vessel, with a "bumble-bee":

Every filling brings a gray-like pattern to the screen top - the fill pointers are being built in the screen RAM - which turns white when completed and the painted picture is here:

BLACK PAINTING

is a special case of filling, where the pattern is a solid black. As it is frequently used, a special routine is provided:

which does the painting much faster than the standard selection:

WHITE PAINTING

is usually used to remove black connected areas from the picture. It comes in handy in processing scanned pictures - for the removal of some unwanted black lines or patches, for instance. It would transform the picture on the left into the one on the right:

GRAPHIC SETUP

There are four settings that can be modified during the graphic editing:

The cursor can be modified from the standard cross which spans the entire screen ("LARGE"), to the small cross ("SMALL"); the large one is more suitable for many applications, including the font design, but is a bit slow while using the pen. Cursor counters at the top right of the screen can be turned off or modified according to the scale unit and density. If centimetres are selected, the counters will show the actual distance on paper printed by a Laser or a 24-pin matrix printer.

PICTURE LIBRARY

The next entry, "Get picture from library", provides a selection of all the pictures currently contained in the STEVE library.

We made use of the command at the beginning of this chapter, with general remarks on rectangular mappings. The relevant library can be obtained in the editor mode:

and is shown under "System tables", "Picture library" (page 221). It includes ten animal pictures from the collection, designed by J. Dimec. The library can can be expanded at will by the user. A library of mathematical symbols is in preparation.

Let us now click on "Get picture from library". A list of names appears and we select the domestic pig:

The list now disappears and a rectangle containing the pig appears on screen:

We move it with the mouse to an appropriate position and drop it down with the left mouse button:

PICTURE FROM BLOCK

Besides pictures from the library it is also possible to import a picture stored in the file somewhere in the current STEVE file before the picture that we are just editing, and marked as a block before we have entered the graphic editor:

IMMEDIATE GRAPHIC COMMANDS

Let us end with a summary of commands that are available directly from the keyboard. We can type them immediately after we have entered graphic editing or after some command sequence (such as "Copy") has been terminated by the right mouse button.

Numeric keypad:

TEXT IN GRAPHICS

The addition of a "Text" command, it is now only available in the additional graphics or from the back door, via DTP, is foreseen for the near future.

XX. ADDITIONAL GRAPHICS

As mentioned at the beginning of the "Graphics" chapter, there are two ways to edit pictures in STEVE: using the standard STEVE graphic editor that we have just seen or the additional editor, contributed by Andrej Vučkovič. Unlike the standard graphics, the latter is limited to one screen, but is easier to use and has many very useful features not found in the standard one.

The additional graphic editor resides on "STEVE.AGR" file and is loaded by STEVE at startup (if present on disk), yet operates in its own environment. If the "STEVE.AGR" file is not on the STEVE disk or is hidden (has a different name) the additional graphic editor will not be available.

There are two other conditions which must be met to ensure its proper operation:

1. STEVE itself should not be started from an "AUTO" folder and
2. The GDOS.PRG program, supplied mostly with various object-graphics programs, should also not be contained in the "AUTO" folder.

To process pictures using the additional graphics we first enter the standard graphics (see "Graphics" chapter), through the <Esc> key on some picture, and, by pressing the <Esc> key once again, we start the extended graphics. The editor now checks if there are 64 K of memory free; if so the cursor turns into a small cross:

and two counters start to roll in the one of the upper screen corners. One shows the distance from the left picture border and the other from its bottom to the little graphic cursor. To obtain the graphic menu we press the right mouse button:

As can be seen, most of the usual features are here, including two ways to exit. The first,

returns to standard graphics and restores the old picture. It is used as a graphic <Undo> command. The other way,

replaces the picture in the file with the picture from the screen and returns to the standard graphic editor.

The first entry from the menu,

is used to draw various lines. A click on "line" opens the next menu, shown above in the middle, where the shape and thickness of the line is selected. Suppose the simple one-pixel wide line has been chosen as above: the third menu pops up. There are 9 ways to terminate the line - from a simple ending to an arrow and rounded end, in all combinations.

The group of five commands that follow is used to draw rectangles, circles, ellipses, rectangles with rounded corners and polygons. Each of the commands opens the second menu to determine the figure's boundary and its interior. "normal" brings on screen the third menu, shown on the right: circle, for instance, will be the usual one with a boundary as selected from one of the eight possible. "clear" entry will erase part of the screen encircled by the figure. "rectangle", "clear" is the most convenient way to erase an unwanted part of the picture.

The other three terms in the menu enable the user to paint the selected figure (rectangle, circle etc.) with one of the 36 patterns shown above, immediately after the figure has been drawn. It is enough to point and click at the pattern. Painting is also possible later, after a "normal" figure has been drawn, using the "fill" command.

entry is used to add text to pictures during graphic editing. It opens the second menu from which one of the six available fonts; bold, light, italic, underlined, outlined and normal, can be chosen. Selection from the third menu tells the editor how to turn the letters when entered - to show them in the usual way (turned through 0 degrees), to write them from below to above (turned through 90 degrees), from right to left and turned on their heads (by 180 degrees) or to display them from the selected point down (270 degrees). The text sequence that is to be inserted should be terminated by <Return>.

Bigger characters can be obtained through the "magnify" facility - write them as normal and enlarge the whole rectangle where they are twofold using "magnify". Another way around the lettering problem are STEVE's character fonts, available in text mode. The text is simply written as text, then converted to graphics through <Esc> key and used as part of a picture later on.

command can best be explained by the sequence of events, numbered from 1 to 11 and all performed after the "pie-chart" has been selected; a click has terminated every one of them:

The next is a set of commands that perform an operation on all picture dots, contained in a user-defined rectangle:

The "inverse" command will turn every pixel in the rectangle determined by a click, movement of the mouse and another click, to a different colour - from black to white and from white to black. It makes a negative of a selected picture area.

The "magnify" will increase the rectangular part of the picture as shown by the user twofold - every dot turns into four of the same colour. The command is particularly useful for producing large titles: normal letters can be enlarged to large proportions by repeated magnifying. Before the final click of the command it is possible to move the enlarged picture on screen as necessary.

The "move" and "copy" both require additional information from the third menu:

"or" tells the program to move or copy a rectangle to a different screen location so that the picture transferred is laid over the one in the target area. Repeated "or" copying to positions, shifted by one pixel, can for example be used to produce an impression of a moving object.

"replace" will erase the picture on a target position; only the rectangle contents brought there will be seen.

"eor" is an abbreviation for "exclusive or". Before the moved or copied picture is put into position, every dot is compared with the dot that is currently occupying that location. If both pixels are white, the resulting dot is white as well; if one is white and the other black the outcome will be black and if both dots are black the target dot will be white again (not black as with "or"). This mode can successfully be exploited for various special effects.

Let us illustrate the "move" with "replace" to displace the crab:

to the position that would suit him better in real-life circumstances:

The "copy" command with "or" will help to make a demonstration of bumble-bee formation flying:

(all animal pictures courtesy of J. Dimec, from the "ANIMALS" file).

The "Fill" entry is used to paint any closed area. As with figures there are 36 patterns to select from:

Painting a large screen area may take some time; it is always wise to use an "exit" and <Esc> key again to save the picture before any fill that is not quite straightforward is attempted. In the case that the area is not completely closed (there is some hole in the boundary) the filling pattern will escape with possibly devastating effect - "quit" command restores the old picture again.

There are two ways to draw: the normal way is the one where ink flows only when the left mouse button is held down, while the reverse mode is different. Here the click on the left mouse button tells the program that ink should start flowing: it will flow without any button pressing and will not flow only if the left mouse button is held down. The third menu gives the five line widths that are available - from one pixel to nine.

The eraser is a sponge-like shape and comes into action when the mouse is moved and its left button held down.

To erase or correct minute details in the picture,

command is particularly suitable. It will enlarge an area around the screen position clicked on after the scale has been chosen. There are three sizes of magnifying lens - from 2 : 1 to 8 : 1. The last entry, 8 : 1 N, is equivalent to 8 : 1; it only has the pixel net added. When processing a magnified portion of the screen, the left mouse button is used to plot black dots (the button must be held down if an area is to be blackened) and the right button to paint with white. To exit from the "magnify" command both mouse buttons should be pressed - one held down, for instance, and the other button clicked.

is the last "extended mode" graphics entry. When turned on, a net of equidistant dots show up on the picture, as on this of newt, the harmless freshwater amphibian:

The default net interspace is 16 pixels. "Raster off" removes the points from the screen and "dimensions" are used to define the net size.

XXI. PICTURE SCANNING

With a breakthrough in computer memory available to the wide public that the ST and especially the Mega ST computer series has brought, the old dreams of picture processing have come a step closer to reality. Pictures, input by a 400 dpi scanner and output by a suitable laser printer (there is a considerable difference in fine detail between the more affordable one such as the SLM 804 and the industry standard, the HP Laserjet II) are still not a match for the output of professional hardware such as the Linotronic series by Linotype, but the results are, as can be seen on this low-contrast black and white example, promising:

The picture on the previous page takes 229506 bytes of memory, has been entered by the Panasonic Image Scanner at 300 dpi, dithered mode set to press and the contrast level 2. Hand drawings, such as the one below, entered through the Cameron handy scanner at 200 dpi, pose no particular problems:

STEVE has a special entry concerning picture scanning, in the I/O selection of the main menu which handles the input of pictures:

There are two command blocks - one for the setup and one for the actual picture entry. STEVE can handle directly three basic families of scanners: the handy scanners, the 200 dpi page scanners and the Panasonic 200-300-400 dpi page scanners.

HANDY SCANNERS

There are currently two scanners in this group, the Cameron handy scanner and the Marvin Colibri. The Cameron interface includes all models, from the original 200 dpi black&white to the 1.2 model with 16 grey levels (again 200 dpi), and the 1.4, again with 16 grey levels and 200, 300 as well as 400 dots per inch. Its setup brings two selections to choose from:

One of the picture sides is fixed to 512 pixels in width (approximately 6.5 cm/2.5 inches at 200 dpi) while the other is as big as required - we can pull the scanner across the layout to be scanned quite a long distance - some 50 cm/20 inches at least. Wider layouts can be scanned in 6.5 cm wide stripes (preferably along a ruler) and the resulting stripes "glued" together in STEVE graphic editor.

The second setup parameter governs the direction - if we shall pull the scanner from the top of the page downwards or from left to right.

On the left of the Cameron handy scanner body (models 1.2 and 1.4) there is a small lever which can be pushed to one of four positions, marked 1, 2, 3 and 4. 1 stands for two grey levels (black & white) and is most suitable for entering texts. 2 selects four levels of grey - white, light grey, dark grey and black. 3 requests 8 grey levels; 4 sets the number of grey levels to 16.

On the same side of all the Cameron handy scanners there is also a "dark-light" button. As pictures, printed on a laser always appear slightly darker than we see them on screen, it often makes sense to turn it a bit to the "light" side.

In the example below, showing Bled Island in NW Slovenia, the four pictures were taken with settings of 1, 2, 3 and 4 (top left, top right, bottom left, bottom right), respectively:

The Marvin Colibri and its brother, the Genicom handy scanner (the driver for the latter is coming) both read 10.5 cm wide stripes and, like the narrower Cameron family, also have a 400 dot per inch capacity. There is no special setup in STEVE for the Colibri - it starts reading the picture at the push of the button, and when the button is released the scanning has been ended.

Handy scanners are tools which come into their own in the design of Computer Aided Instruction units (CAI).

200 DOTS/INCH PAGE SCANNERS

This scanner group includes the first ST scanner that reached the market in the fall of 1987. They have lately reached quite an accessible price level and are all based on a SILVER REED personal copier which runs on thermal roll-paper. The group consists of the Hawk scanner by Marvin, and the Universal ST-scanner by Print-Technik (they are software compatible), as well as the Spat scanner, produced by Silver Reed:

The setup of the Marvin and Print-Technik scanner has three entries:

The first two determine the scanned picture size - the default setting is close to the standard DIN A4 format - and the last the number of grey scale levels. 0 is the default - most appropriate for input of texts (for OCR, for instance), while for pictures a reasonable value would be around 8. It is also important to have the "Darkness" button on the scanner itself set to an appropriate figure (from 0 to 5) - usually between 3 and 4.

PROFESSIONAL PAGE SCANNERS

Of this scanner group STEVE currently supports two different interfaces of the same device, the Panasonic Image Scanner (FX-RS505). It has a considerable range of setup capabilities:

Besides resolution the most important setting is the "Mode" and the page size. At 400 dots per inch the full page (as seen above, quite a bit over A4 format) requires approximately 2.3 Mb of free RAM, available only on the Mega ST 4. Therefore an appropriately smaller picture size should be used on the Mega ST 2 and quite a small one on a 1 Mb machine.

The bilevel mode is used, as with other scanners, for entering texts or drawings, while for photographs the so-called "Dithered" mode is better suited. "Dithered" could also be named "Halftone". General remarks concerning the photographs suitable for scanning are the same as are required for a good photograph as such - it should be well textured as the one below:

Perhaps even more important, it should include the whole range from clear whites to solid blacks. Far better results can also be expected from black and white photographs than from those in colour. The example on this and the next page, a well balanced photo from the Schmiedl's Hall of the Škocjanske Cave, a milestone in the history of karstology, shows the difference between the "Spiral" and "Press" settings of the "Dithered pattern" setup keyword. The "Spiral" pattern is bolder and has a stronger impact:

while the "Press", on the other hand, looks softer but gives a better fine detail. This detail can be seen, for instance, in the tree in the centre of the picture, or on the left-hand wall:

Colour photographs will less often produce satisfactory results. Here the play of light and dark is often sacrificed to colour. The presence of both light and dark areas is therefore even more important in judging which pictures will be suitable for scanning and which not. In the example on the next page (189,196 bytes long, photo courtesy of Z. Huzjan), the dark is assured by the shadows, while the white has been added by the light desert sky:

A VIDEO-CAMERA

can also be directly connected to the computer as a picture source. The picture on the right has been entered using the A-MAGIC video digitizer and its related software and saved to disk in the DEGAS format. It has been transferred to STEVE using the "I/O", "Extended disk menu", "READ DEGAS" menu sequence. The relatively low resolution of 400 x 640 pixels requires a good laser printer to get useful results.

XXII. DESKTOP PUBLISHING

DeskTop Publishing, or DTP for short, a process by means of which a stock of text and pictures is turned into a more civilized shape of neatly ordered pages to be printed on paper, is also possible with STEVE. This manual and quite a few other publications have in fact been produced by STEVE. Not all the goodies of specialized DTP programs are here, but the speed is great and so some serious work can be done in a very reasonable amount of time, especially if the publication is longer, Besides paper output, the DTP part of STEVE also has another important role - it is used to present text and pictures of Computer Aided Instruction units.

There is a simple control language which handles the page layout, a page preview command which shows how the page will look on paper down to the last pixel, there is an output to 9- and 24-pin matrix printers and to two laser printers, the ATARI SLM 804 and the HP Laserjet family and, there is an interface to industry standard DTP character fonts.

The only real snag with STEVE DTP is one that causes trouble for the competition, too - DTP never has enough space. A 1 Mb machine can be used, not without skill and practice, if the task can be limited to half-size paper, such as the A5 format. For full A4 page more space is required and a Mega ST 4 is better than a Mega ST 2.

It is also worth mentioning that the real benefit of the blitter chip, currently present in the Mega range, can be seen at its best in DTP. The page preview of a typical A4 sized page takes around one second with the blitter and around five seconds without it.

A separate main-menu entry is dedicated to page composition and output:

The top command block is devoted to page composition, setup, page breaking and un-breaking, the middle block to file printing and the bottom one to printing of file blocks.

To show how things really work let us take a short example. We first read the LASER.FT file from the second STEVE disk (here only the beginning and the end are shown):

which contains the sans-serif character font in four sizes (CH: 10, 12, 18 and 24 typographic points) as well as the serifed one (NL: the same sizes) - one point being an equivalent of 0.239 mm. The standard STEVE.RSF file contains only one DTP character font, the NL 10, and we shall now augment the selection to the full serifed set. We returned the second part of the file to the editor:

followed by the left mouse button click on the line with the name of the first serifed-set:

We now have four sets of DTP characters available - the NL 10, NL 12, NL 18 and the NL 24. To go on, we free the memory - we move to the file beginning (<Top Fle> from the numeric keyboard) and delete what is left through the <Ctrl><q><k> immediate command. How to modify an existing DTP character or make a new one can be seen in more detail under "Graphics", "DTP character set handling"; the transfer of DTP fonts from other formats is described in "Disk operations", "GEM font file format" and "Bitstream fontware".

Before we request the page preview on some text - to see how it would look on paper in the DTP mode we check the

PAGE LAYOUT SETUP

and, if necessary, modify it to:

There are two standard page sizes - the A4 (2336 x 3402 pixels) and A5 (1680 x 2336); the "Extra" setting allows the user to determine some other output page size. To try out the example above on a 1 Mb machine one should usually (without reducing the STEVE.RSF file) reduce the page size, to 1680 x 1500, for instance:

If a Mega ST 2 or 4 is at hand the setting may, of course, stay at "A5".

The next six parameters will determine only the standard values for text and pictures on every page which can be, if necessary, changed for every line and for every picture by a special DTP command line in text.

Left margin and top margin are the widths of the white space at the left and at the top of the page. For the A4 format the usual settings would be 300 and 150 (2.5 and 1.3 cm), respectively.

Character spacing and line spacing parameters set the default distance between characters in the line and between lines of text. The inter-line spacing can easily be set to 0 (as above) as the descenders (j, g, p, q etc.) and some capital characters (such as Å) already provide some interspacing.

Text block width is important for the right margin adjustment and line (or block) centering. For an A4 page format it would usually be set to 1800.

The magnification factor for pictures can range from 1 to 4. To have a one-screen-wide picture (640 pixels) occupying the width of an A5 sized page, the magnification factor should be set to 2 (2 x 640 = 1280 = text block width). On an A4 sized page the magnification factor 3 is preferred if the picture width does not exceed 600 pixels (3 x 600 = 1800). For 640 pixels wide pictures the text block width should be set to 1920 and the left margin decreased to, say, 240. For pictures input by a page-sized scanner, the magnification factor is normally set to 1.

Unit and output density are by default set to "cm" and "300". It means that if any of the above four parameters (left margin, top margin, character and line spacing) are defined later, in text, it will not be in pixels as in the setup, but in centimetres, valid for output on a laser printer at 300 dots per inch.

We now click on "EXIT":

and the list of available character sets pops up:

We select the 10 point size as standard. Unless otherwise specified in some DTP command (in text) pictures of all the letters shown on a page or printed in DTP mode will be taken from the "NL 10" set.

The time has come to type some text - say a short passage by T. Heyerdahl, 1974:

We have added an end-of-page line to declare the whole lot as one page.

PAGE PREVIEW

Let us now see how the page would look on paper, if printed from the DTP submenu:

The program asks where the page contents could be found:

and we click somewhere in the middle of our page (it is not necessary to show the page start exactly). Page preview can also be requested directly, by the <F3> function key while the cursor is positioned somewhere on the page.

The page is cleared and reappears in a much reduced form:

To see better what has come out we enter the DTP main menu, as in graphics we obtain it through the right mouse button, and select a 1:1 scale:

The screen is more legible now but shows only a portion of the page:

As we move the mouse over the picture borders the screen adjusts itself as in graphics, to the more informative one. For instance:

The scale of 2:1, quickly accessible through the <2> key on the main part of the keyboard, shows our whole text on one screen:

It is not so ugly, only the the author and the title line could be written bigger and the right margin should be adjusted. We therefore leave the page-preview, through the <F4> function key or the:

"End" selection. To make the required adjustments we add some more lines to the original text:

Lines, starting with the double diamond character (on keyboard it is obtained as <Alternate><key below Delete>), followed by space and number four, are the DTP command lines. They are not printed, but contain DTP directives, parameter settings valid till the next DTP command or end of page, whichever comes first.

A group of lines between two DTP commands or between a DTP command and an end of page is called a block - it can be from one line to an entire page long.

Let us now see what DTP settings are possible in a DTP command. To obtain their names we select:

and obtain the following list:

As can be seen, the list is alphabetically sorted; for further use we shall turn it the other way around:

Now we can explain what we have in our command-laden passage:

There are three blocks - the first with the author's name and an empty line below it, the second with the title and an empty line again, and the third block, containing the text itself till the end of the page. The reasons why we have made three blocks instead of one or two are several - we want to center the author name and title line separately, and the character set is also different for every block. The last block command declares that a new block is here and, implicitely, causes the font to change from "NL 18" to the standard "NL 10" which has been selected in the setup. The first command line:

could as well be written as:

or, even simpler: the following block should have the character pictures from the "NL 12" set.

RIGHT MARGIN JUSTIFICATION

To adjust the right margin of the block with text we move the cursor to the DTP command line in front of it:

and select the <Adj Mrg> immediate command from the numeric keypad. After margin adjustment the text is more populated than it was before:

We notice a lot of special hyphens between the words. The <Ctrl><.> command reveals that their code is mostly 30 or 29. If we now look once again at the DTP character set "NL 10" (it has been selected as standard at setup time):

we notice that there are three space characters right at the beginning - with codes 30, 31 and 32, and they are of different widths. The space with code 30 (medium hyphen) is very narrow, the one with code 31 (wide hyphen) is a bit wider and the one that follows is the normal space. In text, however, we also notice (for instance before "again" in the first line) a character with code 29 (the narrow hyphen) which is not present in the character set at all. As it is not there its width is the smallest of them all - equal to that of the setup character spacing:

Three additional spaces have been introduced to allow so-called microspacing - white space between words can now be distributed as evenly as possible and the right margin adjusted with an error of less than character spacing - less than 2 pixels in our case.

To the contrast of the standard right margin justification, performed with the immediate command <Adj Mrg>, the command in DTP mode does not stop at the end of the current paragraph. It continues with the next one and so on, and will even leap over pictures. It stops when another DTP command or an end of page is encountered.

BLOCK CENTERING

We drive the cursor somewhere in text and press the <F3> function key to make a new page preview, followed by the <2> immediate command from the main keyboard to request the scale 2:1:

Three character sizes are now visible and the right margin has been adjusted without any noticeable differences in word spacing. Let us now center the two title lines. We move the cursor somewhere in the line with the author name and press the <Cen Ln> button on the numeric keypad:

A frame appears and shows the block to be centered. The right mouse button can now be used to escape from command; we agree with the block and confirm this, so we move the mouse a bit. The block is now centered:

It is important that, while centering, the cursor is positioned in the text of a block. If it is positioned somewhere outside the block, a bell would ring and centering would not take place.

We continue centering the title block - we move the cursor there and use the <Cen Ln> immediate command once again. The page, here shown in the 4:1 scale, is now as we wanted it to be:

We exit from the page preview and obtain a modified file - DTP commands are longer as they used to be:

The program modifed the left margin of the first two blocks as we centered them - the author's name now has a left margin of 695 pixels (34=695) instead of the 200 which were in the setup, and the title 575. The third block has not been moved and has therefore remained as it was.

RIGHT MARGIN OF INDENTED TEXT

It often happens that the right margin of paragraphs, where the first line is written from the line beginning, and the continuation lines start several places to the right, also needs to be adjusted. Let us show how to do it in STEVE on the following passage:

As can be seen, the indentations are not all of the same length but the rule is clear - the first line of a reference starts at the line beginning and the others are moved some spaces to the right. We move the cursor to the block beginning (as shown above) and use the <Ctrl><Adj Mrg> immediate command. The passage modifies to:

or, if looked at in the page preview (in the 2:1 scale):

For even more precise work, to avoid slightly uneven word spacing between the words in the first author name, we could replace spaces by hard spaces (<Alternate><Space>) there:

and make the adjustment once again.

FONT VARIATIONS

As with matrix printers there are eight different ways of modifying the letters printed on paper, yet with slightly different meanings. There are bold, semi-bold and condensed characters, slanted by 72 degrees (italic 72) and 63 degrees (italic 63), underlined characters, subscripts and superscripts. The relevant function is always started and ended by a special control character. How they appear in text and how to obtain them from the keyboard can be seen in the table below:

And how does the whole thing look in practice? The following passage, written as:

modifies, after right margin justification, to more easily readable form in the page-preview (shown in the scale 1:2 below):

BLOCK MOVING

To show how blocks can be moved around on a page, let us take another example, which contains two columns of text and a picture in between (again from Heyerdahl, 1974):

The picture has been scanned on a Panasonic, twice - once with the mode setting to "Bilevel" (to get the contrast in texts) and a second time to "Dithered, Press" to get detail in the mountain slopes (where the names have therefore suffered). Both pictures, after some clearing, have been combined into one through the "Copy or" command. We have also modified the picture magnification to 1 (40 = 1) as it is normally set to 2 in the setup.

We enter the graphic editor on the picture to see how wide it is, and it turns out that it is 470 pixels wide. As our standard block width for the A5 format is 1280 pixels (as can be seen by "DTP" and "Setup") the two columns we plan should have 1280 - 470 = 810 pixels, making 405 for one. As some space must be allowed between columns and the picture, say, 35 pixels, net column width would be 405 - 35 = 370 pixels. We define it above text:

and adjust the right margin to get the text belt of required width:

We now enter the page preview (<F3>) on the whole lot and obtain the following image:

The picture has to be moved to the page middle. To see it better we change the scale to 8:1 (<3> on the main keypad, not the numeric one), move the cursor in the picture and press the <Mov> key on the numeric keypad ("Move"):

The program has framed the block and now waits for the move. We move the mouse and the block with it to its destination:

where it is put down by a click of the left mouse button. During the move the cursor coordinate counters at the top right screen corner help to assure that no unwanted change of direction has been made (in our above case the y coordinate has to remain unchanged). We now move to the base of the first line and use the <Mov> immediate command once again:

It is moved to the required position at the screen top and, after one more left mouse button click, the left text column is in place:

Its lower part should now be moved to the right of the picture. But it cannot be done as the whole text is one single block. We decide to cut it into two - the right mouse button produces the main menu, where we make the following selections:

We move the mouse to the line where the cut should be made and click the left mouse button there:

We now have three blocks on the page, as confirmed by the last of the "Block" submenu, the "Show all blocks" command:

It makes a frame around every block that exists on the current page:

The frames stay on screen till we move the mouse. To get the page finally in order, we have to move the lower text block to its destination on the right picture side. To make it easier, we change the scale to 1:1, before we move to the baseline of the top block line. We select the <Mov> immediate command from the numeric keypad:

and move the block to its destination. The long cursor line helps to align the block's top line with that of the first block. When aligned:

we click the left mouse button and the page has its final shape - shown here in the 2:1 scale:

MAIN MENU ENTRIES

Let us now briefly explain all the selections from the main menu of the page preview. We obtain it through the right mouse button.

EXIT

submenu has two entries - the obvious END, used to leave the page preview (an equivalent of the <F4> function key) and the more interesting SAVE AS PICTURE. It stores the entire page, as formed during the page preview, as graphics at the file end. Such pictures can then be further processed by means of the graphic editor - inverted, filled, transformed in all possible ways. The resulting edited picture can then, if necessary, again be used in the page preview, with the magnification factor set to 1. This is also a way to add text to graphics - we make it in the DTP mode, save it as picture from the page preview, add to the original picture and move it where it is required there.

BLOCK COMMANDS

There are seven commands at our disposal here; some known and some not. The "Move" command is used so that we position the cursor to a block and click there - it is then framed and can be moved to another place on the page. As already mentioned it is recommended when moving text blocks, to click on the base of the top block line, for easier alignment.

SET PARAMETERS command is a way to modify the settings of a given block during the page preview. After having selected the command we move the cursor to the relevant block and click there. The following setup

pops up first and we can modify the character spacing in that block, line spacing, block width or, if it is a picture block, the magnification factor. After we leave the setup (Exit) it is also possible to modify the character set of the block:

should it contain text, of course.

The SPLIT INTO TWO command divides the block into two on the line which we show with the mouse and click on. Each of the new blocks can then be moved around the page separately.

The DELETE START command is used to join two blocks on the page. It deletes the block header (DTP command line) and thus appends the current block to the end of the previous block (in the file).

ADJUST RIGHT MARGIN is similar to the immediate command <Adj Mrg>, used outside page preview, in the standard editor mode. We position the cursor at the block where the margin has to be justified, click there and voila.

CENTER is used to center blocks; it is again an equivalent of the <Cen Ln> immediate command. The cursor is moved to the block to be centered, a click, the block frame appears, a little movement of the mouse and the block is centered.

SHOW ALL BLOCKS draws a frame around every block on the page so that we see what we have. The frames remain till the mouse is moved.

LINE COMMANDS

Three line commands are currently available. INSERT inserts an empty line before the line of the text block on which we click with the left mouse button. If we want to insert an empty line before another empty line, attention must be paid to where the click should be made. As empty lines are only two spaces wide we have to click on the line beginning. If we click too far to the right, the bell will ring and the command will be aborted - the program will recognize a click out of the line space.

DELETE LINE removes the block line that we show and click on with the mouse. As with INSERT we have to pay attention to empty lines - to delete such a line we have to click at its beginning.

DOUBLE LINE makes a copy of the line we click on, after that line. Combined with INSERT and DELETE line it can be used to add empty lines to the block end.

Editing of lines during the page preview is not yet possible.

SCALE

submenu will change the scale of the page preview. All its settings are also possible from the keyboard - on keys from <1> to <9> of the main keypad.

PAGE COMMANDS

are mainly used to jump from page to page in the page preview mode. The equivalent immediate commands are the <Pg Dn>, <Pg Up>, <Top Fle> and <End Fle> from the numeric keypad. The last entry in the submenu, the RESTORE:

will renew the page from the memory. It is used when some move has been made which resulted in two overlapped blocks, or when a block that was inside another one has been moved out. It is equivalent to the <Ctrl><z> command in the editor mode.

VARIOUS

is the last main menu entry. It provides three selections, and the first of them, the setup, is the one we already know from standard graphics:

With it we can influence the cursor size and its coordinate counters - if we set the scale unit, for instance, to centimetres, they will not count pixels, but centimetres, millimetres and tenths of millimetres.

DELETE END OF PAGE joins the current line and the previous one - it deletes the end-of-page line.

INSERT TEXT is used to insert a block from the "Blocks" system table in front of the line shown with the mouse and clicked on:

See also "Varia", "Insert text" from the main menu of the standard editor mode.

IMMEDIATE DTP COMMANDS

During the page preview, several keys on the keyboard can be used to select commands otherwise available through some menu selection, and one or two other features as well. Nine of them come from the numeric keypad:

They could be explained as follows:

Other commands are accessible from the main keyboard and the function keypad:

FUNCTION KEY MODIFICATION

For frequent DTP work it is recommended to change the contents of the function key 1 and 2 to the following:

It is most easily done by means of the "Varia", "Get any character" menu selections (see also the "System tables" chapter, "Function keys")

The F1 command sequence inserts the DTP block header line in front of the current line; its contents can be described as:

1. go to line beginning
2. go up one line
3. insert line
4. write the DTP header line
5. go to start of the next line.

If used on the following line:

it would add the DTP block header above:

The F2 command sequence is similar - it is expanded by the "NL 12" font selection and another DTP block header below the selected line. From:

we obtain more lines below:

The command is evidently used to make a separated title block (for later centering, if required).

BREAKING FILE INTO PAGES

is also possible in the page preview (DTP) mode. It is accessible through the following selection:

The command operates from the file beginning to the file end, and starts with the usual two-entry setup:

The page body size is determined in lines and should not exceed 72 - the full page length. So, if we have selected 66 lines per page, as above, and the A5 page size in the DTP setup (it is 2340 pixels long), the suggested cutting line between page one and page two in the file would be at 2145 pixels from the top (2145 = 2340 x 66 / 72):

During page breaking it is possible to move up and down the page using the mouse and two immediate commands, to change the scale, to request automatic further processing, to confirm breaking at a desired line or to quit from the command:

While proceeding manually we confirm the breaking of every page with the left mouse button - the line on which the cursor stands at the click will be at the top of the next page. The only exception are empty lines - if we attempt to break on an empty line, the program will search from that point on to the first non-empty line and break there. The right mouse button aborts from the command, and the <g> key requests automatic breaking from that page on; every page broken will be shown on screen even in this case.

To conclude, let us show how the typical header and footer lines looked when this handbook was prepared; we obtain them through:

They are shown inverted, just as they appear on screen - so that graphic lines can better be seen:

COMMENT LINES & INDEX

It is also possible to write comment lines before any DTP block header. They start with an obvious double diamond character, followed by a space and a slash. Anything written in such a line is from there on treated as comment. The only exception is the special comment line, important for page breaking:

Let us write two comment lines, before a block header and a block itself:

Such comment lines can be used to make an index of a book a fairly straight-forward procedure. Suppose we had modified the short file from our "Data processing", "Index" example (page 318) to include the block headers, markers from the "Break file into pages" command and the keywords which we would like to see in the index. They are written as the content of the special DTP comment lines:

When we have written all the index terms, we make, if necessary, the data base setting as shown below:

followed by a data base search:

It eliminates all the lines from the file except keywords for our index and end-of-page lines:

From such a file the "Break and index" command:

quickly makes the data base, which is used as the starting point for the making of an index:

PRINTING IN DTP MODE

There are a number of printing selections in the DTP entry of the main menu:

The number of copies is taken from the standard printer setup:

and has to be increased there if required.

ATARI SLM 804

Printing to the ATARI SLM 804 laser printer is subject to the size of the page that we have selected in the DTP setup. The selection of the

format will make one paper page out of one page as seen in the preview (it requires 1 Mb of free RAM). The LASER A5 entry will compose two pages from the preview on one sheet of paper (1.5 Mb of free RAM will be required in such a case), while with some other size (EXTRA) the program will try to put as many preview pages on a sheet of paper as will fit, on a from-left-to-right and from-top-to-bottom basis.

It is also possible to print pages mirrored left-right; such output, if made on tracing paper, can greatly reduce the cost at many printing shops as it can be used directly, without the necessity of an additional film. The way to request such printing is indirect as it has not yet been integrated into STEVE in the usual setup fashion, but let us try to describe it nevertheless:

1. <Ctrl>au to get the position counter at the screen bottom
2. "System", "Get system table", "System variables" sequence. The
system variables, all in one line, will be added to the file end.
3. Move the cursor to position 300 in the "System variables" line:

   It is most easily done by moving the cursor to the rightmost screen position in that line and clicking the right mouse button there - it will move the screen by 64 positions to the right each time.

4. Modify the contents of location 300 from zero character to something else, such as "1", as below:

5. Return the system variables through "System", "Put system table", "System variables" sequence and a click on the variables' line.

HEWLETT PACKARD LASERJET

There are three different submenu entries for printing to the HP Laserjet plus or II laser printer and its compatibles:

The first is used for pages where dense graphics form the majority of the page contents. It gives a fairly accurate impression of the page and is printed relatively fast - 2 minutes being the worst case as the density is only 150 dots per inch. The second selection is much slower and is mainly used to print mirrored pages (see above in the ATARI SLM 804 paragraph).

The last selection is the most often used; it is the one where the page is not transmitted entirely as picture, which consumes so much time over the parallel printer interface but by means of downloading. The default DTP character set - the one selected in the DTP setup is sent over to the printer at the beginning, before the first page. This feature greatly speeds the printing of standard text; only pictures on the page and transformed characters (italic, condensed, subscripts etc.) as well as some other, non-default character set are sent over slowly - in bit-image fashion. But even here an improvement has been made - after the default characters are taken away from the page, the remaining picture is cut into small rectangles; they are all individually scanned, the white space cut off on all four sides, and the remaining pixels (if any) transmitted to the printer. So a typical page with some large characters for a title, an average dose of italic and bold characters is printed in about half a minute.

While printing, the size of the page as set in the DTP setup will also determine the size on paper.

Let us also add a word on how to use the laser printers which have not been manufactured by Hewlett Packard, but are claimed to be compatible with the Laserjet plus or II. As far as the author can say, most of these printers have problems with downloading the space character; this results in poor word spacing on the printed page. There is a remedy, however, and a fairly quick one. The standard DTP character set used in STEVE begins with character codes 30, 31 and 32:

To avoid the problem mentioned above an additional character, not actually used in text, has to be added in front, such as the one with the code of 10:

We have added it to the line where characters are stored as text (the one with the cursor) and to the image - it may have an empty picture, as above.

To avoid compatibility problems a small brake in the speed with which characters are sent over the parallel interface has also been introduced; it is hidden at location 299 of the STEVE system variables. The users of the HP Laserjet plus or II can remove it by setting the location to code 0 and thus gain approximately 10 percent in speed. The procedure is described at the end of the ATARI SLM 804 paragraph.

MATRIX PRINTERS

There are two selections for use with 24-pin printers, and one for use with 9-pin hardware. To adapt the page size in the preview to that on paper, the page size in the DTP setup should be set to "EXTRA":

Approximate sizes for an A4 page on different printers, as is defined below, are shown in the following table:

The sizes are full - only the 2 cm border at the page top, always left unprinted on matrix printers, has been excluded. The 360 dpi printing on 24-pin printers requires over 1 Mb of free memory, while 180 dpi printing, four times faster, can easily be performed even on a 1 Mb machine since it requires only 332 Kb of free RAM. The page size for 9-pin printers, it requests 530 Kb of free RAM, can be reduced at the right (in width) and at the bottom (in length) by some 10 percent, if the user is prepared to live without the white border on the right and at the bottom of page in the preview.

XXIII. COMPUTER AIDED INSTRUCTION

is a domain which opens a new, most attractive application of STEVE and the ATARI ST machine range. Quite sophisticated lessons can be prepared in very reasonable amounts of time using the text editor, scanner interface, graphics editor and the STEVE DeskTop Publishing mode (page preview, in CAI used as a screen construction tool).

A special lesson control language (LCL) has been developed; it currently has 20 commands which control the flow of the lesson and provide two methods of answering questions - via text or with the mouse click on an object that should be shown on screen.

There are two lessons provided with STEVE, stored on BATS.STL and METEREOL.STL files; they have been kindly contributed by M. Gogala with B. Kryštufek, and T. Šlenc, all from Ljubljana. When composing a new lesson it is useful either to read one of the two from disk first, as every lesson brings several DTP character sets, and also sets the DTP setup accordingly, or to perform the following sequence of steps:

a) read the LESSON.FT file from disk and install the DTP character sets found there through:

b) clear the memory by <Top Fle> and <Ctrl>qk, for instance;
c) Set the values in the DTP setup as shown below:

It is also highly recommended to read the DeskTop Publishing chapter and get well acquainted with its features before attempting to make a lesson of your own.

To begin with, let us try to play a lesson to see how it works. We restart the program:

and read the BATS lesson from disk:

After the file is read we receive the message:

and it takes some half a minute till the lesson resources have been stored to the RAM copy of the STEVE.RSF. To play the lesson we select the last entry from the I/O submenu:

and follow the instructions given by the lesson. After we have read the title (instruction) screen

we click the left mouse button or press the <Return> key for the next one. At the fourth screen there is a question to be answered - we point and click on six words that describe the characteristics of a bat:

(answer: "mammals" and "flying", to begin with). A click on the wrong word rings a bell, and a click on the right one inverts the colour of the word area. A mistake can be corrected without loss of points; two mistakes are not tolerated. The third question:

has to be answered in text at the position of the vertical bar - we type c, for instance, followed by <Return>. We proceed till the end of the lesson and hope our school years in biology were not completely wasted.

LESSON LAYOUT

Let us now have a look at how the lesson is composed. It is a normal STEVE file, consisting of four parts:

1) a title line,
2) an introduction,
3) the lesson body (instruction units) and
4) the subroutines at the end.

The first line of the file is the lesson title. It should preferably not exceed 40 characters; it is stored and later displayed on every score screen. Examples:

or

It is followed by an introduction, which is built along the same rules as the instruction units, yet without questions and branching commands (go to statements, subroutine calls), like the sequence below:

The above introduction is composed of two screens (every lesson screen is delimited by a "get screen" command and an "end-of-page" line) and several lesson commands like "replace screen" or "wait until any key". Command lines are easily distinguished from the rest as they start with a special character, used otherwise to divide lines of text (<Alternate> <key to the left of the right SHIFT>). The first screen of the introduction is also put aside by STEVE for later use as "Help screen".

An instruction unit has a similar structure; however, it is preceded by a label (unit name) and also contains at least one question, as in:

The unit above, titled "question 1":

a) makes the screen with two questions on the NE air mass properties,

b) brings it to the actual computer screen,

c) takes two answers from the pupil (first starting at the position 300,30 on screen; y,x), keyed in using letters from the trst07 picture font and 2 is the maximal score of the two questions. One of the two answers should contain the string "continental" and the other "cold".

d) if the pupil does not know the answer and has therefore pressed the <Esc> key, an explanation screen will be constructed, and displayed, and the program will wait till any action on the keyboard or the mouse keys has been performed.

The unit title is preceded by a special colon (), most easily accessed through "Various", "Get any character", or, directly, with the <Alternate> key, combined with the key just above it (below <A>).

As can be seen, the command lines also start with a special delimiter, otherwise used in STEVE as a hyphen which divides a word at the line end. On the keyboard it is usually obtained by pressing the <Alt> key, combined with <-> (left neighbour of the right <Shift> key on the keyboard). Instead of the full command names their abbreviations can also be used. Their exact spelling can be verified in the "Lesson-command-names" table from the STEVE system tables (see also under "System", "Get system table", "Lesson commands").

Several commands have arguments; in such cases a colon (:) is used to end the command name.

LESSON COMMANDS

GET SCREEN

The basic command to make a screen is the "get screen"; it is followed by the screen contents which must have an

end-of-page line at the end. Use the page preview to see how the screen actually looks: either through the <F3> key (while the cursor is positioned somewhere in the screen text or picture) or through the "Page" and "Preview" menu sequence (for more information see the DTP chapter of the manual). In the page preview the <Pg Up>, <Pg Dn>, <Top Fle> and <End Fle> commands from the numeric keypad can be used to advantage: they take notice of the lesson commands and show the actual screens as they would be seen during the lesson run.

The "Get screen" command does not show the screen it has composed on the computer monitor - it just makes it and saves it temporarily for later use by other commands.

When the command is performed in the lesson for the first time, the image is as already mentioned, stored for later use as a "Help" screen.

REPLACE SCREEN

takes the last screen that the "Get screen" command has produced and brings it to the actual computer screen. Old screen contents are lost and the operation is instantaneous.

REPLACE SCREEN SLOWLY

is quite similar, only more pleasant as it takes about a second to complete.

SHOW SCREEN OVER

differs from "Replace screen" as it does not delete the previous computer screen contents, but lays a new image obtained from the last "Get screen" command over the old screen, using the "exclusive or" mode (white&white=white, white& black=black, black&white=black, black&black=white). Therefore the command, if performed twice, first lays the new picture over the old and then removes the new picture so that the old again looks as it used to before.

The command is used to add a message to the screen temporarily and then remove it.

SHOW SCREEN OVER SLOWLY

just as above, only one second long.

CLEAR SCREEN

quickly deletes the screen contents.

CLEAR SCREEN SLOWLY

does so in a more friendly way.

WAIT

is the command that is optionally followed by a colon and a three-digit number. It tells STEVE how long to wait, in hundredths of a second. So "wait: 200" would wait for two seconds and "wait:010" for one tenth of a second. Leading zeros may not be omitted. Wait without an argument performs the same operation as the

WAIT UNTIL ANY KEY

command. It allows several operations to be undertaken whilst you are waiting. Pressing the <Help> key shows the "Help screen", <Undo> one screen before the last, while the <Clr Home> obtains the current score. In the case of any such action the program waits till some key is pressed and then resumes waiting till something else has been done.

GET TEXT ANSWER AT

is used to elicit an answer or answers from the pupil. It has five arguments:

1. location where the answer should start, given as y,x of the point on screen (both in pixels). Coordinates are counted in the same way as in the page preview: y from top down, x from left to right. To get the desired values use the page preview.

2. character font, as given in the page preview. It is optional; if absent the font last used will be taken.

3. number of answers requested. Counted from 1 on. After every answer the <Return> key should be pressed. Parameter can be omitted if one answer is wanted.

4. the best possible score in points (from 1 on, an integer number) that can be obtained from this question; 1 if not present.

5. the correct answer(s). It is an expression of the form:

where an operand can be a value, optionally preceded by one of the two relational operators -

and, also optionally, followed by a hyphen and the answer weighting (how many points such an answer is worth). If the weighting is missing, 1 is again assumed. Examples:

If there are more operands and just one answer is requested, they are all treated as synonyms. In the case of more answers requested, synonyms for one should be enclosed in brackets, thus:

Say four answers have been requested and the third has two synonyms.

SAVE POSITION SCREEN & GET POSITION ANSWER

are used to obtain an answer with the mouse. "Save position screen", like the "Get screen", gets a screen, terminated by an "end of page" line, which in this case will not be presented to the pupil. It merely contains a picture with a closed shape, where the correct answer is located. "Get position answer" usually follows, and waits till the user clicks with the left mouse button on some screen location. It has three arguments, separated by "/" character: the number of answers requested (1 assumed if omitted), maximal possible score (again 1 if absent) and the position(s), given in y,x pairs. If there is more than one location to be shown, the coordinate pairs should be separated by semicolons (;).

To be correct, the location (as y=140,x=540 in the next example) should be situated anywhere in the closed shape given in the previous screen. It is most easily obtained in the page preview.

To help the lesson composer get an outline of an object (like the Black Sea above) a special outline command can be found in graphics:

It takes the contents of a rectangle and discards all its points with the exception of the outer outline and, for instance, makes the picture at right from the one at left:

DO NOT KNOW & END OF DO NOT KNOW

If the <Esc> key is pressed while some question should be answered, either with text or by the mouse, the program assumes that the pupil does not know the answer. In such cases it will try to find the first "Do not know" command further on within this unit; if found, all subsequent commands till the "End of do not know" will be processed. If the "Do not know" command has not been found, the message

is displayed and the program waits till some key is pressed.

ON ANSWER GO TO

is used to branch the flow of the lesson after an answer has been obtained (either with a "Get text answer at" or the "Get position answer" command). It can have either two or three arguments, separated by commas. If two, the first is the label of the unit to jump to if the last answer was correct; the second is that of the unit to go to if the answer was wrong or only partially correct. In the case of three arguments the first label stands for "yes", the second for "no" and the third for "partly". An example:

Instruction unit "birds" would be executed if the previous answer has the best possible score, "question 17 a" in case of an answer without score and "question 17 b" if some points have been obtained, but not all.

GOSUB

has a label of a subroutine as an argument. Subroutines are just like instruction units, only they are situated at the end of the lesson file and that each of them is preceded by a hollow semicolon (<Shift><Alt><key above Alt>), like in

The command:

somewhere in a unit would execute the sequence above and continue with the operation in the next line following the "Gosub". "Gosub" statements can be nested to a depth of 10.

RUNNING THE LESSON

Lesson processing is the last entry of the I/O menu:

The first command, "Run the lesson sequentially", runs it from the first unit on to the last; it follows any branching in the lesson if present.

Running the lesson at random will jump from unit to unit in a random way; such lessons should not include branching commands (GO TO, ON ANSWER GO TO).

After the lesson has been completed or abandoned through the <Ctrl><c><Ctrl><c> command, a short lesson summary is shown on screen, like:

There were been 11 questions; to one of them the answer was the <Esc> key (don't know) and to another the answer was was wrong. The remaining 9 questions were answered at least partially correctly. 14 points from the total possible 16 were scored, in 12 minutes and 40 seconds. As a percentage it would have been 87 from 100, which deserves the mark "Good".

Mark-related messages are:

The score screen is also displayed during the lesson, if requested by the <Clr Home> key.

COMMAND TEST

checks the lesson commands and the page-preview commands (used to define a screen during "get screen"). It takes a little while and, if all is well, the "O.K." message gets displayed. If not, the program jumps to the line where an error has been found.

SAVING THE LESSON

The lesson should not be saved through the disk menu, but through this command as it also saves all the lesson resources along:

   1. lesson itself
   2. page preview setup
   3. end-of-page line
   4. DTP character sets
   5. DTP page definitions
   6. lesson command names

When such a lesson (it always gets the .STL extension) is loaded from disk (through the disk menu) it also loads to STEVE all the above mentioned tables; so any STeve Lesson will run on any STEVE (from V 3.2 on), even if it is in a different language or has different DTP settings.

CONCLUSION

An inexpensive, lesson-run-only version of STEVE is in preparation and a PC version is also not excluded.

XXIV. MACHINE CODE to GFA BASIC

There is a special facility in STEVE which transforms linked machine code routines into a form acceptable to GFA BASIC. Suppose we had written a short routine in the assembly language:

It clears the screen in a special manner - like the closing of half-opened roller-blinds. It has three input parameters - the address in memory of the screen RAM, which is long (32 bits), the speed with which to perform the closing (word = 16 bits) and the blind width (word as well). The speed may vary from 0 (the fastest setting) to 10 or more for slower operation, and the blind width must be such that the screen height (400 pixels) is divisible by it (values like 8,10,20,25,50 or 100). The routine here is written for the GST assembler but should, with the exception of its second line, also work on other assemblers.

After the routine has been written, saved to disk in the "ASCII" format as CLSCSL.ASM file, we have assembled it (through ASM.PRG) to CLSCSL.BIN file; it served as an input to the linker (LINK.PRG) which finally made the CLSCSL.PRG of it. Now STEVE comes into play again - we read the file in as "RAW":

and obtain a short mess of 149 characters:

We make a block of its body - through "Beg Blk" command on its second line ("0") and "End Blk" on the last line ("100"):

To transform it into a form acceptable to GFA BASIC, we now use the <Ctrl><a><h> immediate command and obtain, at the file end, the following "Data" lines:

Every line contains 12 words (24 bytes) of the machine code, followed by the checksum value (3416 in the first line). The last line is padded with binary zeroes to the end. Now the rest of the file can be removed and the above lines saved to disk as ASCII, under, say, the CLSCSL.LST name:

We now load the GFA BASIC and write the program that will test the routine:

The program first calls the "Initialize assembler routine" (initass) subroutine, followed by a short loop where the routine is tested with a stripe width of 50 and variable speed from 1 to 10. Our routine, together with padding, is 6 lines long, that is 6*24 = 144 bytes. We have reserved space for it in the "assemblerroutine" field, overdimensioned to 100 integers, which is 400 bytes. At the beginning of the "assembler_routine" we have added the line "DATA 6" which tells the program that 6 lines of machine code, hidden in DATA lines, follow.

XXV. IMMEDIATE COMMANDS

Many of the immediate commands, selected without menus, are already familiar to the user; let us now have a short look at all of them. They are ordered according to importance and their location on the keyboard.

The MAIN and the MIDDLE KEYPAD

<Help> call the main menu - to exit press any mouse button
<Undo> return deleted lines one by one or restore the current one
<Backspace>move one position back in the line and put a space there
<Delete> remove character
<Insert> insert space
<Clr Home> find an explanation in the abbreviation dictionary
<Arrow> move the cursor up, down, left or right
<Return> jump to beginning of next line/next field (display entry)
<Caps Lock>capitals on/off
<Esc> turn text line into a graphic one; enter/exit graphics
<Tab> jump to the next tabulator position
<Shift> upper case/upper keyboard set; stop repeated cursor up/down
<Alternate>alternate keyboard; exceptions:
<Alt>f full character, start or end of printer escape sequence (hex). Example:

the string is sent to the printer as codes 27, 33 and 5 (select 160 characters per paper line).
<Alt>d,xxx any character with decimal code xxx between 000 and 255); sequence of such codes ("xxx") should be terminated by one or two <Return> keys;

Printer controlling characters:

THE NUMERIC KEYPAD

(  mark the block beginning
)  set end of block
/  move block before current line
-  copy block before line with cursor

<Shift> and any of the above four commands: "()/-" - beginning, end, move or copy of a rectangular block

* where am I on printer? Shows the current paper page & line

7  to file beginning
8  jump to last file screen; discard any blank lines there
9  screen up
3  screen down

5  find a given string in the file - from the cursor onwards
4  repeat find
6  centre line

+  adjust right margin of all the lines from current one to the end of paragraph (line before the one starting with space or any special delimiting line).

1  split line into two at the cursor; at the line beginning - insert a blank line before current line

2  join lines


.  clear line from cursor to end of line
0  delete word or spaces till the first word

<Enter> set insert mode on/off

In "Varia", "System setup" all above commands can be cancelled and the numeric keypad restored to its original function.

FUNCTION KEYS

can all be user defined (see "System tables", "Function keys").

The current settings:

<F1>  move to file place one
<F2>  move to file two
<F3>  start page preview of the current page
<F4>  return from page preview to standard editor mode
<F5>  compute the numeric expression at cursor (calculator)
<F6>  open the first screen layout on the current data record
<F7>  free memory
<F8>  "As already mentioned"
<F9>  move to file nine and start dictionary search there
<F10>  move to file ten, load the "SPELLING.ENG" file from disk, return to file one, insert a line there, display the "O.K. Spelling list loaded.", wait for four seconds and remove the message.

THE MOUSE

<Mouse>  moved to the upper right-hand screen corner - get the main menu;
<Left mouse button>  insert space if in the middle of text, insert line if at end of line or in an empty line, when in the top or bottom screen "rope": move the screen line by line, up or down;
<Right mouse button>  delete character in text, delete line if in a blank line or at end of line, when the cursor is at the screen top or bottom: move in the file screen by screen, up or down.

If necessary, both mouse buttons can be treated as function keys 11 and 12. This way a command sequence, user defined, can be put to any of the two mouse buttons.

CONTROL KEY COMMANDS

Unless otherwise specified the case of the control characters is of no importance.

<Ctrl><Space> turn the alternative (cyrillic) keyboard on/off
 
<Ctrl>c<Ctrl>c<Ctrl>c quit STEVE immediately and unconditionally
<Ctrl>qz save the current file to disk and exit to desktop
<Ctrl><Alternate> add the current screen contents as graphics to end of file; operates whenever STEVE is waiting for some user action - in the menus as well.

 
<Ctrl>n screen down
<Ctrl>l screen up
<Ctrl>b first file screen
<Ctrl>e last screen
 
<Ctrl>z restore screen (like after the <Ctrl>. command)
<Ctrl>, stand by - clear screen and wait
<Ctrl>< jump to given line number; followed by a number and <Return>
<Ctrl>>nnn jump to character position nnn (from 001 to 999)
<Ctrl>ab move the cursor to screen bottom
 
<Ctrl>i insert line
<Ctrl>d delete line
 
<Ctrl>I insert space
<Ctrl>D delete character
 
<Ctrl>k remove block from the file
<Ctrl>qo delete block complement (everything but the block)
<Ctrl>qk delete all the lines from the current line to end of file
 
<Ctrl>x split line
<Ctrl>j join lines
<Ctrl>a. clear to end of line
<Ctrl>al repeat line above cursor
 
<Ctrl>q8 jump to line start.
<Ctrl>q9 jump to end of line. If these commands are to be used often, they should best be put to function keys.
<Ctrl>q# switch positions of the current word and the word after it. Example: "Di Lady" with cursor anywhere on "Di" becomes "Lady Di".
 
<Ctrl>f find string of up to 40 characters
 
<Ctrl>r repeat find
<Ctrl>ad start binary search (on a sorted file, by beginnings)
 
<Ctrl>s substitute
<Ctrl>qs substitute a set of up to 40 characters with another set
 
<Ctrl>p print file or block, if it has been set
 
<Ctrl>o free memory
 
<Ctrl>n where n is a number between 0 and 9: move to file number n (0 = file 10); if already in that file, ring the bell
<Ctrl>a( set block start
<Ctrl>a) set end of block
<Ctrl>a= clear block limits
<Ctrl>qc copy block
<Ctrl>m move block
<Ctrl>- move block file end and stay at the current position

<Ctrl><Key below Delete>  What time is it?

<Ctrl>. show decimal and hexadecimal code of the current character; use <Ctrl>z to restore the screen after any of the above two commands, if necessary.
 
<Ctrl>t system setup
 
<Ctrl>ag where am I? Shows printer page and line
 
<Ctrl>h insert form
<Ctrl>y copy form
<Ctrl>g delete form
 
<Ctrl>' show the current line at the screen bottom, as seen by STEVE
<Ctrl>T same as above
 
<Ctrl>u display in the bottom screen line 44 most frequent characters from the text compression table
 
<Ctrl>wnnn wait for nnn hundredths of a second; <Ctrl>w200 would wait for 2 seconds while the <Ctrl>w000 waits till any key is pressed or mouse action performed. The command is usually used indirectly, as part of a function key command sequence.
<Ctrl>#nnn go nnn bytes back in a command sequence (on function key again). It is used to make a loop ("Not found" after a find or after any disk operation will exit from such command sequence).
 
Example: suppose we want to remove all the empty lines from the file.
 
The necessary sequence of commands would be:
 
1. find an empty line: if not found, end the loop;
2. delete it;
3. go back to 1.
 
we could write it as:
 

 
where the first three characters stand for <Ctrl>f (find) <Return>, the next two delete the line (<Ctrl>d) and the last five - jump five characters back and repeat the sequence. A more elegant (and faster) sequence would be:
 

 
Any of the above sequences should of course be put to some function key or an abbreviation (see System tables", "Function keys").
 
<Ctrl>$nnn execute command nnn (see the next chapter: STEVE command codes). Example: to put "Get any character" on function key, use ^$137; to print a block to an ATARI laser, the ^$090 sequence should be used.
 
<Ctrl>au turn on the position counter at the bottom right hand bottom screen corner. It is turned off by the same command; if scrolling repeats the counter, use <Ctrl>z to restore screen.
 
<Ctrl>a1 - <Ctrl>a9 open the display entry layout from 1 to 9 on the current record
<Ctrl>aa0nnn - open the display entry layout nnn (from 001 to 999) on the current record
<Ctrl>a0 terminate display entry (as does a request of the main menu) and return to standard editor mode
<Ctrl>aae same as above
 
<Ctrl>as select fields (data base command)
<Ctrl>v verify records from current line to end of file
 
<Ctrl>amn move the block from the file n before the current line; n can range from 1 (file 1) to 9 and 0 (file 10).
 
<Ctrl>acn block from file n is copied before the current line.
 
<Ctrl>qt read the text from serial (RS232) port; every received line should be terminated by a <CR><LF> pair. Pressing any key terminates the command.
 
<Ctrl>qp read pictures from serial interface as sent by the EVE editor from a Sinclair ZX Spectrum.
 
<Ctrl>ao make a union ("or") of the picture starting at the current line and of the picture in block. After union:
y = yes, other=no.

<Ctrl>ax as <Ctrl>ao, only "exclusive or" instead of "or".
 
<Ctrl>qh unpack pictures of printer-downloading characters from the cursor onwards into a set of text lines.
 
<Ctrl>qb pack such pictures back, from the current line to end-of-file into a single line and add it to the file end (see "Downloading").
 
<Ctrl>q0 system command. It interprets a STEVE file containing characters with code 13 (<CR>), i.e. a hidden ASCII file to normal STEVE format.
 
<Ctrl>q1 read the upper diskette surface into memory, byte by byte, sector by sector
<Ctrl>q2 read the lower diskette surface. Both commands can be used to recover files from damaged disks, disks with damaged directories and the like.
 
<Ctrl>q3 make a new copy of the "STEVE.RSF" file on disk
<Ctrl>q4 return "Message" system file to the editor
 
<Ctrl>q5 system command (return system file #18, i.e. "Calculator space" system file).
 
<Ctrl>q6nnn show on screen the STEVE message number nnn. Used to try out the message after translating it into another language or for documentation purposes (if followed by a Control><Alternate> to save the displayed picture). See also "System tables" chapter, "Message file".
 
<Ctrl>q6+ show the next message after the one that has last been displayed by <Ctrl>q6nnn. The command waits for next key to be typed - a sequence of "+" characters shows message after message.
 
<Ctrl>q7 reads any memory contents, either from RAM or ROM in a "raw" form. Example:
 

 
reads the 196.608 bytes of ST system ROM into memory; numbers entered are decimal and counting starts from 0.
 
<Ctrl>an translate a block of characters into numbers:
 

 
 
<Ctrl>av an opposite command to <Ctrl>an. Transforms a block of numbers into a block of characters. The block:
 

 
would for instance modify to:
 
 
<Ctrl>ah transform a block of linked machine code, read as "RAW", to DATA statements, acceptable by the GFA BASIC. For an example see the "Machine code to GFA BASIC" chapter.

 
 
<Ctrl>a+n select the screen character font n. 0 stands for standard 64 font, 1 for standard 71 and so on.

 
<Ctrl>afnnn select set nnn (000 - 999) of the function keys. Original set is labelled 000; to install more of them, they should be written one after another, separated by a single double-zero-byte line.
 
<Ctrl>atu start travelling in the file, up line by line;
<Ctrl>atU up screen by screen,
<Ctrl>atd down line by line,
<Ctrl>atD travel down in the file, screen after screen.
 
<Ctrl>a- unpack the spelling dictionary file, stored in a compact form as used by a popular English text editor after it has been read from disk as "raw" (see "Extended disk menu").
 
<Ctrl>ap perform an immediate mailing list, from the record with cursor to end of file. Its layout is not contained in a block, but follows as the name of a text block, given as the second part of the command (terminated with <Return> - character code 005).
Example: Instead of the
 

 
menu sequence, the following function-key or abbreviation command sequence could also be used:
 
 
<Ctrl>ay turn a screen of graphic lines from landscape into portrait mode.
 
<Ctrl>a' run the lesson sequentially (CAI)
 
<Ctrl>ar read the file from disk,
<Ctrl>aw write file to disk,
<Ctrl>aab write block to disk,
<Ctrl>ae call the disk menu,
<Ctrl>aar read the file from disk in "raw" form.
<Ctrl>aaw write the file to disk in "raw" form.
<Ctrl>aa5 get disk directory into the file
 
<Ctrl>aas remove the file from memory and start a new STEVE session.
 
<Ctrl>aac compute the arithmetic expression at cursor (Calculator).
<Ctrl>aal compute the expression in a rectangular block. If there are just numbers in that block, add them.
 
<Ctrl>aagnnn get STEVE system file nnn; nnn may range from 001 to 034
 
<Ctrl>aapnnn put any STEVE system file (nnn).
 
<Ctrl>aay place current date in the file at the cursor position.
 
<Ctrl>aa( make a block out of the data record, at which the cursor resides.
 
<Ctrl>aak break file into pages
 
<Ctrl>aah perform a chained binary search.
 
<Ctrl>aad clear the current file from memory. It does not restore the screen afterwards - it can be done by <Ctrl>z or <Top Fle> immediate commands.
 
<Ctrl>aat include subroutine (batch).
<Ctrl>aafn move to file place number (n: 1 to 9 and 0, batch).
 
<Ctrl>aq6 center line.
<Ctrl>aq+ adjust right margin to end of current paragraph.
<Ctrl>aq0 delete word.
<Ctrl>aq. clear characters to end-of-line.
<Ctrl>aq<Enter> or <Ctrl>aq<Return> - insert mode on/off.
<Ctrl>aq- insert mode off
 
<Ctrl>aqy during batch - enable input from keyboard - the first of the commands following this one which will require some argument that is usually typed in (like "Find" or "Data base search") will not take it from the batch stream but from the keyboard. After <Return> the keyboard will be switched off again.
 
<Ctrl>aqs save system variables (all the setup settings etc.)
<Ctrl>aqr restore system variables (saved by ^aqs command).
 
<Ctrl>qqv save the current file under its current name and continue.
 
<Ctrl>qqp start page preview at the current page.
<Ctrl>qqe end page preview and return to text editor.
 
<Ctrl>qql print the file to ATARI SLM 804 Laser printer.
 
<Ctrl>qqcx delete all characters from current to character "x" in the same line.
 
<Ctrl>qqbsnnnmvvvvv set the setup value, identified by nnnm to the value vvvvv. Example:
 

 
Some other useful values for nnn:
 

 
Particular values for m and other setup identifiers nnn can be found in the "System variables" chapter.
 
<Ctrl>qqbw, <Ctrl>qqbr, <Ctrl>qqbi, <Ctrl>qqbd - is a group of commands that handle STEVE integer variables.
 
Every such variable occupies four bytes and is stored in the "System variables" system table. There are 12 integer variables possible and their identifications are: 00519, 00523, 00527, 00531, 00535, 00539, 00543, 00547, 00551, 00555, 00559 and 00563. Every variable can be: set to a 5-digit value, incremented, decremented or brought to the current cursor position in text. As commands are long they should be placed to some function key or used as an abbreviation (see "System tables", "Function keys" and "Abbreviations").
<Ctrl>qqbwnnnnnmmmmmset integer variable nnnnn to the value mmmmm. Example:
 
 
<Ctrl>qqbinnnnnincrement variable nnnnn by 1 (add 1).
<Ctrl>qqbdnnnnndecrement variable nnnnn by 1 (subtract 1).
<Ctrl>qqbrnnnnnread variable nnnnn to current position in text.
 
<Ctrl>qqbpdefine page headers and footers (batch).
 
<Ctrl>qqbfdefine source chain link name (chained data base).
<Ctrl>qqbedefine second source chain link name.
 
<Ctrl>qqbtdefine target chain link name (chained data base). All three above commands do not restore screen after they have been performed. If they are not applied in batch, use <Ctrl>z to put the screen in order.
 
<Ctrl>qqbcchange directory. Example:
 

 
Besides batch applications, the command can be used to escape from some damaged disk area (disk menu always tries to display disk space, file directory etc. at first). If used as an immediate command, restore screen through <Ctrl>z afterwards.
 
<Ctrl>qqbLstart batch loop.
<Ctrl>qqblend batch loop.
 
<Ctrl>qqbunchained data base union commands. n can be either from 1 to 4 or from 5 to 8:
 
1 union of two sources
2 source 1 without records with IDs from source 2
3 source one with records with IDs from source 2
4 field union (same IDs)
 
where the source chains are retained after the union is complete. Numbers from 5 to 8 are the equivalents of 1 to 4, only this time the source chains are deleted during the union and only the target chain remains on disk. This facility comes in handy when hard disk space is scarce - the data base size close to the limit.
 
<Ctrl>qqbD1turn the displaying of new screens during some long function key command loop (or batch procedure) off. Speed gain can be considerable.
 
<Ctrl>qqbD0turn the screen displaying on again.

IMMEDIATE DATA BASE COMMANDS

<Ctrl>azEadd field
<Ctrl>azFanagrams
<Ctrl>azJbreak and index
<Ctrl>azIbreak file into words
<Ctrl>azGcards
<Ctrl>azgchained binary search
<Ctrl>azTchained find
<Ctrl>azdchapters
<Ctrl>azOcolumns
<Ctrl>azLcompound field
<Ctrl>azYcompress file chain
<Ctrl>azccompute first field
<Ctrl>azf"concordances"
<Ctrl>azQdata base setup
<Ctrl>aaddelete file
<Ctrl>azXfield to lower case
<Ctrl>azWfield to upper case
<Ctrl>az3find records
<Ctrl>azPfixed fields into free
<Ctrl>azMfold first two fields
<Ctrl>az9frequencies
<Ctrl>azClengths
<Ctrl>az7mailing list to RAM
<Ctrl>az8mailing list to printer
<Ctrl>apmailing list/layout from the "Mailing list" table
<Ctrl>azSmark data
<Ctrl>azDnumber of parts
<Ctrl>azKpermute and simplify
<Ctrl>azerandom numbers
<Ctrl>azBrank
<Ctrl>azVreplace data
<Ctrl>az1select fields
<Ctrl>azAsequence numbers
<Ctrl>azHset local separator
<Ctrl>azRsimplify field
<Ctrl>azZsolve repetitions
<Ctrl>azasort chain
<Ctrl>az2sort file
<Ctrl>az3start display data entry
<Ctrl>aaestop display data entry
<Ctrl>azbstore current number of lines in the file into the "Lines per page" data base setting.
<Ctrl>azNturn around
<Ctrl>az4verify
 
<Ctrl>qqzfollowed by a character are equivalents of <Ctrl>az commands, yet for chained data base operations.

XXVI. COMMAND CODES

Nearly all STEVE routines, they are numbered from 1 to 670, are accessible either through menus (see "System tables", "Message file") or through the <Ctrl><$> immediate command. This command is most conveniently used from a function key (see "System tables", "Function keys") and has the shape of <Ctrl><$>nnn where nnn is the three-digit routine sequence number. An example:

The table of all the STEVE command codes with their names and a short explanation, up to version 3.28, is given in this chapter.

Disk related commands

diskmad extended disk selector
diskm  disk selector
erasef  file from list
erasefi file with a given name
readf  steve file from list
readfi  immediate
writef  steve file
reada  ASCII file from list
readai  immediate
10 writea  ASCII file
11 readpi  PIC file from list
12    reserved
13 writep  PIC file
14 readdg  DEGAS file from list
15    reserved
16 writed  DEGAS file
17 readsn  SNAP file from list
18    reserved
19 writesn write SNAP file
20 readrw  RAW file from list
21 readrwi immediate
22 writerw write RAW file
23    reserved
24    reserved
25    reserved
26 path  new disk path or unit
27 getdirf get directory

Miscellaneous

28 tty  start VT52 emulation
29    reserved
30 rddskdi read disk directory

Line-to-line block commands

31 defsb  define start of block
32 defeb  end of block
33 clebl  clear block start&end
34 showsb  show start of block
35 showeb  show end of block
36 removb  delete block
37 copyb  copy block
38 moveb  move block
39 adjr  block: adjust right margin
40 unadjr  unadjust right margin
41 loweru  lower case to upper
42 upperl  upper case to lower
43 writebl write block to disk
44 removcb remove complement of block
45    reserved

Find group commands

46 find  find
47 repfnd  repeat find
48 subst  substitute
49 subsot  substitute one by one
50 gotoln  go to line number
51 nextp  find next picture
52 lastp  find last picture
53 where  show page and line
54 whichr  show record and byte
55 memlf  memory left
56 stevear steve memory area
57 binsea  binary search
58 findstp find setup

Miscellaneous

59 pgprvw  page preview
60 printlf print file to ATARI laser
61 printf  print file
62 prinbl  print block
63 prtsel  select printer
64 prints  printer setup
65    reserved
66 getprt  get printer table
67 putprt  put printer table
68 getfptl get first printer table line
69 breakp  break file into pages
70 printfs print file or block
71 travel  travelling (with menu)
72 clears  clear screen and wait
73 sysset  system setup
74    reserved
75 syssec  additional system setup
76 batch  execute batch command sequence
77 spelc  spell checking (with menu)
78 filsel  file overview and selection
79 chst  compress text lines in the file
80 decompf decompress the file
81 linest  line statistics
82 selfrma select screen form
83 seldoc  select document - insert block
84 splctrf spell checker - translate file
85 splctrb spell checker - translate block
86 savetbl save the "STEVE.RSF" file
87 batchfl batch - select & execute
88 ttystp  tty setup
89 pgsetup page preview setup
90 printlb print block to ATARI laser

Data base commands

91 dentry  start display entry
92 dentcld end display entry (close document)
93 pick  select fields
94 sort  sort file
95 query  find records
96 verify  verify records
97 dbfreqc frequencies
98 dbseqc  sequence numbers
99 dbrankc ranks
100 dblgthc lengths
101 dbnparc number of parts
102 dbaddfc add field
103 dbanagc anagrams
104 bibcar  cards
105 dbversf mark data
106 dbrepsf replace data
107    reserved
108 dbsetlc set local separator
109    reserved
110 breakfw break file into words
111 dbbrinc break file into words and index
112 dbpersc permute and simplify
113 dbcompc compound on first field
114 dbfoldc fold first two fields
115 dbturnc turn first field around
116 multl  make columns
117 fxltfr  turn fixed fields into free
118 dbloup  first field to upper case
119 dbuplo  first field to lower case
120 dbsimp  simplify first field
121 dbasstp data base setup
122 mailtor mailing list to RAM
123 mailtop mailing list to printer
124 mailqic mailing list to RAM/layout from "Mailing list" system file
125 dbstat  data base overview
126    reserved
127 dbcpye  data base - solve repetitions - ' signs
128 dbchapt chapters
129 dbcmpuf compute first field
130 dbrandm random numbers
131 dbconco "concordances" - keywords in context
132    reserved
133    reserved
134    reserved
135 sellins select printer line spacing

Miscellaneous

136 showdte show date and time on screen
137 selchar select any character
138 exittd  exit to Desktop
139 removf  remove the file
140 reloadr reload the "STEVE.RSF" file
141 reload2 reload the "STEVE.RSF" file which has a different name - written immediately after the command and terminated by the <Return> key
142 travlup travel up page by page
143 travlul travel up line by line
144 travldp travel down page by page
145 travldl travel down line by line
146 scfins  insert form
147 scfcop  copy form
148 scfdel  delete form
149 scfwhch show form and line number
150 formmpp from form to plain paper
151 selfrma select form
152 formdb  turn form data into data records
153 mailelg clear the file & get display data entry layouts
154 mailelp return display data entry layouts/clear the file
155 fontsel select font
156 movtol  go to selected position in the file
157 getdcfs clear file and get "Block" file from STEVE.RSF
158 putdcfs return "Block" file and clear the file
159 cmpusta start computing ("Addition")
160 cmpuend end computing
161    reserved
162    reserved
163 spelcnl spell checker on-line
164 spelcf  spell-check the entire file
165 spelcb  spell-check a block
166 spelcff on-line spell-checker off
167    reserved
168 calcula calculator - compute an expression
169 blkadd  compute rectangular block
170 blkaddi blkadd - immediate

Get system table routines I

171 getkyb  get keyboard table
172 getfk  get function keys
173 gettabs get tabulators
174 getwndf get message file
175 getchs  get character set
176 getchn  get additional character sets
177 getlet  get letters and special characters table
178 gtbrkfp get footer and header table
179 getdent get display entry layouts
180 getdocf get "Block" file
181 getdict get abbreviations dictionary
182 getsors get sort collating sequence 1
183 gtlowup get lower and upper case table
184 getsysv get system variables
185 getform get screen entry forms
186 getspcl get spell-checker letters
187 getstcs get starting command sequence
188 getbatc get batch command dictionary
189 getdbdi get data base dictionary
190 getalcl get alarm clock file

Put system table routines I

191 putkyb  put keyboard table
192 putfk  put function keys
193 puttabs put tabulators
194 putwndf put message file
195 putchs  put character set
196 putchn  put additional character sets
197 putlet  put letters and special characters table
198 ptbrkfp put footer and header table
199 putdent put display entry layouts
200 putdocf put "Block" file
201 putdict put abbreviations dictionary
202 putsors put sort collating sequence 1
203 ptlowup put lower and upper case table
204 putsysv put system variables
205 putform put screen entry forms
206 putspcl put spell-checker letters
207 putstcs put starting command sequence
208 putbatc put batch command dictionary
209 putdbdi put data base dictionary
210 putalcl put alarm clock table
211 putpcf  put DTP - character set table
212 putpcl  put picture library
213 putpcn  put page definition names
214 putchrg put OCR - font image file
215 putpxfn put picture fill patterns
216 putcrgj put OCR - join table
217 puttelt put lesson command table (CAI)
218 putsor2 put sort collating sequence 2
219 putlins put printer line spacings
220 putmail put mailing list blocks

Get system table routines II

221 getpcf  get picture font table
222 getpcl  get picture library
224 getchrg get character recognition table
225 getpxfn get picture fill patterns
226 getcrgj get OCR - join table
227 gettelt get lesson command table (CAI)
228 getsor2 get sort collating sequence 2
229 getlins get printer line spacings
230 getmail get mailing list blocks

Miscellaneous

231 back  go to first screen in the file
232 ends  last screen
233 lasts  previous screen
234 nexts  go to next screen in the file
235 prnptfsf  DTP - print page to 24-needle printer/180 dpi
236 prnptfsb  DTP - print block to 24-needle printer/180 dpi
237 prnptfdf  DTP - print page to 24-needle printer/360 dpi
238 prnptfdb  DTP - print block to 24-needle printer/360 dpi
239 prnptfnf  DTP - print page to 9-needle printer
240 prnptfnb  DTP - print block to 9-needle printer
241 scanp  read picture from Marvin scanner
242 scanstp Marvin scanner setup
243 hscanp  start Cameron handy scanner
244 hscanst Cameron handy scanner setup
245 prnthtf print page to HP Laserjet or compatible/300 dpi
246 prnthtb print block to HP Laserjet or comp./300 dpi
247 spatstp read picture from Spat scanner
248 spatscn Spat scanner setup
 
249 rmvevpg remove even pages
250 rmvodpg remove odd pages
 
251 panastp Panasonic scanner setup
252 panason read picture from the Panasonic(Wilhelm)scanner
253 panaso2 read picture from the Panasonic (Brock) scanner
 
254 colibri read picture from the Marvin Colibri scanner
255 prnthhf print file to HP Laserjet comp. printer/150 dpi
256 prnthhb print block to HP Laserjet comp. printer/150 dpi
257 prnthdf print file to HP Laserjet or compatible printer/300 dpi with download of the main font
258 prnthdb same as above, only print block
 
259 tell  run the lesson sequentially (CAI)
260 telltst lesson command test
 
261 savesfd save current subfile directory (disk path description)
 
262 restsfd restore the current SFD
 
263 rdgmfnt read GEM font file from disk
264 rdfonf  read "FON" (Softcraft) font file from disk
 
265 cgotocl go to character location in the line (0 - 999)
 
266 rdsfpf  read the "SFP" (Bitstream) font file from disk
267 telsav  save the lesson file (CAI)
268 tellr  run the lesson at random
269    reserved
270 deltoc  delete all characters in the line to the given one
 
271 defsbr  define the start of a rectangular block
272 defebr  define an end of the rectangular block
273 cleblr  clear rectangular block margins
274 showsbr show start of rectangular block
275 showebr show end of rectangular block
276 removbr clear a rectangular block
277 copybr  copy rectangular block
278 movebr  move rectangular block
279 adjrr  adjust right margin of a rectangular block
280 unadjrr unadjust right margin of such a block
281 lowerur rectangular block - lower case to upper
282 upperlr rectangular block - upper case to lower
283 shbltr  shift block to the right (line-line)
284 shbltl  shift block to the left (line-line)
285 centrbl center all block lines (line-line)
286 pgprbrk DTP - break file into pages
287 antbrkp DTP - undo the page breaking
288    reserved
289 savesyv save system variables
290 restsyv restore system variables
291    reserved
292    reserved

Chained data base commands

293 pick  select fields
294 sortch  sort file
295 querch  find records
296 verify  verify records
297 dbfreqc frequencies
298 dbseqc  sequence numbers
299 dbrankc ranks
300 dblgthc lengths
301 dbnparc number of parts
302 dbaddfc add field
303 dbanagc anagrams
304 bibcar  cards
305 dbversf mark data
306 dbrepsf replace data
307 chstch  compress file chain
308 dbsetlc set local separator
309    reserved
310 breakfw break file into words
311 dbbrinc break file into words and index
312 dbpersc permute and simplify
313 dbcompc compound on first field
314 dbfoldc fold first two fields
315 dbturnc turn first field around
316 columns make columns
317 fxltfr  turn fixed fields into free
318 dbloup  first field to upper case
319 dbuplo  first field to lower case
320 dbsimp  simplify first field
321 dbasstp data base setup
322    reserved
323    reserved
324 mailqic mailing list to RAM/layout from insert file
325 dbstat  data base overview
326    reserved
327 dbcpye  solve repetitions
328    reserved
329 dbcmpuf compute first field
330 dbmovch move chain
331 dbcpych copy chain
332 dbchapt chapters
333 dbrandm random numbers
334 dbconco "concordances"
335 binsch  chained binary search
336 unichta union - of two sources
337 unichtb source 1 without records with IDs from source 2
338 unichtc source one with records with IDs from source 2
339 unichtd field union (same IDs)
 
340 - 350  reserved

Get & put system table routines III

351 getbatp get batch procedures file
352 - 360  reserved
361 putbatp put batch procedures file
 
362 - 500  reserved

Graphic rectangular block routines

501 pxrtcl  clear block
502 pxrtbl  blacken block
503 pxrtmvt move to
504 pxrtcpt copy to
505 pxrtcnt center in
506 pxrtinv inverse
507 pxrtdbl double
508 pxrttrp triple
509 pxrtdt  diminish by a factor of 2
510 pxrtmrl mirror left
511 pxrtmrd mirror down
512 pxrtout outline
513 pxrtthi thicken
514 pxrtsm  smooth
515 pxrtcte enhance contrast
516 pxrttr  transpose
517 pxrtclc clear complement
518 pxrtlgh lighten
519 pxrtmvo move over
520 pxrtcpo copy over
521 pxrtbox box
522 pxrtnoop  no operation
523 pxrtdbg double light
524 pxrttrg triple light
525 pxrtcpc copy characters
526 pxrtcpv make recognition table from layout
527 pxrtccs compute character's size
528 pxrtcpx copy with "exclusive or"
529 pxrtcpa copy "and"
530 pxrtdp  copy symbols to locations from data base
531 pxrtdh  diminish by a factor of 3
532 pxrtouo outer outline
532 pxrtoub outer outline - black
534 pxrtscl scale rectangle
 
535 - 550  reserved

Miscellaneous graphic routines

551   store & exit
552   quit
553   clear screen & wait
554   store & continue
555   undo
556   store bit-image & exit
 
557 - 560  reserved

Graphic scaling routines

561    1 : 1
562    2 : 1
563    4 : 1
564    8 : 1
565   16 : 1
566    1 : 2
567    1 : 4
568    1 : 8
569    1 : 16
 
570 - 579  reserved

Further graphic routines

580 pxpen  pen
581 pxline  line
582 pxpolg  polygon
583    reserved
584 pxcirc  circle
585 pxarc  arc
586    reserved
587    reserved
588    reserved
589    reserved
590    reserved
591 pxsetup setup
592 pxcuttr kill to black right - find the first black pixel to the right and remove the space from the picture
593 pxcutvlc  move picture at cursor one pixel from right
594 pxcutvrc  from the left
595 pxcuthuc  from bel ow
596 pxcuthdc  from above
597 pxinsvlc  to the right
598 pxinsvrc  to the left
599 pxinshuc  to bottom
600 pxinshdc  to top
601 pxincl  include picture from library
602 pxincb  include picture from block
603    reserved
604    reserved
605 pxchrrw recognize characters by weights
606 pxfxfn  DTP font/kill margins - remove white space at the left and right of every character
607    reserved
608 pxrtoc  or characters
609    reserved
610 pxcrstp character recognition setup
611 pxflb  fill black
612 pxfil  select pattern & fill with pattern
613 pxflsel fill - select pattern
614    reserved
615   store & move up a block
616   store & move down a block

Page preview commands

617 pxppmb  move block
618 pxppsp  set parameters
619 pxppib  insert block line
620 pxppdb  delete block line
621 pxppit  insert text
622 pxppil  insert line
623 pxppdl  delete line
624 pxppdol double line
625 pxppdep delete end of page
626 pxpprfp restore page
627 pxppprp previous of page
628 pxppnep next page
629 pxppfip first page
630 pxpplap last page
631 pxppadj adjust right margin
632 pxppcb  center block
633    reserved
634 pxppsal show all blocks
 
635 - 660  reserved

More graphic routines

661 pxgdcf  DTP - generate diminished character font
662 pxslc  store location coordinates
663 pxflw  fill white
664 pxchrrs OCR - recognize characters by shape
665 pchsstp OCR simple recognition setup
666 pxrtdfp data base fillings to picture
667 pxrtmftn  OCR - make font from text
668 pxchrrc OCR - compare images character recognition
669 pxcsdp  compute & save distance between points
670 pxsfwm  DTP - expand font width to maximal

XXVII. SYSTEM VARIABLES

A lot of settings in STEVE are accessible not only through the relevant setup menus but also through the "System variables" system table. There are many rarely used or otherwise special features which can only be requested by some particular value in the table.

After we request the system variables:

a line, 750 bytes long, is appended to the file end. How to move right and left in such a line is described on page 142 - under "Varia", "System setup", "Right margin". Also very useful is the position counter, which can be turned on or off through the <Ctrl>au immediate command. The first 50 locations in the file are reserved to the system and are better left as they are, while the remaining lot can be checked for contents by the <Ctrl><.> command and modified, if required.

Setup values in the table usually have their relative or absolute addresses, written in parenthesis at the end. It is for use with the <Ctrl>qqbs immediate command (see also "Immediate commands" chapter).

Example 1: the system setup has the starting address of 051 and the "Additional messages" setting is the tenth ("A"). To turn the additional messages off (to 1), the command would be written as:

Example 2: the page width of the Panasonic scanner has the number 6331 at the end. To set the width to, say, 200 mm, the immediate command would be composed as:

VARIABLE LOCATIONS

1 -   4  start of file in RAM
5 -   8  end of file in RAM
9 -  12  upper RAM limit for end-of-file
13 -  16  first line on screen start in RAM
17 -  20  current line on screen start in RAM
21 -  24  start-of-line with marker 1 (0 if not set)
25 -  28  start-of-line with marker 2
29 -  32  start of packed line buffer
33 -  36  start of unpacked line buffer
37 -  40  length-of-line in unpacked buffer (0: no line in buffer)
41 -  44  current screen line (0-21)
45 -  48  current screen character (0-63 ... 0-159)
49 -  50  current start-of-line band (0-1960): effective
 
51 - 116  system setup (051):
 
51 -  52  left margin (1)
57 -  58  right margin (2)
63 -  64  screen colour (3)
69 -  70  compress new text (4)
75 -  76  connected disk partitions (5)
81 -  82  page preview mode (6)
87 -  88  right keyblock mode (7)
93 -  94  file mode when saved (8)
99 - 100  intermediate saving (9)
105 - 106  additional messages (A)
111 - 112  usual numbers or sums (B)
 
117 - 120  not used
 
121 - 186  current printer setup (copied from the printer system table) (121):
 
121 - 122  left margin (1)
127 - 128  first page (2)
133 - 134  lines per page (3)
139 - 140  copies to print (4)
145 - 146  line spacing by (5)
151 - 152  download (6)
157 - 158  transmission (7)
163 - 164  paper (8)
169 - 170  interface type (9)
175 - 176  ESC * image mode (A)
181 - 182  end-of-line type (B)
187 - 188  width of 80 col. carriage in character width units (C)
 
193 - 194  current transmission speed for terminal operation (1931)
 
195 - 196  starting number for the data base sequence numbers -1 (1951)
 
197 - 197  character to be put in front of unrecognized words during the spell-checking of the file or block
 
198 - 198  number of mouse movement changes on the screen top before the main menu is obtained
 
199 - 199  selected printer (0 -)
200 - 200  data base local separator
 
201 - 218  find setup (201):
 
201 - 202  search range (1)
207 - 208  lower/upper case (2)
213 - 214  spaces (3)
 
219 - 230  not used
 
231 - 282  data base setup (231):
 
231 - 232  mailing list left indentation (1)
237 - 238  columns - columns per page (2)
243 - 244  column width (3)
249 - 250  lines per page (4)
255 - 256  chained search (5)
261 - 262  search expression (6)
267 - 268  query - keep the data base (7)
273 - 274  search hit limit (8)
279 - 280  sort numbers as text (9)
 
283 - 283  number of the header bytes, sent at end-of-line to the printer
 
284 - 291  space for the abovementioned header
292 - 292  minimal printer line spacing (of an inch)
293 - 298  printer line spacings: 0.7, 0.8, 1.0, 1.5, 2.0, 3.0
 
299 - 299  number of waiting loops made before a character is sent over to HP Laserjet or compatible laser printer (code 2 for Epson GQ 3500, for instance). In the case of the true HP machine the value can be set to 0.
 
300 - 300  mirror the laser picture (1) or not (0)
 
301 - 354  additional system setup (301):
 
301 - 302  "Rope" (1)
307 - 308  <Control> key (2)
313 - 314  picture to be edited (3)
319 - 320  direction of writing (4)
325 - 326  block type (5)
331 - 332  main menu line (6)
337 - 338  files sorted by (7)
343 - 344  binary search/compressed lines (8)
349 - 350  scrolling (9)
 
355 - 360  not used
 
361 - 396  200 dpi scanner setup (361):
 
361 - 362  picture width (1)
367 - 368  picture length/height (2)
373 - 374  number of contrast levels (0-15) (3)
379 - 380  scanning direction for the handy scanner (4)
385 - 386  grey levels for the SPAT scanner (0-1) (5)
391 - 392  intensity for the SPAT scanner (0-2) (6)
 
397 - 398  not used
399 - 400  main menu number (usually 1) (3991)
 
403 - 422  graphics setup (403):
 
403 - 404  cursor size (1)
409 - 410  cursor counters (2)
415 - 416  scale unit (3)
421 - 422  density - dpi (4)
 
423 - 436  reserved
 
437 - 448  character recognition setup:
 
437 - 438  word spacing width (4371)
439 - 440  minimal line height (4391)
441 - 442  multiple spaces (4411)
443 - 444  maximal size difference (4431)
445 - 446  maximal nr. of pixels to differ (4451)
447 - 448  pred. vert. characters/max. width (4471)
 
449 - 460  not used
 
461 - 486  page preview setup:
 
461 - 462  page width in bytes (4611)
463 - 464  page length in pixels (4631)
465 - 466  left margin (4651)
467 - 468  top margin (4671)
469 - 470  character spacing (4691)
471 - 472  line spacing (4711)
473 - 474  text block width (4731)
475 - 476  not used (4751)
477 - 478  picture magnification (4771)
479 - 480  unit (4791)
481 - 482  output density (4811)
483 - 484  default font number (1- ) (4831)
485 - 486  page size selector (internal)
 
487 - 500  not used
 
501 - 566  space for the STEVE integer variables (see the ^qqbw, ^qqbr, ^qqbi, ^qqbd commands in the "Immediate commands" chapter).
 
567 - 567  minimal number of characters for the "Adjust right margin" command; it decides if a word-division will be performed or not. Currently set to 4. For adjustment of very narrow columns in DTP it should be set to code 1.
 
568 - 620  unused
 
621 - 636  Panasonic scanner setup
 
621 - 622  pixel tone (6231)
623 - 624  resolution - dpi (6251)
 
625 - 626  dithered pattern (6271)
627 - 628  bilevel mode contrast (6291)
629 - 630  dithered mode contrast (6311)
631 - 632  page width in mm (6331)
633 - 634  page length in mm (6351)
635 - 636  mode (6371)
 
637 - 750  unused

XXVIII. WHAT NEXT?

            STEVE has evolved, from its first installation in May, 1986, into a general information processing tool which can be quite powerful in experienced hands. As its ancestors, from microcomputer text editor BESS (Basic Editor for the Sinclair Spectrum) in 1983 followed, by TESS, INES and EVE, to the information retrieval and storage systems, started in 1974 on the Control Data Cyber mainframe and later expanded on Digital Equipment mainframes and minicomputers, STEVE has been designed to get the most out of the hardware available.
            Speed and efficient use of memory still have to be cherished above all as the machines that we now have, though improving by an order of magnitude every decade, are still relatively modest for coping fully with the real thing, the colourful world around us.
            The computing power available to most of us has, in the meantime, nevertheless grown to the level where the black & white reality, with its myriad of patterns, shapes and shades is coming within reach. 24-pin printers for draft, and lasers for quality output, combined with 400 dpi scanners and supported by a large-computer-like microprocessor in the Mega-byte desktop machine, can reproduce facts and ideas close to what we would really want.

            Therefore STEVE developments are oriented in two directions - to enlarge its scope of capabilities, with more computing and information retrieval, better graphics and more features; and, on the other hand, to bring the relation between paper and screen even closer.
            Improvements, such as footnotes, the data base to forms mapping, kerning, scalable fonts for DTP and inverted data base search could all be added to the existing STEVE architecture. STEVE's successor, on the other hand, would have to carry a much heavier load. Additional features, such as direct industry standard compatibility, 16-bit character set, standard and page-preview editor, hierarchically connected DTP blocks, Postscript compatible output, hypertext-like tagged-fields data base operational in a multi-user environment all seem inevitable.

            When and on which computer (ST, 386, UNIX/VMS environments) we shall see any of these only the future will tell.

XXIX. SOURCES and LITERATURE

  1. John Ashbery: As We Know; Penguin Books, New York, 1979
  2. W. H. Auden: The Oxford Book of Light Verse, Oxford University Press, Oxford, 1973
  3. Brueckmann, Englisch, Gerits: ATARI ST Intern; Data Becker, Duesseldorf, 1986
  4. Maurice Burton: The World Encyclopedia of Animals; Thomas Y. Crowell, New York, 1972
  5. Jure Dimec: Animals, a computer file, Ljubljana, 1985
  6. Epson FX-85 and FX-105 Printers, User's Guide; Epson (UK) Limited, Wembley, 1985
  7. Rhodes W. Fairbridge: The Encyclopedia of Geomorphology, Enc. of Earth Sciences Series, Vol. III; Dowden, Hutchinson & Ross, Stroudsbury, Pennsylvania, 1968
  8. R. S. Giljarevskij, V. S. Grivnin: Opredelitel' jazykov mira po pis'mennostjam, 3rd edition, Nauka, Moskva, 1964
  9. Laura Gilpin: The Hocus-Pocus of the Universe; Doubleday, New York, 1977
  10. Darko Goriup: Business forms, a computer file, Ljubljana, 1986
  11. L.J. Harris: The Official Garlic Lovers Handbook; Aris Books; Berkeley/California, 1986
  12. Thor Heyerdahl: Back to Nature; George Allen & Unwin, London, 1974
  13. Primož Jakopin: INES, information editing system for the Sinclair ZX Spectrum; Duesseldorf, 1984; Ljubljana, 1985
  14. Primož Jakopin: EVE, text, image and data editor for the Sinclair ZX Spectrum, unpublished, Ljubljana, 1986
  15. Primož Jakopin: STEVE, text editor for the ATARI ST; Mladinska knjiga, Ljubljana, 1987
  16. Donald E. Knuth: The Art of Computer Programming, Vol. III, Sorting and Searching; Addison-Wesley, Reading, Massachusetts, 1973
  17. Vladimir Kokole: The Size Structure of Rural Settlements in Slovenia, Bulletin of the Geographical Society of Slovenia, Vol. LX, Ljubljana, 1988
  18. Daša Komac: English - Slovene Modern Dictionary, 7th edition, Cankarjeva založba, Ljubljana, 1985
  19. Andrej & Maja Kranjc: Coastal karst, a computer file; Institute for Karst Research, Scientific Research Centre, Slovenian Academy of Sciences and Arts, Postojna, 1985
  20. Elena Marcon & Manuel Mongini: The World Encyclopedia of Animals, Orbis, London, 1984
  21. NEC Pinwriter P6/P7, Bedienungshandbuch; NEC Business Systems (Deutschland) Gmbh, Muenchen, 1986
  22. Olga Novak Markovič: Yugoslavian Cookbook; Cankarjeva založba, Ljubljana, 1986
  23. Milan Orožen Adamič: Map of Slovenia and its communes, computer resource; Anton Melik Institute of Geography, Scientific Research Centre, Slovenian Academy of Sciences and Arts, Ljubljana, 1986
  24. Mark Twain: Adventures of Huckleberry Finn; 2nd Edition, W. W. Norton, New York, 1977
  25. Tone Wraber & Peter Skoberne: Red Data List of Endangered Vascular Plants of SR Slovenia, Nature Conservation, Vol. 14-15, Ljubljana, 1989

XXX. INDEX

     batch procedures  388      calculation  168, 349      command loop  201, 558
               A      batch processing  377      calculator  168, 563      command sequence  198
     batch setup definitions  384      cards  272      command test (CAI)  546
abbreviations  203      bats  534      carp  35      COMMAND.COM  238
abbreviations (forms)  184      baud rate (printer)  92      case  67      commands  553
about STEVE  11      begin block  20      cd  565      comment lines  523
add field  311      binary search  77, 158, 354      center block  498, 514      compound field  302
adding columns  173      bingo  342      center line  30      compress chain  356
addition  168, 170      bit-block command  469      center picture  410      compressed file  29
additional graphics  465      bit-image  398      chained binary search  354, 563      compression  187
additional messages  150      Bitstream  63      chained commands  356      compute character size  455
additional screen characters      black & white  146      chained copy  357      compute field  349
           210      black fill  459      chained data base  351      compute rectangle  563
additional system setup  152      black outline  415      chained field selection  358      Computer Aided Instruction
address & name  248      black painting  459      chained file compression  356                (CAI)  531
adjust & unadjust  38      black to white & vice versa      chained merge  365      computer aided instruction
adjust right margin  35, 67,                 411      chained move  357                system table  225
          496, 514      blacken rectangle  406      chained overview  352      concordances  346
alarm clock  226      block  20, 23, 65, 155      chained searching  360, 381      condensed printing  88, 502
alternate space  37      block centering  498      chained sorting  359, 381      connected disk partitions  148,
anagrams  326      block copying to another file      chained verify  353                360
appending fields  365                 162      change directory  565      contrast enhancement  416
arc  439      block moving  504      chapters  344      control command sequence  198
arithmetics  168      block moving to another file      character font  137      control key  153
arrows  466                 162      character mapping table  123      control key commands  556
ascending order  281      block type  155      character set  111, 176, 206,      coordinate counters  396
ASCII file format  53      blocks  192                210      copies to print  90, 525
assembly language  549      bold printing  88, 502      character set table  207      copy "and"  408
ATARI screen characters  137      Boolean operators  286      character spacing - DTP  488      copy "exclusive or"  409
ATARI SLM 804 laser printer      both sides of paper  115      circle  439, 467      copy block  22, 162
           526      box  438      clear line  32      copy chain  357
     branching  385      clear picture complement  413      copy characters home  452
               B      break & index  318      clear rectangle  405      copy form  182
     breaking file into pages      clear screen  539      copy picture  401, 469
BASIC program  54                 106, 382, 520      clock  226      copy picture over  408
batch - input from keyboard      breaking file into words  315      collating sequence  218      copy rectangle  401
           390            colour photograph scanning      copy symbol  429
batch if statement  385                     C                 483      cottage cheese biscuits  347
batch mode  377            columns  24, 322      CR/LF  100
batch modules  380      CAI  225, 415, 531      command codes  569      cursor counter  559



cursor size in graphic  460      DeskTop Publishing tables  214      DTP command list  495      fast scrolling  158
Cyrillic keyboard  196      dictionary search  77, 158      DTP comment lines  523      field adding  311
     diminish picture  422      DTP font  61      field compounding  302
               D      diminished DTP character set      DTP function keys  519      field computation  349
                450      DTP graphics setup  517      field folding  312
daisy wheel printer  83      direction of writing  155      DTP immediate commands  518      field lengths  307
data base  247      disk directory  43, 44, 50, 158      DTP index  523      field merging  371
data base overview  276      disk folder  45      DTP main menu  511      field of a record  259
data base pictures  279      disk menu  43, 52      DTP microspacing  497      field selection  277
data base search  285      disk operations  43      DTP page commands  516      field to upper & lower case
data base searching  386      disk partition  44, 148, 360      DTP page layout  488                 337
data base setup  267, 268, 273,      disk unit  44      DTP page size  488      file format  51, 56
           288      display data entry  253      DTP printing  525      file mode when saved  147
data base to graphics  425      distances  431      DTP scale  492, 515      file name  49
data base verification  275      do not know  543      DTP setup  488      file order  44, 158
data dictionary  333      double a picture  419      DTP to graphics  511      file overview  159
data entry  179, 248, 256, 259      double line  515            file size  12
data entry layout  253      double printing  88                     E      file transfer  177
data field lengths  307      double strike printing  88            files in RAM  159
data list  268      double zero byte line  110      ellipse  467      fill  457, 471
data processing  299      down mirror  412      end  243      fill from data base  427
data replacement  333      downloading  91, 126, 134      end block  20      fill pattern  457
data sorting  280      draw  437, 472      end of batch  389      fill patterns  222
data verification  336      drop-down menus  157      end of file  26      filled characters  409
decompression  190      DTP - block commands  512      end of line  100      find  27, 69, 261
DEGAS file format  56      DTP - break file into pages      end of page  101      find & replace  69, 383
delete block  65                 520      English German dictionary  77      find records  285
delete block complement  66      DTP - matrix printers  529      enhance contrast  416      find setup  79
delete block header  513      DTP - number of copies  525      enlarge picture  418      find-speed  29
delete character  17      DTP - save page as picture      eraser  472      fine movement of pictures  440
delete end-of-page  517                 511      ESC * image mode  92      first author only  330
delete file  47      DTP - set block parameters      escape sequence table  125      first page  516
delete form  182                 512      EVE  591      first page number setting  106
delete islets  416      DTP block header  494      exit from graphics  397      first screen  26
delete line  515      DTP block moving  504      extended disk menu  52      First Word file format  64
delete word  33      DTP character set handling      extended graphics  465      fixed fields to free  331
descending order  281                 443      eye  54      FNT file format  61
designing a new form  185      DTP character set selection                     F      fold first two fields  312
DeskTop Publishing (DTP)  151,                 496            folder  45
           485      DTP command line  494      fanfold paper  91      FON file format  63



font  210      graphic coordinates  396      immediate commands  19, 553      kwic  346
font file format  61, 63      graphic cursor  396      immediate data base commands      
font selection  137      graphic library  400, 461                 566                     L
font/kill margins  448      graphic line  437, 466      immediate DTP commands  518      
font/margins to maximal  448      graphic main menu  397      immediate graphic commands      label printing  272
fontware  63      graphic rectangle  405, 467                 436, 463      large pictures  153
form design  185      graphic rectangle operations      indented paragraphs  501      laser  84
form number  182                 399      index  523      laser font  61
form processing  179      graphic setup  460      index buildup  318      laser printer  526, 527
form to data base  183      graphics  393      information retrieval  360, 386      last page  516
format records  248      graphics - 9-needle printers  93      ink-jet printer  85      learning  531
forms  179, 224      graphics - 24-needle printers      ink-jet printers  98      left margin  142
free field format  331                 96      insert block  192      left mirror  412
free memory  76      graphics - exit  397      insert character  17      left truncation  287, 293
frequencies  303      graphics - ink-jet printers  98      insert form  181      lengths  307
from bottom up  441      graphics - printing density  92      insert line  514      lens  433, 472
from the left  441      graphics from data base  425      insert mode  34      lesson commands  225, 538
from the right  441      graphics II  465      insert text  175, 192, 517      lesson control language  538
from top down  441      grey levels  478      inserting blocks  175      lesson layout  534
function key set selection  562            integer variables  565      lessons  531
function keys  198, 555                     H      intermediate saving  147      letters  216
function keys - DTP  519            introduction  11      library of pictures  221, 400,
     handy scanner  477      inverse picture  411, 469                 461
               G      hard space  37      italic printing  88, 502      lighten a picture  416
     heapsort  282            line  437, 466
GEM font file format  61      help  241                     J      line centering  30
generate diminished font  450      help file  234            line length  32, 142
get any character  111, 176      Hewlett Packard laser printer      join fields  312      line number  74
get picture from block  462                 527      join lines  30      line scrolling  158
get position answer  541      hexadecimal dump (laser)  91      jump to line  74      line spacing  90, 101, 118, 214
get screen  538      history  591            line spacing - DTP  488
get text answer  540      hit limit  363, 384                     K      line statistics  166
getting started  13      honey-biscuits  28            lines per page  106
GFA BASIC  54, 549      HP Laserjet  527      keyboard  16, 553      list of data  268
go to line  74      hypertext  591      keyboard commands  556      local separator  300
go to position  135            keyboard system table  195      logical operand  286
gosub  544                     I      keyword in context  346      logical operators  286
grab a picture  401            keyword index  299, 380      long lines  142
graphic arrows  466      I/O  42      kill to black right  442      lottery  342
graphic box  438      if statement  385      kill to end of line  32      lower & upper case table  215



lower case  337      next form  182      picture blocks  153                 214
lower to upper  67      next page  516      picture box  438      printer selection  85
     number of authors  309      picture centering  410      printer setup  89, 120
               M      number of copies  90      picture drawing  437, 472      printer tables  117
     number of parts  309      picture enlargement  418      printer tuning  117
machine code  549      number type  150      picture from block  462      printing  83
macros  198      numeric keypad  19, 146, 554      picture library  221, 400, 461      printing in DTP mode  525
magnify picture  418, 469            picture line  437, 466      printing of labels  272
magnifying lens  433, 472                     O      picture mode  153      printing on both sides of paper
mail order  179, 224            picture outline  414                 115
mailing list  248, 263, 344, 381      on answer go to  543      picture raster  473      programming  198
mailing list system table  269      one author only  330      picture rectangle  405      proportional spacing  99, 121
main menu  41      outer outline  415      picture reduction  418, 422      
main menu line  157      outline  414      picture resizing  418                     R
mark data  336      overview  159, 276, 352      picture scale  433, 472      
matrix printer  83            picture scanning  475      random numbers  342
matrix printers  529                     P      picture shapes  436      rank  306
measuring distances  431            picture size  11, 395      raster  473
memory  76      page & line  75, 103      picture smoothing  416      raw file format  56
memory area  76      page breaking  106, 114      picture thickening  414      read file  47
memory contents  561      page commands  516      picture transmission  59      record & byte  75
menu buildup  229      page down  26      pictures in data base  279      record complement  374
message file  229, 561      page end  101      pie-chart  468      record cross-section  372
microspacing  497      page headers & footers  109      plain paper  182      record extraction  372
mirror down  412      page preview  491      polygon  438, 467      record formatting  248, 263,
mirror left  412      page preview mode  151      portrait  484                 344, 381
mirrored printing  526      page scanner/200 dpi  479      position counter  559      record handling  259
mouse  14, 555      page scanner/400 dpi  480      position in the file  135, 139      record length  259
mouse buttons  16, 19      page up  26      position in the line  142      record merging  366
move block  22, 25, 162, 504      Pagemaker  63      predecessors  591      record number  75
move chain  357      paint  457, 471      previous form  182      rectangle  467
move picture  406, 469      painted characters  409      previous page  516      rectangle computation  173
move picture over  407      paper sides  115      print block  87      rectangular block  23, 155
move rectangle  406      paragraph  37, 38      print file  87      rectangular transformations
moving picture parts  440      patterns  222      printer  84                 399
multiple files  159, 162      pen  437, 472      printer control characters  88,      reduce picture  418, 422
     percent  172                 502      relational operators  286
               N      permute & simplify  299      printer downloading  126      reloading STEVE.RSF  244
     photographs  475      printer interface  92      remote processing  177
name & address  248      PIC file format  54      printer line spacing  90, 118,      remove the file  244



repeated data  341      screen characters  206, 210      sort collating sequence  218      terminal  59
repetition  203      screen colour  146      sort keys  281      terminal emulation  177
repetitions  341      screen down  26      sorting  275, 280      terminal raw file format  59
replace  69      screen font selection  137      sorting in batch mode  380      text compression  146, 187
replace data  333      screen forms  224      sorting on end  313      text correction  16
replace screen  538      screen ropes  152      soused carp  35      text decompression  190
replacement of characters  72      scrolling  158      space  37, 79      text in graphics  464, 468
resize picture  418      scrren up  26      special characters  216      text input  203
resource file  191, 229      SDI  386      spell checking  162      text to data records  315
restore page  516      search chain  360      spell-checker letter table  217      thicken a picture  414
restore system variables  564      search expression  286      SPELLING.ENG  160      through the file  139
retrieval of information  360      search range  79      split block  508      to bottom  441
retrospective searching  386      searching  27, 69, 261, 275, 285,      split line  30      to data base  183
return to Desktop  243                 381      stand by  243, 398      to the left  441
reversed dictionary  313      searching - speeding it up  294      start  13      to the right  441
right keyblock mode  146      select fields  277, 358      start command sequence  238      to top  441
right margin  35, 142, 384      select form  185      statistics  166      tomato salad  70
right margin justification  496      select screen characters  562      STEVE  11      top of file  26
right margin of indented text      semi-bold printing  502      STEVE OCR  12      translation  165
           501      sequence numbers  305      STEVE Professional  12      transpose picture  411
right to left  155      sequential searching  360      STEVE.RSF file  81, 191, 239      travelling  139
right truncation  287      serial letters  250      store distances  431      triple a picture  421
ROM  561      serial numbers  305      store locations  425      truncation  287, 293
rope  152      set local separator  300      subscripts  88, 502      TTY  177
rounded rectangle  467      setup  141, 564      substitute  69      turn around  313
running the lesson  532, 545      setup changes  151      substitution  383      
     setup value definition  384      sums  173      
               S      SFP file format  63      superscripts  88, 502                     U
     shapes  436      swap x and y  411      
sardine-burger  38      sheet paper  91      system  187      underlined printing  88, 502
save block  67      shortcut  203      system setup  141, 152      undo  18
save file  48      show all blocks  514      system tables  191      undoing the page breaking
save position screen  541      show page & line  75      system variables  237, 585                 114
save system variables  564      show screen over  539            union  566
saving STEVE.RSF  81, 151,      simplify field  330                     T      union of file chains  365
           239      smooth a picture  416            upper & lower case table  215
saving the lesson  547      smooth scrolling  158      tabulators  205      upper case  337
scale  433, 472, 515      snapshot file format  56      tarragon roll  138      upper to lower case  67
scanner  475      solve repetitions  341      teaching  531      user defined characters  126
school  531      sort chain  359            



     word list  315
               V      write block  67
     write file  48
varia  137      writing STEVE.RSF  239
variables  565      
various graphic commands  456                     Z
Ventura  63      
verify  275, 353      zero byte line  110
video camera input  484      zooming  433, 472
VT 52  177      
                    1-400
               W      
     1 to 1 replace  72
wait  539      4-bit characters  187
wait until any key  539      9-pin printer downloading  127
where am I  103      9-pin printers  93
white & black  146      24-pin printer downloading
white fill  459                 131
white painting  459      24-pin printers  96
wildcarding  287      200 dpi page scanner  479
word by word translation  165      386  591
word delete  33      400 dpi page scanner  480






Primož Jakopin
STEVE Reference Manual
 
Published by the author
Address: Ljubljana, Trnovska 2
 
608 pages
 
 
 
First printing: July 1989
 
 
 
Printed by:
Tiskarna Pleško
Ljubljana, Rožna dolina c. IV 36
 
Printed in Yugoslavia
 
 
 

 






 


This page was made by Primož Jakopin. Send inquiries and comments to primoz jakopin guest arnes si (insert dots and at sign as appropriate). Page initiated in May, 2021 (converted till page 40), and completed in June, 2022. Date of last change: June 14, 2022.

URL: https://www.jakopin.net/steve/STEve_Reference_Manual.php
    30