micro 6502 journal august 1980

82
8/3/2019 Micro 6502 Journal August 1980 http://slidepdf.com/reader/full/micro-6502-journal-august-1980 1/82 THE (]l~(!)~ JOUR AL No.27 AUGUST $2.00

Upload: cubemanpdx

Post on 06-Apr-2018

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 1/82

THE (]l~(!)~ JOUR AL

No.27 AUGUST $2.00

Page 2: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 2/82

PLUG IN AND GO!Instant Video

The only video board that works directly with the AIM or SYM Monitor, Editor,BASIC and Assembler. Simply connect to ,our slstem with our cableassembly, InItialize fhe ASK software~ (available In EPROM) and _II output

WIll appear on the monitor. It Is very easy to use with most KIM programs.

VIDEO PLUSTM•••$245 ASK EPROM••••$45Cable Assembly ••••$15 See special offer below.

Total ExpansionMany companies can sen you a RAM board!Many companies can sen you an EPROM board!

Many companies can sen you an EPROM Programmer!

Many companies can sen you a Prototyplng board!Many companies can sell you an UO board!

Only The COMPUTERIST®olters all of these teatures on one highquality board tor less than others charge for a plain RAM boardl DIrect con-n.cfion to your AIM, SYAf, or KIM via our Cabl. Assembly.DRAM PLUSTM With 18K RAM•••• $295 With 32K RAM•••• S395Price Includes everything exc.pl EPROM••

"Special Offer Below"Mention MICRO, The 8502 Journal. when ordering a Catil. Ass.mbly with a VIDEO PLUS orDRAMPLUSand you wll l rec.1ve the Cabl. Ass.mbly for only $5, a .avlngs of $10 off theregular prlc9. Offer .xpl .... October 31,1880.

Interface/Experiment

Page 3: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 3/82

S o u t l i e a s t e r n s o f t w a r e

DATA CAPTURE 3.0

Is DATA CAPTURE just another smart terminal program for your Apple II@ or

Apple II Plus@?NO. It is a GENIUS TERMINAL PROGRAM and is designed to be used with the

Micromodem II@.

Tired of watching data and programs scroll off the screen forever? Then DATA

CAPTURE is the program for you.

• ANYTHING that appears on the screen of your Apple II can be captured.

Any program or data.

• You can then save what you have captured to disk, dump it to your printer

or even do simple editing with DATA CAPTURE.

• You can use DATA CAPTURE to compose text offline for later transmis-sion to another computer. Think of the timeshare charges this will save you.

• Use DATA CAPTURE with the Dan Paymar Lower Case Adapter and you

can enter lower case from the keyboard for transmission to another computer

or capture both upper .and lower case.

• A program is also included to convert your programs to text files for

transmission using DATA CAPTURE.

• You receive two versions of the program. One is for upper case only and

one for both upper and lower case use with the above adapter.

DATA CAPTURE will save you money if you are using a timesharing systembecause you can compose messages offline for later transmission. You can also

quickly capture data for later reading, printing or editing. Requires DISK II@,

APPLESOFT 11@l.

Price $29.95

If your local dealer does not have DATA CAPTURE then order directly. We ship

DATA CAPTURE within 3 working days of receipt of order and welcome your

personal check. We also accept Visa and Master Charge. Add $64.95 if you would

also like to order the Dan Paymar Lower Case Adapter at the same time.

Ask for a catalog of our software .

• Apple II, Apple II Plus, Disk II and APPLESOFT II are trademarks of Apple Computer Company,

• Micromodem II is a trademark of D.C. Hayes Associates, Inc.

SOUTHEASTERN SOFTWARE

7270 Culpepper DriveNew Orleans, LA 70126

504/246-8438 504/246-7937

Page 4: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 4/82

SYM-PLICITY

ENGINEERED SPECIFICALLY FOR MADE OF HIGH IMPACT STRENGTHTHE SYM·1 MICRO COMPUTER THERMOFORMED PLASTIC

• Easy Access for • Kydex 100*Adjustments • Durable

• Room for Expansion • Molded-In Color• Protects Vital Components • Non-Conductive

EASILY ASSEMBLED AVAILABLE FROM STOCK• Absolutely No • Allow Two to Three Weeks forAlteration of SYM·1 Required Processing and Delivery

• All Fasteners Provided • No COD's Please• Goes Together in Minutes • Dealer Inquiries Invited

ATTRACTIVE FUNCTIONAL PACKAGE

• Professional Appearance• Popular "Data Blue" Color• Improves Man/Machine Interface

TO ORDER: 1. Fill in this Coupon (Print or Type Please)2. Attach Check or Money Order and Mail to:

NAME

STREET

CITY _

STATE _

enclosuresgroup

ZIP771 bush street

san francisco, california 94108

Please Ship Prepaid SSE 1-1(s)@ $36.75each

California Residents Please Pay$39.14 (Includes Sales Tax)

• TM Aohm & Haas Patent Applied For

Page 5: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 5/82

r

.August 1980Issue Number 27

Staff

Editor/Publisher

Robert M. Tripp

Associate Editor

Mary Ann Curtis

Assistant Edltorl

Advertising Manager

L. Catherine Bland

Circulation Manager

Carol A. Stark

Art/Advertising Coordinator

Terry Spillane

Soltware Consultant

Ford Cavallari

Comptroller

Donna M. Tripp

MICRO'" is publ ished monthly by:

MICRO INK. lnc., Chelmsford, MA 01824

Second Class postage paid at:

Chelmsford, MA 01824

Publication Number: COTR 395770subscrtpnon rates: U.S. $15.00per yearForeign surface mail $18.00per yearCentral America ai r $27.00peryearEurope/Japan air $39.00 per yearOther air mall $33.00per y ear

For back issues, subscr i ptlons, change ofaddress or other information, write 10:

MICRO, P.O. Box 6502,Chelmsford, MA 01824

or call6171256·5515

Copyright 101980 by MICRO INK, Inc.All Rlghls Reserved

5 EditorialUses and Abuses of the 6502

by Robert M. Tripp7 Data Statements Revisited

Update stetement« quickly and easilyby Virginia Lee Brady

13 Satellite Tracking with the AIM·55Useful routine for space fans

by C.A. MacCluer.

15 Micro Limericks

17 Better Util ization of Apple Computer Renumber and Merge ProgramRenumbering becomes simpler and more reliable

by Frank D. Chlpchase

19 Variable ListerHow to find, sort and list variables from your BASIC program

by Ray Cadmus

21 Additions to Tiny Pilot

Useful enhancements to Nick Yrtls' T1nyPilotby Bob Applegate

24 Micro Club Circuitby Mike Rowe

27 Nth Precision Add & Subtract With Adjusted Processor StatusEasy way to handle large numbers within a m. I. program

by Lawrence R . Golla

30 Microbe

31 MicroScope

33 Solar System Simulation with or without an Apple IIPicture the universe on your Apple /I

by David A. Partyka

42 OSI's Small Systems Journalby the 051 Staff

47 Interface of 051 C1P With Heath Printer

Simple way to obtain hard copy for your OSI C1Pby William L. Taylor

53 Applesoft Floating POint RoutinesInside Info on the Applesoft floating point routines

by R.M. Mottola

56 Lettemox

57 Atarl NotesUseful information about the Atari 800

by William I. Coisher

59 Up From The Basementsby Jeff Beamsley

81 Son ot Screen PrintAid for overcoming quirks in the Pet printers

by Kenneth Finn

85 Business Dollars and Sense In ApplesoftRounding problems explained and solved

by Barton M. Bauers, Jr.

88 BCD Input 10a 6502 MicroprocessorInterfacing laboratory devIces to your 6502system

by Richard Saltero

71 The MICRO Software Catalog: XXIIIContinuing software product announcements

by Mike Rowe

75 8502 Bibliography; Part XXIIIContinuing coverage of 6502related periodicals

by Dr.William R . Dial

79 Advertisers' Index

80 MicroScope Outlined

Page 6: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 6/82

Expandwith the best

FOB GBAPHICS ... lt's MIPLOT,the intelligent plotterDeBtgn.ed for straight forw&rd interface to

&ny microcomputer that outputs the ASCIIcode, MIPLOTcan evan. be used by operatcrawith no plotter experience.

• tnoorporsree pre-programmed UlmelligenC'runeuons required fo)'produc!!\I! graphs anddJ'ilwLngS

• Sol id and broken una 1 < I P 8 8 can be spectfted• Bu!1~ITIcharacter generator for Itlutll['l!, nu mbersand sym bola

• Charaete ra can be .mlarged and I'OLa!.€d 1.0 fourorientations

• & 'p ec !8 l p rln te l' m od e Q U LP U lB character- data ...".18• Uses ccmmonly avanable hard flbe r·Up pens

• Maxlmum plot speed approximately 2 tnches per

second• BuU , In self'l.eS!, mode

FOR CHABACTER GEIlEllA!rIOIf ... It's the newHAL P<JG6500Programmable Character Generator

At la.st, av&1lable exclUSively at Systems

Formula.te Corporation is the HALFOG6500,

a. programmable character genera.torfor

your PET. With the PCG 6600, you can

program 64 ofyour own cha.ra.ctars into the

system, Other fea.tures:

• !:luUt InCf>2SWls sound amplifier• Imer'face to Pf' 'l '/CBM wtill 24 pin ROMS

• U ser' prog"am nOT .required fo r dlspI1I.YIJlgch,,-,,=rs (only for prograrnrning th<lm1

• PL ltly Independem, of user memory

• i\llsoltwW"O! needed tljWI' II ll p rograrna usl ng

programmed Ch""""t/;lrs Included

••

Only'aooa.t Systems rormulo.ta Corpor&t1on

Only $1,200..t avstema Formulate Corporation

FOR MOBE IlEMORT ...

Whather for Apple, TRa-80, PETor Sorcare,

you'll like the rel1a.blllt;y and price on th1B16K Dynamic RAM Ceramic Pa.ckage bY

F\ljitau

Only.eoatByet.ems Formula.ts Corpor&t1On

••

••

*Formore informat1on 01' to order by phone: (416) 326-9100

W'b&I .<wBryour oyRoom Orsys tem exp&n8l on ,, _. g ive Sys temo lI 'o "" ,u lo .t a & calL w. w1Il be ha.PI'Y to 9II.ruI8l01lll more informat1J:Jn to you or t ol!B your phon. order. w . jionoe M_ Ch&rge, Vle.a. or wll .llIp COD,

StoreBOIll"" llondo,y--l3!l.turdB,y. 10-7, Bun4a,y ~

Page 7: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 7/82

While some people call this the

Atomic Age, and others refer to it asthe Space Age, we all know that it is

actually the Computer Age. No one

will deny the importance of nuclear

energy and space exploration and

technology. Their impact on our

lives is currently, however, very

insignificant in relation to the com-

puter.

There is, undeniably, a common

interest to computers and space.

They have both been used as cot-nerstones for science fiction, and

there are numerous space oriented

computer games: Stat Trek, Space

Ace, Lunar Landet, dating back at

least to the space war game on the

PDp·1,

Uses and Abuses of the 6502When MICf'O started pub,lIoatlon In 1977, Hie 6502

world was very different from what It Is toda,y. At that l imeyou could cheese from an '051 board, a KIM·1. or an otter-Ing from some small company, many of which are nolonger around. Or, you coutd get In !Ine for one of thosebrand new systems: the Appte or the PET, which were Justbeing released In limited quantities. Or, yOI;l could build a

system trern scratch. Then, once YOll had your 6502 basedsystem, you could start Hunting tor support! It was noteasy to find support for the 6502 back In 1977. You mlQhthave found an article relating to the 6502 In every efberIssue of Byte or Kilobaud. There were verty few softwarepack.ages or peripherals available. In every way, the 6502enthusiast In 1977 was a true pioneer.

Since then, of course, almost everything has ohanged.The introduction of the ,6;ppleand PET brought the 6502lnto the spotlight and opened the 6502 world te a newwave of settlers. rnstead of a few thousand 6S02·basedsystems in existance, tlie numbers rapidly grew to thehundred thousands. The major computer magazinesstarted serteus coverage 01 the 6502, and a number ofspecialized magaZ!lnes and newslettecs covering Just theApple, PET, or other single system emerged. The amount

of secondary support In the form of software, books,peripherals, and the like, eXRanded very rapidly.

While this pattern of growth has been generallyposlt lve, there have been some drawbacks, The early 6502owners, were generall¥ knowledgeable about computersand/or electronics and were capable Qf determining theworth ef the various limited offerings. Many of the newusers that have been attracted by the.Apple and PET com-puters are felatlve novices, and with the vast numbers ofcompeting products being offeJ:ed, many are not In a posi·non to Judge the merits of the products. Unfortunately,net all of the products available are woithwlille. With thegrewth of the 6502 market, elements !lave been lntrodue-ed that are much more Interested In making the 'fastbuck' than In supplying a qualfty product at a reasonableprice. This Is probably no more true In the 6502 market

than In the microcomputer market in general.

The problem would go away eampletely If tITere were- some way to have accurate, unbrased, complete evalua-tlons about each product, The purchaser obv'lolisly cannot rely sole,ly on advertisements, product an-nouncements, or product literature produced by themanufacturer. Independenl reviews are probably the bestmethod for getting accurate information out, but a truly

Independent review is very drff.lcult to obtain. Many highlyqUill if ied autners who write about the 6502 are so InvolvedIn the 6502 w0rld that they have-built- In biases, some ob-

vious (a'Swhen the indlvidual has his own company) andsome less ativious (where a special relaflonshlp may flavenaturally.evolved between an author and a producer). un-solicited reviews tend to be biased since they usuallystem from one oftwo reasons: the author loves,a productor the author hates a product. It Is difficult to get aquali fied evaluator together with a product that should beevaluated. The aolutlon which MICRO has implemented isthe new feafure which appears. for the first time In thisIssue, the MICROScope.

In November 19J9 we requested that readers sign-up todo reviews for MICRO, Several hundred readers respond-ed and we now have a good pool of reviewers to choosetrom. In December 1919 we printed a form on whichmanufacturers could request that their products bereviewed. Since then we have g,eneratea the necessarypapefwork. contacted various reviewers and rnanutac-turers, and have gotten some revtews Underway. We willpresent the results of the reviews In a standard format tomake the information easy to use. We have taken everystep Ihat we could think of to insure the accuracy andvalue o,fthe review. Please read the first review whtch ap-pears on page 31 of this lssue, a'ndalso read tlie Review'sResponsibility Information which appears on page 78.Wewelcome your respense to this project. Is this type ofreview Is worthwHile to you? What particular productswoUld you like to see reviewed? Would you like to be areviewer? Do you have a product of your own that y.ouwould like reviewed? Please let us hear from you on thisImportant project. Send cerrespondence to:

MICROScope, P.O. Box 8502, Chelmsford, MA (}1824

~117.~

Out of this World

The cover depicts the computer

on a distant planet. While it witt

probably be some time before an

Apple, PET, or other 6502 based

microcomputer system lands in

such a distant world, there are

some interesting space related

uses for the microcomputer

systems today. Two articles in this

month's issue deal with space. One

provides a program for generating

the set of parameters required for

tracking satellites; the other

generates a map of the solar

system for specified planets over

specified periods of time,

Page 8: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 8/82

•serViceA p p le S o f tw a r eGHOST TOWN

ADVENTURE

Scott Adams' newest! Thirteen

treasures hidden in a ghost town

Be ready lor a lot of surprises and

relll ghosts.

Cassette/24K/M $14.95

SUPER INVASION

The best invaders game available

on home computers! Sensational

Software.

Casset1e/32K1M , $19.95

WINDFALL

Put yourself in charge of Engulf

OIL Try to k&ep consumer prices

down and sn u maintain a profit.

Edu-Ware.

Casselle/32K/A $14.95

Disk/32K1A ,' $19.95

VISICALC

Ca! c u late sa res pro jec tlo n s.

Income laxes, personal budget.

cost estimates, even balance

your checkbook withoul a penci land paper! Personal Software.

Disk/32K1A $150.00

ANDROID NIM

Wonderfully animated version 01

the popular game called Nim.

Disk/24K1M .. , , 517.95

MAGIC PAINTBRUSH

Incredible grapl1ics are easy w,th

this program. Use your game

paddles to rndicate Iwo polnls on

the screen. press a button 10 draw

a line between Ihem. Use lilt

mode 10IiII in areas of Ihe screen

w,lh color. paintbrush mode

(nine dillerent size brushes) to

pamr on the screen. Save your

drawings or sha pe tables as B

l iles. Includes Slot Machine and

Applesoft Invaders 10 show what

you can do. MP Software.

D,sl</32K1A ROM $29.95

SARGON II

The chess prog ram that beal all

Ihe olhe rs, Faster response time

and even a hi nl mode' Hayden

Cassettel24K1M .,.... $29.95

Disk/48K/M $34.95

Also available Sargon I

Casselle/24K1M ... $19.95

THREE MILE ISLANDCan you prevent the radiation

from leaking Into theairwhile still

making B profit? Only you can tell

In this nuclear holocaust slmula-ticn. MUSE.

Dlsk/4BK/I .... $39.96

BEST OF MUSE

Tank Auac«. Escape, Maze

Game, Music Box, and Side

Shows. all on one disk,

Disk/16K11 $39.95

softwa

•fromus.ICROSOFT

ADVENTURE

The people who wrote BASIC lor

all Ihe person al computers. now

bring YO'ua version or the original

Adventure. You nQ longer need a

PDp·l0 lor Ihe power 01 Ihe

original game'

Dlsk/32 KIM . ,. .. .• $29.95

INVASION ORION

Similar to Starfleel Orion except

single player only, dillerent

scenarios.

16K and 32 K Pet versions on one

tape , , $19.95

GAME PLAYING WITHBASIC TAPE 1, TAPE 2,AND TAPE 3

by Hayden $9.95 each

SottSlde Magazine the best

sottware magazine for the Apple,

TRS-BO, and Atar' computers

SIB/year (12 issues I

SoflSlde: Apple program.on c .... n. $39.00 for 6 months

on dl,kella $69.00 lor 6 months

Introductory Special!Until Nov_ 1. Magazine Sl5/yr

Wilh cas sene $69.95/yr With

disk $129.95/yr,

This is only a very small

sample of our product

line. For a complete selec-

tion, send $1 for our cata-

log of hardware, softwareand publications and re-

ceive a $2 credit towardyour first order.

K

EY

I - Integer BASIC

M - Machine Language

A - Applesoft

ROM· Applesoft card or

Apple II Plus only

U. Exr: :1 la1l f l8 6 SOUTH ST., MILFORD, NH 03055

To order: Call Toll-Free 1-800-258-1790 (inNHcaJ/(603)673-5144)

The Software [>chanle &. HOldSide (DiY. of Robil.ille & Son< . Enterpri.e •. Inc.). SoilS/de PubU{"rion,

BASEBALL

High resol uncn sports exci te-

ment as you con Irol players,Baits and strl kes lal l, ad as you

control pitches and swings

MUSE

Casselle/16K1A-ROM , ., $14.95

P e t S o f tw a r eRESCUE AT RIGEL

Search the moon base and

rescue Delilah Rookh from the

High Tollah (Automated Simu-

tatlons)

24K Pel Tape $19.95

DATESTONES OF RYN

Cross swords with a band of

dastardly robbers. Real time

adventure with graphics. (Auto-mated Simulations)

16K Pet Tape , $14.95

STARFLEET ORION

Command a starfleel! 2 player

game system includes rule book,

battle manual, control sheets, 2

programs, 22 space ship types

and '2 play tested scenarios.

8K Pet Tape , $19.96

-ISA-

Page 9: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 9/82

Data Statements Revisited

~~"'~"'''' . . . . .'''~'''~''''''~''' . . . . .The power of BASIC can be greatly enhanced by the

ability of a program to update program statements. Thisarticle discusses the fundamentals of the technique andpresents detailed program examples.

~ " ' ' ' ' ' ' ' ' ' ' ' ' ' ~ ' ' ' ~ ~ ' ' ' ' ' ' . . . . . ''''''~'''

Since I began working with datastatements, I have found that justpoking them Into memory Is fre-ouently not enough. In many ap-plications It is necessary to updatethe actual statements in memory sothat they can beused in subsequent

runs of the program. This becameespecially evident when I was work-ing on a directory program usinglinked lists. I had worked out a pro-gram to handle insertions and dele-tions for string arrays (i.e.-changingthe "links"), but these revisionswere only good for the duration ofthe run of the program; afterwards,the data statements were still intheir original form. In order for theprogram to be truly useful, I.soonfound that I had to change thephysical lines in memory so thatthese new lines could be saved

along with the program, and whenthe program was rerun, the arrayswould contain the corrected stringsand links. While I specificallydeveloped these routines for use ina linked list application, the pro-cedures involved in changing pro-gram lines that can be used in other

ways.

Although this is not a tutorial onlinked lists per se, I should mentionsome of the concepts involved toshow how they can be implementedin Applesoft. The program basically

uses each individual data line as anatom or record within a specific"file" (the directory). The fields arethose elements separated by com-mas. I set up my data statements tolook similar to what is found In

Figure 1.

I Line1 10001 DATA(2) 10002 DATA(3) 10003 DATA

Augusl1980

Thus the directory Is a two-dimensional array whose fields in-clude last name, first name,and ad-dress. There is also a seperatenumeric array, NXT%(I),that is usedto hold the links to the next greaterentry. If NXT%(I) equals zero, the

RECORD(I),isthe greatest one onthe list, although not necessarilythe last one. There is also a linedefining two more variables:

20 X% =003: HEAD% =1

HEAD% is the first or lowest recordin the list; alphabetically, Aardvarkcomes before any of the othernames. X% is the total number ofrecords in the file. A new entrywould beplaced at position X% + 1.Since this is the update positlon, itis referred to as UP.

It should be noted, then, that forany RECORD(I),there are two otherrecords that are in some way"previous" to it:

1)PREV(ious}is a valuewhich is setup by the linked list algorithm andindicates the next "smaller" record.2) RECORD(I-1) is the record im-mediately before RECORD(I),both inthe string array and sequentially inmemory.

The alphabetical integrity of the

list is maintained by the links. ThisIs similar to "follow-the-dots" inwhich one goes from 1 to 2 to 3...,wherever the dots occur. When anew record is entered, it is placed atthe end of the list at the update posi-tion, and the two links are changed.

MI.CRO-- The 6502 Journal

Virginia Lee Bra~y

8 Reldas Ct. Apt. lCockeysville, M D 21030

The next smallest record's link field,NXT%(PREV),Is set to point to thenew entry, RECORD(UP), and thenew record's link points to its suc-cessor, which Is the entry thatNXT%(PREV)used to paint to. In theprogram example, when Collins Is

added, PREYis aSSigneda value oftwo because RECORD(2),Brady, Isthe next smallest record. Then, inline 525, NXT%(4) is assigned thevalue of NXT%(2), which paints toZebra, and NXT%(2) is set to the up-date position. This way, when thelinks are followed, the chain goesfrom 1to 2 to 4 to 3, so that the listis kept In alphabetical order.Similarly, if a deletion occurs forBrady, RECORD(2),PREYis assign-ed a value of one, the next smallestrecord. In line 630NXT%(1) is set toequal NXT%(2) so that the chain

goes form 1 to 4 to 3, completelyskipping past Brady.(If you've neverused linked I1stsbefore, try follow-ing this by hand to get an Idea of

how it works.)

The actual steps involved incalculating the values of NXT%(I),HEAD%, AND PREYare beyond thescope of this article. My purpose isto explain how to get the informa-tion into the Applesoft programonce a suitable algorithm has beendeveloped by the user. It is assumedthat the user is familiar with the

idea of poking data lines into a pro-gram so that these updates can beperformed under program control,rather than by hand on the user'spart. (SeeMicro 19:44)

ANYWHERE,SALISBURY,CITY ZOO,

27:7

Page 10: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 10/82

Reading

During the reading in of a dataline, several events take placebeneath the surface of Applesoft.Locations $7D.7E (125·126) are setto the address of the 00 byte whichindicates the end of a particularstatement read in. This pointer acts

as a sort of "place holder" in that italways points to the last data state-ment that was read in. When Ap-plesoft next encounters a READstatement, it begins its search fromthis address and the pointer is up -dated to the next "end ·of· record"mark. These locations can be usedto the programmer's advantage Ifthey are saved in a data pointer ar-ray, so that after all of the data hasbeen read in, each element in theDP(i) array paints to the end-of-record mark for each correspondingRECORD(I). Using these locations it

is then possible to calculatebackwards in order to reference aspecific part of a data line. IfNXT%(I) is a three byte link fieldplaced at ·the end of the line (themost convenient location), thenDP(I)·3 is the start of that field andDP(I)·4 is its preceding comma. con-versely, DP(I-1) is the end of the lineimmediately preceding RECORD(I),and from there you can calculatethe beginning of line I.

Another pair of pointers set upduring the read are $7B.7C (123·124).

These contain the line numbers ofthe last data line which was read in.Calculating Line = PEEK(123)+ PEEK(124)*256 immediately afterthe main read loops will mean thatLINE 1 5 always equal to the highestnumbered data line. Everytime anew line Is poked into place, thisvalue needs to be incremented 50

that each data line has a unique linenumber.

Writing

To understand how a line that is

physically stored in RAM can bemanipulated, it is necessary toreview the anatomy of the line fromthe interpreUer's point of view:

(line 1) 10003 DATA ZEBRA, TED, CI-T Y ZOO, 000(pp pp = A i 1111 = 8;83 = C i (ascII'szc 30.30 30 = D: 00 = D.'DP(I-1)pointer line "data" DP(1·4)DP(I)

27:8

JRlJNT HE D IREC TORYA ARD VA R. ' SA MANYWHEREBRADY VIRGINIASALISBURYZEBRA TED

CITY ZOONEXT WE WILL SHOW THE LINES THAT HAVE~ EEN CHANGED. ANY KEY TO CONTINUE20 X7. = 003:HEAD% = 110001 DATA AARDVARK.SAM,ANYWHERE

,.00210002 DATA BRADY,VIRGINIA,SALISB

;,JRY,00310003 D AT A Z EB RA ~T ED ,C IT Y ZOO,OO

oANY KEY TO CONTINUE

INSERTWE WILL NOW INSERT :COLLINS,BILL,SALISBURYTHE DIRECTORY :

AARDVARK SAMANYWHEREE:I:;:ADYIRG.INIAS-ALIBBURYCOLUNS BILLSALISBURYZEBRA TEDCITY ZOONEXT WE WILL SHOW THE LINES THAT HAVEBEE& CHANGED. ANY KEY TO CONTINUE

20 XI. = OOq:HEADX = 110001 DATA AARDVARK.SAM,ANYWHERE

,00210002 DATA BRADY.VIRGINIA,SALISB

t . l R Y , O O . < t

10003 DATA ZEBRA?TED,CITY Z00900o

10004 DATA COLLINS.BILL,SALISBURY ,003

ANY KEY TO CONTINUEINSERT

WE WILL NOW lNSERT :MICRO,MAGAZINE.CHELMSFDRDTHE DIRECTDRY :AARDVARK SAMANYWI-:EREBRADY VIRGINIASALIBBURYCOLLINS BILl.

SAL.IS8URYMICRO MAGAZINECHELMSFnF~D

ZEBRA TEDCI.TY ZOO

A. 2 bytes - pointer to next line ofBasic (to next pointer)B. 2 bytes - hex equivalent of theline numberC. 1 byte - "83" - token for

"DATA"D. N bytes - ASCII equivalents ofthe program lineE. 1 byte - "00" - indicates theend of the line

MICRO -- The 6502 Journal August 1980

Page 11: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 11/82

All of the information stored withinthe data statement is stored asASCII codes, since at the time it isentered, Applesoft does not knowwhether it will be read into a stringor numeric variable. Therefore even

NXT%(I) is stored as an ASCIIequivalent rather than a hex-adecimal equivalent of the value.

Because of this, the value can bemanipulated as a string [NXT$ = =

STR$(NXT%(I))] and poked into

place to update the value of anyNXT%(I).

N~XT W~ HILL SHOW THE LI~~S THAT HAVEBEEN CHAMGED. ANY KEY TO CONTINUE

20 XX ~ 005:HEADX = 1l_OJlQL __Of : \ " I l LAARDVABK, SAM~ANYWHl:;RE

.OOZ1 000 2 DATA BRADY.VIRGINIA,SALISB

IJRY.00410003 DATA ZEBRA.TED,CITY IOOyOO

o

HJOO' l Y DATA COLLINS,BILL,SALISBUR

1) It can be done as a loop:

10005 DATAF()F~f.)

ANY KEY TO CONTINUEN OW D EL ET IN (~

B I ' = A D Y

VIF\~GINIASALISBURYTHE DIRECTORYAAFiDVARK SAMANYWHERECOLl.INS BIL.LSALISt;::URY

MICRO MAGAZINE

CHELMSFORDZEBRA TEDCITY ZOO

NEXt W E W 1L l~_S l-!O W It·IF LINES THAT HAVEBEEN CHANGED. ANY KEY TQ CQNTINUE

20 XX = OOS:HEADX = 110001 D AT A A AR DV AR K. SA M, AN YW HE RE

,D Oil

10002 DATA BRADY.VIRGINIA,SALISBURy,OQ't

10003 DATA ZEBRA.TED.CITY ZOO.OOo

1000'1: DATA COLLINS,8ILL~SALISBURY ,005

1000~j DATA MICRD,MAGAZINE,CHELMSFORD ,003

ANY KEY TO CONTINUE

.005M:rCRO. MAGAZINE, CHELMS

~003

In my set up, this link field is ex-actly three characters long, allow-ing up to 1000 combinations ofnumbers. The leading zeros are us-ed to allow room for expanding to alarger number, say, from nine to ten.There are two ways to set up NXT%with the leading zeros:

100 IF LEN(NXT$)< 3 THEN NXT$= "0" + NXY$: GOTO100

This limits NXT$ to a length of ex-actly three, but has a drawback in

time. Whenever Applesoft en-counters a GOTO instruction, itstarts at the smallest line number

and executes a sequential searchfor the specified line number. If theIine is 100the Applesoft mayhave tosearch through up to 100 lines before

it finds the right one. If the above in-

struction causes Applesoft to looptwice, this is 200 lines it may have tosearch through and this takes time.

2) A quicker way is with a sequence

of instructions like:

JLT.STiO l C l M E M : 999920 XX = OC3tWEAD% = 1

100NXT$;:: "00" + NXT$(now lengthis 3,4,or 5)

110 NXT$= AIGHT$(NXT$,3) (nowequals its own righthand side)

Gett i ng NXT$ into pIace forAECORD(UP) is easy; it is con-catenated to the record string and

poked into place at the same timeas the rest of the record. Changingthe NXT% (PREV)is a bit more com-

plex; it needs to replace the oldNXT%(PREV) in memory as precise-

ly as a piece of stone is replaced ina mosaic. Assuming that you have

already set up a DP array, the thisstring fits into locations

DP(PREV)-3, DP(PREV)-2, andDP(PREV)-1.This can be done in a

loop, where DP= DP(PREV)-4, the

Z2 REM

DO NOT CHANGE ANYTHING ABOVETHIS WITHOUT RECALCULATING

LINE 72 !2 5 DIM DIR$(1 00 ,1 ).DP(1 0e)~NXT%(

I o n )26 COTO 1110 o

30 RESTORE: FOR I = 1 TO x x : FORJ = 1 TO 3: READ DIR$(I,J): NEXT: READ NXTX(I): OPCI) = PEEK(125) + PEEK (126) ~ 256: NEXT

35 LINE - PEEK (123) + PEEK (121) ~ 256:UP = II RETURN

40 REM CHANGE NXTX(PREV>42 NXTS = "DO" + STR$ (NXT% (PREV

»:NXTS ~ RIGHTS (NXTI,3)14 DP ~ DPCPREV) - 1: FOR I = 1 TO

3: POKE DP + I, ABC ( MID. (

Page 12: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 12/82

position of the comma, and thenpoking then new information intoplace, By using a simple NXT$

variable and changing the value as

needed, the same subroutine can beused for a RECORD(I).This is shownIn lines 42·44.

NXT $.r) ): NEXT I RET URN

60 REM CALC HI/LO BYTES65 HI = INT (NO / 256):LO = (NO /

256 - HI) ~ 2561 RETURN

70 REM CHANGING XX

72 XI = '00' + STR, (XX):X, - RIGHT.

(X$,3): FOR I = 1 TO 3: POKE

START + 16 ~ I, ABC « MIDS (

.t',I): NEXT: RETURN80 LIST 20: LIST 10001 - 100101 PRINT

"ANY KEY TO CONTINUE": HTAB20t GET R S: R ETU RN

'lOO REM FlR INT fIDU TINE

410 INDEX = HEADX'l2D HUME: PRINT "THE DIRECTORY

:": PRINT: PRINl430 PRINT DIR5CINDEXil'I s p e c 1)

DIR$(INDEX,2)! PRINT DIRS(INOEX,3;

43~} PRINT

~10 INDEX = NX1·XIINDEX): IF INDEX

< > 0 THEN "130

450 PRINT "NEXT WE WILL SHON THELINES THAT HAVE BEEN CHAN

GED. AN~ KEY TO CONTINUE': HTAB

let GET RS: RETURN

Using a variable such as X% as

the limit for a FORINEXTloopisSimpler and faster than using

trailers. It eliminates the need for

statements such as "IFDIR$(1,1)= ''''THEN ....', "I = 1+ 1",and "6,OTO...". It also does away

with the problems associated withtrailers-writing over the old trailersand setting up a new set of trailers

every time a record is added.Because the GOTO is avoided, the

need for repeated searches for aline is also eliminated. Since X% is

a variable, its value Is easy to setwith a statement of "X% =X%S1",

but the value Is lost when thevariable table .iscleared by a RUN.The only way to retain this value Is

to make the line defining X% a per-manent part of the program andthen updating it so that when the' 'program is saved, the revised line isalso saved and can be Interpretted

again when the program ls run thenext time.

50 o REM INBEFn502 REM IN A US~R PROGRAM THE

VALUE OF PREV WOULD BESUPPLIED BY THE ALGORITHM

5D3 REM ALSC BEWARE OF INSERTSTHAT t~tANGE ·IKE \/ALUE DF THEVAR.IASLE 'HEAl')/;'

504 REM OR CF AN INSERT THATWOULD BE THE LAST ONE ON lHE

The memory locations containingthe "003" in line 20 bear a specific

(offset) relationship to the begin-ning of the program. In ROM Ap-

plesoft,. the starting position is $801or 2049. In either RAM or ROM Ap·

plesoft, the starting position is held

in $67.'68.If a variable is defined asSTART::::: PEEK(1 03) + PEEK(104)*256, then START plus the

predefined offset value is the loca-tion of .the I. first zero. Detarrnlnlnpthis offset value Is fairly straight

foreward - go Into the monitor andlook for th.e "003." Then count howfar it is from the beginn.ing of theprogram to this location. What you

are looking for Is:

(line) 20 X % = a 0 3(monitor) pp pp14 00 58 25 DO 3030 33....

L IBT (' C o 0 ' )510 HOME: PRINT TABe 15)"INSER

T': PRINT: PRIM'520 PRINT · WE WILL NOW INSERT :"

~ f-'R INT NAY iE .g;S2 ~ NX ·rxCUp) = NXfX(PREV):NXT%(PR

EV) '" UP~!30 GOSUB 40535 NXYI = "DO' + STRI (NXTX(UP)

ltNXTt = RIGHTS (NXTS,3)540 IF LEN (NAME$: < 1D THEN NA

MES = NAMES + ' "l GelD 54 0550 NAME$ = NAME$ + " 1 " + NXTI560 LINE = LINE + l:NO = LINE: COSUS

60

563 PSN = PEEK (175) + PEEK (176) • 256: POKE PSNfLO: POKEPSN + 1.HI: POKE PSN + 2.131

This process can be slmp.lifiedbyplacing this line as near the begin-ning of the program as possible

after adjusting LOMEM, and while

there are few lines following It. Ifyou are reasonably sure of the ap-proximate offset value, you can also

try this in an immediate mode:

570 FOR 1 - 1 TO LEN (NAM~$): POKEPSN + I + 29 ABC ( MIDI (NAM[5,I}): NEXT: POKE PSN + I +

z ~C

NO ""PSN + IPSN - 2.LD.:

+ 31 GeSUe 60: POKEPlJi-~E PSN -- :l, HI :

'POKE NO "" 1,0

GOSUB 60: POKE 11.76., HI

F 'CH(E N O. e !577 NO '"ND + Z:

580

585

590

75,LO: POK[XX '"XX + 1: GCSUB 70GrJSl!B 30FOR T : 1 TO loon: NEXT RETURN "

Page 13: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 13/82

S = 2049FOR I = 0 TO 30; PRINT I,CHR$(PEEK(S+ I»: NEXT

This will generate a listing of:

17 0

18 0

19 3

In this example, the offset would be17,so poking would begin at START+ 16. Getting the value Into the lineis now handled the same as NXT$was (see line 72).

Some words of caution are in

order at this point. Once the offsetvalue of the X% line has beenestablished, adding or deleting a

single characterin a preceding linewil.I cause X$ to be poked into thewrong place (and give you a verystrange listing.) This can sometimesbe remedied by typing "20" to erasethe line and then type it over again.

Similarly, if NXT$ is poked Into thewrong place, it will cause problems

such as overwriting Its precedingcomma or the succeding end-ot-linemark. Remember that once the newlines are poked into memory, theyare a.permanent part of the programand are not cleared by a new run of

the program. This means that if you

manually delete a data line, youmust also manually change the X%.

If LINE Is set to a constant, ratherthan to the last value in locations$7B.7C, then when the program is

rerun, the same line numbers will beused over and over. (While this Is aninteresting effect, it quickly loses Itsappeal when you try to delete thethird ocurrence line 10003.) Beforewarned that poking values intoInappropriate places is a fast waytodemolish a program and probably

Applesoft. For this reason, I wouldadvise you to save a copy of the pro-

gram after you have typed It in andbefore you try to run it. That way if itbombs you can re-load it and findthe error before running it again.

Note that line 540 is notnecessary to this version of the pro-

gram; it merely assures that all data.Ilnes are the same length, andleaves room in case the line Is laterchanged by the program. (An ap-plication not included in this pro-gram.) In fact, 540 is a relic from an

earlier version of the program andcould be replaced by a statement to

concatenate NAME$ to a longstring

of spaces and then truncating it toan appropriate length. This is left asan exercise to the reader. Line 80 isalso unnecessary; it is included tolist the various lines as they change,so that the user does not have todrop out of the program to examinethe lines in question.

Calculating the values of HEAD%,PREV, and NXT%(I) are left to theuser, as are the additions of

subroutines for sorting, searchingand inputting the various fields.

The program listing incorporates

these routines and those from"Data Statement Generator" andwill produce an example of a linked

list in Applesoft. Although the pro-gram has relatively few fields, thearrays could be expanded to ac-cornodate any number of fieldsdepend ing on the applicat ion.

There is a striking similarlly bet-ween the way data statements arestored in RAM and the way Ap-plesoft text files are written to disk.The routines in this article could

serve as a vehicle for learning abouttext fi les, and have an added advan-tage in that their results are easierto examine. Actually this wholedirectory could have been handled

with a text file on a disk, but usingthis routine and tape is about $500cheaper.

600 REM DELETE ROUTINE602 REM IN A PROGRAM, THE VALUES

OF LOCCATI0N) & PREV(IOUS)WOULD BE SUPPLIED 8Y THED EL ET ION A LGO RI TH M.

60.3 REM 0€LE 'INC THE ENTBY F:OUL1

EO TO BY HEAD% wILL REQUIRE

EXTRA UPDATES.610 HOME I PRINT "NOW DELETING :

620 FOR ~ = 1 TO 3: PRINT DIRS(LOC,!): NEXT

63 0 N XT X(PR EV I = NXTX(lOC1: GOSUB'to

6~O FOR T = 1 TO 1000: NEXT650 RETURN1000 REM MAIN LOOP1002 START ~ PEEK (103) + PEEK

(104) : t o : 256

1005 GaSUE: 301010 GOSUB 400:'LIST 20: LIST 10

001 - iOOO~: PRINT "ANY KEYTO CONTINUS": HTAB 20: GET R$

1 . 02 0 NAME$ := 'COU ..INS ,'BILL, SAL.IBE:URY· :PREV:= 2

1030 GOSUl : . : 500

10qO GOSUe 100: GOSUS 801050 N AM ES ' " ~ MI CR O, MA GA ZI NE .C HE L

MSFORD":PREV = ~1060 GOSUB.500: GOSUS 400: GOSue

801070 NAMES := "BRADY":LOC = Z:PREV

'" 1

1 0'80 GOSUB 6001090 GOSUB 400: GOSUS 80

ZOOO REM VIRGINIA LEE BRADYZ002 REM ROUTINE TO SHOW HOW TO

CHANGE APPLESOFT LINESUNDER PROGRAM CONTROL.

1 00 01 DATA AARDVARK,SAM,ANYWHERE,002

10002 D AT A B RA DY .V IR GI NI A, SA LI S8URY,003

10003 DATA ZEBRA,TED,CITY ZOO.OO

°

Page 14: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 14/82

32 K BYTEMEMORYREL IA BLE A ND C OST EFFEC TIVE RAM FOR

6502 & 6800 BA SED MIC ROC OMPU TERS

A IM 65 ·*KIM *SYMPET*S44·BUS

F OR AP PL E, lR S·80 K EY BO AR D, E X l 0 Y ANO ALL

OT H oR 16 K OYNA M IC S YS TEM S U SING M K 4 116·3

O R S L OW ER D EV IC E S,

• 200 w .;EC ACCESS . J 7 s NS EC C YC LE

• S URNED·IN AND HILLY TES TED

• I VR, P ARTS REP LACEM ENT GU ARANTEE,. DrY. OIS roU NT S AVAIL ABLE

* P LU G C OM P AT IB LE W IT H T HE AIId· 65 15 YM E XP AN SIO N

CO NNECTOR BY US I NG A RIG HT ANGLE CON NEC T OR

[S U PPU ED) M OU NTED ON TH E BACK OF THE M EM DRYBOARD.

• M EM ORY BOARD EDGE CONNECTOR P LUGS INTO THE6800 S 44 BUS ,

• CONNECTS TO P ET OR KIM US ING AN AOAP TOR CAelE.

• REL IABLE-DYNAM IC RAM W ITH ON eQARD INVIS IBLE

REFRESH -LOOKS UKE STAT IC M EMORY BUT AT

LOWER cosr AND A FRACT ION OF THE POW ER

R EOU I RE D F OR S T A T IC B OA RD S .

• use S + 5 V O N L Y. S U P PL IE D F ROM H OS T C OM PU TER

• FU LL DOCUM ENTAT ION, ASSEM BLED AND TESTEDBOARDS ARE GUARANTEED FOR ONE YEAR AND

PU AC ~ASE P RIC E IS FU LLY REFU NDABLE IF BOARD IS

RET UR NED U NDAM AG ED W IT HIN 14 DAYS ,

ASSEM BLED W ITH 32K RAM _ "'' .•" , .".,, _ _1419.00& W I TH 16K RAM , ,_ , _ .__ $349.00

TEsnD W ITH OUT RAM CH IP S ."." ..... " . ... "" $219.00HARD TO GET P ARTS (NO RAM C HIPS )

W ITH 8 OA RD A N 0 M AN UA L ..• _ .... " __ ,, ..... 1' 09,00

BARE aOARO & MANUAL . ", ..... "" .. " ", .. ,,' $ 49.00

PET INTERFAC E KIT -C ONNECTS TH E 32K RAM BOARD TO

A 4K DR 8K PET CONTAINS INTERFACE CABLE, BOARD

STANDOFFS , POWER SU PPLY M OOIF tCA T lON KIT ANDCOM P LErE INS TRU CT IONS 14900

U.S, PRICES ONLY

EPROM PROGRAMMER FOR AIM-65$86.50

Programs 2716, 2516, and 2532

EPROMs.

Selectable blank check and verify.

Can copy existing EPROM.

Software utility routines to relocate

your object code to EPROM ad-

dress.

Does not interfere with cassette.

PARALLEL PRINTER PORT FOR AIM-65

$57.00

Interfaces Aim-65 to Centronics

Parallel Port.

Compatible with over 34 printers

fro m diffe ren t man ufactu rers.

Complete with connecting cable.

Compatible with Aim-65 Monitor,

Assembler, and Basic.

16K M EM OR Y EX PANS IO N K IT

O N L Y $59

6502 & 6800

6 4K B YT E R AM A ND CO NT R DL L ER S E T

M AKE 64K BYTE M EM ORY FOR YOUR 6800 OR

6 5Il2 . T H IS C H IP S ET IN CL UD ES ;

• J2 M 5K 411f;.3 16KX1. 200 NS EC RAM S• 1 M C346(J M EM ORY CONTROLLER.

• I M C3242A M EMORY ADDRESSM U L T lP LE XE .R AN D C OU N T E R .

~ DATA AND AP PL ICAT ION S HEOTS . P ARTST ES T E 0 A N D G U AR A N T EE D.

1 29 5. 8 0 P ER S ET

AIM-65

AccessoriesROM EXPANSION FOR AIM-65

$33.50

MCC

Eliminates need to remove Assern-

bier or Basic ROMs.

"Straiqht-thru' design retains use

of Expansion connector.

Sockets for up to 8K additional

ROMs and EPROMs.

Available with Zero-I nsertion-Force

sockets ($49.00).

20076 CHAPMAN AVE

ORANGE, CALIF. 92669

714 633-0245

QUAD ANALOG I/O FOR AIM-65

$165.00

Four input and four output chan-

nels.

0.1 % accuracy input and output.

Wide bi-polar input and output

ranges.

Signed BCD or binary operation.

Complete driving software lnclud-

ed.

SEND FOR ADDITIONAL

PRODUCT INFORMATION

AT NO CHARGE

CALIFORNIA RESIDENTS ADD 6%

Page 15: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 15/82

Satellite Tracking with the AIM - 65

~~~~~~~~~~~~~~~

Here is a useful application program for the astonomy

buff. It calculates the information required for tracking

any satellite. Written for the AIM 65, it may be easily

adapted to any other 6502with BASIC.~.~~~~~~~~~~~~~~~~~~~~~~~~~~~

The program listed belowwill sup-ply the userwith all necessary track-ing data for any earth satellite. Theprogram as printed below is set upto track the AMSAT·Oscar Phase III·

A which was due to be launchedMay, 1980. by the European SpaceAgency with their new Ariane fromFrench Guiana.

To modify this program for othersatellites merely change theparameters defined in line 110.:

A = length of the semimajor axis (inkm)E:: eccentricityp:: period of revolution (in minutes)

K= inclination of orbital plane (indegrees)

W = argument of perigee (indegrees).

ROCKWELL AIM

100 PI=3.141592654

110 A=24313: E=67627: P=628. 83:

K=57: W=210

120 A=A/6371: N=2*PI/P:

E9=SQR«1+E)/(1-E»

130 DEF FNF(X)=X*PI/180

140 DEFFNG(X)=X*180/PI

150 L3=42.75: 14"'84.5

160 K=FNF(K): W=FNF(W):

L3=FNF(L3): 14=FNF(14)

170 K1=COSK ): K2=SIN(K):G1=COSL3) : G2=SIN(L3)

180 PRINT I'TIME OFEQXIN UTC?

(FORMAT0000) " .

190 INPUTTO

200 T9=TO/60-2*INT(TO/100)/3

210 PRINT " LONGITUDEOFEQX?

(DECIMAL DEGREES)' I

220 INPUT 00

225 PRINT

230 OO=FNF(OO): VO=2*PI-W:

EO=TAN(VO/2)/E9

August 1980

For an explanation of these termssee my forthcomming HAM RADIOarticle "The Geometry of Phase lll-A".

Elliptical orbits will precess dueto the oblateness of the earth, thatis, the argument W of peri ee willchange over time. For instance it isexpected that Phase I!I·A willprecess .07 degrees per day andthus W will have to be eo-datedmonthly.

For circular orbits take A = 6371

+ (height of satellite in km) and

E = W = O .

This program as it stands is setup to printout in 10 minute in-

crements, which is perfectly fineenough for satellites such as Phase

65 240 X=EO

245 PRINT

250 GOSUB5000

260 EO=2*Y

270 IF Vo(pI THEN290

280 EO=2*PI+EO

290 MO=EO-E*SIN(EO): M1=1>I0:

E1=EO: P1=A*(1-E*E)

295 PRINT' 'UTC AZEL LATLNG"

300 FORT:-INT(MO/N)TOP STEP 10

]10 01~OO-L4+T*PI/720

320 Zl=G1*COS(01): Z2=G1*SIN(01):

Z3=G2

330 M=T*N+MO

340 D=(M-M1)/:Ol-E*COS(E1»:

El=E1+D: M1=E1-E*SIN(E1)

350 IF ABS(M-M1»102-8 THEN 340

360 X=E9*TAN(E1/2)

370 GOSOB5000

J80 V=2*Y

J90 IF E1(PI THEN410

400 V=2*PI+V

410 R=PI/(l+E*COS(V»

420 Sl=R*COS(V-VO) :

MICRO -- The 6502 Journal

C.R. MacCluerP.O. Box 1858

E. Lansing, MI. 48823

III·Awith periods of eleven hours ormore. But for near earth orbits suchas AMSAT·Qscar8, j ncrements of 1minute are preferred. To obtainminute by minute printouts, merely

delete the "STEP 10" in line 300.Sofor example to track AMSAT·Oscar8make the following changes:

100 A=7281:E=0:P=103 :K=99:W=300 :FOR

T=OTOP

The subroutines 4000 and 5000are Arccosi ne and Arctangentroutines respectively.

One last change. In line 150 areentered the latitude L3 andlongitude L4(in degrees) of E.Lans-ing, Michigan. You will of course

change these values to match yourlocation.

S2=K1*R*SIN(V-VO):

S3=K2*R*SIN(V-VO)

4JO D=Sl*Zl+S2*Z2+S3*Z):

X: (D-1)/SQR(R*R-2*D+l)

440 GOSOB4000

450 Bl=PI/2-Y

460 IF Bl~O THEN 470 NEXT T

475 END

480 Bl=INT(FNG(B1»

490 X=(S3-Z3*D)/(SQR(1-Z3*Z3)

*SQR(R*R-D*D»

500 GOSUB4000

510 A1=Y: H=S2*Zl-81*Z2

520 IF H)O THEN540

5JO A1=2*PI-A1

540 A1=INT(FNG(A1»

550 X=SQR(1-(S3/R)*{S3/R»

560 cosns 4000570 Nl=INT(FNG(SGN{S3)*Y»

580 H=S2*COS(Ol+14)-Sl

*SIN(Ol+14)

590 U=Sl*COS(Ol+L4)+S2

*SIN(Ol+L4)

600 X=U/SQR(Sl*Sl+S2*S2)

27:13

Page 16: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 16/82

0346 182 7

0356 181 13

0406 181 18

0416 182 23

0426 182 27

0436 184 30

0446 185 33

0456 187 36

0506 189 39

0516 191 410526 194 43

0536 196 450546 199 47

0556 202 48

0606 206 49

0616 209' 50

0626 213 51

0636 216 52

0646 220 530656 224 53

0706 228 53

0716 231 54

0726 235 54

0736 239 54

0746 242 540756 246 53

0806 249 53

0816 253 53

0826 256 52

0836 259 52

0846 262 51

0856 265 51

0906 268 51

0916 271 50

0926 274 50

0936 276 49

0946 279 49

0956 282 49

1008 284 49

1016 287 49

1026 289 49

1036 292 49

1046 294 49

1056 297 50

1106 300 50

1116 303 511126 306 53

1136 310 55

1146 315 57

1156 322 60

1206 332 65

1216 354 70

1226 41 70

1236 84 52

124£. 104 16

39 129

40 130

41 131

43 131

44 131

46 131

47 131

49 130

50 129

52 12753 124

55 120

56 114

56 107

56 98

54 86

50 73

41 59

26 45

-23 86

-18 86

-15 85

-11 86

-9 86

-6 87

-4 88

-1 89

1 90

3 914 93

6 94

8 969 97

11 99

12 100

14 102

15 10 3

16 105

18 106

19 108

20 109

21 111

23 112

24 11425 115

26 117

27 118

29 120

30 121

31 123

32 124

33 12535 126

36 127

37 128

To use this routine, load and run,

answer the two questions posed

(the time and longitude of the ascen-

ding equator crosslnq) and the

AIM-65 will print out time, azimuth,

elevation, as well as the latitude of

the subsatellite point in 10 minute

increments. I have included a sam-

ple printout for AMSAT Oscar III-A.

Another version of this program

has a software clock and a real-time

routine which pokes down to

dataport B the azimuth and eleva-

tion, thus controlling antenna rotors

via an interface of my design. A

description of the interface will

soon appear in 'Ham Radio'. You

may obtain this second version from

me for the consideration of $5.00

($4.00 of which IS donated to the

AMSAT Phase III program), a blank

cassette, and a sufficiently

stamped, self-addressed carton in

which to return the cassette. Send

to: C.R. MacCluer, P.O. Box 1858,East Lanslnq, MI 48823.

We had planned to use the originalAIM listings with this article, but un-

fortunately, they were blue, and so

light that our printer's camera couldnot pick them up. Therefore, we

have typeset the listings ourselves.

Hopefully, this will not cause prob-

lems. W e do caution the user aboutsome of the labels. Because thelistings were so light, they were dif-ficult to read while seffing the type.

So, watch out for 00. It is not doublezero, nor double 'on' it is meant tobe 'oh zero'; and P1 or PI (P one andP 'eye').

610 GOSUB4000

620 IF ~ THEN640

630 Y=2*PI-Y

640 Ll=INT(FNG(Y»

650 U=T9+T/60: T!=60*T1+40*

INT(T1): Tl=INT(Tl)

660 T1*1000Q+T1:

T1$=RIGHT$(STR$(Tl),4)

670 Al$=" "+STR$(Al):

Al$=RIGHT$(A1$,4)

680 B1$=" "+STR$ (B1) :

Bl$=RIGHT${B1$,4)

690 Nl$=' , "+STR$(N1):

N1$=RIGHT$(N1$,4)

700 Ll$= II I r +STR$(Ll) :

U$=RIGHT$(L1$,4)

710 PRINT T1$+A1$+B1$+Nl$+Ll$

720 N EX T T

730 END

4000 Y=l: Xl=COS(l)

4010 DY=(Xl-X) /SIN(Y):

Y=Y+DY:Xl=COS(Y)

4020 IF ABS(Xl-X»108-8 THEN 4010

4030 RETURN

5000 X2=X: Xl/SQR(1+X*X)5010 GOSUB4000

5020 Y=SGN(X2)*Y: RETURN

AIM PLUSENCLOSURE

With Built-InPOWER SUPPLY

SPECIFICATIONS:Input: 110/220 VAC 50/60 HzOutput: +5V e 5A, +24V @ 1A

Grounded three-wire line cordOn/Off Swithch with Pilot Light

Enclosure has room for the AIM and oneadditional board: Memory Plus, or VideoPlus.

POWER A PLUSSpecifically Des.igned for

the AIM·65

Small enough to fit inside the AIMEnclosure

Enough Power for the AIM-65 Fully Load-

ed.

Plus an Additional Board

Works on 110/220 VAC50/60 Hz

Provides Regulated + 5V at 5A and

+24V at 1AGrounded Three-Wire Power Cord

ON/OFF Switch and Pilot Light

AIM PLUS $110.00

POWER A PLUS $55.00R U N

TIMEOF E Q X IN UTC?

(FORMAT0000)

? 0500

LONGITUDEOF EQX?

(DECIMALDEGREES)-

? 90

U T C A Z EL LAT IRG

0326 183 0 -28 88

Page 17: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 17/82

MICRO Limerick Contest

Much to our delight here at Micro, we have had

good response to our limerick contest first an-

nounced in the May issue. We had no idea that somany of our readers were poetic!

Almost every entry that we have received to

date has been in the required form. A few had to

be disqualified because they were too long to be

limericks. We must congratulate all who submit-

ted limericks tor taking the time and interest in

our first contest of this kind. The entries have pro-

vided us with something to look forward to with

each day's mail, and have been entertaining

reading material for the company bulletin board.

We had originally planned to announce the win-

ner of the contest In the September issue, but we

are changing that now. Instead, we are publishing

what we have judged to be the best entries, and

we will let you readers decide.

All we ask is that you write or phone and tell

which limerick you like best. The winning

limerick, and the author of it will be announced in

the October issue.

And now, here are what we have judged to be

the best limericks. Somewhere in their midst isthe winning one.

There was a young hacker named DrewWho programmed all day and night too.By morning 'twas doneBut he didn't type run.The poor little guy entered new.

Art CarpetCanyon Country, CA

When first introduced to the 6-5-0-2,

I conceded it's clever; but what can it do?

Ask Atari or Apple, they know what you get,Ask Sym or Kim to find out my Pet.

After taking Aim, I found it true, Micro does it all

for you.

Ralph A. Orton

Granada Hills, CA

There once was a key-pounder named RickWho thought he knew every trick

August 1980

That was under the sunTo make programs run

Well Micro improved his perfection, but quick!W.G . Fullerton

Ottawa, Canada

For the 6516by Synertek

To Santa Clara, we did trek

But past the editor did slide

An April Fool's by Mr. Hyde

Did our expansion plans thus wreck.

Earl Morris

Midland, Ml

A con man of articulate dictionFlattered her beyond descriptionShe responded with laughter"It's not me that you're after,But my Micro journal sutiscriptton!"

Harold I. MathisSouthfield, MI

Some magazines are geared too low,

Others are just so-so.

For a 6-5-0-2

About the best you can do

Is subscribe to the best, namely Micro.

Mike Sullivan

Belleville, NJ

In the world of zero and one,There's a mag which is second to none.It's Micro, you seeThe journal for me,Or my 6502 would be done.

D. DuckworthLas Vegas, N V

He saw her reading Micro and knew

That she owned a six five o'two.He sent her a scribble

She gave him a nibble

Now they both share the same CPU.

H. I. Mathis

Southfield, MI

Continued on page 70.••

MICRO -- The 6502 Journal 27:15

Page 18: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 18/82

T " ~ ~ ; - ~ ' - ' ~ - - - - ' ~ ~ ~ - - - " ~ . ' ~ . ~ - ' -\ • ~,1IcIrctWaIeI " " " I -eadet-sf i ip /n.f)omputer P9rip118(fJ/S,_ . A VivlsiB1/'ot Mf 'l J: /n t a in Com f JU le r ; Inc,

Jaoo H~y ~I~h!d" •1 S8n~aCIIII, Gk!isoM , 4 Q Q i 4~8600

r t M o f" E P E RiP HE Ft A l.-S q Sal'\d

lM '= "• •I A t ; ,l JDRESS - '- - -~ - -- '" " "' :- -- - -__" ;' -" ' ::

I Sl'A'fE -~--,

\~~;;~~~~M~~d~~~~~~~~·

Page 19: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 19/82

Computeretter Utilization of APPLERenumber and Merge Program

. . . . . . . . . . . . " " " " " " " " ~ " " " " " " " " " " " ' ' ' ' ~ . . . . . . . . . . . .~'''The Renumber and Merge program is very useful, and

here is a technique that makes it even easier to use.

I consider a utility program ex-cellent when it can be utilized at anytime under any condition. This br-ings meto that marvelous ApplesoftRenumber and Merge programwhich comes with DOS3.2.

Many times, during programmingor editing, the need arises to movechunks of your program to differentlocations, to renumber portions ofyour program, or to merge in someof your favorite routines. Nowcomes the test of using a good utili-ty program.

You did not load and run the AIS-R/N & M Program prior to startingwork on your program. Now what?

Save your program, load and runthe AIS - R1N& Mprogram, now loadback in the program you were work-ing on and you are ready to goagain. Meanwhile, your train of con-centration has been broken on whatyou were originally doing.

There is a better way; at least Ithink there is. If we plan ahead a lit-

tle bit.

If the AIS -RJN & M program Issetup as a 'B' file then when it is need-ed it can be 'BLOADED' intomemory while our program that isbeing worked on stays in memoryand undisturbed.

Here's the procedure in setting upan AIS - RlN & M '8' file. The nexttime you boot a disk check to seewhat HIMEM: is set for right after

August 1980

the disk is booted. This is found bydoing the following from thekeyboard.

Prjnt PEEK (115) + 256 • Peek(1 16 ) (C /R ).

(On a 48K HIMEM: 38400 - on a 32KHIMEM:22016.)The next thing to doafter recording your system HIMEM:is to load and run that outstandingrenumber and merge program thatAPPLE Computer gave you on yourmaster DOS 3.2 diskette. When theAIS prompt character RETURNS it

means that the Renumber programhas been put into a little cornersomeplace in your computer'smemory, ready for your beck andcall.

Actually where it resides inmemory is right under your systemsprevious HIMEM: which was setwhen you first booted (this is thenumber you first recorded).HIMEM: has now been changed bythe renumber program. Let's recordthe new HIMEM: Again, from thekeyboard.

Print PEEK (115) + 256*PEEK (116)(ClR)

(On a 48K HIMEM: 36362- on a 32KHIMEM: 19968).

We now have two numbers whichwe recorded. Subtract the smallerfrom the larger, this should equal2048.

O.K., lets put the renumber pro-

MICRO -- The 6502 Journal

Frank D. Chipchase21 51. George St.

West Milford, NJ. 07480

gram into a '8' file on disk. From thekeyboard:

BSAVE A/S-RlN-M, A (your 2ndHIMEM: number you recorded), L2048 For a 48K this would look like8SAVE A/S-R/N-M,A36352,L2048For a 32K BSAVE AIS-R/N-M,A36352,L2048 O.K., the '8' tile forthe renumber program is all set.

Now, lets assume you are merrilyprogramming away and therenumber program is not in memory.

The needoccurs for renumbering,a mergeor a hold. The newly createdA/S-R/N-M '8' file can now be'BLOAD'ed in without disturbingyour existing program. From thekeyboard-BLOAD A/S-R/N-M(C/R).Once the '8' file is loaded in,there are a few instructions thatmust be issued to your computer sothat it knows the AIS-R/N·Mprogramis in memory and where it is when itis needed. From the keyboard enterthe following instructions;

For A 48K System:

HIMEM: 36352 (C /R)

POKE1013,76(C /R)POKE 1014,0 (C /R)

POKE1015,142(C /R)

For A 32KSystem:

HIMEM: 19968(C /R)POKE 1013,76(C /R)

POKE1014,00(C /R)POKE1015,78(C /R)

O.K., that's it. You are all set to

27:17

Page 20: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 20/82

use the Renumber program. As youwill note, your existing program isstill in memory and undisturbed.What the first instruction did wasreset your system's HIMEM: belowthe A/S-A1N-Mprogram that you justBLOADED In. This is required forwhen you use the hold feature of the

program. The last three POKE in-structions tell the ampersandcharacter "&",which you use whenusing the renumber program, whereto find the AlS-A/N-M program inyour system. (see Applesoft manualp.123)

The program to write a text filewould look like the following;JLlST

10D$ = CHR$(4): REM CTRL D

20 PRINT D$; "OPEN RENUMBER·MERGE"

30 PRINT D$j "WRITE RENUMBER-MERGE"

40 PRINT "BLOAD AlS-AlN-M"

50 PRINT "HIMEM:36352:" REM for32K system use 19968

After the above program is run, atext file, named Renumber-Mergewill be created. Make sure this 'T!file is on the same diskette as your'B' file AlS-R/N-M.

Now, whenever the renumber pro-gram is required all you have to do is

type in EXEC Renumber-Merge.I I -

Frank Chipchase is presently

employed as Chief Engineer for In-ternational Multi/oods Corp. Until

he purchased an APPLE computer,

which was approximately one year

ago, he had no expierence or con-

teet with computers other than aprogrammable ca-Icula1or.Although

he purchased a computer for the

pure tesinetton and challenge it

would present, he has recently writ-

ten a utility program lor the APPLE

computer which is presently beingmarketed for sale.

All the operating commands andformats that are used for therenumber program are valid and areused in the same manner. To free upthe 2K of memory the AlS-A/N-M pro-gram is occupying, do a HIMEM:38400 for a 48K system or a HIMEM:

22016 for a 32K system.

Now that you have come this farthe ideal thing to do Is set up a 'T'(text) file and let your disk 'exec' thewhole procedure into your APPLE.

60 PRINT "POKE 1013,76"

70 PRINT "POKE 1014,0"

80 PRINT "POKE 1015,142": REMFOR 32K SYSTEM USE78 IN PLACE

.OF 142

90 PRINT D$; "CLOSE RENUMBER-MERGE"

100 END

DeCision

Systems

EDU C AT IO NAL SOF TWAREfOI the AP PLE °11and AP PLE °11P LU S

V ER 8AL S KIL LS

Presenlil lg Ihe Qrher Sidt- oj {hI'!Apple /1.

INDEXED FILES

ISAM·OS is an integrated StH 0" routines for thft creation and manipulationof inde.ed I<les, ISAM·oS provide. capabil it ies comparable to those onLarge main frames. You can rap id ly ret ri eve records by key value or panial keyvaluelrelrievas any record In a 200 record file, 60 chari record. in less than 3seconds compared 10 a maximum of 3B seconds 101 a DOS sequent ial I ilel .

Files never have 10 be reOlganized. Duplicate key values may be used.Records may also be retrieved in sequence, tSAM·DS routines are ea.sily in-

tegrated into Apple"oft program. - they use less than 3K RAM plus an in-dex table.

DI.k" It . .. wIth Appl..soft Progrom. o . t > d dcto ba... con be u. .. d to Im-

prove verbcl .klll, Intero.cl lv& ly. In tended as stud y Old , fo.rcol le9" bOOJ 'd

t~pe exom.(E.G,. SAT , GRE. L S AT . A C T . m AT . E TC ). P'09ro,m.lnclud" o reat-

dent edi tor 101 expanding or modifying data 11,1. Reollst lc mulnpl . . chcrce

que&tlon.s ore- 9@[email protected] eeverol optiOIlS, Requ l(es no computer ex-

patience mQking It Ideol fot students.

Over 1600 entries with op-

tion of matching synonyms

or antonyms - $19.95

Over 1200 word relation-

ShipS· $19.95

Sentence Completlon- EqUivalent to 6 S AT tests-$19.95

Ve.rbo.lSkill. Po.k- All three diskettes for Just

$44.95

Voco.bulo.ry Bulldet·Requires: Disk, App leso ft ( 32K ROM or 48K RAM)

$50

Analogy- STRUCTURED BASIC

PBASIC-oS is a sophist icated preprocessor for structured BASIC. Now

you can gain the power of PASCAL·like log ic structures at a f raction of thecost. Use all r.gular BASIC statements plus 14 commands and 11 newstatements/structures (WHILE. UNTIL CASE, stc.I. PBASIC-oS can beused to develop INTEG ER OrAPPLESOFT programs. It is a great way 10lea rn and use stru c tu red log ic concep ts,

Requires: Disk, Apple.oft 132K ROM Or48K RAMI

$35L IW A EN TER PRIS ES

EDU C A T IO NAL SO fTWARE DEPAR TmEN TPOS T OFFICEsox72bb

H A mP T O N. V IR G IN IA 23bM(Te.X8Sresidents add 5% ta) (}

Decision System •

P.O. 8"x 1:!006Den ton. TX 1 I i203

• Appl .. I.a regiStered Iro.d..mo. rk o f App l e Computer , Inc.

•Apple II isa regist '18-rMtrademark of the Apple t:;ompute-r Co,

August 1980MICRO -- The 6502 Journal1:18

Page 21: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 21/82

Variable Lister

This nifty little program will extract the variable names

from your BASIC program, sort them, and list themalphabetically.

I noticed a comment in a recentarticle bemoaning the lack of aBASIC X-REF FOR THE Apple.Perhaps this little program will helpto fill that void,

The program is crude. It justscans the program area picking up

words not in Quotes and assumesthem to be variable names. This ap-proach also gets words from remarkstatements etc. Its one virtue is thatIt works.

Several changes could be made

easily to enhance its operation. Turnoff scanning after a REM token.

JLIST

600006000160002

60003

REM --VARIABLE LIST--6/7179

HOKEPRINT ·VARIABLE LISTER - RAY

Change the bubble sort to a Shellsort. (I use & sort myself). Set upan

EXEC file to auto-append and ex-ecute, and so on. The mostdesireable change, of course, wouldbe to rewrite in assembler. I plan to

do that when time permits.

To use the program, simply ap-pend it to the one you wish toanalyze and RUN60,000. I use

APPLE's renumber/append utility,but several have been published inMICRO and elsewhere. Another ap-proach would be to list the programto a text file and the EXEC it into

your program. p.

CADMUS": PRINT:PRINT

PRINT "EXTRACTS AND PRINTS BASIC VARIABLES":,. .. - .PRINT : PRINT

60004 PRINT "AFTER THE FIRST PASS THRU'60005 PRINT "PROGRAM - SORTS - THEN LISTS"60006 PRINT "ALPHABETTICALLY·60007 FOR D = 1 TO 1999: NEXT60008 HOKE60009 LL = S9999: REM ** HIGHEST LINE TO EXAMINE60010 PD. = • "60011 ' DIH Ut 500 )oTt 500 1

60012 REM *****FIND FIR'STLINEn*,60~13 NL = 2049600a P = 204960015 CL = NL60016 NL = PEEK (P) t ( PEEK (P t 1) * 256)60017 IF NL ~ 0 THEN 6005360018 P

= Pt 2

60019 LN '" PEEK (P) t ( PEEK (P t 1) * 256)60020 IF LN ) LL THEN 60053

60021 LAB. = ."60022 c a s u l 60032: REM GET HEXT ALPHA60023 LAB. : LAB. t CHR. (CHl60024 GOSUB 60041: REM GET NEXT CHAR60025 IF CH > 64 AND CH < 91 THEN 6002360026 IF CH > 47 AND CH ( 58 THEN 6002360027 IF CH = 36 THEN 6002360028 IF CH = 37 THEN 6002360029 GOSUB 6004660030 GOlO 6002160031 REM ****GET ALPHA CHAR60032 GOSUI 60041

August 1980

Ray Cadmus

600 W. LeeMoberly, MO. 65270

- - - - - - - - - - - - - - - ~ay Cadmus has been in data pro-

cessing since the late 50's and pro-gramming since the early 60's. Mostof his work has been with businessapplications on large scale IBM

equipment. Hestarted programming

microcomputers because that

would give him the opportunity to

write what he wanted, rather thanwhat business pressure dictated.

Now, though he still works withmicros for fun, he is expanding hisconsulting activities into the area ofSmall Business Computers andhopes to someday make that his

primary occupation.

60.033 IF CH 34 THEN eOSUB 6003660034 IF CH < 65 OR CH > 90 THEN 6003260035 R'ETURN60036 GOSUB 6004160037 IF CH < > 34 THEN 6003660038 GOSUB 6004160039 RETURN60040 RE~ ••••*.GET NEXl CHAR60041 P '" P t 160042 IF P = lolLTHEN POP: POP GOlD 6001560043 CH = PEEK (P)

600H RETURN60045 REI'!.unSTORE LABEL .* U60046 PRINT LNP ",LAS••60047 X = X t 160048 Tt = LABf60049 LN. = STR. (LN)60050 T$ = LEFTS (T. t PIl$,10)60051H( X) = Tt + LN.60052 RETURN

60053 : REM ••**•• SORT RTN *****6005. PRINT: PRINT: PRINT "SORTING--WAIT":60055 FOR A = 1 TO X-I PRINT60056 FOR Il = A t 1 TO x

60057 IF H( A) < H( 14) THEN 6006160058 HH$ = Tt( A 160059 H( A) = H( Il )

60060 TS( B) = HH.60061 NEXT BrA60062 REI'! * * * LIST VA.RTABLE un60063 HOttE60064 FOR C = 1 TO X60065 PRINT H(C )60066 NEXT C60067 PRINT60068 INPUT "LIST AGAIN SLOWLY? ·;Z$60069 IF Z$ = "y o THEN SPEED= 150: GOTO 6006460070 SPEED- 255C0071 END

MICRO -- The 8502 Journal 27:19

Page 22: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 22/82

6 5 0 2S502A

6 52 0 P IA

6 5 22 V IA65322114 ·L450211H3002 71 6 E PR OM

41'1 6· 20 0" 5 R AM

6550 A A M I PET 8K l

2 I L 0 2S · 1 00 W ire W ra p

S ·I 00 S o l o o r T a i I

7A S 10 @ ' 6 .95 50 @ 0 .55 100 @ l 6.15

8 .4 0 1 0 @ 7:9 5 S O @ 7.35 1 00 @ 5 .905.15 10 @ 4 ,9 0 5 0 @ 4 .4 5 la o @ 4 J57,15 10 @ 6 .95 50 @ 6,45 ro o @ 6,00

7.90 10 @ 7A O 50 @ 7,O 0 100 @ 66 0

4 .75 20 @ 445 100 @ 4,15

59 5 2 0 @ 5 ,45 100 @ 5.10

2 1.0 0 5 @ 1900 10 @ 17.00

700 8 @ 625

IUD

9 05 2 . 8 5 10 @ zs s52 ,35 10 @ 21 5

A P Produchl15% OFF

P E T 4 V o ic eMUSIC System $ 50

Zenith Z·19 $770

K I M - I .$159

SYM ·l _ $209

KTM 2 / 80 $349

l eecex Mon i ll X $129

C e n t m n i c s 737 $845

All books15%Off

DISKS

A T A R I INTRODUCTORY SPECIAL )1 1~ T~Rll 0 0 AI,,, B O O ,"0 '" AI'" MO~"I" 2 0° 0 0F F \ "

II (write lor quan tify pri ces)

SCOTCH 8" DiSks " .. " .. " ... , , 10/S31.00

SCOTCH 5 V,' Disks . . ,. . .. ... . 1,0 /$31.50

Verbatim 5y."· Disks ... , ..... . .. 10/$24.50

Dlskette Storage Pages.. , .. ".. . 10/$ 3.95

Disk Library Gases " 8" - $ 2.95 5"'· $2.15

BASF 5y,"' Disks .....

SASF 8"' Disks. ,.,' .. ,' ....

. 1O/S25.00

, 10/S27.00

COMMODORE PET-CBM

W rite or ca ll tor Q uotes

NEW 8016/3280 Column Screen

NEW 8050 950K Dual Drive

EDUCATIONAL DISCOUNTSAVAILABLE

CASSETTESAGFA PE·611

in 5screw housingG-l0 10[5.65 100/48.00

C -2 0 1 0/5 .4 5 1 00 /5 7.0 0

C "3 0 1 0/7 ,3 0 1 00 /6 6,0 0

All other lengths

available. Wri le for

p ric e lis t.

WRITE FOR CATALOGAdd $1.00 per prepaid order for US shipping (UPS)

A B C115 E. Stump Road

o m p u te rs Montgomeryville. PA 18936

(21 5) 699·5826

~***********************K A. S T *I 'I Y IM M M M

***

END FRUSTRA TION!!* FROM CASSETIE FAILURES

* PERRY PERIPHERALS HAS

THE HOE SOLUTION

* OMNIOISK SYSTEMS (S" and 8")

** ACCLAIMED HOE SOFTWARE

* • Assembler, Dyna"mic Debugging Tool,

* Text Output Processor, Comprehensive

* Memory Test

* • Coming Soon-HOE BASIC* PERRY PERIPHERALS 5-100 PACKAGE

* Adds Omnidisk (5") to

* Your KIM/S·100 System* . Construction Manual-No Parts

*.FODS & TED Diskette

*.$20. +$2. postage & handling·. (.NYresidenls

*add 7% tax) {specify for 1 or 2 drive svsternl

****

*

*******. .****

****

***

**

/

MICRO Dealer Updqte

****

**

Place your order with:

PERRY PERIPHERALS

P.O. Box 924Miller Place, N..Y..11764

(516) 744-6462

* Your Full·Line HOE Distributor/Exporter **'********~******k********

Dea.ler Information Form

Cdmpa:ny Name: "'......•... "'.. ,. .,"'..... -."' .•. "'

Address: ' .,.. , , , .. , .. ,. ,.,.. "'.. "'" .. ,.. ,.MICRO Is preparing to publish another updateon Dealers. There is still. time to get your companylisted. Simply send in the requested informationand you too will be llated in our Zip coded list. Thisis a service for ouneaders so that they may locate

•dealers in their area. Send this information to:

MICRO D,ealer UpdateP.o.. Box 6502,

Chelmsford, MA 01824

Cit'y,:., ,. ,. , ,. ,.•....•....

State; "'......•... ,.Zip. '" ,

Phone: '", ' "'....• "'..... "'... Hours ,...•.. , ,.,

6502 Contact: "' " .. " .

eS02 Products/Servlces; "',."' "'., ,

Page 23: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 23/82

Additions to Tiny Pilot

~~~~~~~~~~~~~~

These additions to Tiny Pilot include 'code to input a

numeric variable, generate a random number, and call a

machine language subroutine. A complete sample Pilot

program is included.

Nicholas Vrtis' Tiny PILOT is a

neat way to move up to a high levellanguage, but it does have somedrawbacks. One of the biggest pro-blems is the lack of a method to in-put into a variable from running pro-gram. All values must be preset by aC: command. This can bea real has-sle for some applications.

Another useful addition would bea machine language subroutine call.It would allow you to write programsusing functions that standard Pilotdoesn't have, like having a beeperrather than a "1" for a prompt. Ormaybe comparing the contents oftwo variables and setting a flag toindicate which is larger.

One more function that could beadded is a random numbergenerator. Some games (until myKIM takes over the world, I'll resortto playing games on itt), such as HI-La and CRAPS, can be played onlyif a random value can be created. Ifany of these problems bother you,then read on!

These routines will solve all ofthese problems. Before Istart detail·ing them, realize that they will takeaway from memory space for thesource (in Pilot). This will be no pro-blem if your system has extramemory, but my 2K is filled reallyfast with a long program! Don't usea lot of remarks and long strings toconserve space.

Let me start by describing whatmodifications are needed to Tiny

August. 1980

PILOT for these programs to work.

Make the following corrections:

027E0281

4CEA

16 05

That just tells the interpreter totry to match the current commandwith our new ones before it checksits own. The instructions that weJustwiped out are replaced at 0516.Correct the following:

048C A9 06

That tells the interpreter that theTiny PILOTsource begins at page 6,not page 5.Addresses 04FAot 0515are just relocated versions of thesubroutines previously described byme (MICRO, 21:41). If your systemdoesn't need them, relocate the restof the program to 04FA. If you willbe using them, remember to correctall the 1 /0 calls in the Pilot inter-preter. Here are the new instruc-

tions:

l.x Input a positive number intovariable x (can be any from A to Z) .

Prints a "?" as a prompt.

P:x Puts a random number intovariable x (can be any from A to Z).The number will be in the range 0 to99.

L:x Calls machine languagesubroutine x (can be any name fromA to Z). The starting address of thesubroutine is stored In the followingtable:

MICRO -- The 6502 Journal

Bob ApplegateBox 148

Bordentown, NJ 08505

Name

ABC

Zero page address

AO,

A2,A4,

A1A3A5

y

Z~O ,02,

0103

Here's how they work. 0516 to0519 only replace what wedestroyed at 027E to 0281.The firstfour instructions see if the nextcommand is an L: command. If not,it jumps to 0531 for the next com-mand. If it is the right one, it jumpsto the subroutine at 0494 to get theindex for the label name. Then itusesthe index to get the starting ad-dress of the subroutine from thetable (low-order first). Then it putsthe values at the appropriate loca-tions (052C, 0520) and makes ajump to the subroutine. This routinecan't be PROMmed.

There is probably abetter way toexecute that jump, but this way iseasy, and it works. Finally it Jumpsback to 0279.

I can't take credit for the randomnumber generator (053Ato 054B). Itis a slightly modified version of theone presented by Jim Butterfield onpage 172of The First Book of KIM. Isuggest that you Jook there for thetheory behind it. Addresses 0531 to0534 just check to see if we are ex-ecuting the correct command. A callis made to 0494 for the index. The Xregister is stored for future use at

27:21

Page 24: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 24/82

Page 25: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 25/82

>p: BLACK-!'lATCH EXAMPLE

>T ~ h Jhat. is <-.;IOlW· name

>T:Hello $7, ~ou and the compu~er take turns b~ removin~ 1~

>T:2, or 3 matches·from the pile or 21 matches. Whoever takes

>T:the lasL match loses. Good luck~

):·j-;SC: f=t=21

>C:8=121

>:+"HT:

>T:Enter ~our move>I ~ C:

>C: D=4-C

}T :: t'1 ':; ! r(IO',)E' is $D

>C: A=A--4

>(: g E:=E:-4

BLACK MATCH: The first thing we do Is get the player'sname and put it Into the name field. A and B contain thenumber of matches left. but B has 100 added to it. TinyPilot has problems with its match statement • so it isnecessary to have both A and B. We get the player'sguess and subtract it from four to get the computer'smove. If 8 equals 101, meaning only one match Is left,the computer claim its victory, otherwise it gers theplayers's new move.. > T : ThE' nel•! t.ot..=:!isSA

>C: $=E:>1'1: 101

> I··L T : H

>T:Your next move must. be 1 $? so I win!

>T: Do ':::iOU 1 . , . 1 an t, t.o tr': :la~ain ?

> 1 : : 1 =

> r '1 ~ '- , - '. ,::I

>T:Don~t. reel bad $?, this pro~ram>S~ can onl,=, 1•Jin.

:>

L<.Ihat.s '",lout"· name

?80B

He 110 BOB.' '::Kl~ anti t.I-lecor(IPut.er·t.a~,e t.ur·n·:; b'::l t"'erfIO',Jng 1~ 2"or 3 rnat.c·he:.f'r-om f..hepi 1e ·of· 21mat.ches. Whoever takes the1a':=,, mat,ch lose':,. Good 1t.. ~c h~

Errt.e-r '",lour' ffIO'.)';--'";.'):...L.

M ' :: I illC",.le i-:;

Thet-·e at-'e 17 mat.cbe-s lef·t.

En+_.et"·:!Ol~t"' ff,o',.'e' - ; : 0 1

~1~ f(,o'.)eis 3

There are 13 matches le~~

Ent.et-· '",lOUt-· move

'?2~1' : ; ! move i~. 2

There are 9 ma~ches left

Ent.er"· ':lOUt""· move

M' , ; f n O ' · _ · ' E ' i 1Thei·-·eat-'e 5 f{latche~. 1ef·t_,

Errt.e-r ':::lOUt"·ove

'7'1

~1' : ; ! rno',.IE' iS o 3

There are 1 matches left

Your next move must

SCI I l,1i n ~

ldant. t.o tx"",l a~ a in?

be 1 s

1 ' 1 ' : : 1 mo' ..'E' is. 2

There are 17 mat.ches lert

Ent.E't-· '::lour'no',)e?41 ' 1 ' : : 1 move- is aThere are 13 malches left

Ent.et-· '::IOUt-· move?1

~ 1 ' : : 1 rflo'.)e·:. 3

There are 9 matches left

t'l~move as -72

There are 5 matches lert

1 ' 1 ' : : 1 move i~. 2

Thet-'e at"'e 1 rn·""t.che·:;.eft.

'r'our: next. mo'.)e mt-l:·t. be 1., "E.O I ~In!

Wan~ to t.r'::l a~ain?'?no t_.hanhs.!

Don"'+_' reel bad.. B08.. +'.hiE .

F"t"'CI:3r'aman onl'::l1.,lin!

Page 26: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 26/82

BOX 120ALLAMUCHY, NJ 0782020 1~362~6574

inc.

HUDSON DIGITAL ELECTRONICS INC.

ANNOUNCING:HOE D' ISK USER LIBRARY

The HO E Disk User Library has been estab-

lished to facilitate the free exchange of general

and specific routines for use on HOE disk

based systems.

All library programs are 'public domain', and

are available for a modest copying charge to

defray expenses. In most cases, the source

and object programs together with lnstruc-

tions for use are provided on diskettes sub-

mitted by the requestor.

HOE disk users are encouraged to submit

proqrarns for free distribution. A list of pro-

grams currently available may be obtained by

sending a SASE to:

Progressive Computer Software

405 Corbin Road

York, PA 17403

717-845-4954

JOHNSON COMPUTER

Box 523, Medina, Ohio 442513

(216) 725·4560

PLAINSMAN MICROSYSTEMSBox 1712, Auburn. Ala 36830

(800)633·8274

LUX A"SSOCIATESP.O. Sox315

Ch teo, CA. 95927(916) 8913·8751 (for SYM Versions)

FALK·BAKER ASSOCIATES382 Franklin Ave" N ulfey. N'J 071 10

(201) 661·2430

PERRY PERIPHERALS

P.O. 80< 92,4. Mil ler Place, NY 11764(516) 744"6462

PROGRESSIVE COMPUTER

SOFTWARE405 Comin R~_,York, PA 17403

(717) 845,·4954

AS comcutersI IS EastStump Road

Monlgomeryvil l" . PA 18936(21 5) 699-8386

Frustrated? One-board Micro-P's too expensive, Insufficient ItOline for full control, General purpose Micro an OVerkill, Fixedpower supply requirements, costly development systems, ifavailable, lack of USER fleXibility?

The MICROsport MicroComputer (MMC), In addition to being acomplete microcomputer on a4'I." x 6" pc board, is the nucleusof a ful l hardware/software development system. Software canbe developed for the MMC using any 6502-based computer. TheIn-Circuit Emulator (ICE) permits full MMC software/hardwaredebugging, then adding the EPROM Programmer Adaptor, anysingle +5V EPROM, such as the Intel-type 2716 or 2758 can beprogrammed without additional equipment. The MMC is theIdeal dedicated controller for use in control/monitor systems,laboratory sxpenments, timing, 'intelligent interfaces, securitysystems, and other applications requiring a low cost controller,

Fea'ures .CPU: MPS6503, RAM: 1 Kbytes, EPROM: Socket for Intel-type2716or 2758. (User supplied),IJO: 2 MPS6522 VIAs: 321/0 lines, 8edge detector/conlrol lines, 4-16 bit counters, Buser-definedpins. Serial: 20 mA loop on-board, Interrupts: Power-on andmanual reset, non-mask.able and maskable, Power: + 5Vregulated or 9-20V regulated AC or DC,Also: ICs sockets, LEDpower on Indicator, CMOS-RAM w/battery back-up optional.Options: In-Circuit Emulator; EPROM Programming Adaptor;MMC Development Model MMC/03D with zero insertion forcesockets (3); EPROM Programming Services; and applicationsoftware development.

P,rlces: Kits from $89,00 Appl lcatlon units from $119.00MMC/03S: Complete development system i.ncluding MMC/Q30;MMC/Q3ICE;MMC/03EPA;and software $250.00 (offer good untilDec,31, 1980).Checks or money orders; No C.O.D .. 'SoFor furtherinfo write or call:

R.J. Brachman ASSOCiates,Inc.P.O. Box 1077

Havertown, PA 19083(215) 622·5495

DISK DRIVE WOES? PRINTER INTERACTION?

MEMORY LOSS? ERRATIC OPERATION?

DON'T BLAME THE SOFTWARE!

Powe r line Spi kas, Surges & Hash cou Id be the c ulpri II

Floppies, printers. memory & processor often interact!

Our Unique ISO L A T O RS el imi nate equ ipmen t in te raction

AND curb damaging Power Line Spikes, Surges and Hash.

"ISOLATO'R 1150·1 AI 3 fil ter isolatad 3·prongsockets;

integral Surge/Spike Suppression; 1875 W Maximum load,

1 KW load any socket .. ' ". $56.95

·1SOLA TOR IISO-2) 2 filtar isolated 3·p.onp' socket banks;

(6sockets total); integral Sp.iko/Surge Suppression;

1875 W Max road, 1 KW either bank . . . . . .. $56.95

"SUPE R r S OL ATOR (150-3), similar to 150·1 A

except double filtering III Suppressi<><1 . . .. $85.95

"'ISOLA TOR 050-4). similar to 150-' A except

unit has 6 individually filtered sockets . . .. $96.95

·'SOLATOR. (150-5), similar to ISO-2 except

unit has 3 socket banks .• 9 sockets total ... $79,95

·C ICU IT IBREAKER, any modal (add·CB) Add $ 7.00·CK T BRKR/SWITCH/PILOT any modal

(·CBSI ,................. Add $14,00

• PHONE ORDERS 1-61'7-655·1532 ,..

LR;'Electronic Speciatists, Inc. -171 SO",t. Main SlreQt. N.9Uck,MBSS. 01760

Dept. M I

Page 27: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 27/82

Page 28: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 28/82

DISCOUNT DATA PRODUCTS

BASF 5"4" DISKETTES:$34.50 PER BOX OF 10

HIGHEST QUALITY DISKETTES AT A

BARGAIN PRICE! LABELS AND WRITE-

PROTECT TABS INCLUDED.

VINYL DISKETTE HOLDERSFOR NOTEBOOKS

THE IDEAL WAY TO STORE DISKETTES. EACH

VINYL PAGE HOLDS TWO DISKETTES AND IN-

CLUDES A POCKET FOR EACH DISKETTE'S lABEL.

SAFEl Y KEEP UP TO 40 DISKETTES IN A SINGLE

1" 3-RING NOTEBOOK!

$4.95/SET OF 10

MARKETING YOUR OWN SOFTWARE?

DDP OFFERS DEALER & SOFTWARE HOUSEDfSCOUNTS ON NOT ONLY THE ABOVE

ITEMS, BUT ALSO THE FOLLOWfNG

PRODUCTS:

9" x 12" ZIP-LOCK BAGS FOR PACKAGING &

DISPLAY OF SOFTWARE.

CORRAGATED MAILERS TO SHIP TO USERS

OR DEALERS!

SEND FOR FREE INFORMA TlON AT:

DlSCQUNTDATA PRODUCTSP.O. BOX 19674-M

SAN DIEGO, 92119

(ADD $1.00 SHIPPING/HANDLING CHARGE TO ALL ORDERS)

A C C O U N T I N G

.APPLE

TAPE

One-ArmBandill32l<,INTl 9.95

Card Shark liNT) 7.95

HI- ROller(Applesolt) 7.95

H i- Res Sub Game (32K) 14.95

Adult Game Pak (16K) 7.95

TEMA(16 to 48 K, Specify) 19.95

PC S Assembler (48K) 34.95

PCS Disassembler

lOur Assembler req'd 1 14.95

Programmer Pak

(Assem b Ie r& OIsasm old 46.95

A I M, KIM,S Y M

Programmer's AID $100.00

We also carry the complete

HOE. Inc. line of products.

CUSTOM PROGRAMMING

Progressive ComputerSoftware

405 Carbi n Road

Ycr k . PA 17403

(717)845 -4954

S O F T W A R E F O RSound business management requires you 10 keep

up-to-dale reports regarding the status of your accounts

receivable.

Now, from we same company that revelutionized ac-

counting on the Apple II computer. with their conversion

of the OsborneJMcGraw-Hill General Ledger program,

you may now obtain we Accounts Receivable package you

have been waiti.ng for.

Our package allows you to assign your own alpha-

numeric customer code up to six characters. Date of the

last activity, as well as amounts billed this year and last

year are maintained. This Accounts Receivable system

maintains six digit invoice numbers, six digit job numbers,

invoice amount. shipping charges, sales tax (automatically

cak:u la ted) , IOta! payments as well as progress bi.lling in-

formation. Vou may enter an invoice at any time; before

it's ready for billing, after you have billed it, and even

after it's paid. This package also prints .rI,ports which list

the. invoices you have not billed yet., open items, paid

items, and an aging analysis of open items.

In the final analysis, making your bookkeeping easier is what our software is aUabout. With our General Ledger package

you can format your own balance sheet and income statement. Department financial statements may be formated

differently. Vou have complete freedom to place titles and headings where you want them, skip lines or pages between

accounts and generate subtotals and totals throughout the reports - up to ten levels if you need them. Accounts

Receivable is designed to provide you with complete up-to-date information. The program will print customer statements

as w!=Uas post invoice amounts to any of the accounts maintained by our General Ledger package. These packages will

support any printer/imerface combination. General Ledger requires one hundred ten columns, Accounts Receivable

requires one hundred thiny columns.

GENERAL LEDGERIf you are a business person who;' looking for ultimate

performance, take a look at this outstanding General

Ledger package from Small Business Computer Systems.

Our package features s.ix digit account numbers, plus

thirty-one character account names. We have ten levels of

subtotals, giving you a more detailed income statement

and balance sheet with up to nine departments. Either

cash Or accrual accounting methods may be used. The

cash journal allows a thirty-three character transaction

description and automatically calculates the proper off-

setting entry. You may print the balance sheet and income

statement for the current month, quarter, Or any of the

previous three quaners. Also, this year's or last year's

total are included on the income statement, depending on

the current month.

There is vinually no limit on entries, since you may

proce ss them as often as you like. Two thousand (1,000

from GIL 1,000 from any external source) can be pro-

cessed in one session.

ACCOUNTS RECEIVABLE

Su~htaiI:.. .. . ,> idual ly .. .$180.00~r .. , , .. .J5JO.oo

SMALL BUSINESS COMPUTE.Il SYfl1:MS

41fOG,_,wood1..ina>Ia. Ntbraok.a 6&04

(4(2) 461- J 878

AniJabIr from your local Apple!kak. or CO<IlaCl SBCS

01 S K

14.95

9.95

9.95

19 95

9.95 ,

;14,95

39.95 .

16.95

49.95

Y O U

Page 29: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 29/82

Nth Precision Add & Subtract WithAdjusted Processor Status

~ ~ ~ . . . .Here is a general purpose utility which can be used with

6502programs which require addition and subtraction.~ . . . . . . . .~ . . . . . . . . . . . . . . . . ~ . . . . . . . . ~

I

There must be hundreds of addand subtract routines of varyingprecision, and with the ability toutilize the "Branch" instructionsafter the call to the subroutines, butof the 6502users there needby onlyone routine no matter what preci-sion is required. These subroutineseliminate the need for two or moreadd/ subtract subroutines to handlethe appropriate precision or saveex-

ecution time of addition/subtractionof small precision numbers thatutilize subroutines of greater preci-sion, i.e. adding 16-bit numbers witha 24- bit add subroutine.

Before calling the addition or sub-traction subroutines, five locationsof page zero memory must bepreset. Two bytes are used to storethe address of the addend or sub-trahend, two bytes are used to storethe address of the augand or mi-nuend, and one byte to store thedegree of precision.

Since the subroutines use the in-direct zero page mode, the ad-dresses stored Inpagezeromust bestored as least slgnficant byte firstfollowed by the most significantbyte. Indirect addressing mode isused by the subroutines In place ofstoring data into page zero for tworeasons: First, to prevent thenecessity of movingdata twice; intopage zero and then out of pagezero..

August 1980

Second, to conserve page zeromemory especially when more thandouble precision Is required. If datawere stored directly into page zero,a 32-bit add would require eightbytes of page zero; twelve bytes ofthe program is modified to store thesum in another location. Thesubroutines replace the addend orsubtrahend with the sum. If this isnot desired, two more bytes of page

zero memory are required to storethe address of the sum. The pro-gram must bemodified at locations$02E1 for addition and $0223 forsubtraction to read 'STA (SUM),Y"."SUM" of course is equated to somepage zero location.

The degree of precision stored inpage zero is 1* "number of bytes ofprecision" -t or,

0;; 1 byte precision

1=2 byte precision2=3 byte preclslon, etc.

The Y register is loaded with thisvalue to letch and store the ap-propriate data byte(s).

In addition the accumulator, X,and Y registers are not destroyed,but the processor status reflectsany changes to the N,C,Z, and Vflags due to the result of the addi-tion or subtraction. This allows theuse of the branch instructions lrn-

MICRO -- The 6502 Journal

Lawrence R. Golla21630 Mallard CI.Brookfield, WI. 53065

mediately following the call andutilizing the accumulator, X, and Yregisters as preset prior to the call.

Locations $0228 to $0251 adjustthe processor status for "N" and"Z" flags. The "C"and "V" flagswere adjusted previously by the ad-dition or subtraction. Each byte ofthe sum is exclusively OR'ed to ad-Justthe "Z" flag but, if this results in

setting the "N" flag, the programforces the "Z" flag to be reset, i.e. itis assumed that -0 is undefined butmore important Iy the programhandles the problem of having asum = $0080. The "N" flag Is ad-justed by exclusively OR'ing zerowith the most significant byte of thesum.The status is then stored tem-porarily at location $0100 andretrieved oonly after the A, X, and Yregisters are restored in order toavoid damaging the status.

A source listing followed by adisassembler listing equates loca-tions $0010 and $0011 for the ad-dress of the addendor subtrahend;locations $0012 and $0013 for theaddress of the augand and mi-nuend; and location $0014 for thevalue of the preclslon. The sum ofthe result is stored indirectlythrough locations $0200, and thesubtract subroutine Is located atlocation $0215.

27:27

Page 30: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 30/82

To Illustrate how to use thesubroutines, a small' program addstwo numbers and subtracts a smallnumber from-the sum. The processIs repeated until the sum Is minus.The program can be expressed bythe following formula;

kn :kn·1 + 10 . e,ko = : . · 0

LOA #01

STA PRECLOA #00

STA AENOLOA #03

STA AENO+ 1STA AGANO+lLOA #00STA $0300

STA $0301STA $0302STA $0304LOA #$OASTA $0303

LOOP LOA #02STA AGANOLOA #06LOX #04

JSA ADDBMI OUTSTA $0305STX $12JSR SUBJMP LOOP

BRKBRK

;Set precision for 16 bits

;0300 and 0301 is the address;of the addend and sum;0302 & 0303 is the address;of the augand

;initially add 0 + 10.tne constant 6 will be

;subtracted from the sum;this minuend is at address;$0304 & 0305

The program shows hew to set upthe addresses and preclslon values;shows registers can be presetbefore a call to the add/subtractsubroutines, so they may be usedafter the call; and shows how to testandand branch Immediately afterthe call from the subroutines.;A & X reg. are pre loaded

;before going to subroutineA disassembled listing OAG'ed at

$0266 follows. At the "break" loca-tion $0300 can be checked to see IfIt Is Indeed minus. This programtakes a few seconds to run, whichmeans the display will be blank untilthe "BRK" Is encountered.

f . L

;test after the call;preloaded values made before;caJi sets up minuend,

;exit here when sum is minus.

; N1'riPK~C~SIO~ ADD/SUBTRAC~

At:..I\IU = $10 iADDR'S OF ADDEND OR SLJBTRAHENDr1 (_ . 'A!\IU "" $"12- ;ADDR'S 9F AUGAND OR MINUEND,-'Ht.L- ,- $14 •DEGREE OF PRECISION

* = $o20u

ALlil PHA"J:YA

eHA- r x AF'HA

LUY Pf.:£C

CLCLL.Li

eLVLUU,-'l LUA (A£ND),Y ;ADD

AUL : (AGAND),YSTA (AEND),y ;REPLACE ADDEND WITH THE S U M

[IEY

,I::lt--'L LOU; : : ' . : \ . ~GET NEXT BYTE

BMl OuT !GO ADJUST FLAGSSLIt< ,"-'.iA

TYAj-"HA

TXAj-'Hr ...

LDy PRECL : L L I

S£LU~V

LUI.Jf':J LLtA (AEND)tY ;SlIBTRACTGJ:lC ( AGAND) t Y

STA ( AE ND ) , Y ;REPLACE SUBTRAHEND WITH THE SUMU . f : _ ' y

Br'L LDOP3 ;GET N E X T BYTE

Page 31: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 31/82

'oUT' l.DY

LDAc u RPHPBMI

LOUf-'2

DEYElM!

P:LP

JMP

.PLP

W K A '

uU'rr

PHPJMPPLAA ND

S1'A

lNYLDA

~}2~Ji S 1 3 T ; '!A

0,202 4B :r'HRCr20'] 88 T-:~~A'.~1'~!.:1448 PHf

02,§A,Sl~32~3"~~.1.~ i2·0·E ~i 5 T R~J2i~ J . :·.Jt~ " C ~ E \ ; ~

PREC#0

(AEND).Y ;ADJUST Z-FLAG

E.QR

PHPPLAAND

NZER ; IF" BIT 7=1 R"ESET .

Z-FLAG uf.{A

ourl ;IF NO MORE BYTES

ADJUST N-Ft..G,

LuOP2

#$01

LOOP4

#$7F

$0100

(AEND),Y

j"'". - , d ' - t

Li} ..M~r ' l~"""-:,;:.~'-;~

0211 1~ b~L 020A

"~'~.'i.~ " C ~ w T~.,;·.-"~"I.~! ~·-I '..!~ i t ~"'\n

:0'2i9 48 P'HA~J21H 8·4 L[>(?{ 1.4!]_2t(~ C n9 s .s ~5

~j21[:~J~~SE\;~J,2: iE E;'~~'C'L-~ /

;FORCE· Z-FLAG TORESET

~,GET NEXT BYTE

; GET STATLJS;R'ESET N-FLAG; SAVE IT

; GET MS OF SUM

STA

PLAT 'AX

PLA' fAYPLA5rALuA?HAL.UA

PLPWi'S

SRK

AIM DI.... Ambl.r U.tlna~ a2 2't 3~~~~H _ ' f ~ l,1 ~1: : ~ - " ?~ ;

023,2~j234

· ] U · B-~'1!2£ PLP

223,8 28 PLF

t123f 58 PLf~O,240' 2,·9 Rf{£~

gt~~5T,A( :8 r r ~ 'T i

0'·248 4·9 tJJ'~~B'24A eB f~HF·

: :; :; ' : c .c ::_-;~

#t~~~610-0

~325_~.8T:~'S~TR ~)1~~~1e25~:- 8- 0 [[>B ~Jl€t@

i: J 2 6'p .~ .~ ).~ c ! " ~ ~J1,~3.1f;.t263 .2·~}~PLF~

-92,64· 6~J. ~~~T ~S@2·6 ·5 ··00 8R~<(~25 6 . A9 ~ n . l : Q i · #}31~ ::2 -6 ,f~ ,8.5 ' 5 T R ~ 4

fi2 .6 -H 89 ; B :R ~8B~

#0 ;AtlSUSlf N- FLAG

;PlIT STATUS IN A

#60' ; SAVE ONLY THE

N-FLAG

$0100 ; MERGE WITH SAVED

S TAT U S '

$0100 ; SAVE I T' FOR LATER

tGET A,X,AND V-REG

$0101 ;TEMPORARILV SAVE A$0.100 ;GET STATUS

;PUT INTO ,STACKS0101 ;GET A

, ANII STATUS

~ :~,6 ~C B5 . ~ r R ,1~0

· :~ 2·6 E89 tB q~ H %:)J·)27~3 ~35 STA i:L-~1272 85 :_~:TR ·13-, ·').'7.~'i· ·w~~ ~ ""!'

~~2 ('j5 t!}_,~:.:':R ~ 33 :€~~J-~}2?3 ;B)) ~~'TR 02~2~_wJ27C ~S[!

~~)2{·FB[~

.~,.. ...--:"".;:'j_:;PJ~

~:l2,t;4 t; r~~ : · 2E1? A ' 9 -~:289 E~5

; J _ 2 i: 1 ~j t~~;,. : ~ ' ,= .)=0 :;-:~~~J

Page 32: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 32/82

/

MICROBE

GKEY and K S T A T have!been relooated.ere Is a corrected version of the programlisting tor my article "Expanding the SYM·1...Ad·

ding an ASC I I Keyboard" which appeared onpages 5 -7 In the February, 1980 Issue of M JCRO(Number 21). Somehow the hex locations columnof this IIstin~ was not used for the article. The pro-gram I,s fully retocatabte; but to do so the 'INIT'routine must refer to the addresses to whtch the

Typos corrected on tlnal version including label'DISP' change to WAIT2 at location 206 (minor), in-correct ob eet code fixed at line 222 to '2047 S A 'from 'A5 Ft'. (Mnellmonlcs were cerrest.) Last waspointer r o I S S TAT at line 240 was '40 ' now '39'which Is correct.

RobertA. Peck

SAVE REGISTERS'GET PARALLEL A5C1.1UNLESS NONE,rHEN BRANCHSTORE IT A WHILEDEBOUNCE CONSTAt-n

U£BOUNCESMALL LOQ·P

SAVERASOlWAIT2( ) . O F t

~$10

OOEFO O F O

WAIT1

OOEFWAITtIJSCNVA80lSCAMAOOFl~$'7FOUTCHROOFltS7FRf.SXAF:::$10

OOEFIJSGNVO O E : . F

SCANSGKEYABOl

JSRLDABEDS TAlDA

ST~DECSNEDECBNE, JSRBITBHILDAA N D~SRLD,.

ANDJHPLDAS T AJSRDEC

BNEBEGLDAASLARTS

JSR ACCESSLDA eooS T A A6bl

LDA ~02"STA A662LDA $39S TA A6 ,6 7LDA ~02S T A Ab68JMP WARM

0200020302060208020A

020C020E02100212

021402160219021C021E022002220225

0227022 A022C022E02300233

02350237

0239

023C023D

0240024302450248024A024D024F

02!.202540257

~o 8 8 8 1AD 01 ASFO 2485 FlA9 10

85 'EFC6 FODO FeC6 EF

DO Fe,z O ,03 892C 01 AS30 F8

AS F129 7F20 47 SA~s Fl29 7F4C B8 81A9 10

S5 EF20 03 '89C6 EFDO F9PO CAAD 01 ASOA

60

GKEY

WAITl

LARGE LOOP

SC-~jNDISPLAY'( USE SCANVEC j

IS KEY STILL DOWN?WAIT FOR KEY RELEASEKEY up, PRoeESS KEYSTRIP KEY STROf:E BITSEND INTG DISBUFGET!T AG.~IN

STRIP IT AGAINRETURN WITH ASCII IN AIF :NO K~Y ,.S CAN DISPLAYTHRU SCANI .H : .CA NUMBER O~ TIM~ST H !2N GO BAC KAND LOOK I~G~jINREAD ASCII INP8RT

SHIFT MSB INTO CA~RYRET, CFLAG=l IF KEY DN.

SCANA

WAIT2

SCANB

KSTAT

UNPROTECT SYSRAMMODIFYKEYBOARDINPUTVECTOr :

IN!T0 '86 8E

A9 C lO

8 D 61 A6ts9 02aD 62 A6A9 39

Sri 67 At.A9 0281) 68 A6

4C 03 80

KEYPRESSSlr~TUS

VECTORWARM ENTRY,MONITOR

Page 33: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 33/82

Number 1

BASIC Programmer's Toolkit ™

1. Microcomputers which can use product: The Basic Programmer's Toolkit ROM is for any PET orCBM computer, except the new B032.

2..System hardware requirements: One version comes on a small circuit board which plugs into thememory expansion port of orlqtnal-model e & BK PETs. The Basic 2.0 version is a single ROM chip whichplugs into the expansion socket addressed at $BOOO.There are also special versions for owners ofSkyles memory boards or Computhink disks. All versions require one cassette recorder for the 'Append'command.

3. System software requirements: Separate versions are available for Basic 1.0 & Basic 2.0 ('old' or'new' ).

4. Product feetures: The features of the Toolkit are well known now, with over 10,000 sold. It works byadding commands to PET Basic. The commands added include: APPEND - joins 2 programs fromcassette; AUTOMATIC LINE NUMBERING; RENUMBERING of Basic lines; DELETION of a range oflines; a HELP command - which lists and highlights in reverse field the character in a line which caus-ed an error message; TRACE, which displays the last 6 line numbers executed in reverse field at the topright of the screen during a program run; STEP, which does the same, but goes to the next line onlywhen you hit a key - or quickly when shift is held down; OFF, merely turns off trace and step; FIND,which finds every occurence of a token or characters in a program; and DUMP, which displays all non-array variables and their current values.

5. Product performance: All the commands work and work well. It Is one of the very few uncrashableprograms I own. In the 9 months I have had the Toolkit, I have never lost a byte or a minute due to anyToolkit malfunction. Having it in ROM is a great convenience. It is also completely compatible with DOSsupport 4.0 (the wedge).

6. Product quality: The quality of this program Is excellent. It is effective, reliable, rapid andunobstructive in use.

7. Product limitations: There is only one known bug in the Toolkit. Once the step mode is left, to do adump of variables for ~xample, it is not possible to continue from where you stopped. This is unhandy.However, the same effect can be arranged by inserting stop statements and using trace instead. (Then

use 'find' to remove the stop statements.)The best-known problem is that Commodore decided to put both Word Pro I and Basic IV in the same

ROM slot the Tool kit uses. There are switcher boards available for under $30, if you use Word Pro II.Basic IV will need its own Toolkit. Another minor gripe is that when the find or dump commands aredirected to the PET printers, no carriage returns are sent, leaving the output squished together, 80 col-umns wide. A kill command, to remove the wedge into Basic would have been nice.

I'm sure the Toolkit slows Basic slightly, though I don't notice the difference in normal use. The otherwished·for command is the change command in Commodore's 'Baalc-Ald' program (not available forsale, but some users have it.) It allows users to replace a word or phrase everywhere in a program atonce.

8. Product documentation: The instructions for the Toolkit are excellent. They are well written, usableand complete; they come in an attractive and durable manual.

9. Special user requirements: The only special requirement Is to link the Toolkit with Basic each time

PET is turned on, with 'sys11*4096'. Pushing the ROM in is simple enough for most users to do itthemselves.

10. Price/Feature/Quality evaluation: I consider the Toolkit essential equiptment for all PET ownerswho write programs. It will quickly repay its cost in programming time saved. Even now, several monthsafter its introduction, it has no real competition in features. (Ed's Note: Price: $50 for Basic 2.0 Version,others price depending on configuaration.

11. Additional comments: The Toolkit may be ordered through many computer stores, or directly fromPAICS, at 430 Sherman Avenue, Palo Alto, CA. 94306. I also found them quite helpful on the phone. Theirnumber is (415) 327·0125.

12. Reviewer: James Strasma, 120 W. King Street, Decatur, IL62521

Trade Mark of Nestar Systems, Inc. ~

Page 34: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 34/82

APPLEIISOFIWAREFROM ON.wLINESYSTEMS

PADDLE-GRAPmcs:The most powerful Hi-Res graphic development package available. Upper/lower case maybe drawn on the Hi-

Res screen in any size, direction or color. Pictures may be sketched and filled inwith any of21 colors (must be

seen to believel). A shape may be constructed automatically from any object appearing on the Hi -Res screen.

48K Applesoft/Machine Language

. $l9.9B/disk

TABLET-GRAPmcs:All of the capabilities of PADDLE-GRAPHICS extended for use with APPLE'S GRAPHICS TABLEr.

48K Applesoft/Machine Language

849.9B/dlsk

m-RES ADVENI1JRE #1:lour APPLE computer becomes your eyes and ears as you enter a spooky old mansion insearch of treasure.

You direct it inEnglish tomove you through the house which is portrayed in full HI -RES GRAPHICS. You are

in compIete com trol as you open caabinets, smash walls and manipulate any items you mightfind, Danger is

eyer present as you find your friends being murdered one by one. This game will definitely challenge your

imagination. French version available upon request.

Machine Language for the Apple II or II plus 48K

524.9B/dlsk

SIiEETSHOffr:A real- time Hi-Res graphic simulation of the sport of skeetshooting. This game has all the sounds, action, and

excitement of the real sport as well as the official firing posrtions. One to five players may compete.

Machine Language for the Apple II or II plus 48K

519.9B/dlsk

TRAPSHOOT:One to flveplayers compete at the sport of trapshooting. Fast action with many skill levels incIudingadjustablc

shotgun spray make this game a true challenge.

Machine Language for the Apple II or IIplus 48K

514.95/dlsk

COMBINATION:III-RES ADVENTIJRE and SKEEI'SHOOI' both on disk

Machine Language for the Apple II or II plus 48K

537.BO/dlsk

Available at your local computer store.

ON-LIl\TESYSTEMS

772N. HOLBROOK ST.

SDII VALLEY. CA 93065

805-522-8772Dealer Inquiries InvitedAll orders shipped same day.

Software muy he ordered directly bycalling/writing: 805-522-8772. Orden> rna}'be: COD!ClLECMlASTEHCI fAI{(;E/nSA. Arid l'I1shipping.

Page 35: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 35/82

Solar System Simulation with or without anAPPLE II

. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . " ' . . . . . . . . . . . . . . "'~"' . . . . . . . . . . . .

Here Is a fascinating program which combines the

graphics of the Apple with the Laws of the Universe to

make a super demonstration.

. . . . . ."' . . . . ."'~"''''''' . . . . . . '''''''''. . . . . . . . . . . . '''''' . . . . . . . . . . . '''''' . . . . . . . . . . . . . . . . . ''''''

There are unlimited things to do

with a micro that has high resolu-tion graphics. Some of the morefascinating aspects are the simula-tion of objects around us. This arti-cle and program deals with thesimulated motion of the first sixplanets of our solar system.

Each planet moves In an ellipticalorbit of varying distance from thesun. The closer the orbit to the sun,the less time It takes that planet tocomplete Its orbit. Mercury, theclosest planet takes 88 days, whileSaturn the farthest of the first six

takes 29 years. Because the planetsmove in elliptical orbits, theirdistance from the sun and orbitalspeed is constantly changing. UsingJohann Kepler's (1571,1630) secondlaw of planetary motion "The linejoining the planet to the sun sweepsout equal areas in equal time", wecan calculate the time it takes theplanet to travel from point W topaint R (figure 1). As can be seen,the line RV joining the sun S to theplanet R will vary In length as theplanet travels around its orbit. Beingat Its minimum distance at W, the

planet must travel faster for the lineRV to sweep an equal area as whenthe planet is at its maximumdistance Z.

To calculate the area SWR (figure1) we use the formula

1.) Area =!2-{H-e sin H).2

Variable a being the length of themajor axis, b the length of the minor

August 1980

axis, e the eccentricity of the ellipse

(cIa) and H (figure 2 ), the angle inRADIANS tram the center of theellipse to paint q. Point q being on acircle of radius a, Intercepted by aperpindicular line form the majoraxis going thru point Rto the circle.

By using Equation (1), we cancalculate the number of days ittakes the planet to travel any degreeof angle from the area. By dividingthe total area of the ellipse, (totalarea = pi ab), by the number of daysto complete the orbit we have the

Z

David A. Partyka1707 N. Nantuckett Dr.Lorain, OH. 44053

area swept out per day. Rearranging

equation (1), we get

2). H-e sin H = area * 2

aband a problem. The term H-e sin Hcan't be simplified for the angle Hbecause of the term sin H. Given thedaily area we could still calculatethe angle H by using a loop routineuntil we got the correct answer, butthis would considerably slow theSimulation down.

Instead I use the angle A (figure 1)

y

W

Ibl

x

MICRO·_ The 6502 Journal

Figure 1

27:33

Page 36: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 36/82

we get the distance between the sunand the planet for each value of A.Using another equation

4 .) cos V1 = P - RV

RV·e

we get the ang.le V1 that the planetlies in relation to the sun (figure 2 ) . . 180

The value P in equation (4 ) being aperpendicular line from tha tocus tothe ellipse and equal to a(L-e~). Byincreasing angle A at the daily rate V IRGO

we get the X,Y coordinates for eachday and plot it on the screen.

Figure 2

at the other focus of the el.lipse. Bydividing 360 degrees by the numberof days to complete the orbit we getthe number of degrees per day forangle A . Using the equation

3.) RV = 2- (PII + e (cos (180 - A»)

Using angle A also causes a pro-blem. Increasing angle A ata dailyrate doesn't increase the area SWR(figure 1)at a daily rate. Even thoughthere is an error, It isn't ac-cumulative. The difference returnsto zero at four paints in the orbit,two points being at the minimumpoint Wand the maximum point Z .The other two points vary with ec-centricity but zero out before the 1 /4

position and after the 3/4 position of

27:34

y its orbit. For Mercury, the fastestplanet the error amounts to about.65 degrees and even less for theother planets. One more equation,

w

5 ). cos H = .kBYaa

is a link between equation (1 ) andequation (3 ) and can be used to

calculate the error of using angle A .Now that the calculations are out

of the waY,let me describe this pro-gram. To keep the program small Ichose only the first six planets. Ifyou want to add the other threeplanets it can be done with littletrouble, see Listing 1. The planetsare plotted In order from the sun,Mercury. Venus, Earth, Mars,Jupiter, then Saturn. You canchoose any combination of planetsto display, from one to all six. Theplanets are assignedscaHng fac-tors so its orbit will use the full plot-ting area when selected planets areused.

x

You can plot the position of theplanets or planet for any day, l.e. July8, 1980, or for any length of time

GE~nNIgo

*' T A U R U S

120 ,60

CANCER AR IES

150 • .30

LE~ PISCES

. JUPITERl ,mnCURY

SU N •• VENU S

• EA RTH

•• 0SA TURN

'MARS

AQUAR I U S

210 ·330

LIBRA CAPRICORN1]S

240

SCORPIUS

·300

SA G I TT A R IU S

....... • '•. ;; •• ,ii" ~ ~ ' t f O ' O ' . . ' II- iIO ' ~ .. ~ . . 4.,~.O

FIgure 3: This is an example, of the displa.y for all sixplanets for Aug 11, 1980 (224 days from Jan 0).

I ,~ ,t .. f I ~ •• ' .. ~ !I" • It • I ,~ '•••• ;; ' ' 111

MICRO ~- The 6502 Journal August 1980

Page 37: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 37/82

from when you choose, ie. 100 daysstarting at Oct 3, 19BO.You can plotany length of time with any amountof time between plots, ie. plot 900days with 30 days beween plots.Then you can choose whether toplot single points, only one dot perplanet, or continuous plots, eachdot remains on the screen. Using

single point plots it appears as ifyou are above the solar system look·ing down on the planets as they or-bit the sun. With continuous plotsyou can see the orbit for the lengthof time you choose to plot with theamount of time between plots.When doing a plot, the first plot isalways the date you choose, then itcontinues with what you requested.Figure 3 is an example of plotting allthe planets for Aug 11,1980, 0 wasthe response for the number of daysto plot with any number for days be-tween plots. The constellation

names, planet names, and degreesdon't show on the actual display butare shown here for reference.

Figure 4 is an example of plottingthe planets Mercury, Venus, and theEarth on May 29,1980 for 44 dayswith 4 days between plots. In thisexample May 29th was the first plotfollowed by the 11 plots for 44 daysat 4 day intervals. Around the plot-ting area is a circle that has plots at10 degree intervals with a doubleplot at the zero point. Use this to getthe longitude of degrees that the

planet lies in relation to the ~un.This program is set up for Jan. 0,19BO of it you prefer Dec. 31, 1979.To change the reference. date, Justadd the number of days differencefrom Jan. 0,1980 to the values W, ie.Wl, W2, W3, etc.

Some of the things you can dowith this program are to determinethe dates of superior conjunction,inferior conjunction, opposition,and greatest elongation. You candemonstrate the retrograde motionof the outer planets, whether a

planet is a morning or evening ob-ject, or when two or more planetswill appear close to each other inthe sky. What else you can dodepends on your knowledge ofAstronomy, the program is Simpleso any additions or changes youmake should be easy.

This program is written in floatingpoint basic and uses the highresolution graphics subroutines.Since there are different types of

Augu.st 1980

.MAY 29

180 •MERCURY

·JUNE 18

• MAY 29

VENUS

• MAY 29

EARTH' '.

90

• SUN•• 0

·JlTLY 12

• JlTLY 12

Ii .. ,. •

JULY 12. .• • • III •

Figure 4: This is a display of the planets Mercury,Venus, and the Earth. This example is for continuousplots starting May 29th (day 150),for 44 days with 4 daysbetween. plots.

APPLES, those with integer basicand others with floating paint basicin ROM, how you use this program

will depend on your system. Since - Iknow my system I will describe whatI had to do to it too.

I have a 32K APPLE II with integerbasic in ROM. My floating pointbasic is on cassette and loads fromhex BOO to 29FF. My high resolutionsubroutines are also on cassetteand load from hex COOto FFF. Page1 display for high res graphics hex2000-4000 overlaps my floatingpoint basic, so I have to use page 2hex 4000-6000 for the display. Sincefloating paint programs startloading at hex 2AOO,large programs

will overlap my page 2 display areaso I had to change the programloading address from2AOO to 6000.This Is Just beyond the page 2display area.

On my system, after floating pointbasic is up and running I have to getinto monitor and change hex loca-tions 68, 60, 6F, 71 from 2A to 60.Then I have to change three bytesstarting at hex 6000 to zeros,('60000:00 00 00), If your floating

MICRO -- Tn. 6502 Journal

point basic doesn't load from hex800 to 29FF then look at the article"Applesoft Program Relocation"

page 19:49 of the Dec. 1979 issue ofMicro. If you don't have that issue, itlooks like some floating pointbasics load from hex 800 to 2FFF. Ifthis is yours then change hex loca-tions 67 and 68, (-67:01 60).Then putzeros in the three bytes starting at6000 like above. Typing OG thenRETURN should get you back tofloating point basic but don't do Ityet. The high res subroutines alsooverlap the floating point baste, so Ihad to make changes there and loadit in the area hex 3COOto 3FFF. SeeListing 2 for those changes. Now

that I made all the changes inmonitor, OG RETURN gets me backto floating point basic where I loadthe program as usual. The first timeI did this I was surprised It worked,but it did. I hope the configuration ofyour system will allow you to usethis program without moving thingsaround, but If you do these changesare easier than it looks. Saving thenew high res subroutines on tape ordisk will speed things up the nexttime you have to do this.

27:35

Page 38: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 38/82

'If you're wondering how accuratethis program is, I used an almanacfor 1980 that gave the dates ofspecial events for the planets, andall 20 dates that I tried worked. Thedisplay that I got for each date cor-responded to what the almanac saidwas happening. I also have a bookthat gives the location of the

planets 2.2 years ago, and thedisplay I got was accurate enoughnot to make chang.es to the pro-gram.

This program can still be used onmicros without high res graphics.The plotting routines can be chanq-ed to print the values RV, V1, and'theX,Ypositions. The distances bat-ween the Earth and other planetscan also be calculated. If you haveany questions or problems, don'thesitate to write, but ptease includea SASE or two stamps for postageand envelopes to guarantee aresponse. If there are a lot of ques-tions,1 don't want to g.o broke onpostage.

One last word about the display.Using Figure 4 and the July 12thdate, a line drawn form the Earththru the planet Venus to the 10degree circle intersects at about 47degrees. This doesn't correspond towhere Venus appears in the sky.Since the 10 d.egreecircle doesn'thave an infinite radius and iscentered on the Sun and not theEarth, a line from the Sun parallel tothe first should be drawn. This ln-tersects the 10 degree circle atabout 76 degrees..Looking a Figure3, 76 degrees is in the constellationTaurus, and corresponds to whereVenus should appear on July 1.21h.

Dave Partyka works as a program-mer on an IBM 3031 OS system forthe May Department Store com-pany. He has been programming forthree years, and he has been anoperator for four years prior to tnet.Before he began work at the MayCompany he servde four years in theUS Navy where he worked in dataprocessing.

- - - - - - - - - - - - - ~27:36

Sidereal Distanee from Su n Longitude ofrevolution in million m iles perhe1ion inin days max. m in. d egrees Eccentricity

Mercury 87.969 43.403 28.597 77..1 .2056

Venus 224.701 67.726 66.813 1 3 1. 3 .0068

Earth 365.256 94.555 91.445 102.6 .0167

Mars 686.980 1 54.9 36 1 28 .47 1 335.7 .0934

Jupiter 4332.125 507.046 460.595 13.6 .0478

Saturn 10825.863 937.541 8 38.42 5 95.5 .0555

Ur-anus 30616.15 1859.748 1699.331 172.9 .0503Neptune 59911.13 2821.686 2760.386 58.5 .0066

Pluto 90824.2 4551.386 2756.427 223.0 .2548

Listing 1.

. . . " " "" . . ' .. i! I ' . . I' I ! ! I i" I " ' ~, ' '" '" '" f ' '" .. '" o ! ! ' '" ~ . ' . . . , ; . ' ' " . .

ADDRESS OLD NEW

COl 20 40G 65 OB SBClE OC 3C

CE3 OD 3DDCA. OD 3DD62 OD 3DD6B OD 3DD93 OD 3DD9F OD 3DDCD OE 3EDD5 OE 3EDF6 OD 3DE02 OD 3DE3D OD 3DEB F OC 3CEc 6 OE 3EEC9 OG 3CEDS OC 30EFI OD 3D

From m onitor load the high res

s ub ro utines in th e n orm al lo catio n,

COO to FF1". Make th ese ch anges th en

mov e th e s ubroutines to 3COO by keying3 CO O< CO O. FF FM t he n R ET UR N.

The value in location COl was

c hanged to us e page 2 (4000-6000)

ins tead of page 1 (20 00-400 0).

O LD V AL UESDEC. H EX •.

30 72 COO30 86 GOE3780 EC43 761 EBI3 78 6 ECA3 80 5 EDD

HIGH-RESCOMlAAND.S

INITCLEARPLOTPOSNL I N ESHA:PE

. N E W VALUESDEC. HEX.

1 53 60 3 COO15374 3COEJ.6068 3EC41 60 49 3 EBl1 6074 3ECA1 6093 3EDD

Lis tin g 2 .

• ' '" • ~ • '_ .f" I " ' ••••• f ••••.• ,iI ••••.• _' • J I I ' " I o ! ! ' . . '" ' • . 1 or io

1 REM SOLAR SYSTEM SIMULATION FOR THE APPLE II2 REM WRITTEN BY DAVE A. PARTYKA3 REM 1707 N. NANTUCKETTDR.4 REM LORAIN, OHIO 440535 REM WRITTEN FEB. 198010 GOTO 100090 REM (100-110) POKE X AND Y VALUES FOR PLOTTING100 POKE 800,X-INT(X/256)*256:POKE 801,INT(X/256)110 POKE 802, Y:L=USR( 1606 8): RETURN150 REM (200-300) CAL.CULATETHE X AND Y PLANET POSITIONS

200 DbZ-INT(Z/SRD)*SRD205 REM D IS FOR DAYS210 B=Q-(D/SRD*Q2)220 RV=A-(P/(l+E*COS(B»)225 I$M RV IS THE RADIUS VECTOR OR DISTANCE FROM

THE SUN TO THE PLANET230 V=PE/RV-EZ240 IF V=>l THEN V=VL245 IF V={-1 THEN V=-VL250 VI =-ATN( V/SQR( -V*V+l) hT255 REM VI IS THE ANGLE THAT THE PLANET

LIES FROMTHE SUN. THE 0 POINT BEING ATTHE RIGHT, INCREASING COUNTER CLOCKWISE.

260 IF D SRD/2 THEN Vl=Q2-Vl

MICRO -- The 6502 Journal Augusl1980

Page 39: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 39/82

270 V1=V1+J28 0 X=COS(V1)*RV:Y=-SIN(V1)*RV*FA2 90 X =X *T T+ Xl :Y= Y* TT +Y1300 RETURN900 REM (1000) DISPLAY PRIMARY PAGE, SET TEXT MODE1000 POKE-16300,O:POKE-1630J,01 01 0 T=1 .57 081 0 20 Q=3 . 14 15 92 651 03 0 Q2 =6 .2 83 18 531 0 40 V L= .9 99 99 99 91 050 F A= 29 /3 2

1055 REM FA IS THE RATIO OF X TO Y TO PLOT A CIRCLEON THE APPLE INSTEAD OF AN OVAL1 0 60 X 1 =1 40 : Yl =9 61700 PRINT:PRINT:PRINT:PRINT:PRINT1 80 0 PRINT "DO YOU WANT TO DISPLAY"1810 PRINT:PRINT "THE SAME PLANETS AS YOUR LAST RUN"1815 PRINT: INPUT "Y OR N "; A$,1 8 20 P RI NT :P RI NT18)0 IF AS="W' THE.N 20001840 IF A ' < > "Y" ,THEN 1 80 01850 IF 31<'0 THEN 40001 8 55 PRI NT :P RI NT1860 PRINT:PRINT "YOU HAV'NT PICKED THE PLANETS YET"1870 PRINT:PRINT:PRINT2000 PRINT "CHOOSE THE PLANETS YOU WANT TO DISPLAY"2 00 5 PRINT2010 PRINT "ENTER A 1 FOR YES, 0 FOR NO"2011 PRINT2012 REM (2020-2079) GET SPECIFIC VALUES FOR EACH PLANET

2013 REM Sl=ORBITAL PERIO D: Pl=A1 * (a-ai *El)/22 014 REM E1=ECCENTRICITY: Ul=Pl/El: K1=1 /El2015 REM A1=MINIMUM + MAXIMUM DISTANCE FROM SUN2016 REM J1=LONGITUDE OF PERIHELION IN RADIANS2017 REM W1=DAYS FROM 0 DEGREES TO PERIHELION FOR 19802018 REM TT=SCALING FACTOR TO USE FULL PLOTTING AREA

IF SELECTED PLANETS ARE DISPLAYED.2020 INPUT "DISPLAY MERCURY ";ME2 02 1 8 1=8 7. 9692 02 2 E l== .2 05 62 02 3 A 1=4 3. 40 3+ 28 •. 59 72024'P1=A1*(I-EI*E1)!22 02 5 Kl =l /E 12 02 6 Ul =P 1/E l2027 J1=77.1*Q/1802028 WI=37. 582029 IF ME=l THEN TT=2.32030 INPUT "DISPLAY VENUS .;VE2 03 1 8 2=2 24 .7 012 03 2 E2 =. 00 68~ 0 33 A 2=67 .7 26 + 66 .8 1 32034 P2=A2*(1-E 2*E 2)/22 03 5 K2 =1 /E 22 03 6 U 2=P 2/E22 0 37 J 2= 13 1 ..3 * Q/ 18 02038 W2=140.52039 IF VB=l THEN TT~1.52040 INPUT "DISPLAY EARTH ";EA2 04 1 S 3= 36 5. 2562 04 2 E 3= .0 167

2043 A 3=94.555+91.4452044 P3=A3*(1-E 3*E)/22045 K3=1/E32 04 6 U 3= P3 /E 32 0 47 J 3 =1 0 2. 6* Q/1 8 020 48 W3 =-32049 IF EA=l THEN TT~1.052050 INPUT "DISPLAY MARS ";MA2 05 1 8 4= 68 6. 98 02 05 2 E4 =. 09 342053 A4=154.936+128;4712054 P4=A4*(1-E4*E4)/22 055 K4 :: 1/E42 0 56 U 4=P4/E 4

Would you like to become

A MICRO Dealer?

MICRO is a quality 6502reference journal. Our cur-rent dealers report that hav-ing MICRO avaltable forsales in tnetr stores actual-ly helps them sell6502-based systems.

We require a minimum ofonly ten copies per month,and we offer a standardtrade discount.

Besides the regularmonthly magazine, wehave other items available,suoh as The Best ofMICRO, Volume 1, and TheBest of MICRO, Volume 2.Volume 1 contains thesignificant articles publish-ed in the first six issues ofMICRO; Volume 2 containssignificant material fromissues 7 throuqh 12. The

Best of MICRO, Volume 3which contains materialfrom twelve issues (13-24)W i ll be available in the fallof 1980. For those whowant the complete worksof back issues, we also of-fer All of MICRO.

If you are Interested inbecoming a MICRO dealer,please write to:

MICROBox 6502

Chelmsford, MA01824

\..

Page 40: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 40/82

2 057 J4=335.7*Q/1 802 05 8 W 4 . .2 8 92059 IF MA~l THEN TT=.62060 INPUT "DISPLAY JuPITER " ;JU2 061 S 5= 43 32 .1 252 062 E 5=. 047 82 063 A5=50 7.0t6+460.5952064 P5=A5*(1 E5*E5}/22 065 K5=1 /E 5

2 066 U 5= PS /E 52 067 J5=13 .6*Q/1802 068 W5=1 60 4

2069 IF JU=l THEN TTc.192070 INPUT "DISPLAY SATURN ";SA2 07 1 S 6= 10 8 25 .8 632 07 2 E 6=. 05552 0 7) A6=93 7.541 +838.4252074 P6=A6*(1-E6*E6}/22 07 5 K6=1 /E62 07 6 U 6= P6 /E 62 07 7 J 6= 95 .5* Q/1 8 02 07 8 W6=2 11 52079 IF SA=l then TT=.l3900 PRINT:PRINT:PRINT4 00 0 P RI NT :P RI NT "00 Y OU W AN T" :P RI NT

401 0 INPU'I'"P O INT (0) OR CO NT 1 NUO US (1) PLOT S n; TY4015 IF TY < > 0 AND TY < > 1 THEN 4000402 0 PRINT:PRINT:PRINT403 0 PRINT: PRINT "00 YOU WANT TO START AT n: PR I NT4040 PRINT "A SPECIFIC DATE (0) It:PRINT4050 INPUT ~OR THE BEGINNING OF THE YEAR (I) ";IlT4051 IF IlTOO ... MOl THEN 40204052 IF D T = l THEN 40604053 PRINT: PRINT IPRINT4054 INPU'r "ENTER # OF DAYS SINCE JAN 0 1980 ";DE4057 Zl=DE4060 PRIN'h PRINT: INPUT ..NTER # OF DAYS TO PLOT "; DN4070 PRINT:PRINT:PRINT4080 INPUT "ENTER # OF DAYS BETWEEN PLOTS "; DA4082 IF DA(>O THEN 48004 08 4 P BI NT :P RI NT

408 6 PRINT "0 NOT ALLOWED:GOTO 40704090 REI! (4800) INIT HIGH RES, FULL SCREEN, PAGE 24800 L=USR(15360):POKE-16302,0:POKE-16299,04802 REM (4805-4860) PLOT REFERENCE POINTS AND OUTER

10 DEGREE CIRCLE4805 POKE 812,2554810 X=140:Y=96:GOSUB 1004811 X=141:Y=96:GOSUB 1004815 X=248:Y=96:GOSUB 1004 82 0 l OR L 1= OT OQ 2S TE P1 /3 6* Q2483 0 X=Xl+COS(L1)*1 05.94840 Y=Y1-SIN(Ll)*105.9*FA4850 GOSUB 1004860 NEXT Ll4900 REM (5100-5140) SET UP VALUES FOR MERCURY AND PLOT5100 IF ME=O THEN 5200

5110 A=A1:P=Pl:E::E1:PE",Ul:EZ=Kl:SRIr-Sl:J=Jl:W=Wl:Z=Zl+W512 0 GOSUB 2 00: Fl==X: G1==Y5125 IF TY=1 THEN 5140513 0 LoM 1: Y=N1 : POB:E8 12 , 0: G O SUB 1 005140 X =F l:Y==G l:M 1=X :N1=Y:POKE8 12 ,255:G OSUB 10 05190 REM (5200-5240) SET UP VALUES FOR VENUS AND PLOT5200 IF VE=O THEN 53005210 A:::A2:PcP2:E=E2:PE:::U2:EZ=K2:SRIr-S2:J=J2:W=W2:Z=~1+W52 20 G OSUB 2 00 :F2 =X :G 2=Y5225 IF TY=l THEN 52405230 Xc M2:Y=N2:POKE8 12 ,0: GO S UB 10052 40 X=F 2: Y==G 2:M 2=X :N2 =Y: POKE8 12 ,255:G OSUB 10 0

r

Advertise with MICRO

MICRO offers Its adver-tisers selective- readership,effective advertlsi n,g,rela\Jvely inexpensIverates. quality printing,regualr monthly publlca-tion, short lead time, dealercirculation, and multipleexposure.

We have recently put

together a new MediaPackage containing all theInformaton that you needto know about rates, sizes,and placement.

Our Media Package alsogives you information 01 1

contracts, negatives, colorsepatattorrs, insertions,typesetting, and artwork.

If you have not yet recelv-

ed our' Media Package, wewill send you one if you willwrite to us at thls address:

Advertising Dept.MICROBox 6502

Chelmsford, MA 01824

Or call and ask for CathiBland, Director of Advertis-ing. She will be most happy

to help you in any way thatshe can. Our phone numberis:

(617) 265-5515

Page 41: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 41/82

5290 REM (5300-5340) SET UP VALUES FOR EARTH AND PLOT5300 IF EA=O THEN 54005310 A=A3:P=P3:E=E3:PE=U3:EZ=K3:SRD=S3:J=J3:W=W3:z=ZI+W5320 G OSUB 200 :F3 =X :G3 =Y5325 IF TY=l THEN 53405330 X=M3:Y=N):POKE812,0:GOSUB 1005340 Xs P3: Y=G 3: M3=X:N3=Y: POKE8 12 ,255: G O SUB 1 005390 REM (5400-5440) SET UP VALUES FOR MARS AND PLOT5400 IF MA=O THEN 55005410 A=A4:P=P4:E=E4:PE=U4:EZ=K4:SRD=S4:J=J4:W=W4:Z=Zl+W5420 G OSUB 2 00: F4=X: G4=Y

5425 IF TY=l THE.N 54405430 X=M4:Y=N4:POKE8 12,0:GOSUB 1005440 X =F4:Y=G4:M4=X: N4=Y: POKE8 12,255:GOSUB 10 05490 BEll (5500-5540) SET UP VALUES FOR JUPITER AND PLOT5500 IP JU=O THEN 56005510 ~A5:P=P5:E=E5:PE=U5:EZ=K5:SRD=S5:J=J5:W=W5:Z=Zl+W5520 G OSUB 2 00 :F5=X: G5=Y5525 IF ry=1 THEN 5540~ 5 3 0 X =M 5 :Y ",N5 :POKE8 12 , 0 : G O S UB 1 005540 X=P5: Y:G 5:M 5=X :N5=Y:POKE8 12 ,255: GOSUB 1 005590 REM (5600-5640) SET UP VALUES FOR SATURN AND PLOT5600 IF SA==OTHEN 60005610 A=A6:P=P6:E=E6:PE=U6:EZ=K6:SRD=S6:J=J6:W=W6:Z=Zl+W5620 G 05UB 20 0:F 6=X :G 6=Y5625 IF TY=l THEN 564056)0 LoM6:Y=N6:POKE8l2,0:GOSUB IOcr

5640 X=F 6: Y=G 6:M 6=X :N6=Y:POKE8 12 ,255: GOSUB 1 0060 00 Zl=Zl+ DA6100 IF Zl)DE+DN THEN 70006200 GOTO 510070 00 X: :: 2 79: Y=190 :GOSUB 1 0 0: INPUTA$7050 REM (7000) PLOT POINT 297 190 TO INDICATE END OF

SIMULATION THEN WAIT FOR INPUT OF ANY CHARACTERTO START AGAIN.

7100 Z1=0: DE=O7200 GOTO 1000

computar

SOFTWAREACCESSOR IES

SUPPL IES

Now you can

purchase all of yourApple II ll e rns with an

arrncba: r conveniencefrom one source.

SUBSTANTIAL SAVINGSYou receive discounts based

on vol ume purchased.

U L T RA-C U R R ENTYou'll be the first to team

of new releases.

TO ORDER send $3.00You receive current BUYERS

GUIDE and a certificateworth $3.000 II 0 I your

first purchase.

Dealer Inqulfles IO....leo

WALLACE COMPUTERS,ACCESSORIES and SUPPLIES, inc.2513N. Sheridan Rd. Peoria, Illinois 61804

309-885-1878

Software and Hardwarefor BusinessEducationEntertainment

Rt!Ce:ntArr lval~

A S T E i. l. AR T It :E K t be t I£ It ln t[ W e H t .R e- sector v er ss on o r U . .e c: : IM.~s ta nr ee ee me . T h re e o ir fe -r e- nt K l ln g Qn (] IJ IJ D~ I1 oU t ll lI on V

COI'Ilmil!ndpetogatives; from ~I! of "''C3DOfl~o rE!~al"of d~rnJ9~N~,a8:k'A.oPlesOHROMOi5t_ ", " ••.. , ,,,$2.;I.9!l

r A S .H M . A S T E R t il e" trent Co.JnrerUish r-wister s y s tem , A ' e l: o r -0 : :5 .UP to 100 trareaedere, eacn 11d~or U'lift. AC:l;ountjng or (ji!irymooe ...traMaC"OOflisana in...enrorv turl"lover. tloltl$: 1r;KJOnventoryIterm. Hascmer oewerfutQPtlons.. eros o19KAQ~lesoft ROM,dWllg~ Qrlve:s.4(] toluml"l orl'uer . • ". . . •. " •••• , ' . $2:5D..O D

CASHDRAWER. 5100.00 '" $1I),ODsnl!)!)IM

ForSOfrware onlY. <11;1[1$2.00.S./55,COFQrel9nshIPP11Ig th:lrg~,C a J lr o rr w :a ( < <! S id e n t, l " 0 0 6% . lJOnt set!' whiat yOu wantnere.THEN write or c .a J ll oo o v e er vo ur F R EE s c et w er e . an a I \a rO W ;) reCIlt"iIQ9,

C a rd e n P l a; ;: a s h o pJ )t n9 c e ec c-9 ' 71 9Resl ( !( ja B t '- 'C I .• NOrttllidoge,Oli'. 9132d D:e~t.'M1resecncoe [;j!1~ M~,'S-S60

CRAEA fast Co-Resident Applesoft Editor for Applesoft pro-grammers. Now perform Global changes & finds toanything in your Applesoft program, Quote (copy) a rangeof l ines from one part of your program to another. A fullyoptimized stop-tlst command that lists your program tothe screen with n~ spaces added and forty columns wide.Append Applesoft< programs on disk to program inmemory. Formatted memory dump to aid debugging.Powerful renumber is five times faster than mostavailable renumber routines. Auto line renumbering.CME need be loaded only once and changes your Applesoft program right 1mmemory. 48K Apple II or Plus & Ap-pleso!t ROM & . Disk.

MCATMCAT is a binary program which creates a master catalogreport. The first lisl is sorted by file names and the secondby volume number with sectors used indicated. Provi-sions for duplicate volume numbers. 600 file namescapacity on a 48K system. 200 for a 32K system.

CRAE on disk with 16 pagemanual $19.95MeAT on disk with 10 page manual $14.95

CRAEand MCATon one disk with manuals $29.95One manual $2 Both manualS $3CRAEIMCAT manuals Include Instructions for making abackup copy.

See your local dealer or send checks to

HIGHLANDS COMPUTER SERVICES14422 SE 132ND

RENTON, WASHINGTON 98055(206) 228·6691

Washington residents add 5.3% sales tax. Applesoft andAPPLE are registered trademarks of APPLE Computers ,

Inc. Ad run in July issue should have read '48K' memory.

Page 42: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 42/82

Attention

BARGAIN HUNTERSReceive Hundreds of Classified Ads

Uke These Eve.ryMonth

: ~ RSALE.: lnlerdata (Perkin-Elmer)

16 Mrm with 32KB core frontpanel, SOA PWR supply r' I'dHS ta ..' nc u es

pe reader" Interfaces for lP 2rnV), and RS-232 (Full du I~ .pr~grammableJ. Includes ma~ua~

atn )much SW (Ba.sic, Fortran 05e c., ' $800 _ '203..,......-

COMPUTER AUTOMATION ALPH

16; 16 k-wordcore memory,R

PF-R. Modified Mod. ASR-33 T '

Manuals utilities, assemblers amany option boards - 16 bit 1./0

D· sr 16 bit I/O, As,ynch modemrive, . 10 bit A/Dcontr. 64 bit output, . I -

D I A fairly complete documen-

tati;n. Up and running in Fortran.

Not much more than TTY at $1000.

Herb Sauer, 303..494-8724.

COMPUTER SHOPPER, the new buy, sell, and trade

publication, is ready to help you with the latest infor-mation on personal, small business and large-system

computers, accessories and soltware.

Each ad-packed issue is futl 01 bargains you are

looking for. Included are ads from individuals

throughout the United States Who are selling their

good, pre-owned equipment just so they can trade-up

to new equipment coming on the market.

But" COMPUTER SHOPPEH'S bargains won't beyours unless you subscribe. This useful, money-

saving publication can become your way to com-municate with other buyers, sellers, and traders all over the nation.

Whether you are a hobbyist or a part-time user, COMPUTER

SHOPPER will put you in touch with the nationwide computer

marketplace in time for you to take advantaqe of bargain oppor-

tunities.

Have something to sell? A COM PUlE R SHOPPER subscriber pro-bably wants to buy it.

looking for a part, component or even a complete system? A

COMPUTER SHOPPER subscriber probably wants to sell it.

COMPUTER SHOPPER is THE marketplace for anything in com"

puters and is read by thousands of people who are ready to buy,

COMPUTER SHOPPER offers a unique format in which classified

ads are categorized for fast location of specific items. Combining

this with low individual ad rates - 10 cents a word -

fOR SALE: . Heath H9 video ter-

minal, excellent condition, $175 or

offer ..You ship, [214) 962-4484

makes il the ideal place lor buyers and sellers to com-

municate. And, its mix of individual, dealer, andmanufacturer ads enable subscribers to lind what

they want at the best price possible.

COMPUTER SHOPPER will work lor you in otherways, too. If you are just thinking about getting into

computers, it can help you learn product availability

and prices before you make a decision. And, through

the timely ads, COMPUTER SHOPPER will keep you

abreast of changes in the market which could createbarga,in opportunities lor you.

BUT COMPUTER SHOPPER cannot work for you unless you

subscribe.

Want to look us over first? We'lI give you your first issue FREE

and then bill you lor the next 12. If you are not convinced COM-

PUTER SHOPPER suits your needs, just write "cancel" on the in-

voice and return it

And. to let COMPUTER SHOPPER start working for you right now,

with a paid subscription we'lI also give you a FREE classified ad to

sell your pre--ownedequipment or to find equipment you want

If you don't need' to use the iree classified ad now, use it anytime

during your subscription.

Subscriptiorr: $1Dlyear, 12 issues plus your first free one, Bank

cards accepted, Money back guarantee.

u : : ! . . The Nationwide Mar,kelp/ace for C,am,'puler EqU,pmenl

~ CCm~UTeRs,..'CppeR

p.o. Box F22 • Titusville, Florida 32780Telephone 305·269-3211

Page 43: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 43/82

&EXPANDA- PORTDR YDUR APPLE II®CDIVIPUTER

VERY APPLE II@ OW NER SHOULD HAVE, ONE!

,The PROGRAMMA JOYSTICK is an input peripheral that

attaches to the APPLE. II Computer's game I/O Port. The

JOYSTICK is a must for the serious game player, and it

offers a degreeof linearity not currently available with other

joysticks. The easeof manueverability and the availability

of the "functional" switches make the PROGRAMMA

JOYSTICK a much needed enhancement to any APPLE IIComputer System owner. The PROGRAMMA JOYSTICK

comes completely assembled and tested.

$49.95

The PROGRAMMA EXPANDA-PORT is a multi-port ex-

pander for the game I/O port of any APPLE II Computer

System. In addition to allowing expansion for up to six

devices, the EXPANDA-PORT contains a built-in speaker

that replaces the function of the Apple II's speaker. Theswitch on the EXPANDA-PORT allow for the selection of

the specific device desired and for the switching of that de-

vice. No unplugging of any device connected to the

EXPANOA-PORT is required. The PROGRAMMA EX-

PANDA PORT comes completely assembled and tested.

PANDA-PORT $59.95The PROGRAMMA JOYSTICK and EXPANDA-PQRTare

available on a limited basis through your local computer

dealer. Apple II is a registered trademark of Apple Com-

puters, Inc.RDGRAMMA

NATIDNAL.INC.

00 Wilshire Blvd.sAngeles, CA 90010 (213) 384-0579 • 384-1116 • 384-1117

' U n, 0

o m 3D . '< 1C e n Cn rt r

" C U m

U I 3 ,

Page 44: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 44/82

In this, the third issue of the Ohio Scientific SmallSystems Journal in MICRO, we are happy to present thefirst user contributed article the Journal has everfeatured.

The first article, based on a contribution by Phil Lind·quist of Union Lake, Michigan, features a short but highperformance word processor program and some insight

into its operation. This high uti lity program may find usein your program library. We shall be happy to featureother contributions of this qual ity in future issues.

The second article Is on hardware ROM (Read OnlyMemory) configurations used In Ohio ScientificSystems. The article may be somewhat detailed ln-

technical aspects of the hardware, but if you need toknow this information, there is no better way than get·ting into the details here.

Reader suggestions on article content are welcome.Please submit suggestions or other contributions to:

OHIO SCIENTIFIC, INC.Small Systems Journal1333 S. Chillicothe Rd.

Aurora, Ohio 44202

MINIMICRO WORD PROCESSOR

A simple word processor with great utility has beenwritten by Phil Lindquist of Union Lake, Michigan. Theprogram provides:(a) Resequencing of text lines,(b) Right and left hand justification of text, which givesthe crisp look of aligned margins,(c) centering of titles and subheadings, and(d)by passing the text editor for selected l ines.For many text editing tasks, high quality printed out-

put can be obtained with few program constraints. II's agood Introduction to word processing.

INTIALIZATION

The Minimicro program is listed in Listing 1. To ap-preciate its features, enter the program as listed. It willrun on all 8" floppy 65D V3.Xsystems. For caseUe basedsystems, changes should be made for screen prlntng.C-l-P or C-4-PCassette Systems: Change the followinglines to:

11010 AD= 121:SN '" 100:INC = = 1012040 REM DEVICE IS SPECIFIED HERE12160 AD=12112500 PRINT,TAB(LM); 0$: GOTO 12200

C·,·p or C-4·P MF Systems: Change the following linesto:

11010 AD= 12921:SN'" 100:INC '" 1012040 REM DEVICE IS SPECIFIED HERE12160 AD=1292112500 PRINT,TAB(LM);O$:GOTO 12200

If you wished to use a line printer, the form of theoriginal listing shows the method. Line 12500 is the onlytext output. With these minor changes, let's look at theoperation of the program.

USE:

The text editor program is Invoked by the BASIC corn-mandRUN 10000

at which time you are given the choice ofRENU MBERfLiST/EXIT?

For any other enoree, we'l l need some text to test the

program. Therefore, before you run the program, enteryour text with sequential line numbers. Texl will be in'dicated by a quote followng the line number, such as10 "NOW IS THE TIME

To have a sequence of text renumbered, such as10"NOW IS THE TIME20"FOR ALL GOOD30"MEN TO AID

we again typeRUN 10000

and respond to the text editor's selection list byRENUMBER

The text is now resequenced, starting with statement100, incrementing statement numbers in steps of 10.Program statement 11010 may be modified to permitother starting statement numbers (SN) than 100 andother incrementing steps (INC) than 10.

The final feature to be examined is the selection LISTin the text editor's selection l ist. Within LIST, four syrn-bots are used to control the text editor. These symbolsare(a)the quotes("), following a statement number, in-

dicate that thestatement is text(b)the slash (I ) character, immediately following the

quotes, indicates that the line is to be centered withinthe allowed margins. An example of this feature wouldbe

10"ITITlE(c)the period (.) character, Immediately following the

quotes indicates that the tine is to be listed without theuse of text editor text al ignment.(d) the apostrophe (') character, when typed twice in

succession, witl be printed as the quote (") symbol. This

convention was necessary because we have already us-ed the quotation mark to delimit text.

Lets's type some text and see how the editorresponds. First, some sample text might be100"ITITLE110"NOW IS THE TIME120"FOR SEVERAL GOOD130"PERSONS WHO140".00 NOT EDIT THIS

Request the editor's service by typingRUN 1000

and respond withLIST

it will request input withFIRST LINE, LAST LINE?

Respond with100,140

(Note: 0,9999 will LIST all text)The editor will then askLEFT MARGIN, RIGHT MARGIN?

Since all text lines were less than 20 characters long, Ichose a left margin of 10spaces and the right margin 20spaces later, as10.30

The resulting text appears asTITLE

NOW IS THE TIMEFOR SEVERAL GOOD

CALL 1-800-321-6850 TOLL FREE

Page 45: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 45/82

SMALL SYSTEMS JOURNAL

PERSONSWHODONOTEDITTHIS

The title is centered midway between columns 10and30.The next two lines havespacesadded to pad them tofit exactly between the column 10 and column 30margins. Text line 130 is quite short, so the text editordoes not adjust the text margins. Finally, the last line,

140,will not beedited, because the leading period caus-ed the editor to ignore the statement.

Program Method:

let's take a look at the method which wasused Inthisprogram to align margins. The line width, right marginminus the left margin, is computed in line 12150.If thepresent line is greater in length than the computed linewidth (between margin spacing), (line 12420),then theline is printed "as is". Only in the cases for text linelength in lines 12430to 12480,is the text line is paddedout wilh blanks. Because the line is justified going fromright to left, wedon't add paddingon top of padding, giv-ingunevenspacing. This schemedistributes the spacesevenly across the line, in between words. USingrepeated passes through Ihe program 10 add one space

between words, until margins are aligned, gives evenspacing.

In the case of titles to be centered, statement 12490subtracts the character string length to be printed fromthe inter-margin width. Since this is the numberof blankspaces needed,a character string of half this length, fill-edwith blanks is placed In front of the title to beprinted.

Someuseful information can be gained by looking atI the method used to address text. The text is stored se-quentially as a part of the Minlmicro program. The firsttwo locations (bytes)at the start of each line of text con-tain the address of the next line of text. In the Mlnlmicroprogram, the variable AD starts off pointing to the startof the Basic program, and therefore to the text to beedited. Each time we examine a new line of text, thevalueof AD is updated bythe latest valueof the programpainter to the text. When we reach the last line of text,two bytes, of value00,are found in the first two bytes ofthat line of text (placed there by the BASICeditor); this

will label the line as the last line of text. Eachlineof texthas the end of the text line delimited by a a (not theASCII symbol for a 0)_The use of the end of text linedelimiter and the end of text delimiter permit easy testsfor word processing.

With these insights into a very useful program con-tributed by Phil Lindquist, you may see ways to incor-porate this program into your programs or library.Thanks Phil!

Listing 1

10000 PRINT' 'Min1.micro Word Processor, Number 2"

10010 PRINT' 'Program by P. Lindquist, May 19S0"

10020 PRINT

100.30 PRINT

10040 INPUT' 'RENUMBER/LIST/EXIT" ;A$: PRINT

10050 IF LEFT$(A$,l)=' 'R" THEN 11000

10060 IF LEFT$ (A$ ,1)., , 'L' , THEN 12000

10070 IF LEFT$(A$,1)=' 'E" THEN STOP

100S0 GOTO 10020

11000 REMu*RESEQUENCE'11010 AD=12665: SN.,100: INC=10

11020 AD=PEEK(AD)+256*PEEK(AD+l)

110.30 LN=PEEK(AD+2)+256*PEEK(AD+.3)

11040 IF LN.> 9999 THEN 10020

11050 BT-INT(SN/256j: POKEAD+.3 ,BT

11060 BT=SN-256*BT: POKE AD+2, BT

11070 SN=SN+INC

11080 GOTO11020

12000 R E M *** JUSTIFIED LIST

12010 PRINT' ' L INE NUMBERRANGE' ,

12020 INPUT "FIRST LINE, LAST LINE' r ; FL, LL

12030 PRINT

12040 INPUT' 'DEVICE NUMBER fO R OUTPUT" ;DV

12100 REM

12110 REMUSE THIS AREA FOR SPECIAL OUTPUT INIT IF REQUIRED

12120 PRINT

121.30 INPUT' 'LEFT MARGIN, RIGHT MARGIN' r ; LM , RM

12140 PRINT

12150 RM-RM.-LM: IF RM< 1 THEN 10020

12160 AD=12665

12200 AD=PEEK(AD)+256*PEEK(AD+1)

12210 IF AD..O THEN 10020

12220 BP=AD+4

12230 0$=' , r ,

12240LN=PEEK(AD+2)+256*PEEK(AD+3}

12250 IF LN> LL THEN 10020

12260 IF LN < FL THEN 1220012270 IF PEEK(BP) =34 THEN BP=BP+1

12.300 CH=PEEK(BP)

12.310 IF CH-OTHEN 12.3BO

12.3200$=0$+CHR$(CH)

12.330 LN=LEN(O$)

12.340 IF LN'.< 2 THEN 12.360

12.350 IF RICHT$(0$,2)=' W' 'THEN 0$=LEFT$(0$,I.N~2)+CHR$(J4)

12360 BP'BP+1

12370 COTO12.300

12.380 LN-LEN(O$)

12390 IFLEFT$(O$, 1)~' '/ r 'THENO$:RIGHT$(O$, LN~1) :OOT012490

12400 IFLEFT$(0$,1)=' '. r 'THEN 0$=RIGHT$(0$,LN-1) :GOT012500

12410 IF 10*I.N < 7*RM tHEN 1250012420 IF LN·> -RMTHEN 12500

12430 FORI-LN TO 1 STEP -1

12440 IF MID$(O$, I,) < > " r , THEN 12480

12450 O$=LEFT$(O$, 1)+' r "+RIGHT$(O$,LN~I)

12460 LN=LN+ l

12470 IF LN > =RMTHEN 12500

124so NEXT : OOTO124.30

12490LN=INT«RM-LN)/2): FORI.1TOLN: 0$=" "+0$: NEXT

12500 PRINT #DV, TAB(LM) ; 0$: OOTO12.200

Ohio Scientif ic System ROMS

Most users of Ohio Scientific computers are awarethat the C1P, C4P, and C8P systems all contain 8KBASIC in ROM(ReadOnly Memory).What many usersare unaware of is that, in addition to the BASIC ROMs,there is also a separate ROM used for the systemmonitor code. Additionally, all floppy and hard disk bas-edsystems also contain a systemand "boot" ROM.Theboot code in ROM is used to bring up the system fromdisk.

This article will cover two main topics. First, an over-view of the general ROM decoding scheme will bepresented, In the second section, the content anduseofthe four currently available Ohio Scientific systemROMswill be discussed.

ROM Decoding

The system ROMsused InOhio Scientific computersare all 16384bit parts. Theyare normally referred to as

OHIO SCIENTIFIC 1333 S. Chillicothe Road • Aurora, Ohio 44402 • (216) 831·5600

Page 46: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 46/82

Dwo 'QuongFok Lok'SowBox4196, Grand Central Station

New York City,. N.Y.101631212) 685~21 88

r·_·_·_·_·_··t All ABOUT .,

• OSI! BASIC-iN-ROM i

'

BASIC and MONITOR REFE-• RENCE MANUAL for Ohio Sci- .,

, entific Microsoft BASIC--

IN-ROM Version 1.0 Rev_3.2 •• Complete, Concise (not a tt tutorial), Accurate and Detail· •

ed . A ll statements and com- t• mands. Looping. Tapes:, BASIC and homemade. Binary •representa tlon of float.i ng ,

. '

'

point. Storage of source codeand variable tables above

• $0300. Maps of pages .,

t$00,01,02. Routines in$AOOO-BFFF. Line by line •

• description of pages: $8.95 t

t

postpaid. Send a check, or •

• COD ($1.10 fee). ,

t Dealers' inquiries invited. •

,• E.H. Carlson t3872 Raleigh Drive •

• Oke.mas, MI 48864 J, . . . - . ._ . _ ._ _ .

WP-6S02a very fine word processor

Tape (Cl,C2,C41 $75

5~Disk (Cl.C2.C4J $758~Disk for 650 $75

8" 650 s 65U ..... $125DescriptiveBrochure , FREE

OSI SOFTWARE, FOR OS.We Have Over 100 High Quality Programs For Ohio Scientific Systems

OSI

ADVENTURES AND GAMES TEXT EDITORS FOR ALL SYSTEMS!!

These programs allow the editing 01 basic

program lines. All allow for insertion, deletion"

and correctlon in th e middle of already entered

lines. No more retyping.

Cl P CURSOR CONTROL iText Edito.r) $9.95

Takes 166 bytes of RAM and adds, besides text

editing, one key ins tant screen 0 lear.

C2P /C4P CURSOR $9,95

Takes 366 BYTES to add PET like cursor

functions. Enter or correct copy lrom any location

on the screen.oS

I

Adventures . These interactive fantasies will l it

in 8K! You give your computer plain engl ishcomm1Inds as you try to survive.

ESCAPE FROM MARS

You awaken Jna spaceship on Mars. You're in

trouble but e'plori ,ng the nearby Martian clrv

may save you.

OEATHSHIP

This is acruise you won't fOl "'get ~ if you survive it! ,

Advelllures $14.95 Tape or SV," Disk

$15,95 S·' Disk \STARFIGHTEA $5.95 SUPERDISK $24.95 lor 5·' $2.6.95 ler 8"

Has a text editor for 650 plus a great newRea.'l!imespace war with realistlc weapons and a I BEXEC', a renumber er, search, a variable table

working lnstrurnem panel. maker and Dlskvu - lots of utilitv for the money.

ALIEN INVADER 6.95 17.95 lor color and sound) We also have 25 data sheets available such as:

Rows 01marching munching monsters march on IMPLEMENTING THE SECRETSOUND PORTON

earth. THE Cl P $4,00

TIME TREK $9.95 HOW TO DO HIGH SPEED GHAPHICSIN BAS;IC

A real time Star trek with good gra,phic$. $4.00'

BATILEPAC $'7.95 HOW TO READALINE OF MICROSOFT $' "DO

For the batrlebutf Contains seawcue. Starfighter, JOYSTICK INSTAU CTIONS AND PLANS FOR

Bomber and Bartlefleet. Cl P $3 00

~ * 'AV,"O OA" 0' "'''' 00 ~

.. ~ '0' lots, lets. lots more! ~LJ.~",",",~~~~.I~h~~~~ ;:~;~:D:,::~t~~Ui:~:~' of how 10 articles

oS

1

Our $' .00 catalcq contains a free program listing, programming hints, lists 01 PEEKand POI(E tocetions and other stuff that OSI

forgol to mention and lots more programs like Modem Drivers, Terminal Programs, and Business Stuff.

Aardvark Technical Services 1690 Bolton, Walled Lake, M148088 (313) 624·6316

Page 47: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 47/82

Interface ofOSI·C1 P With Heath Printer

This article provides all of the hardwa,reand software

information that is required to implement and utilize this

combination.

Most personal computer userswant to attach peripherals to theirmachines. These peripherals take

the form of disk drives, cassettetape systems, printers, etc. Thecassette drive, the disk and theprinter usually have the first priorityover other peripherals. Most per-sonal computers have a cassettesystems as part of the 1 /0 in thesystem, so a printer or disk drive isthe user's next choice.

In my case the first choiceperipheral was a printer. This wasneeded to aid me in articlewriting and to provide quality pro-gram hard copy listings for these ar-

ticles. I researched the features ofthe available printers on the marketfor cost effective comparisons, anddecided to purchase the Heath H14for use with my Ohio Scientific C1P .

Thepurpose of this article will betogive the reader and the user of theOSI C1P the needed information forhardware and software lrnplernenta-tion to allow the C1P and H14 tooperate as a system. For this, there

are some hardware additions thatmust be included on the C1P's ctr-cuit board and one modification to

the H14 printer. These additions andmodifications will be explained inthis article.

The first of these steps will be theRS232Caddition that is needed forthe C1P . The modifications to followhave been included In the author'ssystem and the proof is in thelistings of the programs in this artt-cle and other articles that have ap-

August 1980

peared in Micro. But I must remindthe reader that when one does themodifications to the C1P and printer,

the warranties could be broken.

RS232 Implementation on the C1P

The Challenger C1P model 600

board can be configured for anRS232output only for a printer. Thisport does not come with the corn-ponents installed on the circuitboard; the user must install them orhave a dealer do it for him. Thecom-ponent count for this lrnplementa-tion is rather small in number, and iseasily done. To have an RS232printer port, you need only four

resistors, one transistor, and a 25pin female plug for the printer cablemale connector. Also a 12pin Molexconnector to mate with the 12 pinMolex connector on the C1P's ctr-cuit board. These components canbeeasily purchased from most local

electronics parts stores, or yourlocal Radio Shack parts counter.

To begin the parts placement, besure to remove the plug from thewall outlet. Next, remove thecabinet bottom. To do this, placethe C1P with the top down on a soft

surface. This will prevent damageto the surface of your C1P's cabinet.Remove the screws that hold thebottom in place, and removethe bot-tom cover by lifting it straight up-ward. This will expose the C1P'mode1600board andpower supply. Ifound it best when doing this toremove the power supply leads fromthe model 600 board. If you do this,besure to mark the points where the

MICRO -- The 6502 Journal

WIlliam L. Taylor246 Flora Rd.

Leavittsburg, OH 44430

leads were soldered to the 600board. Unsolder the the green, the

black, brown and red leads from thecircuit board. With these leadsdisconnected, the board can becompletely removed from thecabinet for inspection and ease ofinstallation of new components. Toremove the 600 board, turn the C1Pover to expose the keyboard.Remove the screws placed aroundthe keyboard. (These are the onlyscrews that hold the keyboard inplace.)

With the keyboard placed on yourworkbench with the components and

keyboard up, locate the page in your

C1P' Users Manual that shows thecomponent overlay diagram. This isthe drawing that shows the completeboard, and has the componentsdrawn at their proper location. Withthe keyboard near you, the RS232output port component location willbe at the far end of the board. In theparts placement drawing, locatetransistor Q1.Using the general clr-cuit board trace drawing in Figure 1,andthe schematic of Figure 1, installthe extra components that make upyour RS232output port. These corn-ponents are: 01, R72,R63,R64,and

R6S.The IC,U62, is already installedon the board.Therearenojumpers toadd on the board, but one of thetraces will have to be cut. This traceis markedWon the overlay drawing,and in the schematic of Figure 1.This trace is located near the end ofR64 that qoes to pin 7 of the circuitboard connector J3. The trace W, is

located on the foilside of the circuitboard. Use a sharp knife such as an

27:47

Page 48: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 48/82

Exacto to cut the trace. Be sure thatthe trace Is completely cut and thereis not any contact between the twoends. The next step in the rncdlflca-tion of our C1P for the RS232 Inter-face will be to add the 25 pin femaleD connector which will mate withthe 25 pin male plug on the connec-ting cable from the printer. This con-

nector will be mounted in the rec-tagular hole at the rear of the CIP'scabinet. But first, the connectingwires should be installed on thefemale connector and to a 12 pinMolex male connector. The 12 pinMolex connector will be used tomate the 12pin female connector onthe 600 circuit board at J3. Followthe schematic in Figure I, connectand solder a 12 inch stranded wirefrom pin I of the 25 pin female con-nector to pin I of the 12 pin Molexmale connector. Similarly, connectanother 12inch stranded wire from

pin 17of the 25 pin connector to pin7 of the 12 pin Molex connector.Finally, connect a 12Inch strandedwire from pin 3of the 25 pin connec-tor to pin 2 of the Molex connector.This completes the wiring of theplugs.

The next step is to install the 25pin female D connector in the rec-tangular hole at the rear of theC1P'scabinet. You will need two 6/32§_ccewsand nuts for this step.

Check your wiring against theschematic of figure 1, the partsoverlay in the C1P User's Manual,

and the parts placement trace draw-ing in figure 1 for correctness. Checkclosely the printed circuit board foilside for solder bridges. Be sure 01 isat the correct location and placedproperly on the board. That is, besure the emitter, the base, and thecollector leads are correctly soldered10 the circuit board. Reconnect thepower leads if they were discon-nected. This completes the parts In-stal lation. The circuit board can nowbe re-installed in the C1P's cabinetwith the screws previously removed.

Locate the position of J3, pin 1.Plug in the 12pin Molex male connec-tor into J3. Re-install the 6 pin Molexconnector at J2. Be sure that theplugs are properly orientated beforethey are plugged into their respective

socket. Re-solder the power leads ifthey were removed at the beginningof the modification. Replace the bot-tom cover on the C1P with thescrews that were previously remov-ed. This com pietes the parts install a-tion on your C1P.

Modifying the H14 and Bringing Upthe System .._

As previously stated, the H14Printer will require one simplemodification. This consists oflocating a wire, cutting it, and at-taching a short wire to the minus 12volt power supply in the H14 Printer.Locate the black/red wire going topin 8 of the main circuit board con-neclor for the 110 cable. Cut theblacklred wire about one inch fromthe 15 pin female connector. Thisshould be done so that the wirecould be re-attached Inthe event that

the printer is sold in the future.

Using a short piece of smallstranded hookup wire, connect oneend to the blacklred wire going to theI/O cable, Solder the connection. At-

(TX)

Data

Cut Trace----'- X W10

YR64 & R65

H14 D connectorRS232 Cable

> >PIN 3

> >PIN 17> >PIN 1

10-- ---' J2

Top Component SideModel 600 Board

,27~48

W10 0 0 LI ....I1 ..L.....J.1J3

"-~ ~ ~ ,tB a gA72 PIN12

Figure 1

MICRO -- The 6502 Journal

tPIN 1

August 1980

Page 49: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 49/82

tach the other end of this wire to the

negative end of capacitor Cl13 onthe main circuit board In the H14

printer. This capacitor is located justto the rear of the high temperature

pot, R195. This completes themodification to the printer. Next, set

the baud rate switches for the RS232

Interface operation. The jumpers are

located at locations J114 to J 115 andJ110 to J109. This configures the H14for RS232 input.

At this point you should have a

working RS232 output port on your

C1 P, a plug that will mate the Cl P

and the plug from the H14 printer.Plug the printer cable into the femaleconnector on the C1 P. Connect your

Monitor and cassette cables and

place the power cables for the printerand the Cl P into the wall outlet. Turn

both units on. Reset the C1 P. Bring

up BASIC. Type in a BASIC program

line such as, 10 PRINT" THIS IS ATEST OF THE C1P AND THE H14

PRINTER." Place the H14 ON·L1NE.

Place the C1 P in the SAVE mode.When you hit a carriage return the

H14 printer should respond with the

word SAVE followed by OK. Next,type RUN followed by a carraige

return. The H14 should respond withthe message that was entered as

your BASIC program line. If all went

well, you now have working systemusing the Ohio Scientific Challenger

C1P and the Heath H14 printer usingthe RS232 port on the C1 P .

General System Description

The RS232 output port on the C1 Pservices the H14 Printer in the same

manner as the Cassette port ser-vices the cassette recorder. That is,

when the user wishes to save a pro-

gram on tape the key word SAVEfollowed by a carraige return and

then the keyword LIST and carraigereturn. The program of interest will

be listed out and written on tape.

With the RS232 port and the H14

printer connected and On-Line the

program will be written on paper fora hard copy record.

If the user wants either a hard

copy or a tape, it is a simple method.

Either use the cassette recorder fortapes or the printer for the hardcopy. The H14 can be used in the

RUN mode of a BASIC program. This

is accompl'ished by placing the H14On-Line and the C1P in the SAVE

mode. When you run the BASIC pro-

August 1980

f6C+s,.

LIST1 R EM BASIC HEX M EM ORY DUMP FOR HEATH 14 LINE PRINTER

2 REM BY W. L. TAYLOR 5/1/79

3 GOSUB 100e... GOSUB 20005 POKE 1L43=POKE 12.156 X"'USR(X)7 POkE 11.26=POKE 12.15

8 X=USR(X)10 GOSUB 220014 PRINT" BASIC HEX MEMORY DUMP FOR HEATH H14 PRINTER"1':5 PRINT; PR I NT; PRINT

20 POKE 11.0e=POKE 12.1525 REM SET START AND END ADDRESSES

38 INPUT "START ADDRESS"JS40 INPUT "END ADDRESS"JE45 C=047 POKE 3894.S50 5=5*256: E!:E*2.5654 POKE 11.00:POKE 12,1555 X=USR(X)56 POKE 3894.d3

57 X=USROO58 POKE 11.26:POKE 12.15

59 X=USROO: X=USR( X)60 POKE 11.0e=POKE 12.1461 X=USROO62 POKE 11.26;POKE 12,1563 X=USR(X):X"U5R(X)

64 FOR A::::S TO E65 POKE 1l,ee:POKE 12.1568 REM GET HEX CHARACTER70 B=PEEK<A)75 REM LOAD HEX CHARACTER IN BUFFER80 POKE 3894., B

85 REM PRINT HEX CHARACTER90 X=USROO9S REM DO SPACE190 POKE 11,37:POKE 12,15

110 X~U5ROO120 C:'=C+l

125 REM CHECK FOR 16 CHARACTERS127 IF C::::16 THEN ISa130 NEXT A140 END145 R~M DO CARRAGE RETURN AND LINE FEED150 POKE lL26:POKE 12.15151 C=0: X=USROO152 GOTO 130160 ~<=U5R0017e c : : : : e180 (jOTO 130

'399 REM LOAD MACHINE CODE ROUTINE FC\I'l H EX DUMP1000 FOR G=3840 TO 38921010 READ F:POKE G.F

11320 NE>~T G1025 RETURN

103C1 DATA 173.54 ..15.72.74,74,74,74,321040 DATA 12.15,104.41.15,9.481050 DATA 201,58.144,2,1135.6.32.80,14106121DATA 96.169.13.32.80.14,1691070 DATA 10.32.80,14.96,169,32.32.80,141080 DATA 96.216,173,6.234,169.159,141,5,234,96

20100 REM LOAD ACIA OUCH ROUTINE AT 0E5£12002 FOR K=3664 TO 3676

2005 READ 'y':POKE K,V

2007 HEXT K

MICRO -- The 6502 Journal 27:49

Page 50: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 50/82

2131218ETURN2 1 31 (1 DA TA 7 2, 17 3, 13 . . 41 3 ,7 4" .7 421 2 1 2 1 2 1A T A 144. 249,11 2 14. 141, 1,2412 1,962199 REM LOAD MACHINE COOS FOR 16 COLUMt-lS2 2 12 11 2 1OR P~3584 TO 3646221121 READ L:POKE P,L2220 t"E~<:Tp22 25 RETURN2 23 (1 D ATA 1 62 . .: '"3 2. 18 9.1 5 ..1 4,3 2 . .0 .1 4

2 240 DATA 22 4 .. 8. 21 218 ,45 ..6",2 34, 23 4225121 DATA 48 .3 2.3 2 ..9 .. 2 ..2. 50. 32. 3 2 ..12 261 21DATA 32 ..2",52 .. 2.3 2,53,3 2.32 ,54 .. 22 2712 1 DATA 32 ..5 ..2 ..2.56 ..2 .• 2 » 57 . 3 2. ·3 2228~3 DATA 65.!32 ..32 ..66 ..32.!32.t67 ..32_t32

2290 DATA 68_,~32) 32.1 69 ..32., 32~ 7£1)32

01 <

gram on your 91 P, the printer willrespond as does your monitor.Anything that is printed out to theMonitor screen will be printed onthe H14. This is only one form of pro-gram operation that can be perform-

ed with the H14 attached to the C1P.The second' use of the system iswith programs written in BASIC ormachine code to service the printer.Included in this article. is a programwritten in BASIC and machine codethat will allow the user to do one ofthese tasks.

Software For The System

The following program will givethe user of the H14 and the C1Psystem one of the working tools thatwill allow some special printing thatwill be useful and will demonstratethe use of the printer. The programin Listing 1, will let the user of thissystem explore the machine coderoutines that are resident in the C1Pand also can be used to list the Hexcontents of any user programs thatshould be written into the C1P.

The program in listing 1, titled"BASIC Hex Dump For The HeathH14 Printer" was written to be auseful utility program. This programwill allow the user with the C1Pandthe H14 printer to dump any 256byte block of memory out to theprinter.

The program uses many MachineLanguage calls through the USRfunction of BASIC. The BASIC por-tion of the program is used primarilyfor housekeeping. When the pro-gram is running, the user must enterthe starting and ending addressesof the block of memory that are

27:50

desired for printout. This is done atlines 30 and 40. The user must enterpage numbers, such as, 16 etc.These page numbers are multipliedby 256 to arrive at the decimalequivalent that is needed for the

BASIC variables. This is done at line50. After the page numbers havebeen entered along with a carriagereturn, the printer will respond witha carriage return along with a linefeed and a dump of the memoryblock. A general list of the modulesin the program will be given, but adetailed description will not benecessary because each module inthe program is separated by REMstatements. The user may analyzethe program simply by studying eachmodule separately. All the MachineCode routines are loaded into

memory on initialization. TheMachine Code for the routines arestored in DATA statements and areloaded Into memory with the POKEfunction of BASIC. The MachineCode routines are stored at OEOOhex, OE50 hex, and at OFOOhex. Adump of the object code for the

0Ee0

routines is given in Listing 2. This isalso an example run of the formatthat the Hex.Dump Program will pro-duce. A list of the modules for theprogram follows. These modulesare:

Line 1000 Machine code load

routine for main hex dump.

Line 2199 Machine code for columnnumbering.

Line 2000 Machine code load ofACIA OUCH routine.

Line 145 Begin carriage return andline feed.

Line 95 Do space between each Hexcharacters.

Line 125 Check for 16 Hex

characters.

The remainder of the modules canbe found in the main BASIC pro-gram. Remember to set memory sizeto 3580 when bringing up BASIC.

In conclusion, this a.rtlcle hasgiven the reader the needed infor-mation to allow the C1P to operatewith an RS232 output port that canbe used with any printer that hasthis type of input acceptance. In thisarticle the example printer used wasthe Heath H14. This was my choice

for a printer; yours may be one ofsome other manufacture. Keep inmind that there are several printersthat could be used with the RS232output port that is in foi I on the C1P.It would be of advantage to do theneeded parts implementation onyour C1P. This article has been writ-

1 3 1 2 3 4 5 6 7 8 9 A 8 C D E F t

A2 1 2 10E8 BD 1 3F eE 20 512 113E E£1 3 1 3 De F5 60 EA EA

30 2 0 212131 2~ 2 1 2 1, . . . - ,

21 3 20 33 2 0 20 34 2 0 2 0 35. . . .

20 21 3 36 21 3 2 13 37 2 0 20 38 2 0 2 0 39 20 2 0 41 2 0

21 21422£ 1 2 0 43 21 2 12 1 3 44 20 2 12 145 21 3 2£ 1 46 20 F4

E8 CF 0 8 FB 5A E·.. .CE OA CB 48 DB 42 CF 0 3 FB E8:>

48 AD 1 3 1 . 1 Fe 4A 4R 913 F9 68 80 01 FO 60 OF F5 848 5 94 E5 92 94 84 F4 8C E7 9b 5C 33 96 9D F6 01 2 1D8 98 91 3 Cf j ge F4 C£1 0 8 Fe F4 08 F4 4A 913 F8 ceFF 75 Fe Fe B0 78 FO 75 F4 E5 '35

...,..-DF 54 02 1 3 1 2 1'b

FD 7D 73 FB F3 53 73 ()3 E8 7[) 7121F7 58 51 F3 FlFD 05 78 7A DB OE 03 FA FA 18 F2 52 5F 1 3 7A D3F6 DO 77 77 76 0 1 07 35 D7 CE D6 F7 Fl 40 3 3 899D "38 78 1 8. F5 F6 03 DR 58 F8 91 FF FO 55 5C 8 809 5C CA Cl CB 4A OR 88 48 C2 EB D3 59 D9 08 FA18 70 08 78 FC 4A C2 DB D9 4';:'8 DB 09 E9 F8 CCCO 55 D6 86 92 8 7 99 DE D7 DC 9';' D4 D6 8 7 F5 01

MICRO -- The 8502 Journal August 1980

Page 51: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 51/82

ten to help simplify this task. Also,

with the software provided in this ar-

ticle, to be specific, the hex dump

program will work with any printer

that can be used with the C1P. Ihope that you can use this lnforrna-tion and have learned with me.

Parts List C1P RS232 Port

1) Q1 PNP Transistor Radio Shack

276·2023

1)TRW 'JONES' Min. D Femalecon-nectar Number DB 25S

1] Resistor 1K Ohm 1/4 Watt

2 1 Resistor 10K Ohm 1/4 Watt

1 1 Resistor 470 Ohm 1/4 Watt

1 1 Connector Molex Male Number

KKI56

Misc. 6/32 x 1 /4 Screws

Wire, solder, etc.

Il

AD

0FOO

€ I 123 456 7 8 '9 ABC D EFt

AD 36 0F 48 4A 4A 4A 4A 20 etC 0F 68 2'9 elF 139 3 1 2 1

C9 3A 912102 6'9 1 2 162 1 3 5 0 0E 61'3A9 0D 213 50 0E A90R 20 50 0E 613 A9 213 213 50 0E 60 08 AD 136 E R A'9

9F 8D 135 EA 613 34 34 D6 E6 D0 D6 F6 D5 27. F4 76CD 79 F8 F8 FA 5A 98 C9 ID 58 DF FB FB DB F9 C81C F7 86 A4 9139F C4 DA 87 C3 9C 92 94 F5 BE D1DB 68 09 D9 BS FA 7R 00 C9 8B D5 02 F3 BB D8 CA

F5 D5 C7 CC D6 CetE2 DB Et 95 87 F6 F5 93 FO F4F7 F7 96 6E EC DE D0 F7 D2 99 80 D3 95 D3 DF BDF3 70 DB C9 53 74 7B 52 D3 59 D3 FF E0 55 F1 6977 F5 BD 9E 84 D6 85 7E F0 F€JB4 9F 73 E5 Fe 94D7 BE C4 58 EO D3 D7 44 Fe D8 54 7F 75 F5 61 E4F7 Fa 84 913 Fe F8 87 D6 A4 93 C6 56 A7 C6 B5 DC59 4A 58 E8 DR 99 D9 E8 E9 08 8C 71 C9 C5 DB 48DD D8 5C 8C At Fe A8 DO E0 F2 18 D4 5C F4 71 F8

84 90 CA 00 80 0R C9 CC 813 88 DF 00 58 AA 40 C8

Mr. Taylor has been using the OSIsystem computer since 1976 when he

built his first system using OSI bareboards. This system consisted ofthe OSI 400 CPU, 480 Backplaneboard and the 440 video display

board, along with an ASCIIkeyboard. With this system he learn-

ed to program in MachineLanguage.

C1P and software development. He/s continually expanding the

capabilities of the C1P, and mostrecently, he has interfaced theHeath H14 printer and added an in-terface to the OSI48 line buss of hisown design.

He is interested In hardware for the

5[]rTru~PlEFOR

C 5 lVideo Games 1 $15Head- On, Tank Battle, Trap!

Video Games 2 15Gremlin Hunt, Ind'y 5000, GUnfight

Board Games 1 15Cub ic , Mini - Gomok u

Dungeon Chase 10A real- time, D& D , video game

C 1 Shorth.and 12Two key command entry

One tape supports all recent ROM systems.

Color and sound on video games. Someprog rams on disk.

FRE E CAT A LOG

Orion Software Associates

147 Main Street

Ossining, NY 10562

BKM'S NUMERIC KEYPAD - $65

FOR OHIO SCIENTIFIC

ORLEAR SIEGLER'S ADM-3A

FEATURES

Digits 0-9, Decimal Paint, and Return

Terminal Quality Keypad

Ready to use with C4's and C8's

Two Color Beige-Brown Case

Size 7"0 x S"W x 2W'H

Documentation

OPTIONS

Adapter cable kit for

10 minute INSTALLATION - $4.95

SPECIFY

Superboard

C2-4P

WE PAY SHIPPING TO CONTINENTAL U.S.

TEXAS RESIDENTS ADD 5%

ORDER DIRECT OR ASK YOUR 051 DE,ALER

FOREIGN ORDERS ADD 30%ICRO

SYSTEMS ~.CORPORATION ~ ,_ .

3809 OLD COLLEGE ROAD 713/846-8268BRYAN, TEXAS 77801 713/846-3817

C1C2-8P

Page 52: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 52/82

THE TX-80 MATRIX PRINTER

The MP-250 PLOTTER

only $695.FEATURES: Plots on standard paper

sheet compact unit, built-in home func-

tion to l ower l eft-hand corner: needs only 6

bits of One parallel 0utpu\ port; choice of

pen col ors and li ne wi dth s; comes wi th ful l

vecto rsoftware; driven byOne paral le l por tor optional lnterfeces: eaSily changeablepens.

T'RS 80 or APPLE Interfaces A""lIabl".

SPEED: 58LPM, 125 CPSINTERFACES: Paralle l standard IEEE488 and seria l RS·232

optional, (Apple type parallel card and

cable ........•.... &99.)

CHARACTER SET: Full 96 Character ASCII Set (upper andlower case with expanded print).

PRINT HEAD: 100 x 106character life expectancy.G.RAFTRAX OPTION" fu ll dot addressable graphics (480

dots/line) with Automatic print head pro·tection on dense pictures plus form feed

and skip over perforation.

SPEC IFICAnONS:PAPER SIZE, 8'; '' ' xii".or 11" wide continuous.

RESOUmON: .OO5"/step ACCURACY: ±O.5% aD 17" PLOITING SPEED: Up to(1.27mm/step). (43cm) or better. 2.5" (6.35cm) sec.

MICRO MUSIC BOARD for APPLE UHAS 4 VOICES & BC..IILT-INAMPUFIER

SOFTWARE: ULllMA.TETRANSFER ROAD RAlLYE

UNCOPV' • r-\ake A,pple

disks uncopyable 82995HI.RES Driving Game

~"""t &1495

Te. .. . hone Transfer program~= D ~ ' ! m o < l e m &25. FREE! APPLESOFT·WAREfor graphics dump included

·UPDATE EARUER TX·80·s TO GRAPHICS for 899.00

Computer Comer of New Jersey439 Rl 23, Pompton Plains,N.J. 07444

DEAlER INQlJIRJES INVITED Masb",:hor9" £; V i . . O.K.(201) 835·7080PRlCES SUBJECT TO CHI \NOE

1930Fourth Street. San Rafael, CA 94901 (4]5) 454-6500

IICIIIEII2 modes or mstTl.lCoon-hJ,joT 2md iesr.

• 3 quia types-fill·in, mtlltipk cbece, and matdring.l~tudingalternate ~swerS. I o r f i b, i i' qu e st i o n s.

• M l lh i- le ve ll ea om in g re in fo re me nt . W ( ,1 Ie n b y a s.pedalisl inCOi ' I ' ip IUte- rAided btslructMJn (CAl) ,

. . H i gh t y int~acl~, no pl'ogramrning k~dge n e c : : ~ r v .• Good for students, h o r r K ! ' ~Iudy and cone.sponcieoce courses.

9Ovel"i'lli"tefl! and ha m r ad io exams . e tc .

~IJl1l] ' iTWJ]3~~~ bV Bomey SI"""

$39.95 48K/D1SK Applaoh

A powe fl - ul . easy Co u se . a pp oi nt me nt c al en da r.

. . I ~~ ore-tsre, weekly. mo nt ht y, s er n l- an r as al and am'M.ial

memos ,

tWi l l ri!i'ltind you one week . tw o weeKS(l l" i j r r1Oi l1n inacival'Ke

t o p repa re fo r meettngs , make reservauoos, buy bir thday

presents, etc.• Display 01' ptinl any da~"s or ~k·$I1!rt1i:r'KIer.s.

• A "perpetual" t ali en dt n: : h o 'ld s o re f uU veaI I be:gin111ns wi t . ,

~ty motuh. Au t o mal k a ll )l p o st s b i r. tx !a y :! i, e tc , in to ne\IJ

maru hs .

t ~ Inns! major holida~.

• S"WO'" MI. Ha,dw<>re Appk! Clock (oot r eq ul re d )

Calif. ROll. Add 6% Sak. Tox. No COD's, Add $2.00 J< x

Shippirl!l &Handli ng . UN Dteck, Mone:v Order. VISA

orMASTERCARD (add Exp,A Deole, I...,..m... mu.sd.A P P l .. .. E I I IS 1' 1 TM ot Appk!- Computer. I n c _

by Si . BuQge , " ' '' '' '' '' ' of Tnlcgy an d P o " " " Arcode$24. ss 32K/D iok Applooolt OR In'eger

A great hi-ree hmar \ander, just like rbe arcade gamel

.L.andoo:.oposcl<lliing

• Au to .zoom t cr ~~ing she close-up• Player control 01360~cren rot~r ion

• Spec,,",,")o, cresbest AN"ays c-m~nc.J~ _ • ~fOVE your score as ~u Improve!/OUr ski!~

~t~lYij ,j~~l;i~~tjG~D byMh",WeIi>

$24.95 48K/[ );01< Apploool, OR Integer

F in ol !y ... T he Hi .re s B ase bal l t ha t's as g ood es , r . . Apple'

• 8 dii ferMI pin+es. 6 dif ferenl swings

• 3· D eH et;1 O in [ ] ! J ' b.cills

• Playel' comrclled fieldJng and l.n~ng

• V O C i! I I umpire

• ~te electromc score board

• Beaut'lfuI5i.adium in full color

c:.Aristotle:§c54ppleby &of Kamins$34.95 48K1Diok AppIeooh

A ccsnpnered nnor to!" AN Y su~t, at AN{ level.

ALSO AVAD..ABLE: a.ECTRONIC PRICE SHEET (A sales tool for retailers) $100 48K;Disk Applesoft, and BLOODY MURDER (A2·player

knife fighl-rated"W for violence1) $19.95 48K/Disk Integer.

WATCHFOR IT, COMINGS()()N-The Data Base As Good As Your Apple H.

Page 53: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 53/82

Applesoft Floating Point Routines

A discussion of where these important routines are

located, what they do, and an example of their direct

use.

Part of a recent project required

me to write a routine that would

calculate various statistical data

reductions on a series of data

points. The initial result, written in

Applesoft floating paint BASIC,

worked well enough but took a

healthy amount of time to execute.

Upon dclnq some liming ex-

periments, it became apparent thai

a good deal of the time required toperform the task was eaten up by

BASIC overhead-conversion of

types, floating point "FOR-NEXT"

loops, and general [nterperter

related functions.

What I really wanted was to write

all of the routine in machine

language. To do this, there were two

options available. The first was to

write some floating point routines

which maintained the Applesoft five

byte variable format. This proved to

be impracical due to the amount of

memory required for these routines.

The second and much more

memory efficient solution was to

locate the floating point routines

already in my machine in Applesoft.

This proved to be reasonably dif-

ficult for a number of reasons but

after much head-scratching I've

managed to unearth the following

routines. Before using them, its pro-

bably a good idea to familiarize

August 1980

yourself with the format of both the

Applesoft variables and the Ap-

plesoft floating paint accumulators.

The format of Applesoft variables

is a standard five byte floating point

representation, with the highest

order byte containing the exponent

and the lower four bytes containing

a signed mantissa. See page 137 ofthe Applesoft manual for more on

this. The format of the Applesoft ac-

cumulators is a little different. You

will notice from various Applesoft

zero page usage tables that seven

bytes have been allocated for each

of the two floating point ac-

cumulators. The format of these ac-

cumulators is as follows: The

highest order byte contains the ex-

ponent. The next four bytes contain

the negative absolute value of the

mantissa, as represented in Ap-

plesoft variable ~ormat. The sixth

byte contains the origional high-order byte of the mantissa if a value

has just been converted from

variable format to accumulator for-

mat. In any case, this byte is used to

represent the sign of the mantissa.

The seventh and last byte of the ac-

cumulator is a "function" byte used

in arithmetic operations .. It is not in-

itially assigned a value on conver-

sion of a value from variable format-

to a accumulator format.

MICRO -- The ,6502 Journal

R.M. MottolaCyborg Corp.

342 Western Ave.Boston, MA 02135

To use the following floating

point routines is a reasonably

straight-forward process. For the

sake of simplicity, you may find it

easier to forget the accumulator for-

matting of values, and load all

values into the accumulator using

the "FPLOAD" subroutine listed.

This routine performs the conver-

sion while diong the load. You

should also be careful to representall values in normalized form. If youplan to use only values that have

been previously specified by Ap-plesoft, you will not have to do this

as Applesoft normalizes aUvariables

as they are specified. To use your

own values, you may find the ac-

companying util ity program useful.

Another thing to be careful about

is floating paint errors (Division by

zero, Overflow). Since these floating

point routines were not meant to be

used outside of Applesoft, the entry

points to the error handling routinesare in ROM. Unfortunately, the vec-

tors to these routines are cast in

stone (or SiI Icone, anyway) and can-

not be changed. There are two ways

to deal with these errors:

1. Test your routines for "worst

case" operation. If you can make

sure that errors will never ocur,

you've got it made.

2. Applesoft has the ability to vec-

27:53

Page 54: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 54/82

tor errors to a specified Basic linenumber with the ONERR... GOTOSTATEMENT TO DIRECT ERRORSTO A specified line number. On thisline number, you can make a call toyour own machine language errorhandling routines.

The following routines constitutethe major arithmet ic rout ines.available in Applesoft. There are, ofcourse, other tuctlons burled InBasic which have not been lden-tified here. Iwould appreciate hear-Ing from anyone else who has dugInto those mysterious ROMs.

Display Floating Point R.aprese.nta·lion of Vars.

80 :

?O X = 0:[1$ = CHR $ (4 )

100 FOR N = 768 TO 792110 READ A: POKE N,A120 NEXT

130 REM ESTABLISH CONVERSION ROUTINE AT $300

140 DATA

150 DATA

160 DATA

17(1 nATA

180 DATA

165, 1(15,24, It)5,2

164,106,144,1,200

:3:2,24';",2=34, 160,6.185, 157,o. 153-,253, 1.36, 16, 247, ';')6

190 HOME PRINT: F'RINT TAB ( 7)" FLC1ATINGPOINT CONVERSIONS"

F,'RI NT : PR I NT : PR I NT "IN:;:-;TRUC T I cus- "PRINT : PRINT "ENTER VALUE YOU WI:3H

CONVERTED TO FLOATING POINT

REPRESENTATION. IF YOU W ISH TO PR INTTHE COI"NER:3 I ON':: ON THE"

PR IN T "PR IN TER , FO L L OW THE VAU.JE W ITH A ..'P ..-

TO RETURN TO BASIC, HI

Name: FPLOADAddress:SEAF9 zooSymbolic.: M~ FPAC1 210

Loads variable into primary floatingpoint accumulator. Converts toFPAC torrnat. A and Y registers ::20must point at variable In memory(ADL, ADH). Clears SAC.

Name: FPSTAAddress: $EB2Bsvmoouc: FPAC1-> M

Stores value in primary f.loatingpoint accumulator in memory. Con-verts from FPAC format to Ap·

plesoft variable format. X and Yregisters must point at first byte inmemory in wh.ich value is to bestored (ADL, ADH). Clears SAC.

Name: TA1>2Address: $EB63Symbolic: FPAC1

Transfers the value contained In theprimary floating point accumulatorto the secondary floating polnt ac-cumulator. Clears SAC.

Name: FPD!V2Address: $EA60Symbolic: FPAC2/~FPAC1

Divides the value contained in thesecondary floating polnt ac-cumulator by the value pointed at bythe A and Y registers (ADL, ADH)and stores the result in the primaryfloating point accumulator.

27:54

2:30

24(1

T ( HE TURN) t<EY. "

VTAB 14: CALL - 868

INPLIT "ENTER \jALUE: "i A$

IF A$ :;;:: ,'" THEN VTAE; 23: END : HEM~5()

" " =NULL '$

2/~.O IF R: I:H-n~I; U;:J ; i , 1) ~ > . : . _ " P" THEN :~:OO

270 PRINT D':t"'i"F'F:#l"

280 REM PRINTER IN SLor # 1

290 PRINT: PRINT300 X = VAL (A$)' CALL 768310 VTAE: 1:?!: CALL - 9~:':3: PRINT "VALUE"" "X

szo PH INT : PH I I\lT"ACClJi'1UL.ATCFc ~I;";: : : r ; ; o FORN : : ' 7'~:3 TO 7';)';:'

340 A = PEEK [N)' GOSUB 450350 NEXT: PRINT : PRINT:::i.~.(1 F'F<INT "IJAF(!ABLE: $"i

370 B = PEEK (105) + PEEK (1061 * 256 + ~

380 FOR N = B TO B + 4

:39(1 A::;;: PEEl< (N): GO:3UB 450

4(1,) NEXT l:JFdl\lT41(1 PRINT D1;; "PR#O"

4:20 13:::ITO 2:30

430

440 REM DECIMAL TO HEX SUB450 A - A / 16:B = INT (Ai4/··() A = = (A - B) * 1 . ( :.

470 B = B + 4°' IF B > 57 THEN E - E + 74::::0 F ' F ; : IN T CHH':1; ( B ) j

490 A = A + 4::::: IF A ::-- '57 THEI·'.! r . : : ; = A + 7

'= , (10: ) F'R 1NT C:HF':',~i (A)" u

51 (I RET URI'~

MICRO -- The 8502 Journal August 1980

Page 55: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 55/82

Name: TR2>1Address: $EB53Symbolic: FPAC2-+FPAC1

Transfers the value contained in theprimary floating point accumulatorto the secondary floating point ac-cumulator. Clears $AC.

Name: FPSQRAddress: $EEBDSymbolic: FPAC1-+ FPAC1

Returns the positive square root ofthe value contained in the primaryfloating point accumulator in theprimary floating point accumulator.

Name: FPEXPAddress: $EE94Symbolic: FPAC2 M. . , FPAC1

Raises the value contained in thesecondary floating point ac-cumulator to the value pointed at bythe A and Y registers. The result isstored in the primary floating pointaccu muIator.

Name: FPINTAddress: $EC23Symbolic: INT {FPAC1)~FPAC1

Returns the integer value of thevalue contained in the primaryfloating. point accumulator to theprimary floating point accumulator.

Name: FPABSAddress: $EBAFSymbolic: ABS (FPAC1)~ FPAC1

Returns the absolute value of thevalue contained in the primaryfloating point accumulator to theprimary floating point accumulator.

Name: fPADDAddress: $E7BESymbolic: M + FPAC1-,}ooFPAC1

Adds the value of the variablepointed to by the A and Y registers(ADL,.ADH) to the value contained inthe primary floating point ac-cumulator and stores the result inthe promary floating point ac-cumulator.

August 1980

Name: FPADD2Address: $E7AOSymbolic: 0..5 + FPAC1~". FPAC1

Similar to above, but adds the value(0.5)to the primary floating point ac-cumulator.

Name: FPMULAddress: $E97FSymbolic: M*FPAC1~ FPAC1

Multiplies the value pointed at bythe A and Y registers {ADL, ADH} bythe value contained in the primaryfloating point accumulator andstores the result in the primaryfloating point accumulator.

Name: FPSUBAddress: $E7A7Symbolic: M - FPAC1 ~ FPAC1

Subtracts the value contained 'intheprimary floating point accumulatorfrom the value pointed at by the Aand Y registers (ADL, ADH) andstores the result in the primaryfloating paint accumulator.

Name: FPDIVAddress: $EA66Symbolic: M I FPAC1_,. FPAC1

Divides the value pointed to by the Aand Y registers (ADL, ADH) by thevalue contatned in tne primaryfloating point accumulator andstores the result in the primaryfloating point accumulator.

Name: FPSGNAddress: $EB90Symbolic: SGN (FPAC1).+ FPAC1

Returns the sign of the value con-

tained in the primary floating pointaccumulator. A negative value willreturn (-1). A positive value willreturn a (1). A value of zero willreturn a (0).

MICRO -- The ,6502Journal

Name: FPLOGAddress: $E941Symbolic: LOG (FPAC1)-.» FPACl

Returns the natural log of the valueobtained in the primary floatingpoint accumulator to the primaryfloating point accumulator.

Name: COMP2Address: $EB9ESymbolic: TWO'S COMPLEMENTOF FPAC1". FPAC1

Returns the Two's Complement ofthe value contained in the primaryfloating paint accumulator to theprimary floating point accumulator.

Name: INT> FPAddress: $E2F2Symbol ..c: (y,A) ... FPAC1

Converts a two byte integer to itsfloating point equivalent (FPAC for-mat) and stores it in the primaryfloating point accumulator. The in-teger must be represented with: thehigh-order byte stored in the Areg.ister, and the low-order bytestored in the Y register.

Name: FP>INTAddress: $E10CSymbolic: FPAC1-> {$AO,$A1}

Converts the floating point contain-ed in the primary floating point ac-cumulator to a two byte integer,which is stored in the fourth andfifth bytes of the primary floatingpoint accumulator ($AO, 4A1). $AOcontains the high-order byte and$A1 contains the low-order byte.

R.M. Mottola is a member of theSystems Staff at Cyborg Corp., amanutacturer of medical instrumen-tation. He is currently involved inthe design and enhancement atmicrocomputer based physiologicaldata acquisition and processingdevices.

" " " " ~ ~ ~ ~ - - - - ~ ~ ~

27;55

Page 56: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 56/82

Dear Micro,

I read the editorial in the Decembe.r ('79) issue

and saw that it said that the first articles written

by teenagers were coming soon. Well, I wrote 'An

Additional 1 /0 Interface for the PET' (also Dec. '79)

and 1 am 14...

Kevin Erler

Well Kevin, the quality of your article shows how

well the teenagers can do - not only in using

computers but in writing about them. We did not

realize from your article that your were only 14,and we hope to see more works of young writers

appearing in Micro.

To the Editor:

I recently ordered a software cassette from

Cyberdine, and along with my order I mentioned

my difficulty in attaching my recorder to the AIM.

Mr. Clark and Peterson phoned me and gave me

quick and valuable help. They asked me whether I

had the March 1979 AIM Users' Guide. I didn't.

In March '79 I bought the AIM documentation to

see whether I wanted to buy the AIM. In December

'79 I bought the AIM. I then had two December '78

Users' Guides. I completed and sent to Rockwell

the "up-date" postcards at the rear of the books.

Results: I have received nothing at all from

Rockwell.

This is a shame since I understand that there is

much correction and clarification, including a

much better and detailed section on how to hook

up recorders. (Which I don't have!)

I am certain that your readers with the 12 /78

Users' Guides would appreciate your help in get-

ting Rockwell to send them their 3/79 copies - so

that they may hook up their recorders.

Edwin Kooser

Flagtown, NJ

W e would suggest that you first try writing direct-

ly to Rockwell and requesting the specitic up-

dated information. It is sometimes difficult for a

large company to keep on top of all of the

documentation updates, but I am sure that

Rockwell will be happy to oblige.

27:56

Dear Editor,

I would like to encourage your readers to copy

the following letter and send copies to the

manufacturers listed below. If enough of us do

this, we might see a new, low-cost printer on the

market soon.

Thank you,

Bruce ShowalterAbilene, TX

W e don't know if Mr. Showalter's method is the

best, but he expresses a true need. Here, then, is

his letter to manufacturers, and a list of manufac-

turers that he sent along with it. If you agree with

Mr. Showalter, you may want to write to them. W e

do think that many letters would have some im-

pact, but we suggest that you write your own let-

ters, rather than copy this one, and include your

specilications for a printer.

Dear Printer Manufacturer:

As a potential customer, I challenge you to pro-

duce a printer with the following features:

*

Fixed line capacity of at least 72 characters.

Fixed spacing of 10 characters per inch.

At least 83 printable ASCII characters

Maximum print rate of at least 15 CPS

8%-inch forms width capacity

Price less than $326

*

*

*

*

By eliminating such frills as multiple line lengths,

graphics, and high point speeds, I believe that you

can market a printer that doesn't cost more thanthe microcomputer that drives it.

Please think it over; buyers are waiting!

Yours truly

Axiom

5932 San Fernando Road

Glendale, CA 91202

base 2, inc.

Box 3548

Fullerton, CA 92634

Com print Inc.

340 E. Middlefield Rd.Mountain View, CA 94043

Integral Data Systems

14 Tech Circle

Natick, MA 01760

Microtek, Inc.

7844 Convoy Ct.

San Diego, CA 92111

Trendcom

484 Oakmead Pkwy

Sunnyvale, CA 94085

MICRO -- The 6502 Journal Augusl1980

Page 57: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 57/82

Atari Notes

~~~~~~~~~~~~~~~~~~~~~~

Some useful information about the Atari 800, including a

table of the hex values of the keyboard, a discussion of

the string functions, and a demonstration program.

After the initial thrill of owning anew computer has worn off youbegin to notice little details thatweren't apparent at first. Youdiscover little tricks to make pro-gramming easier and little quirksthat make it more difficult. This artl-cle contains some of the lntorrna-tion that I've gathered in the twomonths I've owned my Atarl 800.

Joy sticks are neat. They makewriting games with real time motioneasier and more fun to play. Untor-tunately, you can't assume thatevery computer owner will have thejoysticks your game requires. (TheAtari computes can use three dlt-ferent types of game controllers!) Infact, you shouldn't assume thatyour hypothetical user has anythingmore than a minimum system.

Looking through the Atari BASICbook that comes with the computeryields only disappointment. There isno BASIC function that just pollsthe computer keyboard "on the fly".(Like the Radion Shack INKEY$function.)

Fortunately, there is a way to use

the keyboard for real time control.While looking through a programfrom Sears (!) Idiscovered just whatwas needed. It seems that memorylocation 764 (decimal) contains avalue indicating the last key thatwas pressed. So, by PEEKing thatlocation you can check on what theuser is doing at any time without tor-cing the program to wait with an IN·PUT statement.

There are, however, two thingsyou have to keep in mind when us-

August 1980

ing this PEEK. First, the value inlocation 764 does not change until

another key Is pressed or you pokesome new value into it. Second,notice that I've been saying "value".The number at 764 is not an ASCIIvalue of the key pressed. Table 1contains a list of the values and thecorresponding characters.

So, when you use PEEK(764) in aprogram you have to (1 ) know thevalues of the keys you want to useand (2) be sure to reset location 764after each PEEK. Program 1 is a strn-pie example of using PEEK(764) tocontrol the aiming and firing of a

laser turret.

When you CLOAD or CSAVE aprogram on the Atarl computers aninternal beeper is triggered once ortwice. If you'd like to be able to usethat beeper In your programs aPRINT CHR$(253) does the job. Ihave found it useful to indicate to auser that he's typed somethingwrong. It's easier to use than theSOUND function since you don'thave to turn it off. You can alwaysbe sure that it will be heard as wellsince the SOUND function assumesthat the TV set's volume is turned upto an audible leve!.

Another useful CHR$ number is125. When you execute a PRINTCHR$(125) the screen is cleared. Atfirst thought this seems a lot like ex-ecuting a GRAPHICS 0 command.However, when you are usinggraphics modes other than zeroCHR$(125) clears only the text wln -dow at the bottom of the screen.

MICRO -- The 6502 Journal

William L Coisher

4328 Nutmeg lane, ApI. 111

Lisle, Il 60532

One of the great deficiencies ofAtari BASIC is the shortage of stringfunctions. Most of us are used tothe Microsoft BASIC functions:MID$, RIGHT$, LEFT$, and con-catenation (" + It). Atari BASIC hasnone of these. Fortunately, it doeshave enough to allow a programmerto simulate the string functions pre-sent in, say, TRS·aOBASIC.

Table 2 contains a summary ofthe four string manupulation tunc-

tions mentioned above and theirequivalents in Atari BASIC. Youshould also note that all stringvariables must be DIMed in AtariBASIC. In the examples A$ and B$can be DIMed to whatever your ap-plication requires but T$, a tern-porary storage variable, must beDIMed T$(1)so that it has a length ofone character.

It should be evident from this artl-cle that Atari BASIC is an adequate,if not overwhelming, version of thelanguage. Since the Atari corn-

puters use plug in ROM cartridgesto hold language interpreters it ispossible that Atari will eventually ln -

torduce a more standard version ofBASIC. (At this time the only otherlanguage available is anEditor! Assem bier cartridge.)

Figure 1 has assumed that when us-ing the Atarl versions the variablesA$ and B$ have been DIMED ao -propriately. The variables S, E, and Lin these examples stand for theStart location of the string, and theEnd location, and the Length,respectively. f .!

27:57

Page 58: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 58/82

Table 1

Kel Value Ke:l Value KeI Valuea 63 s 62 < - 54

b 21 t 45 » 55

e 18 u 11 - 14

d 58 v 16 = 15

e 42 1f 46 + 6

f 56 x 22 * 7

g 61 r 43 I 2

h 57 z 23 , 32

1 13 1 31 • 34

j 1 2 30 / 38

k 5 3 26 ESC- 28

1 0 4 24 TAB ; 44

• 37 5 29 BS 52

n 35 6 27 CAP S 60

0 8 7 51 RET- 12

P 108

53 S P A CE 33

q 47 9 48 )Il 39

r 40 0 50SHIFT adds 64 to the key pressed.CTRL adds 128 to the key pressed.Use 255 to reset location 764. (This is the value it haswhen the system is powered up or RUN is typed.)

Figure 1:

Concatenation

Microsoft: A$(LEN(A$)+ 1) = B$

Atarl : A$(LEN(A$) + 1) = B$LEFTS

Microsoft: BS= lEFT$(A$,L)Atari : B$ = A$(1,L)RIGHTS _.

Microsoft: B$ = RIGHTS(A$,l)Atari : S= lEN(A$)-l

BS=AS(S)MIDS

Microsoft: B$ = MIO$(A$,l)Atari : E = S + L

B$=A$(S,E)

Program 1

10 GRAPHICS 7+16

1 5 x = 8 0 I Y = 9 520 GOSUB100030 REM ***LOOK FOR A KEYPRESS

L ! O IF PE'!i'!K(764) 255 THEN GOSU B 4000

50 GOrO 40

1000 REM ***DRAW U SER TURRET1010 COLOR 11020 SETCOLOR 0,8,8

1030 PLOT X,Y1040DRAWTO X+4, Y

1050 DRAWTOX+4,Y-4

1060 DR AVTO X , Y-4

1070 DRAW TO X , Y

1080 PWT X+2,Y-51090 PLOT X+2,Y-6

1100 RETURN

2000 REM ***ERASE U SER TURRET

2010 CO LOR 0

2020 GOSUB 10302040 RETURN

3000 REM***FlRE LASER

3010 CO LOR 2

3020 SETCOLOR 1,3.8

3030 DRAWTO X + 2 , Y - 9 53040 FOR I=l TO 5O.NEXT I

3050 CO LOR 0

3060 PLOTX+2,Y-7

3070 DRAWTO X + 2 , Y - 9 5

3080 RETURN

3100 REM ***MOVE T URRET lEF T

3110 GOSUB 20003120 X=X .. 1

3130 GOSUB 10003140 RmJRN3200 REM***MOVE TURRET RIGHT

3210 GOSUB 2000

3220 X=X+l

3230 GC6UB 1000

324<> RETURN

4000 REM ***HANDIE KEYS

4010 REM*** RIGHT AND LEFT ARRCMS MOYE

4020 REM ***THE TURRET AND THE SPACE

4030 REM ***BAR FIRES THE LASER

4040 IF PEEK(764)=33 THEN GOSUB 3000

4050 IF PEEK(764) = 6 THEN GOSUB 31004060 IF PEEK(764)=7 THEN GOSUB 3200

4070 POKE 764,2554080 RETURN

27:58 MICRO -- The 6502 Journal August 1980

Page 59: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 59/82

Up From The Basements

Hello and welcome to the view of 6502computing

Ohio Scientific style. That isn't meant to exclude6502 enthusiasts who don't own Ohio Scientificequipment, but OSI users haven't had much of a

voice to date. Users of Ohio Scientific machines havelong suffered the 'middle child' syndrome of benign

neglect from the microcomputing media. I know mycustomers and dealers have sometimes felt left out

of the microcomputing hoopla when OhioScientific's name did not show up In articles rnsn-tioning Apple, Radio Shack or Commodore. It can getlonely being the only person on the block with anOSI

machine. Rest assured though, you OSI users are notalone. As a matter of fact, the number of OSI en-

thusiasts has reached a point that independentusers' groups and newsletters seem to be spon-taneously springing up all over the country.Recognizing that trend, and also the fact that OhioScientific is a significant force in 6502-based com-puting, the people at Micro have provided this forum.

One purpose of this column is to get you 'con-nected' with the Ohio Scientific users' community. Ifwe can't get you connected, maybe can inspire youto start your own club. Whatever you are doing,however, we want to hear from you.Within the spacelimitations of this column wewill certainly attempt topublicize every activity of Ohio Scientific users.

If that sort of publicity were the only purpose ofthis column, it would be filling a need, but it wouldnot be very interesting for the 6502 enthusiast ingeneral. That would be unfortunate because OhioScientific has done some truly remarkable thingswith the 6502. I could make the arguement that muchof what Ohio Scientific has done and is doing

represents "state-of-the-art" in 6502-basedhardware.They were the first company to offer a completely

assembled and tested computer. They were the firstcompany to deliver a machine that had BASIC inROM. They were the first and remain one of the fewcompanies delivering a microcomputer with a Win-chester Technology hard disk. All donewith the 6502.They are certainly the only 6502-based computer

manufacturer producing machines to compete withthe Z-aO-basedCP/Mmachines.

Ohio Scientific has grown from a basement opera-tion in Hiram, Ohio to a multi-million dollar company.The story of their growth alone is one of interest to

anyone who experienced the microcomputer revolu-tion. They have accomplished all this with asometimes debilitating, some would say fatal,philosophy that permeates the business side of theiractivities. Reflections of what could be termed a"basement attitude" give Ohio Scientific a unique

by Jeff Beamsley

image or character in the market place. It very wellmay have been this image that caused some of you

to choose other 6502-based systems. It is this blendof innovative hardware and unusual attitude that Ithink should prove interesting reading for any 6502entusiast. The second object of this column, then,

will be to discuss new products and innovativedeslqn coming from Ohio Scientific and how, insome cases, company philosophy shaped thatdeSign.

Another common funcion served by columns such

as this is "bug-fix" and "gotcha" information. I amsure that this column will certainly have its share of

that. But I hope to take a different approach to it. Inmany cases, because of the general nature of Ohio

Scientific hardware, a "buq-flx'' provides an insightinto the function of hardware and/or software andmay provide an opportunity to experiment and im-prove that hardware/software rather than just fix it.

There is also a lesson to be learned from "gotcha's."Because of the philosophy alluded to in the previous

paragraph, many of the gotcha's in Ohio Scientificequipment can bepredicted. Byexamining these pro-

duct short-comings in that light we can learn howthat philosophy works, and hopefully become moreintelligent consumers.

ithink that Ohio Scientific has a lot to offer, not

only in the remarkable hardware that it designs andproduces, but also in its history and the way itchooses to do business. Ihope that future discus-

sions of these items in this column will prove ln-teresting to all 6502 enthusiasts.

Connections

Publications:PEEK (65), Aardvark Journal.

Clubs:OSlO of Ellicott City, MD. Contact: Walace Ken-

dal/.

The Challenger News of Philadelphia, PA.Contact:Don Derosa.

Consumer Computers of La Mesa, CA. Contact:Rick Clardy.ARISTO-Craft of New York, NY. Contact: David

Gillette.Portland Computer Society of Portland, OR. Con-

tact: Roger Giles.

Please Direct all comments, suggestions, questions,

etc. to me, Jeff Beamsley, at Tek Aids Industries,Inc., 44 University Drive, Arlington Heights, IL 60004.

August 1980 MICRO -- The 8502 Journal 27:59

Page 60: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 60/82

P ET and AP PLE II U sers

PASCALABACUS So ftware makes a va ila b le its ve rs io n o f T INY PASCAL f or

the users of tw o of the most popu lar personal compu ters.

T INY P AS C AL is a sub set of th e standard P AS CAL a s defined b yJensen and W irth. It includes the structured programming

f ea tu res : IF -THEN-E LSE , REPEAT -UNT IL , FOR TO /DOWN TO ·DO,WH ILE-DO, CASE ·O f-E L SE , f U NC a nd PROC . Now yo u c an lea rn th e

language th at is slated to b ecom e th e successor to BAS IC .

T INY P AS C AL is a com plete pack age th at allow s you to create,com pile and execute progam s w ritten in th e P AS CAL language.

Y ou can sa ve S ou rce an d ob ject cod e on disk ette or cass ette (P ET

v er sio n o nly) . C ompre hen sive u ser 's man ua l in clu ded . T h e man ua l

can b e exam ined for $ 10 (refundab le w ith softw are order).

REQUIREMENTS

PET 16K/32K New ROM S cassette $40PET 16K/32K New ROM S d iskette $35

Apple" 32 K Applesoft R OM w lD O S $ 3 5Apple" 48K Applesoft RAM w /OOS $35

T INY PASCAL User's M anual $10

6502 I nterpreter L isting $20

F REE postage in U .S . and C ANADAAll orders prepaid or C OD

I . . = . 1

49510

ressivemputing

OHIO SCIENTIFIC

Hardware: C1P VIDEO· gives true 32 or 64 chrlline with

guard bands. This is not a make-shift mod. It makes your

Video every bit as good as the 4P's plus you have switch

selectable 1,2 and 3 MHz CPU clock as well as 300, 600

and 1200 ba,ud for cassette and serial port-all crystal

controlled. Send for our $1.00 catalog for more details.

COMPLETE PLANS ....•.... $18.95KIT $39.95

or send your 600 board to:

Rick Lotoczky

3281 Countryside Circle

Pontiac Twp, MI 48057

and he will install the video mod for just $79.95.

OTHER mods available: Add sound:RS·232 port,

cassette motor control, cassette interface plans. (300,

600 and 1200 baud)

SOFTWARE: (with documentation) for C1, C2, 4P and 8P.Chess 1.9, Backgammon, Excellent Card Games, Arcade

type games, Utility Programs, Mini Word Processor,

Memory Maps, Editing Cursor, etc.

Catalog with free program (hard copy) and Memory Map

for BASIC in ROM Models .....................•.. $1.00

We now accept VISA.

Progressive Computing

3336 Avondale Court

Windsor, Ontario, Canada N9E 1X6(519) 969-2500

Note: Any modification will VOID your OSI warranty.

HAS YOUR APPLE READ ANY GOODPROGRAMS LATELY?

APPLE II DISK SOFTWAREDATA BASE MANAGERIFO PROGRAMThe IFO (INFORMATION FILE ORGANIZER)can be used for many ap-

ptlcat Ions such as sales actlvl Iy, check registers, balance sheets,client/patient records, laboratory data reduction, perscription lnforrna-

tion, grade records, mailirlg lists, AIR,job costing and much more. Thiscan be accomplished easily and quickly without prior programming

knowledge.Up to 1000records with a maximum of 20 headers (catagories) and 10

report formats (userdefined) canbestored ona single diskette, informa-

tion can be sorted on any header, both ascending and descending Inalpha/numeric field. Mathematical functions can beperformed onany 2fields to manipulate the information. Information can be searched on

any header using >, <, '" >,;= <,;=, and first letter. Mailing list formatprovided. Fast assembly language sort, search and read routines. Many

error protection devices provided. Put your application programtogether in minutes Instead of hours.PHOGRAM DISKETTE and instruction manual....$100.00MAILING LIST PROGRAM and instructionmanual...$40.00INVENTORY PROGRAM2 disk drives, rnenu-driven program. Inventory categories include:

STOCKII, DESCRIPTION,VENDOR 10, CLASS, LOCATION, REORDER

PT.,REORDERQTY,QTYON HAND.All records can beentered, cnanq-

ed, updated, deleted, or viewed. Reports can be sorted in ascen-ding/decendlng order by any category. There are 7 search reports (3

automatic). Calculates $VALUEof inventory and YTD,MTD,and perioditems sold, Accumulates inventory over a l3-month period. Plus much

more. Requires a 132·column, serial/parallel printer, Complete turnkey

operation with bootstrap diskette.Programdiskette and instruction manual...$140.00PAYROLL PACKAGE2 disk drives, rnenu-drtvenprogram. Employee history include: NAME,

ADDRESS II, ADDRESS 112CITY, STATE, ZIP, FED EX, STATE EX.,SOCIAL SEC.#,DATE EMPLOYED, DEPT II, CODE, EMPLOYEE II,

STATUS,MARITAL STATUS, PAY RATE, OT RATE, VAC RATE, II VACHRS. and PENSION PLAN. Program can generate weekly or biweekly

payroll. Prints W·2,QTR REPORT,PAY CHECKS, MASTERAND CUR·RENT files. FEDERAL and STATEwitholding taxes are built Into pro-

gram. Maintains aCASHDISBURSEMENTjournal, Accumulates payrollfor a 53 week period. Generates numerous type of payroll reports.

Allows data to be searched, sorted and edited. Prints DEDUCTIONregister and more. Maintain up to 125 EMPLOYEES/EXPENSESfor

quick and easy PAYROLL Numerous error protection devices provided.PROGRAMdiskette and instruction manual...$240.00

'PLEASE SPECIFYSTATEWHENORDERING

APARTMENT MANAGER2 disk drive, menudriven programwritten in assembly language and Ap·

PLESOFTII. All you will ever need to manage your apartment. Handlesup to 6 BUILDINGS with a maximum of 120units each. Complete turn-

key operation. Data categories include APT #, TYPE,TENANT NAME,PETS,CHILDREN, SECURITYDEP., PETDEPOSIT, POOL DEP, MISC

DEP, RENTALLOWANCES, DATE MOVED IN, VACANCY DATE, REF·FERAL, CONDITION OF APT, DAMAGE AMT and COMMENT LINE.

Search, sort, enter, edit and vacate tenates. Maintains a MTD and YTDrent recipts as well as complete utiIity reports, rent.lost byvacancies.

Maintains ex~ensesbvacated tenants report and much more.PROGRAM ISKETTE and INSTRUCTIONMANUAL. ..$325.00PROFESSIONAL TIME AND BILLING2 disk drive program written Inassembly language and APPLESOFT II.

Completely rnenu-drtven,Maintain all billing of clients and personnel.

Generates and invoices. Numerous reports based on all types ofcriteria. Easy data entry for RATES, CLIENTS, and MATIERS. Has

SEARCH, SORT, CHANGE (on screen editing), VIEW and BALANCEFORWARD. IF your are a JOB CONTRACTOR,ATIORNEY, ACCOUN·

TANT, GENERAL CONSULTANT, or anyone that needs to charge fortime, this program is a must. Complete turnkey operation. Numerous

REPORTSareproduced to aid in theTIMEANALYSIS PROCESS.All thisand much more.

PROGRAMDISKETIE and INSTRUCTIONMANUAL..$325.00SPEED READINGPROGRAM DISKETTE AND INSTRUCTIONMANUAL....$200.00ALL PROGRAMSREQUIRE48K and APPLESOFT liON ROMORANDAPPLE II PLUS. ALL SOFTWARE IS COMPATABLE WITH PASCAL

SYSTEMS.PROGRAMSRUN FROM ANY PORTOF THE COMPUTERWITH SERIAUPARALLEL PRINTERS. REQUIRES 1 DISK DRIVE

UNLESSOTHERWISENOTED.SENDCHECK/MONEYORDERor C.O.D.To:SOFTWARE TECHNOLOGY for COMPUTERSP_OBOX 428

BELMONT, MA 02178ORAVAILABLE FROMYOURLOCALDEALER.

Page 61: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 61/82

Son of Screen Print

This is a 'mlnl-word processor' which overcomes some

of the inherent idiosyncrasies of the Pet Printers.. . . . . . . . . . . . . . . . . . . . . ~~ . . . . . . . . . . . . . . .

The Commodore Company pro-

duces many fine pieces of equIp-

rnent. Unfortunately, as theirbusiness grew the design

philosophy changed. Thus laterpieces of equipment like the Com-

modore Printer were desi gnedslightly differently with respect to

the Original Commodore PET Com-

puter.

While these changes are not

disastrous with respect to equip-ment compatibility, they produceproblems for software designers to

mate the equipment.

Here are some examples of this

imcompatibility:

1. To produce Letters on thePrinter from the screencharacters you have to offset

the screen ASCII values.2. To produce lowercase on the

printer your have to send aspecial character every line, vs.a single poke on the Pet Com-

puter.3. To produce REVERSE

characters on the printer youhave to send a special character

to the printer; the PET uses asingle key,in this case RVSON.

4. To send SHIFTEDCharacters tothe printer you haveanother off-

August 1980

set to change the screen ASCIIto printer ASCII.

None of these is very much of a

problem in itself but when you try toproduce a simple screen print pro-gram for the PETPRINTERyou have

to factor all of these idiosyncrasies

into the program.

When I first got the Pet Printer Ineeded a simple program to pro-

duce listings using ONLY lettersand numbers. The resultant program(MICRO 22:13) did just that and had

the advantage of being usable forother printer like the AXIOM or

Selectric typewriters, or any other

printer that uses ASCII.

Now this new version is more

specialized and tailored just for thePETPRINTERS.Thus it is longer, to

get the printer to reproduce the en-tire PET graphics and lowercase

character set. This program is reallya mini·word processor in that you

can get a "letter" on the screen cor-rect it with the cursor and then send

it to the printer. The same can bedone with pictures etc.

I have tried to document the pro-gram well so you can study it and

learn from the approach. It is similar

to the previous program but the ad-dresses were changed for the new

MICRO-- The6502Journal

Kenneth Finn

Little Old FarmBedford, NY_10506

ROM set and the character conver-sions are more specialized.

To use the program use SYS 826.If you want to reproduce the entirescreen change $036E to $19. Then, if

you are in a BASICprogram you can

have the printer reproduce thescreen with a simple sys command.

The program fits into the second

cassette buffer and will remainthrough many new program load-ings. You can even load it after a

BASIC program to use when youneed it.

Kenneth Finn has a a .s Degree in

Electrical Engineering and aBusiness Degree in Organization

Behavior. His interest in computingstarted when he had to analyze

employee attitude survey data from

his consulting clients, His pet is stillused for this purpose but is also us-ed extensively in word processing

and he is completing an interfacewith an IBM Selectric Type 735. He

also has a business venture trainingmanagers in the use of micro com-

puters for analysis models ofbusiness plans, using the PETcom-

puter exclusively because of its sim-

ple, one piece type of operation.

~~~~~~~~~"~-

27:61

Page 62: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 62/82

e:t3:3A0:3:3(:~j3:3F

£1:3420345

0347~3349~:~:4C034E~3:3510~:54~:1:3S6(1359tt35B.:13511t1~:60~:1:36:3

~:1:36503670368€136D

~~n71~337:3(1376t1:~;78

037B~337E

A9 0(1

:3D 65 02:3D FE (13

8D FF ~j3

85 DR

A9 018D HE ~Z1(1

A9 048D 51 (12

8Il 5B (12

A2 042~3 Be F7A9 B f 1

85 DB2~3(:6 .3:3A ll FF ~:t:3C9 28

D~:l 17EE FE t3 JAD FE ~~C3

C9 15F(1 4AA S ! ~3[1

8D FF 1 : : , 1 : 3

A9 orr2 t1 :32 F220 C6 03

~3:~:7F Fl2 fi~3~33:31 Al DR~~f:;::3~;:C:9 2003:35 9f1 iB~33:::7 C9 4(1~ 3 : : : : : 3 9 9£1 1 D~338B C9 6£1

~338D 9~:1 1712i3 :3F C9 Ea : 1

~3391. 9~3 1:;:0393 85 DC0395 A9 12"~1:397 2(1 :32 F2ff39A A5 DC

~339C(139D

f1:39F(1:3A~:1

(1:: : :A2

£OA4

69 4(1

1 t: 1 1 2 0 2

(GA6 69 80~~f3A8 2t1 :~!2F2€ 13RE AS ! 92iJ3AD 2~3 :32 F2~:1~::!B~36 : t i l : '

27:62

L D A8T A8T A'3TFt' : ;TA

LItA8THLDAS TR'::TAL m . : :.J~;~:L I l AS TAJSr;!:

LIlACl'lP

: t : r · i EI!'~C,-DR

c r 1 Pt :EG!

LD.HS T HLIlAJS~:

SEC

Old PET Hexadecimal addresses

#$~:10$ 026~$. 0:3FE$ 03f'F$ DR

#$~:t1'$ f10RE#$~34

$ 0251:f. G25:E~#$~34$ F?E:C#$80:;; DB$ ~2i :3C6$ 0:~:FF

$ 037E$ ~:13FE"f 03FE#$15

f 1 : 1 3 : 8 3

#·f00~ : t : esr=#$0D$ f:2:3-2

~_D>:: *i·$ti~3! j)A < $I1A..: > : ; )C : ! ' 1 F I ~r$2~;Bee :f f CA2C;P"!p ~r$4f1

Bee " f. 03A:3CdP ~l$6~]

Bee :;. ~j:3A6Ci"'iP :i~$8~3Bee $ 0:3F!6' : ;T8 :.f DC!_IIH ~i-:$12

I _ I f f ! " :$ DC

src~,~E:C:

· ': ~ E C :

BC:~=~RDeI : F - L

:f . (;:3,::3

iU4f1$ !}3AE;

LIlA #$92J\:;r;~ :r F2:32I f ' ! C : .~ D R

$0256

$0262

$0242$024C

$FFC9

$F230

$F230

$F230

$F230

Pet Printer Secondary Address = 0Line CounterCharacters per line counterLo-Byte Index

GP1B File length = 1

Logical File Number FourDevice Number Four

Open 4,4,0

Hi-Byte Index

Test for PET Lowercase Mode

40 Characters per tine constant

21 Lines per screen constant(End Program return to basic)

Carriage Return Chr$(13)Print#4Test for Pet Lowercase Mode

Get Next Character via indirect ad-

dressIs it a letter? then add 64

Is it a Number? then add 0

Is it shifted Ietter then add 128

Is it shifted number then add 128

Temporary StoragePet Printer Reverse On Chr$(18)Print #4Re-LoadTemporary

Subtract 128 for reverse characters

(Unconditional Branch)

Offset for letters

Offset for shifted charactersPrint #4Turn off Per Printer Rvs. chr$(146)

Print #4Index Lo-byte

MICRO __ The 6502 Journal August 1980

Page 63: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 63/82

(13B2 110 02 I:t'~E :$ [f3B6

0:3B4 E6 D E ; I!'!C $ DB Index Hi-byte

03B6 EE 1=- 03 Ii '~C $: (r3FF Increment character counter,r

esss l E . 1 A5 t:~'L :f . [1:360 Return for next character' .1._ _

~13BB A S ! ~ 1D : _ 1 I A #$~~mASCII Carriage Return

, z r3BD 20 .-'.'-, 1='- ' T'- 'D .$ F232 $F230 Print #4-; . , . : : ; . . . . : : . • . :> . - .

£13C(1 A S ! [14 ~)H#$04

03C2 2[1 6E F2 J S F i : '$ F26E $FFCC Close 4

( 13C5 60 !~:TS Return to basic

03C6 A D 4(; E : a LilA $ £:34C Pet Graphics shift on Port

0 :3C9 '::,j~ t12 A t · m *r$(12Get bit 2

- - Test for lowercasefr3CB C9 1 2 1 2 Cl' lP tt$02£13C11 D~3 05 Bt·£ $ [r3114

0:3CF A S ! 11 ~.DA ~i'$11 Pet Printer Lowercase Chr$(17)(1 ;3Dl 2~.3 :3 2 F'-' J : : : ; k : :f . 1=') ' - " : : '. : : . . ~..:. . . . $F230 Print #4

03D4 6 1 . 3 ! - : ~ T ~ = ; Return

P R O G R E S S I Y E S O F I W A R EAPPLS II PROGRAMS

Apple Menu Cook b ook $19.95Touc h T~ping Tutor $19.95Single Driv e COPS $24.95Sales Forec as t $14.95Otility Pak I $14.95

Utility Pak II $19.95Curve Fit 514.95Missile-Anti-NUssile $14.95Sclitaire $14.95Financial Pak II $14.95Water the Flow-ers"(Ed.I) $19.~5Catc h the Pig (Ed.I!) $14.~5Polar Coord . Plot $14.95Financial Pak II $14.95Nailing List Program $19.95FILES (Po st/Hn $4.95) $49.95ROSTER. (Post/Hn $4.95) $49.95Light Pen (Pos t/Hn $3.) $24.95to order: Send Check or M.O.PO Box 273, Ply.Mtg., PA 19462Postage & H~ndling $1.25PA re~idents add 6~ Sales Tax

DEALER INQUIRIES INVITED

[M J O © f f i l@ © [ } { ] ~@@

for the AIM

AIM MlcroChess with Player's and Programmer's Manualcomplete Source listings, Object on Cassette Tape. '$15.00 plus shipping 1$1.00USI$2.oo Anywhere Eisel

MICRO Software, P.O. Box 6502, Chelmsford, MA 01824

August 1980 MICRO -- The 6502 Journal 27:63

Page 64: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 64/82

KIM Basic users: upgradeto full-featrd Basic withrenumb, append, improvededitor, file system suppor-

ting PET-like file com-mand-s & more. Incl oasstt,manuaJ sample progs,compl source list Manypractical applica to KIMBasic. Send $43. for packgor SASE for 3 pg cprnpldssor,

Sean McKenna64 ~airview Av.Piedmont, CA 94610

PET MACHINE LANGUAGE

GUIDE: Oemprettenstvemanual to aid mach. lan,9.progrmmr. More than 30routnafully,detailed: readercan put to lmrned. use, ForNew or Old ROMS. $6.95plus .75 p&h. VISA/Master-charge accptd.

Abacus SoftwareP.O. Box 7211Grand Rapids, MI49510

British Apple

Owners/Dealers!Write now to MGA for ex-tensive list of speeiarisedsoftware and hardware foryour Apple or 2020. We Pr0-mise y,Qu'lI be surprised!!

Michael GurrAssociates-140 High StreetTenterden, KentTN306HT, England

The Creativity Ufe DynamicPackage: (Apple II Plus.

46K, $19.95:dfsk) PackageincJudes disk, 2 specialdrawing cards and 88 pageProgram Manual> Dl'iawanything:circles, people,ellipses, fireworks, squares,etc, at touch of a key! Writemusic using Apple aspiano. Write poetry. Saveand retrieve all. Trulycreativity disk! Order from:

Avant-Garde CreationsP.O. Box: 30161,Eu' ne OR 97403

Classified AdsNEW AIM/SYM/KIM Totallyprogrammable (inCludingbaud rate) RS-232Interface:$84.95 ASM, $69.95 kit.

Fobel Enterprises552 E. EI Moradoontario, Canada 91764

(714) 984-8871

C1P or Super:board Autoline Number' and Trace: nomore typing linenumbers-trace displays.BASIC line number beingexecuted and wm stop altereach command If you wantit to. Tape & instructions

$6.50.J DeHoffR.R . Number 1Texico, IL 62889

SYM-1 boks by Robt. A PeckMonitor Theory Manual $8.Hardware Theory Manual$6.SYM/KIM Appendix to FirstBOOK of Kim $4 .25Send SASE for details

DatapathP.O. Box 2231Sunnyvale, CA 94087

OSI Software-Don't just

watch Star Trek, PLAY itwith VIDEOTREK, the fastaction €Jraphics version ofStar Trek. KI j ngons,Phasers, Torpedos, BlackHol e-s & DoernadayMachine! $8.95. Write forlist of others.

Bob Retelle2005WhittakerYpsllante, MI 48196

ATTENTION 051 C1P/SBIIdWNERSl'Tha Manual' is acomprehensive users;guide. UnderstandingBASIC, using graphics,hardware, mods, interfaces,utilities, some programs.AU for $9.50.

JOSSoftware2334 Antigua Ct.Reston, VA 22091

AIM 65 Newsletter-hard-ware and Software, Utilitiesas well as Applleatlons.Keep up to date in the AIM65 world. Target is publish-ed bimonthly. Six issues$6.00 in US & CAN ($12.elsewhere)

Targetc/o Donald ClemRR Number 2Spencerville, OH 45887

TRACER' ($11.95) and otherprograms available. Plioneor write:

Quality Saftware

3194 Osptka P lPrince George. BC'Canada V2N·2TS.(p04) 563-9839

FOR SALE: ASR-33 TTYPrinter, keyboard, tapereader & punch, with &tand,82 columns. Connectsdirectly to the AIM-65 IfO.Simple interface availablefor the AppJe & othermicros. Excellent condltlon,usually $61;)0plus. Will sell

for $250. You pick' up. Call:Don(714)776-6384California

* * *'Progr;ammer Fatigue???SYM - BugtMonex adds 15commands to SYM'srepetolr, including an in-teractive trace/debug.Cassette @ $200 of $3800,$15.95. 2716 (5V) $ P O O O -

$FJiFF, $·39.95.Commented,

source listing $9.95. I

Custom Assembly add$2.00. SASE for more infor-mation.J. Holtzman6620 Delmar, 203S t. Louis, MO 63130(314)863-5209

Page 65: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 65/82

Business Dollars and Sense in Applesoft

" " " " " ~ " ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' " ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 'If you ever Intend to do serious business programming

in BASIC, then the Information and programs presented

here are invaluable. They show how to overcome the

Inherent rounding and formatting problems of BASIC in

dealing with dollar and cents type of data.

""""""''''''''''~'''''''''~'''~"''''''''

If you purchased an Apple II Plus

for business applications, that is,applications that require the use of

financial tables and calculations,then you may have encountered arounding problem In executing yourprograms. Perhaps you have failedto recognize this problem, and arerunning programs which contain er-roneous mathematical calcula-tions! The purpose of this article isto acquaint you with the potentialfor rounding errors, and to suggestseveral possible solutions, depen-ding on your needs. In addition, theprocess of creating textfiles, withsome examples, will be addressed,since you will probably wish to use

the subroutines discussed later inmany programs which you write.

To start, let's demonstrate theproblem. Try the following program:

PRINT 100.09 + 200.00 + .80(rtn)

(Note that where (rtn) is indicated, itmeans to press the key markedRETURN.)Your Apple should display:

300.89

Now type this program:

PRINT300.89- 100.09 - 200.00 - .80(rtn)

The answer (which you'll agreeshould be zero)will appear as:

1.19907782E-08

This small error occurs becausenot all numbers between zero and

August 1960

one can be exactly represented inbinary arithemetic. Oddly enough,for most scientific work, such aner-

ror is Insignificant, and will not af-fect the outcome of any programs.It is unltkely, however, that anyusable system can be inplementedin a business or financial situationunless absolute accuracy is obtain-ed in recording and tabulatingmonetary amounts. When you pro-gram such an application -whether it be the family checkbook,or a complicated inventory controlsystem - the ability to balance tothe penny is a must!

There is, fortunately, a

straightforward answer to the pro-blem. While it is easy to discuss, itrequires a bit of trickery to Imple-ment. I f all values are carried withinthe computer as whole (integer)numbers, then there is no possibilityof having roundng errors. Thesacrifice you make,of course, Isthenecessity of performing all internalmathematical calculations in wholenumbers, which requires that you,the programmer, remember wherethe decimal point belongs. 8asical-Iy, therefore, by multiplying eachmonetary value by 100, and taking

the INTeger value of the resultantfigure, the problem is Solved. Thisopens up additional problems, aswe shall see.

Type in the following program:10DEFFN VL(X) = INT(X· 100)20 INPUT "ENTER NUMBER:"; K30 K = FN VL(K)40 PRINT "NUMBER ISNOW: ";K50GOTO20

RUN

MICRO -- The 6502 Journal

Barton M Bauers, Jr.30 Hillock Dr.

Wallingford, CT.06492

Try some of the following ex-amples:

1.00(rtn)

The computer will respond with -

100

Now try this one:

-2.99(rtn)

The Apple answers with

-300

OOPS! Try this one now-

300.89

Your answer:

30088

Clearly, the use of integer valuesdoes not in itself solve the problem.The samerounding error which plag-ed the initial examples is containedin the integer value. The library func-tion INT supplies the .....largest in-teger less than or equal to the givenargument..." (quoted from the Ap-plesoft II manual). In the negative

direction, the rounding error willcause the integer value to onenumber smaller (further negative)than the argument whenever thereis a rounding error: in the positivedirection the integer is similarlysmaller when the computer under-rounds.

Referring back to the exampleused at the beginning of this article,It Is easy to see that the value of the

27:65

Page 66: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 66/82

rounding error is extremely small,something like .00000001. Using theinteger approach to eliminate therounding problems, then, requiresconsideration for his small error.Weare not concerned with valuessmaller than the second decimalplace (pennies) in about 98% ofbusiness applications, therefore it

is possible to add enough"cushion" to the integer conversionroutine such that the smaH errorwhich creeps in will never cause theApplesoft command INTto fall shortduring conversion.

To illustrate this process, typeCTRL C (rtn) and rekey line 10 asfollows;

10 DEF FN VL(X} = INT«X +.0001) * 100)

RUN(rtn)

Now try entering the previous ex-amples.

Number Entered1.00-2.99300.89

Value Returned100-29930089

This function works for bothpositive and negative numbers,because the 'adder' of .0001 isenough to offset any internal under-rounding, both in a positive and anegative direction. Therefore, in anyproblem involving money calcula-

tions, you should add the followingto your program:

15 DEF FN VL(X) = INT «X + .0001)• 100) .

aaa INPUT"ENTERAMOUNT";C

bbb C = FNVL(C)

Line 15 defines the function;

Line aaa requires keyboard entryof an amount which will be storedas variable C internally (you willnaturally use what ever variablenameyou need here);

Line bbb converts'C to an integervalue, using the previously definedfunction, and 'pads' the value readin before conversion to prevent

underrounding.

27:66

Remember - all internalmathematics must now be perform-edwith whole numbers.

It would seemthat bymultiplyingthe Integer number to a decimalnumber similar to the one originallytyped in. Try It!

Type the following -

PRINT30089* .01 (rtn)

Your answer:

300.89

A natural question at this pointwould be, "How do I print out thefigures so that they once again looklike dollars and cents?" This Is parttwo of our story.

* * * t f I 5 K * * *15 L ft Hi I.lO-:) = n.lT « X + .lmD > I; 100)

l : a : lO R 8 ~ 5 L m l J T H £ tffi( : R E I ' ! ffID1Jff I S Z Z S : r-;DI RESP fK ) E I S > M

1 : 8 1 0 r r , , : : : L 8 ~ < l Z $ )

1~ XU$ :: "$.:~ :: •• :X \'$ :: " . "

lil30 ~2$:: RlOOf (Zl$,2)

1 ~ ~ ~ M % G O T O 1 5 0 6 8 , 1 5 a 7 0 , 1 5 1 O B , 1 5 1 9 B , 1 5 1 9 0 , 1 5 1 0 B , 1 5 1 8 B J 1 5 1 0 0 , 1 5 1 8 0

1 m P R I t - I T · r n ;g , ; : r n 1 1 M J J f L L E " : G O T O 1 5 1 2 e

1~ >:2$ = "e " t ) : 2 S : GOTO lS118

I~ IF lEFTS (22$,1) :: "_. 9)TO 15898

1~ GOTO 15110

!~ XZ.$ :: "e " + R IOO$ GQ t,l ): )¢ \t = " _ " : G:lTO 1 5 1 H ~1 5 1 0 0 1~·;:.i:: I.ffii ( Z Z S , ( I 'r - : - 2 »

1 5 ! 1 3 : ",\1 $ : : X U $ ' + )¢!j + > : \ ' $ + ) Q S

Listing 1

* * * C F fA 1 E 8 < I C F IL E * * *

6 3 9 9 9 D$ = a-Rt ( 4 ) : I l f U T "/>R[ (f T E X T F I L E I S - • ;fJI$: P R I K T D$; u l J l E I . I U

;IB: PR It-IT [)$; "limE • ;Im: L IST 1,63998: F fJK T 0$

; " C 1 .O S E "iFfI$: D E l . 6 3 9 9 9 , 6 3 9 9 ' 3

ListIng 2

* * * O£Q( P R O T E C T * * *

1 m ~ 9.H!UTllf : C l - E a < P R O T E C T F9t f f i G . I ' E H T I S Z 2 S : R B 1 F.rSP(}r5E I S M15510 IF LEFTS (22$., D = "_ . GO lO lCf6 0

1 5 5 2 8 M % = lE N QZ$)

1m X!)$ "$":X V$ :: •• "

15548 >2$ = RIG ITS (22$, 2)

1 5 5 J 0 O H ~ m rn 1 5 5 7 9 , 1 5 6 0 0 , 1 5 5 0 0 , 1 5 S S 0 , 1 5 5 8 8 , 1 S 5 0 0 , 1 ~ , 1 5 : . 9 0 , 1 5 S 8 a

1m P R I N T u~ a~l ~ I .H ..L E ·:X IL I $ . " : a n n 1 5 6 6 8

1 5 5 7 0 >Q! = " 1 3 " + > : 2 $ : snn 1 5 6 0 0

1m X Y ,t = LEFTS ( Z Z $ , ( 1 1 % - 2))15590 G OT O 1 ~620

1);00 : - . - : u t t = X ' . J f + X V $ + >2 $

l~lB GOTO 1 5633

1~2e ~ _ I I $ = ~ IS + )¢'.$ + X ' t ' t + ):2$

1~ ;,:n = ·~f:.1:*II..."+=+*t#'******·:B = 38 - lDI <XW )

1 : : £ - 4 0 : : 1 5 $ = R IG lT t (~ :i$,B )

1 ~~ ) < ' l l $ = >S $ + > : l J $

1~ t 5 b 0 : ~fll.J:N

U.flng 3

MICRO -- The 6502 Journal August 1980

Page 67: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 67/82

Try some additional values.

Value-299·100180

Value * .01-2.99-1

1.8

Again, the result is unacceptablefor business applications. Again it

is clear that Applesoft BASIC,which

handles scientific applications sowell, Is not equipped to yield usableformatting in dollars and cents. Theauthor in fact, has seen commercialsoftware which ignores this pro-blem, and gives answers with thesame errors demonstratedthroughout the article. While someprogrammers might not considerthe rounding problem serious, howcan a businessman issue a checkfor $1.87

The answer to the problem ofrestoring two decimal places to the

internally generated integer valuesis a program which is namedsubroutine MASK. This programshould be typed and saved, con-verted to a textfile, and exec'd intoevery business application whereaccurate dollars and cents calcula-tions are required. Listing 1 showsthe program steps for MASK.Type itand save it under the name DOLLARMASK (it is assumed that you haveat least one disk drive). After it isSAVEd, you are ready to make atextfile out of DOLLARMASK.To dothis, if you have not already created

a utility program for rnaklnq text-files, there is another short programwhich must be typed, SAVEd, andmade into a textfile. Prior to that ex-ercise, however, let's look at thecontents of the program MASK.

Line 15 is the value conversionfunction described earlier.

Line 15010 establishes thenumber of digits in the variable.

Line 15030 takes the right twocharacters (cents) and puts them in

string variable XZ$. Note howeverthat line 15060puts a zero ahead ofthe value stored in XZ$ if XZ$ con-tains only one digit. Une 15090removes a minus sign if it becameembedded in XZ$, and replaces itwith a zero, moving the minus signto the left of the decimal point inXX$.

Line 15040 branches dependingonwhether the input string ZZ$ has1,2,or 3-9digits.

August 1980

Line 15100 puts all except thecents value (which is now stored inZZ$) into the 'dollars' area, XX$ .

To test this program, load it fromthe disk, and add the following addi-tional lines:

20 INPUT "ENTER NUMBER: ";CA30 CA = FN VL(CA)

40ZZ$= STR$(CA)50GOSUB1500060 CA$ = XW$70PRINT" THE ANSWERIS : ";CA$80 END

Now type RUN and try somevalues which might be represen-tative of a business application. Trysome positive and negative values,so you can demonstrate thatDOLLARMASK really works.

After you tlave become familiarwith the logic, it is easy to add other

capabilities to the DOLLAR MASK.For example, if you want to removethe floating dollar sign from the pro-gram, delete the first part of line15020,anddrop XV$from line 15110.Another example is shown in Listing3, a routine for adding check protec-ti.n9 characters (*) to the left of themasked number. The asumption inthis subroutine is for a field of 30digits, but you can easily increaseor reduce it at your leisure.

To put the finishing touches onyour program, it will be necessary to

convert DOLLARMASK into a text-tiIe. Then, it can be added to anyprogram you write by typing EXECMASK. If you are not comfortablewith the EXECportion of the AppleDOS manual, then the programlisted in Listing 2 will do the jobeasily. To use this program, followthese steps:

1.Type the program in listing 2TWICE, once with line number 10,and once with line number 63999.When typing it under line number10, change the LIST reference toLIST63999.

2.TypeRUN.

3. The computer will ask NAMEOF TEXTFILE - , to which youshould respond CREATEEXECFILE(rtn). When the disk stops, you willhave created a textfile namedCREATEEXECFILE. LOCK it, sinceit will permit you to set up standardsubroutines as text files in thefuture.

MICRO -- The 6502 Journal

Now you are ready to makeDOLLARMASK into a textfile. If youhave already typed it and SAVEd itto disk under the name DOLLARMASK, LOAD it into memory, andfollow the steps below:

1.Type EXECCREATEEXECFILE

2.Type RUN63999

3. Type Answer the inquiry withMASK (rtn)

4. You now have subroutineMASK stored on disk for future use.

Below is a summary on how to gelMASK into your future business pro-grams:

1.When writing a program do notuse line numbers 15 or 15000 to15120.

2. Insert the disk with MASKon itand type EXECMASK.

3. You now have the subroutineand the function in your program

4. Each time your program re-quires a value from the keyboardsuch as, for example, CA, add thefollowing line after you read thevalue in:

CA = FN VL(CA)

5. If you have occasion to outputmoney data to the screen or to aprinter, add the lines:

ZZ$ = STR$(CA)GOSUB15000CA$ =XW$PRINTCA$

6. You now have a string variableCA$ to display the value previouslystored in CA as a whole number.

7.Remember - the argument touse before you GOSUB15000is ZZ$,

and the return argument is XW$

P .

Barton M. Bauers is the ExecutiveVice President of LFE Corporation,

Fluids Control Division. His pro-gramming background includes For-

tran, PL-/, and Basic. Mr. Bauersholds a Master of Science Degree inIndustrial Engineering with a con-centration in Operations Research.

27:67

Page 68: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 68/82

BCD Input To A 6502 Microprocessor

Many laboratory devices output data to displays InBinary Coded Decimal (BCD) format Some techniquesare presented for interfacing such devices to 6502 basedsystems,and a BASIC conversion program is provided.

In most scientific and medical

laboratories there is a proliferation

of analytical instrumentation and

equipment. In past years these in-struments have used D.C. analog

signals tor transmission of their

data to strip chart recorders. With

the development of resident

microprocessor chlps in newer in-

struments, on-board analog to

digital converters (ADC) have

become very popular. This innova-

tion allows the use of digital panel

meters (DPM) for readouts and lor

'BCD (Binary Coded Decimal) output

Typically, four panel meters are us-

edfor displaying the results from

the analytical instrument so that

values in the range -9999 to + 9999(the leftmost meter has a ± sign)

can be detected. The obvious advan-

tages of these developments are

readability and the capability of

recording data with remote dig.ital

printers or plotters. The BCD lines

used in these applications can easi-

ly be tapped to permit transferring

data to a microprocessor and, in

many cases, the newer instruments

are supplied with a BCD output con-

nector.

The sixteen input lines of a 6522

VIA are ideally suited for transrnls-sian of parallel BCD (Binary Coded

Decimal) information into a

microproceser such as the SYM-1 or

AIM-65. In our laboratory we have

several analytical instruments with

BCD output and are applying this

technique for data collection and

concentration. The hardware con-

nections are relatively easy requir-

ing only minimal proficiency with a

soldering iron. Programming was

27:68

also simple since BASIC can be

used as the programming language

throughout.

Our initial application was to col-

lect data from the BCD output con-

nector of a Beckman U.V.-Vis_ spec-

trophotometer (Model 25-7). This is

equipped with seven spectrophoto-

metric cells which can be sequen-

tially placed In the. light path of the

instrument. As light passes through

the cell, it is absorbed by the com-

pound of interest. since the sbsor-bance by a compound in a solution

is proportional to its concentration,

this technique is useful for quan-

tltive analysis. The absorbance of

the solutions In each cell is shownon the digital panel meters of the in-

strument as each cell is positioned

in the light path oflhe instrument.

This digital information is

simultaneously made available on

the pins of the BCD output connec-

tor. During the course of our ex-

periments, the solutions in the cells

are constantly changing and the abo

sorbance values, determined by the

instrument, can be transmitted to

the microprocessor and stored in

RAM.

The data is arranged on the BCD

output connector of the instrument

so that each digit is represented by

four bits. In a four digit connector

these digits are the Units (U), Tens(T) , Hundreds (H) and Thousands (K).

The total picture for the BCD con-nector is:

Pori A U(I) U(2) U(4) U(8) T(1) T(2) T(4)

T(8)

Pori B H(I) H(2) H(4) H(8) K(I) K(2) K(4)

K(8)

MICRO -- The 6502 Journal

Richard SolteroClba-Gelgy Corp.556 Morris Ave.Summit, NJ. 07901

Each of these 16 ltnes can be hard

wired to one of the Input pins of

Ports A and B of the 6522 VIA, l.e.

U(1) "" Port A, Bit 0; U(2) = Port A, Bit1; H(1) = Po rt B, Bit 0; H(2)= Port B,

Bit 1, ect. On the A connector of the

SYM·l, PB6 is used for a keyboard

function, however,aH 16 pins are

available from the user supplied VIA

on the AA connector.(AIi 16 lines on

the A connector of an AIM-65 are

avallable),

The values that appear at these

ports are PEEl-Cd into memory using

a BASIC program. As will be shown

in the sample progaram, the (2.4-7.0

VDC) voltages appearing on the VIA

pins are the BCD representation ofwhat is displayed on the digita.l

panal meters of the instrument. If

the Hex keyboard and display on the

SYM·l are used to look at this data,

it will be identical to the digital

panel meters. If the AA connector is

used, memory locations$A801' will

contain the low order digits and

$A800 will contain the high order

digits_

When the values are PEEK'd into

BASIC, all hex numbers are con-

verted into decimal numbers, and

memory locations $A800 and$A801become locations designated as

43008 and 43009, respectively. The

BCD data also becomes a decimal

representation after a conversion

from hex idecimal. It becomes

necesary at this paint to convert the

BCD data back to its original value

since it is already decimalized when

it appears on the input pins of the

VIA.

The conversion of each pair of

August 1980

Page 69: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 69/82

high and low order digits is done insubroutine 500. Initially the data isPEEK'd in and it is assigned to aBASIC variable. The variable is car-ried to the subroutine where the hex-adecimal representation of the data

in converted to binary digits by atypical algorithm. In step 560, thebinary digits are translated Into the

decimal number and this value isreturned to the main line program.

The low order digits are done firstand then the high order digits. Whenthey have been returned, the highorder digits are multiplied by 100and added to the low order digits;the BCD number is now in itsoriginal representation. This valueis stored in anarray for calculations

later In the program.

The BCD Input data from the In-strument is always on the VIA pins

and changes as the digital panelmeters change. Since it is imprac-tical to collect data constantly, amethod was devised to select the re-quired data. The instrument sendsout a 28 VDC signal which is drop-ped to ground each time a new cellis broug.ht into posit.ionfor an absor-bance reading. This voltage is step-ped down to 5 VCO Signal which isdropped to ground each time a newcell is brought into position for anabsorbance reading. This voltage isstepped down to 5 VCD using an op-

tical coupler and is connected to thepin from Port A, Bit 0 on the A con-nector.{ln BASIC, Port A is at loca-tion 40961).When a cell Is changed,

this bit stays low for about UJiseconds. The BASIC program staysin a.loop which PEEKs in the valueof the Input register A (IRA) eachtime through the loop (Program

steps 50to 100).When the 28VOCisdropped to ground, a a appears inBit 0 of this register, and the pro-gram break out of the loop and issent into a 2 second delaysubroutine.

This gives the digital panelmeters a chance to stablize beforethe program returns and Peeks inthe BCDvalues that are representedon the OPM's.

An external push button is con-nected between Port A, Bit 1 and theground of the microprocessor.

When this button is pushed, the cir-cuit Is completed and BIT1 is forcedto zero. The program will PEEK inthe values of ;the IRA until itchanges. As seen above,when Bit 0goes to 0, the program goes into adata collection routine. Forcing Bit1to zero Is an external method of ln-dicating to the processor that theexperimental and data collectionhas finished.

The data collected in this experi-ment has been formatted Into a two

dimensional array, (7x 30).Thereareseven cells In the Instrument andthese can be read up to 30 times.The SYM-1 in this set up Is a 4K ver-sion and restricts us to this data ar-ray slz.e.There is an editing sectionin subroutine 600where data can.becorrected if this Is necesary. Aftersome input of instructions at step

300, a simple ratio calculation Isdone for each data point and theresultant percentages are printed.These final steps are a demonstra-tion of how data can be treated by aprogram, although many otherpossibilities exsist such as havingthis data stored permanently ontape cassettes or having it transmit-ted directly to a larger main framecomputer which can handle the dataIn much greater detail and can out-put formal reports of the experimentand the data.

This experiment and the data col-lection is a relatively simple applica-tion of the potential of themicroprocessor. The BCD datatransmission does away with thenecessity of dealing with analogsignals which would require the useof an A to D convertor, and the useof BASIC greatly simplifies the pro-gramming tasks. it is hoped thatthis procedure will pave the way forthe efficient and practical solutionof future Instrumental and data col-lection problems.

p .

_.-._._.- . .-._._._._._._._._._._._._.-Continued from page 15.

In the world of microcomputing,There is one fact, not worth disputing.When Micro is read,It goes to your head,And your programs begin executing.

D . Duckworth

Las Vegas, NV

There you have the ten best entries of the 1980

Micro Limerick Contest. We agree that it is tough

to narrow the best down to one, but please don't

delay in voting for your favorite. We hope for even

more votes than limerick entries.

Once again, we thank all who entered the con-test, and we wish all of the "best ten" the very

best of luck.commuter tutored her suitor

To program her microcomputer.

He eloped with the terminal

And her Micro journal

Because the tutor's computer was cuter.

H.I. Mathis

Southfield, MI

August 1980

Send your vote for the best limerick to:

MICRO -. The 6502 Journal

MICRO Limerick VoteBox 6502

Chelmsford, MA 01824

27:69

Page 70: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 70/82

10 PRINT'BCD INPUT PROGRAM (25-7)'20 DIM L$(8),L(7,30),B(8),R(6)

30 PRINT'INPUT EXPERIMENT .':INPUT L$:PRINT40 PRINT"EXPERIMENT • ';L$;TAB(30);"ABSORBANCE'50 REM INPUT SECTION APAO=DATA READY, APA1=END OF RUN BEG55 PRINT"CEll • 1 2 3 4 5 6 7'57 PRINT:CYCLE =11PRINT'CYCLE .'

60 FOR N=l TO 7lGOSUB 650lREM DELAY 2 SECS70 IF PEEK(40961)=254 THEN 200lREM WAIT FOR CELL CHANGE

80 IF PEEK(40961)(254 THEN 300lREM END OF RUN SIGNAL90 GO TO 70:REM CONTINUE LOOPING UNTIL A BIT IS CLEARED100 GaSUB 650:REM DELAY 2 SECS200 REM PEEK DATA IN, CONVERT TO DECIMAL, STORE IN ARRAY

210 Z=PEEK(43009>:GOSUB 500:REM LSD TO DECIMAL220 lSD=Z:Z=PEEK(43008):GOSUB 500:REM MSD TO DECIMAL225 L(N,CYCLE)=(LSD+Z*100)*100240 NEXT N245 C=CYClE250 REM PRINTDATA FROM CURRENT CYCLE260 PRINTC;TAB(1S);L(1,C)iL(2,C)iL(3,C);L(4,C);L(5,C);L(6,C);L(7,C)270 CYCLE=CYCLE+1280 GO TO 60:REM RETURN TO INPUT lOOP

290 REM300 REM END OF RUN DETECTED310 PRINT'E~PERIMENT tOilS;' COMPlETED':PRINT'NEED CORRECTIONS TO DATA?

320 INPUT Y$:IF-Y$="Y' THENGOSUB 600:REM GO TO EDITING SUBROUTINE325 K=l:REM DATA CALCULATION SECTION33·0PRINT'ENTER END OF RUN AND RAPID STIR CYCLE t'S':INPUT ER,RS335 PRINT:PRINT:PRINT"EXPERIHENT .'ilS;" CALCULATED Z RELEASED'340 K=K+l:REM CYCLE COUNTER

345 PRINT'CYCLE I • iK.· .'

350 FOR N=1 TO 6 .360 IF l(N,RS)-L(N,l)(~~.THEN R(N)=O370 IF L(N,RS)-l(N,l)(=O:THEN 390

380 R(N)=)l(N,K)-L(N,1»/(L(N,RS)-L(N,l»*100390 NEXT N400 PRINT'CYClE I

410 IF K<ER THEN 340

420 GO TO 700485 PRINTN;TAB(13);R(1);TAB(22);R(2);TAB(31);R(3);486 PRINT TAB(40);R(4);TAB(49);R(S);TAB(58);R(6)

500 REM PEEKED DATA TO BINARY TO DECIMAL510 FOR 0=1 TO e:B(D)=O:NEXT D520 FOR D=1 TO 8:X=Z/2:Y=X AND 32767

530 IF X>Y THEN B(D)=1540 IF Y=O THEN 560

550 Z=Y:NEXT D560 Z=B(1)+B(2)*2tB(3)*4+B(4'*8t(10*(B(5)+B(6)*2+B(7)*4+B(8)*8»570 RETURN580 REM

1 2 3 5

600 REM EDITING SUBROUNTINE610 PRINT'ENTER CEll I, CYCLE I, DATAG:INPUT E,F,G620 l(E,F)=G:PRINT-ANY MORE?":INPUT Y.

630 IF Y$=·Y· THEN 610640 RETURN650 FOR COUNT=1 TO 750:REM DELAY 2 SEC

660 NEXT COUNT670 RETUnN700 ENfl

Page 71: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 71/82

The MICRO Software Catalog: XXIII

Software announcements for the 6502 based systems~~~~~~~~~~~~~~~~~~

Name:System:Memory:Lang.uage:Hardware:

Death RunApple II, IT T 2 .02 08KApple SoUApple II

Fast moving real time version oflast few mins of Starwars. Can youpilot your x-wing. along and then intothe canyon while skil lfully avoidingTIE's firing laser bolts? And willyour BOMB be shot before droppinginto the exhaust and destroying theDeath Star?

Copies: Just releasedPrice: Listing $6.00

Cassette $7_00Author: Stephen OwensAvailable: Stephen Owens

19Wadeson Way Croft

Warrington, CheshireEngland

Name:System:Memory:

Super ArtilleryApple II16K ROM Applesoft.or 48K RAM ApplesoftApple II, Disk IIardware:

Fast version of Artillery. It playswith two players, keeps score,sound effects, and other options.You and your opponent will batUe itout by shooting at each other byentering angle and velocity of yourmissile while compensating for themountain terrain and wind factor.Mountain profiles and missile tra-jectories are plotted in HI-RESgraphics.

Copies:Price:Author:Available:

Just released$2.0.00Greg Stein.RainyCity Software4360 SW ParkviewPortland, Oregon97.225

Augusl1980

Name:System:Memory:

Commodity FileApple II, Apple II Plus32K , Applesott ROM48K, Applesoft RAMApplesoft IIDisk II, 132 eotumn .

printer (optional)

Language:Hardware:

Descrlptlon: Stores and retrieves vir-tually every commodity traded on allFuture's exchanges. A sel t-prompting program allowing theuser to enter shortllong contracts.Computes gross and net pro-fits/losses, and maintains a runningcash balance. Takes into accountany amending of cash balancessuch as new deposits orwithdrawals from the account. In-stantaneous readouts (CRT orprinter) of contracts on file, cash

balances, P/L statement. Includescolor bar graphs depictingcumulative and individual transae-tions. Also includes routine to pro-ofread contracts before fHing.

Price:Terms:Includes:

$19.95 plus $2.00 p&hCheck or money orderDiskette, documenta-tionMind Machine, Inc.31 Woodhollow LaneHuntington, New York11743

Available:

~ ~ ~ - - - - - - - - - - ~ame: iBaudet Printer Driver

'RoutineAppl.e II16K

Assembly

System:Memory:Language:

Descri.ption: Less than Y 2 K .

Handles all special characters. Useto drive inexpensive teletype suchas model 15, 19, 28, etc.

Copies: NewPrice: $1.00

M .IC R O -- T he 6 502 Joum al

Author:Available:

Mike RoweP _O _ Box 6 502

Chelmsford, MA 01824

A.B_,BuscagliaA.B. Buscaglia2497 W . River .RoadGrand Island, N.Y.14072

Name:

System:Memory:Language:

Amateur Radio OscarOrbital PredictionsApple II18K

Applesoft II

Description: Oscar 7 and 8. Listsdata for each orbltfor desired day.Displays antenna beam, azimuthand elevation data for specified qth.Can be used with Baudot Driverroutine.

Copies:.Price:

Author:Available:

New$1.00

A.B. BuscagUaA.B. Buscaglia2497 W. River RoadGrand Island, N.Y.14072

Name:

System:Memory:Language:Hardware:

The RelaUonship LifeDynamicApple II48KApplesoft, MachineApple II Plus, Disk II

Description: Now you can use your

computer to help make your rela-tionships work. The disk includes anelevator which you control as youmake choices about challenges inrelationships. Includes animationand a special game called .Relatopo-Iy! Now you can circumvent tripslike est and Ufespring, save money,and experience transformation inyour relationships using this pro-gram at your convenience. The se-cond disk in our Lif.eDynamiC Series(of 11 disks). Send for Information.

27:11

Page 72: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 72/82

Ma~y$15.95Disk, instructionsAvant-Garde Crea-tionsP.O. BoxDept.MCCEugene, OR 97403

~~,~~~~~~~~~~~~Name: CHAT (Challenger Ter-

minal)OSIChallenger 1PandSuperboard II4 kMachine code, BasicModem and RS·232modification

Caples:Price:Includes:Available:

30161

System:

Memory:Language:Hardware:

Description: An Intelligent terminalwith the ability to directly transmitdata from cassette and transferreceived data to cassette via an in-ternal buffer. This bufferautomatically expands on systems

with more than 4k to allow moredata storage at a single time.Full/half duplex modes; selectableparity and stop bits. Chat has a veryunique feature - 46 user definable6-state keys capable of generatinga" ASCII characters. StandardASCII keyboard layout. All keychanges are stored when CHAT issaved on tape. Also, the keyboardhas the auto-repeat feature and abreak key.

$24.95Cassette, manual

Charles A. ShartslsCharles A. Shartsis9308Cherry Hill RoadCollege Park, MD20740

~~~~~~~~~~~~~Name: FlexlpaySystem: Apple IIMemory: 48K ROM, RAM Ap·

plesoftLanguage: ApplesoftHardware: Apple II, Disk II, Ser.al

interface printer

Price:Includes:

Author:Available:

Description: A versatile payroll

system. Payroll masterfiles for anynumber of companies may becreated, edited and fully rnalntaln-ed. Processes weekly, monthly,salaried, hourly, commissions, etc.Automatic group insurance deduc-tions plus two other auto deducts(credit union, etc.) 01 your choice. Alltaxes computed. Pay and nonpayadjustments (advances, etc.). Out-put includes masterfi Ie, payrollsummary with current, WTD and

YTD data for each employee, corn-pany totals. Labor summary, taxsummary. Formatted checks andstubs available. MANY MOREFEATURES!

Price: $75.00 Disk plus 12.00handling T X residents'add 5 percent sales

tax. Sample output$3.00ppd.

Includes: System disk, Instruc-tions

Author: S. Prater, CPAAvailable: INOATA INC.

8222 Antoine, Suite

103Houston, TX77088

~~~~~~~~~~~~~~~~Name: Tiny PascalSystem: Pet 16KJ32K,Apple II

w/DOSMemory: Pet·16K/32K New

ROMS,Apple 32K A.S.

ROM48K A.S. RAMLanguage: Basic and AssemblyHardware: Pet cassette or disk,

Apple II disk only

Description: Complete package tocreate, compile and execute pro-grams that are written in the TINYPASCAL language. Includes lineeditor for source program main-tainance; Compiler to translatesource to P-codeand Interpreter forexecution.

Copies:

Price:

Just released

cassette version$40.00, diskette ver·sion $35.00Arnie Lee, NormDraperABACUSSoftwareP.O.Box 7211Grand Rapids, MI49510

Author:

Available:

Name:System:

Solt·SonlcApple II (or Plus ex-cept for speech pro-gram)

32k

SSAssemblyHome eontrel, timing·ApplesoltHome control, speech·IntegerHome control, speech. heuristics speechlab, Ultra sonictransducer and cable(Included with pro-grams) Disk highlyrecommended

Memory:

Language:

Hardware:

Description: A collection of pro-grams to provide for home controlusing a BSR or Sears ultrasoniccommand console. SS is arelocatable machine languagesubroutine that produces all thecodes, tones, and delays required tocommunicate with the BSR. Homecontrol, Speech provides for verbal

control of up to ten lights and ap-pliances with vocabularies for two.persons automatically saved andexchanged from disk. Internal sott-ware clock; allows for several hun-dred NAMED sequences. Muchmore.

Price: $39.95 plus $2.00 s&hGA residents add 4percent sales tax.

Includes: SS, Home Control(Speech), Home Con-trol (Timing), SS-Relocator, all on disk

(tape by request) andthe ultra-sonictransducer completewith cable.

Author: John BlankenshipAvailable: B.A.C.E.

P.O.Box52785Atlanta, Ga 30355

~~~~~~~~,~~~~-Name: Data Factory 2.2System: Apple 1 or 2 disk

Drives, or Hard Disk(Corvus.Lobo) optional

printerMemory: 48k RAM, ROM card,

Language CardLanguage: Applesoft

Description: A data base file pro-gram of unique utility. It allows the

user to create a file consisting ofdesired catagories (columns orfields) in which various sorting andprinting procedures can be ac-complished. The program can becopied and lists for user modifica-tion. It uses either one or two diskdrives and operates with or withouta printer. A unique feature of thisprogram is it's construct append

features that allows the user toreformat and structure the filenames, locations, lengths, andorder after data has been entered.Many features!

Price: $100.00(Hard disk ver-sion slightly more)

Includes: Disk, program andmanual

Author: WIlliam PassauerAvailable: Andent Inc.

1000North AvenueWaukegan, IL 60085

Page 73: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 73/82

Name:System.:Memory:

PBASIC·DSAp.ple II321< ROM, 48K Ap·plesoftApplesoftDisk

Language:Hardware:

Description: A preprocessor for ln-teger and Applesoft programs. Pro-grams are written using a mixture of

BASIC statements and pseudo-statements that facilitate the t r n -plementation of structured logic.Nine pseudo-statements are sup-ported, including IF....ELSE...ENDIF,...ENDWHILE..JTERATE...U NTILandtwo forms of the case structure. AllBASIC statements also be used.Over a dozen commands are includ-ed in the system. The translationroutine not only produces a BASICversion of the program but also liststhe structured program withautomatic indention.

Copies: Just releasedPrice: $35.00 (Texas

residents add 5%sales tax)

Includes: System,Sample pro-gram on diskette.Documentation.

Author: Robert f. ZantAvailable: Decision Systems

P.O..Box 13006Denton, TX76203

L.I.S.A.Apple IIV1.SC: 48kV2.0: 64k

MachineApple II, Disk II,Language card (V2.0)other options also

Description: lazer Systems' Interac-tive Symbolic assembler is interac-tive assembler. Syntax checking isperformed at edit time resulting inimmediate feedback for all syntaxand addressing. mode errors. Incor-porates several special featuressuch as the ability to store data ininverted or blinking mode, built-indisk operations, etc. Tokenizas thetextfile so that less memory is re-quired to hold a textfile in memory.V1.5C has room for 2,000 ltnes, V2.0has room for 3,000. More can begiven from the disk drive.

Name:System:Memory:

Language:Hardware:

Copies:Price:

Just releasedV1.SC $34.95V2.0 $49.95

A u g u s t 1 9 8 0

includes: Diskette wfsoftware,documentationmanual (100pgs)

Author: Randall Hyde/LazerSystems

Available: Programma Interna-tional, Inc.3400 Wilshire BlvdLA., CA 90010

~"""~""~Name: Interactive StatisticsSystem: Apple II Plus, or Apple

IIwith Applesoft firm·ware Board48K RAMApple Integer BASICTV set and RFModulator or VideoMonitor, Apple diskdrive, Optional prtnterand Interface board

Memory:Language:Hardware:

Description: An analysis packagedesigned for teachers andbusinessmen who do not have ac-cess to a large computer. The entiresystem is interactive, and itsfeatures include menu promptingand data stored In user-namedvariables. Available statisticalroutines range from the simple tothe complex. Results can bedisplayed or printed in either colurn-narformat, or plotted as histogramsor slrnple X-Y graphs.

Price: $149.00Available: Serendipity Systems

225 Elmira Road

Ithaca, N.Y. 14850Name: Advanced

Mathematlca.1RoutinesApple II plus or AppleII w/Applesoft Firm·ware Board.48K RAMApple Integer BasicTV set and RFmodulator or Videomonitor

System:

Memory:language:Hardware:

Description: Designed for use by

professionals in the areas ofresearch, business, and operationsmanagement. It consists of a set ofmathematical tools which provideanswers to a variety of commoncomplex numerical problems inrelatively short periods of time. Thepackage includes routines for linearregress lon, matrl x operation s,numerical calcul us, dlfferentfalequations, and optimization. In ad-ditlon, a routine is provided for the

MICRO -- The 6SO.2Joumal

plotting of equations. Data sets,which are automatically stored onthe diskette, can be recalled on de-mand.

Price: $149.00Available: Serendipity Systems

225 Elmira RoadIthaca, N.Y. 14850

,~~~"""~'"Name:System:

Memory:Language:Hardware:

Bowling AlleyOSI C·1PSuperboard II4KupBasicStandard

Description: Full graphics bowlinggame. Draws land and score sheet.Fast action and fun. Have manyother programs for sale or trade.Send list of your programs.

Copies:

Price:Author:Available:

Just released

$7.95Miles HuffordM. Hufford6715 E. DoubletreeScottsdale, Arizona85253

~"~~,~~"~~,Name: Musical Computer

One and TwoApple II32KI.nteger Basic

System:Memory:language:

Description: A two-programcassette tape which explains the

fundamental of music - Includingmusical symbols and language,note reading on both the treble andbass clefs, telling time, note valuesand rests, piano keyboard, dynamicand tempo markings, signs andsymbols and enough PRACTICE andTESTING opportunities for both thebeg.inning and advanced student.Written by a M.A. educator with over20 years of music experience. Thisis truly an alternative to musiceducation, accompanied with color-fu I musl cal descri ptions andmusical SOunds.

Copies: ManyPrice: $34.95, $1.00s&h (MI

residents add 4 per-cent sales tax.)

Author: Myra MarshallAvailable: Computer Applica-

tions TomorrowP.O.Box 605Birmingham, MI 48012

27:73.

Page 74: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 74/82

A T L A S T

E N H A N C E T H E F U L L C A P A B I L I T I E S O F Y O U R D I S K I I

SOFTOUCH ANOUNCES THE

" DIS C M ANAGEM ENT S YS TEM "

E IG II T P RO GR A MS ON DISK T O PROVIDE T HE U SER II IT H A

COMnS T E U NDE ltS TA NDfN G O F rus DISK D RIV E COM MA NDS

P LllS A U TIL ITY PACKAGE 1'0 IN DEX A ND C AT AG OR IZE ALL

PROGRAMS WRITIEN fO R THo A PPL E II OOMPUTJ ; . R . THE

S YS TS M P ROV IDES FU LL SEA RC H • E DIT IN G AN D DATAT RA N SH R C A PA B LL rT U :S .

I>. TWeNTY-S IX PAGE BOOKLET PROV IDES DETA nEO •

EDUCATIONAL TECtlNIQIJES GIVING A T H R OUG H U f >l DE R S T AND -

ING OF A LL DOS COf'W lNOS.

INCLUDED ARE S UC H TECHNIQUES AS :

• IN IT IAL iZAT ION OF TEXT F lI.ES

• WR ITING fi READING OF TEX T FIL ES

• C REAT ING TEXT F I cE S

• EDI T ING P I L ES

• T RA NSFE RR IN G DA TA T O O IHE R DISKETTES

• L IST ING OF DATA F l LES• SEA RCHING DATA BY VAR IOUS OPTIONS

A O OC LH ENT ED L lS TING P RO VIDES 1.IN~ C HAN GE S F OR

ADAP T! NG TH E S YS T!)M T O PREFO RM N U ME RO LIS O H lE R

APPL lCA1 ' IONS .

UtE OOOKLET IS WR I TTEf>I IN A M AN NE R W HIC H M I>.Y B E U SED

BY T HE N OV IC E AS W El.L AS T HE EX PER I ENeED PROGRAHMER .

D OZ EN S O F PROGRAH- t ING TECHNIQUES ARE SHO WN ANO FU LL YOOC lH E NTED . ALS O 1 NC LU D ED S E P A R ATEL Y, IS J\ P IWG RMI ' IERS

A ID GIVING QU ICK R EFER ENCE TO INTEGER , APPLbSOH AN D

DO S C OM MANDS W IT H IL LU ST RAT IVE EX AM PlES .

S YS T EM REQU 1REM 6NT S: D IS K II s AP PL ES OF l" T AP E OR RO M CARD

P RI C E $24.95 (PROCESSED. SHi PPED WI nil N ~ DAYS ]

S EN D C HEC K OR ~ IO NE Y O RD ER T O: _ .c : a = .OF rOUCH

P .O . BOX 511

LEOM INS T ER , M AS S . 01.53

'-'~it4'~''.. '~C;.r .'". ~ ; _ > .;.:r~ Compute,.r-'" ..'.~~ .. GGmbllnl

" ,,~~~ -,

P R E SE N TS : \ . ; , MGIG.'ne·r R O B I B I L I "

H U D I C I P P I N a

D E V IC E IA 16K BAS IC P ROGRAM FOR:

H O R S E D C E H I N D I C A P r I N a lT h is amaz in g p r" ll ram w a s w r il le n by a p ru t. s si o oa ' so ft wa re

eensenant 10TRW Space Sy , ;t ems and i s bemg I n lr oduced by Ih epublishers 01 Comput er s and Gamb li n g Maga z ine , " PHD · I' is alarg.",mple, baslc p r" ll ram r eq "i r i n g a lu I I 1 0K . I t i s c a re lu l lyh uma n l ac to re d f or e as y u se . P H D · 1 is a comprehensive horser a ci ng sy slem lo r sp ot ti n9 over la y s i n t hO rough b r ed sp ri "1 r a ce s( le s s t h an 1 m i le ). V ou s im p ly sil d ow n wH h y .o ur c ompu t. r a ndth e Racing f orm th e n ig hl b elo r. th e ra ce a nd a ns wer 5 Of 6q ue st io ns a b ou l e ac h h o rs e' s p as t p er fo rm a nc e. V o ur c omp ul erI he n a oc ur at el y p re di Ot s t he w i n p ro b ab il it y a nd o d~ s -i ln e l oreach horse,a l loW ing you 10spot ove~ald horses wh i le a ll h e l r ac k :

The user s manual contains a " ,m p le te . . p la na li on o f o ve rl ay bet-ling,Statlsttcs fo r thou ," ,nd, 01 hors es w ere u se d t o develop Ihis

h andi cappi ng sy st em . T ho appendix 0 1 l il a manua l con la ins ade ta i le d t al ! r u n 01 a 100 censecutlve r a ce sy st em W l l rk ou t show-ing an .mlzing ~5 % p , o s ~ 1 v 8 retum 1450J fo r each $ 1.00

wagered). A graph is al~ lncl oded show in~ P H O·1 's c l00 8 tlt 1 0

t he ideal p red icted p robab i l it y vs, actual Win percentage corve.Th i s p rog ram lea t ur es : 0W i n p ro b ab il it y a nd o dd s fO f e ac h

horse 0 Verincatio n display 01 aacn horse' S parameters p ri or 1 0e nt ry l or e as y error carract km 0 B u bb le ·w r t r ou l. lo o l or f in a ld IS p la y DF ac ll it y t or l in e p ri nt er o u tp ut 0 Casset te ARCH tVErootine 10 store PHO·'·s o ut pu t l or l at er a na ly si s 0 Completeusers manual.Th e user 's manua l may be o r de re d sepe r. t. ly f o t )'llur purusal

lor $7.95 a n d w i ll b e c re di te d 1 1 y c > u purchase PHD·1.

P I ID - l U I If ', Manua l I n d 1 61 1.C1I18II' f O f ;

~~~t~~~' ~~~.U."(~.~.Typt) •........ 529.95

M ak e c hf lC ks p ay ab le 1 0: ()a. r es . a dd 6 %

JO E COMPI / TER22713 VlntUr l B l vd . , s u nl F. W..... l ln d H U ll. til. 91364

'BE A WINNER: G8 1 on I he ComPU"I , and Gamb l in g ! 'f o due lsMaga z inema i l in g I iS I I I) f $ 3 .00 and r ece iv e avai la b le b a ck i s sue s,

t IRS·SO is a reglsr t1re/J Iraoomad< 0 1 Tandy Corpora l ion .

.l

AIM 65SUPPORT PACKAGES

Hardware8K Memo,y"expanslon Card

2114 RamsComes ready to use on 4K machines

Includes 162114-300 N. SecsStatic Rams A~prox. 5"x 7" board

SoftwareCassettes Requiring 4K Machine With 8K BASIC

BASiC TechniquesSelf Teaching for the beginner $9.00Business Library

Includes: Risk Anaylsis, Income statement, Interest,Rates, Anatysts, Budget $18.00

Math LibraryIncludes: F Ratio, Correlation Coefficient, Curve Fit,Determinants, Differential, Equations,Derlvat ive.$lS.50

Games LibraryIncludes: Craps, Checkers, Student, Blackjack, TicTac Toe. $14.95

Cassettes Requiring 1K MachineUpper Memory Software

ClocksCompatible with BASIC, Specify Memory Size,

Comes with Utilities and User Tips. $8.30Send $1.00 for a Copy of LINKAGE GENERAL ANewsletter supporting AIM 65 Users. Articles re-

quested. SYSTEMS DESIGN.

P.O.BOX 841ORANGE, CA 92886(714)771·4038

'GA residents add 6% sales tax.Prices subject to change without notice.

• • • • • • • • • • • • • • • • • • • • • • •: WHY NOT TRY AN IRISH GAME? :

• These games are unique! They are not copies or adapta- ...• tions of games with which you may already be familiar .•What is more - we give you a TOTAL GUARANTEE - if

... you can beat the Computer in "SUCKER" - without ...

... listing! (See how we trust you?) - We will refund your ...

• cash IMMEDIATELY! ...

... Both games on one Disk for Apple II. Only $40.00 •

... inclusive of Airmail express delivery, dispatched same- •

• day. •

•••••••. .•••! Same day dispatch, airmail. Check, Cash or Master!.,.. Charge. .,..

• Ulster Managemant Centre •... Rathlln Island •.,.. C o. Antrim... Ireland •

• Telephone (028Sn 71220 ...

• Dealers Enquiries Welcome •

. . . . . . . . . . . . . . . . . . . . . . . . .

Sucksr is a brand new game of Chance. You control the.operations but your Apple wi/I beat you! Nothing is fixed.- the Apple predicts a toss of the coin, so do you. You ...toss the coin but your Apple wi!( get i ts predictions right ....at least twice as often as you! It has to be tried to be .,..believed! •

Think is a new card game, unlike any other computer •card game. It has nine optional levels and a complete ...set of control options such as card shuffles, who goes ...first, one or more players, you play the cards, or Apple ...plays the cards, etc. •

. . .OT HOURS OF PLAY - BUT WEEKS OF PLAY!

Page 75: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 75/82

6502 Bibliography: Part XXIII

Continuing bibliography of 6502 related material

~~~~~~~~~~.~~~~~~~~~v1v1v1~~

Dr.William R. Dial

438 Roslyn AvenueAkron, OH 44320

668. The Seed 1, No.5 (October 1979)

Brown, Bob, "Sines and Cosines," pg. 11.Program illustrating the use of the sine/cosine tables Inthe Apple.

Pope, Gene, "Tape Recorder Moni.toring," pg.12.Simple hardware mod for your recorder enables you to

monitor Apple programs as they are read in or out.

669. The Seed 1, No.6 (Noyemeber 1919)

Foens, Bob, "Applesolt Muslc/Tone Subroutine," pg. 5.Apple tone routine.

McClure, Alan, "Write Protect Defeat," pg, 12,A mod for the Apple Disk II.

Baga, Dennis, "Algol I I Language for th e Apple 1 .1

Computer," pg. 13.A translator for the Apple,

Reese,Chuck, "Analytical Apple," pg. 16.Derivatives and Integrals on the Apple,

670. Tne Seed 2, No.1 (January 1980)

Foens, Bob, "Deck of Cards," pg. 5,How to select non-recurrlnp random numbers.

Wagner, Roger, "Exceeding the Speed Of Light with yourApple II," pg, 8·9.

Speed up your programs,

McClure, Alan A ., "Reset Fix that Doesn't Void your War·ranty," pq, 14.

Simple, easy to install hardware rnodiflcatlon.

671. interfa.ce Age 5, No. 4 (April 1980)

Roybal, Phil, "Data Base Management Ior the Apple II." pg,94·101,

Description 01File Cabinet,

Fox, Tom, "System 01the Month· OSI C3-C," pg, 102·103.A review,

672. Southeastern Software Newsletter,. Issue 16 ('Feb. 1980)

McClellan, George, "Peeks, Pokes, and Calis," pg, 1·4,

A 'tutorial on machine language, Apple.Carpenter, Chuck, "The Whys of HEX Dump," pg, 4·7,learn all about memory dumps on the Apple,

Hartley, Tim, "Customize your Diskettes," pg.7·8.A Novel Hello prooram lor the Apple Disk.

Shorl Applesoft program with graphics.

Anon., "Cube," pg. g,Pascal TurUegraphics program.

Gustafson, Ralph D., "Machine Language Subroutine," pg,

10.Subroutine to letch the Input Output Block lor the use ofthe Mach.ineLanguage Programmer.

673. The Apple Shoppe I, No.5 (January 1980)

Smith, Brian, "Fun With Pascal," pg. 7·8,

A short program that illustrates some basics of program·ming in Pascal.

Anon., "Apple Assembly, Part 1," pg. 9·13.A tutorial for the Apple Assembly progra,m,

Grouch, Bill, "Down to Business," pg, 14·16.

Some routines useful in business applications of the Ap-pie.

Anon., "Graphics In Assembly," pg, 17·20.How to draw graphics from machine language programs.

674. Tne Paper 3, Issue 1 (February 1980)

Hennig, Doug, "Speeding Up the Print Statement," pg. 7·9,Speed up your PETby a factor of four.

Lee,Arnie, "Floating Point Numbers," pg. 7·9,A!! about Floating point and fractional numbers on thePET .

Sung, Wayne, "Himondis on a 16k PET," pg. 1J.·15.A uWltyfor the PET.

Kalmbach, Chris, "Modifications for PIMS" pg. 18,Modifications lor the PET information managementprogram.

Sung, Wayne, "HIMONDIS and ROM Test Revisited," pg.19·21,Modifications for the PEr dissembler and the ROMmemory test.

Turco, Fran, "Better List," pg. 23·26.An Improved LIST routine for the PET,

675. Fort Worth Area Apple User Group 1, No.7 (M.arch 1980)

Meador, Lee, "Dissassembly of DOS3,.2,"pg, 1·13,

Another installment of the Editor's comprehensive series,Apple,

Hoggatt, Ken, "Monitor commands in BASIC," pg. 14.

Enter monitor comrnands from Basic on your Apple,

Keyes, Patricia. "A StringS Expression Compiler lor Ap·

plesoft," pg, 14.An easier way to use data tables, Apple,

Crossman, Craig, "Fast DOS," pg.,15,Init your Apple Disks in hal! the regular time.

676. The Seed 2, No..2 (February 1980)

Davis,William, "Counting Files," pg. 5,Count the number of Disk files on the Apple II disk.

Foens, Bob, "GEEJO," pg, 11,

Several short routines lor the Apple,

Wagner, Roger, "Speeding in App.lesoft," pg. 13.Speed up program execution by bypassing REM

statements.

August 1980 M.ICRO-_ The 6502 Journal 27:75

Page 76: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 76/82

.Patton, J.W., ".ApplesoftIProg. Aid #1 Music," pg. 14.

Modification 01 a program 10 use the Programmers Aid in

Music on the Apple,

677. Stems From Apple 3, Issue 2 (February 1980)

Hoggatt, Ken, "Ken's Korner," pg. 3,7.

Similarities between Basic and Pascal.

Pfeiffer, Jim, "How Applesoit Stores String Arrays and A Tip

on How to Clear String Array Space," pg. 4·6, 9.

Byerly, Kent, "Literal Input Fix," pg. 7.

An improvement on the Literal Input for Apple.

678. Abacus Newsletler 2, Issue 2 (February 1980)

Anon., "Hl-Hes Flag and Music," pg. 4.

A graphics program for the Apple II.

Crossman, Craig, "Colossus," pg. 6·7.

Usting for a new game for the Apple.

Crossman, Craig, "Apple Tricks," pg. 7.How to make your Apple programs unlistable.

Anon., "Floppy Disk," pg. 8.

All about Floppy Disks, hard vs. soli sector, etc.

Crossman, Craig, "Fast DOS," pg. 9.

Speed up your Apple DOS.

Anon., "Introduction to Simulation," pg. 10·14.

A good tutorial on Simulation for the Apple.

Wrighl, Don, "Disk II Utility: Disk Map Display," pg. 15-17.

An interesting disk utility for the Apple Disk System.

Brown, A.R.,Jr., "Patriotic Display," pg. 18-19.

A graphics and music program for the Apple.

Schwartz, Dana J., "Random Spiro," pg. 19.

A short program for complex HI·Res graphics on the

Apple.

679. MICRO No. 22 (March 1980)

Pruetz, Harry L ., "Apple II Floating Point Utili ty Roulines,"

pg.7-1'.

A guide to Applesoft Basic floating Point routines.

Finn, Kenneth, "A Machine Language Screen Print Programfor the Old or New PET," pg. 13-14.

Program which gives user control over the PET screen.

Carlson, Edward H., "Polling OSI's Keyboard," pg. 17·18.

The Polled Keyboard technique permits the user to define

the function of various keys to his own specifications.

Kershner, Carl J., "A Digital Thermometer for the Apple II,"pg.21·23.

Use thermistor probes connected directly to the Apple IIGame I/O Connector and convert to Celsius or Fahrenheit.

Lary, Richard A., "Challenger II Cassette Techniques," pg.

25·26.

Storage and retrieval of sequential data files on cassette.

DeJong, Dr. Marvin, "Beginning Boolean: A Brief lntroduc-

tlon to Boolean Algebra for Computerists," pg. 29-33.

A tutorial on computer math and logic functions.

Vrtis, Nicholas, "Program Checksum Calculator," pg. 39-40.

SYM-1 checksum program.

Tripp, Robert M., "Ask the Doctor," pg, 42·43.

A technique to solve a problem in the AIM TTY service,

and a program for easy tape retrieval on the KIM.

Guest, Ronald A., "Clocking KIM," pg. 45·48.

A tutorial involving techniques for a KIM clock program.

McLean, William, "A Home Message Center," pg. 53·55.

Use your ~pple as a bulletin board for the family.

Bullard, Gary J., "Stop That PET!," pg. 57·61.

How to stop the run-away program without hitting RESET.

Rowe, Mike (Staff), "The MICRO Software Catalogue: XVIII,"

pg.63·65.

MICRO lists 14 new 6502 programs.

Dial, Dr. William R., "6502 Bibliography, Part XVIII," pg.

67·70.

About 150 more references to the 6502 literature.

680. Call - Apple 3, No.2 (February 1980)

Golding, Val J., "Lower Case and Graphics Printer Routine,"

pg.7-23.

Apple program for printing using the Integral Data printer.

Cadmus, Ray, "Formatted Print," pg. 25.

Formatted print on the Apple for money programs.

Capes, Nelson R., "Apple II Disassembler," pg. 31.

Improved disassembler for the Apple.

Vaughan, Craig, "Program to Modify the BIOS Modules," pg.

32·33.

Modification for the Apple to remedy the inability to

display lower case from the Pascal system.

Wagner, Roger, "APPENDectomies in Integer and

Applesoft," pg. 34.

How to remove Appended Binary data from basic pro-

grams.

Golding, Val J., "Routine to Print NBumbers above 32767 in

Integer Basic," pg. 34.

Special routine for the Apple.

Winston, Alan B., "The Multi·Lingual Apple," pg. 35·36.

Notes on Pascal for the Apple.

Vaughan, Claudia M., "Bridging. the Gap," pg. 36·37.

A tutorial to help you over the rough spots in Pascal.

Williams, Rick, "Random Drill Tutorial," pg. 38·40.

Enter your own question/answer pairs in this drill pro-

gram.

Foote, Gary and Barnes, Keith, "File Cabinet Improvements,

Ad Infinitum," pg. 41·42.

More modifications for this popular program.

Hyde, Randall, "The Apple Doctor," pg. 43.

More on Pascal including printer output and turnkey

operatlor..

Huelsdonk, Bob, "Formatting Re-Vlslted," pg. 48.

A 'print using routine for the Apple.

Golding, Val J., "Crawler," pg. 52.

A short rouline to print a message which crawls across

the Apple screen.

681. Rubber Apple Newsletter (September 1979)

Throop, Gilbert D., "Rounding Off," pg. 2.

Short routine for rounding off numbers on the Apple.

Wysocki, Tom, "Billboard Display Routine," pg. 2.

Move your message across the Apple screen.

Gabelman, Ken, "Sort-File,' pg.3.A sort routine for the Apple.

682. OSI User Independent Newsletter, No.2 (March 1980)

Curley, Charles, "OS-65U Notes," pg. 1·2.

Notes on the use of the COPYFI and lABlE programs.

Curley, Charles, "05-650 Notes," pg. 2-3.

How to use dual disk drives to load games for visitors.

683. Stems From Apple 3, Issue 3 (March 1980)

Hoggatt, Ken, "Ken's Korner," pg. 3.

More about the similarities of Applesoft and Pascal,

27:76 MICRO -- The 6502 Journal August 1980

Page 77: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 77/82

giving examples of programs in each language (String

Demo).

Sittel, Randy, "Hobby Hardware," pg. 5·6.Using game output ports (Part I) - light LEOswith the

Apple.

Anon., "Applications Note for Pascal," pg. 7-8.A fix for the LONG INTEGERS in the Apple Pascal

language.

Hoggatt, Ken, "Statistics for Throwing Three Dice," pg. 9.

Hoggatt, Ken, "Read Names," pg. 13.A sort and search routine for Names or lists on a data

statement.

684. Kilobaud Mlcrocomputlng, No. 39 (March 1980)

Baker, Robert W., "PET Pourri," pg. 7-9.Discussion of the BASICSWITCH,Digitizer tablet, a Date

Book program, etc.

Anon., "OSI Small Systems Journal," pg, 10·13.The first of a two part series on multiple user systems.

Flippin, Allan, "Assembly-Language Benchmarks," pg.

26-35.Compared against a number of 8-bit microprocessors aswell as 16-bi't systems and the IBM 370-145, the 6502

system was second only to the 370 in execution speed.

Derfler, Frank J., "Dial-Up Directory," pg. 50-51.,A l l about the use of Modems and Bulletin Boards and

shared use of large data base systems.

Rowe, John and Grossman, Chris, "Multiple PageGraphics

for the Apple II," pg. 66.A program to flip through the pages of your Apple.

Wadsworth, Nat, "It's Time to Draw the Line," pg_78-80.Here's how to draw a straight line with the PET.

Paturzo, Bonaventura, "Stand-Alone Video Terminal," pg.

94-97.A SYM-1microcomputer system using a large-scale ln-

tegration CRTcontroller.

Bramblet, Timothy L, "Keyed-Up PET," pg. 132·133.

Add a keyboard to your PETfor less than $60.00.

Buszta, Ron, "An Apple a Day Keeps a Kid Occupied," pg.

172.Experiences with a five year old and a computer.

Putney, C.B., "Slacki ngProgram," pq. 184-185.How to stack multiple games or programs in one Basic

load.

Gordon, HalT., "Instruction Sets ExaminedandCompared,"

pg. 192-194.Comparing the 6502, 8080, Z-80, 6800 and 2650

microprocessors.

Wayne, Phil, "Pascal Workshop," pg. 20·22.How to patch the Pascal BIOS to change your Apple I/O

system.

Chavez,Franklin, J., "Eight Queens Problem,Apple II Style,"pg. 23-26.A Pascal solution to the Eight Queens Program,

685, Rubber Apple Newsletter (November 1979)

Musgrave, J. Scotty, "Apple Monitor," pg. 2.

A tutorial on the Apple Monitor.

686, Rubber Apple Newsletter (January 1980)

Musgrave, J. E., "DOS Identifier," pg. ISimple routine for identifying the DOS In use.

687. Compute NO.3 (March/April., 1980)

Stuart, Chuck, "A Previewof Commodore's New Disk Basic4.0," pg. 10-11.

Describes 14 newdisk commands.

Isaacs, Larry andCompute Staff, "Enhancing Commodore'sWord Pro II," pg. 15-16.

Upgrading the Word Pro II program for a CommodoreBusiness Machine system.

Wadleigh, Hal, "File Conversion on the Commodore 2040Drive," pg. 18-21.

Program listing tor a conversion program.

Bruey, Allred J., "Using the GET Statement on the PET,"pg.23-24.

How to use the GET statement instead of INPUTto enterdata.

Butterfield, Jim, "Machine Language,"

General discussion of machine language for the PET/CBMsystems.

Isaacs, Larry, "UTINSEL: Enabling Utilities," pg, 34·37.

Program, with listing, to provide a flexible solution to

several PETproblems involving CHARGOT,WEDGE,etc.

Lindsay, Len, "Identify Your Atari Colors," pg. 39.A short program to identify on the ATARI.

Semanclk, Susan, "Manual Alphabet Tutorial on a PET," pg.4148.

Use the PET to help the handicapped. Drawing hands forsign language.

Pratto, Marlene, "The Learning Lab," pg. 51-53.

This program will help teachers calculate term and partialterm grades, means, deviations, etc.

Heise, David R., "light-Pen Selection from Large Menus onthe PET/CBMScreen," pg. 60-62.

A light·pen can select from menus of over 90 items.

Kemp, D.P., "Naming Apple Cassette Files," pg. 68-69.A short program to support Named files on Apple casset-

tes.

Wlpllch, Mike, "On InterfaCing an Apple II to A Heathkit

H-14," pg, 69.Software compatible with the Apple DOS is given for us-

ing the Heath printer.

lindsay, Len, "ATARI Program Saving," pg. 76.Improve your tape SAVE/READroutine.

Bunker, W.M., "Lower Case Descention," pg. 81.improve the lower case program for your PET.

Wuchter, Earl H_, "Comments on Null Return (UNPUT)Simulation," pg. 81.

Improvements for this PETProgram.

McCarthy, C.A., "Cheep Print-Hard Copy for Soft Cost," pg.82-86.

Useyour Audio Cassette as a substitute for hardcopy us-ing the PET.

Lindsay, Len, "Direct Screen Input," pg. 88.Use your PETVideo screen as input into your programs.

Herman, Harvey B., and Pate,Charles B ., "A Versatile SerialPrinter Interface for the PET," pg. 90-91.

A simple design for a serial interface.

Strasma, Jim, "MAE, a PETDisk-Based Macro Assembler,"pg.93.

This assembler, compatible with CBM and other printersoffers many unique features.

Strasma, Jim, "The PETRabbit," pg. 94.

The PET Rabbit is an extension of the PET operatingsystem.

August 1980 MICRO -- The 6502Journal 27:77

Page 78: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 78/82

/

MICROScope Outlined

MICROpublishes its first MICROScope review.With its appearance we would like to pointout the seriousness of our review intentions. Shown below is a copy of the Reviewer'sResponsibilities involved when a review is written. Manufacturers will be provided with suffi-cient time to read the review before it is published.

If you are a manufacturer with a product you would like to submit for impartial review,please contact us and we shall send you all our MICROScope information and necessary

forms.

The Reviewer's Responsibilities

In agreeing to evaluate a product and write a MICROScope product review, you accept a

definite set of responsibilities. It Is important that you seriously consider the impact of thisundertaking. If at any time, for any reason, you feel that you may not be able to completelyhandle the responsibilities as outlined below and in the MICROScope Product ReviewerAgreement, please immediately contact the MICROstaff and resign the particular reviewingassignment. This will not be considered a failure on your part, but rather will reflect well onyour sincerity and honesty. It will in no way jeopardize or disqualify you from other review

assignments.

Responsibility to the Reader. Due to the method by which unbiased reviews are beinggenerated for the MICROScope section of MICRO, readers will be placing great faith in theaccuracy, validity, completeness, and fairness of the reviews. Many readers may base theirdecisions to purchase, or not to purchase, an item on the review which you give it. They arecounting on the reviewer to provide them with all of the detailed information about the pro-duct, its good paints and its bad, so that they can make an informed judgment. If you submit

less than your absolute best review effort, then you will have failed in this responsibility.

Responsibility to the Manufacturer.The manufacturer has submitted his product for reviewin order to obtain the publication of an impartial review which will, hopefully, result in ln-creased sales of his product. He has the right to expect that all of the product's features willbe fully explored, fully understood, and adequately described in the review. He also has theright to expect that all information which is essential for a potential purchaser will be includ-ed, He has a legal right to expect that the review will be unbiased and that the reviewer doesnot have any conflict of interest at any level that could effect his judgment and his review.

Responsibility to MICRO. MICROhas not published the new releases and other manufac-turer generated promotional material which abounds in other magazines, since we felt thatthis material was, by its very nature, biased. The method we are using to keep our readers in-

formed, the MICROScope reviews, is costing us time, money, and a lot of effort. In addition,MICRO is putting Its reputation on the line. Since we are sponsoring these reviews, anyreview which is less than perfectly honest reflects poorly on us.

This brief discussion of responsibilities is not intended to scare any legitimate revieweraway from the task. It is intended to make every reviewer consider his obligations and makecertain that he feels that he can perform the reviewing task without reservation.

This is how we expect the MICROScope review process to work. With our great reviewers,we know we will receive the best results.

Page 79: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 79/82

Missing MICRO Information?

MICRO is devoted exclusively to the 6502. In

addition, it is aimed at useful, reference type

material, not just "fun and games". Each

month MICRO publishes application notes,

hardware and software tutorials, a continuing

bibliography, software catalog; and so forth.

Since MICRO contains lots of reference

material and many useful program, most

readers want to get the entire collection of

MICRO. Since MICRO grew very rapidly it

quickly became impractical to reprint b~ck

issues for new subscribers. In order to make

the older material available, collections of the

reprints have been published.

[A limited number of back issues are still

available from number 7 to 18 and 20 to cur-

rent. There are no 19's left.]

The BEST of MICRO Volume 1 contains all of

the significant material from the first six

issues of MICRO, from October/November

1977 through August/September 1978. This

book form is 176 pages long, plus five

removeable reference cards. The material is

organized by microcomputer and almost

every article is included. Only the ads and a

few 'dated' articles have been omitted. [Now

in third printing!]Surface ... $7.00 Air Mail. .. $10.00

The BEST of MICRO Volume 2 covers the se·

cond six issues, from October/November 1978

through May 1979. Organized by microcom-

puter, this volume is 224 pages long.

Surface ... $9.00 Air Mail ... $13.00

The BEST of MICRO Volume 3, covering the

twelve issues from June 1979 through May

1980, will -be over 400 pages long. It is

scheduled for late summer 1980. The price is

still to be determined.

For a free copy of the Index for Volumes 1 2

and 3, please send a self-addressed, stam~ed

envelope to:

BEST of MICRO, P.O. Box 6502, Chelmsford,

MA 01824

Advertisers' Index

AardvarkAbacus Software

A B ComputersBeta Computer DevicesBKM Micro SystemsR. J. Brachman AssociatesCarlsonClassified AdsComputer Corner of N. J.The Computerist, Inc.Computer Shopper

ICreative Computing SoftwareDecision SystemsDiscount Data Products

I DW0Quong Fok Hok Sow

Electronic SpeCialists, Inc.Enclosures Group .Highlands Computer ServicesHudson Digital ElectronicsJoe ComputerMeC EngineeringMICROMICRO SoftwareMountain Hardware0n Line SystemsOrion Software AssociatesOSI

OSI Small Systems JournalPerry PeripheralsProgramma InternationalProgressive Computer SoftwareProgressive ComputingProgressive SoftwareRainbow Computing Inc.Sliwa EnterprisesSmall Business Computer Sys.Softside PublicationsSoftouchSoftware Tech, for CompoSoutheastern Software

Stoneware Microcomputer ProductsSystems DeSignSystems FormulateWall ace ComputersUlster Management Center

4660

20125124466452IFC408018

2646242392474112

20,79,IBC63

16

3 251BC

42~452041266063

3918266

74601

52744

.39,

74

Page 80: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 80/82

ACJJON,. S1HATEGY,. AND FANTAS¥-....

for the SERIOUS games player

and his APPLE II

Sports Gamf!s- 1 puts you in the Apple World Series

Take the field in the Great American Computer Game.Mix up your pitches to keep the batter off balance. Move

your fielders to snag the ball before he gets to first. Balls

and strikes, double plays, force outs, and errors let you

play with a realistic strategy. Also in the line up-Slalom,

a championship downhill ski race, Torpedo Alley, and

Darts (16K) CS-4002 $7.95. Space Games and Sports

Games are on one disk (16K) CS-4501 for $14.95

It's easy to order SENSATIONAL SOFlWARE for your Apple II.Send payment plus $1,00 shipping and handling in the U,S. ($2.00 foreign) to

Creative Computing Soh ware, P,O. Box 789·M. Morristown, N.J. 07960. N ,J. residents

add $1 .00 sales lax. Visa, Master Charge and American Express orders may be called In toll

free to 800-131·8112 (in N.J. 201·540-0445),

Brain Games - 1 demands ingenuity.

Two players bombard radioactive material with protons

and electrons until it reaches crit ical mass and sets up aNuclear Reaction. Dodgem requires you to outmaneuver

another player to get your pieces across the board first.

Dueling Digits and Parra' challenges your ability to

replicate number and letter sequences. Tones lets you

make music with your Apple (16K) CS·4004 $7.95. StrategyGames and Brain Games are on one disk (16K) CS-4503$14.95.

Strategy Games - 1 keeps games players in

You and your opponent trail around the screen at aquickening pace attempting to trap each other in your

Blockade. A 7 category quiz game will certify you as aGenius (or an errant knave!). Beginners will meet their

master in Checkers. Skunk and UFO complete this classic

cottection (16K) CS-4003 $7.95

Know Yoursel/through these valid self-tests.Find out how your life style effects your Life Expectancy

or explore the effects of Alcohol on your behavior. Sex

Role helps you to examine your behavior and attitudes in

light of society's concept of sex roles. Psychotherapy

compares your feelings, actions, and phobias to the

population's norms and Computer Literacy tests your

microcomputer sawy. A fun and instructional package

(16K) CS-4301 $7.95. Know Yourself and CAl Programsare on one disk (16K) CS-4503 for $14. 95

EYou're in command inSpace Games - 1.

Maneuver the TIE fighters into your blaster sights andzap them with your lasers to savfJ the rebel base camp

from annihilation in Star Wars. Rocket Pilot is an eo-

vanced real time take off and landing game. High resolu-

tion graphics, exploding saucers and sound effects add to

the suspense as you repel the Saucet Inllasion. Finally, a

bonus graphics demonstration, Dynamic Bouncer (16K)

CS-4001 $7.95. Space Games and Sports Games are on

one disk (16K) CS-4501 for $14.95

AC, .I

Page 81: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 81/82

Complete Your MICRO CollectionNOW is the best time to complete your MICRO

collection - during our Summer Special!

Order back issues from now until September 30, 1980 and receive our specialprice. Complete your MICRO collection at these low prices.

Special prices on issue numbers 7 [Oct/Nov 1978Jthrough 18 [Nov 1979J.

Issues 7·12 Regularly $1.75Surface Issues 13·18 Regularly $2.25 Surface

Summer Special Price: $1.00 for any issue 7 - 18 in the U.S.$1.25 for any issue 7 - 18 foreign.

All back issues wi l l be shipped Surface. Air Mail service on'ly at regular rates.

Issues 20·24 available for $2.25, or check with your local dealer. SOllY, number19 [Dec 1979} is no longer available!

Free Copy of MICRO

Help spread the good word about MICRO - send a

free copy to a friend during our Summer Special.

During this period, you can share MICRO with a friend. Send in the addresslabel from your MICRO, along with the name and address of a triendwhom youthink would enjoy receiving MICRO, and we will send him a tree back issue.Back issue sent will be publisher's choice, and this free offer expiresSeptember 30, 1980.

Regular Subscription Information

One year's subscription = 12 issues. US: $15.00, All other countries: $18.00 for surface. Air Mail rates forCentral America: $27.00, Europe/S. America: $33.00, All other countries: $39.00.

Best of MICRO Voulme 1 (Issues 1-6):$7.00 for Surface, $10.00 for Air Mall. Best of MICRO Volume 2(issues 7-12):$9.00 Surface, $13.00 Air Mail. All of MICRO Volume 2: $9.00 Surface, $13.00 Air Mail.

All payments must be In USdollars. Please make checks payable to MICRO. Foreign payments in Interna-tional Money Order or cash.

MICROP. O. Box 6502

Chelmsford, MA 01824(617)256·5515

Page 82: Micro 6502 Journal August 1980

8/3/2019 Micro 6502 Journal August 1980

http://slidepdf.com/reader/full/micro-6502-journal-august-1980 82/82

-

Tbe bam e· com pu ter you tbougb t w asears aw a is bere. ..... .•..~--_:_--- - - -.~ < = ' I - ; ' ~ - " \ '

$

OhiO Scient ific's top of th~ line personal com-puter, the C8P DF. This system lncorporatesthe mos t advance,d lechnology now availablein standard configurations anc.add-on eptlens,The ca p DF has full capabilities as .a personalcomputer, a small business computer, a homemonitor ing. secur ity system and an advancedprocess control fer,

Personal Computer FeaturesThe cap DF teatures-ultra-last program exeeu-tlon. The standard model is twice.as Iast asother personal computers such as the. Apple IIand PET The computer system is availablewith a GT option which nead~ doubles the

The computer system comes-standard with ahigh-speed printer interface anG a rnooern In-terface. I t features a' fu ll 53-key ASCIIkeyboard as well as 2048 character displaywifh upper and fewer'case for business andword prccesslnq applioa1ions,

Home ControlThe C8P DF has the most advanced homemonitoring and.control capabilit ies everoffered in a computer system. 1 1 incorporatesa real t ime cloc~ and-a unique FOREGROUNDIBACKGROUND QRerating .system whiCh 'allowsthe computer 10 fUnClien with normal BASICproqrarna al the same lime it is monitoringexternal devices, The'C8P DF comes stancardwith an AC remote control interface whichallows it t o. co nt ro l a wide range of AC appn-

II.LLI.IiEI I.

o

accessory BUS connector is-accesslble at theback of the computer 10 plug ln.addltional 48lines of palallelliO and/m a cemplete an'alogsignal I/O board with ND and D IA andmultiplexers,

Clearly, the CSP DFbeats all existing smallcomputers in conventional specif icat ions plusit has capabilities far beyond any other corn-purer system.on the, lllarkeUoday,

CSP DF Is an 8-s101mainframe class computerwith 32.K stattc RAM . dual a' floppies, an dse~eral.open slots rorexpans fen,

[8 $950