- DL manuals
- Zenith
- Desktop
- Z-100 Series
- User Manual
Zenith Z-100 Series User Manual - page 4
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
Summary of Z-100 Series
Page 2
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....
Page 3: Z-100 Series
Z-100 series computers user's manual.
Page 4
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 b...
Page 6: Welcome
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 fu...
Page 7
Iv.
Page 8: Preface
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....
Page 9
Vi.
Page 10: Contents
Contents welcome iii preface v chapter 1 operation your computer system 1-1 setting up 1-3 back panel 1-3 power connection 1-7 keyboard 1-8 alphabetic keys 1 - 8 nonalphabetic keys 1-9 other keys 1-10 disk drives 1-13 disks 1-15 disk care 1-18 power up 1-19 z-100 demonstration disk 1-20 introduction...
Page 11
Ms-dos control key functions ........................................................................... 2-16 ms-dos commands ............................................................................................ 2-19 changing ms-dos prompts .......................................................
Page 12
Programming in basic ........................................................................................... 3-12 using the indirect mode of basic ........................................................................... 3-12 saving and loading programs ...........................................
Page 13
Appendix f system configuration the configur utility .............................................................................................. F-2 display 1 ............................................................................................................ F-3 display 2 ..................
Page 14
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 .................................................................................
Page 15
Figures 1-1: typical system components ................................................................1-1 1-2 all-in-one model ...................................................................................1-4 1-3: low-profile model .................................................................
Page 16
Tables 2-1: monitor command summary ................................................................. 2-3 2-2: internal ms-dos commands .............................................................. 2-22 2-3: external ms-dos commands (utilities) .............................................. 2-37 2-...
Page 17
1-1: ms-dos and cp/m-85 control functions ................................................... 1-1 1-2: ms-dos and cp/m-85 commands ............................................................. 1-2 j-1: convertible cp/m-80 software .................................................................. J-...
Page 19
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 in...
Page 20
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 built- in video display; it uses a separate video monit...
Page 21: Setting Up
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 pa...
Page 22
Chapter 1 operation page 1-4.
Page 23
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-...
Page 24
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 ...
Page 25
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 t...
Page 26
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 equ...
Page 27
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 ...
Page 28
Chapter 1 operation page 1-10 other keys the following discussions describe the normal function for each key. How- ever, 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 accompani...
Page 29
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,...
Page 30
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, re...
Page 31: Disk Drives
Chapter 1 operation page 1-13 disk drives 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 th...
Page 32
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...
Page 33
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-f...
Page 34
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...
Page 35
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...
Page 36
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 syste...
Page 37: Power Up
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 s...
Page 38: Z-100 Demonstration Disk
Chapter 1 operation page 1-20 z-100 demonstration disk introduction the z-100 demonstration disk will show you some of the power and ver- satility of your new computer. The demonstration disk contains three sections; the first two are automatic and will provide you with a good demon- stration of the...
Page 39
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 zenit...
Page 40: Master Menu
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 artwork. Interactive business graphics. Enter your choice : if you press the f1 function key, you ...
Page 41
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 th...
Page 42
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 ...
Page 43
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...
Page 44: In Case of Difficulty
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 im...
Page 45
Chapter 1 operation page 1-27 condition: no video (blank screen). Possible causes: 1. The brightness control may be turned down (either in the all-in-one model or external monitor). 2. The external monitor (low-profile model) may not be plugged in and/or turned on. 3. The external monitor (low-profi...
Page 46
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 d...
Page 47
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 sy...
Page 49: Introduction
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 comman...
Page 50
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...
Page 51
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 ...
Page 52
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 i...
Page 53
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) clos...
Page 54
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 ...
Page 55
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...
Page 56
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 num...
Page 57
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...
Page 58
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, se...
Page 59
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 cal...
Page 60
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 t...
Page 61
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...
Page 62
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...
Page 63
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 ...
Page 64
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. Remo...
Page 65
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 - i...
Page 66
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, whi...
Page 67
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 th...
Page 68
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 ...
Page 69
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 g...
Page 71
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: (1) copy oldfile.Ext=newfile.Ext (2) copy a: ...
Page 72
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 pre...
Page 73
Z100 manual disk operating system page 2- 25 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 config sys 12 9-06-84 2:36p bin 11-12-84 12:02p 5 file(s) 34816 bytes free the five columns of information repre...
Page 74
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 ...
Page 75
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 fil...
Page 76
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. I...
Page 77
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. ...
Page 78
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...
Page 79
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 8-20-84 10:14a psc 8-20-84 10:14a dev 8-20-84 10:14a chr 8-20-84 10...
Page 80
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 ...
Page 81
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...
Page 82
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...
Page 83
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 ...
Page 84
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 re...
Page 85
Z100 manual disk operating system page 2- 37 table 2-3: external ms-dos commands (utilities) the command: tells the computer to: apply execute another command with a substitution. Assign assign a logical drive name to a winchester partition. Backup back up, or archive, one or more files. Chkdsk chec...
Page 86
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 ...
Page 87
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 ...
Page 88
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 th...
Page 89
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. Forma...
Page 90
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. O...
Page 91
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 comma...
Page 92
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 d...
Page 93
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...
Page 94
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 c...
Page 95
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 documenta...
Page 97: Computer Programming
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 dri...
Page 98: Programmers
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 an...
Page 99
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 high- level l...
Page 100
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 fortran formula translator other languages, such as pascal, are named aft...
Page 101
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 a...
Page 102: Understanding Basic
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...
Page 103: Loading Basic
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 a...
Page 104
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,...
Page 105
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 s...
Page 106
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 p...
Page 107
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 a...
Page 108
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 i...
Page 109
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 tell...
Page 110: Saving and Loading Programs
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 statem...
Page 111
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 differen...
Page 112
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 ...
Page 113
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 ste...
Page 114
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 zer...
Page 115
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 c...
Page 116
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 o...
Page 117
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= • print the amounts: payment #, payment, intere...
Page 118
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 s...
Page 119
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 t...
Page 120
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 outpu...
Page 121
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$=" ### $#, ###. ## $#, ###. ## $#, ###. ## $#,###.##...
Page 122: Summary
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 basi...