Zenith Z-100 Series User manual

Zenith Z-100 Series User manual

Regulatory and Registration Information

WARNING - This equipment has been certified to comply within the limits established for a

Class B computing device, pursuant to Subpart J of Part 15 of the rules established by the

FCC. Only peripherals (computer input/output devices, terminals, printers, etc.) certified to comply within these Class B limits may be attached to this computer. Operation with non-certified peripherals is likely to result in interference to radio and TV reception.

This equipment generates and uses radio frequency energy for its operation; and if not properly installed and used, that is, in strict accordance with the instructions in this manual, may cause interference to radio and television reception. It has been type-tested and found to be within the

RF emission limits for a Class B computing device which is intended to provide reasonable protection against such interference in a residential environment. However, there is no guarantee that interference will not occur in any particular environment or location. If this equipment does cause interference to radio and television reception, which can be determined by turning this equipment on and off, try to correct the interference by one of more of the following measures.

Move the computing device away from the equipment receiving the interference.

Relocate the computing device with respect to the receiver.

Reorient (turn) the antenna of the receiving equipment.

Plug the computing device into a different AC outlet so that the computing device and

• receiver are on separate circuits from the fuse or circuit breaker box.

Disconnect and remove any input/output cables that are not being used since unter-

minated input/output cables are a potential source of high RF emission levels.

Unplug and remove any serial input/output circuit board cards that are not being used since unterminated cards can be a potential source of interference.

Make sure that the computing devices are plugged into grounded outlet receptacles.

Avoid using AC two- to three-wire cheater plugs. Lifting or removing the power cord ground may increase RF emission levels. Removing the ground circuit also may cause a lethal shock hazard to the user.

If you need additional help, consult your dealer or ask for assistance from the manufacturer. You may also find the following booklet helpful: How to Identify and Resolve Radio-TV Interference

Problems. This booklet is available from the U.S. Government Printing Office, Washington, DC

20402, stock number 004-000-00345-4.

Registration

To receive the full benefits of your warranty, complete and mail the accompanying registration card. Also, record the series and serial numbers of your equipment below. Refer to these numbers in any correspondence you have with Zenith Data Systems regarding this equipment.

Model

Series

Place purchased ____________________________________________________________

Any attempt to alter or modify the design, or to use this device in a manner other than described in this manual, will void the warranty and release the manufacturer from any responsibility for its operation.

Z-100 Series

Computers

User's Manual

LIMITED RIGHTS LEGEND

Contractor is Zenith Data Systems Corporation of St. Joseph, Michigan 49085. The entire document is subject to Limited Rights data provisions.

RESTRICTED RIGHTS LEGEND

This computer software and documentation are provided with RESTRICTED RIGHTS.

Use, duplication or disclosure by the Government is subject to restrictions is set forth in the Governing Rights in Technical Data and Computer Software clause – subdivision (b)(3)(B) of DAR 7-104.9(a) (May 1981) or subdivision (b)(3)(ii) of DOD FAR

Supp 252.227-7013 (May 1981). Contractor/Manufacturer is Zenith Data Systems

Corporation, or Hilltop Road, St. Joseph, MI 49085.

Copyright 1982, 1985 by Zenith Data Systems Corporation.

Printed in the United States of America.

Zenith Data Systems Corporation

St. Joseph, Michigan 49085

Welcome

Congratulations on your purchase of the Zenith Data Systems Z-100 Series

Computer. The Z-100 microcomputer represents a truly state-ofthe-art design, capable of satisfying both your business and personal needs.

With the Z-1 00 Computer - the All-in-One model or the Low-Profile model - the future is here today. The Z-100 Computer can act as a simple tool or function as the heart of a powerful and expandable business automation package.

Combined with Zenith Data Systems software, your new Z-100 Computer can easily provide the practical and affordable solutions to your business problems. It can easily satisfy a variety of business applications, such at data processing, telecommunications, networking, and financial analysis to aid you in making those all-important business decisions.

This User's Manual has been prepared for you, the new computer owner and user. Welcome to computing at its best and accept Zenith's assurance and commitment that the quality goes in before the name goes on.

iii

iv

Preface

This User's Manual is divided into four sections for easy use:

• Operation - The beginning section tells you how to set up your new Z-100

Computer. Then you will turn it on and be introduced to the keyboard and controls. You will learn about disks and how to use a special demonstration disk. And finally, there is a section on what to do if you have a problem with your computer.

• Disk Operating System - This chapter will help you understand and use your computer. In addition, it will show you how to make extra copies

(called "backups") of the information stored by your computer.

• Computer Programming and BASIC - Here you will be briefly introduced to the world of programming and learn how to give instructions to your computer in BASIC, one of the most popular computer "languages."

• Appendices - This last section contains reference material that you may find informative. It also contains step-by-step disassembly and assembly information that replaces the equivalent instructions in the installation manual included with any accessories you may purchase for your computer.

You will want to become familiar with your computer's many features.

This manual will help you get the most out of your new Zenith Data Systems

Z-1 00 Computer.

v

vi

Contents

Welcome

Preface

Chapter 1

Your Computer System

Setting Up

Back Panel

Power Connection

Keyboard

Alphabetic Keys

Nonalphabetic Keys

Other Keys

Disk Drives

Disks

Disk Care

Power Up

Z-100 Demonstration Disk

Introduction

Master Menu

Artwork

Interactive Business Graphics

In Case of Difficulty

Service Information

When You Call for Help

Chapter 2

Introduction

The Monitor Program

Autoboot

The Commands

B – Boot

C – Color Bar

H – Help

S – System

V – Version

Loading MS-DOS

The MS-DOS Prompt

Making A Backup

Backups

Backing Up Your Disks the First Time

Labeling Disks

vii

Disk Operating System

2-1

2-2

2-2

2-3

2-4

2-5

2-6

2-7

2-7

2-8

2-11

2-11

2-11

2-12

2-14

iii

V

Operation

1-1

1-3

1-3

1-7

1-8

1

-

8

1-9

1-10

1-13

1-15

1-18

1-19

1-20

1-20

1-22

1-22

1-23

1-26

1-29

1-29

MS-DOS Control Key Functions ........................................................................... 2-16

MS-DOS Commands ............................................................................................ 2-19

Changing MS-DOS Prompts ............................................................................ 2-19

Error Messages ................................................................................................ 2-20

Files, Programs, and File Names ..................................................................... 2-21

Internal Commands .......................................................................................... 2-22

COPY ........................................................................................................ 2-23

DATE ........................................................................................................ 2-24

DIR ............................................................................................................ 2-24

Wild Cards ................................................................................................. 2-26

Multiple Directories .................................................................................... 2-27

ERASE (DEL) ............................................................................................ 2-32

RENAME (REN) ........................................................................................ 2-33

TIME ......................................................................................................... 2-33

TYPE ........................................................................................................ 2-34

VER ........................................................................................................... 2-34

VERIFY ..................................................................................................... 2-35

VOL ........................................................................................................... 2-35

Other Internal Commands ......................................................................... 2-36

External Commands ......................................................................................... 2-36

CH KDSK .................................................................................................... 2-38

FORMAT ................................................................................................... 2-39

SYS ........................................................................................................... 2-43

DISKCOPY ................................................................................................ 2-43

DISKCOMP ............................................................................................... 2-45

Other External MS-DOS Commands ......................................................... 2-47

Chapter 3 Computer Programming and BASIC

Programs .................................................................................................................. 3-1

Program Types ......................................................................................................... 3-1

Programmers ............................................................................................................ 3-2

Programming Languages ......................................................................................... 3-2

Syntax ................................................................................................................ 3-2

Language Types ................................................................................................ 3-3

Understanding BASIC ............................................................................................... 3-6

Getting Started with BASIC ................................................................................ 3-6

Loading BASIC ................................................................................................... 3-7

BASIC Modes of Operation .......................................................................... 3-8

Statements .................................................................................................. 3-9

Direct Mode Operation ................................................................................. 3-9

Variables ................................................................................................... 3-11

Variable Types .......................................................................................... 3-11

viii

Programming in BASIC ........................................................................................... 3-12

Using the Indirect Mode of BASIC ........................................................................... 3-12

Saving and Loading Programs ................................................................................ 3-14

Designing a Program .............................................................................................. 3-15

Program Purpose .................................................................................................... 3-16

Breakdown .............................................................................................................. 3-17

Detailed Steps ......................................................................................................... 3-17

Conversion ............................................................................................................. 3-19

Summary ................................................................................................................ 3-26

Appendix A

Appendix B

A Glossary of Commonly-Used Computer Terms

Symbols and Codes

Appendix C Monitor Program Command Summary

The Monitor Program Commands ............................................................................. C-2

Boot ......................................................................................................................... C-2

Color Bar .................................................................................................................. C-4

Dump ....................................................................................................................... C-4

Examine ................................................................................................................... C-5

Fill .............................................................................................................................C-5

Help ......................................................................................................................... C-6

Input ......................................................................................................................... C-6

Output ...................................................................................................................... C-6

System .................................................................................................................... C-7

Test .......................................................................................................................... C-7

Version ......................................................................................................................C-8

Execute .....................................................................................................................C-8

Appendix D MS-DOS Command Summary

Command Summary .................................................................................................D-1

Commands ............................................................................................................... D-2

MS-DOS With Single Drive Computers .....................................................................D-8

Appendix E BASIC Command Summary

BASIC Commands, Functions, and Statements ........................................................E-5

ix

Appendix F System Configuration

The CONFIGUR Utility .............................................................................................. F-2

Display 1 ............................................................................................................ F-3

Display 2 ............................................................................................................F-4

Display 3 ............................................................................................................ F-5

Display 4 ............................................................................................................ F-6

Display 5 ............................................................................................................F-7

Display 6 ............................................................................................................ F-8

Display 7 ............................................................................................................F-9

Display 8 .......................................................................................................... F-10

Display 9 .......................................................................................................... F-11

Display 10 ........................................................................................................ F-12

Display 11 ........................................................................................................ F-13

Display 12 ........................................................................................................ F-14

Display 13 ........................................................................................................F-14

Display 14 ........................................................................................................F-15

Display 15 ........................................................................................................ F-15

Display 16 ........................................................................................................ F-16

Display 17 ........................................................................................................F-16

Display 18 ........................................................................................................F-16

Display 19 ........................................................................................................ F-17

Display 20 ........................................................................................................F-17

Printer Configuration ...............................................................................................F-17

Appendix G Changing Hardware Configuration

Disassembly ............................................................................................................. G-1

All-in-One Model ............................................................................................... G-2

Low-Profile Model ............................................................................................. G-6

Final Disassembly ........................................................................................... G-10

Reassembly ........................................................................................................... G-12

All-in-One Reassembly ................................................................................... G-14

Low-Profile Model ........................................................................................... G-18

Switch S101 ............................................................................................................ G-22

Floppy Disk Controller DS1 Switch Settings ........................................................... G-24

Video Board Jumpers ............................................................................................ G-26

Appendix H System Specifications

x

Appendix I CP/M-85 Disk Operating System

Appendix J Using Z-89 Software on the Z-100

Transfer Procedure One ............................................................................................ J-2

Equipment Needed ................................................................................................... J-2

Transfer Procedure .........................................................................................................

J -3

5.25-inch Source Disks ............................................................................................. J-4

8-inch Source Disks .................................................................................................. J-5

Transfer Procedure Two ............................................................................................ J-6

Equipment Needed ................................................................................................... J-6

Transfer Procedure ................................................................................................... J-6

Transfer Procedure Three ......................................................................................... J-8

Equipment Needed ................................................................................................... J-8

Transfer Procedure ................................................................................................... J-9

Convertible Software ............................................................................................... J-11

Magic Wand Function Key Guide ............................................................................ J-14

Appendix K

Interactive Business Graphics

Introduction ...............................................................................................................K-1

The Interactive Business Graphics Program .............................................................K-1

The Data Management Routines ..............................................................................K-3

Create New Data File ................................................................................................K-3

Modify Existing Data File ...........................................................................................K-6

Print Existing Data File .............................................................................................K-8

Graphic Design Routine ............................................................................................K-8

Displaying the Graph ..............................................................................................K-12

Appendix L

Backups

Using the DISKCOPY Utility to Make Backups .......................................................... L-1

Using the FORMAT and COPY Procedure to Make Backups ................................... L-4

FORMAT ................................................................................................................... L-4

COPY ........................................................................................................................ L-7

Creating Bootable MS-DOS Disks for Your Applications ........................................... L-8

Index

xi

Figures

1-3: Low-Profile Model .................................................................................1-4

1-5 . Power Connectors and Controls ...........................................................1-6

1-8: Nonalphabetic Keys ..............................................................................1-9

1-12: All-in-One Model .................................................................................1-13

1-13: Low-Profile Model ...............................................................................1-13

1-15: Disks ....................................................................................................1-15

3-1: A Comparison of Language Types .......................................................3-5

G-2: Unfastening the Drive/Video Subassembly .......................................... G-3

G-3: Disconnecting the Floppy Disk Drives ................................................. G-4

G-4: Disconnecting the Winchester Disk System ........................................ G-5

G-6: Unfastening the Drive Subassembly .................................................... G-7

G-7: Disconnecting the Floppy Disk Drives ................................................. G-8

C-3: Disconnecting the Winchester Disk Drive ............................................ G-9

G-9: Removing the Keyboard/Base Cover ................................................. G-10

G-13: Connecting the Signal/Power and Floppy Disk Drive Cables ............. G-14

G-14: Connecting the Winchester Disk Drive .............................................. G-15

G-15: Fastening the Drive/Video Subassembly to the Base ........................ G-16

G-17: Connecting the Floppy Disk Drive Cables ......................................... G-18

G-18: Connecting the Winchester Disk Drive .............................................. G-19

G-19: Fastening the Drive Subassembly and Base ..................................... G-20

G-22: Switch DS1 (Floppy Disk Card) ......................................................... G.24

xii

Tables

2-3: External MS-DOS Commands (Utilities) .............................................. 2-37

3-1: Sources of Some High-Level Language Names ..................................... 3-4

3-2: Sample Output from BASIC ................................................................. 3-24

B-1: The ASCII Character Set .......................................................................B-2

B-3: ASCII Keypad Codes - Key Expansion Mode Enabled ..........................B-9

B-4: ASCII Function Key Codes - Key Expansion Mode Enabled................. B-10

B-5: Escape Codes - Cursor Functions .......................................................B-10

B-6: Escape Codes - Erasing and Editing ...................................................B-11

B-7: Escape Codes - Modes of Operation ................................................... B-11

B-8: Escape Codes - Configuration .............................................................B-12

B-9: Escape Codes - Additional Functions ..................................................B-14

C-1: Monitor Program Command Summary ..................................................C-1

C-2: Monitor Program Syntax Notation ......................................................... C-2

D-2: File Name Conventions .........................................................................D-1

Table Logical Operators ..........................................................E-4

E-10: Directions Recognized by the DRAW Statement ....................................E-9

E-12: Image Transfer Action Verbs ................................................................ E-18

F-1: Devices Directly Supported by CONFIGUR ............................................ F-1

G-1: S101 Switch Settings .......................................................................... G-23

G-2: DS1 Floppy Disk Controller Switch Settings ....................................... G-25

G-3: RGB Connector (J9) Pinouts ............................................................... G-26

xiii

1-1:

1-2:

J-2:

MS-DOS and CP/M-85 Control Functions ................................................... 1-1

MS-DOS and CP/M-85 Commands ............................................................. 1-2

Magic Wand Z-89 to Z-100 Function Key Guide ........................................ J-14

xiv

Chapter 1 Operation Page 1-1

Your Computer System

Your new Z-100 Computer is a tool, much like a typewriter or calculator.

You can use it in a wide number of applications, such as general accounting, inventory management, payroll, communications, maintaining mailing lists, filing and retrieval of information, and word processing. It is also an excellent educational aide that can make the learning process fun and challenging for the student while providing management support for the teacher and school.

Your computer is an extremely reliable machine. When it is properly installed and receives proper care, it will last for years with little need for service.

A typical computer system will consist of at least two units: the computer and a peripheral (any piece of equipment that is attached to and controlled by the computer). It may be a video display, printer, telephone communications device (called a modem), or additional disk drives.

The heart of the system is the computer with its keyboard and storage devices.

The All-in-One model, shown in Figure 1-1, also contains a built-in video display.

Chapter 1 Operation Page 1-2

The video display (sometimes called the CRT, monitor, or screen) is like a television set. This is where you will see and work with the programs you use in your computer system. The Low-Profile model does not have a builtin video display; it uses a separate video monitor that is connected to the computer with a cable.

You will use the keyboard to enter information into your computer. It has all the keys contained on a standard typewriter keyboard plus additional special function keys. There is also a calculator-style "keypad" to the right of the main keyboard that will allow you to make faster numeric entries.

(information can also be placed in the computer from disks, signals over telephones lines, and other special devices.)

The floppy disk capability that is built into your computer allows you to store large amounts of information on 5.25-inch plastic disks (see Disks later in this chapter). Each disk that your computer uses is capable of holding up to 180 pages of typewritten text. You can get even more storage by adding 8inch floppy disk drives or a high-capacity Winchester disk drive.

You can greatly enhance the operation of your computer by adding a printer to your system. This makes it possible to produce copies of letters, accounting records, or any other material.

Finally, you may add computer-to-computer communications via telephone.

This capability makes it possible for your computer to exchange information with other computers over the telephone, which makes available electronic mail service, news, shopping services, electronic banking and bill paying, stock market services, and so on.

You should select an area to set up your computer that:

• accommodates the computer and all of its peripherals.

• has a level work surface that is near a power source and a telephone.

• has an environmental range of 60 to 90 degrees Fahrenheit (15.6 to

32.2 degrees Celsius) and 10 to 80 percent relative humidity.

Chapter 1 Operation Page 1-3

Setting Up

The following paragraphs will describe setting up each connector and control on your computer. While examining the back panel and the connectors, be sure that the computer is turned off and unplugged. Rotate the computer so you are looking at its back.

Back Panel

Refer to Figure 1-2 for the All-in-One model and to Figure 1-3 for the Low-

Profile model.

• Fan – Used to provide ventilation to the power supply. Never block the fan openings or restrict air movement while you have your computer turned on.

The following control and connector(s) are located next to the fan openings on the upper back panel.

• J15 -- The brightness control. Used to adjust the brightness of the video display. Adjust the brightness to obtain the most suitable display. (All-in-

One model only.)

• J15 – The composite video output connector. Provides the proper video signal for a separate black and white (monochrome) video monitor. The

Low-Profile model requires a separate video monitor; you cannot use a standard television receiver for this purpose as it is not designed to display all of the information needed for word processing or accounting applications.

• J9 – The RGB video output connector. Provides the necessary signals for a high-resolution color monitor that uses RGB (Red, Green, Blue) color signals. Appendix G contains the necessary information that you need to configure this connector.

In addition to the above control and connectors, on the upper back panel there are a number of unfilled positions (J5-J8, J1-J13, J15, and J17). Any necessary controls and/or connectors needed for future expansion will be provided with the optional accessories.

Chapter 1 Operation Page 1-4

Chapter 1 Operation Page 1-5

Refer to Figure 1-4. These connectors are on the lower-left portions of the back of your computer.

• J1 – A serial connector. Provides the necessary EIA-standard RS-232 DCE signals for connection to a serial printer.

• J2 – A serial connector. Provides the necessary EIA-standard RS-232 DTE signals for use with a telephone modem.

• J3 – The parallel printer connector. Provides the necessary Centronicstype parallel signals for connection to a parallel printer.

• J4 - The light pen connector. Provides the necessary signals for connection to a light pen for on-screen graphics work.

Chapter 1 Operation Page 1-6

Refer to Figure 1-5. These features are located on the lower-right portion of the back panel.

• Power cord connector – Used with the AC power cord to supply power to the computer.

• Line select switch – Used to select between 115 volts AC and 230 volts

AC. Normally, you will never use this switch unless (during initial setup) you are in an area serviced by a 230 volts AC power source. (Changing the setting on this switch should be done only be qualified individuals. When changing line voltage, i.e., 115 to 230, the line cord plug must be changed to the proper type and voltage rating. Check local electrical codes.)

• On/off power switch – The main power switch to your computer.

Chapter 1 Operation Page 1-7

Power Connection

Locate the power connector, power switch, and openings for the fan in

Figure 1-6 and on your computer. Never block the fan openings or restrict air flow.

Make sure the power switch is in the OFF position.

Plug the power cord into your computer.

Be sure that the line select switch shows the proper voltage level for your power source. You may read the voltage setting through the plastic window located between the power cord receptacle and the power switch.

If it is set incorrectly for your needs, contact your local Zenith Data

Systems dealer for instructions.

Rotate the computer so the keyboard faces you.

Plug the other end of the power cord into an AC power outlet (common wall or floor plug).

Chapter 1 Operation Page 1-8

Keyboard

The keyboard of your computer consists of 95 keys, which are discussed on the following pages in groups.

Whenever you hold any key except the SHIFT or CTRL keys down for more than a moment, it will automatically start repeating. The rate of repeated entry is equal to pressing the same key about eleven times a second.

Alphabetic Keys

Refer to Figure 1-7 for the following discussion.

• The computer has the standard 26 letters of the alphabet arranged as they are on a typewriter. These keys allow you to enter either loweror uppercase letters. You can hold either SHIFT key down or push the CAPS

LOCK key to obtain uppercase letters.

• The CAPS LOCK key is a push-to-latch, push-to-release key, and affects only the alphabetic keys.

Chapter 1 Operation Page 1-9

Nonalphabetic Keys

• The nonalphabetic keys are those with double markings, as shown in

Figure 1-8. These include the numbers 0 through 9, punctuation marks, and special characters. The lower marking is generated when both of the SHIFT keys are released, while the upper marking is generated when either SHIFT key is held down. The CAPS LOCK key will not shift these keys.

Chapter 1 Operation Page 1-10

Other Keys

The following discussions describe the normal function for each key. However, software (a program) may direct any key to cause some other action to take place. Any key that performs a special function is usually described in the documentation that accompanies the program.

Refer to Figure 1-9 for the following discussion.

• SPACE BAR - Enters a blank character (space), just as it does on a typewriter.

• BACK SPACE - Moves the cursor' one space to the left, just as it does on a typewriter.

• TAB - Moves the cursor to the next tab column (set to every eighth column).

RETURN - Returns the cursor to the left side of the display (software will usually add a line feed as well). It also tells the computer that data or instructions have been entered and may be processed or executed.

1

A "cursor" is an indicator on the display that lets you know where the next key entry will appear. The indicator may be an underline or a solid block.

Chapter 1 Operation Page 1-11

See Figure 1-10 for the next discussion.

The following keys are used for special purposes. Instructions that tell you how to use them will appear with the programs.

• Special function keys (FO through F12) - Used for special purposes by some programs.

• HOME, LINE FEED, and arrow keys - Used to control cursor movement and screen presentation by some programs.

• D CHR/I CHR and DEL LINE/INS LINE keys - Used in applications that require special insertion and deletion operations.

• DELETE - Often duplicates the BACK SPACE key, but is sometimes used for other purposes.

• BREAK - Used to interrupt program execution (not always active).

• RESET - Used with the CTRL key (described later) to reset the computer to a power-on state. This key also has a power-on indicator in it which will be illuminated whenever the computer is turned on.

• HELP - Used by some programs to provide operator aid in the form of special "prompts," or "helps."

Chapter 1 Operation Page 1-12

The following keys are used in combination with other keys to perform a function. See Figure 1-11.

• ESC - The escape key. Performs special functions when you press Et and another key in sequence. For instance, if you want to enter ESC

E, you would press the ESC key, release it, and then press the E key. If you want to enter ESC <, you would press the ESC key, release it, press and hold the SHIFT key, and then press the < key.

• CTRL - The control key. You can use it to perform special functions by pressing it and an alphabetic key at the same time. For instance, if you want to enter the CTRL-C combination, you would press and hold the

CTRL key and then press the C key, or you may press both keys at the same time. If you want to enter the CTRL-S combination, you would press and hold the CTRL key and then press the S key, or you may press both keys at the same time.

The following keys are used to speed up the entry of data.

• Calculator-style keypad - This group of keys, located to the right of the main keyboard, is organized somewhat like a calculator and include: the numbers 0 through 9; a period for entry of decimal points; a dash for entry of negative numbers; and an ENTER key for signaling the computer that the entry has been completed.

• FAST REPEAT - This key, when held down at the same time as another key, triples the rate of normal repeat entry and takes effect immediately. It is especially convenient when you want to enter the same key a large number of times. The CTRL and SHIFT keys are not affected by the use of this key.

Chapter 1

Disk Drives

Operation Page 1-13

The disk drives are storage devices designed to transfer information into and out of your computer's memory. Refer to Figure 1-12 for the All-in-One model and Figure 1-13 for the Low-Profile model.

NOTE: The disk drives shown in this manual are typical of the type supplied in Zenith Data Systems computers. The drives in your unit may appear to be different; however, they function the same.

• Disk drive positions - One or two disk drives are included with your computer. For dual-drive systems on the All-in-One model, the top disk drive is referred to as drive A and the bottom as drive B. One the Low-Profile model, the left disk drive is drive A and the right one is drive B.

If your computer has only one disk drive, it will be known as drive A, regardless of its position in either the Low-Profile or All-in-One model.

The drive names, A and B, are arbitrary with the disk operating system

(DOS). The systems supplied with your computer use these names. Other operating systems may refer to the drives by other means. Consult the documentation supplied with those systems for the names of the drives (drive

A will be the lowest-named drive; drive B, the next).

Chapter 1 Operation Page 1-14

Refer to Figure 1-14 for the following discussion.

• Disk load slot - Insert 5.25-inch disks in this slot with the label up and toward you. If the disk is not oriented as shown in the figure, the computer will not operate properly and you may damage the disk and/or disk drive. If the disk meets resistance while you are inserting it into the drive, check to make sure that there is not a disk already in the drive. It should slide smoothly into the drive.

• Disk drive latch - Your floppy disk drive may have a latch, door, or handle as illustrated in the insets. It is used to secure the floppy disk in the proper position in the disk drive. Closing the latch engages the drive hub into the disk and brings the read/write heads into contact with the disk surface. If the latch closes with difficulty, remove the disk, inspect the edge of the center hole for damage, check for proper floppy disk orientation (see the previous discussion), and try again.

NOTE: Several different disk drive types are equipped with a locking mechanism that prevents the latch from being closed if there is no disk inserted in the drive. This prevents possible damage to the read/write heads. Be sure there is a disk inserted in the disk drive before attempting to close the latch.

• LED Disk Access Indicator - This light, which may be in one of several different locations on the front of your disk drive, indicates that the computer is attempting to read from or write to the disk. The read/write operation will be successful only if the disk is inserted properly and the disk drive latch is closed.

Chapter 1 Operation Page 1-15

NOTE: Winchester disk drives do not have removable disks. Instead, all you will see is the LED disk access indicator.

Disks

The floppy disk, or disk, sometimes called a diskette, is a precision storage medium which requires care and attention to insure a long, trouble-free life.

A disk is made up of three parts (see Figure 1-15): the plastic disk, the disk liner, and the disk jacket. A disk envelope is provided for additional protection when the disk is not being used in your computer.

The disk is made out of a very thin plastic material (usually Mylar®) that is flexible and coated with a magnetic oxide similar to that used in magnetic recording tape. It can be bent or marked easily, leaving distortions in its surface that will destroy its usefulness.

Chapter 1 Operation Page 1-16

The disk is well protected against accidental damage. The protective liner, a sleeve of cloth-like material that cleans the disk and traps dust particles, is placed around the disk. The outer jacket (with a label on the upper left-hand corner) adds additional protection and makes the disk somewhat rigid.

The protective envelope covers the exposed areas of the disk when it is not in use or is being stored.

The outer jacket has three openings and a notch along one side. The disk drive grips the disk through the large center opening. The small circu-lar hole to one side is used for timing purposes. The read/write head accesses the disk through the long slot.

The notch, on 5.25-inch disks, is called a "write-protect notch" and is located near the label. Whenever you have important information on a disk that you do not want to "write over," place an opaque tab over this notch. The computer will sense its presence and will not record on this disk. I .B

-

1

8-inch disks (used in 8-inch disk drives), the notch is located near the read/write head access slot and is a "write-enable" notch that must covered in order to record information on the disk.

The read/write head functions like the recording and playback head in a tape recorder. The disk comes in contact with the read/write head, which will either record (write to) or read magnetic impulses from the disk. If the disk is in any way deformed, this process is interrupted and valuable data can be lost.

For instance, the oily residue left from a fingerprint will cause the disk to loose good contact with the head, interrupting the read/ write process.

You can compare a disk to a file cabinet that is fall of files. When the disk is new, it is like new, empty file drawers. You have to organize ("format") the disk so it can hold your "files" of information. This information may take the form of data, programs, or the disk operating system (DOS). The "Disk Operating

System" chapter of this manual will tell you how to organize, or format, your disks.

Chapter 1 Operation Page 1-17

Refer to Figure 1-16. A disk's surface is divided into tracks and sectors. A track is that portion of the disk that passes under the read/write head. It is divided into sectors by either timing holes placed in the disk itself, or by software.

When timing holes determine the sectoring of a track, the disk is said to be a

"hard-sector" disk. When software determines the sectoring, the disk is a "softsector" disk.

The amount of information each sector can hold determines the disk's density.

(Disks are sold as single- or double-density types.) If a disk is capable of

"double-density" usage, it can hold twice as much information as the standard

"single-density" disk. A double-density disk can be formatted for single-density use, but a single-density disk should not be formatted for double-density use.

Chapter 1 Operation Page 1-18

The number of tracks that a disk can hold is measured in tracks per inch

(tpi). Two common specifications are 48 tpi and 96 tpi, although you may find these disks labeled 40 tracks and 80 tracks, respectively. Occasionally, you will find disks labeled for 35-track systems. Your computer uses 48 tpi,

40 track disks in its built-in drives. If 48 tpi disks are not available, you may safely use 96 tpi disks.

The other difference between disks is the number of sides. All disks are coated on both sides; however, double-sided disks have been tested for use with double-sided disk drives. Single-sided disks are for disk drives that only write on one side of the disk. Your computer has double-sided disk drives to provide full business applications usage.

When you purchase disks for use in the built-in drives of your computer, ask for 5.25-inch disks that are soft-sectored, double-sided, and doubledensity.

You may use either 40 track, 48 tpi, or 80 track, 96 tpi disks.

For 8-inch disks, ask for double-sided, double-density 77 track, 48 tpi disks.

You may also use single-sided, single-density disks, but will have to make special provisions when you format them.

Disk Care

Because the disks can be damaged when you handle them, keep the following precautions in mind.

When you prepare a label for a disk, write on it before you place it on the disk; or, if you must write on a label that is already on the disk, use a felttip pen. Ball point pens and pencils may exert enough force on the disk to crease the Mylar (thus destroying its usefulness) and should not be used to mark labels once they are on a disk.

Handle the disk much the same as you would an audio record. It should be stored in its protective envelope in an upright position and away from heat or direct sunlight when not in use. Don't bend it or use paper clips on it and do not touch the exposed areas of the disk.

Chapter 1 Operation Page 1-19

Magnets and magnetized objects can erase some of the information stored on your disks. Also, X-rays may destroy the data on a disk. By keeping your disks away from these sources of trouble, you can help reduce problems with your computer.

Power Up

You are now ready to see your new computer in operation. The following directions will help you power up your computer and prepare it for the demonstration disk.

Turn on the power switch. You should see the power-on indicator (in the

RESET key) light and disk drive A's disk access indicator glow.

NOTE:

The disk access indicator may not glow if certain features are not enabled on your computer. However, if you do not see the poweron indicator light up, turn the power off and refer to In Case of

Difficulty in this chapter.

After about 30 seconds, the following message should appear on the screen.

Device Error

A small hand (called the "hand prompt"), pointing to a cursor, will appear in the upper left-hand corner of the screen. If the prompt does not appear, press both the

CTRL and

RESET keys at the same time. If the message, small hand, and cursor still do not appear after another 30 seconds, refer to In Case of

Difficulty at the end of this chapter.

NOTE:

If the disk access light does not glow when you turn on your computer, the hand prompt should appear very shortly. If it does not, press both the

CTRL and

RESET keys at the same time. If the hand prompt does not immediately appear, refer to the In Case of

Difficulty section.

Also, you may override the 30-second wait by pressing the

DELETE key while the disk access light is glowing. The screen will then display the following message and the hand prompt.

Boot Abort

Chapter 1 Operation Page 1-20

Z-100 Demonstration Disk

Introduction

The Z-100 Demonstration Disk will show you some of the power and versatility of your new computer. The demonstration disk contains three sections; the first two are automatic and will provide you with a good demonstration of the graphic capabilities of your computer. The third section is a useful program that will allow you to specify, design, and display your information using the graphic capabilities of either Z-BASIC or (3W-

BASIC. The instructions for using the interactive portion of the disk are found in Appendix K.

If this is the first time that you are going to use your demonstration disk, be sure you have read the section on disks, found earlier in this chapter, before you start. You may also want to make a backup copy of it for safe keeping.

You will need MS-DOS to do this. Refer to Appendix L of this manual for information about making backups.

To; use your demonstration disk, follow these procedures:

If you have not done so, turn on your computer. Otherwise, if the hand prompt is showing, press the B key. The word Boot will appear on the screen. Press the F1 key. The letters f1 will appear on the screen in reverse video (dark letters on a light background). Press the RETURN key.

NOTE: Look at your demonstration disk. If a tab is covering the writeprotech notch, remove it.

Refer to the Disk Drive section earlier in this chapter and insert your demonstration disk into drive A (left drive on the Low-Profile model, top drive on the All-in-One model).

Chapter 1 Operation Page 1-21

After a moment, a message similar to the following will appear on the screen.

These are the sign-on messages of Z-DOS, an operating system used on your computer.

Z-DOS/MS-DOS BIOS release 1.00, version 1.00

Z-DOS/MS-DOS release 1.00, version 1.25

(C)Copyright 1982 Zenith Data Systems

Z-DOS/MS-DOS Command release 1.00, version 1.19

The demonstration program will then automatically start and you will see the following:

A: zbasic choice

There will be a brief pause while the next part of the program loads into your computer's memory. The screen will clear and then display the BASIC copyright notice (similar to the following):

Z-BASIC Rev. 1.0

[Z-DOS/MSDOS Version]

Copyright 1982 (C) by Microsoft

Created: 15-Jul-82

62168 Bytes free

Chapter 1 Operation Page 1-22

Master Menu

The master menu will now load into memory, the screen will clear, and the following choices will be displayed:

Z-100 / Z-BASIC Demonstration System

Version 1.0

<:F1> Artwork.

<F2> Interactive Business Graphics.

Enter your choice :

If you press the F1 function key, you will select an automatic display of several interesting graphic designs. If you press the F2 function key, you will select a program which will allow you to design and display different charts on your computer.

If you do not want either program, you may safely end the program.

To do so, open the disk drive door and remove your disk. Then either press both the CTRL and RESET keys at the same time or turn off your computer.

Artwork

Press the F1 function key to select the artwork display. The screen will clear and the following will be displayed.

A:autoexe1

A:zbasic f

Chapter 1 Operation Page 1-23

After a moment, the screen will clear and the BASIC copyright notice will appear. Then the screen will again clear and the first display will be drawn. After it is completed, the screen will once again clear and a new display will be drawn. This process will continue through the entire series of displays.

If you want to "freeze" any picture, press both the CTRL and S keys at the same time and then release them. This action will stop the display and allow you more time to study the drawing.

To continue the display, press any other key.

After all the displays have been completed, the computer will return to the master menu where you may either reselect the artwork series or go on to the business graphics section.

Interactive Business Graphics

The interactive business graphics portion of your demonstration disk is actually a set of very powerful programs which you may use by themselves or incorporate into your own software. The interactive portion of the program is described in Appendix K at the back of this manual.

Press the F2 function key at the master menu. The screen will clear and the following will appear on your screen:

A:autoexe1

A:zbasic menu

Chapter 1 Operation Page 1-24

Then the BASIC copyright notice will appear, the screen will clear, and the following menu illustrated in Figure 1-17 will be displayed.

In addition, the business graphics menu runs a continuing display of various types of charts in three "windows." The following types of charts are illustrated:

• Line charts

• Side bar charts (horizontal bars)

• Bar charts (vertical bars)

• 3-D charts (three-dimensional bars)

• Trend-line charts (data with least square fit analysis)

• Pie charts (single, full-screen pie)

• Multiple-pie charts (up to eight pies on one screen)

Chapter 1 Operation Page 1-25

For now, select the continuous demonstrations to look at full-screen representations of the different types of charts. Later on, after you have become familiar with your new computer, you may turn to

Appendix J and use the other three functions of this program to create your own charts with your own information.

Press the F4 function key to select a demonstration of screensized charts. Like the artwork demonstration, this program does not require any keyboard entries on your part.

The display is a series of designs created by Zenith Data Systems as examples of each of the seven types of charts. In some cases, you will see different examples that illustrate the versatility offered in the design phase of these routines. Two types of charts will not be illustrated on machines that do not contain the color option: multiple pie charts and three-dimensional bar graphs. A test is performed and an appropriate message will be displayed for the monochrome display machines.

Each chart will be displayed for about a minute (or 40 seconds on 8 MHz machines) before going on to the next.

If you wish to exit the continuous demonstration portion, press the HOME key when the following appears at the bottom-left of your screen:

PRESS <HOME>

Otherwise, when the entire series has been displayed, the program will return to the business graphics menu.

To return to the master menu from the business graphics menu, press the HOME key. The screen will clear and the master menu will be displayed. At that point, you may remove your disk and reset your computer or turn it off.

Chapter 1 Operation Page 1-26

In Case of Difficulty

ZDS computer hardware and software products are designed to work together as a complete system. Proper operation can be assumed only when your computer is used with ZDS-designed or approved accessories. ZDS does not assume the responsibility for improper operation resulting from custom interfacing, custom software, or the use of accessories not approved by Zenith Data

Systems.

All the computer components have been wired and tested by ZDS.

If you encounter any malfunction during the warranty period, call your Zenith Data Systems dealer or authorized Zenith Data Systems repair facility to arrange for service. Do not attempt to service this computer yourself during the warranty period; to do so may void the warranty.

You may have out-of-warranty products repaired by your Zenith

Data Systems dealer of authorized Zenith Data Systems repair facility. You may wish to obtain a maintenance contract for your computer system, or you can purchase individual replacement parts to do your own service.

If you cannot locate a Zenith Data Systems dealer or repair facility, call 1-800-447-4700 (in Illinois, 1-800-322-4400) for the name and location of one nearest you.

The following information will provide you with information concerning possible

solutions to common problems.

Condition: Nothing happens at power on, and the red light in the RESET key is not lit.

Possible causes: 1. The AC power cord may not be plugged in

(check both ends). If you are using a multiple outlet box, check its plug.

2. The power may not be on at the AC power source (wall outlet). Check the power source with a different electric device.

3. The computer's (or the multiple outlet box's) power switch may not be on.

4. The line select switch may be set incorrectly for your power source.

Chapter 1 Operation Page 1-27

Possible causes: 1. The brightness control may be turned down (either in the All-in-One model or external monitor). model) may not be plugged in and/or turned on. model) may not be property connected to the computer.

4. The computer may not be transmitting a signal (screen may have been blanked or cleared by a program). Note that this will not be the case when you first turn your computer system on or if the computer is waiting for you to do something.

5. The computer may have failed during the initial self-tests.

Possible cause: 1. The brightness control is probably turned down (either in the All-in-One model or external monitor).

Condition: With the autoboot feature off, the disk won't boot from the hand prompt.

Possible causes: 1. You may not have pressed the B, F1, and RETURN keys. Press the CTRL and the RESET keys at the same time and try again. Don't forget to press the

RETURN key after pressing the B and

F1 keys.

2. You may have the wrong disk in the disk drive (you may be trying to boot from an unformatted disk or a data disk).

3. The disk may be inserted in the drive wrong or may be in the wrong disk drive.

4. The disk drive latch may not be closed.

5. You may have pressed the wrong key.

6. The disk may be damaged. Try another bootable disk.

Chapter 1 Operation Page 1-28

Condition: With the autoboot feature on, the system won't boot automatically.

Possible causes: 1. You may have the wrong disk (you must use a system disk in the boot drive).

2. The disk may be inserted in the drive incorrectly or may be in the wrong disk drive.

3. The disk drive latch may not be closed.

4. The disk may be damaged. Try another bootable disk.

Condition: The system resets to the power-up point or the disk keeps rebooting.

Possible causes: 1. You may have a bad or loose power cord.

2. You may have a bad disk (part of the information on it may not be read correctly).

This is not a common cause for this condition - it is more likely that the system would not boot properly from a damaged disk.

Chapter 1 Operation Page 1-29

Service Information

In the extreme case where you are unable to resolve a problem with your computer system, you may want to contact your local Zenith

Data Systems dealer or authorized Zenith Data Systems service center.

If you can isolate the problem to a particular symptom or hardware unit, such as the printer, you will save time and possible service expenses.

When You Call for Help

When you call for service, list the following information about your computer and its peripherals. It will help your ZDS representative diagnose and repair your unit.

1. The problem you are having. Supply any error messages that may have been displayed on the screen at the time your equipment failed.

2. The name, model number, and series or serial number of your computer and affected peripherals.

3. The way your system is configured; that is, the name and model numbers of the peripherals that are connected to your computer and how (or where) they are connected.

4. Any additional information that will help describe your system and the difficulty you are experiencing.

Z100 Manual

Disk Operating System

Page 2-

1

Introduction

A disk operating system, or DOS, is a program that lets you do certain tasks, such as organize the disk (with the FORMAT command), copy information from one disk to another (with the

COPY command), enter the date and time (DATE and TIME commands), and load other programs.

NOTE: Two disk operating systems that work with your computer

are MS-DOS and CP/M. There is also at least one version of

BASIC for each operating system: BASIC-80 for use with CP/M-

85 and existing 8-bit software, and Z-BASIC for use with MS-DOS and 16-bit software. GW-BASIC is also available for use with MS-

DOS.

MS-DOS was prepared for Zenith Data Systems Z-100 Computers by Microsoft. It is compatible with the same MS-DOS that runs on the IBM Personal Computer. MS-DOS stands for Microsoft Disk

Operating System. It is supplied on disk and must be loaded into your computer.

To load MS-DOS, you will use a program called a "monitor," which is built into your computer. The monitor program is always there, ready to help you get started, to check out certain features, and to serve as a system supervisor. You will learn how to load MS-

DOS into your computer and how to use some of the features of

MS-DOS to organize disks and duplicate them.

CP/M-85 is briefly compared to MS-DOS in Appendix I. Complete information concerning this operating system is contained in the

CP/M-85 documentation.

If you are using your Z-100 computer for the first time, be sure you have read the "Operation" chapter of this manual; it contains important information for new users. Even if you have used other computers, you should read the discussion on controls before you attempt to use your computer.

NOTE:

The following information assumes you have two floppy disk drives built into your computer. If your system has only one floppy disk drive, refer to Appendix D for proper use of one-drive commands.

Z100 Manual

Disk Operating System

Page 2-

2

The Monitor Program

Your computer contains a special program, called a monitor, that is designed to help you get started. One of its functions is to load (or

"boot") the disk operating system from disk into memory. The Z-

100 computer is set at the factory to automatically boot the DOS when it is turned on. By setting a switch (see Appendix G) you can disable this feature (called "autoboot").

Autoboot

If autoboot is disabled, after power up you will see a small hand pointing to a flashing underline in the upper left-hand corner of the screen. This "prompt" is the computer's way of telling you that it is ready and waiting for your command. To execute any monitor program command, the hand prompt must be present. It occurs automatically after the system is turned on and may be restored at any time. To do so, simultaneously press both the CTRL and

RESET keys if you ever find that you need to start over. However,

do not reset your computer unless you are sure that no important programs are being executed.

If autoboot is enabled (set as the computer comes from the factory), then there will be no display until a certain amount of time passes, or you press the DELETE key, or you insert a disk with the DOS on it into drive A:

If you press the DELETE key, the autoboot process will be interrupted and the screen will show:

Boot Abort and the hand prompt. The system is now in a manual mode and you can use the commands described later in this chapter.

If you wait for the system and do not put a disk into drive A, the screen wiIl show:

Device Error

Z100 Manual

Disk Operating System

Page 2-

3 and the hand prompt. This message will also appear if you put the disk into the disk drive incorrectly.

The system is now in a manual mode and you can use the commands described later in this chapter.

If you want to restart the computer at any time, press both the CTRL and RESET keys at the same time. The computer will attempt to boot in a DOS, as it did when you first turned it on. If you have a disk properly inserted in drive A, the DOS will be booted.

The Commands

The monitor program will execute twelve different commands, a summary of which is shown in Table 2-1. Only a few are explained here. The remainder are briefly described in Appendix C.

Table 2-1: Monitor Command Summary

F

H

HELP key

I

O

S

T

V

X

COMMAND NAME DESCRIPTION

B Boot Loads the operating system from a disk.

C Color Bar Displays a color bar pattern on the screen. If the computer does not have color capability, a single white bar, will be displayed on the right half of the screen.

Monochrome displays will display a pattern of gray-scale bars.

D Dump Displays the contents of a block or portion of memory in hexadecimal and ASCII.

E Examine

Fill

Help

Help

Input

Output

System

Test

Version

Execute

Examines and/or changes the contents of a memory location.

Fills the specified range of memory locations with the data entered.

Displays the list of monitor program commands.

See the H command.

Returns the contents of the specified port.

Sends a value to the specified port.

Displays the parameters (memory size, video RAM devices, video type: color or monochrome) of the computer.

Displays the diagnostic test menu.

Displays the version number of the ROM program.

Initiates machine language program execution at the specified memory address. Allows breakpoints.

Z100 Manual

Disk Operating System

Page 2-

4

Some of these commands are used by programmers for machine language Programming and debugging (see later discussion on programs in Chapter 3).

B – Boot

This is the monitor command you will use if your system is not set up to boot automatically, if a disk is not autobooted after power up, or if you want to manually boot the system. The boot process reads the operating system from the disk and loads it into the computer. To use this command

Make sure the computer is on and the hand prompt is showing.

Insert the MS-DOS disk (or any disk that contains a Z-100 disk operating system) into drive A (see the discussion on disk drives in Chapter 1).

Close the disk drive door or latch.

Press the B key and then the F1 function key. The computer will display:

Boot f1

Press the RETURN key.

The computer will now execute the boot routine and load the operating system from the disk in drive A into the computer's memory.

There are several variations of the boot command available to you.

Three of the function keys, F1, F2, and F3, tell the computer what kind of disk drive to use: F1 is for the built-in floppy disk drives,

F2 is for the optional 8-inch floppy disk drives, and F3 is for the optional Winchester disk system.

In addition to being able to specify which disk drive type, you may also specify which disk drive by using the number keys: 0 for the first drive (drive A, if you are booting from the built-in floppy disk drives) and 1 for the second disk drive.

Z100 Manual

Disk Operating System

Page 2-

5

Therefore, if you want to boot from the second 8-inch floppy disk drive, you would (1) turn on your computer and the 8-inch disk system, (2) insert an 8-inch floppy disk into the bottom 8-inch disk drive (it must contain a Z-100 operating system), (3) close the drive, and (4) press the B key, the F2 key, the 1 key, and the RETURN key, in that order. The computer will display:

Boot f21 and load the operating system from the second 8-inch disk drive.

NOTE: For a complete discussion on the optional 8-inch disk

drives or Winchester disk system, refer to the documentation that accompanies these products and also your operating system documentation.

C - Color Bar

If your computer is equipped with color video memory, it has the capability to display a color bar pattern on the screen so you may adjust your color monitor for the most pleasing display. To use this command:

Make sure your computer is properly attached to your color monitor.

Make sure the monitor is on.

Make sure the computer is on and the hand prompt is showing.

Press the C key. You will see one of two possible patterns, depending upon the capabilities of your system.

• If your computer is equipped with color video memory, you will see a pattern of color bars across the top half of the screen. Each color bar will be identified with the name of the color that is being represented. On a monochrome monitor, the pattern will be shaded from the most dark to the most light, left-to-right.

Z100 Manual

Disk Operating System

Page 2-

6

• If your computer is not equipped with color video memory, you will see a single block of light in the upper right-hand quarter of your display.

Use this pattern to adjust the controls for your monitor to provide the most pleasing display.

H -- Help

This command will display the commands available for the monitor program. The HELP key, located on the left side of the keyboard will also provide the same display when it is pressed. To use this command:

Make sure the computer is on and the hand prompt is showing.

Press either the H key or the HELP key. The computer will display:

Boot

Color Bar

Dump

Examine

Fill

Help

<HELP Key>

Input

Output

System

Test

Version

Xecute

A complete description of each command is found in Appendix C.

Z100 Manual

Disk Operating System

Page 2-

7

S - System

This command will provide you will a brief summary of the features of your computer. If provides you with the amount of system memory installed in your computer, the amount of video memory installed in your computer, and the type of video (color or monochrome) supported by your system. To use this command:

Make sure the computer is on and the hand prompt is showing.

Press the S key. The computer will show you a display similar to:

256Kb of contiguous RAM

64Kb Video memory

Color

This particular display tells you that your system has 256 kilobytes of random access memory (RAM) and 64 kilobytes of color video memory. Other variations that will commonly be seen are 128 or

192 kilobytes of random access memory and 32 or 64 kilobytes of color or monochrome video memory.

V - Version

NOTE: Professional software is released in versions. Updates and enhancements to these programs are made as they are developed. Each time a revision of this type occurs, it is called a new "version" and given a number (Version 1.0, Version 1.1,

Version 2.0, etc.).

You can use the Version command whenever you want to find out what version of the monitor program you have in your computer. To use this command:

Make sure the computer is on and the hand prompt is showing.

Z100 Manual

Disk Operating System

Page 2-

8

Press the V key. The computer will display:

Version 2.5 and return to the hand prompt.

The display tells you that the monitor version (in this example) is

2.5. There is no relationship between the monitor version number and the operating system version number shown later in this chapter.

Loading MS-DOS

With the MS-DOS manual, you will receive two MS-DOS disks: disk #1 and disk #2. The following steps will show you how to

"load" the disk operating system the first time and then create

"backups," or "working copies," of the distribution disks.

To load MS-DOS:

Turn on the computer or press the CTRL and RESET keys at the same time if the computer is already on.

Insert the MS-DOS distribution disk #1 into drive A.

Close the disk drive door or latch.

If you are booting the computer manually, press the B key and then the F1 key. The computer will display the following.

Boot f1

Press the RETURN key.

Z100 Manual

Disk Operating System

Page 2-

9

The floppy disk drive's disk access indicator will come on, indicating that the disk is being "read" by the computer. You may hear a faint whirring noise, which is the normal sound of the disk drive motors.

As MS-DOS is read into the computer, your display will show a message similar to:

MS-DOS Version 2.20

Copyright(C) 1984, Zenith Data Systems Corporation

A>date

Current date is Mon 11-12-1984

Enter new date:

The date actually shown on your computer will probably differ from this sample. The format for entering the date is M/D/Y or

M-D-Y where M is the month (1 to 12), D is the day (1 to

31), and Y is the year (80 to 99). Four digits may be used for year if you are entering a year from 2000 from 2099. Any other response will cause the computer to display:

Invalid date

Enter new date:

Some examples of how valid dates are entered and stored are:

Your entry:

6-9-82

Will be stored as:

Enter the current date and press the RETURN key. The computer will display:

A>time

Current time is 12:02:17.16

Enter new time:

Z100 Manual

Disk Operating System

Page 2-

10

The time actually shown on your computer will probably differ from this sample. You will use the format H:M:S.C to enter the time, where H is hours (0 to 23), M is minutes (0 to 59), S is second (0 to

59), and C is tenths of a second (0 to 9). Minutes, seconds, and tenths of a second are optional and may be omitted. The separators, colon and period, must be used exactly as shown or else the following error message will be displayed.

Invalid time

Enter new time:

Some examples of valid entries and how they are stored in your computer follow:

Your entry: Will be stored as:

9:15 9:15:00.00

9:15:30 9: 15: 30.00

9:15:30.5 9:15:30.50

14:2:3 14:02:03.00

Enter the current time and press the RETURN key. The display will now show:

'Path- \bin

You have now successfully loaded MS-DOS into your computer.

The computer has performed one other function: to allow you to access all the programs on the default disk without having to worry about "directory paths." Directory paths will be explained later in this chapter.

Z100 Manual

Disk Operating System

Page 2-

11

The MS-DOS Prompt

Normally, after you load MS-DOS, you will see:

A>

You can see by this example that the small hand has been replaced by the A>, which is MS-DOS's prompt. The A> also tells you which drive is currently being used by the system. This is called the "default drive." Later on, you'll find out how to change the drive being used. But first, you need to create a copy, or backup, of MS-DOS and store the original in a safe place.

Making A Backup

Backups

A backup might easily be considered to be an "insurance copy." It is a duplicate of important data. During the course of normal operation, accidents do happen and a disk can be accidentally ruined. By having a backup, you have "insured" yourself against the loss of information that may be vital to the successful operation of your business or computer.

By making backups at regular intervals, you can minimize the amount of work that would be necessary to bring your computer records up to date if information is lost through mishandling of a disk or by some other cause.

Backups also provide a convenient method of rotating your disks so that one is not in constant use. The backup procedure gives you a way of verifying that the disk you are using is a good one, and not one which may cause a problem.

Since you computer has now loaded MS-DOS and is waiting for your instructions, the following will take your through the step-bystep process. Appendix L illustrates another method you can use to make a backup of important disks while using MS-DOS.

Z100 Manual

Disk Operating System

Page 2-

12

Backing Up Your Disks the First Time

The DISKCOPY utility has been designed to allow you to create an exact duplicate, or backup, of a disk. You will use it now to duplicate the two 5.25-inch MS-DOS distribution disks.

The working master disks are those that you will create during this backup procedure. Because there is more than one disk, you will be asked to repeat the process twice. The disk that is now in drive

A should be labeled disk #1. You will be given an opportunity to make sure that it is the correct disk in a moment.

You will be copying the information from the distribution, or "source," disks onto "destination" disks.

To start the backup procedure, make sure that the A> MS-DOS prompt is showing on the screen. If it is not, reboot your system

(see the procedure earlier in this chapter).

Enter the following into your keyboard. The characters you type will be shown on the screen.

BACKUP/V

Press the RETURN key. The light in drive A will come on and your screen will show a display similar to the following.

DISKCOPY version 2.20

Copyright(C) 1984 Zenith Data Systems Corporation

Source drive name? (A-H) _:

You will notice that the cursor is to the left of the colon. It is prompting you to enter the name of the disk drive in which the source disk is located. Now you can check to make sure that you have the distribution disk, disk #1, in drive A. To do so, open the drive door or latch and remove the disk. After you have checked the label on the disk and made sure it is disk #1, put it back in drive A and close the door or latch.

Z100 Manual

Disk Operating System

Page 2-

13

Press the A key. The computer will now show:

Destination drive name (A-H) _:

NOTE: This backup procedure does not check to see if your

destination disk has data on it. Any information previously recorded on the disk will be erased and blank (empty) tracks will be placed on the disk, making it ready to receive new data. Be sure you are using a blank disk

(or one that you wish to erase).

Insert a blank disk in drive B and close the door or latch.

Press the B key. The computer will display:

Place the source disk in A and the destination disk in B.

Press RETURN when ready.

You now have one last chance to check that you have the correct disks in the proper drives. The source disk, MS-DOS distribution disk #1, should be in drive A. The destination disk, a blank disk, should be in drive B. If you are not sure that they are correct, check them now.

You also may stop the duplication process now if you wish. To stop

(or abort) the backup procedure, you would press both the CTRL and C keys at the same time. The computer would end the program and display

↑C on the screen, followed by the MS-DOS prompt. However, you need to make working copies of your distribution disks, so continue with the following procedure.

With MS-DOS distribution disk #1 in drive A and a blank disk in drive B, press the RETURN key. The light in drive A will come on momentarily and then the light in drive B will come on.

You will see the following on the screen.

Formatting destination...

When the light came on for drive A, the computer was checking the type of disk in drive A and the way the tracks were organized on the source disk. Next, it checked the type of disk in drive B. When it was satisfied that the disks were of an identical

Z100 Manual

Disk Operating System

Page 2-

14 type (both soft-sectored, in this case), it displayed the message and began formatting, or organizing, the tracks and sectors so they matched those of the disk in drive A. After the destination has been formatted, the display will show:

Co p ying .. .

Now you will see the disk access indicators in drive A and drive B alternately come on. While the indicator in drive A is on, the computer is reading information from the disk into memory. Then while the indicator in drive B is on, the computer is writing that same information onto the tracks and sectors in drive B. When this process has been completed, the computer will show:

Verifying...

Again, the disk access indicators in drive A and drive B will alternately come on. This time, the computer reads the information from each respective disk and then compares the data to make sure it matches. This process verifies that the destination disk is an exact copy of the source disk. When this process has been completed, the computer will show:

Do you wish to copy another disk (Y/N)? <N>

Remove MS-DOS distribution disk #1 from drive A and place it in its protective envelope.

Remove the disk in drive B and prepare a label for it. Whenever a new disk has been used for a backup, you will want to prepare a label for it.

Labeling Disks

There are many different methods of labeling and keeping track of disks. One method is to keep a log containing the date the disk was first formatted and the material that you expect to place on the disk (a summary or title only). An example would be:

Formatted 7-15-85 PAYROLL DATA

Z100 Manual

Disk Operating System

Page 2-

15

Most people assign each disk a unique number or code. This allows them to track the location of the disk easily and use a permanent storage area or container for the disk.

For your new copy of the MS-DOS distribution disk #1, assign it number 1, label it with the format date (the current date), and call it "MS-DOS disk 1 - working copy 1." It is called a working copy because it is one you will use on a continuing basis. Place the label in the upper right-hand corner of the disk, making sure you do not cover the write-protect notch.

The message on the computer is asking you if you want to duplicate, or back up, another disk. You need to make a backup of the second distribution disk, so press the Y key and then the RETURN key. The computer will show:

Source drive name? (A-H) _:

Press the A key. The computer will show:

Destination drive name? (A-H) _:

Press the B key. The computer will show:

Place the source disk in A and the destination disk in B.

Press RETURN when ready.

Insert the second distribution disk, disk #2, into drive A and close the door or latch.

Insert a blank disk into drive B and close the door or latch.

Press the RETURN key. The computer will repeat the backup process as described earlier in this chapter. When the destination disk has been formatted and the information copied from the disk in drive A and verified, the computer will display:

Do you wish to copy another disk (Y/N)? <N>

Z100 Manual

Disk Operating System

Page 2-

16

The letter N inside the angle brackets is the default answer that will be accepted by the computer if you press only the RETURN key.

Since you have no more disks to copy at this time, press the

RETURN key. The computer will display the MS-DOS prompt.

Remove the distribution disk from drive A and place it in its protective envelope.

Remove the disk from drive B and place it in its protective envelope.

Prepare a label for the destination disk which includes the number (number 2), the format (current) date, and "MS-DOS disk #2 - working copy 1." Place the label in the upper right-hand corner of the disk, making sure you do not cover the writeprotect notch with the label.

You have now completed the first backup of the distribution disks.

When convenient, you will want to make at least one more working copy of these disks. The easiest way to do it is to follow these same instructions. However, label your disks as copy 2 (or 3) instead of copy 1.

It is possible that, after reading the remainder of this chapter, you will want to make a custom working copy of MS-DOS. The procedure in Appendix L explains how to do this.

MS-DOS Control Key Functions

The following keys and key combinations are those that function while you are operating under MS-DOS. (If you have trouble locating any of these keys, you will find them highlighted in the

Keyboard section of Chapter 1.)

These are the only keys, other than commands and special function keys, that MS-DOS will

recognize. The special function keys are explained in the MS-DOS documentation.

Z100 Manual

Disk Operating System

Page 2-

17

Three single keystrokes are recognized by MS-DOS:

• RETURN - When you press this key, the computer will accept what you have entered through the keyboard. If you typed the information correctly, the computer will follow your instructions.

• BACK SPACE - If you accidentally press the wrong key or keys, you can use the BACK SPACE key to back over and erase those characters. Then you can enter the correct information.

• LINE FEED - You will not need to use this key unless you have a large amount of information to enter on one line. MS-

DOS won't automatically go to the next line when you come to the end of the physical line on the screen and have more information to enter. To go to the next line, press the LINE

FEED key. It will put the cursor (underline) at the beginning

of the next physical line and then, when the command is executed, the computer will use information from both lines.

NOTE: There is a danger in using the BACK SPACE key after

using the LINE FEED key. The BACK SPACE key will function normally, "backing out" each character and erasing it from the screen until it reaches the beginning of the line. Then, if you continue to press the BACK SPACE key, it will continue to back out each character typed in the previous line, but it will not affect the display. Without seeing the action of the BACK SPACE key, it is difficult to know what has been backed out unless you are very careful. The CTRL-X combination, described later, provides the easiest solution: it cancels the current command and gives you the opportunity to start over.

MS-DOS will also recognize the following five combinations of keys. One key is always the control key (labeled CTRL). In this manual, whenever you see the word "control" or "CTRL" followed by a dash and some letter, you are to press and hold the CTRL key and then press the other key.

• CTRL-X - If you have entered a line of instructions and want to start over, you have two choices. You may either use the

BACK SPACE key and back out all of the instructions, or you may use the CTRL-X combination. This will put a back slash (\) on the screen and start a new line. The information you had previously entered will be ignored by the computer.

Z100 Manual

Disk Operating System

Page 2-

18

• CTRL-S - Some of the commands you will give the computer will cause more information to be displayed than the screen vertically can hold at one time. In order to stop the information from moving off the display, you can press the

CTRL-S combination, which will tell the computer to stop what it is doing. Then, when you press any key, the computer will continue. By alternately pressing the CTRL-S and another key, you can control the way information is displayed on the screen.

• CTRL-C - There will be times when you wish to interrupt an operation and you don't want it to finish. You can cancel most operations by pressing the CTRL-C combination.

This tells the computer to stop what it is doing, return to the MS-DOS prompt, and wait for your next instruction.

Remember, you have canceled the operation, so you cannot start where you have left off - the CTRL-S allows for that. A ^ C will be displayed on the screen where you entered the command.

• CTRL-P - There will be times when you want to send information normally shown on the display to a printer (if you have one connected to your computer). By pressing the

CTRL-P combination, you tell the computer to send information to both the computer screen and the printer.

Whenever the computer does this, most operations are slowed, because a printer is slower than the screen.

NOTE: If you do not have a printer connected, or if it is not turned

on, or if it is off line, out of paper, or something is not right, then the computer can "hang up" until the problem is corrected. If there is no printer, or if there is some other problem that cannot be easily corrected (for instance, MS-

DOS may not be configured for your printer), the computer will have to be reset.

Since all printers are not alike, MS-DOS must be configured to the needs of your printer. The MS-DOS command, CONFIGUR, and how to configure MS-DOS for the needs of your printer are explained in Appendix F.

Z100 Manual

Disk Operating System

Page 2-

19

• CTRL-N - This combination will cancel the CTRL-P operation and return the computer to normal operation.

NOTE: If the printer should hang up your computer for some

reason, CTRL-N will not operate. The computer must be reset or the fault corrected.

Try the functions described in this section. The more you use them, the easier they will be to remember.

MS-DOS Commands

An MS-DOS command is an instruction to your computer that you type on the keyboard. Some of the commands, called "internal commands," are an integral part of the operating system. Other commands, referred to as "external commands," are actually separate programs on the disk, and must be loaded into the computer before the functions are performed.

The DISKCOPY command, for example, is external; that is, it is a separate program. The COPY command is internal and, as such, is always a part of MS-DOS. In order to use an external command, the command "file" must exist on the disk. If it is not present, the command will not work.

Changing MS-DOS Prompts

The prompt is a signal to you that your computer is ready to accept a command. While using MS-DOS, you will see the prompt displayed as the letter representing the drive being used by MS-

DOS (the default drive). It is followed by some symbol, usually the greater-than sign (>), and the cursor.

If you selected drive A (and this is the normal default drive on power up), the MS-DOS prompt would look like this:

A>

Z100 Manual

Disk Operating System

Page 2-

20

If you selected drive B, then the MS-DOS prompt would appear as:

B>

The greater-than sign may be replaced by another symbol, if desired. For more information on changing the prompt symbol, consult your MS-DOS documentation.

You can change the prompt (and the default drive) by typing the new drive name, a colon, and pressing the RETURN key. (You will be instructed to use the RETURN key only in the next two examples. However, you should always use it whenever you finish entering an MS-DOS command.)

If drive A is currently the default drive and you want to change the default drive to drive B, type:

B: and press the RETURN key.

If drive B is the current default drive and you want to change the default drive to drive A, type:

A: and press the RETURN key.

You will notice that the current default drive (in the form of the prompt) is displayed each time you finish an MS-DOS command.

Error Messages

Your computer will display an error message when something is wrong. The message itself often will tell you what is wrong so you will be able to correct the problem. An example of this would be:

Invalid drive specification

This message implies that, in your command, you specified a drive that is not connected to your computer. You would then re-enter the command, specifying the correct drive.

Z100 Manual

Disk Operating System

Page 2-

21

For a complete list of MS-DOS error messages and their meanings, refer to the MS-DOS documentation.

Files, Programs, and File Names

A file may contain either data or a program. Some "programs" may actually consist of several different files. MS-DOS is a good example; there are three programs (files) critical to the operation of MS-DOS: IO.SYS, MSDOS.SYS, and

COMMAND.COM (the first two are "hidden" files - files that are physically present on the disk, but do not display as part of the disk directory). On the disk, these are separate files.

Each file is identified by a file "specification." It has three parts: an optional drive name, a file name, and an extension.

• Drive name - The drive name is a letter from A to H and must be followed by a colon. The use of these letters is limited to the configuration of your computer system. For instance, if your computer system does not have more than two drives and you try to use any drive name beyond B, an error message may be displayed.

• File name - The file name is from one to eight characters in length. These characters can be any letter from A to Z, any number from 0 to 9, or certain punctuation characters. Examples of legal file names are MYFILE, Al PROG, and 333-1.

• The extension is from one to three characters in length. The allowed characters are the same as those that you can use for the file name. A period (.) must be used to separate the extension from the file name. Examples are: BAS, SYS, and

COM. Some extensions, like SYS, are reserved for certain file types. Consult your MS-DOS documentation for more information.

Examples of valid and invalid file names are as follows.

Valid file names: Invalid file names:

COMMAND.COM

MS-DOS.SYS

B:MYP:2.BAS (second colon)

MS.OS.SYS (first period)

Z100 Manual

Disk Operating System

Page 2-

22

Internal Commands

The commands that are internal to MS-DOS are listed in Table 2-2.

Table 2-2: Internal MS-DOS Commands

THE COMMAND: filename.BAT

BREAK [ON|OFF]

CD

CHDIR

TELLS THE COMPUTER TO:

Execute a file with a.BAT extension.

Enable or disable detection of CTRL-C.

Display or change the current directory (same as CHDIR).

Display or change the current directory (same as CD).

PAUSE

PROMPT

RD

REM .

REN

RENAME

RMDIR

SET

SHIFT

TIME

TYPE

VER

VERIFY

CTTY

DATE

DEL

DIR

ECHO [ON|OFF]

ERASE

EXIT

FOR

GOTO

IF

MD

MKDIR

PATH

Change the device from which commands are received.

Display the current system date and prompt for a new entry.

Delete a file or files from the disk (same as ERASE).

List directory entries.

Enable or disable the echo feature or display a message.

Delete a file or files from the disk (same as DEL).

Exit current command and return to lower command level.

Extend batch (or interactive) command.

Branch to another command.

Allow conditional execution.

Create a new directory (same as MKDIR).

Create a new directory (same as MD).

Search directories specified for commands/files.

Temporarily halt batch execution.

Use a new system prompt.

Remove a directory (same as RMDIR).

Insert a comment in a batch file.

Rename a file (same as RENAME).

Rename a file (same as REN).

Remove a directory (same as RD).

Set one string value to be equivalent to another value.

Make it possible to use over 10 batch parameters.

Display the current system time and prompt for a new entry.

Display the contents of a file.

Display the current version of MSDOS.SYS and IO.SYS.

Enable or disable verification of data after it is written to the disk.

Display the label of the disk in the default drive. VOL

The batch processing commands, (.BAT), ECHO, FOR, GOTO, IF,

PAUSE, REM, SET, and SHIFT, will not be discussed in this manual. Likewise, BREAK, CTTY, EXIT, PATH, and PROMPT will not be discussed. For more information on batch files and these commands, refer to the MS-DOS documentation.

COPY

The COPY command allows you to produce a "copy" of any file or program. The general form of the command is:

COPY (from) file specification (to) file specification

Z100 Manual

Disk Operating System

Page 2-

23

Remember that the file specification is made up of the drive name, the file name, and the extension. If the default drive is being used, you may omit the drive name.

Here are some examples of the COPY command:

(2) COPY A: OLDFILE.EXT=NEWFILE.EXT

(3) COPY NEWFILE.EXT

(4) COPY A: OLDFILE.EXT=B: NEWFILE.EXT

In each case, the file OLDFILE.EXT was duplicated under the name of NEWFILE.EXT. The drive names allow you to: (1) use the default drive for both files; (2) use drive A as the source drive and the default drive for the destination; (3) use drive B as the source drive and drive A as the destination; and (4) use drive A as the source drive and drive B as the destination. You will note that, in examples (3) and (4), the default drive was not important.

Wild cards (see the discussion under the DIR command) give you flexibility and allow you to back up a disk without having to know the names of each file. The backup copy procedure in Appendix L uses asterisks in :his manner.

There are several options and limitations in the format of the COPY command. These are fully explained in the MS-DOS documentation.

However, me very important restriction (for your protection against accidental file destruction) is that you may not copy a file onto itself. If you try it, the following error message will be displayed.

File cannot be copied onto itself

0 File(s) copied

Z100 Manual

Disk Operating System

Page 2-

24

DATE

The DATE command allows you to change the date that is currently stored in your computer. The command will be executed when you enter DATE and press the RETURN key. The computer will display the current date and prompt you for a new entry. If you press the RETURN key without entering a new date, the computer will not make any change to the current date.

The format for entering the date is M/D/Y or M-D-Y where M is the month (1 to 12), D is the day (1 to 31), and Y is the year (80 to

99). Four digits may be used for year if you are entering a year from 2000 from 2099. Any other response will cause the computer to display:

Invalid date

Enter new date:

Some examples of how valid dates are entered and stored are:

Your entry: Will be stored as:

Each disk, when it has been formatted, is organized to accept files. The names of these files are stored on the disk in areas called directories. The DIR command allows you to look at the directories that are on the disk in the default drive. For the following examples, place one of your copies of MS-DOS disk #1 in drive A.

To display, or "get" the directory, type:

DIR

(Don’t forget to press the RETURN key.) You will see a listing similar to the following on your display.

Z100 Manual

Disk Operating System

Volume in drive A is 890-434-09

Directory of A:\

COMMAND COM 16421 11-12-84 11:03a

ALTCHAR SYS 432 4-04-84 3:18p

AUTOEXEC BAT 23 4-04-84 2:36p

Page 2-

25

5 File(s) 34816 bytes free

The five columns of information represent, in order, the name of each file, the extension name, the number of bytes used to store the file (a byte is a measure of memory which can be equated to one keystroke of a printable character on the keyboard), and the date and time that file was created, last edited, or changed.

The last entry in the listing tells you that there is another directory, indicated by <DIR>, on this disk. You will be told how to change directories later in this chapter.

The last line on the screen shows you the number of files displayed and the number of unused bytes on the disk.

You can list the directory of a drive other than the default drive by adding the drive name. Place one of your copies of MS-DOS disk #2 in drive B and then enter:

DIR B:

The computer will display on following on the screen.

Volume in drive B is 890-435-02

Directory of B:\

DEVEL <DIR> 8-20-84 10:14a

4 File(s) 214016 bytes free

In this case, there are four additional directories on the disk in drive B.

Z100 Manual

Disk Operating System

Page 2-

26

If you want to look for a specific file, you may use the name of the file, as in the following examples:

DIR ALTCHAR.SYS

or

DIR B: FORMAT.COM

Note that you must use the entire file name, although the extension is optional. The inclusion of the drive name tells the computer to look on the disk in that disk drive.

If you attempted to use these examples, you will note that the second example, DIR B: FORMAT.COM resulted in a display similar to the following.

Volume in drive B is 890-435-02

Directory of B:\

File not found

This display tells you that the directory is either empty or does not contain the file(s) for which you are searching.

Wild Cards

There are two additional characters that you may use with a file's name. They are called "wild cards," which mean "anything," and are represented by the question mark (?) and the asterisk (*). Wild cards allow you to have the computer look for a number of files that have similar names.

You can use the question mark as a wild card to take the place of any fetter in a file name. For instance, if you enter the following command, the computer will display any files (which appear in the directory of the disk in the default drive) with five letter names that begin with AB, end with DE, and have the extension of EXT.

DIR AB?DE.EXT

Z100 Manual

Disk Operating System

Page 2-

27

The other wild card is the asterisk (*). This character is used in place of multiple question marks, and it can take the place of more than one character in a file name. For instance, if you entered the following command, the computer will display any files with names that begin with AB and have the extension of EXT.

DIR AB*.EXT

Likewise, the following command will cause the computer to list all files starting with the letter F, regardless of the rest of the filename or extension.

F*.*

With MS-DOS disk #1 in drive A, enter the following command.

DIR C*.*

The computer will display a directory similar to the following:

Volume in drive A is 890-434-09 Directory of A:\

COMMAND COM 16421 11-12-84 11:03a

CONFIG SYS 12 2:36p

2 File(s) 34816 bytes free

Multiple Directories

MS-DOS version 2 can support directory roots and branches.

While this feature is not overly important on 5.25-inch floppy disks, it is a benefit to the operation and organization of higher-capacity mass storage devices, such as 8-inch floppy disks and Winchester disk systems. The following discussion briefly describes this capability. For complete information on all of the directory commands (CD, CHDIR, DIR, MD, MKDIR, PATH, RD, and

RMDIR), refer to the MS-DOS documentation.

The concept of directories in MS-DOS version 2 is based on the concept of a tree, where the root of the tree is the foundation that supports the trunk and branches of that

Z100 Manual

Disk Operating System

Page 2-

28 tree. Likewise, the basic directory is referred to as the root directory that supports branch directories. These branch directories are treated as files which in turn support other branch directories and/or the actual data and program files on the disk. In other words, any directory, whether it is a root or branch directory, can support branch directories, data files, and programs.

In the case of your two distribution disks, disk #1 contains one additional directory file, identified in the directory as BIN, while disk

#2 supports four additional directory files, identified as

DEVEL, PSC, DEV, and CHR. In addition, the root directory of disk

#1 supports four files, COMMAND.COM, ALTCHAR.SYS,

AUTOEXEC.BAT, and CONFIG.SYS.

At this point in the discussion, you should have your computer turned on. Place your working copies of the two MS-DOS disks in drive A (disk #1) and B (disk #2). The default disk drive should be drive A.

Get the directory of drive A by entering the following.

DIR

Note that because the default drive is drive A, you did not have to specify the drive name in the command line you just entered. The computer should display something similar to the following.

Volume in drive A is 890-434-09

Directory of A:\

COMMAND COM 16421 11-12-84 11:03a

ALTCHAR SYS 432 4-04-84 3:18p

AUTOEXEC BAT 23 4-04-84 2:36p

BIN <DIR> 12:02p

5 File(s) 34816 bytes free

The command to change directories is CD or CHDIR, followed by the directory name (in this case, BIN). Enter the following command, which will change the directory in drive A.

CD BIN

Z100 Manual

Disk Operating System

Page 2-

29

Now get the directory of drive A by entering the following.

DIR

Note that you did not use any special commands in the directory command line. You had changed directories with the CD command. The computer will display a directory similar to the following.

Volume in drive A is 890-434-09

Directory of A: \bin

CONFIGUR COM 12031 11-12-84 11:47a

DISKCOPY COM 15738 11-12-84 11:35a

DISKCOMP COM 1917 11-12-84 11:39a

RECOVER COM 2295 4-04-84 1:49p

RESTORE EXE 24840 11-12-84 11:27a

25 File(s) 34816 bytes free

Z100 Manual

Disk Operating System

Page 2-

30

As you look over this directory listing, you will notice two additional directories. However, these are represented by periods and are called "dot" and "dot-dot." These are not actually files or directories, but are names that are held in this directory's first two locations. The dot-dot entry is a synonym for the parent of this directory (the root directory, in this case), while the dot entry refers to the directory itself, the current working directory.

Returning to the analogy of the tree, dot-dot refers to the branch or root of the tree from which the current directory grows. If you were climbing in an actual tree, moving to the branch named dot-dot would mean moving closer to the root of the tree.

You may change the directory to move closer to the root directory by entering the following command. In this case, since the BIN directory is the first branch away from the root, you will move back to the root directory.

CD …

Now if you get the directory of drive A, you will see the original root directory.

In order to work with the files in any particular directory, you must move to that directory. However, certain commands, such as copy, allow you to work with one directory from another directory.

Whenever you do this, you must know the directory path name to use. A complete description of how to use directory path names is provided in the MS-DOS documentation.

In the following paragraphs, you will be instructed to enter commands that affect the disk in drive B. However, you will be working from the disk in drive A (the default drive). Occasionally, you may forget to add the disk name to the command line and end up with results that are not represented in this discussion. If that happens to you, attempt to correct the problem by issuing the correct command sequence again. If you still encounter difficulties, reset your computer and reboot your system with your working copies of MS-DOS disk #1 in drive A and MS-DOS disk 2 in drive B. Then return to this point in the discussion. (Don't forget to press the RETURN key at the end of each command line.)

Z100 Manual

Disk Operating System

Page 2-

31

Get the directory of drive B by entering the following command.

DIR B:

The computer will display something similar to the following:

Volume in drive B is 890-435-02

Directory of B:\

DEVEL <DIR> 8-20-84 10:14a

PSC <DIR> 8-20-84 10:14a

DEV <DIR>

CHR <DIR>

4 File(s)

8-20-84 10:14a

8-20-84 10:14a

214016 bytes free

To change the directory on drive B to the DEVEL directory, enter the following command line.

CD B:DEVEL

Now you may get the directory of drive B by entering the following command line.

DIR B:

The computer will display the following.

Volume in drive B is 890-435-02 Directory of B: \devel

DEBUG COM 12484 4-04-84 9:20a

EXE2BIN EXE

6 File(s)

1649 4-04-84

214016 bytes free

9:19a

Z100 Manual

Disk Operating System

Page 2-

32

Likewise, to return to the root directory, you would enter the following command line.

CD B:..

As you can see, to change to any directory, you must be at the root directory of the disk. Then enter the change directory command, followed by the name of the target directory (the directory you wish to access). If you are working with a disk in a drive other than the default disk drive, then you must precede the name of the directory with the disk drive name.

To get a feel of how to use the CD and DIR commands, place one or more of your disks in the computer and experiment with these commands. Refer to the MS-DOS documentation for a complete discussion on directory features.

ERASE (DEL)

There will be times when you have a file that you want to delete from a disk. If your MS-DOS disk had a file by the name of

BADFILE.EXT, you would enter the following command line to delete it.

ERASE BADFILE.EXT

or:

ERASE B: BADFILE.EXT

You must use the drive name if the file you want to remove is not on the default drive. Likewise, if the file you want to remove is not on the root directory, you must change the directory to the proper one.

The command DEL may be used in place of the ERASE command. You would enter the following command line to delete

BADFILE.EXT.

DEL BADFILE.EXT

or:

DEL B:BADFILE.EXT

Z100 Manual

Disk Operating System

Page 2-

33

RENAME (REN)

Occasionally, you will want to rename a file for one reason or another. To do this, you would enter a command line similar to the following.

RENAME NAMEOLD.EXT NAMENEW.EXT

or:

RENAME B: NAMEOLD.EXT=NAMENEW.EXT

These files do not exist on your MS-DOS disks, but if they did, the computer would take the file named NAMEOLD.EXT and rename it to NAMENEW.EXT. Note the use of the drive name. If the file you want to rename is on a drive other than the default drive, then the drive name must be used. Likewise, you must use the correct directory (see the discussion on multiple directories).

You may use either a space or the equals sign (=) between the two names.

An alternative command to RENAME is REN. It does the same thing and may be used interchangeably with the longer command.

TIME

The TIME command allows you to display and/or change the time that is currently stored in your computer. The command will be executed when you enter TIME and press the RETURN key. The computer will display the current time and prompt you for a new entry.

If you press the RETURN key without making any entry, the computer will not make any change to the current time.

You will use the format H:M:S.C to enter the time, where H is hours

(0 to 23), M is minutes (0 to 59), S is second (0 to 59), and C is tenths of a second (0 to 9). Minutes, seconds, and tenths of a second are optional and may be omitted. The separators, colon and period, must be used exactly as shown or else the following error message will be displayed.

Invalid time

Enter new time:

Z100 Manual

Disk Operating System

Page 2-

34

Some examples of valid entries and how they are stored in your computer follow:

Your entry: Will be stored as:

9 :1 5 9 : 1 5 : 0 0 . 0 0

9 :15 :30 9 : 1 5 : 3 0 . 0 0

9 : 1 5 : 3 0 . 5 9 : 1 5 : 3 0 . 5 0

14-2-3 1 4 : 0 2 : 0 3 . 0 0

TYPE

You can use the T Y P E command to display the contents of a file on the screen. By using the CTRL-P function, described earlier, you may also make a permanent hard copy on your printer.

If you want to look at the file TEXTFILE.TXT, you would enter the following command line.

TYPE TEXTFILE.TXT

The computer would then display the contents of the file on the screen. if you would want to temporarily stop the display, you could use the CTRLS function, described earlier.

VER

The VER command allows you to see the version numbers of the two hidden MS-DOS system files. Occasionally, some versions of application software will require that you know what version of MS-DOS is being used. To use this command, enter the following command line.

VER

The computer will display a message similar to the following.

IO.SYS Version 2.20

MS-DOS Version 2.11

Z100 Manual

Disk Operating System

Page 2-

35

VERIFY

The VERIFY command will force your computer to automatically verify that any information that it has written to the disk is correct. This process, often called "read after write," will cause the computer to read the information it has just written to the disk and compare it against the material it had written. That way, if a defective or damaged disk is being used in the disk drive, you will know it because the computer will generate and display an error message, describing the problem.

To enable this feature, you would enter the following command line.

VERIFY ON

To disable this feature, you would enter the following command line.

VERIFY OFF

VOL

Under MS-DOS version 2, you may uniquely identify each disk when you format it. This procedure is explained later, when the

FORMAT command is discussed in this chapter. A disk is identified as a "volume" and when you give it a name during the format procedure, explained later when the FORMAT command is discussed in this chapter, that name becomes the volume name.

The VOL command will cause the computer to display the volume name )f the disk in the specified or default disk drive. For instance, if you wanted to identify the disk in the default drive (drive A), you would enter the follow-ing command line.

VOL

The computer would then display the following.

Volume in drive A is 890-434-09

Z100 Manual

Disk Operating System

Page 2-

36

Likewise, if you wanted to identify the disk in a drive other than the default drive, you would enter a command similar to the following. In this example, the command line is requesting the volume name from the disk in drive B:

VOL B:

The computer will respond with the following.

Volume in drive B is 890-435-02

Remember that these examples are representative of MS-DOS disk #1 (in drive A) and MS-DOS disk #2 (in drive B). The actual volume name may not exactly match that which is on your disks.

Other Internal Commands

You will find more complete instructions and how to use the options of the internal MS-DOS commands in the MS-DOS documentation.

External Commands

External MS-DOS commands are actually separate programs.

They are called commands because you execute them from MS-

DOS in the same manner as an internal command. Because they are separate programs, you can (selectively) remove them from your disk with the ERASE command. Or, if you prefer, you can selectively copy them (with the COPY command) to a new bootable disk as described in Appendix L.

All external commands will appear on the directory listings of a disk.

These programs are known as "utilities;" they are used for some common task, such as the FORMAT command, which is explained later in this chapter and illustrated in Appendix L.

The external commands included with MS-DOS are summarized in

Table 2-3.

Z100 Manual

Disk Operating System

Page 2-

37

Table 2-3: External MS-DOS Commands (Utilities)

THE COMMAND: TELLS THE COMPUTER TO:

APPLY

ASSIGN

BACKUP

CHKDSK

Execute another command with a substitution.

Assign a logical drive name to a Winchester partition.

Back up, or archive, one or more files.

Check the directories of a disk and report the status.

CIPHER

COMMAND

CONFIGUR

DEBUG

DISKCOMP

DISKCOPY

EDLIN

EXE2BIN

FC

FIND

FONT

Encrypt or decrypt a file using a keyword.

Make executive calls on resident commands.

Configure the system according to specific parameters.

Load and execute the system debugger.

Compare the contents of two disks to see if they are identical.

Duplicate the contents of one disk onto another.

Load and execute a line editor.

Convert an executable file (EXE) to a binary file (COM).

Compare the contents of two files and list the differences.

Search for a specific string of text.

Load and execute the font editor or load an alternate character set.

LIB

LINK

MAP

MORE

PRINT

PSC

RDCPM disk.

RECOVER

RESTORE

SEARCH

SORT

SYS

Load and execute the library utility.

Combine several object modules into one relocatable load module or run file.

Temporarily reassign disk drive names to other disk drives.

Display output one screen at a time.

Print the contents of one or more files on the printer.

Print the contents of the screen on a printer.

Copy the contents of a CP/M disk or file to an MS-DOS

Recovers specified file(s) that had previously been erased or deleted from a directory.

Restore one or more files from the files created with the

BACKUP command.

Locate file(s) with the directory structure.

Sort a data file.

Transfer the current system files (IO.SYS and MSDOS.SYS) to the specified drive.

Only the most commonly-used commands are discussed in this manual. Those commands discussed here and the other external commands not discussed in this manual are explained in the MS-

DOS documentation.

For the following discussions, place your MS-DOS disk #1 in drive

A and boot the system (if it is not already booted) from this disk.

Z100 Manual

Disk Operating System

Page 2-

38

CHKDSK

This command lets you check your disks to make sure they are still usable and do not contain any bad areas. Also areas of the disk that have been "garbaged" (made unusable) by software can be recovered with this command.

You should use the command occasionally on all of your disks to verify that they have not been damaged. A number of error messages may be displayed, depending upon the condition of the disk. These are discussed in the MS-DOS documentation.

After the error messages are displayed (if any), the CHKDSK command will display a status report on the disk. To execute the

CHKDSK command, you would enter the following command line.

CHKDSK

This will result in a display similar to the following.

Volume 890-434-09 created Nov 12, 1984 12:02p

322560 total

1024 directories

253952 in

34816 bytes available on disk

262144 bytes total memory

220768 bytes free

In this report, you will see the volume name and creation date and time. Following that is an analysis of disk usage, which includes total disk space, disk space occupied by hidden files, disk space occupied by branch directories, disk space occupied by bad sectors

(none are illustrated in this example since this disk contains no bad areas), disk space occupied by visible files (called user files), and the amount of remaining disk space. The system characteristics contain the total amount of memory in the system

(this example is equivalent to a system with 256 kilobytes of memory) and the amount of free memory that is not used by MS-DOS.

Z100 Manual

Disk Operating System

Page 2-

39

.

.

.

.

The system reports three hidden files. Earlier in this chapter, you were told there were two hidden files on the disk: IO.SYS and

MSDOS.SYS. The third file is a directory entry that is occupied by the name of the volume. Since this directory entry is not displayed as a visible file, it is considered by CHKDSK to be a hidden file.

If run CHKDSK on a formatted, but unnamed system disk, you would see the following report: bytes space

32768 bytes in 2 hidden files

17408 bytes in 1 user files

272384 bytes available on disk

262144 bytes total memory

As you can see from this report, there are only two hidden files.

Also missing is the volume name and creation date and time.

Next, when you read about the FORMAT command, you will want to make a practice of naming each disk you create.

FORMAT

The FORMAT command is used in the backup procedure explained in Appendix L. As is explained in that text, FORMAT organizes your disks so they can receive files of data and programs. No check is made to see if the disk to be formatted contains data, so be sure that you know that the disk does not contain vital information.

This command also puts information in the area of the disk which normally holds the operation system. If you try to boot your computer with a disk that has only been formatted and does not contain an operating system, the following message will appear.

No system

Z100 Manual

Disk Operating System

Page 2-

40

If you get this message, you will have to press both the CTRL and

RESET keys at the same time to reset your computer. Then you can place a system disk in drive A and properly boot the system.

Incidentally, the term "system disk" refers to any disk with the operating system on it.

When you use the FORMAT command to prepare system disks, you place the operating system on the new disk with a /S. The slash and letter are identified as a "switch," a term which is used to identify any combination of symbols and letters that modify a command.

The switches for the FORMAT command are summarized in Table

2-4.

Table 2-4: FORMAT Switches

USE: TO CAUSE FORMAT TO:

/A Format 8-inch disks as single-sided, single-density

/C Clear the directory only. Do not reformat the disk.

/M Format only one side of the disk.

/N Suppress all prompts. If you use this switch, you must place the disk in the disk drive before you execute the command.

/S Record the operating system on the disk.

/V Verify that each track and sector is usable and lock out any tracks and/or sectors that are not usable.

/9 Format the disk with nine sectors per track, increasing the disk capacity to approximately 360 kilobytes. The normal density is 8 sectors per track which results in disk capacities of about 320 kilobytes.

The switches which you will be using the most often are: /S to record the system files on the disk, /V to verify that the disk is good and to lock out any bad tracks or sectors, and /9 to increase the density of the disk to 9 sectors per track.

In this section, you will be shown two examples of how to use the

FORMAT command. In the first example, the command line will cause the computer to format a data disk, one which contains no operation system. In the second example, you will format and produce a bootable system disk.

Z100 Manual

Disk Operating System

Page 2-

41

To format a data disk in drive B, enter the following command line.

FORMAT B:/V

To format a bootable system disk in drive B, enter the following command line.

FORMAT B:/V/S

In both cases, the computer will display a message similar to the following.

FORMAT version 2.20

Copyright(C) 1984, Zenith Data Systems Corporation

Insert new disk in drive B and press RETURN when ready.

When a disk has been formatted that will have the operating system on it, you will see the following message on the screen.

System transferred

After the system has been recorded on the disk or, for a data disk, after it has been formatted, you will see the following prompt on your screen.

Enter desired volume label (11 characters, RETURN for none)?

This is the only place that you can assign a volume name to your disk. Remember that the volume name is displayed by the

CHKDSK and VOL commands.

You may enter up to 11 characters, consisting of letters, numbers, spaces, underlines, and/or hyphens. All other characters are illegal and if you try to use one of them in your label, the computer will display the following error message.

Invalid characters in volume id

Enter desired volume label (11 characters, RETURN for none)?

Z100 Manual

Disk Operating System

Page 2-

42

It is a good idea to enter a volume name (label) that is similar to the label you prepare for the disk. However, be aware that 11 characters are a very limited number of characters that you can use for the name, so carefully plan what you want to enter.

Once a disk has had a name entered onto it, the only way the name can be changed is to reformat the disk.

After you have entered the volume name, the computer will then display a report on the amount of disk space used and available. For a system disk formatted with 8 sectors per track, the computer will display the following.

322560 bytes total disk space

50176 bytes used by system

272384 bytes available on disk

For a data disk formatted with 9 sectors per track, the computer will display the following.

362496 bytes total disk space

362496 bytes available on disk

Finally, the computer will prompt you with the following message. It is asking you if you want to format additional disks, using the same parameters (specifications) that you specified in the original command line.

Do you wish to format another disk (Y/N)?

Press the Y key if you wish to format another disk using the same disk drive and parameters that you specified in the command line. Otherwise, press the N key if you do not want to format another disk using the same drive or parameters. The computer will either prompt you to insert a new disk in the specified drive or return you to the MS-DOS prompt. Note that you do not have to press the RETURN key for this prompt.

Z100 Manual

Disk Operating System

Page 2-

43

SYS

From time to time, improvements and/or enhancements are made to the operating system. When this happens, you can use the SYS command to copy the new system onto your existing disks.

Refer to your MS-DOS documentation when you need to use the

SYS command.

DISKCOPY

The DISKCOPY utility is a program that, once loaded into your computer, will allow you to easily duplicate disks. It contains its own formatting routines, so the destination disks to not have to be previously formatted. However, no check is made to see if the destination disk contains data, so be sure that you know that the destination disk does not contain vital information.

The DISKCOPY program may be used with one switch, the /V. This switch adds a verification cycle to the disk duplication process, making sure that the destination disk matches the source disk.

To use the DISKCOPY program, enter the following command line.

DISKCOPY/V

The computer will display a message similar to the following.

DISKCOPY version 2.20

Copyright(C) 1984 Zenith Data Systems Corporation

Source drive name? (A-H) _.

Press the key that corresponds to the drive which will contain your source disk. The next prompt will be similar to the following.

Destination drive name? (A-H) _.

Press the key that corresponds to the drive which will contain your destination disk. The computer will then display a message similar to the following,

Z100 Manual

Disk Operating System

Page 2-

44 indicating the source drive name and the destination drive name.

For instance, if you pressed the A key for the source drive and the

B key for the destination, the display would be similar to the following.

Place the source disk in A and the destination disk in B.

Press RETURN when ready.

NOTE: The DISKCOPY utility will not copy one disk size and type

to another. It will only copy disks with identical specifications. In other words, you cannot use DISKCOPY to copy a 5.25-inch disk to an 8-inch disk or v ice versa. The same is true of the Winchester; you cannot copy to or from a Winchester partition using DISKCOPY.

Place your source and destination disks in their respective drives and press the RETURN key. The display will show the following messages as the destination disk is formatted, the source disk information copied to the destination disk, and the two verified.

Formatting Destination...

Copying...

Verifying...

When this procedure is complete, you will be prompted with a message similar to the following.

Do you wish to copy another disk (Y/N) ? <N>

If "you have another disk to duplicate, press the Y key and then the RETURN key. You will again be prompted to enter the names of the drives that you want to use.

If you do not have any other disks to duplicate, press the

RETURN key. The computer will return to the MS-DOS prompt.

You may use the following command line as an alternative way to use DISKCOPY.

DlSKCOPY/V A: B:

Z100 Manual

Disk Operating System

Page 2-

45

In this command line, you are supplying the responses to the prompts as parameters. The source disk will be in drive A and the destination disk will be in drive B. The /V switch tells the computer to include the verify cycle in the procedure. You will see a message similar to the following in response to the command line.

DISKCOPY version 2.20

Copyright(C) 1984 Zenith Data Systems Corporation

Place the source disk in A and the destination disk in B. Press RETURN when ready.

When you have placed the appropriate disks in their respective drives, press the RETURN key to start the process. The computer will format, duplicate, and verify the disk as before. After the duplication process is completed, the computer will return to the

MS-DOS prompt. The following represent the messages you will see during the process and at the end.

Formatting destination...

Copying...

Verifying... A>

DISKCOMP

Should you forget to use the /v switch in the DISKCOPY command line, DISKCOMP can be used to verify that the two disks are identical. Likewise, if you have two disks that you suspect might be identical, DISKCOMP provides a quick method to check them out.

To use DISKCOMP, enter the following command line.

DISKCOMP

Z100 Manual

Disk Operating System

Page 2-

46

The computer will display a message similar to the following.

DISKCOMP version 2.20

Copyright(C) 1984 Zenith Data Systems Corporation

Source1 drive name? (A-H) _.

Press the letter that corresponds to the drive that you will use for one of the disks. The computer will display the following.

Source2 drive name? (A-H) _.

Press the letter that corresponds to the drive that you will use for the other disk. If you used drive A for the Source1 drive and drive B for the other, the computer will display a message similar to the following.

Place source1 disk in A and source2 disk in B Press RETURN when ready.

After you insert the disks into their respective drives and press the

RETURN key, the computer will start comparing the two disks and display:

Verifying...

If the two disks are not identical, the computer will display a message similar to the following.

Disk verify failure

Compare another? (Y/N) <N>

If the two disks are identical, the computer will prompt:

Compare another? (Y/N) <N>

If you have more disks to compare, press the Y key. If you do not, press the RETURN key.

Z100 Manual

Disk Operating System

Page 2-

47

Other External MS-DOS Commands

You will use the CONFIGUR utility to set up your system for a printer, modem, or other input/output devices. The complete instructions are provided in Appendix F of this manual. They are also provided in the MS-DOS documentation.

MAP is used to route disk input/output according to drive name from one drive to another. Certain application packages require the use of the MAP command on Winchester systems.

CREF, DEBUG, EXE2BIN, EDLIN, LIB, and LINK are related to program development procedures. ASSIGN, BACKUP, and

RESTORE are used with the Winchester disk system. APPLY,

CIPHER, FC, FIND, FONT, MORE, PRINT, PSC, RDCPM,

RECOVER, SEARCH, and SORT are used for the various purposes described in Table 2-3. Since these commands are usually not used on a day-to-day basis or for setting up a computer system, they are not discussed in this manual. You will find a complete discussion on these commands and the non-command files on your MSDOS disks in the MS-DOS documentation.

Chapter 3 Computer Programming Page 3-1

Computer Programming and BASIC

This chapter of the manual introduces you to program languages, programming, and BASIC. If you are familiar with these concepts, you may want to skip this chapter.

Programs

In everything we do, whether it is building a kit or driving a car, we use instructions. Computers also need instructions to operate. A program is a set of instructions that the computer can follow. Without instructions, a computer will only consume electricity, and will not calculate, display, or print information.

The following pages will introduce you to the concepts of writing computer programs. You will learn what a computer program is, what the different types of programs are, how to conceptualize and define a computer programming task, and how to translate that task into computer instructions in the BASIC programming language.

Program Types

There are many different types of programs. You have already used several: when you turned on the computer, when you loaded MS-DOS, and when you used the demonstration disk.

The first type of program you used is called a monitor, an elementary program used to get the computer started when it is first turned on. The computer's monitor program loaded the disk operating system from a disk. Then the monitor program turned control of the computer over to the operating system that was just loaded.

In the Z-100 computer, the operating system is oriented toward disk operation and manages the tasks of loading and storing application programs, utilities, and data files and provides for file maintenance. It has numerous built-in

commands, such as

COPY, RENAME, DIR, and TYPE. These were explained in the

"Disk Operating System" chapter of this manual.

Chapter 3 Computer Programming Page 3-2

Some of the external commands you gave to MS-DOS (such as

FORMAT) were actually separate programs, called utilities, that perform practical, often-needed jobs. Many utilities exist in computing; most are associated with operating systems, such as those used and supplied with MS-DOS.

Programmers

A programmer conceives, plans, designs, writes, tests, and corrects programs. A basic programming skill is the ability to logically "think through" a problem in order to accomplish a given task. If you enjoy problem solving and have a natural ability for it, then you may enjoy programming. You can effectively use the tools of programming if you have the desire to learn.

Programming Languages

Just as individuals are capable of speaking different languages

(such as English, Spanish, French, and so on), your computer is capable of using different programming languages. Some of these may be built around a particular computer and are referred to as being machine dependent. Other languages, such as BASIC, are more general and can be used on a large number of different computers.

Syntax

All languages, whether they are used by humans or computers, have rules of usage, called syntax. In order to use a language to communicate effectively. you must understand and use these rules.

Therefore, the syntax of a computer language must be followed very carefully; otherwise, the computer will not understand what you are trying to tell it. These rules sometimes vary slightly from one type of computer to another. While the basic elements of the language will remain the same, you will find slight variations in the way some parts are used.

Chapter 3 Computer Programming Page 3-3

Language Types

Refer to Figure 3-1 for the following discussion.

There are five different types of computer languages: machine languages, assembly languages, compilers, interpreters, and pseudo-compilers. The last three are usually referred to as highlevel languages.

• Machine language - The only language a computer understands is called machine language. Machine language instructions are very detailed and are written in a numeric form so the computer can act upon them directly. All other language types must be translated (by special programs) into the machine language code in order for the computer to carry out your instructions.

• Assembly language - Assembly language is similar to machine language, except it is written using symbols, called mnemonics, that look like abbreviations of common English words. For example, you could use LD for load, AD for add, and so on. Since mnemonics cannot be used directly by a computer, they must be translated (or assembled) into machine language code by a program called an assembler.

• High-level languages - High-level languages are people-oriented.

For example, you can direct your computer to do many things with very few instructions. Instead of detailing every step in machine language or assembly language, you may simply tell the computer to (for example) make D equal to 2 plus 3. The language you use will tell the computer how to do it and where to store the results.

While machine language and assembly languages are generally not known by a unique name, most high-level languages are. The names of the most common languages are BASIC, COBOL, and

FORTRAN. These names (and those of most high-level languages) are formed from the first letter or letters of a series of words that describe the language. Examples of how the names of these common high-level languages are formed are shown in Table 3-1.

Chapter 3 Computer Programming Page 3-4

Table 3-1: Sources of Some High-Level Language Names

LANGUAGE NAME SOURCE OF NAME (MEANING)

BASIC Beginner's All-purpose Symbolic Instruction Code

COBOL COmmon Business Oriented Language

Other languages, such as Pascal, are named after people associated with the computer industry. Still others, such as Forth, have no such roots, but come from a term applied during the creation of the language.

High-level languages must also be converted into machine language code.

This can be done by using one of the three processes shown in Figure 3-

1: compile, interpret, or both compile and interpret (pseudo-compile).

• Compiler - A compiler will take your instructions and compile them into machine language instructions. This may produce a certain amount of duplication in the machine language code to handle common functions.

The result is a machine language program that will usually be executed more slowly than a machine language or assembly language program that does the same thing. FORTRAN and COBOL are two examples of languages that are usually compiled.

• Interpreter - An interpreter works somewhat differently. Unlike the compiler, no translation takes place. Instead, the interpreter (which is a program itself) analyzes your instructions one by one and then it (the interpreter) completes the operation. Interpreters are usually much slower than compilers for two main reasons: the interpreter analyzes each instruction each time it is executed and the analysis itself usually takes longer than the execution. However, because there is no compilation step (as in the case of compilers), programs may be written and tested much easier. Several versions of BASIC for the Z-

100 are interpreters. (A version of BASIC is also available as a compiler.)

• Pseudo-compiler - A pseudo-compiler does not compile your instructions into machine code, but into a compact intermediate object code.

This code is then interpreted by a run-time program that will provide the necessary machine instructions to complete the operation. The runtime program executes the intermediate code in a manner similar to that of an interpreter and, as a result, runs slower than a true compiler.

Chapter 3 Computer Programming Page 3-5

The two advantages are mainly size (the intermediate code is compact when compared to the resulting machine code of a true compiler) and transportability (the intermediate code is machine independent and highly transportable). The UCSD Pascal P-code compiler and CBASIC are two examples of pseudo-compilers.

Chapter 3 Computer Programming Page 3-6

Understanding BASIC

BASIC is a high-level computer programming language specifically designed for people with no previous programming experience. The elements of the language were carefully chosen to make them easy to learn, use, and remember. Program commands use ordinary English words - PRINT, and GOTO (the words "go" and "to" are combined) - while numerical calc-ulations are written in a form much like that of simple algebra.

The original BASIC, developed in the 1960's at Dartmouth College, quickly grew to become one of the most popular of all computer languages because it is so easy to learn. Only COBOL, because of the established number of users, including financial and government institutions, is more widely used. BASIC is available as an interpreter, compiler, and pseudocompiler. Three versions

(BASIC-80, Z-BASIC, and GW-BASIC) for the Z-100 computer are interpreters. In the following discussion, either ZBASIC or GW-

BASIC may be used with MS-DOS. BASIC-80 must be used with

CP/M-85, which is not covered in this manual.

Getting Started with BASIC

While you can run BASIC directly from your distribution disk, we recommend that you prepare a working disk and use it instead.

The instructions in Appendix L will tell you how to build an elementary working MS-DOS disk. Take one of the disks that you developed using the procedure there and copy your version of

BASIC to your new disk. This process needs only to be done once since you can then duplicate the working disk as many times as you wish with the DISKCOPY command of MS-DOS.

To create a working disk with Z-BASIC or GW-BASIC on it, follow these steps:

Create an MS-DOS working disk as outlined in Appendix L.

Label this disk as "working BASIC disk #1."

Chapter 3 Computer Programming Page 3-7

Place working BASIC disk #1 in drive A.

Place your BASIC (either Z-BASIC or GW-BASIC) distribution disk in drive B.

Enter the following command line.

COPY B:*.* A:

Don't forget to press the RETURN key. The computer will display each file as it is transferred and give you a total count of all files moved to your BASIC disk.

When the MS-DOS prompt is displayed on your screen, remove the distribution disk from drive B and put it in a safe place.

If you want to make extra copies of your working disk, do so now by using the DISKCOPY command as shown in the "Disk

Operating System" chapter of this manual.

Loading BASIC

Because you may have either Z-BASIC or GW-BASIC, you need to be aware that these versions of BASIC load differently.

With a working copy of BASIC in drive A, follow the instructions in step 1 for Z-BASIC or the instructions in step 2 for GW-BASIC.

Step 1 - To load Z-BASIC, enter the following command line into your computer.

BASIC

Step 2 - To load GW-BASIC, enter the following command line into your computer.

BASICA

Chapter 3 Computer Programming Page 3-8

Press the RETURN key. The screen will clear and a message similar to one of the two following will appear.

Z-BASIC Rev. 1.0

[Z-D0S/MSDOS Version]

Copyright 1982 (C) by Microsoft

Created: 01-Oct-82 xxxxx Bytes free

Ok

GW-BASIC 2.00

(C) Copyright Microsoft 1983,1984

Zenith Version 2.00

(C) Copyright Zenith Data Systems 1984 xxxxx Bytes free

OK

The xxxxx in the message will be replaced by a number which tells you how many bytes are available for your BASIC programs. The Ok on the last line is the BASIC prompt. It has replaced the A> prompt of

MS-DOS.

BASIC Modes of Operation

BASIC has two modes of operation: the direct mode and the indirect mode. Whenever BASIC is waiting to go into one of the two modes, or waiting to run a program, the screen will display the Ok prompt.

• In the direct mode, you may enter instructions without line numbers. Then, when you press the RETURN key, the instruction is interpreted and executed immediately. While the results of arithmetic and logical operations may be displayed and/or stored for later use, the instructions themselves are gone and will not be executed again unless you re-enter them.

• In the indirect mode, you enter instructions with line numbers.

The instructions are not executed when you press the RETURN key, but are stored as a program (or part of a program) so that you may use them as often as you need them.

Chapter 3 Computer Programming Page 3-9

Statements

The BASIC language contains a large number of instructions, called statements. Each statement is an English word, abbreviation, or contraction (without punctuation), that tells the computer to do something. In this manual you will learn how to use several of these statements in the direct mode, and then you will be taught how to use these same instructions in a short, practical loan payback

(amortization) program.

NOTE: Whenever you are instructed to enter a line of BASIC into

your computer, press the RETURN key to complete the line.

Direct Mode Operation

With BASIC (either version) loaded into your computer, you are now ready to learn to use several BASIC statements. For each statement, you will see several examples. Try them and any others you may think of. You cannot harm your computer by making mistakes at the keyboard. If you do make a mistake, the computer simply will stop and display an error message, such as the following.

Syntax error

This tells you that you either entered your instruction(s) incorrectly or did something else wrong. Go back and try an example or two from this manual that is similar to your attempt. Carefully check to see how your attempt differs from those shown in this chapter. You should be able to locate the difference in syntax that is causing you the difficulty.

There is the remote possibility that some other error message will appear. If it does, refer to your BASIC documentation for more information.

Whenever you want to put information on the display of your computer, you will use some form of the PRINT statement. Enter the following BASIC line into your computer.

PRINT "HELLO, I AM YOUR Z-100 COMPUTER."

Chapter 3 Computer Programming Page 3-10

When you pressed the RETURN key, you computer displayed (or printed) the message between the quotation marks on the screen.

You will use the PRINT statement whenever you want to display a message or answer on the video screen. It has two common forms:

PRINT

PRINT data

A PRINT statement without data will cause your computer to space one line. Otherwise, the data will be printed.

The data could be (try the following):

1. A message enclosed by quote marks.

PRINT "HELLO, WHAT IS YOUR NAME?"

2. The result of a calculation.

PRINT 2*3+6

3. Information previously stored in memory.

A=4/7 PRINT A

4. Or, a combination of 1, 2, and 3.

PRINT "2 times 3 plus 6 is equal to "; 2*3+6 PRINT "While 4 divided by 7 is

";A;"."

NOTE: If the result of the last print statement is 0, then type the

following and then try the print statement again:

A= 4/7

Chapter 3 Computer Programming Page 3-11

Variables

The previous statement assigns the result of the calculation to a memory location represented by the letter A (called a variable).

Data contained within quotation marks are called constants because they are never changed by the computer. Variables are called such because the value contained in a variable can be varied by a computer program or command.

A variable is a symbol, usually represented by one or two letters or a letter and a number, although BASIC can recognize variable names up to 40 letters and numbers long (as long as the first character is a letter). This symbol is used to represent a memory storage location in your computer. The BASIC language will take care of placing variable values in memory and will keep track of where they are located.

Variable Types

BASIC will recognize four types of variables: integer numbers, singleprecision (up to seven significant digits) numbers, doubleprecision (up to sixteen significant digits) numbers, and string variables (a string variable will store alphabetic and numeric information).

In addition, each is represented by its own symbol. String variables

(or "strings" for short) are represented by the dollar sign ($), as in A$,

A1$, BH$, and so on. Numeric variables use the percent sign

(%) for integers, the exclamation point (!) for single-precision, and the number sign (#) for double-precision. Any variable without a declaration symbol (%, !, or #) will automatically be assigned as a single-precision variable.

Try the following combinations of assignment statements and PRINT statements.

PRINT "HELLO, WHAT IS YOUR NAME?"

B$=" (put your name here instead of this message)"

PRINT "HELLO, ";B$;". HOW ARE YOU?"

Chapter 3 Computer Programming Page 3-12

Programming in BASIC

As you know, a program in BASIC is a series of instructions. Up until flow, you have been giving your computer instructions directly.

Now you are ready to program your computer and learn some more BASIC statements.

A good place to start is to program your computer to accept and store your name in memory. You will use the same BASIC statements as you cud earlier, but will make some changes so you can enter the information from the keyboard.

In order for the computer to keep track of its place in the program, BASIC requires line numbers to be used. This way, you also tell your computer the sequence that you want it to use when it executes your instructions (program).

Using the Indirect Mode of BASIC

When you enter the following BASIC lines, you will notice that your computer will not execute the instructions when your press the

RETURN key. This is because you are now in the indirect mode of

BASIC. The lines are stored in memory and will be used as a program when you tell your computer to execute or run it.

Enter the following lines.

10 PRINT "HELLO, WHAT IS YOUR NAME"

20 INPUT A$

30 PRINT "HELLO, ";A$;". HOW ARE YOU";

40 INPUT B$

50 PRINT "I FEEL THAT WAY, TOO." 0 END

As you entered these lines, you may have noticed the INPUT statement. This statement allows you to enter information from the keyboard and tells your computer to store it in the variable (A$ or B$). When you run this program, you won't have to use quote marks, because you told your computer that you will enter a string of alpha and/or numeric characters by using the $ declaration symbol with the variable name).

Chapter 3 Computer Programming Page 3-13

The END statement tells your computer that it has come to the end of the program. It is an optional statement that may also be used (as needed) in the middle of a program.

Now try your program by entering the following direct command.

RUN

The RUN command tells your computer to execute the program that is stored in memory. The questions that are displayed (or "printed") on the screen are your creation. Any time you see a question of this nature, it is called an operator prompt. By generously using operator prompts, your program can become very "user friendly." In addition, important data will not be overlooked or get put in the wrong spot. Later in this chapter, you will use operator prompts to obtain entries for your amortization program.

Answer the questions as they are displayed (or printed) on your computer's video screen.

If you want to look at your program so far, enter the following command.

LIST

The LIST statement tells your computer to display the program on your video screen. If you want to look at a particular line, such as line 20, you would enter the following command.

LIST 20

If you want to look at a range of lines, such as line 20 to line 40, you would enter the following command.

LIST 20-40

Be sure to place a space between the statement and the line number, or a syntax error will occur. The reason for the syntax error is that many BASIC statements and commands must not be run together, or the interpreter would not understand them.

Chapter 3 Computer Programming Page 3-14

Saving and Loading Programs

When you turn your computer off, it will "forget" your program.

However, you can save the program for later use. Then you won't have to re-enter it into the computer each time you want to use it.

The general form of the SAVE statement is: SAVE "filename"

For your program, call it "MYPROG" and save it by entering the following command.

SAVE "MYPROG"

The SAVE command will record ("write") your program on the disk in the default drive. BASIC will also record the name of the program on the directory. To find out if the program is really recorded on the disk, enter the following command.

FILES

This command will read the directory of the disk in the default drive and list the name of each file on the screen.

Later, when you want to use your program, you can load it from disk into your computer's memory with the LOAD command. The general form

LOAD "filename"

To load your program, enter the following command.

LOAD "MYPROG"

The computer will respond by checking the directory for your program. When it finds it, BASIC will load your program into memory and display the following prompt.

Ok

Chapter 3 Computer Programming Page 3-15

However, if your program is not found in the directory (because it is not on the disk), your computer will respond with the following message.

File not found

This tells you that your program is not on that disk, or that your program was saved under a different name. You can either use the

FILES statement to get a listing of the directory or go back to MS-

DOS by entering the following command.

SYSTEM

This will return you to MS-DOS (and display the MS-DOS prompt). Now you can get a listing of your disk's directory and find your program. You will notice that a . BAS extension has been added to the program name and that the date and time you saved your program has been recorded with the directory information.

To go back to BASIC, enter the appropriate command: ZBASIC to load Z-BASIC, or BASICA to load GW-BASIC.

Again, as explained earlier in this chapter, the screen will clear and the opening BASIC information presented as before. BASIC is now ready to accept a program from the keyboard or from disk. Try loading your BASIC program, "MYPROG" and running it with the following command.

RUN "MYPROG"

The RUN command not only will run the current program in memory, but if a program name is placed behind it, it will clear out any previous program, load the one from disk, and execute it. The results are the same as if you had entered the following two commands.

LOAD "MYPROG" RUN

Designing a Program

Now that you have entered a program into your computer and run it, you are ready to design a program from scratch.

Chapter 3 Computer Programming Page 3-16

Designing a program takes quite a bit of forethought and consideration. The example that you will try on the next few pages will demonstrate the steps needed to design and successfully write a program. The five steps of program design are:

1. Program purpose - State the purpose of your program and define any unknown terms.

2. Breakdown - Break the purposes down into more detail and define any additional unknown terms.

3. Detailed steps - Isolate and state each step necessary to accomplish each stated purpose.

4. Conversion - Convert each step into one or more BASIC program lines. These lines may be entered into your computer as they are converted or written down on paper for entering later.

5. Testing - Using a set of known values, compute the results with a calculator or on paper and test your program. If your program produces the same results as you got with a calculator or on paper, then you know your program will work under those same conditions.

As an assignment, design an amortization (loan payment) table program. The following describes how you would perform each previously outlined

Program Purpose

For this step, you would state: "Compute and display a mortgage

(loan) amortization table. An amortization table shows each payment, the amount .icing to interest, the amount paid on the principal, and the new balance. It is (usually) based on an even number of payments per year."

Notice that an amortization table was defined and its contents listed in this step.

Chapter 3 Computer Programming Page 3-17

Breakdown

For the second step, you would state: "Given the yearly rate of interest, beginning balance, and amount of each payment, produce an amortization schedule for monthly payments. An amortization schedule is a table as explained in step 1."

Detailed Steps

Now list each step needed to accomplish the task. This is where you must think through each logical step. Notice in the following list, you actually are thinking of what must be done with the computer.

• Enter the beginning amount.

• Enter the monthly payment.

• Enter the annual interest rate.

• Test the annual interest rate. If it is greater than or equal to one, divide by one hundred to convert it to a decimal form. If it is less than one, then assume it is already in the proper decimal form.

• Compute the monthly interest rate (divide the annual interest rate by 12).

• Test the monthly payment. Calculate the first interest payment. If the monthly payment is less than the first interest payment, then print an error message and start over. (If the monthly payment is greater than the first interest payment, then the payments will eventually pay off the principal. No error will occur and the program may continue.)

• Print the headings: Payment #, Payment, Interest, Principal, and Balance.

• Make the payment counter (number) equal to one.

• Start the payment loop.

Chapter 3 Computer Programming Page 3-18

Calculate the interest (monthly interest rate times principal).

• Calculate the principal payment (payment minus interest).

• Calculate the new balance (principal minus principal payment).

• Test the new balance. If the new balance is negative or equal to zero (if this is true, the principal has been paid), then go to the steps at the end of the program. Otherwise, continue the program.

• Print the amounts: Payment #, Payment, Interest, Principal

Payment, and New Balance.

• Add one to the payment counter.

• Go back to the beginning of the "start payment" loop.

• The end-of-program steps start here.

• Subtract the overpayment (if any) from the payment. (At this point, the new balance will reflect the amount of overpayment as a negative number. This can be added to the payment, effectively subtracting the overpayment.)

• Subtract the overpayment from the principal payment.

(Again, the new balance will reflect the overpayment as a negative amount and therefore can be added to the principal payment.)

• Make the new balance equal to zero.

• Print the amounts: Payment #, Payment, Interest, Principal

Payment, and New Balance.

• End of the program.

Chapter 3 Computer Programming Page 3-19

Conversion

Before you start entering the program, you want to make sure your computer's memory is clear of any previous program (like the program you named "MYPROG"). To clear the memory of your computer, and prepare it for a new program enter the following command.

NEW

This statement is executed in the direct mode and clears out any previously stored program or data that was in memory. It does not affect any files or programs that may be stored on the disk. Your computer is now ready for your new program.

It is nice for the operator to see a message explaining what data you want entered into your program. Therefore, operator prompts have been added to your program in the appropriate steps.

• Enter the beginning amount.

10 PRINT "ENTER THE BEGINNING PRINCIPAL";

20 INPUT BP

• Enter the monthly payment.

30 PRINT "ENTER THE MONTHLY PAYMENT";

40 INPUT MP

• Enter the annual interest rate.

50 PRINT "ENTER THE ANNUAL INTEREST RATE";

60 INPUT AIR

• Test the annual interest rate. If it is greater than or equal to one, divide by one hundred to convert it to a decimal form. If it is less than one, then assume it is already in the proper decimal form.

70 IF AIR>=1 THEN AIR=AIR/100

Chapter 3 Computer Programming Page 3-20

• Compute the monthly interest rate (divide the annual interest rate by 12)

80 MIR=AIR/12

• Test the monthly payment. Calculate the first interest payment. If the monthly payment is less than the first interest payment, then print an error message and start over. (If the monthly payment is greater than the first interest payment, then the payments will eventually pay off the principal. No error will occur and the program may continue.)

90 FIP=BP*MIR

100 IF MP<FIP THEN PRINT "PAYMENT IS TOO LOW" : GOTO 10

• Print the headings: Payment #, Payment, Interest, Principal, and

Balance.

110 PRINT "PAYMENT # PAYMENT INTEREST PRINCIPAL

BALANCE"

• Make the payment counter (number) equal to one.

120 PC=1

• Start the payment loop.

• Calculate the interest (monthly interest rate times principal).

130 I=MIR*BP

140 I=INT(I*100+. 5) /100

• Calculate the principal payment (payment minus interest).

150 PP=MP-1

• Calculate the new balance (principal minus principal payment).

160 NB-BP-PP

170 BP=NB

Chapter 3 Computer Programming Page 3-21

• Test the new balance. If the new balance is negative or equal to zero (if this is true, the principal has been paid), then go to the steps at the end of the program. Otherwise, continue the program.

180 IF NB=<0 THEN GOTO 220

• Print the amounts: Payment #, Payment, Interest, Principal

Payment, and New Balance.

190 PRINT PC,MP,I,PP,NB

• Add one to the payment counter.

200 PC=PC+1

• Go back to the beginning of the "start payment" loop.

210 GOTO 130

• The end-of-program steps start here.

• Subtract the overpayment (if any) from the payment. (At this point, the new balance will reflect the amount of overpayment as a negative number. This can be added to the payment, effectively subtracting the overpayment.)

220 MP=MP+NB

• Subtract the overpayment from the principal payment. (Again, the new balance will reflect the overpayment as a negative amount and therefore can be added to the principal payment.)

230 PP=PP+NB

• Make the new balance equal to zero.

240 NB=0

Chapter 3 Computer Programming Page 3-22

• Print the amounts: Payment #, Payment, Interest, Principal

Payment, and New Balance.

25O PRINT PC, MP, I, PP, NB

End of the program.

260 END

Here are a number of explanations for various statements you find in the program.

• Line 70 - This is the first of several similar statements in your program. It is an IF ... THEN statement; it allows your computer to make a decision based on a comparison. In this case, the variable AIR contains the annual interest rate, which needs to be expressed as a decimal number for your program to function properly. If the number is greater than or equal to one, then the number is not a decimal number and needs to be divided by 100 to come up with the proper amount (i.e., 12%=.12).

• Line 100 - This is the next IF ... THEN statement. The test is relatively simple: If the monthly payment (MP) is less than the first interest payment (FIP), then the interest will not be paid and the loan will never be paid off. Since this condition needs to be conveyed to the operator as a message, the PRINT statement is executed. However, you also need to return to the beginning of the program for new entries. Two ways are open to you:

1. Stop the program with an END statement. Force the operator to start over by entering the RUN command in direct mode.

2. Return program control to the beginning of the program with a GOTH statement.

Chapter 3 Computer Programming Page 3-23

The second method is preferred, but the problem with either is how to execute more than one statement on a program line. The answer is the colon (:), which is used to separate BASIC statements. In the case of line 100, the message will be displayed and then the GOTO statement executed.

The GOTO statement tells the computer to transfer execution to the line specified rather than continue with the next sequentially numbered line.

• Line 140 - This line represents a standard used to round off to the nearest penny. The amount (represented here by the variable I) is first multiplied by 100 (to move the decimal point right two places) and then .5 is added to the result (to round off the next digit). Then the greatest integer is taken (by using the BASIC math function, INT), which will truncate (or eliminate) the fractional part of the number. The result is then divided by 100 to return the answer to two places.

• Line 180 - This is the third and last IF ... THEN test. In this line, instead of executing some kind of statement, as in line 70, a

GOTO statement sends execution of the program to line 220.

Incidentally, the GOTO statement may be omitted and BASIC will automatically assume that you want control transferred to the specified line. The line without the GOTO statement looks like this:

180 IF NB= <0 THEN 220

• Lines 190 and 250 - Here the comma is used between the variable names as both separators and to space the answers.

Whenever a comma is used, the cursor position goes to the next tab position (every eighth column).

• Lines 220 and 230 - These two lines may be slightly confusing as both add a negative number to accomplish a subtraction. This is a form of elementary algebra which your computer uses in its math.

Chapter 3 Computer Programming Page 3-24

When you run this program, you will find that some of the numbers don't end up expressed as cents as they should. The information in Table 3-2 will give you an idea of some of the answers you could expect to see printed on your screen.

Table 3-2: Sample Output from BASIC

YOUR ANSWER: WILL PRINT AS:

15

.

00 1 5

6.5

75.12

.10

75.12

.1

The solution to this problem is found in the form of a special PRINT statement. It is very complex, far beyond the scope of this discussion. So that you can see that it can be solved, enter the following three lines exactly as they appear.

5 A$=" ### $#,###.## $#,###.## $#,###.## $#,###.##"

190 PRINT USING A$;PC;MP;I;PP;NB

250 PRINT USING A$;PC;MP;I;PP;NB

Now run the program. If you get an error message, go back and carefully examine each of the three lines. Refer to your BASIC documentation for full details concerning the use of PRINT USING.

When you are satisfied with the operation of your program, save it on disk for use whenever you want to generate an amortization, or payment, table.

Chapter 3 Computer Programming Page 3-25

Here is a complete listing of the program that you finished entering. It does not contain any of the comments and should be identical to the display you see when you enter LIST and press the RETURN key.

5 A$=" ### $#, ###. ## $#, ###. ## $#, ###. ## $#,###.##"

10 PRINT "ENTER THE BEGINNING PRINCIPAL";

20 INPUT BP

30 PRINT "ENTER THE MONTHLY PAYMENT";

40 INPUT MP

50 PRINT "ENTER THE ANNUAL INTEREST RATE"; 60 INPUT AIR

70 IF AIR>=1 THEN AIR=AIR/100

80 MIR=AIR/12

90 FIP=BP*MIR

100 IF MP<FIP THEN PRINT "PAYMENT IS TOO LOW" : GOTO 10

110 PRINT "PAYMENT # PAYMENT INTEREST PRINCIPAL BALANCE"

120 PC=1

130 I=MIR*BP

140 I=INT(1*100+.5) /100 150 PP=MP-1 160 NB-BP-PP

170 BP=NB

180 IF NB=<0 THEN GOTO 220

190 PRINT USING A$;PC;MP;I;PP;NB 200 PC=PC+I

210 GOTO 130 220 MP=MP+NB 230 PP=PP+NB 240 NB=0

250 PRINT USING A$;PC;MP;I;PP;NB 260 END

Chapter 3 Computer Programming Page 3-26

Summary

This chapter of computer programming and BASIC has told you about:

• Program types: the monitor program, the operating system, and utilities.

• What a programmer does.

• Programming languages and syntax.

• Creating a working BASIC disk.

• Loading BASIC.

• The two modes of BASIC and how to use them.

• Entering, listing, saving, loading, and running your own BASIC program.

• Designing your own BASIC program from scratch.

As you start running BASIC programs and continue to learn more about programming, use your BASIC documentation. In there you will find more information and alternate methods to those shown in this manual.

We hope this chapter has helped you learn a little about programming. Your demonstration disk was written in Z-BASIC and has some very powerful "routines" that you can use directly or in your programs. More information about some of the special features of

Z-BASIC, GW-BASIC, and the demonstration programs will be found in Appendix K.

Good programming!

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement