387
l PCOS (Professional Computer Operating System) User Guide olivelli L1

Olivetti M20 PCOS User Guide · 2-12 centronics-like parallel interface 2-12 ieee-488 parallel interface 2-13 printers 3. software components 3-1 introduction 3-3 pcos 3-3 memory

  • Upload
    others

  • View
    12

  • Download
    1

Embed Size (px)

Citation preview

  • l

    PCOS(Professional Computer Operating System)

    User Guide

    olivelli L1

  • PREFACE

    This book describes the ProfessionalComputer Operating System (PCOS) asimplemented on your M20. It is direc-ted at the user who has some experi-ence of computer programming and isfamiliar with computing terminology.

    REFERENCES: BASIC LanguageReference Guide

    BASIC & PC OS PocketReference

    The book is made-up of two parts.Part 1 comprises Chapters to 12and contains introductory and opera-tional information. Part shouldbe read before attempting to use Part11 which provides a command reference.

    Operations Guide

    1/0 with ExternalPeripherals

    DISTRIBUTION: General (G)

    The first threeare introductory.overview of theand software.

    chapters of PartThey provide an

    M20, both hardware

    EDITION:

    RELEASE:

    March 1983

    2.0

    Chapter 4throughoutthe rules,used, for

    describes the notation usedthe book. It also describesand defines the terminology

    entering PCOS commands.

    Chapters 5 to 12 provide operationa Idetails of how to use PCOS.

    Part 11 comprises Chapter 13 and shouldbe used as a reference. It describesall the PCOS commands in alphabeticalorder. Each command description In-cludes the command action, a syntaxdiagram, the characteristics of thecommand, and examples.

    The following are tr'ademarks of Irlg. C. Olivt:tti

    " C•• S.p.A: DI,ICDM. Gll, DLITERM, OLI',OPO,

    DLINUM. OLIS1-1T. OL!TEST, OLJTUTOR. OLIElHRY,

    OLISORT, OLIMASTER.

    The follo .. ing is a reCli stC'r'f~d trademark of

    MICROSOFT Inc.: MULTI?: iii,:

    ©1983, by O'!ivetti, all rights reserved

    PUBLICATION ISSUED BY:

    DOCUTELs:::J ol,iveltiDocutel!Olivetti Corporation

    155 White Plains RoadTarrytown, NY 10591

  • CONTENTS

    PART I

    PAGE

    1. INTRODUCTION

    2. HARDWARE COMPONENTS

    2-1 MAIN UNIT

    2-2 MEMORY

    2-3 THE VIDEO DISPLAY UNIT (VDU)

    2-4 THE KEYBOARD

    2-5 LINE TERMINATOR KEYS

    2-5 THE CTRL KEY

    2-6 LOCKING THE SHIFT KEY

    2-6 LOGICAL RESET

    2-6 ASSIGNING VAlUES TO KEYS

    2-7 KEYBOARD BUFFER WARNING BUZZER

    2-7 PHYSICAL RESET

    2-8 HARD DISK AND DISKETTE DRIVES

    2-9 DISKETTE HANDLING

    2-9 LABELLING DISKETTES

    2-9 WRITE PROTECTION

    2-11 INSERTING AND REMOVING DISKETTES

    2-12 PERIPHERAL INTERFACES

    2-12 EIA RS-232-C SERIAl INTERFACE

  • PAGE

    2-12 CENTRONICS-LIKE PARALLEL INTERFACE

    2-12 IEEE-488 PARALLEL INTERFACE

    2-13 PRINTERS

    3. SOFTWARE COMPONENTS

    3-1 INTRODUCTION

    3-3 PCOS

    3-3 MEMORY OPTIMISATION

    3-4 RESIDENT AND TRANSIENT COMMANDS

    3-4 PROGRAMMABLE KEYS

    3-4 PROTECTION MECHANISMS

    3-5 LINE EDITOR FUNCTIONS

    3-5 REAL-TIME CLOCK

    3-5 ROUTING INPUT/OUTPUT

    3-5 BASIC INTERPRETER

    3-6 VIDEO FILE EDITOR

    3-7 ASSEMBLER

    3-7 LINKER

    3-7 PROGRAM DEBUGGER

    3-8 STANDARD INTERFACE HANDLERS

    3-8 PCOS COMMAND LIBRARY

    3-9 PROGRAMMING TOOLS

    3-9 PCOS CONFIGURING COMMANDS

    3-10 SET SYSTEM GLOBAL COMMANDS

  • PAGE

    3-10 KEYBOARD-RELATED COMMANDS

    3-11 VOLUME HANDLING COMMANDS

    3-12 FILE HANDLING COMMANDS

    3-13 STANDARD INTERFACE HANDLING COMMANDS

    3-13 PCOS GRAPHIC FACILITY COMMANDS

    3-14 USER AIDS

    4. ENTERING A COMMAND

    4-1 NOTATION CONVENTION

    4-2 COMMAND SYNTAX

    ~-3 COMMAND NAMES A~O KEYWOROS

    4-3 PARAMETERS

    4-5 DEFAULT VALUES

    4-5 RESIDENT AND TRANSIENT COMMANDS

    4-5 C011MAND SEARCH PROCEDURE

    4-6 FILE AND VOLUME IDENTIFIERS

    4-10 WILD CARDS

    4-10 NO INTERACTION FLAG

    5. INITIALISATION AND CHANGiNG ENVIRONMENTS

    5-1 M20 ENVIRONMENTS

    5-1 peos

    5-1 BASIC

    5-1 VIDEO FILE EDITOR

    5-2 PROGRAM DEBUGGER

    5-2 CHANGING ENVIRONMENTS

  • PAGE

    5-6 MODES OF PCOS

    5-6 COMMAND MODE

    5-7 EXECUTION MODE

    5-7 CHANGING MODES

    5-7 STANDARD INITIALISATION

    5-8 INITIALISATION FILES

    5-9 NON-STANDARD INITIALISATION

    5-10 INITIALISATION FOLLOWING A PSAVE COMMAND

    5-10 INITIALISATION FOLLOWING A PRUN COMMAND

    5-11 THE INITIALISATION FLOWCHART

    5-14 BEGINNING AND ENDING A WORKING SESSION

    6. CONFIGURING PCOS

    6-1 INTRODUCTION

    6-1 MAKING TRANSIENT COMMANDS RESIDENT

    6-5 ASSIGNING STRINGS TO KEYS

    6-6 CHANGING SYSTEM GLOBAL PARAMETERS

    6-7 SETTING THE SYSTEM GLOBAL ENVIRONMENT

    6-11 DISPLAYING AND MODIFYING DEVICE NAMES

    6-13 MODIFYING THE BASIC ENVIRONMENT

    6-15 SETTING THE ENVIRONMENT FOR AN RS~232-C COMMUNICATIONS PORT

    6-15 SETTING THE PRINTING ENVIRONMENT

    6-19 RECONFIGURING THE KEYBOARD LANGUAGE

    6-20 SAVING A CUSTOMISED PCOS

  • PAGE

    7. DEVICE RE-ROUTING

    7-1 INTROOUCTION

    7-2 LOCAL DEVICE RE-ROUTING

    7-5 GLOBAL DEVICE RE-ROUTING

    7-7 DEVICE RE-ROUTING FROM A BASIC PROGRAM

    8. PROTECTION TOOLS

    8-1 INTRODUCTION

    8-1 VOLUME PASSWORDS

    8-2 FILE PASSWORDS

    8-4 WRITE-PROTECTION

    8-4 COPY-PROTECTION

    8-4 BASIC PROGRAM SECURITY

    9. VOLUME HANDLING

    9-1 FORMATTING AND INITIALISING NEW VOLUMES

    9-1 FORMATTING A DISKETTE OR HARD OISK

    9-3 INITIALISING A VOLUME

    9-4 LISTING A VOLUME

    9-4 LISTING A VOLUME USING THE VLIST COMMAND

    9-5 LISTING A VOLUME USING THE VQUICK COMMAND

    9-5 COPYING VOLUMES

    9-6 COPYING VOLUMES ON A DUAL-DRIVE SYSTEM (VOLUMES OF EQUAL SIZE)

    9-7 COPYING VOLUMES ON A SINGLE-DRIVE SYSTEM (VOLUMES OF EQUAL SIZE)

    9-8 COPYI~G VOLUMES (OF DIFFERENT SIZES)

    9-8 NAMING AND PROTECTING A VOLUME

  • PAGE

    9-8 WRITE-PROTECTION

    9-9 PASSWORD PROTECTION

    9-9 NAMING A VOLUME

    9-10 ALPHABETISING A VOLUME

    10. FILE HANDLING

    10-1 CREATING FILES

    "10-1 CREATING AN EMPTY FILE

    10-2 CREATING A FILE BY COPYING

    10-2 COPYING FILES

    10-2 COPYING FILES ON A DUAL-DRIVE SYSTEM

    10-5 COPYING FILES ON A SINGLE-DRIVE SYSTEM

    10-6 LISTING TEXT FILES

    10-7 PROTECTING FILES

    10-7 PASSWORD PROTECTION

    10-8 WRITE-PROTECTION

    10-9 FREEING UNUSED FILE SECTORS

    10-12 DELETING AND RECOVERING FILES

    10-12 DELETING FILES

    10-13 RECOVERING DELETED FILES

    10-14 RENAMING FILES

    11. GRAPHIC FACILITIES

    11-1 INTRODUCTION

    11-1 DISPLAYING LABELS

  • PAGE

    11-3 PRINTING THE SCREEN IMAGE

    11-3 USING THE SPRINT ANO LSCREEN COMMANOS

    11-4 CREATING THE USER-DEFINED FONTS

    11-4 CREATING A FONT MATRIX FILE USING THE RFONT COMMANO

    11-4 THE FONT MATRIX FILE

    11-7 USING THE WFONT COMMAND

    12. VIDEO FILE EDITOR

    12-1 INTRODUCTION

    12-1 THE DISPLAY

    12-2 THE KEYBOARD

    12-4 HOW TO INVOKE THE THE VIDEO FILE EDITOR

    12-4 EDIT.CMD

    12-6 GENERAL EDITING FUNCTION KEYS

    12-12 WINOOW MOVING FUNCTION KEYS

    12-14 EXITING AND SAVING FUNCTION KEYS

    12-15 COMMANOS ANO SEARCHING

    12-15 STRING SEARCHES

    12-16 COMHANOS

    PART II

    13. PCOS COMMANOS

    13-1 ASM.CHO

    13-1 BASIC. CMD

    13-2 BVOLUME.SAV

    13-8 C1. SAV

  • PAGE

    13-8 CKEY.CMD

    13-14 COMMANDS. BAS

    13-14 DCONFIG.CMD

    13-17 EDILCMD

    13-17 EPRINLSAV

    13-19 FCOPY.CMD

    13-24 FDEPASS.CMD

    13-26 FFREE.CMD

    13-28 FKILL.CMD

    13-29 FLlSLCMD

    13-31 FMOVE.CMD

    13-33 FNEW. CMD

    13-35 FPASS.CMD

    13-37 FRENAME. CMD

    13-38 FUNPROT.CMD

    13-40 FWPROT .CMD

    13-42 HDUMP.CMO

    13-42 HELP. BAS

    13-42 IEEE.SAV

    13-43 LABEL.CMO

    13-48 LlNK.CMD

    13-48 LSCREEN.CMO

    13-50 LTERM (ALWAYS RESIDENT)

    13-51 MLlB.CMD

  • t"Abc

    13-51 PDEBUG.SAV

    13-52 PKEY.CMD

    13-54 PLOAD (ALWAYS RESIDENT)

    13-56 PRUN.CMD

    13-58 PSAVE.CMD

    13-60 PUNLOAD (ALWAYS RESIDENT)

    13-62 RFONT.CMD

    13-64 RKILl.CMD

    13-66 RS232.SAV

    13-66 SBASIC.CMIl

    13-69 SCOMM.CMIl

    13-70 SDEVICE. CMIl

    13-72 SFORM.CMD

    13-75 SLANG.CMD

    13-77 SPRINT.CMD

    13-79 SSYS.CMD

    13-83 TEXTDUMP.CMD

    13-83 VAlPHA.CMO

    13-85 VCOPY.CMD

    13-87 VOEPASS.CMD

    13-88 VFORMAT. CMIl

    13-91 VllST.CMIl

    13-93 VMOVE.SAV

    13-95 VNEW.CMIl

    13-97 VPASS.CMIl

  • PAbt

    13-99 VQUICK.CMD

    13-101 VRENAME.CMD

    13-103 VVERIFY.CMD

    13-106 WFONT.CMD

    APPENDICES

    A. ASCII CODE

    B. NATIONAL KEYBOARDS

    B-1 ASCII CHARACTER EQUIVALENCES

    B-1 NATIONAL KEYBOARD LAYOUTS AND CODES

    B-3 DENMARK KEYBOARD

    B-6 FRANCE KEYBOARD

    B-9 GERMANY (ORIGINAL) KEYBOARD

    6-12 GERMANY (WEST) KEYBOARD

    B-15 GREAT BRITAIN KEYBOARD

    6-18 GREECE KEYBOARD

    6-21 ITALY KEYBOARD

    6-24 NORWAY KEYBOARD

    6-27 PORTUGAL KEYBOARD

    B-30 SPAIN KEYBOARD

    6-33 SWEDEN/FINLAND KEYBOARD

    6-36 SWITZERLAND FRENCH KEYBOARD

    6-39 SWITZERLAND GERMAN KEYBOARD

    6-42 USA ASCII KEYBOARD

    B-45 USA ASCII + BASIC KEYBOARD

    B-48 YUGOSLAVIA KEYBOARD

  • C-1

    C-2

    (-3

    ( -4

    HARD DISK AND DIS,(ETTE CHARACTERISTICS----,-------------_.. _-- - ..---- ---------_._-,,-.---

    TIlE HARD DISK UNIT

    CHARACTERISTICS

    DISKETTES

    CHARACTERISTICS

    D. DIAGNOSTIC/BOOTSTRAP ERROR MESSAGES---._-_.-------, --- .. _----- ----- - --"----,----

    0-1 DIAGNOSTIC ERROR MESSAGES

    0-4 BOOTSTRAP ERROR MESSAGES

    E. PCOS ERRORS

    E-1 INTRODUCTION

    E- 1 PCOS ERRORS

    F. GLOSSARY OF TERMS

    F- 1 GLOSSARY OF TERMS----.---.---_.-

    G. COMMAND INDEX

    G-l COMMAND KEYWORD INDEX

  • PART I

  • 1. INTRODUCTION

  • ABOUT THIS CHAPTER

    Thi" chapter provides a general introduction to the rlZO,

    CONTENTS

    INTRODUCTION 1-1

  • It,TRODUCTlON

    The Oli.vett.i Model 20 (1'120) is a stand-Glone system designed for profes-sional use as a proble~-solving tool. it has the versatility to helpthe businessman, the scientist~ -the student and the -technician to pro-cess information quic~ly and accurately.

    Processing power is provideo by a 16-oit Zilog Z8001 microprocessor inconjunction with read only and randonl access memory. Bulk storage isprovided by 5 1/4 in. floppy disks and (optionally) a 1/4 in. harddisk. A keyboard and alphanu~eric/graphic video ( in either its mono-cn(omatic 01- colour- ver"sion) serve for the user interface, enabling com-mands to be entered, prompts to ~e displayed. etc. Access to a range ofprinIers, oLher peripherals and ot~er computers is made possible VIaserial and parallel interfaces.

    The whole is managed by the Professional Computer Opera~ing System(PCOS) thus providing an environment for a set of programming tools Thatenable you to develop and run application programs. Programming facili-.ies include an extensive BASIC Interpreter and an (optional) Assemblerpackage comprising assembler, linker and program debugger. horeover theVideo File Editor enables programs written in BASIC or Assembler to becreated and ITIodified.

    The peas command li,Jrary comprises resident ana -::ransient comlTlanus.Optimum use of memory is assured by ~hc use of transient commands whic:lare autoi:'"J-::ically removed fror;] memory when no longer required. HOI,!€ver,the pces command library contains a group of commands that enable tran-sien~ cOITll,lands to be made resi.dent. A further group of corilillands en

  • 2. HARDWARE COMPONENTS

  • ABOUT TH1S CHAPTER

    This chapter describes the various har"dware components that make up theM20, Thev are discussed from the viewpoint of the function performed,the option~ available and the physical controls,

    CONTENTS

    r~A1N UNIT

    r~EMORY

    THE VIDEO DISPLAY UNIT (VDU)

    THE KEYBOARD

    LINE TERMINATOR KEYS

    THE CTRL KEY

    LOCKING THE SHIFT KEY

    LOG1CAL RESET

    ASSIGNING VALUES TO KEYS

    KEYBOARD BUFFER WARN1NG BUZZER

    PHYS1CAL RESET

    HARD D1SK AND DISKETTE DR1VES

    D1SKETTE HANDL1NG

    LABELLING D1SKETTES

    WR1TE-PROTECTION

    2-1

    2-2

    2-3

    2-4

    2-5

    2-5

    2-6

    2-6

    2-6

    2-7

    2-7

    2-8

    2-9

    2-9

    2-9

  • INSERTING AND REMOVING DISKETTES 2-11

    PERIPHERAL INTERFACES 2-12

    EIA RS-232-C SERIAL INTERFACE 2-12

    CENTRONICS-LIKE PARALLEL INTERFACE 2-12

    IEEE-488 PARALLEL INTERFACE 2-12

    PRINTERS 2-13

  • MA IN UNIT

    Fig. 2-1 The M20

    rigure 2-1 shows the location of the major physical components of theM20. It comprises a video display unit (UaU) and a main unit.

    The main unit houses the following components:

    the keyboard, comprising a standard alphanumeric keypad and an addi-tional lo-key numeric keypad for the rapid entry of numerical dataand arithmetic functions

    standard 5 1/4 in. floppy disk (diskette) drive and/or a hard diskunit

    (he cenTral processIng unit (CPU); a Z8001 microprocessor

    read-only memory (ROM)

    random access memory (RAM)

  • The back panel of the main unit is shown in Figure 2-2.

    RS-232-C (optional)TWIN SERIAL INTERFACE

    RS-232-CSERIAL INTERFACECONNECTION SOCKET

    J::::~;:l} L-JIL-TINTERFACE - , . ..••. 'E."'\""'I~.=1;;.;_f-1--CONNECTION \\SOCKET

    \CENTRONICS-LIKE \\INTERFACE L-. VDUCONNECTION CONNECTIONSOCKET

    ,~ig. 2-2 The Back Panel

    SOCKET

    QN/OFFSWITCH

    Figure 2-2 shows the location of the ON/OFF switch and the connectionsockets. The latt2r provide connection points for the video and forperipherals utilisinq the standard interfaces.

    MEMORY

    The amount of memory that your M20 has depends on the number and type ofmemory expansion boards installed. The minimum configuration is one mainmemory board (the ~other board) of 128K. Up to three 32K memory expan-sion boards or up to three 12BK memory expansion boards may be added.32K and 128K boards cannot be present in the same system. Four-coloursystems require at least One me~ory expansion board (either 32K or128K); eight··colour systems require at least 'cwo.

    The mother board can contain up to four 16K blocks l,f read-only memory(ROt1). The implemented version has 8K of ROM which contains sel f-testing diagnostics that are run on power-up, and the bootstrap loader.One block of RAi'l (161

  • HAR~WARE COMPONENTS

    the first two e)(pansion boards.

    ~ach 128:< me~ory expansion board adds eight blocks of RAM. Just as with32:< expansion boards, a four-colour systeln requires one 16~ blocl< from-::-he first expansion ooard for the V-lGea bit map, and un eight-colour5ys~em r2~Ulre5 one lbt~ blocl< from eacn of the first two expansion~joards The rer:laining Qlocks are added ·:~O the systeill meil1ory.

    The rnemory is logically divided into segmen'ts. Each call concainup to 4 blocks. This is due to the architectural gn of [he C?U toenable different software conlponents to occupy distinct areaS of memory.

    THE VIDEO DISPLAY UNIT (VDU)

    rlg. 2-3 The VDU

    There are two types of VDU available 'lith the 1120:

    black and white; providing regular and reverse video

    eight colour: supporting the display of up to eight colours: black,red, green, yello'l, blue, magenta, cyan and white. There are, ho,,-ever, two implemtations of ~his VDU: one in which a maximu~ of fourof these eight colours can be selected to be present at anyone time;or one in which all eight can ~e displayed at once. This depends onthe hardware present in the main unit

  • Either VDU enables you to select either a 512 x 256 or a 480 x 256 pixeldisplay; tha~ is, 256 scanlines of either 512 or 480 pixels, where theterm "pixel" is a contraction of lI picture elernent ll and llscanlinell is arow of pixels.

    The VDU can show up to 16 lines of 64 characters each, or 25 lines of 80characters each. It can also display graphic images.

    The VDU has a circular base on which it can be ro~ated and tilted to aviewing position which is comfortable for you. You ca~ also alter thebrightness of the images on the screen. This is done ':Jy adjusting thebrightness control thumbwheel situated behind the top of the screen andto t~e right, as indicated in Figure 2-3.

    THE KEYBOARD

    Fig. 2-4 The Keyboard

    The keyboard shown in Figure 2-4 is the USA ASCII keyboard. Your key-board may be "chat of another country, in which case the keyboard layoutwill be different. If so, you will find it described in Appendix 8. Thefollowing description, however, applies to all keyboards.

    The keyboard is divided into two sections: one for the entry of alpha-betic, numeric, and control characters; the other - the numeric keypad -for rapid entry of numeric data.

  • HHKUWP.Kt. LUl'lIUI'H:::I'l t.2J

    LINE TERMINATOR KEYS

    The /.-J/, /52/ anG /S1/ keys often serve the same function. Anyone ofthese keys can be used to complete a cOlnmand, a program statement t adata entry request? or a request for an immediate catculation.

    For brevity, these keys will subsequently be refered to as /CR/.

    In a BASIC program. ~lowever, you can test to oetermine which of thechree /CR/ keys was used in response to a da~a en~ry request. For someapplications this is a valuable feature - see the LTERM command.

    THE CTRL KEY

    The /CTRL/ key is always used in conjunction with other keys to addother meanings to existing keys.

    Break

    /CTRL/ /C/ activates the break facility and can De used to cancel a lineyou are curren~ly entering, or it can also be used to terminate mostsystem activities. When ICTRL! /el is used. -the characters "~C" appearon the screen and the PCOS prompt and the cursor move to the next line.

    Hiding What You Enter

    /CTRL/ /G/Thus youfeature is/CT RL/ /G/

    suppresses the display of subsequently entered characters.can enter some secret data or a password. Hide mode, as thistermed, remains in effect until either /CR/ is pressed oris pressed again.

    Deleting Characters and Correcting Errors

    /CTRl; /H/ performs a backspace function. That is, it deletes the lastcharacter entered and moves the cursor one position to the left. InPCOS, you use this facility to correct any error you spot in a linebefore you have pressed /CR/. Simply delete the characters back to thepoint of the error, and ther re-enter the rest of the line correctly.

  • 8-Character Tab

    ICTRLI III advances the cursor to the next eight-character tab posit10non the screen.

    Stopping and Starting a Listing

    ICTRL! /51 suspends the display of a text listing. To resume the listingafter scanning the screen for tile information you need, press any key.

    LOCKING THE SHIFT KEY

    The ICOMMANDI key is used with the bottom right-most key (/ 7 11 on theUSA ASCII keyboard) to provide a "shift lock" for the letters !I-Z. Afteryou press ICOHI

  • KEYBOARD BUFFER WARNING BUZZER

    When data is entared at the keyboard it is stored in a buffer which ,.subsequently read. In rare situations, however, it is possible that thebuffer will become full; that is, data has been entered fas~er than itis read. In sucb situations a buzzer will be heard (when the buffercontains 56 characters>, warning you that input I~ay De lost if you con-tinue to icey-in data.

    PHYSICAL RESET

    Physical reset has the effect of switching the power off and on agaIn.All system parameters are reset to their default values and the systemis re-initialised, including a set of diagnostic tests. (Note that log-ical reset, as explained above, does not rese~ all syste~ parameters,nelLher does it cause diagnostic tests to be performed,) See Chapter 5for details.

    The physical reset switch is located in the small hole on the right handside of the main unit. It is opera"ted by inserting a ball-point pen orpencil into the hole (see FIgure 2-5). A 'bleep' will be heard whencontact is made.

    Fig. 2-5 Physical Reset

    2-7

  • HARD DISK AND DISKETTE DRIVES

    Hard disk and diskettes provide the bulk storage mediu~ for informationon the ~120.

    cig. 2-6 The Diskette Drives

    Figure 2-6 shows an M20 having two diskette drives drive 0 on theright, drive 1 on the left. It also shows the position of the two indi-cator lights which tell you which drive is being accessed.

    Your M20 will not neccessarily have the configuration shown in Figure 2-6. In fact several combinations of disk and/or diskette drive are possi-ble. Yours will be one of the following:

    one 160 Kbyte diskette drive

    one 320 Kbyte diskette drive

    two 160 Kbyte diskette drives

    lwu 320 Kbyte diskette drives

    one (fixed) hard disk drive (drive 10 on the right) and a 320 Kbytediskette drive (drive 0 on the left)

  • HARDWARE COMPONENTS

    Two types of diskette can be used:

    160 Kbyte diskette (single-sided double-density)

    320 Kbyte diskette (double-sided double-density)

    But note that while both 160 and 320 Kbyte diskettes can be used on a320 Kbyte drive, only 160 Kbyte diskettes can be used on the 160 Kbytedrive.

    DISKETTE HANDLING

    Although diskettes are generally durable, damage to diskettes will beminimised if you take the following precautions:

    never bend diskettes

    do not touch the exposed surface of the diskette

    always keep the diskette in its cardboard envelope when not In useand store it in the oiskette carton

    ~eep dust out of the diskette drives by keeping the drive coversclosed when not in use

    LABELLING DISKETTES

    Every carton of diskettes contains a supply of self-adhesive labels faridentifying diskettes. It is good practice to write all relevant detailson the label before attaching it to the diskette. But if you do find itnecessary to write on the label after sticking it to the diskette, youshould avoid using sharp pencils or ball-point pens as this may damagethe surface of the diskette. In this case a felt-tipped pen is recom-mended.

    WRITE-PROTECTION

    A sheet of aluminised write~protect labels is provided with every cartonof diskettes. To apply write-protection simply fix an aluminised label

  • over the write-protect notch as indicated in figure 2-7.

    Fig. 2-7 Dis

  • INSERTING AND REMOVING DISKETTES

    A

    Fig. 2-8 Inserting a Diskette

    To insert a diskette you do the following:

    Open the drive cover by pulling it outwards. It will spring open

    B

    Insert the diskette into ~he slot with its label facing upward andnearest you (Figure 2-SA)

    Push the diskette gently into the drive until you feel it clIck intoposition. 00 not atte~pt to force it in; if it will no~ go, withdrawthe diskette and re-insert it

    Once the diskette has clicked into position, close the drIve cover(Figure 2-88)

    To remove a diskette you merely open the drive cover. This au·~oma·(icallvpushes the diskette out of the drive so you can withdraw.i! easily. .

    You can insert and remove diskettes while the M20 is powered up or withthe power off.

    DO NOT ATTEMPT TO WITHDRAW THE DISK WHILE IT 15INoUArORLTGHT ON). ATTEW"fINGTODOSOWIUAND IT MAY ~ROy-rHE INFOR~~TION-oN-rHr DTs~

    3Ems ACCESSED (DRIVECAUSEAN ERROR -COIWlnO;'

    2-11

  • PERIPHERAL INTERFACES

    A standard M20 provides the following interfaces:

    EIA RS-232-C Serial Interface

    Centronics-like Parallel Interface

    The following are optional.

    IEEE-488 Parallel Interface

    Twin EIA RS-232-C/20mA Current Loop Interface

    EIA RS-232-CSERIAL INTERFACE

    This standard 1/0 interface is offered on all M20 models to connect com-patible devices (plotters, paper tape readers and punChes, modemsetc ... ). It is programmable to correspond to baud rate (50 - 9600 baud),character length (in bits), presence or absence of parity, number ofSTOP bits in the data to be transmitted to or from the M20.

    For further details refer to "1/0 with External Peripherals User Guide".

    CENTRONICS-LIKE PARALLEL INTERFACE

    The M20 is fitted with this interface so that any compatible parallelprinter may be connected to it.

    To interact correctly with individual printers, the SFORM command allowsthe user to choose the desired print format.

    I£EE-488 PARALLEL INTERFACE

    This is an optional interface available on the M20.

    Once the IEEE-4BB driver is invoked by the IEEE command the M20 offersmost of the IEtE-4BB standard features to:

    readlwrite data from and to other devices

    assign 'talker'I'listener' status to other devices so that one talkermay transmit data to several listeners

    2-12 PCOS USER GUIDi:

  • receive service reques I conduct serial polls to identifyrequesting device and !~Si)ond with a user-programmed action

    transfer devices from 'remote l to 'loca l f control and vice versa

    act as controller and send commands -to any device

    the

    All these features are invoked by use of BASIC IEEE-4GB extension state-menTS.

    For further details refer to the 01 1/0 with E)(ternal Peripherals UserGuide".

    PRINTERS

    The M20 is compatible with a wide range of printers. These can be con-nected either via the Centronics-like parralel interface, or the RS-232-C interface. ror details of how to install and operate your particularprinter(s) consult the appropriate manual:

    PR 1450 Operator Gui de

    PR 1471 Operator Guide

    PR 2400 Dperator Guide

    PR 1481 Operator Guide

    fOR 2300 Operator Guide

    PR 430 Operator Guide

    ET 121 Operator Guide

    ET 231 Operator Guide

  • 3. SOFTWARE COMPONENTS

  • ABOUT THIS CHAPTER

    This chapter describes the PCOS-,elated software components of the M20.

    CONTENTS

    INTRODUCTION 3-1

    PCOS 3-3

    MEMORY OPTIMISATION 3-3

    RESIDENT AND TRANSIENT COMMANDS 3-4

    PROGRAMMABLE KEYS 3-4

    PROTECTION MECHANISMS 3-4

    LINE EDITOR FUNCTIONS 3-5

    REAL-TIME CLOCK 3-5

    ROUTING INPUT/OUTPUT 3-5

    BASIC INTERPRETER 3-5

    VIDEO FILE EDITOR 3-6

    ASSEMBLER

    LINKER

    PROGRAM DEBUGGER

    STANDARD INTERFACE HANDLERS

    PCOS COMMAND LIBRARY

    3-7

    3-7

    3-7

    3-8

    3-8

  • PROGRAMMING TOOLS 3-9

    PCOS CONFIGURING COMMANDS 3-9

    SET SYSTEM GLOBAL COMMANDS 3-10

    KEYBOARD-RELATED COMMANDS 3-10

    VOLUME HANDLING COMMANDS 3-11

    FILE HANDLING COMMANDS 3-12

    STANDARD INTERFACE HANDLING COMMANDS 3-13

    PCOS GRAPHIC FACILITY COMMANDS 3-13

    USER AIDS 3-14

  • INTRODUCTION

    The M20 software comprises a numoer ot ~ndepende t bu'~functional components. These can 02 ~onsidere to ~2user language and opera'~ing sys'~em (~22 ~igure -1)

    !SY5HM CA.LL If>HHfflLt

    closely related~hree levels:

    !I I I! EJ r-=I r:::li ""~UR' L:=.J LJL _

    Fig. 3-1 M20 Software Components

    3-1

  • The user level co~ponents are:

    immediate BASIC lines (that is, one or more BASIC statements or com-mands separated by colons), For example

    RUN "1: i'JEWFILE" /CR!

    It IS executed as soon as you enter !eR/

    BASIC program lines (that is. a line number followed by one or moreBASIC state~ents or commands separated by colons). For example:

    100 PRUJT "SIN of )( is": SIN (X) : IF X>2 THEN 1000 /CR/

    It is stored in memory as soon as you ente, /CR/

    ?COS commands. For example

    vf 1: /CR!

    Assembler and Linker comm~nds. These are special purpose PCOS com-mands (AS~1. C~ID and LINI

  • SOFTWARE COMPONENTS

    to which are passed user-specified parameters. These in turn gen-erate System Calls

    The System Calls. These are system routines which allow access tothe drivers of the M20 hardware components, and perform operationssuch as moving strings of bi~s into memory, activating pixels on thevideo, reading characters from the keyboard, opening or closing afile, writing strings of characters to a file, etc.

    PCOS

    The M20 has its Professi.onal Computer Operating System (PCOS) to manage:

    interaction with the CPU, memory, keyboard, diskette (and/or harddis:,) drives and the "DU

    interaction with any connected perip~erals through the four possiblestandard interfaces

    Centronics-like parallel interface suitable for a range ofprinters

    CIA RS-232-C se.ial interface suitable for access to peripheralsor compute rs

    EIA RS-232-C twin serial interface (as an option) for access toRS-232-C and/or 20mA Current Lcop peripherals and/or computers

    1[EE-488 parallel interface (as an option) suitable for access toother talkers and listeners such as counters, heat sensors, signalgenerators and measuring instruments

    handling of the real-time clock for all timing functions includingdate and ti me

    HE~~RY OPTIMISATION

    The M20 has a system of memory optimisation which is handled dynamicallyby allocating memory according to need and usage.

    Memory optimisation is achieved by:

    using transient commands which are executed and then removed

    creating and then purging all temporary pcas tables

    using the global command SBASIC to set resource level according torequirements of the application package and user program

    For details of how to examine your particular memory configuration refer

    3-3

  • to the DCONFIG command in Chapter 13.

    RESIDENT AND TRANSIENT COMMANDS

    In an attempt to maximise user nlemory space, only three commands arealways loaded into me~ory when the system is initialised. They cannotbe removed from ~emory. These commands are:

    ?LOAD - used to load transient comrnands into memory

    PUNLOAD - used to remove PLOADed commands from memory

    LTERh - used in a BASIC program to differentiate a~ong thethree line ter~inator keys /.J/, 151/ and 152/.

    The remaining commands are transient and can be executed then removedfrom memory. However, these commands can also remain in memory by meansof the PLOAD command, and can become permanently resident by use of the?LOAD and PSAVE commands (see Chapter 6).

    PROGRAMMABLE KEYS

    Any key or key struck in combination with the /CTRL/, /COMMANDI or/SHIFTI key can have a special meaning assigned to it. This may be aBASIC or PCOS command, an expression, a constant, or any group of char-acters that may be found useful to have at the touch of a single keys-troke or key combination. Assignment IS made using the PI(EY command,and can be made a permanent feature by means of the PSAVE command (seeChapter 6).

    PROTECTION MECHANISMS

    PCOS offers the following protection mechanisms:

    volume password protection using the VPASS command such that the pro-tected volume cannot be accessed ~ithout knowledge of the password

    file password protection using the cPASS command such that thecorresponding file cannot be accessed without knowing the password

    file write-protection using the FWPROT command to inhibit writing Lothe specified file(s)

    For further details, and for information about other H20 protectionmechanisms, see Chapter 8.

    3-4 PCOS USER GUIDE

  • SOFTWI\R:: CmiPO:~ElnS

    LINE EDITOR FUNCTIONS

    peas offers line editor functions to:

    ~aCkS?aC8 (by pressing /CTRL/ /H/ simulcaneously)

    cancel the current line (by pressing /CTRL/ /(/ simultaneously)

    hide what you enter (by pressing /CTRL/ /G/ simultaneously)

    REAL-TIME CLOCK

    The CPU includes an o5cill~tor that generates a clock pulse every 50 msused to strobe the real-time clock. The real-time clock provides theuser vJith >che local time in the 150 24~hour format ofhours:minutes:seconds (for e.a~ple. 25:59:59 for one second to midnight)and the date in the format of month/day/year (for example. 12/01/32 for1st December 1982). Note that the date format is month/day/year onlyfor the USA keyboard versions; for all other national keyboards the dateformat is day/month/year. The internal calendar keeps track of days,months and years provided you set the time and date at switch-on usingthe SSYS command. The real-time clock stops at switch~off or physicalreset, but not on logical reset.

    ROUTING INPUT/OUTPUT

    The ~i20 normally expects to receive inpu'c from the keyboard and sendsoutput to the screen. However, pcas enables both inout and output to beredirected to other device5 connected to the ;·120 by 5pecifying "devicere-routing pararneters ll , This can be done in two ways:

    in a command line; \,Ilere they \,i11 only be effectiv~ for the commancin questir"Jn

    by themselves; thus remaining in effect for all subsequent commandsuntil they are changed, or until the system is re-initialised

    For more details about device re-routing parameters see chapter 7.

    BASIC INTERPRETER

    The BASIC Interpreter allows you to create, debug, and executB 3ASICLanguage programs. The comprehensive instruction set includes sophisti-cated graphics facilities and special features for logical control ofthe IEEE-48B interface.

    3-5

  • The instruction set is composed of commands and statements.

    Statements are preceded by line numbers and grouped to form BASIC pro-grams, which can then be executed. The user can halt the execution of aprogram, issue BASIC commands, and return to program execution withoutdestroying the program variables. The 3ASIC statements include the fol-lowing fea~ures:

    prograril segmentation through CHAHHNG and COI'H',ON areas

    abilicy to CALL and EXECUTE Assembly Language routines and PCOS com-mands

    simple but powerful control statements (FOR/NEXT. GOTD, IF/GOTD.If/THEN, ON/GOTO, WHlLE/WC:ND, IF /THEi~/aSE, IF/GOTO/E~SE, O,~ERROR/RESUrIE j'JEXT, GDSUB, ON/GOSUB)

    effective character string handling

    powerful print/display formatting statements

    Predictable Error handling (O~ ERROR etc.)

    IEEE-48B control statements

    sophisticated graphics statements

    For details refer to the "f'IZO BASIC Language Reference Guide".

    VIDEO FILE EDITOR

    The Video File Editor enables you to create and edit files of text,where a text file can be a file of nor~al text or a program written inany programming language.

    The VDU displays a 21 line window of text which can be moved up or downwithin the file. Editing functions are entered from the keyboard andinclude

    line and general editing functions. These include facili~ies to

    move the cursor around the screen

    inser~ text either as a new line between adjacent lines or withinan existing line

    dele~e text either one line at a time or one character at a time

    recall a deleted line

    delete a block of text and restore it elsewhere

    3-6 peDS USER GUIDE

  • spli~ and join lines of tex~

    window moving functions. These enable you to move the window up ordown ~he fi Ie

    exit and save func,tions. These enable you to:

    save the edited tex~ and exit the editor

    exit the editor without saving the edited text

    save the edited text without exiting the editor

    search functions to search the file for a specified string

    a subset of "~l'i9h-level" commands. These commands enable you to:

    move the window to a specified line in ~he file

    delete blocks of tex~

    suspend processing of ~he current file and invoke the editor onanother fi Ie

    .or furt~er details see Chapter 12.

    ,\SSE~18LER

    The (optional) ~120 Asser,lb18i is invoked by the ,l\5~1 command. It j"Jrocessesan Assembly Language source file of ASCII text and produces an objectfile containing 28000 machine code. Op~ionally. a listing file can beproduced. This displays ~he source file program lines along wi~h thegenerated coce.

    For details refer eO the "Assembler L

  • programs.

    For details refer to -;::he "Assel-,lbler Lanyuage User Guide".

    STANDARD INTERFACE HANDLERS

    peGS contains two communica"cions packages to manage input!ou·~put \oJithperipherals anc/or computers via the built-in RS-222-C in~erface the(optional) t"in RS-232-C in·cerface, and the (opcionalJ E:=~-~88 parallelinterface. User interaction is via a group of peas commands that enableBASIC pro~rams to communica~e via these interfaces. These commands are:

    IEEE "hich loacs ·L~e IeEE-48B extension package

    - RS232 \lhich loads the RS-232-C interface package

    - SCD~l~i l"h i ch sets the protocol for an RS-232-C por::'

    C1 ,.hich provides a BASiC interface \·!ith J~he RS-232-C driver

    For detai Is refer to ·the "I/O "i·ch External Peripherals Use'" Guide".

    pcas COMMAND LIBRARY

    This section lists the peDS commands in functional groups.the full mnemonic and the tCio-character short form. Theshortest form that peDS ,.i 11 recogni se as a keyword. Th isin chapter 4.

    For details of a particular command see chapter 13.

    It 1i sts bothlatter is the1S explained

    3-8 peDS USER GUIDE

  • PROGRAM~llI% TOOLS

    :(::Yi·;Or::)

    S:10RTFORi'!

    cULLi'i:'~:: ~'iO :'! Ie

    as :~lsr'l. Cil 1D Runs 7:he Assel,'blor

    ba 3ilSlC. U1D Loacs che 8f,S 1 C Interpreter-

    ed ~D~T. Ci"iD Loads :he Video File Edicor

    hd :Iour,;p. eI~O ?rints a fi Ie 1n hexadecimal notat ion

    Ii LINi(. ChD Runs C.:12 l- i,iker

    ml r'IL ;.8. CI'l:J Crea'i:es a library of object files

    pd IJ DE3UG,.JAV Loads e:he Prograr" Debugger

    ~d TEXTDUi'iP. enD erints a texc file

    -Table 3-·1 Programming Tools

    peos CONFIGURING COMMANDS

    :(EYWORO

    SHORT "", , eor"iliAND "UNCTIOi~j-VLLFOR~I ~vii~E t·1D ;'J 1C

    pI PLOAD Loads cOrilfTIanGS(residen~)

    pr PRUel.Cm Reloacs an operating system

    ps PSAVE. em Saves PCOS

    pu PUrJLOAD Unloads comr,l

  • SET SYSTEM GLOBAL COMr1ANDS

    KEYWORD

    SHORT FULL COM~'IAND FUrKTIOilFORI'I MiIEi'iOiHC

    so SBASl(.Cm Sets the GASIC environment

    sc scm'i",.OID Sets the RS-232-C communications PortEnvironment

    SG SDEVlCE.eMJ Changes device names

    sf SFORrl. e[liD Se-i:s t;,e printer environment

    sl SLAllG. Cf'ID Sets '~he national !

  • )U;-- I WAKe LUIVII-'UNti\J I)

    VOLUME HANDLING COMMANDS

    i,EYWORO

    SHORT FULL COI'lMAND FUNCTIOn~o j~~'l r'lr·jEi'iONIC

    bv BVOLUh::. Ci"O Searches the va IUr;le directory, ie"'i:.urns freedis~ space, or returns the name of che curren:.va lur,le (from BASIC only)

    va VALPHA. C~1D Alohabetises a directory

    vc VCOIOY.010 Copies a volume (drive ~o dri.ve)

    vd VDtPASS.OI) Rer:lOve5 a password from a volume

    vf Vi'D ,qr'lA T. nr,D Forrna-:::s a va lume

    vI VL1ST.Cm Lis ts a volume directory ( full form)

    vm V:',OVE. SAV Copie 5 a volume {using one drive)

    vn VrJEI'. CI'~D Initialises a volume

    vp OJ? A55 . Ci'10 Ass i gns a password to a vo lUr;le

    vq VQUIC!(.cr1D Lists a volume direc~ory (filename only)

    vr VRENAi'iE. (f1D ~enames a va lume

    vv VVERli'Y.CMO Checks the hard disk for faulty blocks

    -Table 3-5 Volume Handling Commands

  • FILE HANDLING COMMANDS

    I([YWORD

    SHORT FULL comww FUNCTIONFORM t·1NHiONIC

    fc FCOPY.OlD Copies a file

    fd FDEPASS.Ct·'I) Removes a password from a fi Ie

    ff FF REE .UlD Frees unused file sectors

    fk F:

  • STANDARD INTeRFACE HANDLING COMMANDS

    :CYVJOiW

    SHOPTF~RM

    :'ULL[\'I['~Ei\'IO:-~1 c

    C1. S;.\V

    ~SZ3Z .SAV

    lEEc488. sr,v

    Provides he D,~5IC in~ei-f3ce ~o t~e RS-232-Cori ver"

    Loads ,he RS-23Z-C packageJ.ers '----------'Table 3--7 Standard In~erface Handling Co~rJands

    pcos GRAPHIC FACILITY COMMANDS

    KEY,JORD

    SHORTcORM

    FULL~ltjE~lOIHC

    la LABEL. OlD Displays a label string

    Is LSCREal. CMD Prints the displayed text

    rf RFONT. CI'ID Creates an ASCII font matrix file from thecurrently active font

    sp SPRIIH.OiD Prints the text an~ graphic con~ents of aspecified window

    Makes a font ma~rix file ac~ive

    Table 3··8 peDS Graphic Faci lity Comillands

    3··13

  • USeR AIDS

    1(i:YlJORD

    S't',ORT FUll eOi'l~1ANO FUIKTlOflFOrl;'j ~INEI'iONle

    co (OnhANDS. D~ S Displays details abou ....:: peos cOlllf,lands

    de DCO:'FiG. em Displays "he hardware and/or memory configurati

    ep :'?R"TJ'n.SAV Displays error messages

    he H'=:lP.8AS ?rovides a series of display frames as a guideto uSIng peas

    -

    Tajle 3-9 User Aids

    3-14 peas USER GUIDE

    on

  • 4. ENTERING A COMMAND

  • ABOUT THIS CHAPTER

    This chapter describes the format of a PC OS command, and the syntax usedby this manual to describe the PCOS commands. For detailed descriptionsof the commands mentioned in this chapter refer to Chapter 13.

    CONTENTS

    NOTATION CONVENTION

    COMMAND SYNTAX

    COMMAND NAMES AND KEYWORDS

    PARAMETERS

    DEFAUL T VALUES

    RESIDENT AND TRANSIENT COMr~NDS

    COMMAND SEARCH PROCEDURE

    FILE AND VOLUME IDENTIFIERS

    WILD CARDS

    NO INTERACTION FLAG

    4-1

    4-2

    4-3

    4-3

    4-5

    4-5

    4-5

    4-6

    4-10

    4-10

  • NOTATiON CONVENTION

    peos commands are represented using syntax diagrams, in which:

    the keyword, written in its short form (using the first two charac-ters) in lower case letters, is enclosed in an oval

    parameters are enclosed in rectangles

    punctuation 1 single characters and drive nur~bers are enclosed in cir-cles

    flow lines connecting the aoove mentioned elements indicate anyoptions which can be taken. Furthermore, a loop indicates any ele-ments that may be repeated

    The following table shows some examples of the use of syntax diagrams.Note in particular the use of the flow lines.

    No. RULE

    A fork indicates a choice:one of the two paths mustbe followed in the direc-tion of the arrow.

    For example, when a drivenumber has to be specifiedyou can enter one of

    o - drive 0

    - drive

    or

    10 - if you have a hard disk

    An empty branch or a by-passindicates an optional element.

    In the example the file iden-tifier in the PCOS commandIJASIC is optional

    EXAi'1PLE

    4-1

  • 3 A loop indicates that the para-meter may be repeated at leastonce.

    For example, in the FLlST commandthe file identifier ~ay be repeat-ed several times using a comma asa separator

    COMMAND SYNTAX

    The general for~at is defined as follows:

    Fig. 4-1 General Format of a PCOS Command

    Where

    SYNTAX ELm::NT

    keywo rd

    parameter

    4-2

    MEANING

    a mnemonic that specifies the command to be executed

    1 parameter to the command defining the commandcction. The number of parameters depends on thecommand executed but must be in the range 0 to 20

    iJCCS USER GUIDE

  • tNJt~LN6 A LUMMANU

    Remarks

    A comrlland may be entered over one or more lines (up to 256 charac:::ers)and terminates with the first occuri"enCe of a feR!.

    A space may alternatively be used as the parameter separator eKceptI,oJhere nil parallleters (see the section on "Parameters") are specified.

    COMMAND NAMES AND KEYWORDS

    A command name comprises d mnemonic string of up to 14 alphanumericcharacters (the first of which must be a letterl, optionally including aperiod and an extension. pcas commands can have one of the followingextensions; CMD, SAVor BAS. for example, BASIC.CMD. These extensionsserve a purpose that will become evident in the following sections.

    The keyword can be entered in either upper or lower case and mustcomprise at least the first -:=wo characters of the command name. Forexa mp Ie

    ba /CR/

    basic /CR/

    basic. cmd /CR/

    will execute the command named BASIC.CMO.

    Standard pcas commands and user-written Assembly language programs areboth executed in this way. For details on the latter refer to the"Assembler Language User Guide".

    PARA~lETERS

    Parameters are user-selected strings of alphabetic characters and ofintegers which can be optional. They are recognised by their position inthe command line. The different types of parameter are described below:

    4-3

  • PARA~IETER TYPt

    integerparameter

    stringparameter

    nil parameter

    4-4

    MEANING

    a decimal integer, or a hexadecimal integer (up tofour characters) preceded by an "&" (ar,lpersand).

    For example 10U,

    a string of alphabetic characters. Upper and lowercase are interpreted differently. Leading and trailingquotation marks (either single or double quotationmarks) are optional except where the string containsany of the following characters:

    + (plus)& (ampersand)SPACE

    (double quotation mark)(single quotation mark)(comma)

    In which case the string must be el closed in quot-ation marks. If the string contair,s a single quot-ma rk ('), then it must be enc losed in doub Iequotation marks, and vice versa. The syntax diagramsindicate when it is necessary or useful to includequotation marks. For brevity single quotation marksare always indicated

    a parameter that does not have a value specified inthe command line. Such parameters assume defaultvalues. Nil parameters can be designated in one of twoways depending on their position in the command line:

    before the last specified parameter. Such nilparameters are designated by a comma, with nopreceding information. For example

    la 'title'" ,5,2 /CR/

    has two ni 1 parameters after 'title'. Thesewill assume their default values.

    after the last specified parameter. In thiscase nil parameters are not entered. Forexample

    la 'title' /eR/

    has four nil parameters after 'title'. All ofthese will assume their default values

    pcas USER GUIDE

  • devicere-routingparameter

    a parameter that re-routes input/output to specifieddevices or files. These are recognised by a "+" or a"_II sign as the first character.

    For example +dprt

    DEFAULT VALUES

    cor detai Is refer to chapter 7

    Default values are automatically assumed whendetected.

    nil parameter is

    Parameters which are governed by global commands (SBASIC. SSYS, SFORM,SCOMM, SLANG and SDEVlCE), assume default values in the absence of anycommand. If a global command has been executed then the values speci-fied by it are assumed by the system from then on until a new globalcommand changes those values or until the system is re-initialised. Inthe latter case, the default values are again assumed.

    RESIDENT AND TRANSIENT COMMANDS

    There are only three resident commands; PLOAD, PUI~LOAD and LTER~I. Thesecommands can never become transient. All the other commands are tran-sient. Any transient command can be made resident, but the teChnique fordoing this depends on the command file extension; that is, whether thecommand has a CMD or SAV extension. The former require the PLOAD commandto make them resident, while the latter become resident simply by exe-cuting the command. Once a command has been made resident it remains sOuntil the end of the current working session (that is, when the systemis switched off or a physical or logical reset is performed), whereuponit becomes transient once again. Such commands, however, can be madepermanently resident by means of the PSAVE command (see Chapter 6).

    COMMAND SEARCH PROCEDURE

    When a command is entered, PCOS will first search RAi1 for the firstresident comrnand that matches the characters entered. If found, the com-mand is executed.

    If no command is found in RAM then both drives are searched startingwith the last drive selected, for:

    1. A transient command with a CMD extension. If such a command is found,it is loaded into RAM, executed, and subsequently removed from RAM

    4-5

  • 2. A transient command with a SAV extension. If such a command is found,it is loaded into RAM, and executed. However, it is not removed fromRAM. This means that the command can be used again even if thediskette it resides on is removed from its drive

    3. A transient command with a BAS extension. If found the M20 will loadthe BASIC Interpreter, enter into BASIC execution mode, and run thefile with the BAS extension

    4. If a command cannot be found an error message (ERROR 92) is issued

    FILE AND VOLUME IDENTIFIERS

    A disk may contain one or more program and/or data files.file, however, may not extend beyond one disk.

    A single

    A grouiJ of files stored on the same diskette or disk forms a "volur"e".Each file and each volume has an identifier. Each file name must beunique on anyone volume. Saving a program file which already exists ona volume causes the original file to be overwritten.

    You may assign an identifier to a file either by an OPEN statement (datafiles), or by a SAVE command (program files), or by an FNEW, FCOPY,FMOVE, FRENAME or EDIT command.

    You may assign an identifier to a volume by a VFORrIAT, VNEW, VCOPY,VMOVE or a VRENAME command.

    4-6 PCOS USER GUIDE

  • CI'l I Ct"ll;l,;I J->. I..-VrWIJ->.I'lU

    drive number

    file tl..'SSWo'':.1

    volume identifier

    fi Ie identi her

    1+0=1Fig. 4-2 File and Volume icentifier

    SYNTAX EL:::~1Eln

    va lume name

    MEANHIG

    the name of a volume. This name must be a stringof up to 14 printable ASCII characters (forillegal characters see "elow). The firstcharacter cannot be numeric.

    To selec~ a specific volume in a peDs or BASICcommand or in an O~EN s~atement you must specifya volume name or a drive number.

    The volume nalne ,orelle drive nurnbe,') lilay oe fol-lowed by a volume password. At the end of a volumeidentifier a colon mus~ be entered. For example

    fp VOL1/vpass:myfile,newpass /eR/ ...

    4-7

  • dr i ve nu mber

    fi Ie name

    4-8

    Here VOL1 is a volume name and vpass is thevolume password, myfile is a file name andVOL1 :myfile is a file identifier.

    Note: When specifying a file or volume identifierin a BASIC statement or command you must eitherinclude the identifier in a pair of quotationmarks or write a string variable or a stringexpression whose value is the identifier. Whenspecifying a file or volume by name in a PCOScommand you need not include the quotation marks.~or example

    SAVE "VOL1 :FILE1" /CR/ (in BASIC)vn VOL 1: /CR/ (in PCOS)

    the drive number Qay be either 0 or 1 for adiskette, or 10 for a hard diskFor exafilple

    flist 1 :FILE002 /CR/

    Here 1; indicates that file FILE002 resides on thedisk inserted in drive 1

    the name of a file, which must be a string of upto 14 printable ASCII charpcters (see below),optionally including a file extension. It mustinclude at least one non-numeric character or beenclosed in quotation marks.

    To select a file in a PCOS or BASIC command or inan OPEN statement you must specify the file name.The file name may be preceded by a volume ident-ifier and followed by a (file) password.For example

    ba 1:MYPROG/MYPASS /CR/

    IF YOU DO NOT SPECI~Y ANY VOLUME IDENTIFIERBE~ORE THE FILE NAME, THE SEARCH IS LIMITED TO THELAST SELECTED DRIVE.

    The file extension is a string of up to 12 print-able ASCII characters, preceded by a period (.).(For illegal characters see below.)

    1. filename.extension cannot exceed 14 char-acters in total

    PCOS USER GUIDE

  • fi le passwordOR

    volume password

    Illegal Characters

    2. The extensions BAS, CMD and SAV havespecial meanings

    the password to the file or volume. It must be astring of up to 14 printable ASCIl characters(for illegal characters see below).

    Passwords give the user protection at volume orfile level (see below). They may be enteredafter a volume name, a drive number, or a filena',le and preceded by a slash. For example

    fl O:"~file/newpas5 /CR/

    However, when assigning a password (using VPASSor FPASS) it is preceded by a COmma as it doesnot yet form part of the identifier parameter.For exarilple

    fp 1:F1LE111,NEWPASS /CR/

    in this case the password NEWPASS is assigned to~he file F1LE111 resident On the disk in drive 1

    The following table indicates the characters that may not be included ina volume name, fi Ie name, or password.

    = (equals) - (minus sign) + (plus sign)(comma) (colon) " (double quotation mark)

    \ (backslash) / (51 ash);, (asterisk) (question mark) /SPACE!# (hash or pound)

    or any control character

    Table 4-1 Illegal Characters

    Note: The asterisk (*) and the question mark (?) may also be used in afile name in certain commands but with a special meaning (see the sec-t i on "Wi ld Ca rds").

    4-9

  • WILD CARDS

    The 1\~20 supports two "wild card" characters, ·che asterisk ("') , and thequestion mark (?); which can be used in a file name to specify a groupof file names.

    An asterisk (,,)

    A question mark (?)

    Examples

    v{r .crnd

    ???? . ,"(

    represents any string of characters ofany length (including no characters)

    represents any character. That is, itmust ma~ch one, and only one, character

    specifies all file names startingwith "v" and with the extension cmd

    specifies all files with a fourcharacter file name, withan eXLension of any length

    Wild cards can be used In fi I e identi hers with the fo llowing commands:

    FCOPY FDEPASS FFREE Fin LLFLIST FPASS FUNPROT FUPROTVLlST VQUICK

    NO INTERACTION FLAG

    The execution of PCOS commands often involves interaction with the userafter the command has been entered (that is, after !CR! is pressed). Insome cases the video displays the result of the command. For example

    if you enter

    sb !CR!

    then the H20 displays the current values of the SBASIC command parame-ters. That is, no further interaction takes place. But in other casesinteractive messages ask the user whether the process is to continue inone way or another. For example

    4-10 PCOS USER GUIDE

  • ENTERING A ca~11~M~D

    if you enter

    fk 1 : V" /CR/

    then the MZa Viill display all the file names star~ing Viith "V" one byone, asking the user whether the file is to be deleted or not. In eachcase the user r.lust ~"ey in an answer 1 I'y" for yes or "nil for 110.

    All this interaction and message display can be suppressed by specifyingthe "no interaction flag" (%n) immediately after the comr"and keyword.For example

    if you enter

    fk %n,1 : V" /CR/

    then all the file names beginning with "V" are deleted from the diskinserted in drive 1, and no messages are displayed.

    This facility allows pcasmessages, to be calledneed for interaction withpreserve the screen image

    commands, Vihich normally displayand executed from a BASIC program

    the user. It can also be verywhile executing various commands.

    interactIvewithout the

    useful to

    4-11

  • J.1"l.ILMLl.')MILUI~ f'\1'lU LMPd'l0il'll.J t.i"V1KVI'~I·It.I'.lI:::>

    M20 ENVIRONMENTS

    The M20 can be operated in four distinct environments:

    PCOS

    BASIC

    Video File Editor

    ?rogra~ Debugger

    In each envlron~ent the M20 responus cO the keyboard in a different way.

    This section outlines the ~odes of operation in each of the environmentsand how you pass from one environment to another. The modes of PCOS aredescribed in detail in the next section as are the techniques for pass-ing from one PCOS mode to another. BASIC modes are fully described inthe "BASIC Language Reference Guide". The modes of oi>eration within theVideo File Editor are aescribed in Chapter 12. The Program Debugger isdescribed in the "Assembler Language User Guide".

    peas

    In this environment you can:

    enter PCOS co~mands

    execute PCOS commands

    BASIC

    In this environment you can:

    enter and edit BASIC immediate and program lines

    execute BASIC immediate and program lines

    invoke PCOS commands and Assembler subroutines using CALL or EXECstatements

    VIDEO FILE EDITOR

    In this environment you can:

    5-1

  • 5. INITIALISATION AND

    CHANGING ENVIRONMENTS

  • ABOUT THIS CHAPTER

    This chapter describes the operational modes of the M20 and the initial-isation process.

    CONTENTS

    M20 ENVIRONMENTS

    PC OS

    BASIC

    VIDEO FILE EDITOR

    PROGRAM DEBUGGER

    CHANGING ENVIRONMENTS

    MODES OF PCOS

    5-1

    5-1

    5-1

    5-1

    5-2

    5-2

    5-6

    COMMAND MODE 5-6

    EXECUTION MODE 5-7

    CHANGING MODES 5-7

    STANDARD INITIALISATION 5-7

    INITIALISATION FILES 5-8

    NON-STANDARO INITIALISATION 5-9

    INITIALISATION FOLLOWING A PSAVE COMMAND 5-10

    INITIALISATION FOLLOWING A PRUN COMMAND 5-10

  • THE INITIALISATION FLOWCHART

    BEGINNING AND ENDING A WORKING SESSION

    5-11

    5-14

  • create and edi" text files (including programs written in AssemblyLanguage)

    create and edit BASIC program files

    PROGRAM D~BUGGER

    In this 8nviron~ent you can:

    enter debugging commands

    execute debugging commands

    CHANGING ENVIRONMENTS

    The following are the only possible changes of environment:

    from PCOS to BASIC

    from BASIC to PCOS

    from PCOS to the Video File Editor

    from the Video file Editor to PC as

    from PCOS to the Program Debugger

    from the Program Debugger to PCOS

    That is, you cannot enter either the Video File Editor or the ProgramDebugger from BASIC; you cannot enter BASIC or the Program Debugger fromthe Video File Editor; neither can you enter the Video File Editor orBASIC from the Program Debugger.

    5-2 PCOS USER GUIDE

  • The following figure illustra~es the possible changes of environment.

    PI-lOGRAMD'HuGU.R

    Fig. 5-1 MZO Environments

    5-3

  • From pcas to BASIC and Vice Versa

    IF the M2D is in. "

    pcas

    PCDS

    pcas or BASIC

    PCDS or BASIC

    BASIC

    5-4

    AND you enter .. ,

    ba ! CR!

    a file name with theextension BAS

    OR

    the BASIC commandwith a file ident-ifier as a parameter

    !CTRl! !RESET!simultaneously(logical rese'c)

    physi ca I reset

    SYSTEM !CR!

    OR

    the SYSTEM command isencountered duringexecution of a BASICprogram

    THEN ...

    the M2D enters theBASIC evironrnent

    the M2D enters theBASI Cenvironment andexecutes th~ specifiedprogram

    the system is re-initialised but withoutrunning diagnostics

    the system is re-initialised anddiagnostic tests areperformed

    the system returns tothe pcas environment

    PCOS USER GUIDE

  • 1.1'1.1 LMLL.JMI1Vl~ ..... nu LnAiH;llllj\,j t.HV1KUI'lj'lci'llJ,j

    From pcas to Video File Editor and Vice Versa

    IF ,'120 is in ... AI~D you enter ... THEN ...

    pcas ed file the 1"120 enters theidentifier /CR/ Video File Editor

    environment forworking on ·'he speci-fied file. If thefile already existson the va lume specifiedby ~he file identifier(or on the last accesseddrive if no volume isspecified In the fileidentifier), then it isloaded into user memoryIf not, the file isis created

    Video File /CTRL / /6/ the ~120 saves the~di"tor simultaneously. current text fi Ie and

    [·Jote: /6/ must be exi'cs the Video rileentered from the top Editor. (See noterow ali'hanumeric below. )section of the key-boa rd

    Video File /CO~II'lAf'm/ /6/ if text has beenEditor simultaneously. changed the ed i tor wi 11

    Note: /6/ must be pror,'pt you to confirmentered from the the abort. To do thistop row alpha- you filUSl: pressnumeri.c secti on of /CO~WIAND /6/ again,the keyboard upon which the ~120

    exits the Video FileEditor without savingthe current text fi Ie.(See no'te be low.)

    Note: It is possible to work on more than one file without exiting theVideo File Editor. If you want to exit the editor using /CTRL/ /6/ or/COM~~ND/ /6/, you must first return to the file that was specified whenthe editor was invoked (by using /CTRL/ /6/ or /COMMAND/ /6/).

    5-5

  • Fro~ PCDS To Debugger and Vice Versa

    l( r'ILO is in . .. AND you enter . .. THEN ...

    PCDS pd fi Ie indenti fer the r·120 enters the!CR! Progcam Debugger for

    working on the programcontained in thespecified fi Ie

    Prograr" Debugger q !CR! "he 1'120 exits -\::heProgram Jebugger and,-e-curns control to peDS

    r~ODES OF peos

    PCDS has two modes

    command mode (for entering peDS commands)

    execution mode (for executing PCOS commands)

    COMMAND MODE

    When the M2D enters this ~ode ic displays the PCDS prompt (n> - whererefers to the drive number) and the cursor ( • ).

    In this mode you can enter PCDS commands. For example

    fc D:MYFILE,l:YDURFILE /CR!

    While entering a PCDS com~and there are two line edit functions avail-able. These can only be performed before /CR! has been entered. If you

    press !CTRL/ !H/ (simultaneously) then the last character is deleted

    press !CTRL/ !C! (simultaneously) then the entire line is deleted

    Furthermore, subsequent characters can be rendered invisible by pressing/CTRL/ !G!. To return to visual mode you must press !CTRL/ !G! again or!CR/.

    5-6 PCDS USER GUIDi:

  • EXECUTION MODE

    In this mode peas executes the command that you nave j us::: entered. Themode is entered when ICRI is pressed.

    The user can interrupt execution and return to command mode by pressingICT~LI lei. Having done so it is not possible to resume execution of theinterrupted command. You must ie-enter the comflland.

    On completion of cOrilmand execution peDs returns 'La COI11Lianci mOde.

    CHANG ING MODES

    The following table sur,ll,larises how to pass from command rnode to 8)(eCU-tion mode and vice versa.

    1:- the mo IS 1 n ... and ... TIi:: I~ ...

    PCOS command mode you enter a PCOS PCOS passes into exec-comrlland (terminating ution r.lodewi"i:h ICR/)

    PCOS execution mode you enter ICTRLI IC/ where possible thecommand being exec-uted is aborted andPCDS returns tocommand mode

    PCOS execution mode the cOfilmand execution PCOS retur ns to commandIS cor,'pleted mode

    I

    STANDARD INITIALI5ATIO~

    Initialisation takes place when you switch the machine on, or perform aphysical reset. First of all diagnostics are run. These diagnostic testscheclc that the hardware is functioning correctly. Any faults are indi-cated by messages on the screen (see Appendix D). The diagnostics take afew seconds to run. On completion you will hear two tbeeps·. If, duringdiagnostics you press any of the keys ILl, 10/, IFI, 151, or IBI then anon-standard initialisation takes place (see next section). Otherwise,

    5-7

  • the initialisation is standard and proceeds as described below.

    A logical reset (/CTRL! /RESET!) also causes initialisation, but withoutdiagnostics.

    After diagnostics the boot-strap loader searches the drives for a Ifboot-able" file. This file must be the first file on the volume and must alsobe of a certain format.

    The boot-strap loader first checks the hard disk (drive 10) for a boat-able file and loads it into RAN if found. If unsuccessful, an error mes-sage is issued and the boot-strap examines diskette drive 0 and againtries to load a boatable file into RAM. If still unsuccessful, thesearch is repeated on the second diskette drive (drive 1 - if fitted).The loaded file is then executed.

    If the above procedure has been unsuccessful in finding a boatable file,then the following boot-strap error message is displayed on the screen

    Insert system disk and type any key

    You must then insert the system diskette into an available drive, hitany key and the first file will be loaded into memory and executed. Ifit is a standard system diskette then the loaded file is named PCOS.SAV.

    Note: Initialisation resets global parameters to their default values(these are the parameters managed by the Set System global Cor.lfilands).An exception to this, however, is that the system date and time parame-ters are not reset on logical reset.

    INITIALISATION FILES

    Once the keyboard is initialised, peos sLarts a search on both drivesfor an initialisation File. This file can be named IIH1.OID, INlT.S.W orINIT.BAS (in upper or lower case).

    The file names are searched for in the following order:

    INI T. e~ID

    UHT.SAV

    li~IT. 3AS

    If no initialisation file is found then the system enters PCOS commandmode. The effect of an initialisaLion file, however, is as follows:

    ll~ I1. (['10This file can contain any program in machine language (for example aPCOS command) which is to be executed at initialisation. It can becreated by saving the program in question in a file called INIT.CMD.If it exists in any of the two drives, the file is automaticallyloaded into RAM by PCOS at initialisation, executed and then purged

    5-B PCOS USER GUIDE

  • 1-

    INITIALISATION ANO CHANGING ENVIRONMENTS

    from RAM. Subsequently, the system remains in the peDS environmentand waits for you to enter a PCOS command at the keyboard

    rrnT.SAVThis file has the sar"e characteristics as UnT.Cm. It is onlyloaded into RAM if INIT.CMO does not exist. Moreover, when it isloaded, the program is executed but not purged. It remains in RAMfor the rest of the current session. After INIT.SAV is executed, thesystem remains in t~e peas environment and waits for you to en~er aPCOS command at the keyboard

    IN IT . BAST:ris file can contain any BASIC program to be run at initialisation.To create an INIT.BAS file you can save the program in questionspecifying the file name to be INIT.BAS. (This can only be done from',he BASIC environment.) If li'1IT.BAS exists, and neither HHT.Criu norINIT.SAV exist, then the BASIC In',erpreter and INIT.BAS ai'e IQadedinto RAM by PCOS at initialisation. On encountering the extensionBAS, the M20 enters the BASIC environment and the program fileINIT.BAS is run. What happens after INIT.BAS is run depends on theprogram itself.

    liote tlH:: INIT.BAS must reside on the same volume as BASIC.G1D andaASIC.A3S

    NON-STANDARD INI TlAL ISATlON

    The initialisation process can be modifiec by pressing one of the keysILl, 10/. IFI. IBI or lSi while the power-up diagnostics are still run-ning. Each of these options is described in the following table:

    IF, duringpower-up diagnosticsyou pre ss

    ILl

    THEN., .

    the system loops on diagnostics indefinitely.Its effect can be cancelled by

    - pressing one of the keys 10/. IFI, IBI orlSI. in which case the corresponcing non-standard initialisation process isper formed

    - hitting any key other than ILl. ID/, IFI,181 or lSi, in which case initialisationcontinues as if ILl had not been pressedin the first instance

    5-9

  • IDI

    IFI

    Is;

    IS;

    the system loops indefinitely on disk drivediagnostics, repeatedly reading track zerO fside zero of the first ready drive

    the boot-strap loader examines the disketcedrive before the hard disk drive when lookingfor a boatable file

    the syster., passes directly into BASIC commandmode without attemp-ting to execute anyinitialisation file

    the system passes directly in~co peas commandmode without executing any initialisation file

    INI TlALlSATlOI; FOLLOWING A PSAVE COMMAlm

    The PSAVE command saves the current operating system then reboots thesystem from the same file.

    INITIALISATION FOLLOWING A PRUN COMMAND

    Following a PRUN command the bootstrap loader searches the drives in thesame order as for a standard initialisation, but looks for a file (con-taining the operating system) specified by the parameter to the PRUNcommand~ This file may be anywhere on diskette or hard disk, that is,it need not be the first file on a volume.

    The message

    Invalid File Error (xx) on drive (x)

    is produced after each drive has been searcheo and either the specifiedfile has not been found, or the specified file has been found but is notbootable.

    No diagnostic tests are performed.

    5-10 peos USER GUIDE

  • THE INITIALISATION FLOWCHART

    The following figure summarises the initialisation process - both stan-dard and non-standard - by means of a flowcharL

    5-11

  • 5-12

    !4

    •o

    * if iii is pressed dpower-up d' urin]~' lagno~~'.rlUl the disk' -, lOSsearcherl ., _.r ette ish . Jerore~hard-disk. ' e

    II

    I

    4>"' !" I i

    - I'

    "i II'.c,. )1 \~•.... "' .:;) i

    _______[~~'l: J _?COS USCcR GUIDi:

  • Fig. 5-2 The Initialisation Flowcha~t

    5-13

  • BEGINNING AND ENDING A WORKING SESSION

    The follo~"ing table sUliimarises the ways in \lJhich a working seSSIon canbe started and terminated.

    IF the ~120 is ...

    swi tched off

    switched on (in anyenvironment)

    in the PCOS, BASICor Video ,=i IeEditor environment

    5-14

    and you ...

    switch on the i120 bypressing the ON/O~Fswitch on the jacl<pan e 1

    perform a physicalreset by pressingthe physical resetbutton located downthe right hand sideof t~e Inain unit

    perform a logicalreset by pressing/CTRL! /RESET /

    TH::: ~~ ••.

    power-up diaqnos~icsBrld initialisationfollow, after whichthe boot-stra? loaderaLte~pt5 to load abootaole file. Ifsuccessful a new worK-ing session iscomr:lenc ed

    the current workingsession is terminated.?ower-up diagnosticsand iniLialisationthen follow afterwhich the bootstraploader attempts toload a bootable file.If successful, a newworking session iscomli1enced

    the current workingsession is termin-ated, after which astandard initial is-ation (but withoutdiagnostics) ispedo rmed. If aboatable file can beloaded, the 1'120passes into the PCOSenvironment and a newwor~ing session 1SCOrTHllenCea

    PCGS USER GUIDE

  • 6, CONFIGURING PCOS

  • ABOUT THIS CHAPTER

    This chapter describes how to customise PCOS to meet your own needs.This is, how to make transient commands resident, how to assign func-tions to keys and how to change the system global parameters. Forfurther details of the commands mentioned in this chapter refer toChapter 13.

    CONTENTS

    INTROOUCTION

    MAKING TRANSIENT COMMANDS RESIDENT

    ASSIGNING STRINGS TO KEYS

    CHANGING SYSTEM GLOBAL PARAMETERS

    6-1

    6-1

    6-5

    6-6

    SETTING THE SYSTEM GLOBAL ENVIRONMENT 6-7

    DISPLAYING AND MODIFYING DEVICE NAMES 6-11

    MODIFYING THE BASIC ENVIRONMENT 6-13

    SETTING THE ENVIRONMENT FOR AN RS-232-C COMMUNICATIONS PORT 6-15

    SETTING THE PRINTING ENVIRONMENT 6-15

    RECONFIGURING THE KEYBOARD LANGUAGE 6-19

    SAVING A CUSTOMISED PCOS 6-20

  • INTRODUCTION

    PCOS contains facil ties that enable you to modify the standard PCOSconfiguration suppl ed by Olivetti on your system diskette. The possiblechanges fall into tree catagories:

    making transient co~r.lands resident: Tha-:: is, transient commands thdtyou expect to use frequently, or that you will require after removIngthe system di skette. These may be standard peas commands, or commandsthat you have written yourself using the Assembler pac!(age. (See the"AsseJ71bler Language Usei- Guice;')

    assigning functions to keys: for exar~ple a frequently input sequenceof instructions can be assigned to a key, thus enabling a complexfLinction to ~e performed a~ a single ~ey 5t~oke

    changing system global parameters: for example to change the systemdate and time, increase 3ASIC memory. accom~ociate a different type ofpr i nte r l etc.

    In this way you can create an operating system that is tailored to yourspecific needs.

    The changes you make to your operatIng system become semi-permanentthat iS 7 for the dura:ion of the current working session (until youswitch off the syste~ or perform ei-ther a logical or physical rese-t)unless you choose to mai,e t.hem penlanent jy saving your newly-configuredoperating syster,,- How 1:0 do this is described in the section "Saving aCusTomised PCOS".

    Note: A further way of altering the state of your system at initialisa-tion is by ineans of an initialisation file. If such a file is presenton an enabled volume, it will be loaded and executed at initialisationto automatically perforl'1 functions 'l:hat you always require at initiali-sation (see Chapter 5).

    Note: Thisresident,modify theany order.

    chapter fils-~ tells you how to rllake transiem: commandsthen how to assign functions to !(eysr and afterwards haw tosystem global ~arameters. These may, however, be performed in

    MAKING TRANSIENT COMMANDS RESIDENT

    Once the standard PCDS is booted, three comrcands are loaded ",ith peDS.These are:

    PLOAD - used to load transient commands into me~ory

    PUNLOAD - used to re~ave a co~mand franl memory; that is, one that haspreVIously been ~ade memory resident by use of the PLOAD

    COmmand. This can only be used for ca~mand5 that areunlc3dable; that 15 all except ell R5232, IEi:E, EPRINT,

    6-1

  • LTERM -

    VMOVE, PDEBUG, PLOAD, PUNLOAD and LTERM

    used in BASIC to distinguish between the use of the threeline-terminator keys: /..-J/, /Sl/ and /S2/

    The M20's memory now comprises the peDS Nucleus which includes theresident commands (PLOAD, PUNLOAD and LTERM) and user memory as shown ini-igure 6-1.

    peas

    NU~ LEUS

    PERMANEfIlTL Y

    RESIDENT COMMANDS

    (PLOAD,PUNLOAD,L TERM)

    USER

    MEMORY

    Fig. 6-1 M20 Memory after Initialisation of a Standard PCOS

    All commands other than PLOAD, PUNPLOAO AND LTERM are transient and fallinto two categories:

    those with extension CMD : lJhen you enter such a command it is loadedfrom the system dis~ette or hard disk, executed, then removed frommemory. Using a transient command in this way takes much longer thanusing a command that is already in the M2D's memory. Furthermore, ifPCDS resides on disketce, this must be inserted. It is often neces-sary to have some such cq,mmands memory resident. To do this requiresthe PLOAD co~~and

    those with the extension SAV : When you enter such a command it isloaded from the system diskette or hard disk into memory, executed,then remains in memory for the remainder of the cur rene working ses-sion. Subsequent access will not require the command to be reloaded.Furt:'ermore, onCe executed the cOffililand can be used again after the5yste~ diskette has been removed. It is, therefore, not necessary to

    6-2 peDS USER GUIDE

  • use the PLOAD command unless you need to remove the system diskettebefore the command is first executed

    Commands with the SAV extension are:

    BVOLUMi: - for enabl ing a BASIC program to use the "Search"ana "DiskFree '; system calls or to obtain thename of the current volume

    Cl - for programming the RS-232-C and current loopinterface from BASIC

    ~PRINT - for dis?laying PCOS error messages

    IEEE - for loading the (optional) IEEE-488 package

    PDEBUG - for entering the program debug environment

    RS232 - for loading the RS-232-C interface package

    V~10V~ - for copying diskettes on a single drive system

    Example

    1f you enter

    pI vc.pa !CR!

    then PCDS searches the drives, starting with the last volume accessed,for a command file with the short form "vc". VCOPY.OID is found, loadedinto user memory, and information concerning the command is displayed onthe screen. For example

    Disk file name vcopy.cmdProgram name Volume Copy Rev. 2.xOperation Mode Segmented! Systemr·la in entry = 'oB88C; In i t entry --None--j\lemory allocated:

    Block r~o. %00; Starting address = %388C; Size = %04FA

    PCOS then looks for l:he command fi Ie with the short form "pa". Sincethis does not exist,~he error message

    Error 92 in parameter 2

    is displayed.

    If you then enter

    ep 92 !CR!

    PCOS searches theEPRINT.SAV, loads

    drivesit into

    for thememory

    correspor.ding command, findsand executes it. The result is a

  • display of the PCOS error message 92 as follows:

    ERROR 92 ---- command no~ found

    That is, the command short form :l pa ll does not exist.

    Since the EPRlNT command has the SAV extension it re~ains in se~i~permanent ~emory after execution and ~herefore fur~her reduces userr~emory.

    The ef'~ec~ on memury caused by t:le addition of t:lese two commands 15illustrated in Cigure 6-7.

    peasNUCLEUS

    PERMANENTLY

    \;ESIDENT COMMANDS

    (PLOAD~PUNLOAD~L TERM)

    USER

    MEMORY

    peasNU·:LEUS

    PERMANENTLY

    RESIOENT COMMANDS

    (PLOAD ,PUNLOAD ~L TERM)

    SEMI-PERMANENT

    MEMOR'I ARH(VCOPY, EPR!NT)

    USER

    MEMORY

    Fig. 6-2 r'120 Hemory after ~laking two Transient Comands Semi-?erma"ent

    The exact amount by which user memory is reduced by the addition of theVCOPY and EPRlNT commands can be deter~ined using the DCONFIG command.

    For each command that is loaded, user memory is reduced ~y the size ofthe command file (see the VLIST command) plus 40 bytes.

    Making Commands Permanently Resident

    Commands that are loaded into semi-permanent memory can be made per-manent by means of the PSAVE command as described in the section "Savinga Customised pcas".

    6-4 pcas USER GUIDE

  • ASSIGNING STRINGS TO KEYS

    Any key on the keyboard (except /5HIFT/, /CTRL/, /COMMAND/, /RESET/,/51/, /521, MO I~/) can have its value changed by means of the PKEYcommand. The new value can simply be another key value, for exa~ple keyA becomes key B, or the key can have a string assigned to it which canperform a function that can be entered from the keyboard. The key keepsits new value for 'the remaindel- of the current wor~ing session.

    It is normal practice to use the ICTRL! or ICOi'1I1AND/ key in conjunctionwith other KP.YS when assigning values. In this way the original funtionof the key is not des~royed.

    The key assignment is recorded in selni-perr~anent memory area and there-fore ~educes user me~ory. ~ach programrnable key defined ,-equires thespace for the s-cI"ing (1 byte pei" charac~er) plus one byte ,0 hold 'eheleng-ch of the string. One further byte may also be required if it isnecessary to make the string address fallon an even bouncary. Further-~ore. if more than 26 key assignments are made, a further 156 oytes will'Je requirec.

    You can specify the key either by enclosing the actual key~oard charac-ter in quotation mar:(Sl or by specifying "the ASCII code (in decimal orhexadecimal) generated by"tha~ key. For example, on the USA ASCII key-board

    '3'

    66

    &42

    all refer to the same key.

    Similarly, the string(s) to be assigned to the key can be specified aseither actual key values enclosed within quotation marks, or the ASCIIcode of each cJlai'actGr~ or a combination of the two. ,':01 exai.lple

    I ba ',13 ,&A

    is a valid string representing 'ca' followed by a carriage return and aline-feed,

    Example

    Suppose that you want to enter the PASIC Interpreter and execute thestatement FILtS simply by pressing key ICTRLI 1'1/ (on the USA ASCIIkeyboard) simultaneously. Do this by entering

    pk &tl, 'ba', 13,10, 'files', 13, 10 ICR/

    Where £1 is the (hexadecimal) ASCII code normally generated by pressing

    6-5

  • ICTRL! 1!1/.

    On subsequently pressing ICTRLI lill, PCOS "ill display 'ba', execute itby entering a carriage return (13) and a line feed (10), display, files' ,chen execute the BASIC command FILeS by entering another car-riage return / line feed pair.

    The assignment "ill require the following memory space:

    1 + 11 ~ 12 bytes

    and ~he effecc on M20 memory will 02 as sho~n in Figure 6-3.

    co ~os

    NU(LEJS

    PERMANENTLY

    RESIDENT COMMANDS

    (PLOAD,PUNLOAD,L TERM)

    SEMI-P[RMANENT

    MEMORy AREA

    (veopy, EPRINT)

    USER

    MEMORY

    prosNUCLEUS

    PERMANENTLY

    RESIDENT :OMMANDS

    (P'_OAD,PUNLOAD,L TERM)

    SEMI-PERMANENT

    MEMORY AREA

    (veopy, EPRINT)SA eR LF FILES (R LF

    USER

    MEMORy

    Fig. 6-3 The Effect of a PKEY command on M20 Memory.

    Strine assignments madr in this manner are valid up to the end f thecurrent working session. ;0 make such assignments a permanent fea ure oflele operacing system you must use the PSAVE command as described n thesection "Saving a Customised PCOS".

    CHAiJGING SYSTEM GLOBAL PARAMETERS

    The standard PCOS configuration contains system global parameters withdefault values already assigned to them. However, the PCOS commandlibrary contains a group of commands that enable you to modify cheseparameteis to suit your needs. The commands are:

    6-6 PCOS USER GUlDi:

  • - Ssys.cm for setting the system global environment. Forexample, setting the system date and time

    . SDEVIC~.01D - for displaying or modifying the device namecable; that is, a table ~hat lists the currentnames assigned to the hardware configureddevices

    - SBASIC.CMD - for set~ing the BASIC environment

    - SFORrl.cr'JD - for specifying the printer type and printingstyle

    - SCOhr';.UID - for specifying '(he environmenc for devicesconnected via the RS-232-C interface

    - SLANG.CND - for simulating the keyboard of another coun~ry

    SETTlNG THE SYSTEM GLOBAL eNVIRONMENT

    If, after initialisation from a standard PCOS, you enter the SSYS com-mand, the f'120 will display the default values of the system globalenvironment parameters. That is, if you enter

    ss ieR!

    then the M20 will respond with a display as follows

    Date 01/01/1982 Time ~ 00:00:01 Disk VerifyExtent size ~ 8 Display ~ 0 (64 x 16)

    Each parameter is described in turn below.

    Date

    o (Off)

    This parameter specifies the system date. Its' value can be any actualdate since 1899. It comprises month, day and year separated from eachother by a date separator, where:

    month is any integer value in the range 01 to 12

    day is any integer value in the range 01 to 28, 30 or 31 depending onthe month

    year is any integer value in the range 1900 (or 00) to 1999 (or 99)

    date separator is any legal name-printable character

    (On keyboards other than the USA ASCII and USA ASCII with BASIC theorder is day, month, year)

    6-7

  • The default value is 01/01/1982

    The system date is incremented jy PCOS whenever the value of the Timeparameter is incremented from 2~:59:59 to 00:00:00.

    The Date parameter is used in date-dependent programs. That is, it canbe interrogated from BASIC usin0 the BASIC OATES function. For Example:

    DISPLAY

    100 IF OATES="04/30/82"THEN 3000

    500 DATE$="05:06:82"

    Time

    COf.1MENTS

    state~ent 100 checks t:12 date.

    sta~ement 500 sets the date and alsochanges the date separator.

    fJo"te: it 15 not necessary ~.:o specifythe year in full. The last two digitsare sufficient

    This parameter specifies the syste[~ time. Its value is maintained Inhours, minutes and seconds separated by a ti~e separator, where:

    hours is any integer value in the range 00 to 23

    minutes is any integer value in the range 00 To 59

    seconds is any integer value in the range 00 to 59

    time separator is any legal name-printable character

    The time paran"leter assumes its default value (00:00:01) at systemswitch-on and upon physical reset, but not upon logical reset. It isthen incremented until either you switch the syste~ off or perform aphysical reset.

    The time parameter can be interrogated from BASIC using the BASIC THIESfunction for use within "time-dependent programs. ~or example

    6-8 PCOS USER GUIDE

  • DISPLAY

    600 PRHH TIME$

    700 TlI'IC:$="07:40:1S"

    Disk Verify

    tXPL~.NATlON

    statement 600 displays the time.

    statement 700 sets the time

    This paranleter determines whether or not verification is to ~e performedfollowing a diske~te (or hard disk) I/O operation. Its possible valuesare:

    - verification on

    o - verification off

    When verification is on, data that is written to a dis:cette (or harddisk) is subsequently read and checked. If an error is detected then themessage

    ERROR 57 --- disk i/o error

    is displayed.

    The default is "0" - no verification.

    I~ote: With Disk Verify on, the disk access time is slowed dOvin signifi-cantly.

    Extent Size

    This parameter specifies the number of seceors to be allocated to a filewhen an output operation requires ~ore space. Its value must oe aninteger in the range 1 to 1087. A lesser value wastes less space at theend of the last extent to be allocated but may require more extents tobe allocaced. Conversely, a larger value will result in more wastedsectors at the end of the last extent allocated, but will reduce thenumber of extents that need to be allocated.

    6-9

  • The default is "8".

    Display

    This parameter determines the number of characters per display line andthe number of lines per screen. Its value ~ust be one of

    o - for a 64 character by 16 line display

    - for an 80 character by 25 line display

    The default is "0" - 64 by 16.

    Using the SSYS Command to Modify the System Global Parameters

    For exa~ple, if you enter

    ss 12/12/82,09:30:00, ,,1 /CR/

    then the system date is changed to 12 Decefober 1982, the system time isstarted from 9:30 a.m., the Disk Verify and Extent Size paramecersremain unaltered, bu~ the Display parameter is changed to generate an 80by 25 display. M20 responds by displaying the new parameter values asfollows

    Date = 12/12/1982Extent s:ze = 8

    Time = 09:30:00 Disk VerifyDisplay = 1 (80 x 25)

    o (of f)

    Note that when entering the Date parameter it is not necessary to enterthe year in full, the last two digits are sufficient. When exa~iningthe parameter value, however, all four digits will always be displayed.

    Making the Changed Parameters Permanent

    Any changes made to the Disk Verify, Extent Size and Display parametersremain until either they are respecified using another SSYS command, orthe current working session is ter~inated. In the latter case thesepara~eters revert to their default values. The Date and Time parametersare continually incremented until the system is either physically resetor switched off, upon which they too revert to their default values.Note, however, that logical reset has no effect on the Time and Dateparameters.

    All modified parameters can be made permanent by means of the PSAVE com-mand as described in the section entitled "Saving a Customised PCOS".

    6-10 PCDS USER GUIDE

  • DISPLAYING AND MODIrYING DEVICE NAMES

    After initialisation from a standard PC as you can examine the devicename default values via the SDEVlCE command. That is, if you enter

    sd !CR!

    then the device name table will be displayed as follows:

    Device I'Jar:Je Typecons: R!Wprt: Wie ee: R!oJcom: R!WcOr:J1: R!l,com2: R!W

    The device names are listed along with their device type. The latter isan indication as to whe~her the device can only be written to, only readf,oQ~ or whether bo~h read and write operations are possiJle.

    The entries in the table have the following meanings:

    cons;

    This is the default device name for the pcas console driver (video andkeyboard). It is a read and write type of device.

    prt;

    This is the default device name for the printer driver. It isonly type of device.

    Ieee:

    write

    This is the default device name for the IE

  • already been loaded by means of ~he R5232 com~and.

    coml:

    This is the default device nar.1e for 'the first expansion RS-232-C commun-ications port. This entry will not be ciselayed unless ~he RS-232-Cextension paci

  • sd !CR/

    then the updated device na~e table will be displayed.

    Making Changed Device Names Permanent

    The ne" device names en~ered using "~he SDEVICE command rernain in eff