A111DS T73T1S S

Laterenee ruD,j* cations

,,^ U) o NBS TECHNICAL NOTE 1184

U.S. DEPARTMENT OF COMMERCE/National Bureau of Standards

hQC

100

U5753

No .1184

1984

Utility Programs

for Producing

Camera Ready Illustrations

on a Microcomputer

and a Laboratory Plotter
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards' was established by an act of Congress on March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology

and facilitate their effective application for public benefit. To this end, the Bureau conducts

research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to promote public safety. The Bureau's technical work is per- formed by the National Measurement Laboratory, the National Engineering Laboratory, and

the Institute for Computer Sciences and Technology.

THE NATIONAL MEASUREMENT LABORATORY provides the national system of

physical and chemical and materials measurement; coordinates the system with measurement

systems of other nations and furnishes essential services leading to accurate and uniform

physical and chemical measurement throughout the Nation's scientific community, industry,

and commerce; conducts materials research leading to improved methods of measurement,

standards, and data on the properties of materials needed by industry, commerce, educational

institutions, and Government; provides advisory and research services to other Government

agencies; develops, produces, and distributes Standard Reference Materials; and provides

calibration services. The Laboratory consists of the following centers:

Absolute Physical Quantities2 — Radiation Research — Chemical Physics —

Analytical Chemistry — Materials Science

THE NATIONAL ENGINEERING LABORATORY provides technology and technical ser- vices to the public and private sectors to address national needs and to solve national problems; conducts research in engineering and applied science in support of these efforts; builds and maintains competence in the necessary disciplines required to carry out this research and technical service; develops engineering data and measurement capabilities;

provides engineering measurement traceability services; develops test methods and proposes

engineering standards and code changes; develops and proposes new engineering practices;

and develops and improves mechanisms to transfer results of its research to the ultimate user. The Laboratory consists of the following centers:

Applied Mathematics — Electronics and Electrical Engineering2 — Manufacturing

Engineering — Building Technology —- Fire Research — Chemical Engineering2

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts

research and provides scientific and technical services to aid Federal agencies in the selection, acquisition, application, and use of computer technology to improve effectiveness and

economy in Government operations in accordance with Public Law 89-306 (40 U.S.C. 759), relevant Executive Orders, and other directives; carries out this mission by managing the Federal Information Processing Standards Program, developing Federal ADP standards

guidelines, and managing Federal participation in ADP voluntary standardization activities; provides scientific and technological advisory services and assistance to Federal agencies; and

provides the technical foundation for computer-related policies of the Federal Government.

The Institute consists of the following centers:

Programming Science and Technology — Computer Systems Engineering.

'Headquarters and Laboratories at Gaithersburg, MD, unless otherwise noted; mailing address Washington, DC 20234.

2 Some divisions within the center are located at Boulder, CO 80303.
NATIONAL BUREAU QF STANDARDS

LIBRARY

Utility Programs for Producing °f oo

Camera Ready Illustrations on a :

' Microcomputer and a Laboratory Plotter

C. E. Dick

Center for Radiation Research

National Measurement Laboratory

National Bureau of Standards

Washington, DC 20234

MA,

°- I

PI ^

Q

6(J»£AU O*

U.S. DEPARTMENT OF COMMERCE, Malcolm Baldrige, Secretary

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Director

Issued January 1984

National Bureau of Standards Technical Note 1184

Natl. Bur. Stand. (U.S.), Tech. Note 1184, 59 pages (Jan. 1984)

CODEN: NBTNAE

U.S. GOVERNMENT PRINTING OFFICE

WASHINGTON: 1984

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 2040;

TABLE OF CONTENTS

Abstract 1 Introduction 2

Hardware 3

Software 3

Plotter Geometry and Variables 5

Running Draftsman 6

Making a Drawing 8

Sample Illustrations 9

Conclusion 12

Appendix A 13

References 16

Table 1: Main DRAFTSMAN Program Segments 17

Table 2: Instruction Files 18

Table 3: DRAFTSMAN/BPLOT Correspondence 20

Figure Captions 21

Listings 29

- 1 1 1 -

Utility Programs for Producing Camera Ready Illustrations

on

A Microcomputer and a Laboratory Plotter

C . E . Dick

National Bureau of Standards

Washington, DC 20 2 34

ABSTRACT

A collection of software routines is described that allows

the user to prepare camera ready illustrations in the laboratory

or office environment. These routines are written in APPLESOFT

BASIC and 6502 assembly code for the Apple II microcomputer which

is interfaced with an inexpensive digital plotter. Provisions are

made to draw figures composed of straight and curved line

segments, letter the figures with a variety of graphic arts fonts,

and save the figures on disk for later plotting or revision.

Key words: Apple II computer; camera ready illustrations; digital

plotter; graphic arts; microcomputer.

- 1 -
INTRODUCTION

In the last few years, microcomputers capable of controlling

inexpensive laboratory plotters have made possible the production

of camera ready illustrations in the laboratory and office

environment. Such a system has several inherent advantages; it

provides the author with rapidly generated illustrations at low

cost; it permits updating of drawings and figures as conditions

warrant; and it eliminates costly and time consuming drafting and

hand lettering by graphics artists.

The ingredients of such an in-house facility, in addition to

the microcomputer and plotter are:

a) a collection of mechanical drafting routines, and

b) a repertory of graphic arts fonts in digitized form.

The second of these requirements, a repertory of graphic arts

fonts, has been discussed in a previous report (1) which describes

the storage and retrieval of the Hershey fonts (2,3) of occidental

characters on the Apple II computer system operating under

DOS 3.3 (4). The first item, a collection of drafting routines,

is the subject of this report which describes a program named

DRAFTSMAN which is written in Applesoft Basic (5). This program

provides the capability of producing illustrations complete with

text on a digital plotter, editing them if necessary, and storing

them on floppy disk for later recall. In addition, an assembly

language program called BPLOT is provided to interface the Apple

II to a Hiplot (6) digital plotter. Although this program is

designed to drive a Hiplot plotter, it can be modified if

necessary to interface with other types of plotters. This

collection of' programs is designed to operate on an Apple II

computer equipped with at least 48K of memory. The following

sections describe the system in detail and include examples of the

types of illustrations that can be produced using this system.

* In this report, certain commercial products are referenced by

name. These references are for informational purposes only,

and do not imply that these products are necessarily the best

for the purpose and do not imply endorsement by NBS.

- 2 -
HARDWARE

As presently implemented in our laboratory, the system

operates on an Apple II computer system which is interfaced with a Houston Instrument Hiplot plotter (Model DMP-2) through an Apple

RS-23 2 serial interface (7) operating at 9600 baud. This plotter

has a useable plotting area of 134 x 260 mm (7.25 x 10.25 in.)

with resolution steps of 0.127 mm (0.005 in.) in both the

horizontal and vertical directions. The movement of the pen is

controlled by the series of ASCII characters p. .w, which move the

pen in the directions shown in Fig. 1, and the characters y,z

which raise or lower the pen respectively. (Parenthetically, all

figures in this report were drawn on this system.) For example,

outputting the character string "zpppqrrry" to the plotter will

lower the pen, advance the carriage 3 units up, 1 unit at an angle

of +45 , 3 units to the right, and finally, raise the pen.

Although the interface program named EPLOT described in the

Software Section was written to generate these specific ASCII

characters for this plotter, this program was written as an

assembly language routine not only for execution speed but so it- could be modified to support other plotters if desired.

The Apple computer is a standard model Apple II or Apple 11+

with at least 48 kbytes of RAM. The serial I/O interface card is

installed in expansion slot 2 although any slot other than could

be used with an appropriate modification of the driver software of

BPLOT. In addition, to facilitate the editing process, we have a printer interfaced to the computer in slot !r 1 although this is not

necessary for the execution of the programs.

SOFTWARE

The software package consists of several parts as mentioned

above. Listing 1 gives a catalog of the diskette containing this

system. As can be seen from an examination of this listing, the

primary routines for generating the illustrations are contained in

an Applesoft basic program called DRAFTSMAN which is the greeting

- 3 -
program for the diskette. In addition, there are twenty two text

tiles which contain the digitized Hershey fonts (1), the binary

file PPLOT which contains the output driver, and five binary files

labeled INSTR.l to INSTR.5 which are used to supply instructions

to users of the system but are normally not needed to execute the

programs. These files occupy 263 sectors of the diskette leaving

approximately 20C sectors available for storing illustrations

produced using the system.

The Applesoft code of DRAFTSMAN is given in Listing 2. A

Pascal extension of this program which includes routines to input

data from peripheral devices, edit the data, and plot it is

currently being debugged and documented (8). The variables used

in DRAFTSMAN are documented in Listing 3 which was produced by the

variable documentation program of Wagner (9). Reference to this

listing will be helpful to understand the program structure of

DRAFTSMAN.

As c^n be seen from an examination of the program, DRAFTSMAN

is composed of a number of inter-related segments. The principal

segments and their corresponding line numbers are given in

Table 1. In addition, in Table 1, a name is listed for each

segment of the program. Although these names are meant only for

reference in the discussions that follow, some of them are used as

procedure names in the forthcoming Pascal version (8).

Tn addition to the DRAFTSMAN program, the binary program BPLOT

is needed, to interface between DRAFTSMAN and the Hi plot plotter.

An assembled listing of this program as compiled with the

Microproduc ts assembler (10) is discussed in some detail in

Appendix A. This program uses double precision values for the x- and y-coord i nates to calculate the output string of ASCII

characters which are stored in a character table beginning at

memory location 34304 ($8600). A command to output this character

string results in the sequential outputting of these characters

using the ROM based software supplied as part of the Apple serial

I/O card located in slot \7. (7). (A CALL to the location $C200

- 4 -
results in the outputting on the RS-232 line of whatever byte is

contained in the Apple's 6502 microprocessor's accumulator.)

Finally, the remaining files are used to supply the appropriate

Hershey fonts (1,2) to the program or to provide the user with

directions on how to communicate with the program. The uses of

these files will be more fully documented in the sections which

describe the execution of the program.

PLOTTER GEOMETRY AND VARIABLES

In order to understand the operation of the DRAFTSMAN program

it is neccessary to be familiar with the coordinates of the

plotter system. Figure 2 illustrates these coordinates and some

of the variables used in the software programs. The origin of the

coordinate system is in the lower left hand corner (0,0) and the

x- and y-axis form an orthogonal coordinate system in the usual

sense. Since the plotter has a resolution of 200 steps per inch,

the variables XD and YD are used to record the current pen

position from the origin. Thus in Fig. 2, for example, the point

(3,2) which is 3 inches from the origin in the x-direction and 2

inches in the y-direction, has an XD value of 600 (3x200) and a YD

value of 400 (2x200). For convenience in returning the pen to

known locations in the plot, the program allows for the definition

of any point as a reference origin. These reference points may be

stacked up to 9 levels deep and the variable R keeps track of this

stacking. The arrays H(R) and V(R) are used to store the offset

of the last defined reference location from the one preceding it.

Thus in Fig. 2, if the point (3,2) is defined as the current

t origin, the value of R is incremented (R=l) and the offsets to the

previous origin (0,0: R=0) are stored as H(0)=600 and V(0)=400.

If the pen is subsequently moved to a new location, (6,3), the

variables XD and YD contain the plotter offset to the last defined

origin as shown on the figure. The variables LX and LY are used

to store the total offset of the current pen location from the

lower left corner of the plot, (0,0) , and are used to keep the pen

from overflowing the plotter limits. Since the useful plotting

- 5 -
area of this particular plotter is 10.25 in. horizontally by 7.25

in. vertically, the program ensures that the values of LX and LY

are in the ranges from 0-2050 and 0-1450 respectively. Finally,

for convenience, the program also recognizes the directions L,R,U,

and D as shown in F i g . 2

.

RUNNING DRAFTSMAN

The DRAFTSMAN program is executed with the usual Applesoft RUN

command or by booting the system with the diskette in the boot

disk drive. After the presentation of the logo, the user is asked

whether directions are needed. If the directions are requested,

the program sequentially loads the binary files INSTR.l to INSTR.5

into the portion of memory reserved for the first page of text

($0400-$07FF) where they are automatically displayed by the

monitor. Table 2 gives a listing of the instructions that are

displayed during this process. As can be seen from this table,

the~prograrn is designed to recognize mnemonic commands issued by

the user to move the pen on the plotter or to perform certain disk

or utility commands. These instructions will be covered in detail

in the following section.

After the direction cycle is completed, the binary output

driver is loaded by the program segment Bload and variables are

assigned to allow the program to communicate with this I/O and

vector generator routine. In addition, the user is requested to

position the plotter carriage in the lower left corner (the

location 0,0 of Fig. 2). The program is designed so that all

variables are initialized with this location as a starting point.

Finally, the user is requested to input the drive number of the

diskette which will be used to either store or retrieve drawings.

The Initialize section of the program completes the remaining

variable initialization and inquires whether the drawing has been

previously saved on the diskette. If the drawing is on diskette,

the Load section of the program inputs the text file containing

the instruction set describing that drawing and the values of the

variables shown in Fig. 2 at the time the drawing was saved. At

- 6
the end of the load, the user has the option of specifying whether

the drawing is a new print <N> or a continuation of an old print

<C>. If the new print option is chosen, the previously saved

drawing will be redrawn up to the point where it had been saved

and control will be returned to the user. If the continuation

option is chosen, the pen can be placed in the appropriate

location and control is immediately returned to the user to append

further instructions. If the drawing is not one that has

previously been saved, control is immediately returned to the user

for the creation of a new drawing.

The Input section of the DRAFTSMAN program is the section in

which the user enters the actual instructions to be executed.

These instructions are input as text strings into an array named

B$(J) which has a maximum size of 475 elements. In the rare case

where a drawing might take more than 475 instructions to specify,

it can be broken down into two or more parts which can be

sequentially plotted using the continuation option described

above. Instructions are input in response to the prompt

"INSTRUCTION NO. <J>" and are terminated by a carriage return.

Upon termination of the input instruction, the instruction string

is decoded and the appropriate flags are set to indicate the

operation to be performed. These flags are decoded by the Decode

section and branches are made to various subroutines (Fonts, Text,

Circle, X-Y etc.) to calculate the values of the x and y offset

coordinates and the pen position (up, down). These values are then

passed to the Out section which calls the appropriate routines in

BPLOT to calculate and output the appropriate ASCII text string

to the plotter. After the current instruction is decoded and

executed, the next instruction is requested and the process begins

again.

The program is halted through the Exit routine which is

called by the input instruction "Q" and which then gives the user

the option to save the current drawing. The remaining sections

are transparent to the user and are used to handle DOS errors

- 7 -
(Error), check for input syntax errors (Syntax), or to edit the

instructions (Edit).

MAKING A DRAWING

As described above, instructions are input in the form of easy

to remember mnemonics which are interpreted by the program to

perform the desired functions. These mnemonics, listed in

Table 2, can be divided into the following categories:

a) Instructions which change the pen position or move the carriage

on the plotter. These instructions are those listed under the

MULTIPLE COMMAND category of Table 2. In general, these

commands may be combined to provide multiple instructions in

one line. For example the command PD3.1CR is interpreted to

move the carriage 3.1 centimeters to the right with the pen

down (i.e. a 3.1 cm long line will be drawn on the paper.) The

DIRECT MOVEMENT command X#Y# is also of this type and is

listed in a separate category in the table for emphasis

since it is frequently used. It should also be noted that the

pen may also be moved at an angle for a given distance by the

A## command when combined with a distance as in PU3IA45 which

will move the carriage 3 inches at an angle of +45 to the

positive x-axis with the pen up. Special instructions for the

circle command, @, are listed in Table 2 and allow the drawing

of circles, ellipses, and arcs of circles or ellipses. It is

also not necessary to specify the scale factor, I or C, in each

command as this factor will remain at its last specified value

unless explicitly changed. The default value for this

parameter is inches. In the same fashion the pen is also left

in its last position when drawing lines unless explicitly

changed. The pen default is "pen up", and the pen returns

to this value at the completion of the arrow, circle, erase,

and home commands.

b) Instructions which are used to perform specific actions and are

listed in Table 2 under CONTROL COMMANDS. These commands are

entered as listed in the Table except for the dotted line

- 8 -
command, *, which may be combined with an optional dot length

and a command from the commands above. (For example, the

instruction .Q5*IX2Y1 will draw a dotted line from the current

carriage position to the point 3 inches to the right and 1 inch

up with .05 inch long dots and spaces.) The font command is

used to enter the Hershey fonts from the diskette and the text

and size commands are used to enter text or compute the length

of a text string. Table 2 h^s information on the use of these

commands. Figure 3 illustrates the Hershey characters that are

currently available to the program. Finally, the erase

command, E, will remove the last instruction input from the

command sequence and reverse the pen movements associated with

the deletion. If this command was one which plotted a line

with the pen down however, that line will still be on the

paper and must be manually erased or the figure redrawn.

c) Finally, there are the utility commands, ?, V, and Q. The ? command results in the display of the instruction files

TNSTR.l through INSTR.5 on the monitor. The verify command,

V, allows the user to print out all the instructions entered

prior to its execution on either the monitor or a printer and

edit them for errors if necessary. Finally, the quit command,

Q, terminates the input phase and allows for the saving on

diskette of the instruction set for the drawing. None of

these commands is saved as a permanent part of the instruction

array and are thus not part of the permanent record of the

drawing

SAMPLE ILLUSTRATIONS

In order to understand the procedures associated with the

production of a finished drawing, this section will present some

examples of illustrations made using the system. Figure 4 depicts

a stylized drawing of a soup can produced with the DRAFTSMAN

program. The instruction set given in Listing 4 was used to

generate this drawing. As can be seen from this listing, a series

of 23 instructions was used for this particular figure. With the

- 9 -
pen in the initial position, the lower left corner of the plotting

area, Instructions and 1 define this location as the origin.

The next instruction requests the input of the character fonts

designated in Instructions 3-7. These fonts are thus made

available for the input of text to the program and are taken in

this particular case from the Index fonts of Fig. 3. After the

fonts are loaded, the carriage is moved with the pen up 3 inches

in both the x and y directions (#8). This point is then

designated as a new origin (#9) and the carriage is then moved up

2 inches (#10). With this point as the center, Instruction #11 is

used to draw an ellipse with a major axis of 2 inches and a minor

axis of 0.7 inches to represent the top of the can. At the

completion of the ellipse, the pen is left in the up position, and

Instruction No. 12 moves the pen to the right hand edge of the

ellipse. From this point a 3 inch line is drawn to represent the

side of the can (#13). Notice that a pen position command is

necessary in this instruction to change the status of the pen.

Instruction No. 14 moves the carriage with the pen up to the other

side of the can and that side is subsequently drawn (#15). The

H(ome) instruction then moves the carriage to the last defined

origin which is on the centerline of the can and 1 inch above its

base. This instruction has the effect of decrementing the arrays

that refer to the origin so that the next home command will refer

back to the point at the origin of the plotter (the lower left

hand corner). Instruction No. 17 moves the carriage to the center

of the can's base. From this point, the front edge of the can is

drawn (#18) as a solid line, and the hidden back edge is drawn as

a dotted line (#19). The carriage is then moved to the center of

the can (#20). At this point in the input sequence, a size

command was used to determine the length of the text string that

was to be entered here. This command does not appear in the

stored instruction sequence but it returned the value 1.24 inches

for this length. To center the label, the pen is then moved .62

inches left (#21) and the text is entered. Stored text commands

always begin with W to indicate that K'ords are to be plotted and

- 10 -
the last two numbers indicate the size and direction to plot the

text. In this case the size -is A and the direction is

(horizontal). Vertical characters are indicated by a 6 in the

last character. The figure is now complete and the carriage is

returned to the origin of the plotter by the H(ome) command ( #23 )

.

This drawing has several errors, the dotted ellipse

representing the bottom of the can (1119) has the wrong minor axis,

and the label reads SOAP instead of SOUP (#22) . Figure 4b shows

the can plotted correctly with the errors corrected by use of the

V(erify) utility. The instructions for this print are given in

Listing 5. Notice that Instruction No. 8 has also been changed to

start the figure at an x value of 7 inches so that both figures

could be drawn on the same print. Mso, a number of Instructions

have been added to draw a border around the figures and label the

two versions as (a) and (b) . Figures 5 thru 7 illustrate some drawings that have been

produced using these programs. Figure 5 illustrates a drawing

produced for a machinist to fabricate an adapter flange for a vacuum system used in our laboratory. Of particular interest is

the use of the > (arrow) command to draw arrows on some of the

lines. This command is designed to draw an arrow with a specified

size either in the direction of last carriage movement (>) or

antiparallel to that direction (<). Figure 6 shows a pie chart

which details the usage of one of the accelerators in our

laboratory. The draw at an angle command (AH) was used in this

print to divide the circle into the pie shaped segments. Finally,

Figure 7 depicts a schematic of the safety interlock system for an

electron accelerator. This figure utilizes essentially the entire

gamut of instructions available to produce a schematic electrical

circuit drawing which can be saved on diskette as a permanent part

of the documentation for the accelerator. These figures are meant

to be illustrative of some of the capabilities of the system.

Ultimately, the uses are limited by the imagination of the user.

- 11 -
CONCLUSION

We have developed a software system that allows the Apple II

computer system to produce illustrations on an inexpensive digital

plotter. This system can be used to produce camera ready figures

for inclusion in technical reports, for documentation, or for

preparing vue-grap'hs or machinists prints. The figures can be

constructed of straight line segments or portions of ellipses or

circles and can be labeled with any of more than 700 characters

and graphic symbols. The system can be improved in several

aspects by rewriting some of the routines in assembly language for

faster execution, particularly the segments used to generate

circles and ellipses. The interface driver to the plotter is

written in ^502 assembly code and can be modified to interface to

a variety of laboratory plotters. At present, a Pascal version of

this system is being incorporated into a mul t i segmented program

designed not only to provide drafting capabilities but data input

and manipulation as well.

- 12 -
APPENDIX A

The Apple II computer and the Hiplot plotter are interfaced

through the binary I/O program BPLOT. This program is designed to

take the values of the x and y offsets and the proper pen position

(up or down) generated by DRAFTSMAN and generate the appropriate

series of ASCII characters to control the plotter as shown in

Fig. 1. Although these functions could be written in Applesoft,

Basic routines to generate these characters are prohibitively

slow, so the driver was written in 5502 assembly code. This

choice has the added advantage of permitting easier modification

to interface with different plotters without disturbing the

fundamental DRAFTSMAN program. Listing 6 gives a compiled version

of BPLOT using the Microproducts Assembler/Editor (10).

The DRAFTSMAN program interacts with the output driver BPLOT

through the series of variables and subroutines listed in Table 3.

The DRAFTSMAN program calculates the x and y offsets to the next

point to be plotted and converts them to double precision binary

numbers which have the high and low bytes HL, HK, VL, and VH which

are poked into the proper locations in BPLOT. The variable PC is

used to indicate the pen status, ANGLE specifies the angular

rotation (0=hor., 6=vert.), TIME specifies the delay between

successive character outputs, XVEC and YVEC are used to input the

Hershey character vectors,, and SIZE may be used to specify the

character size.

The program, BPLOT, is composed of a number of segments that

generate a table of ASCII characters to control the Hiplot

plotter, and output these characters to the plotter. The main

program , DRAFTSMAN, calculates the offset from the current

location to the next point as double precision (16 bit) binary

numbers which are poked into the locations $85D6-$85D9 as shown in

Listing 7. In the case of the Flershey characters, the X and

Y-offsets are poked into the single precision locations $8418 and

$842C. In this latter case, a subsequent CALL LGEN (line 8720)

converts these single precision values to double precision and

stores them in the appropriate locations. In both cases, the

- 13
Vector Generator routine is called (either directly from line 7140

or as an extension of LGEN) and a table of ASCII characters is

generated and stored in a table beginning at location $8600. This

table is generated by the assembly language routine beginning at

location $843F and is modeled after the Basic language routine

given in Listing 7. This routine which is included in the Hiplot

instruction manual (6) calculates the best straight line between

the current pen location and the location specified by the X- and

Y-offsets. Listing 7 indicates the correspondence between the

variables used in the Basic program and the variables and

locations of the BPLOT vector generator routine. The output table

begins with the pen control character ("y" or "z" to indicate pen

up or down) , and contains a series of characters from the ASCII

set "p".."w" to control the motion of the carriage. The table

ends with the ASCII character "x" to signify the end of the

vector. This routine makes use of standard double precision

routines to ADD ($8599), SUBTRACT ($85BC ) , and MOVE($85C7) double

precision binary numbers.

Once the table corresponding to the plotter movement is

generated, the PLOT routine ($83B8) outputs one character at a time to the plotter through the RS-232 interface installed- in slot

#2. Each character is output the number of times specified by the

parameter SIZE with a selectable delay between successive

characters. The table is output character by character until the

occurrence of the character "x" which signifies the end of the

table. At this point, the output is terminated, various locations

are restored to their initial values, and control is returned to

the calling program.

To modify this program for plotters other than the Hiplot

plotter, it is necessary to replace the vector generator

subroutine with a subroutine that will generate the appropriate

characters for the plotter of interest. In addition, the BPLOT

program contains two routines to accept a single character (CHAR)

and output it via the RS-232 serial port (ALPHA). Although these

- 14 -
locations are not used in DRAFTSMAN, they are available for other

programs which might incorporate the BPLQT program.

- 15 -
REFERENCES

1. C.E. Dick and J. Hilsenrath, "Utility Programs for Generating

the Hershey Character Fonts on Microcomputers and Laboratory

Plotters," NBS Technical Note 1176, June 1983, National

Bureau of Standards, Washington, DC, 20234.

2. A.V. Hershey, "Calligraphy for Computers," NWL Technical

Report No. 2101, August 1967, U.S. Naval Surface Weapons

Laboratory, Dahlgren, VA

.

3. N.M. Wolcott and J. Hilsenrath, "A Contribution to Computer

Typesetting Techniques: Tables of Coordinates for Hershey'

s

Repertory of Occidental Type Fonts and Graphics Symbols,"

NBS Special Publication No. 424, National Bureau of

Standards, Washington, DC, 20234.

4. "DOS 3.3", copyright 1980, Apple Computer Inc., 10260 Bandley

Drive, Cupertino, CA , 95014. Apple software product #A2L0036,

5. "Applesoft", copyright 1978, Apple Computer Inc.,

10260 Bandley Drive, Cupertino, CA, 95014. Apple software

product #A2L0006.

6. The plotter utilized is a Hiplot Model DMP-2 Digital Plotter,

manufactured by the Houston Instrument Co., One Houston

Square, Austin, TX, 78753.

7. Serial Interface Card, Apple Computer Inc., 10260 Bandley

Drive, Cupertino, CA, 95014. Apple hardware product ttA2L0008,

8. C.E. Dick, A Pascal language program for data retrieval,

storage, reduction, and plotting on a miocrocomputer and

laboratory plotter." In preparation.

9. "Apple-doc", software copyright 1979, Roger Wagner,

Southwestern Data Systems, Box 982, Santee, CA, 92071.

10. "6 Character Label Editor/Assembler", Version 6.1, software

copyright 1979, Microproduc ts Inc., 2107 Artesia Blvd.,

Redondo Beach, CA, 90278.

- 16 -
Table 1. A listing of the main program segments and the

corresponding line numbers for DRAFTSMAN.

Name Lines

Logo 10-180

Instr

500-560

Bload 1000-1100

Ini t

2000-2200

Input 3000-3390

Decode 3500-3730

Exit 4C00-4060

Fonts 5000-5350

Load 6000-6180

Save 6500-6610

Out 7000-7190

Text 8000-8190

Hershey 8200-8920

Display 9000-9070

X-Y

Rho

Error

Ci rcle

Dot

Edit

Syntax

10000-10050

11000-11030

12000-12120

13000-13180

15000-15070

16C00-16300

20000-20030

Program Function

Initialization, sets HIMEM, defines the DOS

token (D$), and prints the logo.

Retrieves the user instructions from binary

files INSTR. 1 to INSTR. 5 and displays them.

BLOADS BPLOT, initializes variables pointing

to locations in BPLOT, and requests disk #.

Main program start and variable init.

Sets save flag (SF) if input is from disk.

Main instruction input routine, requests

input from keyboard, decodes it and sets

appropriate plotting flags.

Decodes flags and instructions given in the

instruction input loop at 3000-.

Exit routines, saves appropriate variables

to prepare to save illustration on diskette.

Inputs Hershey fonts from appropriate files.

Inputs saved drawing from disk.

Saves drawing to text file on disk.

Output vector generator, calls appropriate

routines in BPLOT to generate and output

ASCII character string to the plotter.

Inputs text string to be plotted on plotter.

Decodes text string, calculates coordinates

for Hershey characters, and outputs them to

plotter

Displays text characters as decoded.

Decodes XY input instructions.

Calculates rho values.

Error handling routines.

Decodes circle, ellipse, and arc inputs.

Decodes dotted line output instructions.

Instruction editing and printing routines.

Checks input for illegal characters.

- 17 -
Table 2. A listing of the instructions input to the user from the

files INSTR.l through INSTR.5.

DRAFTSMAN INSTRUCTIONS

COMMANDS ARE GIVEN BY TYPING IN KEY LETTERS THAT THE INTERPRETER CAN TRANSLATE

TO MOVE THE PEN ON THE HIPLOT PLOTTER.

DIMENSIONS CAN BE SPECIFIED EITHER IN

INCHES OR IN CENTIMETERS.

COMMANDS OTHER THAN DISK COMMANDS MAY BE

COMBINED IN ANY ORDER IN ONE STATEMENT

SUCH AS PU3.5IA30 WHICH PARSES AS A PEN UP

MOVE OF 3.5 INCHES AT AN ANGLE OF 30 DEG.

THIS MAY ALSO BE WRITTEN A30PU3.5I ETC.

TO REVIEW COMMANDS ENTER <?> IN RESPONSE

TO PROMPT.

TO EDIT COMMANDS ENTER <V> IN RESPONSE

TO PROMPT.

KEY COMMAND EXAMPLE

***MULTIPLE COMMANDS***

A## MOVE AT ANGLE |#

@## DRAW CIRCLE W//RAD.##

C,I CENTIMETERS, INCHES

PU,PD PEN CONTROL UP/DOWN

R,L MOVE RIGHT, LEFT

*J,D MOVE UP, DOWN

> DRAW ARROW

***CONTROL COMMANDS**

* DRAW DOTTED LINE

E ERASE LAST LINE

SET CURRENT LOCATION AS ORIG i H RETURN TO LATEST ORIGIN

T INSERT TEXT

PA# CHANGE PEN SIZE (PAUSE)

F CHOOSE LETTER FONT

c CALC. LENGTH OF TEXT

***DIRECT MOVEMENT***

X#Y# MOVE IN STRAIGHT LINE TO

POINT X+DX, Y+DY IX3Y4

A45PU3I

(33. 1C

PU3CR

PD2CD

PU1IL

PD2CD

,5I>

. 5 * 1 1

R

E

N

H

T

PA2

F

S

- 18 -
SPECIAL INSTRUCTIONS FOR F (ONT) , P (AUSE) , T ( EXT)

AND S ( I ZE) COMMANDS

.

TEE F COMMAND ALLOWS THE CURRENT FONT TO

BE CHANGED. FOLLOW THE PROMPTS GIVEN.

THE PA COMMAND GIVES A BUILT IN PAUSE TO

ALLOW THE USER TO CHANCE THE PEN' OR FOR

ANY OTHER REASON.

TO ENTER TEXT VIA THE T COMMAND, THE DEFAULT MODE IS ALL CAPS, WHICH ARE SHOWN IN

INVERSE VIDEO. TO CHANGE TO LOWER CASE

AND VICE VERSA, USE THE <ESC> KEY AS A

TOGGLE. THE MODE REMAINS THE SAME UNTIL

TOGGLED AGAIN. GREEK LETTERS AND MATH

SYMBOLS ARE ENTERED BY PRECEDING THE APPROPRIATE KEY WITH EITHER A <CTRL-G> OR A

<CTRL-S> AND ARE SHOWN FLASHING.

THE S COMMAND CALCULATES THE LENGTH OF A

TEXT STRING FOR CENTERING PURPOSES.

SPECIAL INSTRUCTIONS FOR THE <? (CIRCLE) COMMAND

THE @ COMMAND WILL DRAW CIRCLES OF A GIVEN

RADIUS OR ELLIPSES WITH SPECIFIED MAJOR AND

MINOR AXES.

TO DRAW A CIRCLE WITH A GIVEN RADIUS, SIMPLY

SPECIFY THE RADIUS AND THE P SYMBOL: E.G.

Q2 OR 2@ WILL DRAW A. 4 IN. DIAMETER CIRCLE.

TO DRAW AN ELLIPSE, SPECIFY THE MAJOR AND

MINOR AXES SEPARATED BY THE @ SYMBOL: E.G.

(52P1 OR 2<?1@ WILL DRAW AM ELLIPSE WITH A

A IN. MAJOR AXIS AND A 2 IN. MINOR AXIS.

TO DRAW AN ARC OF A CIRCLE, SPECIFY THE

ANGULAR RANGE SEPARATED THE * SYMBOL:

E.G. 2@~3(Tl20 OR @2~30~120 WILL DRAW A

2 IN. ARC BETWEEN 30 AND 120 DEGREES.

SPECIAL INSTRUCTIONS FOR * (DOTTED LINE)

COMMAND.

ANY LINE CAN BE DOTTED BY INSERTING THE

* CHARACTER AND THE DOT LENGTH IN THE

COMMAND STRING. FOR EXAMPLE, THE COMMAND . 05*1R OR *.0 5R1 WILL DRAW A DOTTED LINE TO THE RIGHT WITH .05 IN. DOT

UNITS.

CAUTION!! CIRCLES AND ELLIPSES MAY ALSO

BE DOTTED, BUT THE DOT LENGTH HAS NO

MEANING AND YOU MAY GET A DIV BY ZERO

ERROR. TO AVOID THIS, JUST USE THE DOT

SYMBOL <*>, FOLLOWED BY THE CIRCLE

SYMBOL <@> AND THE RADIUS SUCH AS *@.5.

SIMILARLY, IN THE CASE OF ELLIPSES AND

ARCS, USE *@1(22 AND *@ . 5" 30~120 .

- 1'
Table 3. Correspondence of locations between DRAFTSMAN and BPLOT,

DRAFTSMAN

VARIABLE

OUT

ALPHA

SIZE

ANGLE

CHAR

TIME

LGEN

PC

XVEC

YVEC

VGEN

VL

VH

HL

HH

LOCATION

decimal

33720

3 3 793

33801

33802

33803

33804

33805

33811

33816

3 38 36

33855

34262

34263

34264

34265

BPLOT

VARIABLE

PLOT

OMECHR

SIZE

ANGLE

CHAR

DELAY

LETTER

PEN

XVEC

YVEC

GO

INPUT

YH

XL

XH

LOCATION

hexadecimal

$83B8

$8401

$8409

$840A

$840B

$840C

$840D

$8412

$8418

$842C

$843F

$85D6

$85D7

$85D8

$85D9

-20-
FIGURE CAPTIONS

Figure 1. A schematic illustration of the carriage movement and

pen position control generated on the Hiplot plotter

upon receipt of the ASCII characters shown.

Figure 2. A representation of the geometry and variables used to

define the plotter carriage location.

Figure 3. The Hershey characters available to the DRAFTSMAN

program from the 22 text files on the diskette.

Figure 4. A stylized drawing of a soup can. Figure 4a was drawn

with the instruction set of Listing 4 and contains

several errors. In Fig. 4b, the errors have been

corrected as given in Listing 5.

Figure 5. An example of a vacuum adapter flange produced by the

software system.

Figure f> . An example of a pie chart produced by the system.

Figure 7. An example of an electrical wiring diagram produced by

the system.

- 21
v< > r

y : pen up

z : pen down

FTGUPF i

- ?2 ~
I—

- 23 -
Simple* Font: Size 1 Cortogroph.c Font: Sij« 2

r#l%&, ()*+.~y0123456789::<»> !"#$%&'<). +.-./01 23456789:;< = >

f K^hT^^T^'T $abcdefghfJWmnopqrsHivwxyz[J

2^

•ABCOCFCHgKLMNOPORSTUVWXYZ ±* fJ

Index Font: Size Z

!"#$%&'()* + , ~y0123456789:;< = >?

@ABCDEFGHUKLMNOPQRSTUVWXYZ±/

•abcdefghijklmnopqrstuvwxyzH

Math Symbols: Size 2

V[]^T<-4dV§/jToo|j

Complex Font: Size 2

!"#S%M)* + .--/0123456789:;< = >?

©ABCDEFGHIJKLMNOPQRSTUVWXYZ**

°abcdefghijklmnopqrstuvwxyz| |

Qa(3yde£r)i)iK\iu.v£onpoTv<pxi/ut,nr®

!"#$%&'()*4,-./0123456789:;< = >?

(8otb> Font: g^p 2

!"#$%&'( )* + ,-./0 1 23456789:;< = >?

5 abr6efglji5kJmnopqrstuuwxy3{ \

FIGURE 3. - 24 -
a.

- 25 -
00o

<Nau

CD U"! CP UZ

rf c 3 o 1—

, tu L_

i*_

<D

-*-» CLO

T3< - ?£
to

CD

ttf) uo

0)oo< o

CO

tu

crn

K o

to

M

to

u - 27 -
CD

W

T3 >>

CO ^ o C T! O 0) H -p

CD

CD cd ^

CO ^

XJoaCaJAo

ft

i*o» 

ooQ - 28 -
LISTINGS

1. A catalog of the diskette containing the software system.

2. The Applesoft Basic listing of the main program, DRAFTSMAN.

3. A listing of the variables used in DRAFTSMAN and the line

numbers where they occur. This listing was produced with the

variable documentation program of Wagner (9).

4. The instruction set used to produce the drawing of a can as

shown in Fig. 4a. This illustration has several errors which

are corrected as shown in Fig. 4b.

5. The edited version of the instruction set of Listing 4 which

was used to produce the corrected can drawing of Fig. 4b.

6. The compiled listing of the assembly language I/O driver

program BPLOT.

7. A listing of a Basic program to calculate the best line

between two points which has been used in BPLOT to generate

the appropriate string of ASCII characters to control the

plotter. The comments indicate the correspondence between

this program and the appropriate locations in BPLOT.

29 -
LISTING .1.

CATALOG

DISK VOLUME 254

*A 052 DRAFTSMAN

*T 007 INDEX NUMBERS

*T 008 INDEX CAPS

*T 009 INDEX SMALL

*T 009 INDEX GREEK

*T 005 SIMPLEX NUMBERS

*T 005 SIMPLEX CAPS

*T 006 SIMPLEX SMALL

*T 006 SIMPLEX GREEK

*T 007 COMPLEX NUMBERS

*T 009 COMPLEX CAPS

*T 009 COMPLEX SMALL

*T 010 COMPLEX GREEK

*T 004 CARTO NUMBERS

*T 005 CARTO CAPS

*T 005 CARTO SMALL

*T 010 GOTHIC NUMBERS

*T 020 GOTHIC CAPS

*T Oil GOTHIC SMALL

*T 003 SCRIPT NUMBERS

*T 012 SCRIPT CAPS

*T 009 SCRIPT SMALL

*T 007 MATH SYMBOLS

*B 004 BPLOT

*B 006 INSTR.l

*B 005 INSTR.2

*B 005 INSTR.3

*B 005 IMSTR.4

*B 005 INSTR.5

T 006 TEST

T 004 SOAP

T 005 SOUP

- 30 -
LISTING 2

T TCT

10 HIMEHI 3371?

20 OHEEE GOTO 12000

30 HOME :EELL3 = CHES (7) IDS = CHE* (4)

40 AS = " s--*^* % %%% s* »#*# *# s if s- s S* s-THE ELECTRONIC DRAFTSMAN"

50 HTAE (5): VTAE (10): FEINT " * ***** ***** **   ** * * * **   ** * « FOE I = 1 TO 51 KTA q f j 5 PEINT ,; y HTAE

:-: y. k v. y. %. »

M I E

*

+ 15* PEINT "* "; NEXT I 70 HTAE (5)t VTAE (16); PEINT '•»***# ********** **********

SO HTAE (15): VTAE (12): FEINT "KELCONE TO"

90 FOE I = 1 TO LEN (At) - 23: HTAE (3): VTAE (14): PEL

4)heells:: fge j = i to so: next j: next i 100 HTAE (15): VTAE (20): PEINT "COPYRIGHT 1931"

110 HTAE (20)1 VTAE (21): PEINT "C. E. DICK"

120 HTAE 25: VTAE 22: PEINT "REV. II. 3. 2. 33"

130 VTAE (24): FEINT "HIT AHY KEY TO BEGIN: " J BELL* * BELL* I I GET A*

140 HONE : VTAE (5): FEINT "THIS FEOGEAN IS DESIGNEE TO ALLON YGU TGCEEAT

FM OH r>TOV rTT t?e cop t A^irp TJ-pfAT t 150 PRINT EELLS

160 PEINT EELLS: INPUT "DO YOU NEED DIRECTIONS ?":Qi: IF LEFTS £Q$,1) =

ii Yh 7H pj j-j 2 n S U E 5 Q

170 IF LEFTS COS,!) < ? "N" THEN 130

130 GOTO 1000

5 00 REM INSTRUCTIONS

510 FOR I = 1 TO 5 520 PRINT D$'"ELOAD INSTR. "SI

530 VTAE 24: PEINT "STRIKE ANY KEY TO GONTINUE . .

. " I : GET QS

5 40 PRINT EELLS : HONE

55 NEXT

530 HONE : 3?EED= 255: EETUEN

1000 HONE J PRINT "NOW LOADING EINAEY PLOTTING PROGRAMS"

1010 PRINT DS;"ELOAD EPLQT"

1020 PRINT : PRINT "POSITION PEN IN LONER LEFT CORNER"! PRINT "STRIKE ANY

KEY WHEN READY--: "5EELL$: GET GS'LX = 0:LY - 1030 DIN ES (502) , X* ( 130)

1040 OUT = 33720: LGEN = 33305: ALPHA - 33733: VGEN = 33355

1050 PC = 33311JXVEC = 33S16:YVEC = 33333

1030 SIZE - 33S0i:ANGLE - 33302:CHAE - 33S03;TINE = 33304

1070 VL = 34262:YH - 34263IHL = 34264:HH ~ 34235

1030 XX = 200: POKE TINE, 25

1090 DF = PEEK (43624)

1100 PRINT EELLS: INPUT "DISK DRIVE NO. OF DATA: m )DD: IF DD '. 1 OR DD ) 2 THEN FEINT "ERROR..."?: GOTO 1100

20 REN *** MAIN PROG RAN *** 2100 HONE :J = 5 PI = 3. 141592641 E = 0:DOT = 2200 FEINT EELLS? INPUT "IS DRAWING ON DISK ?"!QS: IF LEFTS (Qt.ll = "Y"

THEN SF = 1! GOTO 6000

2210 OS = "" 3000 REM PROGRAM INSTR. LOOP

3010 AS = ""tES = ""IEHO = 01 CF = 0! IF SF THEN HTAE (8)1 VTAE (10): FEINT

"EXECUTING INSTRUCTION #"JK

3020 IF SF THEN PRINT : FOR VV = 1 TO 255: FEINT " "J I NEXT I HTAE ( 1 }.J VTA

(12): PRINT "CURRENT INSTR. I " I ES (K ) I PRINT : PRINT "PEN POSITION X=";

LX / 2001" Y= " ? LY / 200: GOTO 3060

3030 PRINT : PRINT "PEN IS PRESENTLY AT X=" JLX

3035 IF J = 4 75 THEM E*(J) = "Q": GOTO 40 10 - 31 -

«: u u
3040

3050

3060

OSO

?

1 r, ft

PRINT BELLI. FEINT "INSTRUCTION NO . : " , J; ". ") . INPUT " "!B$<JJ

GOEUE 20000

DEF FN G(I) ( M

TTIt ,'^iiJh TJ i .. I IF J .

: 450 THEN FEINT EELLI * BELLI * "WARN IMG !' ONE 7

I T T H c LEFT

FOR I - i TO LEN ' E* ( J' i * El

IF I " LEN 'El ' J 5 ) THEN 256

Tf t> * - HTTll TUPH "fiTn 1 i ft ft ft 11 -J T* T i lljjll U _ i _. i -..-.. V

T ' " T TT O TP ? f HTHt >' P * ,' . T \ T . 1

10 IF El - "?" THEN G0SUE 500: T-, o •, a , AND RHG 'KEN GGSUE liOOOJBi x. ii , t r p u ••

3 14

3150

3160

3170

313

^ 1 ^ ft 9 -' n a

RHG =0.1

T TT TJ t - ll t " T'Jir^.T TftpT _ 1 t TIT - T_ TJ p y. TNT i'VV\ » p TJ P - A PJITn O O O ft X i _J -C ~

I i 1 i_ 14 1_ U 1. ~ J. r -_ i_ - XlI* J •- i. ii x \ i. _%. j t x. ii -.' " J r -_r _. 1 _/ _- _ . -J jf pt - » p " TpfT-.T pp - i* "O^UE ' r' '"'• ', * pptp o??fi

IF El = "U" TFEF A = °0' ""^n "'":''* TT T> t - lie" TTJCTT T t? - !» RrtTn O ft " ft T T TJ 4 - II TH II TTJTM \ - "> — ft » CnTfl ••? p Q ft 1 i 1_ -* - li i iij_:iA il - _. . '.- t _> w i U •-- _' . L- jrI a ptD V

--ii v'i Turv 4 il x_ i 4 .1^ a" --

1

i »

* rinTO w W 1 _. T5oo _-..

TTII PI - " ' » T LI TT M A TT - I • A - A X. TJ T ! ,1 n T p O O O ft ii -r - _ x fi i_. 4 a rir - i t il - ii ' * i * _i w i _r -_'_'.- -J T T ft — ll T3 ll TUT^Ht A ll jj t

- ii iHuU ii u; LrU /I ry T n- O '

3240

T •-> Oft

3290

33 00

3310

3 r\

"' o

2 O O Q

r, » T'pt'M tt - i

*

IF E5 - ."I" THEN XX = 2001 GOTO 33?0

1 1 11 -i- - ^ i il 1- 1

4

Ul It U i.' * W --.• •-• tp D * - n p n TupTt vy - -to ? a nnTn oooft 1 i UV — w 1 Ii l_i * 4 .-». .A. / -_

: a .- "T 1 w' w i w -- •- .- V IF Ef r " F

" THEN I = I + 1

* IF NIE* ' E* ' J

: , I 1

,' o o o ft TP pt - M TJ " * TIP. MTPt fpt( Ti T 1 ', - 'I * ll Tt'pfT BOTHT PTIT il " n u \ »T r; t? TJ 1 ± T 1Z' -r ' * il i i 1/ iii*/T V 1J t \ -J . i 1 1 * / " 11 ^ 1^ Za 1

1

iik ll»l xjJ_.li-_.-r-. wl.Till J-. _ -

!! TC SIZE « "

* VAL ( MIDI (El ( J! . I + 11 ) TO rnHTTIIMC II » (%T_"T A t » A *! - » ll » Uffifri -"i"1 1 ft 1J _.- w 1 i _ _. 1 i w I_ » J 1_ i. 1-1 t' i il -r ~ . w -_r _ _.- _• / _ _'

T?ri ]" MT p TJT T * * J-f

IF E$ = "p" THEN ^P = 0* 3HT" .??'": IF El ~ "G" ^HEN FE T NT t FRINT "'-'LEA^E GTAND ^Y III pfTT ± M M FR]

T fM ! P t ' T \ \ t V !TG

» /7 r) •v n, o o o ft T P TJ t - II f" II T, T_TT_'f,T p± - ll TT"' .rinCTTp O i r u _ -

1 iiij.Il is *

- W i UujuL '_ J T Pi - il p ll TUPH T TT - |

l QDT n O ^ Q ft IF E? ~ "H" TH^N H"r ~ 1' RiTn '":.'"!'"' IF B

* - " E

" T H ^

N

E

~ '

; n.nTO r> ? ? ft IF El = "W" THEM El = MI 1^! 'El ''"; , 2- LEN (El (1-5 } - "•! ' I

T

-' _ V*L RIGHT:

EI'K)il));IN ~

T N T !' VAL ' EI^HTI ''EI!F-;25}) / ^ 5

' GGSUE - :!17 0' GOTO

340 i, i) : I - i +

3 37

'' ? P

3 3 ? 3500

O c 1 ft 35 2 O c; P ft

35 4

TP TJt - ll A ll TUtH A t - At 1 MTP* I TJ t / T 1 - U ? " 11 i iiiiil il -*• - il f iUir V _j » . _

( El ( J ) ) ANE ( FN ( I ! . 45 ANE FN 0(1)

IF El

IF El - "A" THEN GOTO 2- ?0

TP r' 4 = ll V I' :1D TJ t _ II V ll T'TJP'T PPOTTP < ft ft ft n GGSUE 11000

?.T t? Y T ' T t? T> + — » n ll T T T T

-1 TT .1 --, 1 ft

1 4 1_ .'. 1 11 U +

~ wl illl.il -l - i -

_iPt?M 1_ 4 A PT1 i-.ilA/_

_. -____' nT-rpPTTJ" _. DP-TIT THT-O -_ 1 4 4 w li._rwJi.li4i_.L_ jp Pt - ll T,T ll TUTJT? O "> 1 ft t p -err ujT, tst p. t ' o t7 '• T 54 P f-I .3 p p t

t

T? c:

Fft ft ft » t? t = ft » j - T _ 4 • f- nt p o » 1 : IF FF ANE OF THEN FOF r = 3 T'

n 5 * K ~ I. + 1- HI ( I ) - El (I- ) * NEXT

^ -• r-,'|t pr - ft i r^ n T P '! "^ i ft

\C TfP

I F

' ^F ^ 0^ ' r' ^ ^ T'.JPfT U ' P 'i - vp » tt i p

', IF MOT (CF) THEN 2710

IF X Y F THEN ^ e U3 "" '''' * - u " = c F

i , XJ ft P TJ

X + Y * yvp - ft* nr\ T" •P'

'

v* tj p -

3530

IF EF THEN X - - XtY = 3 710

IF HF ANE E "- T F

T7 N

W P = 0- ^"^ i: yd = v(E):xd = h(r;:hf = o: s( IF HF ANE R = THEN HF - 0; GOTO 3710

IF OF THEN LIN T T - 1' r'" 1? T ~ '•!'' -?: " p

T T-' "- 32 -"

1TS| ;' V

T - T

j . i_ i jr i -
i O ' T D T ,\ v ,' <-

\ • n n C

I

' V "* C\ /-•

n i <s f\

,-. » rr y fSP v Turij t - o-r- + t ' f '. ;-

: "' ' P~

IF CF THEN MTVT TM TMJT - , I T T "J" nf3 V TUT7W B = TP _ 1 * VT* - 11 I P i » v T) -

TJ ; P V* fj P — '"' * -T — A * " " T C ^ ^ i

' TP -^ TP TtITP*T -n -n _ -•-•. * v ._ a v ' * *' y n r*. n * .* .'•!•.*->' _ .» v ' ~ i - O tk •' A • i \ \ t >-.r.n|Tp ii w j. >a£ii i j. - -.i .A " n -•'- j. .' * w w •_• i »l . i - / . I - o a . 4- / ^ i. li :. a-i i a. , / t '- Ui O U jJ T A .';. ft * T>P - 1 * TT AOTJ * P £ r DT .'" r .3 " _;; f * V ,' 1 >, 4 AVj'i »

'• ". * TP 13 T T-TT ' P5THT ' CALCULATING -"IFCLE C00E2TIATES "

' IF NOT (DOT! THFN CALL r'UT IF '""' F THEM X - A X ( 1

' $ ( TO- < £ f' 4- D ;- ' - H " P /.».,; i •.';<* v - *v,"!! ,»; SIT! '' A

' 1 )

•*• DA'1 - ?

T N ' h

' 1 ! ^ )

* IF ^ H T T y P M ^ ° -

>T n T £ r B ' T F 0"F THEN GO e TJ T? "'OOD*. A? 1

, = A' 1

' + Hi J IF A' 1' '" ~ '

' r'

' T

p

r f' "'AGO

* ?. c t i - -.

TT r-V ifTTi H-Q'T ( TI.TI IF C F THEN C F = ; I

T V M n T ,' a p i TUT1 M A

' = FHC s COS '•:-j t r i r t u r » i uc - (ty - pun y. r ;

5 PI ; ii; 3C3UE 7000! X = EHC

IF AF THEM V - EHC

A + Fi)!Y - EHC SIN

- q* GOTO 27 1 GCSUE 7000

1 * |,;ncM A T

n

r*

j. r .v ri- • / i t y _ pun

! C f

". f 1 =:

.J P T i ! T! 3 _ c T M ''

4

a. i

4020

4 3

4040

4050

4 0i0

4070

55010

502

=; r! 2 n

^040

5050

> B -± i VT\

50 7

5 P 50? o

510 Q

511

5120

51 30

EHC - d * ~ ^ SF TH^N FETUFI'

GOTO 3010

PPK PVTT PQTTTT*,?E e

T? * ,' T 5 - CTT t / T Y i ' p ± :'

. T i 1 \ - C T P .± ' T V -, ' IP * ' T !- '""

"i -

J. ?] — CTP* [' VP 1 ' P t f J -i 3 i — C"T"p i .; -n >

. » T — T + C| PHP TT — f) T1

."l ' il > P t ' J i — Q ^ B ± i'U/TT i ; »Pt ( T i. 1

". — QTP t ' " ' T T !

' ' ? — J * 2t NEXT T

I * E *') - "END"

D "C T *-T T PPT T * * T i^txj t TT1 !t tt a ^tt1 f1 r- £ a *T*n PP atit V.mj^ im ti + < t tr t t?*^ ^ + i' P -± 1 *, — M 1 -r ru^i'i« AjliijXi -r i iUi 'J i r'wiii i i w bJ i"1 *\u jJ^i. f1 r i O. « i w . J jj t i J. *. u*j« * -r i ij V / ^ / ~~ a " THEN G S U E 6 5 DOTJIT PTPT T ** T??P ,^ 'T, " T T J-T T fj yrp Tjp « '.T T ?'" '"' " * r> 4 ' Tp TTPfi ' r\ t . t 1 — >!*.]" TUPH

TP •• t y fPP TV-, Tj-jpn prniT t?ft p ± * ujotit <• tp pt • ? p ? r r'J£[I TO ; . O ~ "* " f P*< jp

LEFT* ' r' * 1 ^ = !l '-' " Tpt'v pcd - •'; * p y _ _ lyipv _ _ tv* n r, p t t p - fi =: a » y r -

o : YD -

T T T TPTTT-t ! H* 11 = " M

" TUPM fipTfl t' Q ?*] fl IF LEFTS (OSi 1^ - "Y" THE f J '^FIFT TELL*! pptht m F''

r E "I END

GOTO 4030

E E N L ^ T T E P cimtc

PPTMT t PP T fJT T*P/ 10)** TH'TPCr PPTf.IT " T T.TTP "TT T ??T*!"W PnUT" ! P P T «.JT HnPHM * T3T3TTTT T:\Pi' 1 1 > • " P ,", VT Q itrATT *PTP< >i t it w iLliriM ' i li i it 1 J. iTL ** \ j. J. * : __--.__ H i H i. m i! i.' Li 4J i F R IN" ! PRINT TA1? ( 10} J " •' 1 v INDEX 1 ': FEINT TAB ( 10 «' "'"2^ SINFLEX"

PpTJJT T A p I

1

{': ) * '< ' P; > "flMpT PV" ' TP p T 5; T "P * TP i' 1 '•, ') « " •' 3

"'• P«PT Pi f^ V: A p TJ T ."-• II

* p p I f

t t t * p ,

* i * "

'" c. " p r p t p t " * ppnjT t /. p ( x ) ? " :" ,'. } GOTHIC"! FEINT

! p p j fj t

I = 1 H$ = " NUMBERS"! FEINT ' INPUT "NUNESE FONT 01 -6> : "

N! K ~ INT [N)I IF

N

''* 1

r, F H

* '•

*t* j-i"c? j-j ^H^'IT "PP INPUT " * * 20 TO 5050

a n c t t tp =• i a. f\ > w w w U «J w 1 T" W i H* = " riPP" PPTfTf • TMPTTT "TTTPTPTPp "*PP PH?!T '<_',-'* " ! ?J t i

' - IM T *N5! I V

N 1 CE N 7 o THEN FEINT "EE INPUT "* ! GOTO 50 70

fP rt C T T TP e; 1 i r-,

TT t - II PM ^T T il • PPTMT » TVPTTT » T H T T T TP '• * O TP PHltT •' 1 _ -

"•- ' »» M» *T = TMT ' f T

'

' TT M ' 1 HP M •• i TL'PM PTPTf.TT "PTPTT'TPTTT "? PPfP EJ ,'! P fl G03UE 5140

M± - H p. TP IP P V " > T3TPTVT * TMTPTTT "TPTPPPK pn«JT '" 1 - P "': * ": M* »-? ^r TMT 'HI * TF H

.-' i op rr '- o Tuprt ppTriT »pp, TM'P'rT " * * rdto s 1 10

GOSUE 5140

PPTriT Mltl?) - »M*.TU CVMPnTP"' PPTMT B^HJli » fi T P f\ PPTM,P TAAPTPTI"* fPHTn - 33 -
1 f"'. 51 40

3150

5 1 i. n

er, i -»

fi

5190

5200

52 10

5220

c O O '", 5 ? i f

IF II ~ 1 THE!' N* C I ) TT 'tl - '"• TpPT] ?T « i T \ - NCTMBT pv !l IF N = 2 THEN N$ ( I 5 - "COMPLEX"

T T f

T - 1 T u p M »T 4 >' t •; - nr^tlT n !l

L i. ii ~ -J ifli-l» 14* t 1 J - W w i.%. j. * * T T? M - -•'- TTJPM *|* ( T ;. = "GOTHIC"

N $ (15 = N * ( I 5 + N ; ; I ~ I * 1 ' SET U E I

J

FOE I ~ 1 TO R;J r J + l;Et;J) - M? (

)

* NEXT I

* J

r J + 1 PPTJTT ' T?T a cp > dt;t);t " ftiTJ T H i r: T M " rHMT5» • HnPM^T

r"->t? t — < Tn "• * rpTjiT m s: r t ' ? " " ' ' Hryf1 t > ppTj.TT

3 TO 4* FEIN'7' M- ' I ! } " "' ; NEXT I! P^in^ ; PE'IN"1, »m*tu SYM ? n p r 7- 5

1 T-1 =•

ET -- O r\

cr •- o O

5310

5 3 '"' 5330

5340

5 350

/ >\ -"J

,-*\ A 30

6040

3050

6070

' A 9 f')

FEINT D$* "READ " ' lit i I ) P H P H - 1 T1 " "; "• INPUT X$ ( N

)

M = N r l MCYT T

T

tj p t *j t p. j ; " r t r- cr » w + • t \ NEXT I mm - rpr? ,' ;'; \ » upT/fP M t - " " RETURN

£PM IJ'p!'

rp HP '

J J T Tli" PRINT BELL*- ' INPU'7' "FIL^N^ME OF DEAN I NO'"' " J N*

IF Hi - 01 THEN E = K - 29; E ~ VAL (EScE + 4))J 2GT0 6120

p P T l]T P 4 J

'I i"l P PM " t M * * " T) " * T\ P

P 'D T f I T n * » P P 4 P. ii * M ± c n P V -

r

) T H ": n f INPUT LE \

* ; K 5 = "

IF EJ !K) = "EMD" THEN LX - VAL ;E*(K 27 ) )! L

v ~

T^

r AL 'E* (K - 24) ) t V r, _ t ? A T I n ± ,' !' _ '!• ' 1

i Vr; - U \ T I Ti t ! V _ "• 1 V

» * P - ' T 1 T I ft* / V _ "' "5 \ \ ' if

i A Q A JP pt ? V \ - 'icmti ii TUPM ^^ = f .. •-••-•» pr\P TT - T\^ 1 0* H

' T T ^ K ) ) I V( 1 1 ) = VAL ( E* ( K + 1 5 ) ! K = K + 2 ' NEXT 1 1 1 K ~ 5 02

31 00 NEXT K

3110 FEINT E $

* "CLOSE " J N

$

6120 FEINT EELLIi: INPUT "CONT.'C: OE NEW FEINT ONJ ? "JQ*!

1 ) - " M " THE N 6 1 6

,;-;,» FOP J = E TO STEP - 1

* IF ' ! N * ' ': * ' A N

VAL (B4(

IF LEFT* ( 0$

/

A r> t^

i an

6 17

6130

6500

6510

6 52 fj

'-.' vr "^ fj 654 Q

655 Q

656 o

O -J i

( e * ( J ) - " f "

;

)

THEM FOR I = 1 TO 5:H$(I) = Ef ( I + J 5 J ME XT t GOSUE 52:

MFYT T » t - p * DDTflT DTT T * * »cu«y T T HfiVP PPM PPTiM O n T^ "TV ' " m A ' "

" *. LY •' 2*0'0? J TMPJJT A$t Tp LEFT* ( AI-, 1 ' - "V" THEN PX ~ LXt FY - LYt P

P - * GOSUE 7

1 GOTO 3010

lx - o:ly - o: print bells; "position pen in lower left corner"; feint

"STRIKE AMY KEY WHEN READY"' I GET k%

vr,v v - r'i Tn p - ' t - v ' Rr.cirt! o n 1 n NEXT KJ SF - OtJ = Et GOTO 3010

PEN SAVE EE AWING

FEINT BELL*-'; INPUT "FILENAME? "> 0$ bbtht p. * * " n prii ii ' n ± ' '• P ii i fi p

P E I N T E '? ' " E E L E ^ ^ " * $

PRINT D$* "OPEN " J 0%

PRINT D*J "WRITE "J C*

FOE K = TO J,' LL = LEN !E'4(K! ) FEINT LL

FOE II = 1 TO LL: FEINT ASC ! NIBS ! E % '. K )

.- 1 1 , 1 ) ) ; NEXT II

- 34 -
•: =: o '". »7 t v t v

6 6 fi PRINT D $ ; " r T " 9 ^ " ' "

/-, £ 1 Q ppTTTpM

t n r, ,'j PPM * < <• niiTOMT pnt'TTiirc » y. * 7010 REM « - ENTER WITH X, Y.- FF *&

7 a *? ;~, p v _ v w y v » -n v — v :j. V v 7030 I E P X - I N T ( P X )

"' .5 THE N P X = I N T C F X ) + 1 7 4 Tr P

v ~ T NT ; p " < "' , F THEN P v ~ TfT T ' r v > -fi

','•. = [*• PY - TfTT JPVJ > 5V - T?,TT (PVI * Tp TV f;P TV TIITM T <-; o i"i ' » r> '. '• t y - tv -f py» j v - t vr ^ p v * r r t y - r\ np T y > ~ n f=j '• n p t v ' c. n p r v • 1 4 5 Q TUCfl P P T M T * BDTIJT » P T Ti T T t? P T T M T T C TT Y

" P ^ p C T\ "< pri T t!T5PT ' t' 5pT 7 ** LX - LX - FX; LY - LY - PYI J = .T - It PE^MpM

7" Ti"l Tp fp * MP T TMTT TUtM y - r"i ''-*- XX _' i. i 1 4 t, ,*_' j_i ^ 1] j. i 1 * i j—i A & J"- -_ '

I Vi - :'; * J V _ TV _ OV» T V - TV _ PV UTTliw'! V r fai j"w j_j _''. A A ( J—i 1 j-j - 1 ; i 4h .'_j X _ & - . i. 7,';po t r f ('EOT! AMD ( NCT f CF) >: ) THE^T ph c "P 'FOOOJ RETURN

7 o 9 o y p = y p + p v * vn - v r. t- t> y

"7 •( .•-'•. VTJ - TUT ' P V Hi HVI - PV .. VM x <•} c; i 7110 YH = INT (FY / 256):YL - PY - YH * 256

7 120 IF XH C THEN XH = XH + 25c

7 1 9 IF v F

' :'

: ^ Lr E N

v H - Y H +• "5 ' 7140 POKE VH/YH* POKE 7L.YL; POKE HH/ XH- POKE HL.-XL! CALL 7GEN

715''! IF CF AMD NOT (DOT) THEN 7190

716 POKE CHAE/PP * 121* POKE TIKE,- 2^51 C iT L ALPHA! 1 'r CF THEN POKE T TM T7

. Of!| ,"MT r> I T T * P n Tr. 71? o

717''' pnifp ttmc. ^2! yp p^ - o

tt,jt?>t pnsrc ttmp. j 7 1 3 CALL U T

7190 RETURN

S000 REN *** TEXT GENERATOR *** 3010 HONE

8020 PR T NT "CHARACTER S^E'NG* "* ! LC - 01 SO - Gt INVERSE

Qrto,'5 yr nc* > ,! " tupm t t — t rw (nc* )

i - Pt - "?$< php t p - i ^n t t fine tip P ** P ' SJ^YT ' PPTJ'T • PUJMT " C T f T =1 * T3 T .« y T + f P * 1 \ » T »,T T3 ! ! T linjf o I! » * .t • 7T

7 rrTs f At, ii -

ii v « twfm TLJ =y,

f- T

' R

T "HT* ( F - • 1

': ' * OS? r " "; Rf - "ID J

'( R $ ,- 1 • L L ) * G

*"' T ?• 1 '"'

:'"i tp net ' "* »« 4*-lTj r rpTt ,- i t . * '\ - » *.r « f'-ip^5 pcjiiT • pcrp "rjJATJi^'T'c V C Tp T f IP i » ( i ri c * — I! Hi P4 — ii » PT3TMT UFT T*ll rTf T*» TP T 4 - T" TJ p ' 1 O ) THPfJ ' "' = 0' MHPMiT • QATQ

S 1 1

q r, i

SO .";

SO 70

30 30

O f; 90

3 1 00

P * 1

IF T $ ~ C H

% ' ~*

) OR T $

= C H

$ ( 1 9 ) THEN FLASH -

: GOTO S050

IF T % ~ H

t (27) THEN L = N T ( L ) * GOT 8 -

I r KOT ( LC ) AMD NOT (SC3 THEN IMYEESE

v o TUTm tj n PMi

P t i T *

j w

* c r

3120

3140

3150

3 1 i

317

3130

3 1 9

O ^ a, f\ 3210

tp tp AMP MO T fPPM if.m act fTti "•

( T $ ) + 1 2 3 T" PRINT T * J

* P * = R ? + H R J ( A 30 ( T * 5 )

'. S - ! GOT 3 -

-*; PRINT t FEINT DELL$t INPUT "SIZE (IN TENTHS) * "I III'. IW - INT (IW); IF

I W 1 OR I W ^ Ci TFE ii PRINT E E L L J * " E E - 1 N P U T ; " *

t GOTO 911

IF LF THEN W - 5 GOTO 3130

pDTMT PTT T 4 » T.MTJTJT » up,p T T ' tj "; p,p "EET •'','" CHAEACTEPS "' "

i L f - IF L '£

'''. ' "H" * >T P T * ' "'• "

TT " THP»J PPTt.TT PPT T ± II PP T MpIJT *

II » • RQTO Of 1ft IV - 0* IF L? - "V" THEM IV - 06

E*(J) = E$ + EJ * CHRS (43 x IW) + CHP. * (43 + IV) IW - IF E$!TENP) = "V" THEN RETURN

IF MOT (SF) THEN yr - < IF LEN (E$) = THEN PRINT BELL

) " ERROR-REINPUT: "

\ GOTO 3030

PRINT

REM TEXT STRING DEC0BEE

FEINT : PRINT I FOR 10 = 1 TO LEN (R*)

?% = MID* (Ef i- IC-. 1 ) P = ASC (P$)I IF F = 7 OR F = 1? THEN IC ~ 10 + i: P4 = MIDI (E$, IC, 1 ) PPM H* Mil-'F T47rp<PTJTV Mpr-TTIPC x« S - 35 -
Oc; 1 » TTT P * r " " TUrW PPJM'T' p ITT T * f « r*P P ("sP — PP T Mt? ??T " ' * P 4 - ,! » • ROTI '-'

''"' '"' O C -O Tl T — a rv r^ / fn .*• i " •"• c^of-, jr .' p - ~i r-.-p p = j o ) a j.7 n ? t - c =; \ "HE" L - _ ' ^ °

'M T - L

[EN L = L t 3 6 O =; '. Ti T p T 1 tr q T '4 C M T - T _ O '. •j ^ •_• v j. i j_i .. !-'. i r. lj i> -_ - u .• w nc-' 1» Tp (^ q ± v n ii TUr)] '.: C\ ';

f; IF L > 15? OR L -C C THEN FEINT EELL5; "REINPUT "• ! E* ncO'

i . 1 1

3530 IF ' HF ) OE LF THEN 3770

3600 GQSUE 3 00

3610 FF = 3620 IF IV = THEM XE = XD + (IM * ( ASC

cr tup m TV - t V -f ( x I-' * Ac C >- M

T D S ( j

* * ( L ' i 1 • 1 '

"

! " ° ? ) ) 36 3

n

IP IV - '-. THEN YD = V D + (114 > C ASC ' MID* -XJiL!'!/!!) - ° 3 ) M IF

£ F THEM L

v - L Y + ( T •! fi ( A E

'" ' I"! T E * ( )' * L )

• 1 i 1 )

>! _ ? 3

v

' ! 3 6 4 FOE G - 2 TO L E J I

' X i ' L '

'' ° T E

r 3650 EX - ASC ( MID* i X*- ( L 5

,• G ,• 1 } ) - °

'" 3660 EY = ASC ' MID* ( Xf ( L } ? G f 1,-1)3 - 3-3 36 7 IP EX = 3 4 A ME T EH [ %-% L

' " 4 Ti^M F

1^ - M"^ ' P

13 * 3 6 3 IF D X - 3 4 THEN G - G - II NEXT G

3 630 EX = EX * IWS DY - EY s IM

Q 7 A H T P P v ' m Turn T\ v - "• <=: '. i. p v 3710 IF EY ' H THEM EY - 2^6 + EY

372 P G K E X V E C , EX! P K E Y V E C .• D Y * P G K E F G - P ? + 121; r' A L L L G E V

o i"3 r-, hcvt r 37 40 POKE \ M G L E - I

l '

! P F" ^

"^ T " P ^ 4 * 2'"' IN + 1 ' '' 2

A

I

N

3750 CALL OUTS POKE SIZE; 1 ' POKE AMGLEi :'"'

r t F"' r E TIME- 2^

3770 W = W + ASC ( MID* (XKDvhi!) - °3

'-' i '_ 'J I i ii A I 1

'w 3 7 3 P E I M T

p O ,'•, fi tJ - T T 4 T T

I

PRINT " INCHES"

3 32 IF XX = 7 " 7 4 THEN o

p

t vt " r EMT T "PT^p^

OCjOrt TT T p TLfCf! T P — '' f HC ± — p± x ,"UP* ' J O -t T T-T )

' " " 'r " " ;'i 1 f"i Spa^i DBTMT P"CT T ±* TTIfTTT "TC "UTC TTMrtTP H "" ' V- ," p '».?-.» «»n** T P Trt?T±

O*. 1 ) •- -• »v» a Mp T PPT* r'P ± 1 >

•' " » H " TUFT! op j A SS^O tp t rm in* 1 1 - " M " T'JfM qqah

336" IF IV - THEM LX - LX + T4; IF LX l' 2?^^ THEN LX r LX - 141 LIMIT = 1 3370 IF IV = 06 THEN LY = LY + Mt IF LY j 1450 THEN LY = LY - HI LIMIT = 1 333 IP LIMIT THEN T IMIT = * 'opTj* rr

' ppt t j j pp* l $ ] EELLf- '-" FLGTTEE LIMIT- EXC

EEEED . ."! GOTO 3 o '?0 3330 WP = 0: GOTO 3210

O O f) f") ppjMT • PPTMT T?pT T ± » i T *TT3 TTT1 ii PP T MpTTT •" t> -•• PD * p (IP T •' i "••• O " Ti * • V -t - "»» T P

T ppt* f n* 1 ^ = " P " Turn pptmt pptt *« pptmt "ppTTrrtTT' "' * n.r"rn cs/Hfl

8310 I

17 LE^t*. f n* . 1

;

••- v »A" twpm QOOft

3 32 G TO 3 4 30 EEM TEXT GENERATOR EI SPLAY

3010 VTAE ( 20 ) 3 02 NORMAL

3030 IF P = 7 OR F = 13 THEN FLASH

30 4 IF L } 31 AMD L < 6 3 THEM INVERSE

3050 IF 03$ = "" THEN HTAE CIO

3060 PRIMT P**: NORMAL

30 70 RETURN

10000 REM XY ROUTINES

10010 IF MOT (XYF) THEM X = OtY = - 36 -
10020 XYF = It IF E* - "Y'' AND FHO '

~'; THE!' "y' - RFO! P* - ""J FHO - Ot FE^^FM

10030 IF E* - "V" AND EHO ' '• C THEN v - PHO' p I - ""I PKH = J P^T^PN

[>'*.n4'i IF P* - " V " i'fr PH'*^ = '"' "UPf T = T 4 ' * P* = M7T,* :p* ( m . t, j } j GOSUE

1 1 ' X = P K H ; F H = ;1 ; P * = " " * p t?T TJ is m 10050 IF E* = "Y" AMD PHO = THEM I = I * It El - MID? £ B$ C J3 > I-, 1 ) t GCSUE

1 1 * V - F H T F H -

r'- ; P * = " " ? PET U F M

iionr, pew riTryrjiTTnM ntr pu-, \*\i ttt

1 1 <"M <", TC TJ* -•.. II II ifc'T. P * ' II « II TLTf! Bi = Pt i 7? * « P 14 H - HA7 ' T> ± \ 110 2 I - I + 1

* E $ - MID* B t ( J ) : I i 1 ) ! IF E * '' " - " Q£ p * }

'' -' " Q £ I ": L E

N

( E % ( J ) } THEN T - I - 1

* R$ - " " * pptttpm

11030 GOTO 110 10

pnfin tipm pppnp HAMTlt thg cnnTTHPC

I'-pto G^nF = PEEK ' •"•'•-•' 12020 IF GCOF = IS-*-' AND XYF THEN A - ATM [ V l.E - A ;

' XY 1-7 - 0! GCTG 371

Q

1 'ifilf) pDTHT * PPYMT PfT T ±? " T t! V H P tt " "OTf ' " PJIT' O I??.! "T'T'C TTT, TJ.T T TfTT » » CCPl' fO

1 p \ -f 75,i s prrv ' "' 1 ° }

' octwt "pppnp H~MDLE^ iPT TT7T' »? iirn ± * fqp "

- 1 TO 200, MEXT

1 "

o 4

t r Qf^QV = ^,"5 tv'pjj pptjit \ tjtjt^.t't T?p^ t t' h »»prr phmtc th rnMTTMiTP" ptt

t *• vn'o v t - 1 to 1 rsi'ii'!* FEXT "*? * "°* ' T '+ •'- ': = p* ' j )

j ursMt? * pj ( ,?' = npii « 3 SUE 5 , RESUME

12050 IF (GCOF = 5 5 0E 'GOOF = '•) THEM DN - PEE T'' ( 43624 );DN = K'"T ,,T1 M

-

1 \ + 1 * pnj'P ^p.i-24- DN* Tp PD '" "' DH THEM D^* = DN- GOTO '-.<.'<? 120A0 IF 50QF - 13^ THEM FPIMT "DIVISION E v ZEPO EEPQE- ?.?Tp'n p*ritTj- TM r- D E A W CIRCLE"! G T 3 4 C

1 2 '"' 7 P IF "nnp = o tlith pcTjrT cpjT r ±; nriTCF riir t tmcppt mptj nyqiTTTP"; nc? ! •*

12^30 I ^ GH r'''C - 10 THTM 'D'CTfTT 13t| I t ; » T.! * T? *T T >' " '

!

. "!*!*» " Tp ypTTP P P TiTPr1 TC

D"t PRINT "DO YOU WISH Tr DESTROY OLD ^ILE"' * T NF' T T A** IF LEr T? 'A*

/ 1 } = "N" THEM GOTO 4 030

12090 IF LEFT* f a* i i - »yn ^utt? pptmt n** »?tfn —'Cr' " * *'*

1 2 1 IF GOGF = 2^^ TH EM F

c IM'r "EEEA^K IN T TIE "O . "J r EE!' ' 21 ^

x + 2^i':

- * PEEK ( 2 1 *?

) t PPII1

'1

' pp'Ttt iiTj.*pM prc^ip? *t o •-. r; r- » * oTiip

12110 IF GOOF - 7 7 THEM MN = FEE CO)

12120 RESUME

1300 REM CIRCLE AND ELLIPSE DECODING

13010 ZZ - 1 130 20 A ( 1 ) = *, A ( 2 ) - 2 * PI

130 30 AXC1! = RHC:AX(2) = PHO '. PHO = 130 4 I = I + 1 1 E i - M I D $ (Bt ! J) j I» 1

)

13050 IF I > LEN CB$(J55 THEN RETURN

lontn tp i ! v * ' " " " i if.m ,< r> t

r w r\ » hp p* " i' o «

•• if-.TT* i' p * •" * "(?'•' i ;mi

?P± ?' % 11 A n \ > TtlrlJ ppTMT »QVHT*y fcppp p T? T TJ V ?J T » * f- C

1 - r,

» PnTQ "J (;

!"• Q

13070 IF E$ = "0" THEN 13 4 13030 IF I > LEN (B$(JJ) THEN RETURN

t of.ofi t p p ± - ii p ii Tur'i y v - to •* a » p.r*rn i •- ,', i r. 13100 IF B$ = "I" THEN XX = 200t GOTO 13040

13110 IF E? ' :- ""•" THEN 13160

13120 IF I = LEN (EJ!J)) THEN RETURN

13130 IF RHO = THEN GOSUE 11000

13140 ACZZ) = RHQ * PI / ISO'PHO = 0t IF A( 1 3

': A(2) THEM A(2) = A(2) + 2 * PI

13150 Z Z - Z Z + 1 1 GOTO 13040

13140 GOSUE 11000

13170 IF AX(1) THEN AX ( 2 ) = EHCtRHO = 0. GOTO 13040

13130 GOTO 13030

15Q00 REM DOTTED LINE OUTPUT

15010 IF DL = THEN DL = 20

- 37 -
r- -• f\ TV _ py! i n p a t p r i t y TV - 'i ) TT.IT7?T P P - "•, » r;T - f; l fT? rT, T'CM

* PC ; TV '- TWPW P Y — T!T * P ^ *' '' TI V > D EL i SGH

S G N ( ? Y ) * P X r D L s 3 3 N ( P

I TV ! |

i TUDj p-j- - T k x . f J / UlLiit X _\. - J.

n v * fi p, 'P r\ < c; ;•, o A

r- i «i •

,' p V i

:<. JP5 ,' T V T Y '1

1 e ^ tr ,-, Tf A P P CTVi .•' iPC ffVl T'J?H DV - TiT * v ', > * r> r* ' T v T V i A. ;

' r. K i^ t_- -. I A .- x * ;

1 5 p ,'. r. T T ? •*, T> O ,' p Y ' "- A P P f T y '• l n P ' S pc ,* p V

Y * p V - T V

1 p f; T f; p p - f.I n T ;UDU -1 n g TJ T5 7 A p A • T Y - TV - P Y T'.' - T V

1AOO0 ynHf f cpTMT • rpjfTT t*t>! < >' "ttittthp Pn*fT rtrec

«

16010 PRINT BELL?! INPUT "LUMP INSTRUCTION SET T" FEINTEE"1 "

' AS ! TF LEFT?

/ A * 1 \ _ J! v '* TLITTT 1 .'. "> '"? A

i A 2 F E T N T BELLI' t m p t ? t » t p t t a t t a a •. nn c p t p r- t p n •• p > t m p t p *> » j *

1 .:. a, p ,•, TT fPPT| 'A*. J! - " P " TLfPf,! ,PQOTTP t i M ,v PHTO ~' A T

1

1 A 4 IF T ^ F T J ' A * • 1

'' ' ' " a " tupp.j 1

'. fj •- ••-,

1 ,•-. fj =; LI1MTJ * TV - ••]

1 A A P E I N T " C U E F E N T 1

1' S TE U C T I ^ N S A E

^ "

1 i rt -rr\ p-DTT'T1 " *.?n T t'CTP Mr- TTflt! "

j. --> V .--.- i » i. i« i. ii w > i Li -J X H w w I .L w i'A

1 £ fi «5

f, POP T T — 1 TH 1 A * PPTMT TTI TAP,' "T * • p .+ ; " T ', Tf 7 T - T _, 1 TUFfJ ,TM n P f T P 16200! GOTO 30

1 .- f] O Ti ^7 — *T t ^ -ft *.l T Y

r"

1 /, i a o " n p t ' p i

.'-, " o o ' Fp n t n < -. o 7 n

1 & 1 10 PFIN" EELT it T?JPT|T "rjjj? TMQTPTjr'TTQM h,i r* !' » 7

1

;

- 1 20 FEINT "CUEEEM'7' T NB T EUCT^GM TC^* "

' E* ' Z

* F^LL*

16130 PRINT BELL?* INPUT "CHANGE IT"> " * A-f ! I r T EFT* (A*,- 1 ) ' "' " V" THEN

16 16

i '- 1 an TMPMT "Pi^ VniT HTCJ ?n pMTPP i TrvT CTSTf!:';'- » J ,\ i > Tp T rrTi ,' i± 1 » -

i! v ii Twrfj C * - "

" f E * - IM! 'P* = "5'" ' "E-" - J' J - Z; GQSUE ° 2 "! ! J - TEN

P ' GOTO 16 160

16150 INPUT "REPLACE NITH- "'Ef !'Z)

161 6 I N PUT " F I N I S H E B

? "

'

A

% upfl Tr t T?r-T± 'A* 11 = " M " tlttm 1 l 1 i a

x »_• * /

-•- X x I-. x^ x i -r * ri -i ; ; 1 .' it x n j_ . 1 x w x x -_

1 ;. 1 O A T TT irpTi 'A* 1 'i - M v H TUpM PfTIipj!

16190 GGTC 16160

1 A 2 INP TT T "APE THESE r^'-rr: " ' Af ; T F LEFT* ' V* ,- 1

? - "M" THEN 1 A 110

1A210 IF LEFTf (A?) 1 } ' ) "Y" THEN 16200

1 A 2 2 E E T U E

ri

1 i •- o n, Tp m* - "» TT_fCM pptmt * TWP'IT "PTTpMAMF HP f!P A.IJTMr'V " t ?^f * 16240 PE# 1! PRINT CHE$ f?)* "SON"! FEINT CHE* (123

1 A 250 FEINT " F I L E N A N E ' " * N $ ; P F T N T ! P E I N T

i /. p -V o P0E ZZ - TH J - i; FEINT "IHS^E. M0« " - ZZ , B? ' ZZ ) - NEXT ZZ

16270 FEINT GHEf (12)! PE# 0! PRINT

1 6 2 3 I N F

*

? T " E E

T

' E N T

" P E I T n P

' E"' E I M T E E F P E T E E

'" I

"!' '"' " > A ? ! IF LEFT? ( A $ , 13 =

ii 77 M TLtr*' 1 : ri i r. *- i llLii x •_ v X. v 16290 IF LEFT? (A$,-l) = "I" THEN 3000

16300 GOTO 16230

20000 EEN ILLEGAL CHARACTER CHECKS

20010 FGE I = 1 TO LEN :B?!J)3!TC? = NIL? ( El ( J ) .- I / 1 3 20r)'"'0 IF T*"* * " # " OP ^T ? = " & " "T\ T"* - " / " QE TC? = "G" QE TC? - "J" OE

•p,-± - ii i

r ii r-.D tt* - H t n r,p TTt = "P" hp "T'" * = "M" OE TC * - "M" THEN PEINT

BELL?! "ILLEGAL CHAEACTEE ."! I ~ LET! (E?( J 3 )! NEXT ! GOTO 30 4 2 3 N EXT ! RETURN

- 38 -
LIST [NIG 3

* DRAFTSMAN *

* *

;j( --} TABLE OF VAF'JA- ! rC;/ *

* *

i* ft/ * i act 41 ou,;

DA DD DP DL DM DOT I

II IV IW J JJ K L !_

MS N$( $ ) 0$ OF OS* OUT P

SF SIZE T$ TCI TEMP TIME

X$( t ) XD XW X' vi'PT yy yv

END OF VAR. LIST

IP ! r- ! r ! rex' ! tmtt

p* or- DT DC- D '••••

V MT-, i<y y

P*

11/ * = il^rv] !(U ! !! III! j.| (JIT

VIJ VI V'.'FP ? 7"*

+ * % 4-' -i- -J/ J- l- -I- i- • V J.» •+• + 'J/ -V '4- V + J.' + J.' * 'J.' -I.' 4' 'V *> -J/ + •r- -T- •!• -f- -?• r -T- -t- -r -T- -V--T-T' -r- $ -r- t- -; -t- -,-- -r- • : -?• r ? ? ?- -,. r- ?• * * * DRAFTSMAN *

% %

% -->TAELE OF VARIABLES'-- * t t

*CC*) - FUNCTION - ASCCMID$CQ$,I,1>>

3060 3340 3340

A - ANCLE IN DEGREES

3150 3170 3190 3190 3200 3210 3350 3550 3660 3660 3670 3670 36S0

3630 3680 3690 3690 3690 12020

A$ - STRING VARIABLE USED MAINLY FOR INPUTTING ANSWERS AND FOR LOGO

40 90 SO 130 3010 3260 3260 3340 3340 3350 6140 6140 6160 3030

S030 3040 12030 12080 12090 16010 16010 16020 16030 16040 16130

16130 16140 16140 16160 16170 16180 16200 16200 16210 16230 16280

A(*> - ANGULAR LIMITS FOR ARCS AC 1 ^STARTING ANGLE AC 2 LENDING ANSI 3610 3610 3620 3620 3620 3620 3630 3630 36Z0 3630 13020 13020

131 40~ 1314o"l3140~131 40

" 13140

AF - ARROW FLAG 1=SET

3130 3190 3660 3630 3690 3690

- 39 -
ALPHA - ONE CHARACTER OUTPUT ROUTINE IN EPLOT

1040 7160

ANGLE - ANGLE POR BPLOT OUTPUT ROUTINE

1060 3740 3750

AXCfc) - AXES POR ELLIPSES AX( 1 )=MAJOR AXIS AX(2)=HIN0R AXIS

3590 3590 3610 3610 3610 3520 3620 13030 13030 13170 13170

B$ - CHARACTER IN INPUT INSTRUCTION STRING

3030 3100 3110 3120 3120 3130 3140 3150 3160 3170 3130 3190 3200

t?Iq -zii{\ ?230 32--'0 3250 3^60

'7 270 7230 3"1 °0 T",o 3"*0Q 3?10 3320

3330 3340 3350 3360 3370 3370 3390 3510 4030 4030 4040 4050 6610

S150 10020 10030 10040 10040 10050 10050 11010 11010 11010 11020

11020 11020 13040 13060 13060 13060 13060 13060 13070 13090 131CC

13110 16140

B$C*) - INPUT INSTRUCTION STRING ARRAY 475 MAX.

1030 3020 3035 3040 3060 3030 3030 3090 3250 3260 3260 7230 3330

3-? -rn -r ijr\ 7 77 r\ 7740 73^0 7,750 757n io 1 '* mio iniA 4010 «0 1 >r

! Art^A 4020 4020 5210 6020 6060 6070 6070 6030 £030 6030 £080 £020 £080

A090 6090 40*50 tJlO 6110 4SAO 459" 915'' ntAft lOOAfi inn^r, iirtr><"i 11020 120-40 12040 12040 13040 13050 13080 I3i20 16030 16120 1615

16260 20010 20010 20020 \

BELL* - CHR$(7) SOUNDS SPEAKER

30 90 130 130 150 160 540 1020 1100 2200 3040 3070 3070 3260

wjZdv -jZ'jC1 40*iU .G-'vU 4^-vG 40't)0 ',QlU >' j / '-I-;

1

' wl" l! -w i 'J ''-'VJ l, 2;" 1 7A I A OAc; O 1 1 A 011,^ O 1 TA. 1 "T A P 1 O A O cr

-J A O «=: O A O O 1 A O O /. A O p O A O OO A 8830 8900 8900 12030 12030 12040 12040 12070 12070 12080 16010

16020 16110 16120 16130 20020

CF - CIRCLE FLAG 1=SET

3010 3140 3540 3540 3590 3600 3600 3610 2620 3630 3640 3650 3630

7070 7030 7150 7160 13060

CHAR - OUTPUT CHARACTER IN BPLOT

1060 7160

B* •• CHR*( 4 ) DOS CONTROL

30 520 1010 5260 5270 5320 6030 6040 6110 6520 £330 £540 £550

6600 12090

DA - DELTA ANGLE FOR DRAWING CIRCLES AND ELLIPSES

3610 3620 3620 3630

DD DISK DRIVE NUMBER 1 OR 2 1100 1100 1100 6030 6520 12050 1205^

DF - CURRENT DISK DRIVE IN USE

1090 5260

DL - DOT LENGTH FOR DOTTED LINES

3130 15010 15010 15030 13040 15040 15050 15050

DN - DISK DRIVE NUMBER

12050 12050 12050 12050 12050 12050

DOT - DOTTED LINE TOKEN 1-SET

- 40 -
2100 rr 1 3 3510 3520 7640 36^0 7030 7150 1^020

DX - DELTA X

o/.c:,^ ci-rr-, oio/i a -.or-, oior, OTjfi PTiA ot-c- 0"">r.

DY - DELTA Y

o,: ;i,"i p-r.OA piO,'i 071 Q q^U: P"7 !^ 37PA

E - END OF FILE TQKEM

5020 £020 5030 5130 5140 5170 5120 12C20

EF - ERASE FLAG 1-SET

uiOi'J iuoO JJ'j'J

FF - FONT FLAG 1-3ET

3300 3520 3520 3530 3530

G - L00F INDEX FOR TEXT STRING DECODER

3540 3550 3550 3530 3530 3530 3730

GOOF - ERROR NUMBER PEEKC 222

12010 12020 12030 12040 12050 12030 12050 120/"0 120S0 12100 1211C

H(*> - HORIZONTAL HOME ARRAY

3540 3570 3500 4020 5030

HF - HOME FLAG 1=S£T

3310 3570 3570 3530 3530 3500 3650

HH - HORIZONTAL HIGH BYTE

1070 7140

HL - HORIZONTAL LOU BYTE

1070 7140

I - GENERAL LOOP INDEX

60 60 60 60 ?0 90 90 510 520 3050 3060 3030 30S0 3030 3230

3250 3250 3250 3260 3230 3340 3340 3340 3340 3340 334C 3350 3350

3350 3530 3^30 3530 35"0 ^S^O "^Fi '"' "^PO 2600 ^0 1 ^'-lO ^O'sO -140

5150 5160 5170 5130 5130 5200 5200 5200 5200 5210 5210 3210 5230

5230 5^30 5°40 5°40 5^40 "^S-fl spaa SP^O 53"'^ ^110 >1TA &1!A ',170

10040 10040 10040 10050 10050 10050 11020 11020 11020 11020 11Q2>;

11020 13040 13040 13040 13050 13030 13120 20010 20010 20020

IC - LOOP INDEX FOR HERSHEY CHARATEP DECODER

PATA on-t{\ onn(\ oT>n oiia onnt\ oi ir, o^o,"i oa=;a

II - LOOP INDEX

4020 4020 4020 4020 6070 6070 6030 6090 6030 5090 5530 5530 6530

16030

IV •• CHARACTER DIRECTION INDICATOR 00-H0R. 06-VERT,

3330 3140 3140 3150 3520 3630 3740 3360 3370

IU ~ CHARACTER SIZE

3330 3030 3110 3110 3110 3110 3110 3150 3620 3620 3630 3630 3690

3690 3740 3740 3300 3330

J - LOOP INDEX MAINLY FOR INPUT INSTRUCTION DECODING

90 90 2100 3035 3035 3040 3040 3060 3070 30 T 3030 3030 3090

- 41 -
A f. A ! ii n & p

• Tf f; c; -n ^ nr --:

•( fl •!"*

..) i I j -j ;;i"?rt .-* i -?

,-i

"7/Vf. a *?

?r'; -' ^ CM cr/v

i "* fid/; ft * OP^f! "t 1 r*-'V1

i ** "

J fV"*P '

'

* :' '' ' H ' ;

if ... ! f>C\P TMT.rv M6TM< V CTjp TiTOV TMPHT

r. rr - a O K!

5*? / -">A OMT: O.i'7 <!?.:*. Tj"! C* .:

••* •' 1

» O .-:* ^p O .:' .:'. ft 0.:~?,s O*9 "?["": n ,">. .•' a 'v •

! t ... rt|.-*-.c '.p-rc r?T-rr p?JT) nF''TKIT*'."r TP'*! pTpTf.ii-; O 1

"7 m 017ft 01 T ft o i /. ft

LB "! ENHTH OF F7LF ^I'FF^F' £060 4070

qr.T, OA=!f ft pnffl oaq'i pflo/\

F • LENGTH FLAG !l "SET

ip npif' 'pp^ft

! fT>! ... i !—rrrr pr\]rr'cT.r-i- ^.rTiPrp" r ,-.? T.;p! pir

1 ft i" Q'7'Vi

L I M

T T P' T T F *•- i

'" ^ T T r

L! fr P v" F ' •- £ '' -- c r

""

L!_ - LENGTH OF TF'"'T GTRINO

£560 £570 6530 3070 3030 3070

LX - X L.QC4 T IQM rgp |_tmtt P^FC 1

''' in^n 7'iif; "JftTri /iftift -in-ip <y040 ^"f"

3620

, 1 in O O ' fs njt' a

LY - Y LOCATION FOR ' IMIT CHF r'K 1020 3020 3030 4010 4040 4040 £030 £140 £140 61i

70,-fi "^O-'O ~?f)f-Q ""P"7 " 7 ";7ft <? <7A ^^70 po-y-r, poyr\ o_p~

MIB INPUT r-UAfrApTrp pncrrp rcnw TiTC-v'

£ ft 7 O .' ft 7 ft

MM - CLEAR THE GARBAGE VARIABLE

3230 S"7 ^ 1

'"''

, l''1

N - FONT NUMBER INPUT

5050 5050 5050 5050 5050 50 T 5070 507O ^070

50°O S090 c

i 1 l" ci'1 1

>"' ^ 1 i c: t1^ FlMft Pi-i'T 5150

5250 5230 5300 5300

51£0 l"; ^ n n

N$ - FONT NAME / FILE NAME

5050 5070 5090 51 '1 5200 601C ,'070 AO^O '60

M

!,*7C\ 1 *> r, a i

- 42
1 onon i 1 - O^fi

N$( $ 5 - FONT NAME ARRAY

"7K,,'7{\ m "?{\ c-f-TA cr •» ,-; .a cr •• c; a cr -f £ r\ cr-i -?a. r-t o :ri r< o.r

; nr n a. a, jr^r-,^ pnift eti-?a

Of • OLD FILE NAME

OF - ORIGIN FLAG 1-SET

TO"?/"- H^AP* 7C/i .''i

HS* - OLD TEXT STRING

OftTA, Gft"!f\ QA-JA, Of} "7 ft Pfti-A Pft '' ft Qc""T5 OP7'i OfT^/i * - 1 ift

ni'T .. ri!j T P!!T pnijTTxic rnp pp; nr

ifi/iO 1-10 "^'O "M Pft p"* 1^

R - ASC ( ?% )

R* • HERSHEY CHARACTER NUMBER A3 STRING

ooofi oiifl ooorj o=ji q gciA PftAO

PC - REN CONTROL ADDRESS IN ERLOT

2100 31°0 "'-'0 3-i -- !"

1 7,-Pft 7- 680 i7i Sf1 7'-°0 "?.£Qfi "?£9ft i ^ftpft hi i^

pp .. oq> POSITION FLA^ =UP ''-DOWN

-f/OA in <a M iA

PX - PL0TTrn;' Y D

r!r L!r

'i"; TT 0f-! 3570 4040 5140 7020 7030 7030 r'OSO 7030 7050 7050 7060 7060 7070

?Q°ft 710^ ? 1 ft0 1 r!f"Mi"> l^ft4ft i^Ai'O 1 5050 '"^O^O 1 C

I" :;-" IFIft.-ift l clft~-'A

FY - PL0T T rP Y P^t crrTHM

3570 4040 6140 7020 7040 7040 7040 7040 7050 7050 7060 "060 7070

7ft9ft 71 J ft 71*0 1 c A'^ft 1 SA4ft I'vA/jft * Sft^Q 1 ^A^O * F^CV-fl ^ 5fK0 150"*?)

Q$ - STRING MAINLY FOR QUESTION ANSWER INPUT

160 160 170 530 1020 2200 2200 4040 4040 4040 4040 4060 5120

A120 88^0 8840 PP^ft pq^n qoftA PPOO P°1''

R - ORIGIN(HOME) NUMBER

2100 3540 3540 3540 3540 3570 3570 3570 3570 3570 35S0 3600 3600

36^^ 3£rtQ 4ft 10 AQ?0 6080

R$ - RADIAL DEFLECTION STRING

3010 3330 3030 3030 S030 3030 3030 3040 S060 3060 3100 3100 3150

8130 3210 3220 8220 -510 P580 SS30 8?Oft 10020 10030 10040 10050

11010 11010 11010 11020 16140

RHO - VAL( Rl ) ?i"i1 ft 7iirt inn "?ion "»1"7A ~*i~:r\ i^.^.n t;^ ~zz.~?-f\ "jzoa -izon Tion t.:cja

--I'Ji'J Ji^'J 61J.0 J-Ij-U Jii'J OlJU ij-JU Ju. 'J Ju. 'J wOwJ ji-uU _^wv' ju?'J

3630 3630 3720 10020 10020 10020 10030 10030 10030 10040 10040

10040 10050 10050 10050 11010 13030 13030 13030 13130 13140 13140

- 43 -
13170 13170

SC - SPECIAL CHARACTER FLAG l^SET

nn->ri SQAQ 30R0 BO^ft SIO^

qp .... g^ntr pl^g 1~SET

2200 3010 3020 3520 3530 3710 3720 6130 £180 8170 8620 86 30

SIZE - SIZE OF HERSHEY CHARACTER

m,.in p^sn

t* ._ ttyt TMPUT STRING CHARACTER

8650 3*56 8060 s8c:3 S060 SO/b" 5090 8080 3

r,or, qiAA Riftf

TC* - TEMPORARY CHARACTER FOR SYNTAX CHECK

20010 20020 20020 20020 20020 20020 20020 20020 20020 200: ',"i nr-.n^r*

TEMP - TEMPORARY VARIABLE

3160 16140 16140

TIME - OUTPUT DELAY TIME IN BPLOT

1060 1080 7160 7160 7170 7170 8740 8750

TX • TEMPORARY X 7050 15020 15030 15040 15040 15050 15050 15060 i c* ,*\ •? a ( nr ,--. ~? /

tv ... TEMPORARY Y

7 05Q 15w20 15030 150 i;;0 150v-0 15050- 15050 150&0 15C60 150^0 ^ ET /*•. ~? A

7( $ ) - VERT„ HOME ARRAY V( R )

i 'G£*-! - '"-"CTOP ^; ^>•-,^

P''' T ^

,:

!

, ^~!"!p rrc: tm ppp[ n" 1040 7130

VI-! - VERTICAL HIGH BYTE

1 ft 7ft "M 4 ft m .... hfro Tip 6! ! nil P

v'Tr" 1070 71 40

I'll _ | QOP T Mr!F°Y

W - WIDTH OF TEXT STRING

p-JO/> O 1

K%

f-, D "7 "7 ft O "7 '7 ft C' O ft ft O q ft ft O O ^ ft O O i f\ O O -'. f> 007 ft O O '7 ft

UF • WORE FLAG 1-SET

X - HORIZON!A' PLOTTER U&^taei f

3690 7020 7070 100J 1^020 1 0^4^

X % ( 't 5

•"

I-l E

R

f-~' HF Y r- M '- R * r T p # -• R R » v

•* A "7 j"j Br

.

n

r *f n ^^O Ti O .' *"' A O .-* 1 fi O -1 '7 r. O -f. "7 f\ O •' .' ^ O '. c *** O I I f\ O .'. "7 -f\

VT\ -.. y f;rrt CpTTflM TW PI pTTTD MfcJTTO

-t c; /, j^ -r rr .; /* •? cr -7 r-, "7 c

1 -? ^ -7 * f% f\ ,/, r-t i :-"*»

". T-, '• f\ (. f\ O f\ "7 f\ O '**. "7 /"• C- ."1 O L

*~- (\

44 -
vu ... v LiTPL| PVTF

71 ft ft 7ifj|"| -7i'-i :

'--

1 "7-t •"•,''• ~* 1

yi .... v j p!,! pvrr

'iftft 71 40

1 ft O ft 7 1 7 f\ 7 ""> *"> ft 7 O .', ft 7 ft O ft 7 ft

""> ft O D 1 ft O O '! "i Ofilfl 17 ft O ft 1 -7-1

yyc .. XYFLAG 1"SET

"^5^0 3550 10010 10070 120">0 17020

v .. McoTr-A! di r-TTrD r;rci vr-rrnu

7CC/'; -7 C IT

ft, "J ST E7 ft, -7 E7 £ ft. ~» HT £ ft, '7 ET ("Ift, "J ET r) <

'7ft Iftftlft 1ftft7ft, IftfttTft '

U - Y

1 IQ / 1

1

'J / 1

'.'" VJ : v. ! .' ' ••'•1.1

yi ... ' v '!£pTjrA[_ ; njj pvjfr

7110 7 1

-'

ynirr _ iicpTTfi! rii|TpyT MCT" Tr, P

i iftTft 07-"*ft

Z - INSTRUCTION NUMBER T n EDIT

12030 16110 161^0 1^140 l^.i^-O

ZZ - LQ0R INDEX

12040 12040 12010 13140 1 3 1 ^ 1^1--

j l ft o ft 1 .; -i l ft i

1 : *i .i ft, i ,; 9 /. ft, f

/ 1 .i .ft

i i ft cr ^ •) .;. -• n ft, • /

ft, n ft.

•) / ft q ft -i / ft. n ft

END QF VAR« LIST

- 45 -
LISTING 4

T F " C T1 TJ

j HO ,

-•" TsiciTr a* *-. 4

4. Ii •_: j. *•. a i i w

: » J. T ?TO Tt a ii U a j_ T 1ST C- T T)

J. ti _ 4. it , NO a .J.

.

t-.t ra 1 THOTO . 4 i ''_! a

!-T

T TT " ^T;

a 'jria 1 Tfiq tts

a i » _ a ~

iii'J i 4.1. , no , O

T ?TO TT3

, *

T n . <3 T t-T c T T3

J. ii •_- 4. 4.i , NO a i

*"r TMOTTI X ii -J i XI , no .

1 J Tf>nm 13

, no a

1 il T"CT? „

?.r r,

a

f 2

T M C T V , MO .

1 ir iaiu J M e »

x V4-i a no a 1 sr

iiiuj ii>. a li'J . i 1 t mcttj 4. ii -_ i, it. . NO . i

"^ laSTE a NO a 1 o TMCTU illUi 4.1. a Tt n a

1 o INSTE . no a L! '..' T f!OTt! . no a j_

1 INSTH a i % W , *-. ^_ TtlPTT) iU4 4. 4.i a f?n a

'* J

HT?M

HID EX OEj

il.'l..! u i ii;

13 T T - T P0° T ' u

,n 4 n - *r -•-t U" i — 4 4^ - 4.

f_

,rj t 3 c; .•-..

'-. '"' T U O H i P 1

;"':

T-T

- 46 -
LISTING 5.

filename: scup

INSTE . NO.

IHSTE . NO.

INSTE . NO.

INSTE . NO.

INSTE . NO.

INSTE . NO.

INSTE NO

.

INSTE . NO.

T MC TT3

. NO.

THCTT! , NO.

INSTE NO.

INSTE NO.

INSTE NO

.

INSTE, NO.

INSTE. NO.

INSTE NO.

INSTE. NO.

INSTE. NO . T T?C TtJ NO . INSTE, mt,

TflCTB NO.

ii'tJ iln NO.

T NSTF NO.

INSTE. NO . NO . INSTE. NO.

_ -•: - j. .- NO.

iliU i. It NO . NO . TIJOTB NO.

T «T O TTJ NO . TMCTTJ NO . TMCJTC NO

.

INSTE. NO

INSTE. NO

INSTE. NO.

INSTE

.

J.4 w INSTE. NO.

INSTE i'i w a INSTE. NO.

1 1

1

•":

1 4

1 IT

2 4

u

p

t M rs v

~T MUHEE

INDEX

INDEX SHALL

T MT\rv r.^rr k v m p n t

1 1,U _ _

"0 T T v -> V,

PU2U

210.35

IE

n t> n t- t U C- Li PU2L

PD3U

H

1 r

rs 1

,"3 •- tr '-. 1 o f-,

%

u

f5 f ^ O 5

" " 1 T3TT i PIT

1

'"• T

t.t q r\ yp i

,•, H

y 1 V =: PTCTD

T? a

? U 4 E

d r '- T T p T T V _ -

'

-, ^ T N ' A ) 4 H

4E

- 47 -
LISTING 6.

0010 i ROUTINE TO OUTPUT

0020 i ONE CHAR. OR CHAR.

0030 i STRING STORED IN

0040 i TABLE, AT $OUT($8600)

0050 WAIT EQU FCA8

0055 / MONITOR DELAY ROUTINE

0060 SERIO EQU C200

0065 / SERIAL CARD IN SLOT #2

0070 OBJ 83B8

0080 ORG 83B8

0085 .********************************

0087

83B8 AE0984 0090

0095

PLOT LDX SIZE

START: LOAD SIZE IN X REG

83BB F025 0100

0105

0107

BEQ RESTOR

IF ZERO RESTORE POINTERS

AND RETURN

83BD AD0086 0110

0115

0117

FETCH LDA OUT

GET NEXT CHARACTER

TABLE STARTS AT $8600

83C0 C978 0120

0125

CMP #$78

IS IT "X"?

83C2 F01E 0130

0135

BEQ RESTOR

YES THEN RETURN

83C4 1016 0140

0145

0146

BPL PENCON

IS IT "Y" OR "Z"?

IF YES THEN PENCONTROL

83C6 6D0A84 0150

0155

ADC ANGLE

HOR. OR VERT. CHAR?

83C9 2977 0160

0165

AND #$77

ROTATE TO PROPER ORIEN.

83CB 20F583 0170 JSR PUTOUT

83CE CA 0180

0185

DEX

FINISHED?

83CF DO EC 0190

0195

BNE FETCH

NO. DO IT AGAIN

83D1 EEBE83 0200

0205

MOVEUP INC FETCH+01

GET NEXT CHARACTER

83D4 D0E2 0210 BNE PLOT

83D6 EEBF83 0220 INC FETCH+02

83D9 4CB883 0230 JMP PLOT

0235 . *******************************

83DC 20F583 0240 PENCON JSR PUTOUT

0245 / PUT OUT PEN CONTROL

83DF 4CD183 0250 JMP MOVEUP

0255 i GET NEXT CHARACTER

0257 . *******************************

83E2 AD0784 0260 RESTOR LDA HOOK+00

0265 / RESET PTR. TO $8600

83E5 8DBE83 0270 STA FETCH+01

83E8 8D7985 0280 STA STORE+01

83EB AD0884 0290 LDA HOOK+01

83EE 8DBF83 0300 STA FETCH+02

83F1 8D7A85 0310 STA STORE+02

83F4 60 0320 RTS

0325 i RETURN TO CALLING PGM.

0326 . *******************************

- 48
0327 . *******************************

0328 i PUTOUT CHAR ON RS2^2

P3F5 AS 0330 PUTOUT TAY

0335 / SAVE ACCUMULATOR

83F6 2000C2 0340 JSR SERIO

0345 i OUTPUT TO SLOT #2

O.^F9 AD0CQ 4 0350 LDA DELAY

0355 r LOAD DELAY (0-255)

33FC 20A8FC 0350 JSR WAIT

0365 i MONITOR WAIT (SFCAP)

8 IFF 98 0370 TYA

0375 i RESTORE ACCUMULATOR

0400 ^0 0380 RTS

0385 . *******************************

i R401 AD0B84 0390 ONECHR LDA CHAR

0395 r ONE CHAR. OUTPUT ROUTINE

8404 4CF583 0400 JMP PUTOUT

0402 r DEFINE SOME VARIARLES

0405 / 8407 0036 0^10 HOOK EQD OUT

8409 01 0420 SIZE DFD 01

8 40A on 0430 .ANGLE DFD 00

840B 78 0440 CHAR DFD 7R

S40C FF 0450 DELAY DFD FF

0455 . *******************************

0460 LETTER GENERATOR

0470 FOR HERSHEY VECTORS

0480 PEN EOU 73

0485 / START WITH "X" 0490 XVEC EQU 00

0500 YVEC EQU 00

0505 / START WITH X=Y=0

840D A9FF 0510 LETTER LDA ft$FF

840F 8DE385 0520 STA FH

0525 / INITIALIZE F

8412 A978 0530 LDA #PEN

8414 207885 0540 JSR STORE

0545 / STORE PEN COMT. CHAR.

84.17 A900 0550 XIN LDA #XVEC

0555 / CALC. & STORE XL & XH

0419 8DD885 0560 STA XL

84 1C 3008 0570 BMI XNEG

841E A900 0530 LDA #$00

8420 8DD9S5 0590 STA XH

8423 4C2B84 0500 JMP YIN

8426 A9FF 0610 XNEG LDA #$FF

8428 8DD985 0^20 STA XH

842B A900 0630 YIN LDA #YVEC

0635 / CALC. & STORE YL & YH

842D 8DD685 0640 STA INPUT

3430 3008 0650 BMI YNEG

3432 A900 0660 LDA #$00

8434 8DD785 0670 STA YH

8437 4C3F84 0680 JMP GO

0685 / JMP TO VGEN ROUTINE

843A A9FF 0690 YNEG LDA #$FF

843C 8DD785 0700 STA YH

0705 / FALL INTO VGEN RTN.

0706 . *******************************

- 49 -
0707 ,

.   kick **  **********************

0710 , VECTOR GENERATOR SUBRTN

0720 , "CALL BOUT @$8440

0730 DBL.PREC.ON LOC. $8506-

0740 $85D9 YL-YH-XL-XH

0745 A$ STRING $85EE-$85FD

84 3F 18 0750 GO CLC

8440 A200 0760 LDX #$00

8442 E004 0770 GOLOOP CPX #$04

0775 GET X AND Y VALUES

8444 F030 0780 BEQ FEQ

8446 E8 0790 INX

8447 BDD635 0800 LDA INPUT,

844A 300F 0810 BMI COMPL

844C 9DDA85 0820 STA INPUT+04,X

844F CA 0830 DEX

8450 BDD685 08^0 LDA INPUT,

8453 9DDA85 0850 STA INPUT+04 ,X

8456 E3 0860 INX

3457 E3 0370 INX

8458 4C4284 0830 JMP GOLOOP

845B CA 0890 i 30MPL DEX

0895 i CALC /X/ AND /Y/

845C BDD^05 0900 LDA INPUT,

845F 49FF 0910 EOR #$FF

8461 6901 0920 ADC #$01

8463 9DDA85 0930 STA INPUT+0^,X

8466 E8 0940 INX

8467 BDD685 0950 LDA INPUT,

846A 49FF 0960 EOR #$FF

S46C 6900 0970 ADC #$00

846E 9DDA35 0980 STA INPUT+04,X

3471 18 0990 CLC

8472 E3 1000 INX

8473 4C4284 1010 JMP GOLOOP

1015 i HI PLOT BASIC RTN.

8476 A204 1020 FEQ LDX #$04

8478 A006 1030 LDY #$06

347A 209935 1040 JSR ADD

847D A203 1050 LDX if$08

847F A00C 1060 LDY #$oc

8481 20C785 1070 JSR MOVE

3484 D009 1080 BNE DEQ

8486 CA 1090 DEX

8487 BDD635 1100 LDA INPUT,

848A D003 1110 BNE DEQ

848C 4C9385 1120 JMP QUIT

848F A204 1130 DEQ LDX #$04

8491 A006 1140 LDY H=$06

8493 20B085 1150 JSR SUB

8496 A208 1160 LDX #$08

3498 AOOE 1170 LDY #$0E

349A 20C785 1180

1185

JSR MOVE

- 50 -
849D A900 1190 IEQO LDA #$00

849F 8DE085 1200 STA INPUT+OA

84A2 ADD785 1210 YTEST LDA INPUT+01

R4A5 3005 1220 BMI TSUM

84A7 A902 1230 IEQ2 LDA. tt$02

84A9 8DE085 1240 STA INPUT+OA

84AC A200 1250 TSUM LDX #$00

84AE A002 1260 LDY #$02

84B0 209985 1270 JSR ADD

84B3 3006 1280 TTEST BMI TDIFF

84B5 EEE085 1290 IPLUS2 IMC INPUT+OA

84 B8 EEE085 1300 INC IMPUT+OA

84BB A200 1310 TDIFF LDX #$00

84BD A002 1320 LDY #$02

84BF 20B085 .1 330 JSR SUB

84C2 3006 1340 TESTT BMI XTEST

84C4 EEE085 1350 TWOPI INC INPUT+OA

84C7 EEE085 1360 IMC INPUT+OA

84CA ADD985 1370 XTEST LDA INPUT+03

84CD 300E 1380 BMI IPT

84CF ADE085 1390 ATEMI LDA INPUT+OA

84D2 49FF 1400 EOR #$FF

84D4 6909 1410 ADC #$09

84D6 3DE085 1420 STA INPUT+OA

84D9 18 1430 CLC

84DA 4CE584 1440 JMP DTEST

84DD ADE085 1450 IPT LDA INPUT+OA

84 EO 690A 1460 ADC #$0A

84E2 8DE085 1470 STA INPUT+OA

84E5 ADE585 1480 DTEST LDA INPUT+OF

84E8 301E 1490 BMI TABSY

84EA A206 1500 TABSX LDX #$06

84 EC A010 1510 LDY #$10

84EE 20C785 1520 JSR MOVE

84F1 ADE485 1530 DMIND LDA INPUT+OE

84F4 49FF 1540 EOR #$FF

84F6 6901 1550 ADC #$01

84F8 8DE485 1560 STA INPUT+OE

84 FB ADE585 1570 LDA INPUT+OF

84 FE 49FF 1580 EOR #$FF

8500 6900 1590 ADC #$00

8502 8DE585 1600 STA INPUT+OF

8505 4C0F85 1610 JMP EEQ

8508 A204 1620 TABSY LDX #$04

8 50A A010 1630 LDY #$10

850C 20C785 1640 JSR MOVE

850F A900 1650 EEQ LDA #$00

8511 8DE885 1660 STA INPUT+12

8514 8DE985 1670

1675 / STA INPUT+13

- 51 -
8517 A20E 1680 ZEQ LDX #$0E

8519 A010 1690 LDY #$10

851B 209985 1700 JSR ADD

851E A208 1710 LDX #$08

8520 A012 1720 LDY #$12

8522 209985 1730 JSR ADD

8525 A208 1740 LDX #$08

8527 A012 1750 LDY #$12

8529 209985 1760 JSR ADD

852C 3026 1770 ZTEST BMI EPLUST

852E A20E 1780 EPLUSD LDX #$0E

8530 A012 1790 LDY #$12

8532 209985 1800 JSR ADD

8535 A208 1810 LDX #$08

8537 A012 1820 LDY #$12

8539 20C785 1830 JSR MOVE

853C A20C 1840 FMIN2 LDX #$0C

853E A014 1850 LDY #$14

8540 20B085 1860 JSR SUB

8543 A208 1870 LDX #$08

8545 AOOC 1880 LDY #$oc

8547 20C785 1890 JSR MOVE

854A AEE085 1900 All LDX INPUT+0A

1905 i GET "P" ,"Q",ETC.

854D CA 1910 DEX

854E BDEE85 1920 LDA VECTOR ,X

8551 4C7885 1930 JMP STORE

8554 A210 1940 EPLUST LDX #$10

8556 A012 1950 LDY #$12

8558 209985 1960 JSR ADD

855B A208 1970 LDX #$08

855D AO.1.2 1980 LDY #$12

855F 20C785 1990 JSR MOVE

8562 A20C 2000 LDX #$oc

8564 A016 2010 LDY #$16

8566 20B085 2020 JSR SUB

8569 A208 2030 LDX #$08

856B AOOC 2040 LDY #$oc

856D 20C785 2050 JSR MOVE

8570 AEE085 2060 AMI LDX INPUT+OA

2065 / GET "PV'Q" ,ETC.

8573 CA 2070 DEX

8574 CA 2080 , DEX

8575 BDEE85 2090 LDA VECTOR ,X

8578 8D0086 2100 STORE STA OUT

2105 i

] 3UT CHAR. IN TABLE

857B C978 2110 CMP #$78

857D F019 2120

2121 i BEQ RETURN

- 52 -
2125 / IF "X" THEN RETURN

357F EE7985 2130 INC STORE+01

2135 / INC. TABLE LOC.

8582 D003 2140 BNE TESTF

8584 EE7A85 2150 INC STORE+02

8587 ADE385 2160 TESTF LDA INPUT+OD

858A 3007 2170 BMI QUIT

858C D089 2180 BNE ZEQ

858E ADE285 2190 LDA INPUT+OC

8591 D084 2200 BNE ZEQ

8593 A978 2210 QUIT LDA #$78

8595 4C7885 2220 JMP STORE

8598 60 2230 RETURN RTS

2232 . *******************************

r 2235 i DOUBLE PREC. RTNS.

8599 18 2240 ADD CLC

859A BDD685 2250 LDA INPUT ,X

859D 79D685 2260 ADC INPUT,

Y

85A0 8DDE85 2270 STA INPUT+08

85A3 E8 2280 INX

85A4 C8 2290 INY

85A5 BDD685 2300 LDA INPUT,

X

85A8 79D685 2310 ADC INPUT,

Y

85AB 8DDF85 2320 STA INPUT+09

85AE 18 2330 CLC

85AF 60 2340 RTS

85B0 38 2350 SUB SEC

85B1 BDD685 2360 LDA INPUT,

X

85B4 F9D685 2370 SBC INPUT,

Y

85B7 8DDE85 2380 STA INPUT+08

85BA E8 2390 INX

85BB C8 2400 INY

85BC BDD635 2410 LDA INPUT,

X

85BF F9D685 2420 SBC INPUT,

Y

85C2 8DDF85 2430 STA INPUT+09

85C5 18 2440 CLC

85C6 60 2450 RTS

85C7 BDD685 2460 MOVE LDA INPUT,

X

85CA 99D685 2470 STA INPUT,

Y

85CD E8 2480 INX

85CE C8 2490 INY

85CF BDD685 2500 LDA INPUT,

X

85D2 99D685 2510 STA INPUT,

Y

85D5 60 2520

2521 / RTS

- 53 -
2525 . *******************************

2527 i VARIABLE STORAGE

85D6 00 2530 INPUT DFD 00

2535 / INPUT = YL

85D7 00 2540 YH DFD 00

85D8 00 2550 XL DFD 00

85D9 00 2560 XH DFD 00

85DA 00 2570 AYL DFD 00

85DB 00 2580 AYH DFD 00

85DC 00 2590 AXL DFD 00

85DD 00 2600 AXH DFD 00

85DE 00 2610 RESL DFD 00

85DF 00 2620 RESH DFD 00

85E0 00 2630 I DFD 00

85E1 00 2640 DFD 00

85E2 00 2650 FL DFD 00

85E3 00 2660 FH DFD 00

35E4 00 2670 DL DFD 00

85E5 00 2680 DH DFD 00

85E6 00 2690 TL DFD 00

85E7 00 2700 TH DFD 00

85E8 00 2710 EL DFD 00

85E9 00 2720 EH DFD 00

85EA 02 2730 TWO DFD 02

85EB 00 2740 DFD 00

85EC 01 2750 ONE DFD 01

85ED 00 2760 DFD 00

85EE 70 2770 VECTOR DFD 70

2775 / VECTOR = "P"

85EF 71 2780 Q DFD 71

85F0 72 2790 R DFD 72

85F1 71 2800 Q2 DFD 71

85F2 72 2810 R2 DFD 72

85F3 73 2820 S DFD 73

85F4 74 2830 T DFD 74

85F5 73 2840 S2 DFD 73

85F6 74 2850 T2 DFD 74

85F7 75 2860 U DFD 75

85F8 76 2870 V DFD 76

85F9 75 2880 U2 DFD 75

85FA 76 2890 V2 DFD 76

85FB 77 2900 W DFD 77

85FC 70 2910 P2 DFD 70

85FD 77 2920 W2 DFD 77

85FE 00 2930 DFD 00

85FF 00 2940 DFD 00

8600 00 2950 OUT DFD 00

2955 . *******************************

2956 /

- 54 -
LISTING 7.

Vector generator BASIC routine to generate the best straight line

between two points. From Houston Instrument HiPlot Manual.

Comments indicate the correspondence between this program and

locations in the 6502 assembly language program BPLOT.

23

A5

100

110

120

1 30

140

150

160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

310

3 20

330

340

350

360

370

380

390

400

410

420

430

440

450

460

470

REM Input YL, YH,

REM Output PENCON

REM GO

REM Output PENCON

INPUT X,Y

PRINT "z"

GOSUB 100

PRINT "y"

REM *******

REM THIS SUBROUTINE DRAWS THE BEST STRAK

REM COORDINATE CHANCE OF (X) AND (Y)

XL, XH

if pen down;

if pen up

VECTOR GENERATOR SUBROUTINE*******; REM i HIT LINE FOR

F=ABS(X)+ABS (Y)

IF F=0 THEN 4 70

D=ABS(Y) -ABS(X)

DIM A$ (16) ; REM

REM FEO

REM JMP QUIT

REM DEQ

VECTOR

A$="pqrqrststuvuvwpw" REM VECTOR, Q,R,Q2,R2,S,T,S2,T2,U,V,

U2,V2,W,P2,W2

1=0 ; REM IEQ0

IF Y<0 THEN 210

1=2 ; REM ITEST

T=X+Y ; REM TSUM

IF T<0 THEN

1=1+2 ; REM

T=Y-X ; REM

IF T <

1 = 1 + 2 IX X < 1=8-1 ; GOTO 310

1=1+10 ;

REM YTEST

24 REM TTEST

IPLUS2

TDIFF

THEN 270

REM TWOPI

THEN 30

REM ATEMI

; REM JMP DTESI

REM IPT

REM TESTT

REM

IF D < T=ABS(X) ; D=-D ; REM

GOTO 360 ; T=ABS(Y) ;

THEN 3 50

REM TABSX

DMIND

REM JMP EEQ

REM TABSY

REM DTEST

E=0 ; REM EEO

Z=T+D+E+E ; REM ZEQ

IF Z < THEN 4 30 ; REM ZTEST

E=E+D ; REM EPLUS D

F=F-2 ; REM FMIN2

PRINT USING "#,1A" ;A$ (1,1) ; REM All

GOTO 460 ; REM JMP STORE (INSTEAD OF OUTPUTTING CHARACTER,

STORE IT IN OUT TABLE AT $8600+)

E=E+T ; REM EPLUST

F=F-1 ; REM LDX #$0C

PRINT USING "# ,1A";A$ ( (1-1) , (1-1) ) ; REM JMP STORE

IF F>0 THEN 370 ; REM TESTF

RETURN ; REM QUIT (STORE "x" TO MARK END OF TABLE , RETURN)

- 55 -
NBS-114A (rev. 2-8C) U.S. DEPT. OF COMM,

BIBLIOGRAPHIC DATA

SHEET (See instructions)

1. PUBLICATION OR

REPORT NO.

NBS TN 1184

2. Performing Organ. Report No 3. Publication Date

January 1984

4. TITLE AND SUBTITLE

Utility Programs for Producing Camera Ready Illustrations on a Microcomputer

and a Laboratory Plotter

5. AUTHOR(S)

C. E. Dick

6. PERFORMING ORGANIZATION (If joint or other than NBS. see instructions)

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

7. Contract/Grant No.

8. Type of Report & Period Covered

Final

9. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street. City. State. ZIP)

Same as in item 6 above.

10. SUPPLEMENTARY NOTES

~2 Document describes a computer program; SF-185, FlPS Software Summary, is attached.

11. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here)

A collection of software routines is described that allows the user to Drepare camera ready illustrations in the laboratory or office environment. These

routines are written in APPLESOFT BASIC and 6502 assembly code for the Apple II microcomputer which is interfaced with an inexpensive digital plotter. Provisions

are made to draw figures composed of straight and curved line segments, letter the

figures with a variety of graphic arts fonts, and save the figures on disk for

later plotting or revision.

12. KEY WORDS (Six to twelve entries; alphabetical order; capitalize only proper names; and separate key words by semicolons)

Apple II computer; camera ready illustrations; digital plotter; graphic arts;

microcomputer.

13. AVAILABILITY

fjX] U n I i m i ted

| | For Official Distribution. Do Not Release to NTIS

[~X] Order From Superintendent of Documents, U.S. Government Printing Office, Washington, D.C.

20402.

^) Order From National Technical Information Service (NTIS), Springfield, VA. 22161

14. NO. OF

PRINTED PAGES

59

15. Price

USCOMM-DC 6043-P80


NBS TECHNICAL PUBLICATIONS

PERIODICALS

JOURNAL OF RESEARCH—The Journal of Research of the National Bureau of Standards reports NBS research and develop- ment in those disciplines of the physical and engineering sciences in which the Bureau is active. These include physics, chemistry,

engineering, mathematics, and computer sciences. Papers cover a broad range of subjects, with major emphasis on measurement

methodology and the basic technology underlying standardization. Also included from time to time are survey articles on topics

closely related to the Bureau's technical and scientific programs. As a special service to subscribers each issue contains complete

citations to all recent Bureau publications in both NBS and non- NBS media. Issued six times a year. Annual subscription: domestic

$18; foreign $22.50. Single copy, $5.50 domestic; $6.90 foreign.

NONPERIODICALS

Monographs—Major contributions to the technical literature on

various subjects related to the Bureau's scientific and technical activities. Handbooks—Recommended codes of engineering and industrial practice (including safety codes) developed in cooperation with in- terested industries, professional organizations, and regulatory

bodies. Special Publications—Include proceedings of conferences sponsored by NBS, NBS annual reports, and other special publications

appropriate to this grouping such as wall charts, pocket cards, and

bibliographies. Applied Mathematics Series— Mathematical tables, manuals, and

studies of special interest to physicists, engineers, chemists,

biologists, mathematicians, computer programmers, and others engaged in scientific and technical work.

National Standard Reference Data Series—Provides quantitative data on the physical and chemical properties of materials, compiled from the world's literature and critically evaluated. Developed under a worldwide program coordinated by NBS under

the authority of the National Standard Data Act (Public Law

90-396).

NOTE: The principal publication outlet for the foregoing data is the Journal of Physical and Chemical Reference Data (JPCRD)

published quarterly for NBS by the American Chemical Society

(ACS) and the American In'stitute of Physics (AIP). Subscriptions,

reprints, and supplements available from ACS. 1 155 Sixteenth St., NW, Washington, DC 20056.

Building Science Series—Disseminates technical r

rormation

developed at the Bureau on building materials, components,

systems, and whole structures. The series presents research results,

test methods, and performance criteria related to the structural and

environmental functions and the durability and safety characteristics of building elements and systems.

Technical Notes—Studies or reports which are complete in themselves but restrictive in their treatment of a subject. Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject area. Often serve as a vehicle for final reports of work performed at N BS under the sponsorship of other government agencies

Voluntary Product Standards—Developed under procedures

published by the Department of Commerce in Part 10, Title 15, of

the Code of Federal Regulations. The standards establish nationally recognized requirements for products, and provide all concerned interests with a basis for common understanding of the

characteristics of the products. NBS administers this program as a supplement to the activities of the private sector standardizing

organizations. Consumer Information Series—Practical information, based on N BS research and experience, covering areas of interest to the con- sumer. Easily understandable language and illustrations provide

useful background knowledge for shopping in today's technological marketplace. Order the above NBS publications from: Superintendent of Documents, Government Printing Office, Washington. DC 20402. Order the following NBS publications—FIPS and NBSIR's—from

the National Technical Information Service, Springfield, VA 22161.

Federal Information Processing Standards Publications (FIPS

PUB)—Publications in this series collectively constitute the Federal Information Processing Standards Register. The Register

serves as the official source of information in the Federal Govern- ment regarding standards issued by NBS pursuant to the Federal Property and Administrative Services Act of 1949 as amended,

Public Law 89-306 (79 Stat. 1127), and as implemented by Executive Order 11717(38 FR 12315, dated May II, 1973) and Part 6

of Title 15 CFR (Code of Federal Regulations).

NBS Interagency Reports (NBSIR)—A special series of interim or

final reports on work performed by NBS for outside sponsors

(both government and non-government). In general, initial dis- tribution is handled by the sponsor; public distribution is by the National Technical Information Service , Springfield, VA 22161,

in paper copy or microfiche form.
U.S. Department of Commerce

National Bureau of Standards

Washington, D.C. 20234

Official Business

Penalty for Private Use $300

POSTAGE AND FEES PAID

U S DEPARTMENT OF COMMERCE | COM-215

SPECIAL FOURTH-CLASS RATE BOOK