micro 6502 journal july 1979

68
8/3/2019 Micro 6502 Journal July 1979 http://slidepdf.com/reader/full/micro-6502-journal-july-1979 1/68 The Magazine of the APPLE. KIM, PET and Other @l~(])~ Systems C: , '-'(ld,u I' - r""IIIET ..... ppro:"onal ~Of1'.., •. Cornputer 7( if ! D(H8 ... en ,. :~ " CURSOR .. " The Boolean, NO 14 PET 'LS~O D5----' 08____J D1---- 81ft'2-- BRfW ASe--' AB1-- A02___j "8-'-' A1I'I-- 1/0 SEL___j RES"ET--' fl_9 330 wiRE JUMPER $2.00

Upload: cubemanpdx

Post on 06-Apr-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 1/68

The Magazine of the APPLE. KIM, PET

and Other @l~(])~ Systems

C : , '-'(ld,u I' - r " " I I I E T..... ppro:"onal

~Of1'.., •. Cornputer

7(

if ! D(H8. . .en, .

:~

"CURSOR. .

"

The Boolean,

NO 14

PET

'LS~O

D5----'08____J

D1----

81ft'2--

BRfW

ASe--'AB1--

A02___j

"8-'-'A1I'I--

1/0 SEL___j

RES"ET--'

fl_9

330wiRE

JUMPER

$2.00

Page 2: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 2/68

APPLE I ' I® PRDF'ESSIDNAL

PIE TeXT EDITOR

PIE (PROGRAMMA IMPROVED EDITOR)is 8 two-dimensiona l cursor-based editordesigned specif ical ly for use wi th memory-mapped and cursor-basad CRT's., It Is 'totallydifferent from the usual l ine-based editors,which were originally designed for Teletypes.The keys of the svstarn input keyboard are

assigned specific PI e , Editor functioncommands. Some of the features included inthe PIE system are: Bl ink ing Cursor; Cursormovement up, down, right, lef t, plus tabs:Charee,ter insert and delete; Str ing searchforwards and backwards; Pagescrol ll ng;GOTO line number, plus top or bottom off ile; L ine inser t and delete anywhere on screen;Move and copy Isingla' and mul tiple l ines) ;Append and clear to end of llne: Efficientmemory usaga, The fol lowing commandsare available in the PIE Text Editor and eachis executed by depressing the systems argu-ment key s imula taneously with the commandkey desired:

[LEFT]" Move cursor one position tothe lef t

[AGHT]

[UP][DOWN]IBHOM)

Move cursor one position tothe rightMove cursor up one lineMove cursor down one lineHome cursor in lower lef tlef t hand corn erHome cursor in upper lef !hand cornerMove up (toward top of file)one "page"Move down ( toward bottomof file) one "page"Move cursor lef t onehorizontal tabMove cursor r igh t onehor izon ta l tab

[GOTO] Go to top of file (line 1)[ARG) n[GOTO] Go to line 'n'[BOT) Go to bottom of file

(last line -I- 1 )Search backwards lup) Intofile for the next occurence ofthe s tring specif ied in the lastsearch command

[ARG] t[ -SCH] Search backwards forstring 't"

Search forwards (down) into thefile for the next occurence of the

str ing speCified in the' last searchcommand

[ARGI ![+SCHj Search forward tor string 't '

[APP] Append -rnove cursor to lastcharacter of line + 1Insert, a blank l ine beforerethe cur ren t l ine

[ARG] n[lNSI Insert 'n' blank lines beforethe curren t l ineDe lete the current l ine, sav ingit in the "push" buffer

[AR01 n[DEL) Delete 'n' lines and save t hefirst 20 in the "push" buffer

De lete the current l ine as longas it is blan k

[PUSH] Save current line in "push"buffer

[ARG) n[PUSH] Save 'n' lines in the "push"buffer

[POP] Copy the COntents of the "push"buf fer before the cur rent line

ICINS] Enable character insert mode[CINS] (CINS) Turn off character insert mode

(BS) Backspace[GOB] Gobble - delete the current charac-

ter and pu ll remainder o f charactersto right of cursor left one position

(EX IT] Scroll all text off the screen andexi t the ed itor

[ARG] [HOMEI Home Line - scroll Up tomove current line to topof screen

L.ef t justi fy cursor on cur rentline

[ARG] [GOB] Clear to end of line

Apple PIE Cassette 16K $19_95

TRS-80P.IE Cassette 16K 19,95

Apple PI E Disk 32K 24.95

IHOME]

[-PAG]

[+PAG]

[LTAB]

[RTAB]

I-SCH]

[+SCH)

[INS]

[DELI

[DBLK]

[APP) [APP]

6502FORTH . Z·80FORTH6800 FORTH

FORTH is a unique threaded language that isideal ly suited for systems and applicationsprogramming on a micro-processor system.The user may have the interactive FORTHCompiler/Interpreter system running stand-

alone in BK to 12K bytes of RAM, The

svstern also offers a built-in incrementalassembler and text ed itor . S ince the FORTHlanguage is vocabul ary based, the user maytailor the system to resemble the needs andstructure of any specific application,Programming in FORTH consis ts of ' def in ingnew words, which draw upon the exist ingvocabulary, and which in turn may be usedto define even more complex applications.Reverse Polish Nctarlon andLI FO stacksare used in the FORTH system to processar ithmet ic expressions. Programs " ,r it ten inFDRTH are compact and very fast.

SYSTEM FEATURES 8 < FACILITIES

Standard Vocabu lary with 200 wordsIncreme nta! Assam bl erStructured Programming ConstructsText EditorBlock 1/0 Buffers

Cassene Based SystemUser Defined StacksVariable Length StacksUser Defined DictionaryLogica l Dic tionary L imitError Detect ionBuffered Input

CONFIGillJRAilONS

AppieFORTH Casset te 16K

AppleFORTH Disk 32K

PetFORTH Cassene 16K

TRS·BOFORTH Cassette l 'SK

SWiPC'FORTH Cassette 16K

$34.95

49.95

34.95

34,95

34,95

LISA ,INTERACTIVE ASSEMBLER

SOFT\NARE

ASM/65 EDITOR ASSEMBLER

ASM/65 isa powerful , 2 passd isk-based

assembler for 'the Apple II Computer System. mt is a ".ompatibla SUbset .of the FORTRAN cross-ssemblers which are avai lable for ' the 6500familY of micro-processors. ASM/65 featuresmany power fu l capab ili ties , which are under

direct contra! of the user. The PIE Text Editorco-rss ldes wi th the ASMI65 Assembler ' to formacomprehensive development tool for theassembler language programmer. Followingare some of the features available in theASM/65 Editor Assembler,

PIE Text Edi to r Command Repetoi reDisk Based svsternDecimal, Hexadecimal, Octal, & BinaryConstants

ASCII Literal ConstantsOne to Six character long symbolsLocation counter addressing "."Addit ion & Subtract ion Operators inExpressions

High-Byte Selection OperatorLow-Byte Selection OperatorSource statements of the form:

llabel l (ope.ode] loperandl[;comment]

56 val id machine instruction mnemonicsAll val id addressing modesEQuate DirectiveBYTE Direct ive to ini tial ize memory

locations

WORD Direct ive to initlahz e 1G-bit wordsPAGE Direct ive to control source l is tingSKIP Di rective to contro l source listingOPT Directive to set select opt ionsLI NK Directive to chain multiple text filesCommentsSource lining with object code andsource statements

Sorted symbol table l isting

CON,FIGURATWN

Apple II 48K/Disk $69.95

LISA is a totauv new concept in assembly language programming. Whereas all other assemblersuse a separate or co-resident t ext editor to enter the assembly language program and then anassembtartc assemble the source code, l iSA is fully interactive and per fo rms syntax/address ingmode checks as the source code is entered In. This is similar in operation to 'the Apple II I ntegerBASIC Interpre te r. Al l e rror messagesthat are displayed are in plain, easy to understand Eng lish ,and not simply an Error Code. Commands In LISA are structured as close as possible to thosein BASIC, Commands that are included are; LIST, DELETE, INSERT, PR ifn, IN#r \, SAVE,LOAD, APPEND, ASM, and a special user-dafinaaba key envisioned for use with "dumb" per-lpherels. LISA is OISK II based and will assemble programs with a tex tfile too tong to fit intothe Apple memory, Likewise, the code generated can also be stored on the Disk, hence freeingup memory for even larger source programs. Despite these Disk features, LISA is very fast; in factUSA is faster than most other commercial ly avai lab le assemblers for the Apple 1 1. Not only isL ISA faster , bu t also , due to code compress ion techniques used LISA requi res less memoryspace for the text file. A full source list ing containing the object and source code are producedby LISA, in addition to the symbol table

AppleIl 32K/Disk $34,95

PR,DGRAMMAINTERNATIDNAL,

3400 Wilshilre Blvd.Los Anqeles, CA 90010

(213) 384-0579 • 384-1116 • 384-1117

NC.

App le I I i sa registered trademark of Apple Computers, Inc, These professional productsare ~vai lable at your local computer dea le r.

u r.,aa . cc Enc t .II

Page 3: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 3/68

I.w.~ IISeeifYOUqualify~oracClofOCP/Fcard PETTM• I~~ and get great discounts on selected

purchases for your Apple and PET.

We have the Most Complete stock of APPLEandPETSoftware in Southern California.

(Send for our Catalog - $1.00)16K RAM CHIP SET FOR APPLE II

ONLY (Tested & Burned In) . . . . . $9500Reference Books For APPLE and PET ownersProgramming the 6502 . . . . . . . . . . . 9.95PETUserManual (New from Commodore) 9.95First Book of KIM 8.95MOSTech Programming Manual (6502) 12.00

MOSTech Hardware Manual 12.00

WORKSHOPS: Call for details.• PET=sro Saturday of the Month

• APPLE-4th Saturday of the Month

CLASSES:Apple Topics

we offer a series of classeson Apple II to aquatnt owners with some of the unique features and capabilitiesof their system. Topics covered are APple Sounds, Low Res.Graphics, Hi Res.Graphics, Disk Basics,and How to use

Your Reference Material. Sessionsare held every Thursday Night at 7:00p.rn.

HARDWARE FORAPPLE II HARDWAREPET HARDWARE• Upper & Lower Case BoardNOWy ou can display both upper and lower case characters onyour video with the Apple II. Includes assembled circuit board

and sample software .549.95

• programmer Aide. . . . . . . . . . . . .... 550.00

PRINTER SPECIALS FOR APPLE AND PET

• TRENOCOM 100 with interface for Apple or PET

• LITE PEN used with TV or monitor screen ..

$4S0.00

...... 34.95

• PET 2001·8 computer Standard PETw ith integral cassetteand calculator type keyboard BK bytes of memory(7167 net) .. .. $795.00

• PET 2001·16N computer PETwith 16K bytes of memoryand large keyboard with separate numeric pad andgraphics on keys . External cassette optional .115.359 net) . . . .. ... ... . .. $99S.00

• PET 2001·168 computer ASabove but has standard tvpe-writer keyboard. No graphic keys $995.00

• PET 2 001·32N Computer Identical to 2001·16N with 32Kbytes of memory. 131,743 net)... . . $1.~S.00

• PET 2001·328 Computer Identical to 2001·32B with 32Kbytes of memory. 131.743 net)...... . ... $1,:t95.00

•Retrofit kit required for operation with PET2001·8.

PER I PHERALS

• PET 2021 Printer 80 column dot matrix electrostatic printerwith full PET graphics capability. . ... $549.00

• PET 2 022 Printer 80 column dot matrix printer with plainpaper or forms handling tractor feed. Has full PETgraPhics .. . .. . .. . .. $995.00

• PET 2 023 Printer 80 column dot matrix printer. Plainpaper printer with full PET graphics. .. $849.00

• PET 2040 Dual Drive Mini Floppy Disk' Dual drive intelligentmini nooov system. 343K net user storagecapacity. .. . ... $1 ,29S.00

SOFTW ARE FOR PET

Mirrors and Lenses 19.95The States .. 14.95Real Estate 1 & 2 59.95Momentum and Energy .. 19.95Projectile Motion 19.95Mortgage... .. 14.95Dow Jones.. ... .7.95Petunia Player srtwr .. .14.95

Checkers and Baccarat 7.95

cness ... ... .. .. 19.95Series Parallel andCircuit Analysis .. 19.95Home Accounting 9.95BASIC Math... . 29.95Game Playing with BASICVol. I. I I. III... . .... 9.95 each

LIMITEDQUANTITYRefurbished selectric typewriters serially interfaced for plug into APPLE 11 $1000.00All orders must be prepaid. DeliveryIn 4 to 8weeksAIIOor full refund.

• Anadex DP·8000 with tracter8" paper width and Apple interface 51050

• Centronics 779-2 for Apple IIWith parallel interface 51245.00

SOFTWARE FORAPPLE II

• PASCALf rom Programma.• FORTH .• LISP-from Apple Software Bk NO.3 .• LISA-Interactive disk assembler .• WHATSIT-Excellent conversational data basemanager 32K 100.00 48K 125.00

• SARGON-Best chess we carry. . 19.95• APPLE PIE-Excellent text ecttor. .. . ... .. ... '" 24.95• FORTE-Music editor in hires............ .... .. 19.95• FASTGAMMON-Excellent backgammon gamewith graPhics Tape 20.00 Disk 25.00

• APPLE 21-Excellent blackjack game. . . . . .. . 9.95• BRIDGE CHALLENCER-computer bridge. . . 111.95• FINANCIAL MANAGEMENT SYSTEM• Accounts payable• Accounts Receivable• Inventory Control• 5200 sacn Package

49.9549.95

.. N /C. 311.95

• Ledger Processing• Payrol l• 5800 Complete• 510 for Manual

WHY SHOULD YOU BUY FROM US?Because we can help you solve your problems and answer your questions. We don't claim to know

everything, but we try to help our customers to the full extent of our resources.-Prices subject to cnanae=-

COMPUTER COMPONENTS OF ORANGE COUNTY6791 Westminster Ave., Westminster, CA 92683 714-891-2584Hours: tues-rn 11:00 AM to 8:00 PM-sat 10:00 AM to 6:00 PM (Closed Sun. MOn)

Master Charge, Visa , B of A are accepted NO COD Allow 2 weeks for personal check to clearAdd S1.50for handling and postage For computer systems please add 510.00 for shipping. handling and

insurance. California residents add 6°0 sales Tax

Page 4: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 4/68

PROGRESSIVE SOFTWAREPRESENTS SOFTWARE AND HARDWARE FOR YOUR APPLE

Software:SALES FORECASTThiS prog ram wi ll glYe yO" the best forecast "sing the fou r most popu lar forecas ting techn iques , suoh as l inea r regress ion ,

l og tr end, power curve t rend, and exponential smoothing. The program "ses ar tlfl olal intelilgenoe t o make the deoisl on on

the best f it , and disp lays al l resu lt s for manua l opeat lon I f desi red . Wri tten by Nel l D.Upson , requ ires 161<memory.

CURVE F ITWill take any number of data points In any faslon, and glYe you the eneree of having the oomputer ohoose the Dest

curve fit, or you may choose yourself what type of fit you desire. The four given are log curve fit, exponential curve fit,l eaat squares , and powe r CUM f it . The resul ts a re then graphed . Wri tten by Dave Garson , requ ires 16K memory.

CALENDARThis program will perform two functions: days between dates (any two dates) or a perpetual calendar. If the calendar is

chosen, it will automatically give the successive months by merely hitting the return key. May be used with or without a

p rinter . Wri tten by Ed Hanley, requi res 16K memory.

STARWARSThe original and best starwars game. wr itten by Bob BIShop. You f ire "pan t he tie fi ghter after aligning the fighter In your

crosaha trs. This i sa h igh reso lut ion game Incolor tha t uses the padd les . Requi res 16K memory.

ROCKET P il OTThis is an exciting game where you are on a planet taking off with your rocket ship, trying to fly over a mountain. The

s imulat ion o f the rocket b lasters ac tual ly aocelerates you up , and If you are not car eful, you will run out of sky. The contour

of the l and Changes each time you play the game. Wr itten by Bob Bishop, requires 16K memor y.

S PAC E MAZEThis game puts you in a maze with a rockey ship, and you try to "steer" out of It with your paddles or joystick. It's a real

chal lenge. I t I s done Inh igh resolut ion graphlos Incolor , done by Bob BIShop. Requi res 16K memory .

SAUCER I NVAS IONThis program was written by Bob Bishop. You are being Invaded by a flying saucer and you oan shoot at it with your

m iss il e and oont rol the .posl tl on wi th you r padd le . Requ ires 16K memory.

MISSllE·ANTI·MISSILEMlsslle-Antl·Mlssile Is a high resolution game. The viewer will see a target appear on the screen, followed by a 3-

dimensional digital drawing of t he Unit ed States. Then a small submar ine appears. The submarine Is contr oll ed by hostile

forces (upon pr essing the spaoe bar ) whi ch l aunChes a pre-emptive nuclear strike upon t he United St at8l(controlled by

paddle No.1). At the time that the missile Is fired from the submarine, the United States launohes Its own antl·mlsslle

( the antl·mlsslle Is controlled by paddle No. 0). There ar e many levels of play dependi ng upon the speed. Wr itten by Daye

Moteles and Ne ll L ipson . Requ ires 16K memory.

MOR SE C OD E

This program allows the user to learn morse code by the user typing In letters, words or sentences In english. Then the

dot s and dashes are plotted on the soreen. At the same t ime sounds are gener ated t o mat oh the screen's output. SeYeral

t ransmission speed leve la are ayal lab le. Wr it ten by Ed Hand ley. Requi res 16K memory.

P OL AR C OO RD IN AT E P LO TA high resol ution gr aphlos pr ogram whl oh provldea the uaer with 5 primary olaaslc polar coordinate pl ota and a method by

whloh the user can Insert his own equation. When the user'a equation Is Inserted Into the program It will plot on a

numbered grid and then Immediately altar plotting, flaah, In a table form, the data needed to oonstruct such a plot on

pape r. The p rog ram takes 16K of memory and ROM board. Wri tten by Dsye Motales.

U TIL IT Y P AK 1Th is Isa combinat ion of 4 prog rams: (by Vince Co rset ti )

I nteger to Applesoft Conversion· this program will conver t any Integer basic pr ogram to an appl eaoft pr ogram. After you

f in ished , yOUmeraly cor rec t a ll of those syntax e rrors tha t occur w ith appleso ft on ly .

Dlak Append· will append any two Intagar programa fr om a dl ak I nto one program.

Integer Basic Copy· allows you to copy an Intagar baalc program from on. disk to another by merely hitting return.

Useful when copy ing the same p rog ram many t lmas.

Update Applesolt · will cor rect Applesof t on t he disk t o el imi nate the heading that always occurs when I t I S I ni tial ly run.

Bi nary Copy· this progr am caple. a binary fil e fr om one di sk t o another by merel y hitt ing r eturn. I t aut omati cally finds

the length and star ti ng address of the p rogram for you r convenience.

BLOCKADE

Two people tr y to block asch other by bull dlnga walls and bl ocking the other. An exoltlng game wri tten In Integer baslo for16K. Wri tten byVince Corsatt l.

TABLE GENERATORIs a program which forms shapa tables with eaae. Shape tables are f ormed fr om direct ional vectors and the pr ogram alao

adds other Information such as starting addreas, length and position of each shape. The table generator allowa you to

save the Shipe table In any usable locatiOn In memory. It Is an applesolt program. Written by Summary Summers.Price: S9.115 .

AllProgr.ml .. ,... ,19.95EACH

AllProar.ml.re 18K unl••1peclfl.d.

HARDWARE:

L IGH T P EN

Includes 5 progr ams. Li ght Met er, whl oh gives you r eading of li ght every f raction of a second fr om 0 t o 568. Thal lght graph

will graph the yalue of light hitting the pen on the screen. The light pen will "draw" on the screen points which you have

drawn and t hen connect them. I t will also give t he coordlnatea of the points If destred, drawn In I e-r es. The four th pr ogram

will do the same except draw It In hl·res. The fifth program Is a utility program that allows you to place any number of

points on the screen for use In menu selection or In games, and when you touch this point, It will Choose It. It Is not

oonfused by outSide light, and uaes artificial Intelligence. Only the hl.,es light pen requires 48K and ROM card.Wri tten by Ne ll D. L ipson .

Light P.n IUpported by 5progreml. , ... 134.95

Send Check o r 1.1.0. to P.O. Box 27;), Ply. Mtg., PA 19482 Programs Accepted lor Publicatlon·Hlghest Royalty Paid

Postage and Handl ing · Add S1 .OOfor f ir st I tem than 50' for each add'i PA R88ldents Add B% Sales Tax

Page 5: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 5/68

July 1979

Issue Number Fourteen

12

6018

47IBC

218

BC

63

418IFC

52

Table of Contents

A Baudot Teletype Driver for the APPLE II

by Lt. Robert Carlson, USN

Structured BASIC Editor and Pre-Processor

by Robert Abrahamson

Intercepting DOS Errors from Integer BASIC

by Andy Hertzfeld

AIM Your Spouse toward Success at the Supermarket

by Melville Evans and Vernon Larrowe

Boolean Equations Reduced on the PET

by Alan K. Christensen

Screen Dump to Printer for the APPLE IIby R. M. Mottola

OSI Memory Test in BASIC

by William LTaylor

SYM and AIM Memory Expansion

by Paul Smola

The First Book of Kim - on a SYM

by Nicholas Vrtis

AMPERSORT

by Alan G. Hill

The MICRO Software Catalog: X

by Mike Rowe

To Tape or Not to Tape: What is the auestion?

by Noel G. Biles

6502 Bibliography: Part XI

By Dr. Wil liam R. Dial

5

7

17

19

23

27

29

30

35

39

54

57

61

Staff

Publisher

Robert M. Tripp

Editor

Shawn Spilman

Business Manager

Maggie E. Fisher

Circulation Manager

Carol A. Stark

Distribution

Eileen M. Enos

Janet Santaguida

Micro-Systems Lab

James R. Witt, Jr.

Stephen L. Allen

Comptroller

Donna M. Tripp

MICRO'" is published monthly by:

MICROInk, Inc.

34Chelmslord Street

Chelmsford, Massachusetts

6171256·5515Mailing address for all correspondence, subscrlp-

tions andaddresschanges is:

MICRO

P. O. Box 6502

Chelmsford, MA01824

Application to mail at second-class postage rates

is pending at: Chelmsford, MA01824.

Publication Number: COTR395770

Subscription in United States:

$15.00per year/12 issues.

Entire contents copyright C f' 1979by:

MICROInk,Inc.

Computer Components

Computer ForumThe Computer Factory

The Computerist, Inc,Computer Shop

Connecticut microComputers

Edward Enterprizes

Electronic Specialist, Inc.

Elliam Assciates

EXCERT, Inc.

Hudson Digital Electronics

MICRO

Microspan

MICRO Technology Unlimi ted

Advertiser's Index

1

6415

31·346

2216606021

38-

605259

Optimal Technology,lnc.

P.S. Software House

Plainsman Micro Systems

Powersoft, Inc.Programma International

Progressive Software

Pygmy Programming

RNB Enterprises

Seawell Marketing

Softape

Softouch

Weldon Electronics

West Side Electronics

Page 6: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 6/68

APPLE HI-RES GRAPHICS: The Screen Machine by Softape

Open the manual and LOAD the cassette.Then get ready to explore

the world of Programmable Characters' with the SCREEN MA·

CHINETM. You can now create new character sets - foreign alpha-

bets, electronic symbols and even Hi-Res playing cards, or, use the

standard upper and lower caseASCII character set.

The "SCREEN MACHINE" lets you redefine any keyboard character.

Justcreate any symbol usinga few easykey strokes and the "SCREEN

MACHINE" will assign that symbol to the key of your choice. For

example: create a symbol, an upside down "A" and assignit to the

keyboard 'A' key. Now every time you pressthe 'A' key or when the

Apple prints an 'A' it will appear upside down. Any shape can be

assignedto any key!

IIIIIIilil

.IIIaeUoS

The "SCREEN MACHINE" gives you the option of saving yo

character symbols to disk or tape for later use.There is no cornp

catsd 'patching' needed. The SCREEN MACHINE is transparent

your programs. Just print the new character with a basic print sta

ment. The "SCREEN MACHINE" isvery easyto use.

Included on the cassette are Apple Hi-Has routines in SOFTAPE

prefix format. You can use both Apple's, routines and the SCREE

MACHINE to create micr ocornputinq's best graphics.

Cassette.and Documentation, acomplete package $19.9

MICROGAMMON 1.0 Learn, practice and inhance your Backgammon

ability with a true competitor $14.95

APPLE-LlS'NER Voice recognition Software. Create your own pro-

grams which 'Iisten' and understand 31 spoken words - English or

Foreign. No hardware needed $19.95

APPLE TALKER Your Apple's voice. Create programs which talk to

you in English or Spanishor any language $15.95

JUPITER EXPRESS Command your ship thru the hazards of the

Asteroid belt between Marsand Jupiter $9.95

FORTE' A music language,written like basic. you use line numbers

for your notes. You can trace line numbers or notes. You can even

print the words of any song.Saveyour songto your Disk . $19.95

FORTH ][ Is the creation of Wm. Graves. This language givesyou

faster execution of programs than basic and is easierto program than

machine language.Our 100 page manual will teach you everything

you will need. FORTH JC comes complete with demo programs on

one Apple diskette . . . . . . . . . . . . . .. $49.95

WHERE TO GET IT: Look for the SOFTAPE Software display in

your local computer store. Apple dealers throughout the United

States, Canada, South America, Europe and Australia carry the

SOFTAPE Software line of quality products.

If your local dealer issoldout of SOFTAPE Software you can order it

direct from us by check or Visa/Master Charge.If you haveany ques-

tions pleasecall usat:

~ 1-213-985-5763Or mail your order to the address below. We'l l add your nameto our

mailing list for free literature and announcements of new products.

SOFTAPE=TM--

. " " - ~ . _ ~ ~ u , : ; : " : " ~ ",1~"\......0.--_

BRIGHT PEN What is the difference between a light and a Brigh

Pen?Intelligent Software and extensivedocumentation .... $34.9

Page 7: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 7/68

A Baudot Teletype Driver for the APPLE II

Hard copy output can be economical if low cost surpluscomponents are adapted to a 6502 system. Once the I/Ointerface has been achieved, character code incompatl-

bility need not be a problem.

For many APPLE II owners, the invest-

ment in a high quality ASCII printer has

to be deferred for a while and, in the in-

terim, a printer of some sort is still high-

ly desirable. One very inexpensive way to

fill this need is to use the common Bau-

dot Teletype. Typically, any of several

models in good working order can be ob-

tained for anywhere from $25 to

$300. Large numbers of these units

are made available as surplus by the

telephone companies, the National

Weather Service, and all branches of the

Armed Forces.

As surplus, they sell for a small fraction

of their original value. Of course, these

Teletypes use an obsolete five bit

character code, Baudot, but the follow-ing program performs the conversion

from Baudot to ASCII automatically.

If for some reason you need to use an

ASCII character that does not convert

directly to Baudot, such as the ..= "sign, the program will print a space that

you can fill in later. Alternatively, one

could substitute some other Baudot

character by changing the appropriate

value in the lookup table. This problem

is rarely encountered, except in certain

BASIC program listings.

The program combines ideas from many

other programs, but basically it is an

adaptation of Chuck Carpenter's pro-

grams that appeared in MICRO 3:13 and4:27. The program makes use of ANO,

a one bit output port available on the

paddle connector socket. There are no

addresses used outside the program

that can be "stepped on" by the system

monitor or BASIC programs. While the

printer is running, the characters will

still appear on the video monitor normal-

Iy, as they are printed.

Enter the program from the monitor at

$300. From Integer BASIC use a "CALL

768," and from AppleSoft use something

like A = USR 768. To exit while in the

monitor, hit RESET and when in either

BASIC. use "PR#O." '

0020:

0030:

0040:

0050:

0060:

0010:

0080:

0090:

0100:

0110:

0120 :

0130:

0140 :

0150 :

0160:

0110 :

0180 :

0190 :

0200:0210:

0220:

0230:

0240:

0250:

0260:

0210:

0280:

0290:

0300:

0310:

0320:

0330:

0340:

0350:

0360:

0310:0380:

0390:

0400:

0410:

0420:

0430:

0440:

0450:

0460:

0410:

0480:

0490:

0500:

0510:

0520:

0530:

0540:0550:

0560:0510:

0580 :

0590:

(}600:

0610:

0620:

0630:

0640:

0650:

10 CALL 768

20 PRINT "TESTING BAUDOT DRIVER

1234567890. "

30 PR#O

40END

To change from 60 WPM to 100 WPM

operation, change the timing value at

$377 from #$5F to #$48. The output can

be inverted by exchanging the values at

$36F and $374.

0300 A9 09

0302 85 36

0304 A9 03

0306 85 31

0308 60

0309 8C C2 03

030C 8E C3 03

030F 48

0310 20 20 03

0313 68

0314 C9 80

0316 DO OC

0318 48

0319 A9 00

031B 20 20 03

031E A9 8A

0320 20 20 03

0323 68

0324 AC C2 03

0321 AE C3 03

032A IIC FO FO

0320 29 7F

032F A2 3F

0331 DO 81 03

0334 FO 01

0336 CA

0331 10 F8

0339 A9 04

033B DO 01

0330 8A

033E C9 20

0340 BO 15

03112 2C C4 03

03115 10 OC

03111 118

03118 A9 00034A 80 CII 03

0340 A9 1F

034F 20 66 03

0352 68

0353 20 66 03

0356 60

0351 2C C4 03

035A 30 F1

035C 48

0350 A9 80

035F 80 C4 03

0362 A9 lB

03611 DO E9

0366 AO 01

0368 18

0369 09 EO

036B 118036C BO 05

036E 80 59 CO

0311 90 03

0313 AD 58 c o0316 A9 5F

0318 20 A8 FC

031B 68

031C 6E A8 FC

031F 88

0380 DO E9

0382 60

July 1979 MICRO-The 6502 Journal

Lt.Robert Carlson, USN

N0AOT

3332 Crabapple Road

Virginia Beach, VA 23452

ORGLOAIM

ST ALOAIM

ST ARTSST YST XPHA

JS RPI. ACMPIM

SNEPHA

LOAIM

JS RLOAIM

JSRPLA

LOY

LOX

JMP

ANOIM

LOXIM

CMPX

BEQOEX

BP LLOAIM

BNEIXACMPIM

BCSBI TBPL

PHA

LOAIM

ST ALOAIM

JS RPLA

JSRR TSBIT

BMI

PHA

LOAIM

ST ALOAIM

BNELOYIH

CLC

ORArMPHA

BCSSTABCC

LOA

LOAIM

JSRPLA

RORDEY

BNE

RTS

$0300

$09

$0036

$03

$0031

$03C2

$03C3

$0320

$80

$03211

$00

$0320

$8A

$0320

$03C2

$03C3

$FOFO

$1F

$3F

$0381

$0330

$0331$011

$033E

$20

$0351

$03C4

$0353

$00

$03C4

$lF

$0366

$0366

$03C4

$0353

$80

$03C4

$lB

$034F

$01

$EO

$0313

$C059

$0316

$C058

$5F

$FCA8

$036B

Page 8: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 8/68

VISA AND WASTER-

CHARGE ORDERS AREBOTII ACCEPTED.

C1 P M F: $995 ! First floppy disk based computerfor under $10001 A dramatic breakthrough in price and per-

formance. Features OSI's ultra-fast BASIC-in-ROM, full graphicsdisplay capability, and large library of software on

disk, including entertainment programs, personal finance,small business, and home applications. It's a complete pro-

grammable computer system ready togo. Just plug-in a videomonitor or TVthrough an RFconverter, and be up and running.

Can be expanded to 32K static RAMand a second mini-floppy. It also supportsa printer, modem, real time clock, and AC remote interface, as well as OS-65D

V3.0 development disk operating system.

L[ ]mpUTEASH[ ]P288 Norfolk St. (Cor. Hampshire St.)

Cambridge, Mass.02139

617-661-2670

590 Commonwealth Ave.

Boston, Mass.02215

617-247-0700

Route 16B

Union, N.H. 03887

603-473-2323

Page 9: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 9/68

Structured BASIC Editor and Pre-processor

Enter, list, modify and resequence BASICprogramswiththis versatile pre-processor for the OSIChallenger. Hereis one editor that you can modify because it is written

in BASIC. What's more, you can modify it in structuredBASIC because the structured BASIC syntax is lmple-mented asabonus.

This program is a line editor and pre-

processor which converts a structured

BASIC program into executable BASIC

statements. It is written in Microsoft

BASIC and takes up about 10K of memo

ory. Using only string operations, it

changes IF THEN ELSE, DO WHILE,

CASE, REPEAT UNITL. and REPEAT

FOREVER structures into their aquiva-

lent forms.

The editor works by first reading in a

string and comparing this string to a list

of commands (see Figure 1). If it

matches the string to a command, it then

branches to the appropriate routine.

Without a match, the program assumes

that the string is a line of text. It next

compares each character to a pound

sign and a backwards slash. These

characters are immediately changed to

a comma or colon, respectively. Since

BASIC does not accept commas or

colons in an input string, this is a neces-

sary inconvenience.

Besides these constructs, it also allows

the use of subroutine names. The editor

portion of the program can add lines,

delete single lines, delete blocks of

lines, modify existing lines, print out a

single line, print out a block of lines,

print out the complete text. and reo

sequence all of the lines. Table I is a list

of editor commands.

After this, the program tries to parse out

the line number and checks for at least

one non-nurnerlc character after the line

number. A missing line number initiates

an error message. Thus, an illegal corn-

RESEQ

LIST

LIST X

Table I - Editor Command Summary

Renumbers all lines in multiples in ten.

Prints out entire text.

X is a valid line number. Prints out only line number X.

The space between LIST and X is optional.

X is a valid line number, and Y can be any number.

Prints out all lines from X to Y. There must be at least

one non-numeric character between X and Y .

Same restrictions as LIST X. Deletes only line

number X .

Same restrictions as LIST X Y . Deletes all lines from

X to Y.

Same restrictions as LIST X. Allows you to modify

Ii ne number X. Program asks for a stop character and

repetition.

Has the effect of clearlnq the text by breaking links.

Command to start pre-processing.

LIST X Y -

DELX

DELXY

MODX

NEW

BASIC

July 1979 MICRO- The 6502 Journal

Robert Abrahamson

5533 25th Avenue

Kenosha,VVl53140

mand would cause a message stating

that one forgot the line number. On th

other hand. a line number without Ioltow

ing text would be interpreted as a r

quest to delete that line number.

Upon finding a line number and text.

strips the line number from the text an

stores the line number, separately, in

doubly linked circular list with a hea

node at an index of zero (see Figure 3).

The preprocessor alters the text r

ceived by the editor and returns contro

to the editor when processing is finished

or an error is detected. First the pre

processor (see Figure 2) resequences

the line numbers, insuring enough room

to add lines later. The next step is t

parse out the first token in the first line

This token is then compared with "SUB

ROUTINE." A match tells the program

that this is a statement which declares

subroutine; to save the subroutine nameand line number in the subroutine name

table.

Matching with CASE, THEN, DO, RE

PEAT, ELSE, or a semi-colon requires

the program to parse out the arithmetic

expression, if it exists, and store i

along with a structure type code and line

index, on the stack. A match with "END"

causes a record to be popped from the

stack, and a branch to a routine which

converts that type of structure into

standard BASIC statements.

If no match is found for any of these

keywords, each character thereafter i

compared with the ampersand, which

is reserved for use only as the first

character in a subroutine name. Finding

an ampersand, the program parses ou

the subroutine name and stores it in the

subroutine call table, along with line

index, line length, and start and stop

positions of the name. This same pro

cedure is then repeated for every line o

text. After finishing this, the subroutine

call table is read, and every subroutine

14:7

Page 10: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 10/68

name in the text is changed to a line

number. This completes the pre-

Processing.

There are a few things to keep in mind

when using this pre-processor. You

should be very careful when coding

GOTO statements, because the line

numbers are resequenced before pro-

cessing. The structured input text is

altered, and so the structured text for all

practical purposes is lost. As for

using the structured statements, follow-

ing the examples in the printout shouldhelp. Remember that in all of the struc-

tured statements spaces are necessary

between words, and spaces must not be

used within an arithmetic or logical ex·

pression. This is because the program

uses the space, colon, and end of line

to identify an expression or word ending.

Multiple structured statements per line

cannot be used because the program

sees only the first one.

This pre-processor is relatively easy to

use with a cassette interface. First enter

the structured program using the editor,

then convert it to BASIC with the Basic

command. When you see the message

stating that pre-processtnq is finished,

type in "LIST" but do not hit return. Turn

on your cassette, and then hit return.

You now have the program on tape and

can load it like any other program.

I N P U T L I N E

P E R F O R MC O M M A N D

P A RS E L I N EN U M B E R

L I N K L I N EW I T H R E S T

O F T H E L I N E SI N O R D ER

Figure 1: Editor Flow Chart

14:8

, R E M • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •2 R E M • • • • P R E - P R O C E S S O R T O C O N V E R T S T R U C T U R E D B A S I C T O • • • • • • •3 R E " . . . . B A S I C • • • • • • •4 R E M . . . . B Y R O B E R T A B R A H A ~ S O N • • • • • • •5 R E ~ " " 4 M A Y 7 9 • • • • • • •

6 RE~ ••••••• • • ••• ••••••••••••••••••••••••••••••••••••••• ••••••l e O l ~ T S ( 10 e ). L L <1 0 1) . R L( 1 01 ) . LN ( 19 1 l .S C S( 2 0 ). S T (Z 0 .4 )2 0 0 1 ~ S O S ( 2 0 ) . S U ( 2 9 ) . A R S ( 1 0 ) . S R ( 1 0 ) , I N ( 1 9 )3 0 R E ~ • • • I N I T I A T E A V A I L A B L E P O O L O F N O D E S • • • • •4 1 llF O R I = 1 T 0 9 9 :R L ( I ) = I+ l IN E X T I5 0 R L (1 e 0 )= 0 : A V = 1 :R L (0 ) = e: L L( 9 ) =96 0 I N P U T S 57 9 R E ~ • • • D E C O D E C O ~ ~ A N O S • • • • •8 0 I F LE F T S( S S. 3 ) =· N E~ · T HE N 309 0 I F L EF T S( S S .3 ) =· O E L- T HE N 8 6~1 0 0 I F LE F T S( S S. 3 ) =- M OO · T HE N 96 01 1 0 I F LE F T S( S S. 4 ) =· L IS T · TH E N7 3 91 2 0 I F LE F T S( S S. 5 ) =· R ES E O ·T H EN G O SU 8 37 0 I GO T 06 01 3 0 I F LE F T S( S S. 5 ) =M B A SI C · TH E N 17 9 01 4 0 R E ~ • • • A S S U M E L I N E O F T E X T • • • • •1 5 0 G OS U B 1 32 0 : G O S U B 4 5 1!1 69 I FP (> 0 T HE N1 901 7 0 P R I N T · O j ( . ~ H E R E ' S T H E 1 I N E N U ~ B E R ? ·

1 8 9 G O T 0 6 01 9 0 I F L G > I T H E N 2 2 02 09 G OS UB 64 01 1 F GN :: 0T HE N6 02 1 0 G O S U a1 2 2 0 1 G OT 0 6 02 2 0 S S = R I G H T S( S S ' L G - I)2 3 0 R E ~ • • • L O C A T E ~ H E R E T O A D D I N N E ~ L I N E • • • • •

2 4 9 G N = LL ( 0 )2 5 0 I F G N = 0 TH E N A N= 0 IG O T 0 3 4 02 5 5 I F LN > L N( G N) T H EN A N =G N I GO T 03 4 02 6 0 I F LN < L N( R L( 0 » TH E N A N = 0 IG O T0 3 4 0

Z70 G N = 02 8 0 G N =R L ( G N ) II F G N = 9 TH E N 3 Z 92 9 0 I F LN = L N( G N) T H EN A N =L L ( GN ) :G O T 03 3 93 0 0 I F LN > L N( G N) A N D LN < LN ( R L( G N» T H EN A N =G N I GO T 03 4 031 0 GO TOZ 80

3 2 9 P R I N T - I C A N ' T F I N D A S P O T F O R T H E N E W L I N E · M I G O T 0 6 0

3 30 G OS US 1Z Z03 4 0 G O S US l l S 03 5 0 I F G N = 0 T H E N P R I N T - O U T O F T E X T S P A C E - : G O T 0 6 03 6 0 G O S U e 1 27 0 1 G O T OS 03 7 0 R E ~3 8 0 R E M • • • R ES E Q U E N C E R O U T I N E • • • • •

3 9 9 R E ~4 00 G N= 9: LN =1 94 1 0 G N = R L (G N )

4 2 0 I F G N = I 1T H E N P R IN T : R E T UR N4 3 0 L N ( G N) = L N : L N= L N + 1 94 4 0 G O T 04 H l4 51 1 R EM

4 6 0 R E ~ • • •4 H ! R E f o I• •4 8 0 R E ~ • • •4 9 0 R E w • • •5 01 1 R EM • ••

5 1 0 X = 15 2 0 L G = L E N ( 5 S )5 Z 5 I F X > L G T H E N P = I 1 I R E T U R N5 3 1l F O RP = XT O L G5 4 0 : : A =A 5C ( " 'I O S ( S s . P . , »5 5 0 I l tF A >= 4 8A N O A < = 5 7 T H E N 5 8 0S 6 1 l N E X T P5 70 P =0 I R ET UR N

S 8 1 l F O RI = PT O L G5 9 1l I : A = A SC ( ~I O S (S S 'I . l »6 0 0 : I I FA < 4 80 R A > 57 T HE N I =I - l: G O TO S 31 l6 1 0 N E X T IS 21 l 1 =1 -16 3 9 L N = V A L( M I D S( S S . P . I - P + 1 » I R E T U R N

6 4 0 R E M6 5 0 R E M • • • S U B R O U T I N E T O F I N D L I N E N U ~ 8 E R • • • • •6 6 e R E M . . . I N P U T L N = L I N E N U M B E R6 7 e R E M . . . O U T P U T G N = I N D E X

F I N D S T A R T O F L I N E N U ~ B E R .I N P U T S : S S = S T R I N G T O P A R S EO U T P U T S : P . I = S T A R T A N D E N D

L N = L I N E N U ~ 8 E RL G = L E N G T H O F S S

P A R S E I T O U T • • • • •

O F L I N E N U M 8 E R

. . . . .•••••

MICRO- The 6502 Journal July 1979

Page 11: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 11/68

6 8 0 R E M6 9 0 G N = 07 3 0 G N =R L { G N ): I F G N =0 T H E N RE T U R N7 1 0 I F L N = LN { GN ) TH E N R E TU R N7 2 8 G O T 0 7 " 07 3 0 R E M7 4 0 R E M • • • L I S T R O U T I N E • • • • •7 5 0 R E M7 60 G OS U S. S07 7 0 1 F P = 0 T H E N 8 2 07 80 G OS U B6 40 07 9 0 I F G N = 0T H E N P RI N T I G OT O S 08 "0 X =I .l I GO SU B5 20 rI FP = 0T HE NP RI NT LN (G N) ; T S( GN ): GO T0 60

B 0 1 P R IN T L N ( G N ) ;T S ( G N )r G N= R L{ G N)8 0 2 I F L N ( GN ) < = L NA N D G N < >0 T H E N 80 1

8 '0 " GO T 06 08 2 0 G N : "8 3 0 G N =R L { G N )r I FG N =" T ~ E N PR I N T : GO T 0 6 08 4 0 P R I N T L N ( G N ) : T S { G N )8 5 0 G O T 0 8 3 08 S 0 R E M8 7 0 R E M • • • D E L E T E C O M M A N D P R O C E D U R E • • • • •8 8 0 R E M8 9 0 G O S U I H 5 09 "" I FP < > 0 T HE N 9 2 09 ' ~ P R I N T · W H E R E ' S T H E L I N E N U M B E R ? · r 6 0 T O S 09 2 0 G O S U B S 4 09 3 0 I F G N = 0 T H E N P R I N T · L I N E N O T F O U N D · I G O T O e 09 4 ~ X = I . ' :G O S U B 52 0 , ' FP = 0 T HE N G O SU B 1 2 20 I G O T 09 5 09 4 1 G l = R L {G N ) r G O S U B 1 2 2 0 IG N = G l

9 4 2 I F LN ( G N ) <= L N A N D GN < > 0 T HE N 9 4 19 5 0 P R IN T " D E LE T E O · :G O T O S 09 6 0 " E M9 7 0 R E M • • • M O D I F Y C O M M A N D P R O C E D U R E • • • • •9 8 0 R E ' "9 9 0 G O S U B 4 5 01 0 0 0 I F P = 0 T H E N P R I N T · N O L I N E N U M B E R · : G O T O e 01 0 10 G OS U8 ~4 01 0 2 0 ' F G N = 0 T ~ E N P q ' N T · N O T F O U N O · I G O T 0 6 e1 0 3 0 P R I N T L N ( (j~): 1$( ( i N )' 0 4 0 P R I N T M S T O I ' C H ~ R A C T E R - ; : I N P U T S T S1 0 5 0 P R I N T " R E P E T I T I O I 4 " ; : IN P U T F1 0 S 0 P R I N T L N ( G N ) ;1 0 7 0 F C R P = 1 T O L E N ( T S ( G N »1 0 80 : : P R I NT M I D S (T S { G N ), P , l l ;1 09 0 I : I F i llO S ( TS( Gil l) . P , 1 ) = S r sf H ( N F =F - 111ell : II F F =< H H E ' li l 1 2 1 1 1

1 1 1 0 N E X T P' 12 0 I NP UT S TS1 1 3 0 S S = L E F T S ( T S ( G N ) , P ) + S T S1 1 4 0 G O S U e 1 3 2 0 I T S { G N ) = S S1 ' 5 0 G O r 0 8 0 01 1 6 0 R E ' "1 1 7 0 R E M • • • S U S R O U T I N E G E T N O O E G N F R O ~ P O O L • • • • •1 1 8 0 " E M1 1 9 0 I F A I / <> i J T H E N 1 2 1 01 2 9 0 P R I N T " O U T O F N O D E S · : G ~ = ~ : R E T U R N1 2 10 G N =A V : A I / = R L ( A V ) IR E T U R N

1 2 2 " R E ~1 2 3 ~ R E M • • • S U 9 R O U T I N E D E L E T E N O D E G~ F K O ~ L I S T • • • • •

1 2 4 0 R E I I 41 2 5 0 R L ( L L( G N » =R L ( G N) : L L ( RL ( G ~ » =L L { G~ )1260 R L ( G N ) = A V : A V = G N : R E T U ~ N1 2 7 0 R E I I 4

' 2 8 ~ R E M • • • S U B R O U T i N E ~ o o N O D E G N T O R IGH r OF !N •••••1 2 9 0 R E I !1 3 . 0 R L ( G N) = R L (~ N ) I L l( 5 ~ ) = ~~ : L L (~ L ( A N » =G N1 3 1 0 R L ( A N ) =G N : L N( G N ) = LN : T S ( GN ) = S $ : R E T UR N1 3 2 i l R E M1 3 3 0 R E M • • • S U B R O U T I N E 400 I N C O ~ ~ A S / C O L O ~ S T O l E ~ T • • • • •1 3 4 0 R E M1 3 5 1 1 L G = L E N ~ S $)1 3 6 0 F OR I = l T OL G

I N D E X A R I T H M E T I C S T R U C T UE X P R E S S I O N T Y P E C O

I N ( Q ) I A R $ ( Q ) I S R (

Q P O I N T S T O T H E T O P O F T H E S T A

S T A C KR E C O R D

L E F T L I N E T E X T R IL I N K N t l K B E R L I

L L ( I ) I L N ( I ) I T $ ( I ) I R L

C I R C U L A R D O U B L E L I N K E D L I S T W I T H H E A D N O D E A T

L I N E O FT E I T

N A M E O F S T A R T P O S . E N D P O S . L I N E L I N ES U B R O U T I N E O F N A M E O F N A M E L E N G T H I N D E X

S C $ ( S C ) I S T ( S C , 1) I S T ( S C , 3 ) I S T ( S C , I I ) I S T ( S C

S C P O I N T S T O T H F L A S T T A B L E E N T R Y

July 1979 MICRO-The 6502Journal

S U B R O U T I N EC A L L T A B LE

N A M E O F L I N ES U B R O U T I N E N U M B E

S D $ ( S D ) I S U ( S D

S D P O I N T S T O T H E L A S T T A B L E E N T R Y

S U B R O U T I N ED E F I N I T I O NO R N A K ET A B L E

1

Page 12: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 12/68

13701380139i1!140914 H!14201430144014501460147014801490

150015'0152015301540155015601570158015901600161016201630164016501660

1670168016901 7~H'1710172017301740175017601770

1781l17901800

181"1821!1830

1841l1858186"18701880

IIF 1041S( S $ , I, 1)=. . . .THE I;S1$=. ,• IG O T01401lIIFMIOS(SS'I'i)=·\NTHE~STS=·IAIGOTG14~1l

160T014)0: 1 S lS=LEFTS( 5$, 1- 1 ).$ TSI I I F l G > I TM E NS 1$= S 1$.R I GH TS ( s S 'L G - I )

IISS=S1SNEX T IHETURN

erSouthwestern- Systems

Box 582-M -Santee, CA 92071

714/562-3670-

_IL·Jll.J",...llU_ LIST PROG1~AMforAPPLE: -pr og rCWl -does 5- types of

ting and 3 types of searohi ng.of' i nf or ma ti on s im pl if ie d.

r uc ti on s , in cl ud ed . _ Se nd

19.95 in check/money order -to: _

TWARE TECH NOLOGY for COMPUTERS28 ' ,__

, MA 02178

1890 Pl =P2IG OS U a14501 900 I FL EF TS ( H U ,1 )= ·K · TH E, , 19 301910 PRI NT" ERROR IN SUBROUTI H E NAME, NO &"19 20 PR I ~T LN( NLl ; T S( NLl IG OT0601930 TSfNl)=Gls.rS(NL):SO=SO.11940 IFSO> 20THE~PRI NT"OU T OF sus TA9lE SPACE·: GOT0601959 SOS( SO) =TMU5U ( SO) =LN( NU: GOT018 5. ?1960 IFTKS=·00·THEN198019 70 GO T 02U01980 Pl =P2:G OSU S14501990 IF TK S=" W H ILE· TH EN2~ 102000 PR1NT·ERROR IN 00 WHILE STATEMENT S1NT6X·:GOT01920

201" Pl =P2:G OSU e 14502020 SR=11IN=Nl:GOSUB163020j l l l G O T0-l8 5020~0 IFTKS=·REPEAT·THEN2061l2050 G OTO Z1502060 Pl =P2IGOS Ue 145~2078IFTMS=·UNTIL·T"EN21hJ208~ IF TK S=· F O REV ER· T HENZ 130Z090 PR INT- ERROR IN REPEAT STRU CTU RE SY~TAX· :GOT019232100 IN=NLISR=3:TKSs· ·:GOTOZ138

liEII • •• PARSE SUBROUTI NE • • • • •REM • • • INPU TS; SS=STRIN6 TO PARSEREM. . . Pl=START "OSITIONREM • • • OU TPUTS; LG=LENGTH OF SS

REI! . . . Pl=START OF TOKENREM. . . P?=ENO nF TOK EN +

REM. . . TKS=TO~ENlG=LEN(SS)ITKS=·······IFMI DS( SS,Pl " )=. • T HENP1=Pl. 1IG OTO l 5 48F OR P2 =Pl TO lGI: T PS=M I D S( SS, P2 ' 1 ):: I F TP S=· - TH EN1 6H l::IFTPS=·!"4NOP2)P1T~EN1610:IIFTPS=·:·THEN161~"lEXTP 2

TKS=MIOS(SS,Pl,P2-Pl)R E T UR NREMREM • • • SUBROUTINE PU SH ONTO STACKR E" '• •• INPU TS; TK S=AR I TH I! ETl C EXPR ESS I ONREI! . . . SR=STRUCTU RE TYPE CODE

REM. . . IN=INOEXa=O .' IIF O> 10TH ENPR INT· STACM O VER FLO ~ ER RO R· ISTO PA R S ( Q ) = TK S I SR ( Q ) = S R I I N( Q ) = I NRETURNREMREM • • • SUBROUTINE POP OF F OF STACKREM • •• OU TPUTS; TM$=ARI THMETlCEXPRESSI ONREM. . . SR=STRU CTURE TYPE CODEREM. . . IN=INOEXIF Qs0TH ENPR INT. STAC~ U ND ER FLO W ER RO R· ISTO PT KS =A RS (O ) IS R= SR ( Q) : I N= IN( Q)

Q=Q-lIRETURNREMREM • • • CONvERT STRUCTU RED TO BASIC •• • • •

REMG OS U B 3 7 0Nl=0:SD=0:SC=B:Q=0IGS=·GOTO·fG1S=·RE~·

GZI=·THEN·IG3S=·IF·NL=RL(NL):IFNL=0THEN3150SS=TS(NL)IP1=1:GOSUB1450IFTKS=·SU8ROUTINE·THEN1S90GOT019611J

14:10 MICRO-lhe 5502 Journal July 1979

Page 13: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 13/68

Synergetics

Box 1877Thatcher, AZ85552

-ADVERTISEn ,MIC~Of()r elmer

$10.00 11 !,'A<cla:ssifiedad

as,the ones above,maY,berun inthis, new Classified Ad,section

for ,$10.00., ,Admay not exceedsix lines, .and only one,ad,per

person, company, etc. Must re-,t()6502., type stuff,iand, ad

be, prepaid. ,Youwilll"'each

6502 readers 111

FOB

YOUR

A D

AdDeadline:

5th of Month

July 1979

2110 P l=P 2I GO SUB145 92 12 0 S R= 2:I N= NL2138 GOSUB1630:T$(NL)~G1S+IS(NL)

2 14 0 G OT 01 85 1121S0 IFTKS=·CASE·T~EN21792 15 8 G OI02 22 02178 TS(NL )=G 1S +TS(NL)2180 IN=NLISR=4ITKS=··2198 GOSU81630JGOT018502220 I FTK S=·:·T HEN2 2402 23@ G OT02 2702240 P l=P 2I GO SU S14S0225~ SR=SIIN=NL:GOSUB1639

2 260 G OT 01 8S 02270 I FTKS=·T HEN·T HEN2 2902 280 G OT02 3702290 P l=P 2I GO SU S14S02300 I FTKS=· O O ·T HEN2320231~ PRINT· ERR OR IN IF -TH EN 00 STATEMENT SYNTAX· JGOT02320 NM=LL(NL)IP1=1ISS=TS(N~):GOSUB14592330 IFTKS<>MIF·THENNLzNMJGOT0231"2348 P1=P2IGOSUS14502350 SR:6:IN=NMJGOSUe16302 360 G OS UB1 85 02370 IFTKS=·ELSE·THEN239~2 380 G OT02 42 02390 SR=7:IN=~LJTK'=··:GOSUB16392400 TS(NL )=G 1, + TS (NL )24H') GOT018502420 IFTKS=·ENO·THEN2440

2 430 G OT 02 47 ~2449 IFQ>0THENGOSUe1710IGOT024502445 PR INT· TO O M ANY END STATEM ENTS· IG OT0602 45 0 O N S R G OT O 2 57 0, 27 20, 267 0, 29 70 '2 82 0. 29 80' 304 02470 F O R P1=P 2T OL G2480 ::IFMIDS(SS.Pl,1)=·t·THEN25102490 NEx TP 125il0 GOT018502 510 G OSU 814 502520 SC -SC+ 12530 IF SC> 20TH ENPRINT· OU T OF sus CALL SPACE· :GOT06e2540 ST(SC,,)=P'IST(SC,3)=P2:ST(SC,C)=LG2559 ST(SC.2)=NL:SCS(SC)=TKS2 560 G OT02 4702570 REfi I2580 REM ••• CONVERT OO/WHILE STRUCTURE •••••2 591l R EM

2 600 EN=LN( NL) :O W=L N( IN)2610 TS(NL )=G 1S +T $ (NL)2620 T $ ( IN)= G3S+ TKS +G 2 s+ ST RS ( DI I+ l ' H2630 IN=OW+l:SS=GS+STRS(E~):AN=IN2640 GOSUS1160:GOSUB12702650 LH=EN-l:SS=GS+STRS(Dw)IAN=LL(NL)2660 GOSUe11601GOSUe1270:GOT018502670 REr. I2680 RE~ ••• CONVERT REPEAT FOREVER STRUCTURE •••••2690 R EII42700 T I( N Ll =G S+ S TR $( LN( IN»2 7H ' G OT0185 02720 REM2730 REM • •• CONVERT REPE4T UNTIL STRUCTURE •••••2740 REI42750 EN=LN( NL) :O W=LN( IH )

2760 TS(HL)=G3S+TKS+G2S+STR$(EN+2l2770 LN=EN+1:SS=GI+STRS(OIl)IAN=NL2780 GOSU91160:GOSUS12702790 LN=EN+2:SS=G1SIA~=GN2800 GOSUe11601GOSUS127e2 81" G OT0185 02 8 2 ' 1 ) RE~2830 REM ••• CONVERT CASE STRUCTURE ••• ••2840 REM2850 EO=lN(NL):S1=LN(IH)IPC=ED2860 TS(NL!= G1S+ TS ( HL l2870 LN=S1+1:SS=GS+STRS(PC):AN=IN

MICRO-The 6502Journal 14

Page 14: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 14/68

EPROM PROGRAMMERModel EP-2A-79

SOFTWARE AVAILABLE FOR F-B, 8080, 6800,

80B5, l-BO, 6502, KIM- l, 1802, 2650

EPROM type is selected by a personality module

which plugs into the fron t o f the programmer.

Power requiremenls are 115 VAC, 50/60 HZ at 15watts. It is supplied with a 36 inch ribbon cable

for connecting Tomicrocomputer. Requires 1'/2

1/0 ports. Priced at $155 with one set ofsoftware. Personali ty modules are shown below

P.rtNo. Pros·ams Price

PM-O TMS 2708 S15.00

PM-l 2704, 270B 15.00

PM-2 2732 30.00

P.'-1-3 TMS 2716 15.00

PM-4 TMS 2532 30.00

PM-5 TMS 2516,2716,2758 15.00

Optimal Technology, Inc.Blue Wood 127, Earlysvi lle, VA 22936

Phone (804) 973-5482

R u t ;

1 I e R E M E X 4 ~ P l E O F D O W ~ l l E S T R U C T U R E7 z e R E M? 31 00 W HI LE X () 04 N0 1( )0 4N Dl <> 01 40 F I R S T S T A T E I o ! E > ; T

7 S0 S E CO ND S T4 T E~ Et ;T? 50 L AS T S TA TE ME >; T? 70 E N Df LI S T10 R E M E X A M P L E O F DO w HI L E S Tq UC TU RE

20 R E ~30 DO W M I L E x <>U NOY<>IJA NOl < >840 F I R S T S T A TE ~ E N T5 0 S E C O N D S T A T E ~ E ~ T

00 L A ST S T A TE M E ~ T1 0 E N D

? 3 l S I C

E ND O F P RE -P QO CE SS I~ G

1 LI S TlJ R E M E X A . P l E O F 00 W M IL E S T RU CT UR E

Z0 R E M39 I F ~ < ) 0 A t ; D Y < > 0 A N D z < ) e T H E N ( ~

3 1 G O T O 1 .4 1 1 F I R S T S T A T E I o IE I t I T5 0 S E C O N D S T A T E M E N T

6 I l L A S T S TA T E I I E N Ta s G O T O Jt1 0 R E M E N D

14:12

l880 GOSUB11601GOSUe12702890 TS(IN)=G3S+TKS+G2S.STRS(S1+10)Z9~0 IFSR(Q)<>5THENZ9502910 LN=S1-1:SS=GS.STRS(EO):AN=LL(IN)2920 G05U 811S0:( ; 05U 812702930 G O S UB 17 1 01 P C = S 1 :S , = L N ( I N)2 94 0 G OT02 67 02 95 0 G OSU S17 10:I FS R( ) 4T HENPR INT· CA SE ER RO R· :NL =INIG OT 01 9Z 02960 GO TO 18 50l2 97 0 P RI NT ·C AS E ER R OR · INL =I NI GO T01 92 02 98! ! R EM2990 REM • • • CONV ERT IF/TH EN D O STRU CTURE •• • • •

3000 REM3010 TS(RL(IN»=G'·STRS(LN(NL»:TS(NL)=G1S+TS(NL)3020 TS(IN)=TS(IN)+G2J+5TRS(LN(IN).20)

3039 G OT0165 03040 REM3050 REN • • • CONVERT IF THEN ELSE STRUCTURE •• • • •

310:11;0EN3070 EO=LN(NL):TS(NL)=GlS+TS(NL):EL=LN(IN)3080 LN=EL-l:SS=GS+STRS(EO):~N=LL(IN)3090 G OSU 8' 1S0IG OS U ~12703100 G OS U 817l el3110 IF SR <) 6TH ENPR INT· 'F TH EN ELSE ER RO R- :NL=IN:G OT019 203120 TS( RL( IN» ) =GS+STRS(EL)3130 n(IN)=TS(IN).G2'+STRS(LN(IN)+20)

3 1 49 GO T0 185"

3 150 RE ' "3160 REN •• • SU BSTITUTE NU MBERS FOR SUBROUTINE NANES • • • • •

3170 REl iC3180 IF SC=! ! T H EN33203190 IF SO =0TH ENPR INT· ER RO R- NO SU 8R OU TINES O EF INEO ·:G OT0332032 00 F O RI =1 TO SC32 10 I :F O RJ =1 TO SD32 20 :I II IF SC S( 1 ) =S DS (J )T HE N3 26032 30 :INEXT J3240 ::PRINT· ERROR-SUBROUTINE ·; 5CS(I) ; · NOT DEFINEO·32 S9 II G OT 03 3 1 032 60 I IS $= TS (5 T( 1 ' 2 ») :L G= LE N( SS )32 70 ::F =LG -ST( I , 4) IP1=ST( 1 . 1) +F :P2=ST( I .3) +F3280 IITKS=LEFTS(SS,Pl - l ) +STRS(5U (J»3 29i :: IFP? < =L G TH E N T K 5= TK S +R IG~ TS( S S . L G - P 2+ ' )3300 IITS( ST( 1.2» =TKS33 HI NEX T I332 0 P RI NT· END O F P RE- PR OCES SI NG ·' PR INTI GO TO S0

7 LI 5 T1e R E M . . . E X A M P L E O F I F T H E i l 00 5 T RU C T UR E

Z0 R E M3 e I F3140

5060

70

X <>0T H E N D O

F IR ST S TA TE ~E l <4 r

S EC ON D S TA TE ~E N TL A ST S T A T E M E I < 4 T

E N D

? 8 A S I C · · · · · L I S T19 R E M . . . E X A ! I ~ L E O F I F T H E N D O S T R l f C T U R E20 R E M3~ I F X <> 0T HE ~ s a

.11 GOTO 90

5 1 ' F IR S T S f AT E" EN TS~ S E C0 l <4 0 S T A TE M EN T1@ N T H S TA TE ME NT

89 L ~S T S TA TE ME NTg8 R E I ! ! E N D

? 1I S T11 R E M E X A M P L E O F I F T H E N E L S E S T ~ U C T U R E

Z i l F I E '"31 I F N UM 8E R= .T ME N S'• • G O T O 685 0 P R I N T · T H E N U M 3 E R I S Z E R O ·

5 9 6 0 T O e e6 1 1 R E M E L S E7 . PIU N T - T H E N U " E l E R I S N O N - Z E R O ·e e R E M E N O

MICRO- The 6502 Journal July 1979

Page 15: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 15/68

1 LI S T

1 . R E ~ E X 4 - P L E O F R E P E A T U H T I L S T R U C T U R E28 R E I !J e R E P E A T U ~ T I L A = 84 . F I R S T S T ' T E . E ~ T : 5 E C O N D S T ' T E ~ E N T5 8 N - l T ~ S T l T E _ E N T611 N HI S T A T E M E N T7 1 1 E N D

7 Si Sle

E N D O F P R E - P R O C E S S I N G

•1 II S T

11 R E M E X A ~ P L E O f R E P E A T U N T I L S T ~ U C T U P . E2e R E "JI R E M R E P E A T U N T I L A w l48 F I R S T S T A TE _ E N T : S E C O N D S T A TE M E N T5~ N - 1 T M S T A TE ~ E N T68 N T H S TA T E ME NT7~ I F A = e T t < E ~ 72

71 G O T O J812 R E I I

, LI S T

18 ~ E ~ E X A " P L E U S I ~ G S U B R O U T I N E S2 1 1 R E M39 G OS U 9 4 1 NP U TI G OS U B4 0 UT P UT4 . G O S uB ( O U TP U T58 S T O P

68 R E ~ N O T E T H A T L I N E S' I S N O T N E C E S S A RY7. R E I !

a i l S U S R O U T I ~ E ' I N P U T98 ~ O O Y O f S U B1I'!iI R E T U R N1 1 " R E M128 S UB RO U TI N E & OU TP u T1n B G O Y O f S U B ( O u T P u T"1' R E T U I ' l N

? 845 I C

E NO O F P RE -P RO CE SS IN G

1 LI S T

1 0 R E I ! E X 4 ~ P L E U S I N G S u B R o u T I N E SZ 8 R E MJ 8 G O S U B a 0 1 G O S U B 1 2 848 G O S u B 128

51 S T O P611 R EI ! N OT E ni l T LI N E 50 I S N O T N E C E S S A R y

7~ R E MB8 ~ E M S U B R O U T I ~ E ' I N P U T90 a O O Y O F S U B1 0 0 R E T U R N1 1 0 R E M1 2 0 R E I I S U B R O U T I N E t o u T P u r1 3 0 B O O Y O f S U B 1 2 31411 R E T U R N

i L l S T

1 0 " E M E X A ~ P L E O F R E P E ~ T F O ~ E V E P S T ~ U C : U H E28 R E M3 0 R E P E A T F O R E v E R43 F IR ST S TA T E ~E ~r5~ •••••••••••••••68 L A ST S T A TE M E~ T, . E N D ( R E " E ~ 8 E K T H ~ T E N D C O N C L u O E S E4CH

? 9 A S I C

E ND O F P ~E -P RO CE SS IN G

1 L I S T1 0 R E M E X A M P L E O F ~ E P E A T F C ~ E V E R S T ~ U C T U ~ E2 8 R E ~3 0 R E ~ R E P E A T F O ~ E V E R. 8 F I R S T S T A T E ~ E ~ i5@ •••••••••••••••

6 ~ L A S T S T A T E " E N T7 1 1 G O T O 3 1 1

July 1979

SEAR CH F OR" & " ON THE

LINE

ENTER NAM E &LINE # IND EF N TABL E

PU SH EXPR ,

INDEX & TYPE1------1O NT O S TA CK

PO P R ECO RDA ND C ONV ER T

STRUCTURE

STO RE NAM E &

LINE # INSU BR TABLE

L A S T

CONVERTNAMES TO #SW I SU B CALL& D EF TA BLE

14:

F i gure 2: Pre-Processor F l ow Char t

7 II S1

l d ~ E " E X A M P L E O F C A S E S T R U C T U R E . Y O U C A N ~ a v E A S " A ' l Y C O " O Il 0 R E " A S Y O U ~ A N T . T M E R E " U S T B E A T L E A S T O N E .H R E "

.8 C A S E511 X :>i!

G il S T A T E M E N T

7"a e9 0lee1 1 1 1

1 1 01 3 0140

1 5 01 6 1 1

S T A T E " E N T III

x ol

S T A T E " E N T 1 4

S T A T E " E N T Pxlol

S T A T E M E N TS T A T E ~ E N r .

E N D

MICRO-The 6502 Journal

Page 16: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 16/68

LETTERS

Just received my May issue of MICRO to -day - it's gettingbetler with everyIssue.

I have two 6502 sys-tems, KIM and SYfYI.My K~Mhas an a~kHtional 28·Kof memory

added to it, a homebrew CRT terminal,and a Selectric 1/ 0 typewriter used asoutput only. I used open co~!o( TIL tointerface my terminal wit 'h !'he KIM TIYport, but due to terminal probtems, Iwas not able to get rel iable communlca-tlon until I cut t11e run from U15·11 10U2-6·10as you described in MICRO 12:40.It eoes work.

I have Micro·Z's 9K + BASIC for the KIM.Bob Kurtz was very helpful in chaRg-ingthe data savelload routines to also ln-clude string data - I highly recommendhis version. I have interfaced BASIC tothe Selectric, so it is a pretty completesystem.

My other system is a SYM·1 with 8K RAMand Synertek's BASIC in ROM. I use thesame terminal to communicate wltn itas with the KIM. TAeir BASIC is almostthe same as my KIM version, with the ex-clusion of ttte data save/load routines.Trig functions are not included but canbe added with a routine that they havesupplied. The trig routine occupies 313bytes of RAM. It's handy to have BASICin ROM but sure wish that I couldchange their character delete from anunderline to anASCII backspace!

I also received from Synertek an advancecopy of their new monitor. The cassetteproblems I was having were greatly

helped by it, but were not completelycleared up until I added reverse paralleldiode pairs across my recorder's MICIN and EAR lines to the SYM. I used AudOut Hi to the recorder MIC IN with thediodes tied from Aud Out Hi to ground.The waveform generated by the SYM inHS format is non-syrnetncal. Thiscaused a low frequency AC ripple to begenerated by my recorder, probably dueto capacitative coupling in the recorder'scircuits. The diodes act as a clamp andeliminate this ripple which was quitesevere for some data patterns. The cas-sette interface is rock-solld now.

I didn't get any listing of the new rnoni-tor, either, but the only monitor rout inesthat I found relocated are those dealingwith the cassette. I use the paper tapeformat to downline and upline load pro-grams from a Honeywell L66 computer atwork, and so have had the opportunityto test the changes there. They work asstated, as does the Break key on Verify.The latest info I have from Synertek saysthat the new monitor will be available onROM in early July for $15.00.

14:14

1 LIS'111 RE" EXUPLE OF CASE STRUCTU~E ' YOU CAN 4AVE AS "ANY CO'<O l T I O 'lS

If Rt. AS YO!) )j·HU. T~ERE ICUST BE AT LEAST ONE .

311 R€f'!

411 RE .- CASE

SI I FX=> fTHEN 6il

51 GOTO 9a

6 f STATE Io I£NT

7 f8I l SHTOfENT Ne. g &OTO l'~

9" IFX (>f T1+eN 1399 1 G{)TO 13 01<& 0 STAT€IC I€N T 14

ne ------1Z ll ST nE~NT P

129 GOH) 11 ;A

13t1 I F V1 () 2 TH'EN ,.11

131 GOTO 1~

I." SUTEIoLENT

15e S THE IIo fNT , LAS T

16i ! RE ~ EN D

? LI S THI RE- SIIAU PROGRA14 US ING S~E OF THE S TRlJ ·: T IJRES

21 1 RO3Il PRII 'HIPRINT

'" GOSUB II NPUT

58 REPEAT UNTIL N .U ·.=9

~ ClSE

7~ ~ 1 : J o t I I ) 5 o i J

U PRI NT·fl-f: NU~ER IS ,-O fl·E T I-fAN 51J "

9 9 NUM <=5ilANONU II)10

UI I PR INT ·THE W "8ER IS LESS THAN OR EQUAL TO 5'·:l1 il PRINT"U IO GREATER THAN HI"lz e NU~>@ANONlJ~<; I@

139 PR IN T·THE ~u~aER IS GREATfR THAN ZE~O ·:

lU P~I ~T ·ANO LESS THAN o -R EOth tL TO HI·

1Sf NV'-<-ll1611 PR INT· H4E Jo IU fle ER IS NE(;4, TI VE·l1e EN\)

lU eosus & INPUT

19 "f E ~O

lila STo-P

Zl' REI !

22 ' SUBROUT INE !IN PUT

Z 3 1 PRI~T ·TYPE IN A Jo IU~BER, TYPE ZERO TO STO~·:

24e I N PUT NU ll

Z5 i1 ~ETURN

1 BASIC

E N O ~ F P R E- PR OC E SS IN G

1 1I S Tle RE~ SMALL PROGRAM USING SOliE OF r~E STRUCTURES

z a ~E~

3 il P ~IN T:P RI> jT'e GOSUB Z Z i lsa RE~ REPEAT U~!IL Nu~=a

60 RE Io l ClSE7 8 IF NU ~)S 0T HE N a ll71 GOTO 9'8i1

89 GOTO 179

9B IFJo IU~< .50ANONU '-)13THEN 10a

91 GOTO lZ9

le e119

11 9

lZil12 1

13 9

ue, . 9lSil

15 1

16 9

170 REM

1811

19 0

19 1

19 2229

Zl e

Z Z e23 02'11

Z5 e

PR IN T·THE NU~8ER IS .ORE THAJoI 5'·

i'R I~T ·T I-fE NUMBER IS LESS THAN OR E~UAL TO 511·:

PRINT"A~O GREATER THAN Ie ·

GOTO 179

IFJo IU ~)9ANON UII(~ I11THEN 130

GOTO 159

PR INT ·THE NU .8ER IS GREATER THAN ZERO ·;

PR INT ·AND LESS THAN OR EOUA l TO 1~·

GOTO 17~

I FNUM<eTHEN 169

GOTO 179

PR IN T·THE NUM~ER IS NEGAT IVE ·

EN D

GOSU8 2Z9

I F NU ~=eTH EN 192

GOTO S'

REI '

STOP

REI I

RE ,. SU8ROUTI~E !IN PUT

PRINT·TYPE IN l IIU IIBER, TYPE ZERO TO STOp·:

I N PUT NU l!

RETURN

MICRO-The 6502 JournalJuly 1979

Page 17: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 17/68

No, that was not a typo error above. I

do have BK of RAM on my SYM. U1, the

address decoder, fully decodes the first

BK of memory, with only 4K lmplernent-

able using the sockets provided. I added

a small "piggyback" or daughter board

to the SYM that fits in the area of the

logo and the "Synertek Systems Corp."

label. DIP plugs from this board plug

into the sockets on the SYM for U12 and

U19. These two 2114s plus Bmoremount

on the added board. Jumper wires con-

nect from it to U1, pins 7, 9,10, and 11.

The design violates worst case designrules since, if all the chips are providing

their worst ease load to the data and

address lines, the lines will be loaded to

higher capacitance than the 6502 is guar·

anteed to drive. I have all the PROM and

ROM sockets full, U2B (the extra 6522)

installed, and have seen no degradation

of the 6502 signals with several different

supplier's 2114s installed. It just will

not fail a memory test! None of other

SYM owners to whom I have supplied

boards have had any problems either.

It sure is nice to have the full BK avail-

able for BASIC!

I can't positively guarantee that it will

work for everybody, but it sure is a

simple and inexpensive way to get addi-

tional memory. The PC boards with

plated thru holes, rellowed solder plat-

ing, and instructions are available from

me at the address below for $5.00 each,

plus SASE. If it doesn't work for some-

one, I'll refund their money provided the

board is returned undamaged.

I highly recommend the assembler/text

editor supplied by M. S. S., Inc., PO Box

2034, Marshall TX 75670 for $25.00. I

have modified it to run on the SYM, and I

am very pleased with it. I also have Tom

Pittman's Tiny Basic modified for the

SYM. One can write reasonable sized

programs with either of these packages

and still keep within the original 4K

memory size since they both take up just

over 2K each. However, BK is sure a lot

better!

I'll attempt to answer any letters reo

garding KIM/SYM if a SASE is enclosed.

Thank you, and keep up the good work!

John Blalock3054West Evans DrivePhoenix, Arizona 85023

Thanks to Jim Butterfield for Inside Pet

Basic in MICRO B:39. His FIND and RE·

SEQUENCE programs were useful and

informative, as were his remarks

concerning how PET BASIC is built. Imodified FIND to run on my Ohio Sci-

entific "C2·BP" with the following

changes.

OSI BASIC user programs start at loca-

tion 0301 hex while PET's start at 0401.

In line 9000, change A = 1025 to A = 769and change X = PEEK(1029) to X = PEEK(773). In line 9005, change (1029+ L) to

(773+ L).

July 1979

NEW I PE~ ~~~':'~.'~--The PET ISnow a t ruy soontet rcareo

BUSi ness Sy~ lem w it h me Foppy

DISK an a Prnter wruc r - makes an

i deal COS I e ff ic ie nt bus in ess

system 10' most DOI csSIo nA I and

specialized fields: meo.cn-e.

While the program will list and run with

these changes, it cannot be. saved on

cassette without modifying lines 9005

through 9007. This is necessary because

OSI software limits the line length to 72

characters and line 9005, when listed,

expands to 76 characters. To correct

this, change lines 9005, 9006 and 9007 to:

To modify RESEQUENCE, we

know what tokens OSI BASIC u

keywords. In Jim's RESEQUENC

gram, line 60220 searches for P

words GOTO (137), GOSUB (1

THEN (167). For OSI BASICthese to 136, 140 and 16(J respe

Change all occurences of V% to

W% to W. Then change all un

sioned variables V to U and W

Change the 1025in l ine 60160 to 7005 FOR L = 1 TO BO:Y= PEEK(773·+q

9006 IF Y= 0 THEN? *256PEEK(A + 3)·

+ PEEK(A + 2);:RETURN

9007 IF Y= PEEK(K + L) THEN NEXT L

900BRETURN

Since OSI software looks at ca

input as if it were from the key

MICRO- The 65.02Journal

Page 18: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 18/68

THE BE-I COLOR GRAPHICS / ALPHNUlIERICS VIDBO BOARD

1. 4 DIPPI!RBNT GRAPHIC MODES

2. UP TO 8 VIVID COLORS

) . ALPHIIUMERICS AIID l liVERSE ALP lI IJUMERICS

4. KIM 1. AIK. AIID SIM PLUG COMPATABLE

5. PROVISION FOR ON-BOARD R.I'. MODULATOR

(PARTS INCLUDED) USE UlIKODIPIED COLOR 'rY

6. lK ON-BOARD RAM (ADDS MEMORY TO YOUR ~STEK)

7. SIIiGLI! VOLTAGE OPPERATION. Oil-BOARD +5 V REG.

li:E-l ASSEMBLED AIID TESTED ••••• , 224.00

BE-' KIT $ 164.00

BE-I PARTIAL KIT $ 69.00

.. PC BOA. 'll l

.. MC6847P VIDEC IC

.. KC1) 72P MODULATOR IC

BE-1 PC BOARD ONLY $ 40.00

EE-1 INSTRUCTION KAIIUAL • •• •• •• • $ 5.00

NO. .. AVALIBLE AT: DERRICK ELECTRONICS

714 ..... t X.noah •• FO BOX 457

BROKEN ARRO.. .. OKLA. 74012

(918) 251-992)

ADD $ 2.00 Cor .hipping and hand.ling

Oklahoma; ADD Tax.

DELIVERY: STOCK to 60 dOl'.~( Jrv "H \O EI \JT~I\P l\ lZE5

these programs can be loaded before orafter the program of interest as long as

there is no line number conflict.

Alvin L.Hooper207Self St.Warner Robins, GA31093

program into useless junk. Furthermore,

the new user cannot store the programon another disk for backup or more con-venient use.

We suggest you don't buy software thatdoes any of the following:

1. Executes automatically after load-ing.

2. Modifies the screen memory whileloading.

3. That you cannot load from disk,using the basic DOScommands.

4. That you cannot unlock using thebasic DOScommands.

5. That youcannot list.

6. That you cannot change.

7. That have basic line numbers great·er than 32000.

8. That youdid not try in the computerstore, before you bought it.

If you have the occasion to publish read-ers opinions of hardware products,please add my recommendation of "The

Net Works" brand serial interface adapt-er for the PET. It comes with excellentdocumentation both on the IEEE·488in-

terface of the PETand on the RS·232asfound on terminals and modems. It alsoincludes sample programs to assist inlearning to use the relevent portion of

the PET operating system. Mine has

worked flawlessly for some 6 monthsnow; this letter was typed with it, usinganAJ841for input/output.

Also, you might warn readers that Pro-gramma Consultants version of Forth for

PETs requires 16K memory to operate,contrary to their advertisements last

fall.

There appears to be a growing problem

with APPLE Software. Some companies

selling software for the APPLE are so,concerned with theft of their product,that they are resorting to self-rnodlfyinq

code and programs that modify certainkey registers used by the APPLE rnonl-

tor. This is supposed to prevent peoplefrom listing or copying the program.

Richard LMorgan

POBox 25305Houston, TX77005his is a very short sighted position to

take. The bad part of all this is the fact

that any computer is difficult at best,and sometimes lrnposslble, for the avoerage home computer owner to operate.

This particularly true with a new and un-familiar program.

Paul LamarLamar Instruments

2107Artesia Boulevard

Redondo Beach, CA90278

One mistake on the part of the new user

can turn a $20.00 to $500.00disk-based

14:16MICRO-The 6502 Journal July 1979

Page 19: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 19/68

Page 20: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 20/68

Table I - Error Numbers and Messages

Number

1

2

3

45

6

7

8

9

10

11

12

13

14

15

Message

Language Not Available

Range Error

Range Error

Write Protection ErrorEnd of Data Error

File Not Found Error

Volume Mismatch Error

Disk 1/ 0 Error

Disk Full Error

File Locked Error

Syntax Error

No Buffers Left Error

File Type Mismatch

Program Too Large Error

Not Direct Command

ote that these are error messages for DOS V3.2;

he V3.1 messages are slightly different.

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

" D IS C M AN AG EM EN T S YS TE M"

EIG HT PR OGRAM S O N D ISK TO PRO VIDE THE USER WITH A

COM PL ET E UND ER ST ANDI NG O F T HE D IS K D RIV E COI 44 AN DS

PLUS A UTILITY PACKA GE TO INDEX A ND CA TAGORIZE ALL

PROGRA MS WRITTEN FOR THE APPLE II COM PU TER. TH ESYSTEM PROVIDES FULL SEARCH, EDITING AN D DATA

TRANSFER CAPABIL IT I ES .

A 'TWENTY-S IX P AG E BOOKL ET P ROVI DE S D ETAIL ED ,

EDUCAT IOHAL TECHN IQUES G IV ING A THROUGH UNDERS TAND -

ING OF ALL DOS C OI4 4ANDS.

I NC LUDED A RE S UCH T ECHN IQUE S A S:

• INITIALIZATION OF TEX T FILES

• WRITING s R EA DIN G O F T EX T FILE S

• CREATING TEX T FILES

• EDITING FILES

• T RA NSFE RR IN G D AT A T O O TH ER D ISK ET TE S

• LISTING OF DATA FI LES

• SEARCHING DA TA BY VARIOUS OPTIO NS

A DOC lR oIE NT ED L IS TIN G 'P ROVI DE S L IN E CHANG ES F OR

ADA PT IN G THE S YS TEM TO P RE FO RM NUM EROU S O THE R

APPLICATIONS.

THE BO OKLET IS W RITTEN IN A M ANNER WHICH MAY BE U SED

B Y T HE N OV IC E A S W ELL A S T HE E XPE RIE NC ED PR OG RA MM ER .DO ZENS O F PROG~ING TECHNIQ UES ARE SH OWN A ND FULLY

DOC lR oI EN TE D. A LS O I NC LUDED S EP ARAT EL Y, IS A P ROGRAMMERS

AID G IVING Q UICK REFERENCE TO INTEGER, APPLESOFT AND

OOS COMMANDSW ITH I LLUS TRAT IVE EXAMPL ES .

S YS TEM R EQUI REMENT S: D IS K, I I s A PPLE SO FT T APE O R R OM C AR D

PRICE $19.95 (PROCESSED s SHIPPED WITHIN 4 DA YS)

SE ND C HE CK O R M ON EY O RD ER T O:

SOFTOUCH

P.O. BOX 511

LEOMINSTER, MASS. 014 53

~ P~,~~--~ TGMT

~ l1 . \PROGRAMMING\_'T!'(AJ • APPLE SOFTWARE *d1, P.O.BOX 3078 • SCOTTSDALE, ARIZONA 85257

APPLE-SCRIBE-2 disk or cassette $49.00(Word processor with any length line,printing in any shape or form. Requires 16k

or larger system)

APPLE-OMS 48k & disk required $49.00(Universal data management system)

UNLISTABLE-BASIC disk required $39.00(Make Integer BASIC listings unintel-

ligable)

BCOPY disk & 16, 32 or 48k $19.00

(Single disk drive binary file copier)

DEFLECTIONS disk or cassette(Real time color graphics game)

$10.00

Custom programs ... write for details!

KIM" BUS EXPANSION!AIMT .., VIMT .. , (SYM)T", KIMT.. OWNERS

(and any other KIMTM bus users) buy the

best 8K board available anywhere:

SAME LOW PRICES!

HDE8K RAM-$169! 3 for 5465!Industr ia l/commercial grade quali ty: 100 hour high temp burn-

in: low power: KIM bus compatible pin for pin: super Quality &reliability at below 5-100 prices (COMMERICALLY rated 5-100boards cost 25-75% more). When you expand your system, expandwith the bus optimized 10r a bit CPU·s. · the Commodore/MosTechnology 221« pin KIM bus. now supported by Synertek, MTU,Rockwell International, Problem Solver Systems, HOE, the Comput·erist. RNB. aDd others!

KIM-' computer $179.00: KIM.. Motherboard $119: po.. er sup-ply for KIM-l alone-$45: enclosure for KIM·' alone $29: HOE pro-' to type board with regula to r, heatsink. switch address & decodinglogic included $49.50: book "The F.lrs t Book of KIM" $9.95: book"Programming a Microcomputer: 8502" 58.95: SPECIAL PACKAGEDEAL: KIM-I. power supply, BOTH books listed above, ALL forI20Il1HOE FILE ORIENTED DISK SYSTEM (FOOS) FOR KIM BUS

COMPUTERS Make your KIM (or rela tive ) the best 6502 develop·ment system available at any price. Expand with HOE's full s izef loppy system with FODs/Edl tor /Assembler. 2 pass assembler ,power fu l editor compat ible with ARESCO files KIM bus Inter lace

card: fast 8502 controller hand les c la ta t ransfer a t maximum IBMsingle density speed for excellent reliability: power supply lor ..drive.: patches to Johnson Computer/Mic rosoft BASIC, 45 daydel ivery . S ingle drlve-$I995 dual dr ive 12750Sh ipp ing exira unless order prepaid wllh cashier 's check ALL

i tems assembled, tested. guaran teed at least 90 days.

PUUNSMANMICAO SYSTEMS [div. 5C Corporation)P.O.Box 1712, Auburn, AI. 38830: (205)745-7735

3803 Pepperell Parkway; 0peIb

[1-8CJ0.633-8724) Continental U.s. except AI.Dealers for 051, COMMODORE,

~ ALTOS

MICRO- The 6502Journal14:18July 1979

Page 21: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 21/68

AIM Your Spouse toward Success

at the Supermarket

Melville Evans and Vernon Larrowe

Environmental Research Institute

of Michigan

3300 Plymouth Road

Ann Arbor, MI48107

This grocery list generator requires no programming.It will prove that your computer really is a useful gadgetjust one hour after you unpack it from shipment. Todaythe supermarket. And Tomorrow?

If she's like my wife Marie, she looks

at you, sweating over software, with a

tolerant smile. Nothing useful will come

of it, but it keeps you off the street, and

it's probably cheaper than a sailboat. If

that's your picture, take note: here's a

"program" that needs no horne-built

software, that you can get running the

first time you fire up your AIM, that

demonstrates most of the neat AIM

features, and that several local corn-

outer-owner's wives agree provides a

really useful function.

Well, only two that have actually tried

it so far, but that's two out of two, and

the rest all say it sounds good. Marie

says it saves her time making her list,

saves time in the store, and prevents her

arriving back home and realizing she

forgot the beer. It takes an hour to

gather the data, and a half-hour to type it

in. Then your wife sits down at the "con-

sole", runs it, and it works the first time.

Here's how.

Gather the data. The next time she

goes to the supermarket, go with her,

armed with notebook and pencil. Ask her

to take her usual route through the store

and to point out, as she goes, any Item

she sometimes buys. Not just those

she's buying today, but anything she

ever buys. Note them down in order, with

July 1979

current prices if you have time. You can

come back for prices later, if they prove

useful. Ask her to be specific. Not to say

just "canned vegetables", but to specify

which canned vegetables she some-

times buys. Peas? Carrots? If she walks

right by the beer without seeing it,

put it on the list anyhow.

Type it in. Fire up your AIM and call

the editor, with all of RAM for the buffer,

and input from the keyboard (i.e. hit

"E, SP, SP, SP"). Now type in your list, in

the same order you gathered it, abo

breviated to one item per line. My list is

shown in Figure 1. It's a long list, and

takes a little over 2K of RAM. If you only

have 1K to work with, you may have to

delete some items later, but try putting

them all in. It's surpriSing how many

lines 1Kwill hold.

Dump it to cassette. So you can load it

next week. It's supposed to save time,

remember.

Try it yourself before you demon-strate. Escape to the monitor and turn

the printer off (ESC, CTRL PRINT OFF).

Now pretend you're going grocery shop-

ping. Hit "T", and there's your first line

on the display. If you have a title at the

top, use "0" to step down to the first

MICRO-The 6502 Journal

item. Need that this time? No? Hit "0

and there's the next item. Need tha

Yes? Hit '''PRINT'', and it goes on t

list. Now "0" for the next item. Just st

down the list with "0", and hit "PRINT

for any item you want on today's sho

ping list. If you change your mind aft

hitting "0", you can back up with "U".

When you finally get to "END",

"LF" about six times, tear off the pap

and there's your list. All neatly type

and in the order you'll find them in t

store, and with the beer on there,

golly!

If you find some lines that nee

changes, feel free. You're in the edito

after all, and "C" is fun to use. B

remember to dump the new version ont

cassette before you sign off.

Call your wife. Before she sits down

it for the first time, be sure it's proper

loaded, with printer off, and displaying

Item One. You're trying to impress hboth with AIM and with your expertise

right? It detracts from the tmpression

you blow the first tape load and have

do it again, and then kick the plug out

the wall as you swing out of the chair.

After she sees the payoff, she may eve

agree that it's worth putting up wi

hassles like that!

14:

Page 22: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 22/68

_-.- - . -~.: -1 ~ . '_ . _ : :. .:- :" " . , ..

. -.~. """ ,- . ~ - .-..-"' . . _ '- ' = . .:_ . ,~ - :. '-

:. , -n r- :_.'""""'

-. e- .-. :. , --, ~ .-

':~ 'i~ "" . ., :- --.

-._. :"'_C:

- _ .. _-, -:_.n~ '= ~ ~ ; _ _ : _ : ._ : ,- : :: .. - :--. -. "-- :-- :-- ~. _ -;.1f ' :: : ~ rz; :- - : - ; '

. = - -e- -, . --. :-

'_ . _ - - -.-'.:;: _ . ,-.:,.'_-

: . . J r :. . : _ ', ': ;_i. :_, ~ A . ;

.-,; '.-., ':-.":

, _ .U ~ _. , _: ; i....L;',_

.-.;:-! j:'~~ :.,.,,_ . . . . . . __;

-~:....

r-, w C>C : r. ~.~'-: ;;, -. '-' , -

_ ' .. - ._. _ . -_.

-. -;,

--;ii.-..-.,.;...'"":

~U,_.:_. i. : ~ .. :

:--~- :-";';.-" _ . _ :-i :-;,.,...,_;......;.

- .-.' :.-.-..- _ .:::hU~,ti~..::='

-.--.: :~ .-: In ; ·_·r::.~

- , . r - . ; c-"""

j_. ~!-"

-'-. z, :_. '

~-; .:c··-_:. . :....._:

_ . _ '; : : " '; l : _

• •• - ~ ::- :-; .e-. r-,_.H ; .L ::.::::;' ~ L_

14:20

." .".. . .i . .. ~ . ' _ . '; ; " ,. TACO:: ,

: - . " ; .-..-. -. : ::-- ~ .- :-.,'._'.:;::~_et;= _ . =

~..-:; i :-.-.: ,.

~:n',:1. : _ = l . _ . : . .

, - ..-.-:- ~ --.: '~-.-:--

.-.-,: ::--. _'. :-. --~:u:_ r:,

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

; f 'J ' - . :

- . '-':-":'

.e-, C: :, ; ..' ,-' ; : ;, :-- _ . -

~.-.:--"- -.- -.-:- : .,,:- ; ;...;:-:: :- --.

.- .-, : !-:--:--•. " ~..-, . ~

'-~~! ::- ;--'-';":;...,....-i

: " " ' i : i;-: ,- '-.

r •• - i-.';:-- .-'

Uhi- _ . _ - .\ H 1 . : :: i f) ::_~-::'-. ·.;-_. _ _ ._-_:;;__-:..!_.:',

,-. . . . , .... :.~-~ .- - --. .. :;;....:. :._ '- .-',-:.,-" -.

'-T -;. ::,, :_ , ,_.: .....

- _ . _ - -----_ ,_ . :

.". -- _-:.... -_, -- - ,

_ .. . . . . : ...

- , -. - --..:-:: : ' : : _ - '_: _:: ~: : . . . . . ; '

:: ;-; '- .;~ ~ .. - ', - ;- ' ,- , - .e-. : -- -

~ ,: _ , : _ : !- '

--, ---~:i :_:;-:...·.;

..

- .

'-'~':'._::,,~ • . ;~=-;_4

-..-..-'---,

~,~ ~: ' , = ' ; _ . - . ; . , : : ; ~ - : ' . _

. . , . . : - - - --- - .-; ~ ~ , :~ • ": -e

".-:-, ,-, - , . . . . ... -; - i - : - : : _ . _ _ . . _ : : ' ~ . _ : : _ . .

._.;i j'~

-,,-- _---~-; f '1 "-, ~ . :- - r- ,_

_ , I~ c. -, ,-'. 0, - :-- ~ _- ~

'-"' :_ - ._ :_:_,; :~:"'-':"":, '_. : :-~ _ - '-

-: : . :--' _ _ , _:_. ,- ; ~ : . . , . . ' '-

.- •• " " ,- ,- .-.:; ..- ,.-- .- , ....

.= : i.;~ 1 . ~ . ': ': - _ . : - : t:. = - ~ - = ,

:- ; .,' ., -. _:,;, :_. :_. '--

- , . _,. .. .. ro , ,. .. ... - :- ,. .. .. __ .

.... . ,__ c.,.-:.,. : ;- '- .

: . . . . : ._" , . --' , :'- _ -. ~ ._. :-":.: ...... ; .

_ , _ .. _ , _ . _ - - ' -'-~ '\:_ ~ _ ' , _ - : :-

- - -_ .. _ - - _ .~, :_! -_ :.- :.: -....,;~.:_-~: i_:_ ;,-: ._

.- .-.:.:';-,_. i":::"" "-i

-, -::, ,-, -: ~,i".: ,_; , ~' :_: '_: _ .' '-- . ., -

»-, ~. ,.....- --. ~ :, : - : :..-,

'_. f':::'::" '_,;:' "~ ._,.._ '-- _.

--- - -. -. - _ . -.:...\;__ :- : . . . ~ , ; _ . " " :",' .. . -

_ . .' - :- . -. C'

: ,_. '- '--' -- - --- .

,~.--

'r ,-, C .e-. ~, :- , - :- .'"

.:.._.~ :_;-::.::.ni:

r-. 7 r: r,;-,' "" " - : T ,. ,-

L·.i. '..J~- - , . .:-_

July 1979

;-;:

--,----, - , . , . '-.

- - -. - - ..... , . . . . . -'..-- ""']-: :- ' :- : . ~- : - : ~;-. -'. -..' _ -- _ .,_ . ,_i :_ , ;-" .; :_ . _. '

;-: _ _ . - "

:-" ., . -- .-, _ .. - .:.... - , _ . - . _ . - -

_ H :· ·. .=:- .,,-:-- --:-' ;:_ '-

.-.; ; .-. ,-. -'_ . , : " ' i ' _ ' , _ , '_ , - : , : - - .

-:- : '.-. -,

~: ';'" . : . . :'~_"-;--; '-- _ .

:--, ,-, --. -r :,: .-.

__ ~. . . . . _ .

, - _ ~ , = - .

---_._-: _ ' C . ; '- ' r'::~.

-. - - ' - :,-. -_ . '_: - .~\e-. ,-.:- '.-'. -'. : . . , .... ,',-

... -.

t: 1 '4 : . . . . _ ~ = - _ , ; _ _ _ . ' . . .

, _ ' .' .

':"",!-: ":,.-

: ~ .= - : _ _ ~ : n, '.:' ,- '-,._.:......;. : '---_ .

, . . . . . ..;

MICRO- The 6502 Journal

Page 23: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 23/68

***** A I M - 6 5 *****

E X C E R T I N C O R P O R A T E D

P/N Qtl: 1-9

A65-1 AIM-65 w/1K RAM $375

A65-4 AIM-65 w/4K RAM $450

A65-A Assembler ROM $85

A65-B BASIC ROMS $100

EXCERT has concentrated on the AIM- 65 to guarantee YO U that the products we

offer are ful l y compati bl e. We know how these products work si nce they are

used i n our systems. EXCERT can hel p you get the system YO U want!

A C C E S S O R I E S

pIN

PRS1 +5V at 5A, +24V at 2. 5A,+12V at 1A ( does not fi t

i nsi de ENC1) $95PRS2 +5V at 5A, +24V at 1A

( mounts i nsi de ENC1) $ 50

ENC1 AIM - 65 case w/space forPRS2 and H EB1 or H EB2or V IB1 $ 45

NE W IENC2 ENC1 w/PRS2 i nsi de $ 100

TPT1 Approv ed Thermal PaperTape, 6/165' rol l s $ 10

N E W I MCP1 D ual 44 pi n Mother Cardtakes H EB1, V IB1, PTC1 $ 80

MEB1 8K RAM , 8K Prom sockets,6522 and programmer for

5V Eproms ( 2716) $ 245

NEW! PTC1 Prototype card same si z eas K IM - I, H EB1, V IB1 $ 40

V IB1 V i deo bd w/128 char , 128user char , up to 4K RAM,l i ght pen and ASCII keybd

i nterfaces $ 245

NEW! MCP2 Si ngl e 44 pi n ( K IM - 4styl e) Mother Card takesMEB2, PG R Z and offers 4K

R A M sockets $ . 119w/4K RAM $ 169

H EB2 16K R A M bd takes 2114' s $ 125w/8K RAM $225

w/16K R A M $325

NEW! PG R2 Pr ogr annner for 5V Epr oms

w/R O M fi r mware, up to 8

Ep r om s s i mu l ta ne ou sl y

w/4 textool skts

S Y S T E M S

"ASSEMBLED & TESTED"

Al l AIM - 65 systems are sel f contai ned and

hav e the power suppl y ( PRS2) mounted

i nsi de ENC! .

" STA RTER " SYSTEM S

pIN

SB65-1

SB65-4

SB65-4B

A65- 1 i n ENC2

A65- 4 i n ENC2

Same Pl us BASIC

$475

$540

$640

$195

$ 2 4 5

" EXPANDED " SYSTEM S

"B" "c" " D "M E B I M E B 2 VIBI

E 65-4 A65- 4, ENC2,w /o ne H EBl , H EB2 ,

or VIB1 $ 775

E 65- 4B Same Pl us BASIC $ 875

$ 855 $ 775

$ 955 $ 875

H i gher quanti ti es and systems wi th other

opti ons quoted upon request!

M ai l Check or Money O rder To:

E XC ER T , I NC OR P OR AT EDAttn: Laur i e

4434 Thomas Av enue South

M i nneapol i s, M i nnesota 55410( 61 2) 9 20- 77 92

Add $ 5.00 for shippi ng, i nsurance, and

handling.

M i nnesota resi dents add 4% sal es tax.

Page 24: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 24/68

CONNECTICUT microCOMPUTER, Inc.

~

~RS-232

INTERFACE MODULE

~

t:JGPIB (IEEE-488)INTERFACE MODULE

150POCONO ROAD - BROOKFIELD, CONNECTICUT 06804

(203) 775-9659

~TRQMOD

TRS-80 INTERFACE

ETC.

@ J [ g J [ } J '.BVSTEMS

~~r~RS-232~ ~PRINTER

CABLE ~

A ~.f~

E~r~NALOG INPUT MANIFOLDMODULE MODULE

--.0=---

~ q : = fANALOGMANIFOLDMODULE

SENSORS

• TEMPERATURE

• VELOCITY

• PRESSURE

• db

• pH

• ACCELERATION

• HUMIDITY

• LIGHT LEVEL

• FLUID LEVEL

• ETC. ..

MANUAL ANDDISPLAY MODULE

BXPANDERMODULE

DAM SYSTEMS by C~C

Aco.pleLe SystN of .odules to let "our COIIPuterlistento the real world.

DAM SYSTEMS components

AIM161 - Analog Input Module

1 6 B -b H a n.I Ol I in Pll ls - 1 00 o ic rD Se CC fl d C Q RlI I! I's iro i i . . -

3 stal.e o utPlli - rta uire s ro e 8 -b ii ro If'tJ l.e r ootPIIl POrl

for c oo tro l an d ro . 8 -b H .,., ....I.e r in Plli P Ort to r data.

AIM162 - Analog InFut ModuleA s above plus: I . e r ac curBC! i - !! Old pl.ted oontad s -

pilo l lilill - it.ch seleclabl. s! .arl, enable a nd r ." " "

POlarilies.

POWl - Power ModuleSupplies f'IM!' to r r o. A IK I6 o od ule .

ICON - Input ConnectorF or c on ne cl in ~ a na lO ll i nfU is t o u.. A IM lo - 2 0 p in c ard

~ conne ctor - IOldor . . ., I o ls .

OCON - Output Connector

F o r o onn e cl in s u.. A IM I6 to • C ilIfU I.e r - 2 0 pin card ~

c on ne ct or - 5 OI do r " "" le is .

MANMODl - Manifold Moduleu .e in place of IaJII. S c r e w tero in al b arri" , sirip s fo r

c on ne cl in s . .io !I Sl ic ls , P Ol .e nl i_ te rs . y ol l. a! Io sources • • tc.Elioinales u.. R O O d tor IO ldorins. Plu~ into u.. AIMI6.

ANAMANl - Analoa Manifold Moduleu .e in p lo ct o t I a JI I. Conne c l. !W I S Y ST E lI S 5 E H SI RS to u..A IM I6 w ilh oo i IO ld trin s - sensor cables " 'slplu~ in. Plu~

into LI'tt A IH l6 o r u.. IWtiJIlI .

SENSOfW

S en so rs f or te .Por.l .ure. Pro ssuro. flow . hu.idih , I ..... lrP H , I IO l io n , e l. ct

COMPUTER INTERFACESFo r u.. P E T , KI", T R S ~ , .tc. u .e in p la ce ot O C O O .

Ehllinales u.. R O O d tor solderins or w .c ia l c o os lr ucU ro .

PETMOD - PET Interface ModuleGi.... tw o IE EE PO rts, on. user PO rl "" d o n e !W I S Y S I D t S

i nt er ti lt t' P Or l. Saws w ear and l.ear on u.. PET's P r in t edc irc uil b oa rd . IIlso c .U ed u.. P E T S A V R .

DAM SYSTEMS PRICE LIST

KIMMOD - KIM Interface ModuleG iV E'So n. a PPlic .tio n c on ne cto r PO rt an d o ne l J I V 1 SYSTEMS

i n te r ti lC l ! PO rl .1.179.00

CABLE "AU - Interconnect Cable.Co nn ec ts C < *' II 1. er i nt .e rf oc t t o A IM I6 , IWf fi IS I, X P lW J <I .

.tc.

'alA

$2.<1·9.00 CABLE A24 - Interconnect Cable

24 inch cabl. llilll inl.erface connector on ro. end and . nO C O H . . . . iv.lenl on u.. oUlor .

MANDISI - Manual and Displaw Module

Coonects between !h e A I" I6 a nd u.. COIfIJI .er inl .erfoce.

A l low s . .. .. .. 1 o r . ,. ,. ,. I. er o on lr ol ot u.. AI "1 6 . D i SP I . .. .

c ha nn ol n u" '" a n d data.

T E ' , - ,

GPIB MOD - GPIB (IEEE-488) Interface

Allows u.. !W I S Y S T E I t S NllU£S to be u se d w il li !h e GPIBres

insl.ead of • C<* ' II 1 .e r 's oUlor 110 POrts.$9+9~'_i

RS232 MOD - RS232 Interface ModuleAlIM u.. !W I S Y S T E I t S IIlIllES to be used w i t. h ill 1iS-2l2

POrt or I.er.inll.

TDA

XPANDRI - Expander Module

A llo ws u ~ to 128 8 -b il a na l o ll i nP II ls (8 A IH l6 H oW lo s) t obe o on ne cte d to ORO.YSi.eo.

TBA

TBADAM SYSTEMS set.s

TElAAIM161 Starter Set

Includes o n e A IH I.1r o n. POWI. o n. Ia JII a nd o n. O C O O .

'1;;I.f:l9.(l0

AIMl62 Starter SetI nc lu de s o n. A IM I6 2, o ne P ( l j l , o n e I~ and on . O C O O .

TBAPETSETla

Includes o n e P E O O i l , roe C A B lE A 2 4, o n e A IK I. I, o ne P OW ! an d

on e 1W ti JD1 .

1',«·9.95

KIMSETla

In clu de s o n. K llftlD . o n. C A B lE A 2 4. o n e A IM I6 1, o ne P OW I an d

. .. . I WWJ !I !.

~.::)n:: ,.00

Page 25: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 25/68

Boolean Equations Reduced on the PET

A deceptively small BASIC program trains the PEr toperform computer aided logic design. It will reduce anysingle output process to a rninlrnal, two level network.

When a home experimenter tries to de-

sign a device, there are often one or two

chips he doesn't have on hand. The

builder might stop and order parts, thenwait for delivery; but often this prob-

lem can be solved by falling back onbasic gates and keeping some of these

on handfor emergencies.

Reducing a truth table to an acceptable

number of equations is often a tedioustask. As an aid in this endeavor, I wrote

a program to solve the Boolean equa-

tions using my PETcomputer. The pro-

gram is based on the Quine-McCluskeymethod. It will reduce any sum of prod-

ucts to aminimum, two level network.

500

505

510

515

520

525

530

535

540

545

550

553

555560

565

570

575580

585

590

The general approach used in the pro-

gram is to reduce the number of inputsusing the equation

x 'Y + XY = Y

And then reduce the number of termsusing the equation

XY + V' l + Yl = XY + Xl

This program works only for multipleinputs producing a single output, but it

can bea powerfull aid in multiple outputnetworks too.

The output of a network can be definedas all of the inputs for which a "1" is

REM -COMPARE DIFFERENCES IN TERMS-N$'=· •

D=O

FORM=ITOL

C$=CHR$(FI'IA<I

IF FNA(I)=FNA(J) THEN 535

D=Dfl:C$='-'N$=N$fC$

NEXT M

RETURN

REM -ADD TERM TO LIST-

IFN2=N THEN 595

FOR x=o TO N2IF N$=A$(X) THEN RETURN

NEXT X

IF I=O THEN 595

FOR x=o TO I-I

IF A(X)=O THEN 590

A(X)=O:A$(X)=N$:RETURN

NEXT X

595 N2=N2fl:A(N2)=0:A$(N2)=N$:RETURN600 REM -REMOVE REDUCED TERMS FROM LIST-605 I=0:J=N2

610 IF A(L)=O AND I=<J THEN I=Ifl:GOTO 610

615 IF A{J)=l AND I=(J THEN J=J-l:GOTO 615620 IF I)J THEN 635

625 A$(I)=A$(J):A(I)=O:I=Ifl:J=J-l

630 GOT0610

635 N=J:N2=J

645 RETURN

650 REM -COUNT DIFFERENCE IN TERMS (DISREGAURD DON'T CARES)-655 D=O

660 FORM=lTOL

665 IF FNB(I)=FNA(J) THEN 680

670 IF FNA(J)=45 THEN 680

675 D=D+l

680 NEXT M

685 RETURN

READY.

July 1979 MlCRO- The 6502Journal

Alan K. Christensen1303Suffolk StreetAustin, TX 78723

wanted. In addition, there may beconditions where you don't care

the output is because that input

dition will neverbe present. For thi

gram, the "don't cares" are assign

. such a way as to reduce the numb

inputs to required terms, but they aconsidered when choosing the tnecessary for the output.

This routine is written in modulesexplanation of the function of

module will aid in translating thegram into other languages. Impo

facts about PET BASIC are: ifaremultiple statements on the samafter an IF THEN combination, non

execute when the condition is fals

variables are zero unless other.wiseand a zero subscript is permittearrays.

The code with line numbers 0-99

forms general set up. Important g

variables are: A$ - an array of reqand don't care terms, B$ - an arr

only required terms, A - an arra

flags for A$, Q - an array of flagB$, B - the number of required t(·1),Nand N2 - the number of termA$, and L - the number of input

ables for eachterm.The module 100-399is for the data i

For this input scheme the user typ

the input combinations for which a 1put is desired. These can be e

strings of zeroesand ones or uppelower case letters. If there are

cares present, the user enters "X"follows with the don't care terms.

last input is followed by "END".

If the user wants to create a diffeinput, such as from a tape or atable, the important results areshould contain terms which have aoutput, where the first entry is BB should equal the highest index o

A$(O-N)contains all the terms of B$any don't care terms. Nand N2equal the highest index of A$. Arra

and Q should both equal zero fo

entries, and L should equal the numof input variables.

Module .400-449is where the literalsreduced from the terms. Each term

compared to every other term anthey differ by only one variable,

1

Page 26: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 26/68

variable is replaced by a don't care (-).The new term isadded to the list, and thetwo combined terms are marked forlater removal. The process continuesuntil the program loops through the en-

tire list without further reductions.

In module 450-499,the reduced terms inA$ are matched against the originalterms in B$. Each required term is

matched with the most-reduced term

that covers it.

Module 500-549 is used to compare

different terms in A$. I and J are the in-dex values of the terms. The routine re-turns the number of variable differences

in D. N$ is the reduced expression and is

only valid if D = 1.

In lines 550-599, a term N$ is added toA$ outside the range of the present loop.

It is designed to conserve memory. No

term will be added which is already in

the list. The process usually generates

duplicate terms, and it will place the newterms at the front of the list if those

terms are marked for removal byA(I) = 1. .

Module 600-649removes all terms which

were reduced but did not get removed inlines 550-599.It resets Nand N2to point

to the end of the new list. The modulefrom 650-699 compares terms in B$ to

A$. I is the index of the B$ term and Jindexes A$. In this routine, a comparison

of any single variable in B$is considereda match with A$ if the variables are equalor if the corresponding varialbe in A$(J)

is a don't care, ASCII 45. The differenceis returned in D.

Module 700-799finds the most restrictedterm in B$. The key to arriving at theminimum solution, as opposed to just a

valid solution, is to find each requiredterm with only one reduced term tosatisfy it, anessential term. If all of them

have more than one possible term, weselect the term in B$ which could besatisfied by the least usefull term fromA$_

This is so that bad matches can be

avoided early and, in the case of cyclicexpressions which have several equiva-lent but different solutions, so thatevaluation will not introduce redun-

dant terms.

In lines 800-899, the reduced terms are

sorted to bring the terms that satisfythe most conditions to the beginning ofthe list. This insures that the best choicewill befound first.

The last module, at lines 900-999,locatesthe minimum number of reduced termswhich satisfy the problem. The mostrestricted B$ term is paired with its best

match in A$, and all other terms in B$which are also satisfied are removedfrom further consideration.

If the flag W isset to one, it means more

than one solution exits for this problem.

14:24

A B C D

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

v w X r Z

0 0 0 0 0

0 0 0 0 1

0 0 0 1 0

0 0 0 1 1

0 0 1 0 0

0 0 1 0 1

0 0 . , 1 0

0 0 1 1 1

0 1 0 0 0

0 1 0 0 ,1 0 0 0 0

1 0 0 0 1

1 0 0 1 0

1 0 0 1 1

1 0 1 0 0

1 0 1 0 1

Tabl e 1: Four- bi t Binary to 5- bi t BDC Conversi on Hap

into a second program to obtain a com-pletely reduced result.

The idea is to look for pairs of terms,each with a variable that matches with a

don't care variable in the other term, andmatching in all other variables. The

matching terms can be combined byANDing with the non-matching terms,

making an OR at the next level. Termsthat match in some variables but not inothers can be combined in a next level

of the matching gates with the differingvariables in the lower level.

A C A A ~ A P cI I

I'I ' ~ 7I " ,I ~

I I' ; : ' - 1 . r : ; _ :

1

r- . J ,~+ :+ I

\ I ,r

'"v

V W

Usually the other solutions can be found

byentering the terms in adifferent order.

Sometimes, when there is more than onesolution, the most economical solution

will not be the first one found. Thisproblem could becured bygenerating all

of the multiple solutions, but that wouldrequire more than the 8K of memory I

hadavailable.

The result might be further reduced bygoing to a three level solution. This again

requires more than 8K, but it would bereasonable to feed intermediate results

I, • r

, ,

z

Figure 1

July 1979ICRO-The 6502Journal

Page 27: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 27/68

C A C A B C D

I, I

" J .7

, I

I I ¥,

")_'_~_'I I

I I,

v y

making an OR at the next level. Tthat match in some variables but nothers can be combined in a nextof the matching gates with the diffevariables in the lower level.

I have not yet been able to deterwhether my method will result in

.minimal equation. As of now, nonique for this problem is known. Th

lowing example will illustrate the eprocess.

Theproblem is to convert a 4 bit nuinto BCD(5 bits). The truth table fo

conversion is shown in Table 1.Wgin by entering the inputs for whic

want output V to be true (1). Thquence is:

w x z

? 1010? 1011

? 1100? 1101? 1110? 1111? END

and the computer replies, after adelay,with:

1-1-

11- -Figure 2

This signifies that the minimum

level solution for V isAC + AB.Thecess is repeated for the rest of theputs giving results of:

700

70S

710

715

720

725

730

735

740

745

750755

800

805

810

815

820

825

830

835

840

845

850

ass860

865

900

905910

915

920

925

930

935

940

945

950

935

960975

July 1979

REM -PUT MOST RESTICTED TERM AT BEGINNING OF LIST

FORI=OTOB

(HI)=O:T=B

FORJ=OTON2

GOSUB 650

IF D=O THEN GCI)=QCI)+l:IFAeJ)(T THEN T=ACJ)

NEXT J :GCI)=QCI)+T/10000: NEXT I

IF B=O THEN 755

FOR I=lTOB

IFGCI)<GCO)THENN$=B$CI):B$CI)=B$CO):B$eO)=N$:X=QeI):OeI)=OeO):QeO)=x

NEXT IRETURN

REM -PUT REDUCED TERMS WHICH COVER THE MOST AT THE FRONT OF THE LIST-

FORJ=OTON2

ACJ)=O

FORI=OTOB

GOSUB 650

IF D=O THEN AeJ)=ACJ)+l

NEXT I : NEXT J

FOR I=OTON2-1

FOR J=Bl TO N2

IF ACI»ACJ) THEN 860

N$=A$CI):ASeI)=A$CJ):ASCJ)=N$

X=ACI):ACI)=AeJ):ACJ)=X

NEXT J : NEXT I

RETURN

REM-FIND ESSENTIAL TERM AND ELIMINATE ALL ORIGINAL TERMS THAT IT COVERS

GOSUB 800:GOSUB 700:I=0:J=0GOSUB 650

IF D)O THEN J=J+l:GOTO 910

IF OeO»=2THEN W=l

GOSUB 975

GOTO 950

GOSUB 650

IF D>O THEN I=I+l

IF D=O THEN GOSUB 975

IF I<=B THEN 935

N$=ASeJ):ASeJ)=AseN2):A$CNZ)=N$:N2=N2-1

RETURN

NS=B$CI):BSCI)=B$CB):B$CB)=N$:B=B-1:RETURN

MICRO-The 6502Journal1

Page 28: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 28/68

W = 100-

X = 01 - - . - 11 -

y= 110-.0-1-

Z= ---1

A B' C'

A'B + BCABC'+A'C

o

The next step is to input the values for

output which have a reasonable number

of identical terms. For example, V and X

have inputs of 1110 and 1111 in common.

To see if sharing a gate will reduce the

equations, we enter V again with those

terms as don't cares. The input se-

quence is:

? 1010

? 1011? 1100? 1101

? X? 1110? 1111

?END

The output is the same as before; there-

fore, no gates are saved by combining

these terms. When the same thing is

tried with V and Y we get a shared equa-

tion of 110 - (which is already a term of Y)and re-entering V with 1100 and 1101 as

don't cares gives an output of 1 - 1 -which indicates that we can save a gate

by using V = AC + ABC'.

Further testing shows no more gates

can be saved by this method, so the next

step is to try to increase the levels. X is

the only output which has terms that

differ only at don't cares. 01 - and - 11 -

can combine to (0)1(1) -, or B (A + C).

This leads directly to the circuit of Fig-

ure 1. Duplicates or unnecessary gates

are shown by dashed lines, A network ofalternating OR - AND gates can be con-

verted directly to a NAND - NAND net-

work by inverting the literals on odd

levels, with the level nearest the output

as one. This brings us directly to Figure

2.

There is still one problem. There are two

gates which have three inputs and I onlykeep two-input NAND gates and invert-

ers as spares, A three-input NAND can

be replaced by 2 two-input NANOS and

an inverter (A NAND B NAND C) = ((ANAND B) NAND C)- Looking at the two

offending gates, we see that they share

A NANDC' in their equations, so we can

share a gate.

The final circuit is shown in Figure 3_ It

can be realized with two quad NANOs

and one hex inverter. This process could

have been performed by entering the

terms for which a zero value was desired

(and don't cares) resulting in a network

of NOR gates. Basic gates nearly always

take more wiring in a circuit, but when

purchased in quantity they are cheap,

and they can make the difference be-

tween finishing a project today or justwaiting for parts.

14:26

5 REM BOOLEAN EQUATION REDUCER

10 REM ALAN K. CHRISTENSEN

15 REM AUSTIN, TEXAS 4-14-79

20 DIM A$(250),AC250)

25 DEFFNA(I)=ASCCMID$(A$CI),M,l»

30 DEFFNBCI)=ASCCMID$CB$(I),M,l»)

35 POKE 59468,14

100 REt! -DATA INPUT-

105 B=-1:N=-1:N2=-1:I=0:J=0

110 INPUT N$

115 IF N$='X' THEN B=N2:GOTO 110

120 IF N$='END' THEN 130

125 GOSUB 550:GOTO 110

130 IF B(O THEN B=N2

135 DIM B$(B),QCB)

140 FOR I=OTOB:B$CI)=A$CI):NEXT I

145 L=LENCA$(0»:N=N2

400 REM -REDUCE TO MINIMUM LITERALS-

405 L2=0!N2=N

410 FOR I=OTON-l

415 FOR J=I+l TO N

420 GOSUB 500

425 IF D=l THEN ACI)=1:ACJ)=1:L2=1:GOSUB 550

430 NEXT J

435 NEXT I

440 GOSUB 600

445 IF L2<>0 THEN 400

450 REM -ELIMINATE REDUNDANT TERMS-

455 N3=N2

460 GOSUB 900

465 PRINTN$

470 IF B>=O THEN 450

475 IF W=lTHEN PRINT'MULTIPLE SOLUTIONS'

480 STOP

READY.

A C A C fI C

I I I I

,< .l7 I ~J. 7I, I I , I

I ~

¥I

~ r'~--'~ r-,

, I . IB '-

/B \ I A C

9

v II '

MICRO-The 6502 Journal

A CI I

,I ~-?

, I

: ~

~ _ J ~B, /

D

I'1 '

I~j_7

\ I

I ,

s - - ,I I, • J,/

'0 "

x y

Figure 3

z

July 1979

Page 29: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 29/68

Screen Dump to Printer for the APPLE II

No need to print yards of listing when you want onlyone or two screenfulls of data. Print only the displaysegments you select with this versatile BASIClanguageoutput routine.

R. M. Mottola

Cyborg Corporation

342 Western AvenueBoston, MA 02135

In certain programs it is often desirableto be able to print a screenfull of infor-mation on your printer after you have re-

viewed it on the screen. Long lists ofdata could be reviewed, one screenfull

at a time, and only those pages thatwere neededwould beprinted.

The following short routine is a BASIC

version of a machine language printerdriver. Its advantages are that it willwork with the Apple Parallel Printer Inter-face Card and any printer, without theneed to re-write the printer driver. Also,

since it is written in BASIC, it is easy tounderstand andto modify.

The first step required is to put a shortmachine language routine into memory.

Lines 90 to 130 of the sample programPOKE a routine into the free memoryarea starting at location $300. For sys-

tems using Apple DOS, it is importantthat you perform this step after DOS isbooted, because this area of memory isclobbered during boot. This routine will

makea character available to the charac-ter output routine in the monitor, $FDED,which will in turn pass it to the appropri-ate printer driver.

The second step is to add the screenprinter subroutine to your BASIC pro-

gram. This subroutine is shown in lines

500 to 610 of the sample program.Start-ing at the "home" position on the

screen, this subroutine passes eachcharacter in screen memory (page 1)

to the printer card, via the COUTroutinein the monitor.

The POKEin line 560passes the charac-ter to the machine language routine at

$300.Although it mayseem like a lot of"passing", this method allowes the useof a conventional PR#Xcommand fromBASICto specify which slot is to receivethe output. Other commandsof note are

those in lines 520 and590.The first tells

the parallel printer interface to print onlyon the printer, and not on the screen.The second returns output to both the

printer andthe screen.

The third step in implementing the

screen printer is to add an INPUTstate-ment to your program which asks the

user if the screen is to be printed. Thisis found in line 250.Also note the POKE

34, 23 in line 240. This command sets

the top of the scrolling window to linenumber 23,the bottom line of the screen,thus insuring that the prompt itself doesnotget printed.

The sample program listed is a demon-

stration program designed to show thescreen printer in use. The routines in it

can be adapted to any BASIC program

with little dificulty. One thing to kemind, though, is that flashing or in

characters may print out in variouferent ways, depending on the pr

If you want to include flashing or incharacters on the screen, the addnoted in lines 552 to 560,listed afte

demonstration program, should bcluded, These lines test for and"noize" blinking or inverse characte

they will appear normally on the prHowever, using this modificationslow down the screen printer roconsiderably. its BASIC implement

is pretty slow to begin with. Replall constants with variables willeither versionmuch faster.

See AppleSoft II BASIC ProgramReferenceManual, Appendix E,for

on this. If you are using Appleremember to replace all PR#Xmands with print control D; "PRto keep DOS from being turned

Finally, if you are using Integer BAplease note that you will haveto mthe logic structure found in lineFor a complete map of how the va

characters are stored in screen memsee "An Apple" Page 1 Map" byConnolly Jr., MICRO8:41. Happy sc

printing!

14July 1979 MICRO-The 6502Journal

Page 30: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 30/68

JUST

II) RE~l:Hi R H 120 PEr'1

[,E~10NSTRATION PROC:; F .:At1SCR EEN PR INTER R OU TINEF O R APPLE II APPLESO F T 8

ASIC: : : : : ~ 3

40 PEM D EF INE V AR IABLES5~3 SLOT ' " 16 13 OFFSCREEN$ = "": R EM " ( CTR L) I4

I2INII

?0 RETSCREEN$ = "

R EM " ( CTR L) II"80$I e R Et 'l.PU T r 1ACHINE LANG UAG E R OU T

INE INTO M H 10R ' r100 F O R N = 768 TO 77411121 READ X: PO K E N. X1 2 1 2 1 NE:<T1 ? - 0 DATA 173.11,3.32.237.,253.96

:140:150 R EM F ILL SCREEN F O R D EM O NSTR

ATIONL60 ~O R X = 1 TO 3

1 7 1 2 1 H O M E READ T:< T$18121 F O R Y = :1 TO 22190 F O R Z = :1 TO 62 1 3 1 2 1 PR INT T:' - (T$ ;210 NE)<T Z

221) PR INT" ": I' :Et 1NU LL STR ING2::121 NE:><T r2 41 21 P O K E 34. 23:

250 PR I H : INPU T " PR INT SCR EEN?Cr, · · · 'N );A t6$

260 : IF ANS$ = " Y" TH EN G O SU B 51211 3

27121 POKE 34. 13

2E:I2 INE>: T::- ;2 90 D ATA " t1ICR O " . " APPLE" . " 6510

..., II. .3 : 1 0 1 0 EN D400

451215130 R Et1 SCR EEN PR INTER SU BR OU TIN

E

5:113 PR # SLO T

520 P RI NT O F F SCR EEN $53121 F OR A ' " 121TO 8121STEP 410354121 F O R B = 12 1 TO 7550 F O R C ' " 1824 + A TO :112163+ A560 POKE 779., PEEK ( C + B * :128)

578 CALL 768

s se NEXT : NEXT NEXT5 91 21 P RI NT R ET SCR EE N$6 1 2 1 0 PR # 1216:10 RET U RN

PR#0JUST 552,5613

552 CHAR = PEEK ( C + 8 * 128)554 IF CH AR < 192 TH EN CH AR CH

AR + 64: G O T O 554

556 IF CH AR = 224 TH EN CH AR 16

e56121 POKE 779. PEEK ( C + B * :128)

14:28

ClassIfied Ads

SAMPLECOPY-.NewBUY-SELL-

"Publica tion, indexed by

oduct .type, mailedniontbly

t Class. ~500 circ., low,

ow ad rates. Send for your freee copy now! Subscription

.50 per year,"~ FREE THREELINE

with subscription. .'from: "" "

LEC'l'RONICSEMPORIUM

Dick Costello, Pub.

"P.O .. Box 828

Derry ,NH 03038 '

for users of Rock-

65. Find out how

use the printer, keyboard

and display. Revie~s·· of up-coming Assembler and BASIC in

Six bimonthly issues

.OOUS.and'Canada ($12.00

ewhere). Order from:""

Don Clem

RR#2·

'.' ..... "

APE loadsBK BA~ICin 15se-

Slower than· a speeding

disc? Sure, but it only costs

.5"0 plus$i.OO S&H. $3.00 .

for software On KIMc

scribed in MICRO#6. SASE for

fo. Order· from:

Lew Edwards

llJ51 Hamil ton

.Trenton, NJ.

MICRO- The 6502 Journal July 1979

Page 31: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 31/68

OSI Memory Test in BASIC

All memory tests are not alike. This one features an ex·tensible, BASIC language implementation.

Have you experienced the complete

failure of your favorite program lately?

Have you reloaded it into the machineonly to have it bomb over and over

again? Well. I have, and many times' This

could be caused by a bug in the pro-

gram, but if the program has run before

and now bombs there must be some-

thing wrong in the hardware. This usual-

ly means that there is a reclusive bug

hidden somewhere in those many K's

of RAM.

How do you find this reclusive bug? Ifyou have a machine code monitor and

loader, you could load the memory and

step through the program checking for

errors. You might also load a diagnostic

program to test the memory. "OK" you

say. "but I don't have a machine codemonitor. My machine has only BASIC

in ROM. What do I do to check for these

bugs in my machine? I have no means to

get at these bugs in my machine with

this BASIC only!"

Well take heart, all is not lost. I have had

this same experience. Felt the same

wrath, of the same bug in those many

K's of RAM, that you are feeling now!

From this experience I made a decision.

I decided to prevent this from doing me

in over and over again. My solution to

the bug-in-memory caper was to write a

diagnostic program, in BASIC, to check

the memory of the BASIC-in-ROM only

machine.

The program that I have written will load

memory with an inital value stored in

the 0 variable, between the address

limits P1 and P2. The program incre-ments the 0 variable from its initial

value to 255 decimal. This represents

650 REM MEMORY TEST BY W_L. TAYLOR 1/2/79

660 PR INT" · ·· ·· ·M EM OR Y TEST· • • •• • " :PR INT665 PR INT" ENTER STAR TING PAGE AND END ING PAG E" :PRINT700 INPUT" STARTING PAGE " jP1710 INPUT" END ING PAGE ";P2720 D =O730 LET A=Pl ·2 56740 LET B=P2· 256750 FOR C= A TO B760 POK E C,O7 70 E= PEEK . ( C)780 IF E<> D THEN PRINT" BAD DATA BYTE AT" jC790 IF E<> D THEN END800 NEXT C81 0 0= 0+ 1

820 IF 0<256 THEN 750830 IF 0=256 THEN PRINT " TEST COMPLETE WITH NO BAD DATA BITS

OETECTED":PRINT840 END

July 1979 MICRO-The 6502 Journal

William LTaylor246 Flora Road

Leavittsburg, OH 44430

all combinations of bits that ca

stored in a memory location. After

bits are stored, the program compthe data bits in memory to the i

value that was stored there and, if

are not the same, a report will be pri

out to the terminal.

I have written the program to req

page numbers for the starting and

ing addresses. This could be chan

to use decimal equivalents if the re

wishes. The starting address is

tained in variable P1 at line 700. The

ing address is contained in P2 at

710. The contents of both variables

multiplied by 256 to obtain the deci

equivalent of the page numbers.

720 is the in ita I value of the data an

usually set to O.

At line 750 the program is told to

the limits of memory between P1

P2 via a FOR-NEXT loop. At line 760

data bits are POKEd into memory.

785 looks at the data in the mem

location that was previously stor

At line 790 I compare the data stored

memory against the data in variable

see if the two are equal. The next byt

loaded and compared at line 800.

Line 825 increments the data value in

D variable. Line 830 checks the 0

able to see if 255 decimal has b

reached and, if not, executes a ret

loop through the program. Line 840

ports the results of the memory test.

This program was written in MicroS

BASIC for the OSI Challenger. It sho

run under other BASICs with m

modifications. The program will be

interest to users of machines w

BASIC in ROM and others who wan

simple way to test memory. The progr

is some what slow, but this a very sm

price to pay for the ease of operatio

Good luck and good memory testing.

14

Page 32: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 32/68

SYM and AIM Memory Expansion

An easy hardware modification addresses extendedmemory in contiguous 8K blocks with no gaps. This neatenhancement makes Memory Plus a natural for RAM·ming more data into the SYM and AIM.

In an attempt to implement BASIC on theSYM it became apparent that the 4K of

onboard RAM was insufficient for our

needs. Although we have several Mem-

ory Plus boards around, the RAM on

these boards is addressable in 8K byte

blocks decoded at 8K boundaries, begin-

ning at location 2000. Unfortunate-

ly, this decoding scheme leaves a 4K

block of memory unimplemented. That

block of memory is from address 1000

through 1FFF.

In order to overcome this shortcoming, it

is desirable to decode the Memory Plus

board in 8K blocks that are address-

able at 4K boundaries; that is, at loca-

tions 1000, 3000, 5000, etc. With thisscheme several MP boards could be add-

ed on to expand the SYM memory in a

continuous fashion. There are methods

available for making this change, but

most of these require changes on the MP

board itself. This is undesirable, espe-

cially if servicing becomes a problem.

The solution lies in replacing the three

high order address line decoding

schemes with one that will address

memory at 4K boundaries. This can be

accomplished by bringing addresses

A12, A13, and A14 into the inputs of the

74LS138, as opposed to the present A13,

A14, and A15. With this change any posi-

tion of the rotary switch which selects

the RAM decoding address enables theRAM at 4K boundaries, and also only in

4K blocks.

To pin

IE-R

Paul Smola

Acushnet Corporation

P. O. Box E916

New Bedford, MA 02742

-Interconnected

as shown abov e

Remove the 74L5138 from socket U4 on the H P

boar d and r eplace i t with the abov e assembl y

f.

If we were to OR two adjacent outputs

together, we would have 4K boundaries

with 8K blocks. However, because the

outputs of a 74LS138 are totem-pole, OR-

ing them must be done with additional

gating and not simply by tying the out-

puts together, as is done with open-

collector outputs.

One method of doing this is by replac-

ing the '138 with a 74LS145 BCD-to-

decimal decoder driver. This device has

open collector outputs enabling them to

be wire OR'ed together. However, the pin

out on the '145 is radically different from

that on the '138.

The way to get around this is to mount

the '145 in a 16 pin dip socket which is in

2, r4

3 13

4, r2

5 11

60 r07 98 8

16-pin16-pin 11--- N . C .DIP 91--- N . C . DIP

socket 10 I--- N . C .heac1er

11 I--- N . C .12

313 214 115

I16

!16

Solc1er t o pi n IE-R on the ~M emory Pl us Expansi on Connector

Figure 1

14:30MICRO- The 6502 Journal

Figure 2

turn connected to a 16 pin dip header.

However, rather than matching the pins

number for number, the connection

diagram in Figure 1 is followed. This is

most easily accomplished by using a

three level wire-wrap socket and cutting

short all the pins except 8 and 16. These

shortened pins are then wired to the cor-

rect position on the header by soldering

jumpers on. This causes the pin out con-

nections to be changed and thus allows

the '145 to operate in the socket which

was previously loaded with the '138.

The 16 pin dip header is then loaded

into the MP board into socket U4 as

shown in Figure 2. The '145 has the ad-

vantage of having four address input

lines. Thus address lines A12, A13, A14,

and A15 are brought into it and fully

decoded. Since address line A12 is not

brought to socket U4, it must be

separately wired. A convenient place to

make this connection is on the MP ex-

pansion connector pin #E-R.

With these changes, the RAM select

rotary switch now selects hex locations

1000-2FFF at the first two positions. At

the second two positions RAM is

selected at 3000-4FFF. In the third two

positions RAM is selected at locations

5000·6FFF. RAM will not be selected

with the selector switch in the seventh

posltion.

With the switch in the first or second

position, BASIC on the SYM can be i rn -plemented with 12K memory; the 4K on-

board, plus the 8K from the MP. The ad-

dition of another MP board set up the

same way with the RAM selection switch

in either posttlon 3 or 4 would yield a

system with 20K of continuous memory.

July 1979

Page 33: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 33/68

6502 Based SYSTEMS

The COMPUTER 1SToffers-the best in the single-board, 6502-based microcomputers, These include the Rockwell AIM-65, Synertek Systems SY

Commodore KIM·l, and, late this fall, The COMPUTERIST MICRO PLUS, As you will see from this catalog" The COMPUTERIST is devoted

supporting this class of 6502 systems, Think of us first - for all of your 6502 needs: Systems, Expansion, Power, Software, and other ite

The AIM 65 is a complete microcomputer system, not just a single board computer, It

has many of the features of the KIM-l and SYM-l, but also has three alphanumeric type

devices which make i tsignificantly different:

Full size typewriter style keyboard - makes it easy to enter data,Twenty character LEDdisplay with sixteen segment displays for good looking, easy- to-

read alphabetic and numeric characters,

Twenty column thermal pr inter for alphanumeric hardcopy,

Other features include:

An 8K ROM Monitor with a mini-assembler/disassembler, editor, numerous operator

functions and many important subroutines for program development.

Comes with 1KRAM expandable on-board to 4K,

Has provision for an additional 12K of ROM including a 4K Assembler and an 8KBASIC,

The expansion and application pin-outs are compatible with the KIM and SYM,

making it simple to interface to existing devices,

Supports K1M format cassette tapes at 1 and 3 times normal speed, plus its own high

speed cassette I/O, Includes two complete cassette ports with remote control

facilities,

by Synertek SY51em~

An Expandable 6501 System

by Rodwelllnl ernational

The Comp le te 6 50 2 Sy st em

The SYM·l is a relatively new entry into the 6502 market by Synertek Systems, T

is the same size and shape as the KIM-l and uses the same connector placempin-outs, thereby maintaining a fair degree of compatibility with the K IM-l,

advantages are:

It comes with lK of user RAM, and is expandable on-board to 4K RAM.

A larger Monitor. 4K vs the KIM 2K" with a number of useful functions,

It has room on-board for an additional 12K ROM. This ROM may be progr

data defined by the user or Synertek supplied programs such as an Asse

BASIC.

Ithas much more I/O capability than the KIM-l and improved timers.

It has KIM compatible tape format as well as a higher speed tape format.

Like the K1M, it supports a teletype terminal, but it also supports more soph

terminal interfaces,

The touch-pad type of entry keypad is more reliable than the type used on the

If you need the added features of the SYM-l, especially the extra RAM a

provision, then this is a best buy, It currently has limited supporting software, b

to the market, but this should not be a long term problem

The KIM·l is the grand-daddy of all 6502 based microcomputer systems, It was orignallv

created by MOS Technology, the inventors of the 6502, as a way to demonstrate the

power of the 6502 to the industrial community, To their surprise, the KIM-l became a

highly successful single board computer - used in industrial control, education, hobby,

and many other applications, It is still very popular today, Features of the KIM-' are:

Based on the 6502 microprocessor with its powerful instruction set.

Two 6530 multi -purpose chips each containing 1K ROM, 64 bytes RAM, a programmable

timer and 15 I /O lines,

lK bytes of RAM, a Hex Keypad for entering programs and data, and a six character

LEDdisplay.

Itsupports a 20mA Current Loop TTY and Audio Cassettes for program/data storage,

The very low price makes this an excellent buy - and the expansion bus structure is

compatible with the AIM 65 and SYM-l so that conversion to one of these other systems

can be made with minimal hardware difficulty, There exists a large body of literature and

many "ready-to-run" programs for the KIM·',

High gpeed Audio Cassetle [/0

4 1( SYM Mon it or i n ROM

Up to 41( RAM on board

Up to 121 ( add it iona l ROM

O....r 50 110 line capability

SYM-1 : $27000 11( RAM· 3150041 ( RAM

The Super 6502Single Board

Computer

Features:

FLOPPY DISk CONTROLLER

Up to 16k PROMffPROM en-board

kiM Comp.1tibleCASSETTE 110

20MA Cu,renlloup TIt Interlace

t ot s o f &52 21 ype 1 10

Up to 16k RAM on-board

P lanned 101 Late 1979

20 Column Thermal p rint er

H igh Speed Aud io Cas

Keyboard versatne 81(ROM Monitol

MICRO PLustm is currently in the advanced design stages.

It will be a s ingle board microcomputer featuring:

6502 MicroprocessorFloppy Disk.Controller for Mini and Regular Floppy Disks

Cassette I/O including KIM compatability

20 MA Current Loop TTYInterface

Up to 16K RAM on-board

Up to 16K ROM/EPROM on-board

Several 6522 VIAs

Same SIZE and SHAPE and PIN-OUTS as KIM-lISYM-l

Plus a couple of proprietary features to be announced later. Scheduled fo

delivery late 1979. Please do not call or write for additional info until September

AIM 65: S37S001KRAM-542()OO"'IKRAM

by Commodore

T he 0 li gi na l6 50 2 S

20 rnA Current Loop TTY Interface

Audio caseette Interface

15U !e r 110 lines

2 I nt er va l T imer s

lK+ RAM

2KK IM Moni to r ROM

H ex K ey pi ld lL ED D is pl oi lY

kIM-l:$18()OO

Page 34: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 34/68

S Y S T E M E X P A N S IO NThe COMPUTERIST makes it easy for you to expand your KIM·1, SYM·' or AIM 65 based system. Four boards are offered to increase the memory

of your system, add full feature video to your system, provide a means to add your own circuits, and a means to get all of these added features

working together . The design of these boards makes it possible for you to choose one vendor for all your normal system expansion requirements.

The four boards are designed to work together and fi t together in a system configuration which makes sense. The PLUS on each board represents

added features that are not found on simi lar boards offered by other manufacturers· PLUSES that often dramatical ly enhance the capabil ities

of your basic system.

AIM/SYM/KIM

8K STATIC RAM P~~~R

Sockets for 8K Eprom

65221/0 Port

ON BOARD REGULATORS

EPROM

PROGRAMMER

MEMORY PLUS: 5200 00 FULLY ASSEMBLED AND TESTED

FOREXPAND YOUR SYSTEM WITH MEMORY PLUSTM

MEMORY PLUScombines four of the most important system expansion capabilities on one PCboard This board u

the standard klM-4 Expansion Bus and is the same size/shape as the KIM-l/SYM-l so it can be conveniently place

unde r any AIM/SYM/KIM sv st em The f ou r fu nct ion s are:

8k RAM ~with low power 2102static RAM - the most important addition for most systems

UKEPROM -sockets and address decod ing for up to 6Ko f Intel 2716 type EPROM.

EPROM Programmer - program your EPROMS on the board! 1/0·6522 Versatile Interface provides two 8 bit

po rt s, two mul ti -mode t imers. a nd a s er ial /pa ra ll el sh if t r eg ist er .

Othe r fe atures o f Memo ry P lu s includ e:

On-boa rd vol ta ge regu lator s fo r + 5V for general power and + 25V fo r the C PROM Programmer

Independ en t sw it ch se lec tion o f the RAM and ROM star ti ng addres ses .

All IC' s socke ted tor easy f ie ld rep lacement

Full y assembled and bur ned in - r eady to plug i n a nd go.

Documentation includes a 60+ page manual with schematics, program listings, 2716 and 6522 data sheets, and

cassett e t ape with an EPROM Programming Pr ogram and a Memory Test

Over 8OOMEMORYPLUS un it s a re al rea dy inu se w ith AIMs, SYMs and klMs.

May be direct ly connected to your syst em wi th our cable or through our MOTHER PlUStm board.

IT'S EASYTO ADD VIDEO PLUSTMTO YOUR SYSTEM,

EO PLUS is the most p owe rfu l expansion board ever offered for 6502 based systems. It has many important vi deo

ures including:

Pr ogrammabl e Display Format - u p t o 100 charact er s by 30 li nes on a good monit or.

A ROM Cha ra ct er Generator w ith UPPER and lowe r c as e ASCII c ha ra ct er s.

A Programmable Character General or for up t o 128 user defi ned char acter s which may be changed under program

cont rol . You c an de fine graphics , musi c symbo ls , ch es s pi ec es , fo re ign ch arac ter s, gray sc al e - a nd ch ange them at w il l!

May be used wi th an inexpensi ve TV set or an expensive monitor.

Up to 4k of Displ ay RAM, wi th Hardware scrolli ng, programmable cursor, and more.

addi tion to the Video featur es, VIDEO PLUS al so has:

A keyboard Interface wh ic h w il l work w ith a ny " rea sonable" k eyboard.

built -In Lighl Pen Interface .

Provision for a 2k EPROM or ROM for video cont rol or other software

ll of the memory - 6K RAM and 2K EPROM can be used as system memory whenever it is not in use as display or

programmable character generator

IDEO PLUS may be used di rectly as an expansion of an AIMfSYM/KIM system. or has provision for t he addition

of a 6502 for use as a St and~Alone syst em or Termi nal!

ly requires + 5V and has on board voltage regulators. Since it's the same size/shape as the ;<IM or SYM, it may

a si ly be plac ed unde r an AIM/SYM/KIM sys tem. I t us es the KIM-4 expans io n format .

y assembled, t est ed and bur ned i n. Connect dir ectly to your system or via the MOTHER PLUS board.

~~[! [email protected]

AIM/SYM/KIMS ame S IZE a nd SHAPE a s k IM /SYM

Profess ional Quality

Do ubl e S id ed , P la te d t hr ou gh Ho le s

Two sets o f GOLD P la te d Du al 2 2. fi ng er i

D~ si gne d f or W IRE WRAP (IT

SOLDER Connecttons

P ro vi li or u f or 4 0 1 4/ '( , p in so ck et s

424 /40 p in s ocken

J . .. ltage regulators PROTO PLUS: $4000

tm

1Y~[])[3® ( ; J~~@l FOR AIM/SYM/KIM

UPPERllower ease ASCII

128 Additional User Programmable

Characters: GRAPHICS·

SYMBOLS-FOREIGN CHARACTERS

Programmable Screen Format up to

8 0CHARACTERS -24 LINES

KEYBOARD and LIGHT PEN Interlaces

Up to 4K D ISPLAY RAM

Prowlalon tor2K EPROM

Provision to add 6502 for

STAN[)'ALONESYSTEM

ASSEMBLED AND TESTED

WI TH 2K DISPLAY RAM

VIDEO PLUS: $24500

ADD YOUR OWN CIRCUITS WITH PROTO PLUSTM

PROTO PLUS is the simple way to add special circuits to your system It is the same siz

and shape as the KIM and SYM, making it extremely easy to use with these systems, an

can be neatly added to the AIM as well. It provides about B O square inches of wor

area. This area has provision for about 40 14/16 pin sockets, about 4 24/40 pin sockets

3 regulators, etc. The connections to the board are made through two sets of gold plate

fingers - exactly like the AIM/SYM/KIM. This means that there are a total of B B edg

connections - more than enough for most applications. This is a professional quality

double sided board with plated through holes. The layout was designed so that you ca

use wire wrap sockets or solder sockets - each Ie pad comes out to multiple pads Ther

is room for voltage regulators and a number of other "non-standard" devices. Th

PROTO PLUS will plug directly into the MOTHER PLUS making ior a handy package.

PUT IT ALL TOGETHER WITH MOTHER PLUSTM_

THER PLUS provides the simpli est way to control and package your expanded syst em. MOTHER PLUS does t hree

r things: 1- pr ovides a met hod of inter connecting the indivi dual boards (MEMORY PLl JS. VIDEO PLlJS. PROTO

S); 2 - provides buffering for the address, data and control signals; and, 3 - acts as a traffic cop for determining

h addresses are reserved for the processor and which for the expansion boards. It su p ports the standard klM-4

nsion Bus, so it is electrically compatible with a large number of expansion boards. It is structured so that the

essor board fits into the top slots with the expansion boards mounting below. This permits a system to be neatly

aged - it doesn't have its guts hanging out all over a table top. Provision is also made for application

ections through solder eyelet connectors. Specifically designed to work with AIM,SYMIkIM systems. Other

res are: a terminal for bringing power into your system; phono jacks for the Audio 1"'Audio Ouf phone jack s

connecting a TTY device; provision for a TTYIHEX. switch for the K!M; a 16 pin UO socket for accessing the host

A/Port B; plus two undedicated 16 pin sockets which may be used to add inverters, buffers, or whatever to your

ADD UP TO FIVE ADDI TIONAL BOARDS

AUDIO/TTY CONNECTIONS

POWER TERMINALS

APPLICATION CONNECTORS

AIM/SYM/KIM

FULLY BUFFERED

FULLY DECODED

KIM·4 Bus Structure

MOTHER PLUS: $8000 FULLY ASSEMBLED AND TESTED

Page 35: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 35/68

POWER SUPPL IES

The COMPUTERISToffers a variety of power supplies to meet the varied requirements of 6502basedsystems.

We offered the first power supply built specifically for the KIM-1 and since

have delivered over a thousand units. This unit - POWER PLUS- is a simple

does not even have an On/Off switch or Pilot Liaht. but does provide the p

KIM-1 or SYM-l with enough to spare for an additional MEMORY PLUSor VID

board. For the small home system, the electronics lab, the class room, etc.,

system isnot going to begreatly expanded, this isan ideal unit, and ispriced ve

For more advanced systemsor more demanding environments we offer three h

supplies. Eachof these comes in an all metal case; includes anOn/Off Switch

Light; may be run on 115V/60Hz or 230V/50Hz AC power; has a grounded

power cord; and hasa screw-type terminal strip for each connection.

ALL THE POWER A

KIM-1/SYM-1 NEEDS

Neill, Compact, Economical

' th ou sa nd s i n U se

INPUT: '1SVI60Hz

OUTPUTS; Regulated + SVat 1 .4A+ 12\1 a t ' .OA

Unregulated + 8 \1 up to 4 .]A+ 16\1 upto 1.0A

will Powe r a KIM- lI SYM -l a nd on e

Additional Uf'i lJd

S uc ha il iMEMuRYP lU 5 o r VIDEO

PLUSOWER PLUS: $4000

Aspecial supply isavailable for the basicAIM 65system This isa small, open-

which may be placed inside the standard AIM Enclosure. It provides enough

the AIM 65 including printer and one additional board.

ENCLOSUREWITH BUILT IN

POWER SUPPLY

SPECIFICATIONS:

INPUT: 1101220 VAC 5(J160Hz

OUTPUT: + SV @ SA

+24V@lA

ClROUNDEDTHREE·W1RE L INE CORD

ONIOFF SWITCH WITH PILOT LI GHT

Enclosure hal room for the AIM and one

additional board: MEMORY PLUS or VIDEO PLUS

AIM PLUS: $10000 AIM and AIM PLUS: $47500

~®W~;} [;)~~~ Om

~~;J~;) ~ ~~ r a ~All I nc lude the Fol lowing Fea tu re s:

All METAL HEAVY DUn CASE

ONIOFF SWITCH an d PI LOT L IGHT

115/GOHz Of230/50Hz INPUT

GROUNDED THREE-WIRE

POWER CORD

POWER PLUS 5: + SV at SA, ± 12V at IA 57500

POWER PLUS SUPER 5: + 5V at lOA, ± 12V at lA 59500

POWER PLUS 5124 : + SV a!SA, .._ 24 at 2.SA, ±12V at lA $9500

SPECIFICALLY DESIGNED FOR THE AIM 65

Small Enough 10F i tl nl ld e the AIM Enclo,ure

Enoush Power for the AIM 65 Full y L oa de d

Pl ul a n A ddi ti on al B oa rd

Wor it s on l1SV/60Hz o r 2 ]OVJ50Hz

Provides Resulal~ + SV a l SA and + 24\' at 1A

Grounded Thr ee -Wir e Power Cord

POWER A PLUS:ON IOFF Swi tc h a nd P il ot l ig ht

ENC LO SURES AND C ASSETTE REC ORDERS

The Ultimate Enclosure

for the KIM-1

P ro tect s You r K IM·1

Neat, Attractive. Profenional

Full Access to t he hpansi on a nd

Applicalion Connf 'ctors

ENCLOSURE PLUS

for KIM: $3000

Room for the KIM·1 and One

Ad di fi on al B oa rd s uc h a s

MEMORY PLUS o r VIDEO PLUS .

The SUPERSCOPE(R)C-190Cassette Tape Recorder by Marantz is a very high quality

audio tape recorder which has a number of features which make it particularly well

suited to usewith microcomputers.

Runs on 110V AC or 6V DC from a power pack or batteries. Has Tone Control and

separate Volume Controls for Recording andPlayback.

HasVU Meter for recording level, and hasthree recording modes: Automatic Record

Level, Limiter or Manual. HasTape SpeedControl- Adjusts ±20%. This isespecially

useful when using tapes recorded on other recorders.

TapeCounter - 000 to 999.

Electronics remain ONwhen recording isbeing held OFF in Route.

An excellent unit which has been recommended by several of the microcomputer

manufacturers.

SUPERSCOPEC-190

by Marantz

A Hi gh Q ua li ty C as te tt e R ec or de r

wi th a ll o f t he Fe at ur es R eq ui r~

for M ic ro computer Sys tems :

VU Me te r Di sp la ys R ec or di ng L eI /I 'I

11 0V AC or I i#VDC o r B at le ry Op er at io n

Tape Locat ion Counter

Thr ee RNord lng Methods

Vadabl.. 'peed Con,roh ±20% SUPERSCOPEC-19O: $

Remote Control Leaves E le ct ro ni cs ON

Page 36: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 36/68

SOFTWARE and Other Good Stuffmake any microcomputer system useful, you need software. The COM-

UTERIST has software packages available for three systems. Each of

esepackagescomewith full User/Operator Instructions, aCassetteTape,

d, with the exception of MICRO-ADE, a complete set of Source Listings

at you can more fully understand, utilize, and modify the software.

EASEtms a collection of gamesand demonstrations. It contains a dozen

ograms such as a 24 Hour' Clock, a High/Low number guessing game,

hooting Stars", a Drunk Test, an Adding Machine, and soforth. PLEASE

itten in a "high level language" which permits the userto make simple

difications and create hisown demonstrations. It will run on an unex-

anded KIM-1, or on a SYMor AIM with 2K RAM. $10,00

CROCHESSlmisthe original chessplayer for small systems.While it does

ave some limitations, it doesplaya reasonably good game of chess.It in-

udes a number of "canned" openings and makes a good tutor for a

ginner or a brush-up challenger for the more advanced player. Includes

ree levelsof difficulty. It will run on an unexpanded KIM-1, or on a SYM

AIMwith2K RAM. 515.00

ELPlmMailing List is a complete package for the maintenance and prin-

g of mail ing l ists. It includes an Editor for entering and updating the

iling lists; a List Printer which outputs a single tabular format line per

try for analysis and updating; and a Label Printer which outputs toiling labels. The List and Label functions include the capability of ab-

racting subsetsof the total mailing list and of adding an extra line of in-

rmation - such as"Subscription Expired" - to a subset of the mailing list.

requires program control of two cassettesand some form of printing ter-

inal. It will run on an unexpanded KIM-1, or on a SYM or AIM with 2K

AM. $10.00

Bits andBytes

le The COMPUTERIST does not, in general, sell Ie's and other small

ces of hardware, there are a few useful devices which we use in large

ntity in our own products and which we can offer at good prices to our

2 for $15.00(1Kbytes)4 LowPower Static RAM (1K by4 bits)

Usedto expand SYM,AIM, or VIDEO PLUS

02LowPower Static RAM (1K by1 bit)

ype usedin KIM-1 andMEMORY PLUS

2VIA Versatile Interface Adapter

sed in SYM,AIM, MEMORY PLUSandVIDEO PLUS

22/44 Pin Connectors- Solder Tailor Solder Eyelet

ree required for MEMORY PLUSor VIDEO PLUS

YM/KIM to MEMORY PLUS/VIDEOPLUSCABLE

P RelayPackage- everything required to control two audio

ette recorders(except the PCboard)

8 for $10.00(1Kbytes)

$7.50

$2.00each

$15.00

$10.00

HELpimInformation Retrieval isa package for creating and retrieving from

a cassette based data base. The Editor portion permits the user to create

files with up to six independent Data Fields plus a Flags Field which con-

tains abstract data about the file. T~e Retrieval portion permits entries to

beselected bythe contents of any combination of Data Fieldsand/or by up

to six independent tests on the FlagsField. The Flags Field tests include

three "equal" tests, one each"not equals", "greater than" and "less than"test. The program is a good demonstration of the power of a small system.

It will run on an unexpanded KIM-1, or on a SYM or AIM with 2K RAM. It

also requires program control of two cassettes and some form of ASC"

terminal. 510.00

MICRO-ADElm is a complete Assembler,Disassembler, andEditor package.

The Assember is a full scale version with six character labels, two-pass

capabilities, and makes good use of the cassettes for assembling large

programs.The Disassemblerconverts object code into user readable source

code. If a symbol table is available for the code being disasseml::r led

then a complete listing with labels may be obtained. The Editor can

be used separately or in conjunction with the Assembler. It features

Line Insert/Delete, can Move sections of lines, and usesthe Cassettes for

automatic control of large files. MICRO-ADE will run on a KIM, SYM or

AIM With at least 8K RAM starting at address2000. A version to run in 4K

ROM plus 4K or more of RAM is included on the cassette tape. While

MICRO-ADE can work entirely with RAM, it ismost powerful when used in

conjunction with two cassette recorders under computer control. Some

type of ASCII terminal is required. MICRO-ADE comes with complete

Operator Instructions and the Source Listingfor the 1/0 portion of the code

so that a usercan adapt it to hisown specific devices Complete Source

Listings may be purchased separately. $25.00each

Shipping andHandling

United States

Total

Order

Upto $15.00

Upto $50.00

Over $50.00

Regular

Items

$1.00

$2.00

HOO

Power Supply

or CassetteRecorder

$3.00

$5.00

Pleaseprovide StreetAddressfor UPS.

Prepaidor COD unlesscredit hasbeenestablished.

Mass. Residents add 5% sales tax or provide Tax Exempt Certificate.Foreign

Add 10% of total, minimum $3.00

Overpayment in excessof $5.00will be refunded.

All itemsAIR Parcel Postexcept PowerSupplies

which due to their weight must gosurface.

All paymentsmustbevia International Money Order.

,.0 ... :1 .... ew... ...".... 1118:1.· .17/:111.-:1... INC

TheAIM/SYM!KIM Leader

Page 37: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 37/68

The First Book of KIM - on a SYM

Programs presented in The First Book of KIM can bemodified to run on a SYM. What's more, the techniquespresented here will aid in the conversion of other KIMsoftware.

Anyone who purchased "The First Book

of KIM" with the expectation of easily

modifying the programs to run on their

SYM quickly found that the KIM and

SYM might be hardware compatable,

but the monitors are a lot different. The

SYM manual has a list of SYM counter-

parts to the KIM routines. It also makes

the disclaimer that "the routines do notperform identically." This is an over

simplification! Some of the SYM rou-

tines are really only distant cousins to

their KIM counterparts. The routines

listed in the SYM manual are not close

enough to the KIM routines to be easily

substituted for the KIM entry points

used in the book.

The first couple of programs I converted

the hard way, with lots of relocating and

some logic cnanqes. I finally got smart

and took the time to write these routines

using simple address substitutions.

These routines are obviously not identi-

cal to the KIM versions they replace, and

definitely do not take the same numberof execution cycles.

You may have to "tweek" some of the

delay loop counters in the programs.

Otherwise, replace the KIM addresses

with these, fix up the 1/ 0 addresses

(which Iwill also discuss later) and about

90% of your conversion is done, at least

for the games.

July 1979

Nicholas Vrtis

5863 Pinetree S.E_Kentwood, MI 49508

I have not bothered to try any of the

cassette programs yet. I have enough

problems with the SYM standard rou-

tines. There will be some places where

you may need to get a little fancy to do

the conversion without relocating

things. Just remember that if you can

perform an equivalent function in fewer

bytes you can use NOP's to avoid re-location.

Before I get down to discussing the rou-

tines and some notes about writing

directly to the displays, I would like to

mention that these routines require one

hardware modification to the SYM board

in order to work properly. The modifi-

cation is to remove the jumper that en-

ables system RAM write protect, jumper

MM-45, just to the left of the crystal.

This is the first modification I made to

my SYM, and I have not regretted it at

all. If you are leary about permanently

disabling something, as I was, you will

find that a four position DIP switch does

nicely. You will get the added advantage

of being able to write protect user RAM.

The alternative is to insert a JSR

ACCESS at the start of each routine.

The first routine is the one to light the

on-board displays, and actually has two

MICRO-The 6502 Journal

entry points. If you enter at SCAND,

byte indirectly pointed to by POINT

moved to INH, and then the prog

falls through to SCANDS. This rou

lights the display with the six hex va

corresponding to the three b

POINTH, POINTL, and INH, and

returns.

The SYM "equivalent" standard rout

OUTBYT and SCAND are not suitable

placements. OUTBYT takes the b

in the A register, converts them to

hex digits, and rolls them into the

play from the right. Repeated calls

OUTBYT cause the characters to m

from right to left across the display.

SCAND, on the other hand, lights

display with six hex digits as we w

but it assumes that the segment co

are already in the display buffer. Th

further complicated by the fact that

display buffer is at $A640, which is a

byte address instead of the single

used by the KIM.

What I did was to pick up the data

the KIM addresses, convert it into

ment codes by using each nibble a

index into the SYM segment code ta

and store all six bytes of segment c

in the display buffer before calling

SYM SCAND routine to l ight the displa

Fortunately, the KIM addresses do

1

Page 38: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 38/68

conflict with Important SYM addresses.

Specifically, $FA and $FB are used by

SYM as the pointer to RAM for the EXE·

CUTE command, and $F9 is used as a

work area for the terminal 11 0 routines.

The SYM subroutine GETKEY super-

ficially resembles the KIM routine of the

same name. The SYM does a lot more

for you, since it lights the display and

waits for the key to be pressed. It also

debounces the keyboard, and converts

the key code to ASCII. The KIM routine,on the other hand, reads the keyboard

and returns with a binary number cor-

responding to the key pressed. It does

not wait to debounce the keyboard, nor

does it light the display. This makes it

easier to program the keyboard indepen-

dently of the display. It is also more

work, by the way.

The SYMroutine LRNKEY is a closer

approximation to the routine we want.

It scans the keyboard once, converts

the key code to ASCII, and returns. Con-

veniently, the value in the X register is

the index that was used to get the ASCII

equivalent of the key pressed. This table

starts with the code for ZERO, so the

value in X is neatly set 0 through F for

those keys, and all we need to do is

transfer it to the A register.

The SYM has more keys than the KIM,

so these are set to the KIM value for

"no key" on the assumption that the KIM

routines wouldn't know what to do with

them anyway. For the remaining keys

we just use a translate table that is

somewhat arbitrary since the keys are

not labeled identical ly. See the program

listing for which keys are translated to

what, and note that the SYM shift key is

made equivalent to the KIM "no key"value.

The KIM routine KEYIN has a very close

equivalent in the SYM entry KEYQ. The

main difference between them is which

way the zero flag gets set if a key is

down. The KIM returns a zero condition

if a key is down, and the SYM returns as

not zero. All this routine does is load a

$FF or $00 into the X register to reverse

the SYM zero flag setting.

The reason the X register is loaded with

$FF for a "no key" is that LRNKEY in

the SYM monitor does an INX immedi-

ately before returning if entered with-

out a key down. With X set to $FF upon

entry, this will result in a zero condition

from the LRNKEY routine. Since none of

the ASCII codes are zero, we can set the

appropiate key value in the GETKEY

routine. This way a JSR KEYIN followed

by a JSR GETKEY will be consistant

with the KIM routines.

14:36

M ICR O- WAR E ASSEM BLER 65 1X- l. 0 PAG E 01

0010:0020:0030:0040:0050:0060:0070:0080 :0090:

0100:0110:0120:'

0130:0140:0150:0160:

0170:01 80: 01 7001 90: 01 7002 00: 01 7002 10: 01 7002 20: 017 002 30: 01 7002 40: 01 70

02 50: 017 002 60: 01 7002 70: 01 7002 80: 01 7002 90: 01 700300:03 10: 01 000320:

0330:0340:0350:0360:0370: 0100 AO 000380: 0102 Bl FA0390: 0104 85 F 90400:0410: 0106 AO 000420: 0108 A5 F B0430: 010A 20 l A 010440: 0100 A5 F A0450: 010F 20 l A 010460: 0112 A5 F 90470: 0114 20 l A 010480: 0117 4C 06 890490:0500: 011 A 480510: 011B 4A0520: 011C 4A0530: 0110 4A0540: 011E 4A0550: 011F AA0560: 0120 BD 29 8C

0570 0123 99 40 A60580 0126 C80590 0127 680600 0128 29 OF0610 012A AA0620 012B BD 29 8C0630 012E,99 40 A60640 0131 C80650 0132 60

SYM -l V ERSIONS O F V AR IOU S K IM RO UTINESBY: NICK V RTIS - LSI/CCSD 0 4/1 2/79

M OD IF IED BY M ICR O STAF F 06/06/79

THE PU RPOSE OF THESE ROU TINES IS TO PROV IDE A CERTAINAMO UNT OF SO FTWAR E COM PATIBILITY BETWEEN TH E SYM ANDK IM MONITORS. TH IS WILL HAK E IT EASIER TO CONVERTPROGRAMS WRITTEN F OR THE KIM TO RU N ON TH E SYM.

TIM E D EPEND ENT CO DE IS NO T SIM ULATED

NO ATTEMPT IS MAD E TO D UPLICATE TH E K IM MONITOR,ENTRY POINT FOR ENTRY POINT. RATHER, THESE ARETH E H AIN ROU TINES AS U SED IN ' TH E FIRST BOOK OF

KIM' .

TR ANSO • $0137 TR ANSLATE TABLE LESS O FF SET $ 11PZSCR • $ OOFC PAG E Z ER O SCR ATCH LO CATIO N

PO INTH • $ OOFB EXECU TE R AM PO INTER H IG H

PO INTL • $OOFA EXECU TE R AM PO INTER LO WIN H • $00F9 T ER M IN AL CH A RA CT ER I NP UT

SYMPAD • $11100 OU TPU T PORT A ON 6532

SYMPBD • $A402 OU TPU T PORT B ON 6532

SYMD IS • $1640 D ISPU Y BU FF ERSYM SCA • $8906 LED O UTPU T D ISPLAY BU FF ER

SYM KEY • $8923 CH ECK F OR ANY KEY D O W N

SYM LR N • $892C D ET ER M IN E K EY P RE SS ED

SYM SEG • $8C29 LED SEG MENT CO DES

ORG $0100 OU T OF TH E WAY ON STACK PAGE

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• SYM- l V ERSION OF KIM SCAND & SCAND S R O U TINES• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

SCAND LD YIM $ 0000 ENTER H ERE TO GET BYTELD AIY PO INTL AD DR ESSED BY PO INTLSTA INH AND MOV E IT TO INH AREA

SCAND S LD YIM $0000 ENTER HERE IF INH ALREAD Y STOREDLOA POINTH POINTH F IRST TO D ISPLAY BU F F ERJSR SPLITPLDA POINTL TH EN D O POINTLJSR SPLITPLDA INH LAST BU T NOT LEAST D O INHJSR SPLITPJH P SYH SCA SET SYM MONITOR LIGH T & RETURN

S PL ITP P HALSRALSRALSRALSRATA XLO U

SA V E ORIGINALON STACK F OR LATERSH IFT H I H ALF TO LO H ALF

WHICH IS 4 BITS DOWNPUT INTO X AS AN IND EX

SYM SEG G ET APPR OPR IATE SEG MENT CO DE

STAY SYMD IS AND PU T INTO D ISPLAY BU F FERIN! BUMP 'Y' FOR NEXT BYTEPLA NOW GET ORIGINAL V ALUE BACKAND IM $ OOOF K EEP ONLY LOW ORD ER 4 BITSTAX AND REPEAT SEGMENT PROCESSLD AX SYMSEGSTAY SYMDISINY INCLU D ING BU MP F OR NEXT BYTERTS AND RETURN

MICRO-The 6502 Journal July 1979

Page 39: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 39/68

riting to the displays is, again, a little

more difficult than changing a set of

addresses. It is also something that

gets spread through the program, so I

can't write a nice software solution as

I did for the other routines. Fortunately,

you can usually perform the same tunc-

tions on the SYM as on the KIM in either

the same or a smaller number of bytes.

Less is as good as the same, since one

can always add NOP's to pad it out.

The first problem is to set the data

direction registers on the 1/ 0 ports tooutput to the displays. The normal code

to look for in the KIM programs would be

the following:

LDAIM $7F

STA $1741

On the SYM we need to set the two

direction registers at $A401 and $A403.

In order to do this in the same number of

bytes we can make use of the SYM rnonl-

tor CON FIG routine as follows:

LDAIM $09

JSR $89A5

This routine sets both I/O ports to out-

put, and additionally stores zero in bothI/O registers.

Individual digit selection is also differ-

ent between the two systems, but both

use a multiplex concept. This means

that one I/O register determines which

segments get lighted, and one register

determines which digit is selected. The

KIM hardware selects the leftmost digit

with a 9 stored into location $1742. This

is incremented by two for each digit

to the right.

The SYM starts with a value of zero to

location $A402. This needs to be In-

creased by one for each digit to the right.

You may be in for a little extra for thoseroutines that increment and then check

to see if they are done. Storing a 6 to

location $A402 enables the on board

beeper, so if your routine suddenly

starts beeping at you, don't be sur-

prised. Tell everybody how great your

sound effects are.

The actual segment codes are written

to location $1740 on the KIM and $A400

on the SYM. These two addresses are

one-tor-one replacements. In order to

convert routines that use these ports,

change the address of the store lnstruc-

tions to the display, and find the place

where the digit selector is bumped

twice to get to the next digit, then simplyNOP the second bump.

One final note about the timers. The

KIM timer returns zero to a read before

the clock has timed out, whereas the

SYM returns the current clock count.

This means that, in addition to changing

the addresses, you will also have to

change the branch after the check for

clock expiration.

July 1979

0660:0670:0680:0690:0700:0710:0720:0730:0740:0750:0760:0770:0780:

0790:0800:0810:0820:0830:0840:0850:0860:0870:0880:

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• SYM -l V ER SIO N OF K IM G ETK EY SU BR OU TINE• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

0133 20 2C 89 GETKEY JSR SYMLRN GET SYM VERSION OF THE KEY

0136 DO 03013B A9 15013A 60013B BA013C C9 11013E 90 07

0140 C9 160142 BO F 40144 BD 37 010147 60

0148 120149 11014A 15014B 13014C 14

0890:0900:0910:0920:

0930:0940: 014D 20 23 890950: 0150 DO 030960: 0152 A2 F F0970: 0154 600980: 0155 A2 000990: 0157 601000:

1010:1020:1030:1040:1050: 0158 84 F C1060: 015 A A81070: 015B B9 29 8C

1080: 015E 8E 02 A41090: 0161 8D 00 A41100: 0164 AO 101110: 0166 881120: 0167 DO FD

BNE KEYDWN BRANCH IF ANY KEY IS D OWNGKNONE LDAIM $0015 ELSE SET TO K IM NO KEY D OWN

RTS AND R ETU RNKEYDWN TIA X H OLDS INDEX INTO ASCII TABL

CMPIM $0011 NEED TO FU D GE KEY VALUE?BCC GKRTS OO- OF IS OK 10=AD( K IM) =CR( SYM

CMPIM $0016 CHECK F OR OUT OF K IM RANGEBCS GKNONE AND TREAT AS A NO KEYLD AX TR ANSO ELSE TR ANSLATE TH RO UG H TABLE

GKRTS RTS AND R ETU RN

TRANST = $ 12 ' +' (K IM):' -I+' (SYH ): $ 11 'DA'(KIM):'>/(' (SYM): $ 15 SH IF T ( SYM )=NO K EY ( KIM ): $ 13 'G'(KIM)='GO/LP'(SYM): $ 14 'PC'(KIM)='REG/SP'(SYM)

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• SYM -l V ER SIO N O F K IM K EYIN SU BR OU TINE• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

K EYIN JSR SYH KEY GET KEYBOARD STATUSBNE KEYIN2 REVERSE ZERO F LAGLD XIH $ OOF F K IM NOT ZERO - NO KEY - F F F ORTS

KEYIN2 LDXIM $0000 AND IS ZERO IF KEY IS D OWNRTS

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• SYM- l V ERSION OF K IM CONV D ROU TINES $l F48 & $lF•• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

CONVD STY PZSCR SAVE Y IN SCRATCH AREATAY HOVE NIBBLE OF A TO INDEX REGLD AY SYMSEG GET H EX SEGMENT COD ES F ROM TA

D ISPCH STX SYMPBD SELECT TH E D IGITSTA SYMPAD OU TPU T TH E SEGMENT COD ESLDYIM $0010 KEEP IT LIT F OR A WH ILE

LIGH T DEYBNE LIGH T

1130: 0169 8C 00 A4 STY1140: 016C EB INX1150: 016D A4 F C LDY1160: 016F 60 RTS10=

- T

SYM PAD TU RN ALL SEG MENTS O FF F ORBU MP X TO NEXT DIGIT

PZ SCR R ESTO RE TH E Y R EGISTERA ND R ETU R N

NEX T

S YM BO L T ABLE 2 000 2 09 6CONV D 0158 DISPCH 015EGIRTS 01Q7 INH 00F 9[EYINR 0155 LIGHT 0166PZSCR OOFC SCAND 0100SYH D IS A640 SYH KEY B923SYHPBD A402 SYHSCA 8906T RA NS T 0 14 8

G ET KE Y 0 13 3K EY DW N 01 3BP OI NT S O OF BS CA ND S 0 106S YH L RN 8 92 CS YH S EG 8 C2 9

G K NO NE 0 13 8K EYIN 01110P OI NT L O OF AS PL IT P 0 11 AS YM PA D A 400TRAIISO0137

1MICRO- The 6502 Journal

Page 40: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 40/68

-~~

D .J IInc.

BOX 120

ALLAMUCHY, N.J. 07820

201-362-6574-H U D S O N D IG IT A L E L E C T R O N IC S IN C .

JUST THINK OF IT!

YOU R KI M-1 - No longer limited to those long cassette saves and loads.

YOU R KI M-1 - Backed up by 8K static ram so conservatively designed,

well manufactured and thoroughly tested, HOE includes a

no-nonsense, unconditional, 6 months parts and labor

warranty. (Excluding misuse).

YOU R KI M-1 - Transformed into one of the most powerful 6502 develop-

ment systems available today.

HOE, INC. supports the KIM-1with 8" and 5"single and dual drive disk systems, proto-

typing cards, card racks, desk top cabinets, motherboards, and the finest memory

board available, anywhere, at any price.

AND THIS IS JUST FOR STARTERS ...

Consider: A fast, 2 pass assembler; a complete line oriented editor; a comprehensive

text output processing system; an efficient dynamic debugging tool; and, a memory

diagnostic package so thorough it's the basis of our memory warranty.

Plus, after the sale support that you've known you deserve, but just couldn't seem to

get - until now.

And, HOE products are KIM-1, KIM-4 compatible. All boards include an oversized 5

volt regulator and address selection switches, in a state-of-the-art 4.5" X6.5" format,

designed, manufactured, and tested for commercial/industrial application.

HOE products - built to be used with confidence.

AVAILABLE FROM THESE FINE DEALERS:

LONG ISLAND

JOHNSON COMPUTER PLAINSMAN MICROSYSTEMS COMPUTER GENERAL STORE LONE STARELECTRONICSRESCO

P.O.Box43 103 Atlantic Avenue

Lynbrook, N.Y. 11563

516·887·1500

Manchaca, Texas 78652

512·282·3570

Box 523 Box488ox 1712

Medina, Ohio 44256

216·725·4560

Auburn, Ala. 36830

800·633·8724

Audubon.Pa.19407

215·631·9052

Page 41: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 41/68

AMPERSORT

A fast, machine language sort utility for the APPLE IIthat handles integer, floating point and character rec-ords. Because it is callable from BASIC, this sort routineis aworthwhile addition to any software library.

A sort utility is usually one of the first

programs needed for records manage-ment application programs. If the utilityis written in BASIC and runs under an

interpreter, one quickly discovers thatthe sort is painfully slow on amicro. The

sort program presented here, written inmachine language for the APPLE II with

AppleSoft ROM, will certainly remedythat problem. While no speed recordswill be set, it will run circles around

BASIC, sorting 900 integer, 700 floatingpoint, or 300 30-character records inabout 60seconds.

Speed is not the only beauty of AMPER-SORT. As its name implies, the BASIC-to-machine language interface utilizes

the powerful, but not-widely-known,feature of AppleSoft - the Ampersand.What is the Ampersand and why is it so

useful? Consider the following example

of how a BASIC program passes sortparameters to AMPER-SORT:

100 &SRT#(AB$,O,1O,7,10,A,1,5,D)

This statement, when embedded in a

BASIC program or entered as an imme-diate command, will command AMPER-

SORTto sort AB$(O)through AB$(10) inascending order based on the 7th to 10thcharacters and in descending order for

the 1st through 5th characters. Ofcourse, POKEs could be used to pass

parameters from other 6502 BASICs,but there's something more profes-sionally pleasing about the Ampersandinterface.

There is no user documentation fromAPPLEon the Ampersand feature. I firstread of the feature in the October 1978issue of CALL APPLE. When the Apple-Soft interpreter encounters an amper-sand (&) character at the beginning of a

BASIC statement, it does a JSR .$3F5.If

the user has placed a JMP instructionthere, a link is made to the user's ma-

chine language routine. APPLE hasthoughtfully provided some ampersand

handling routines described in theNovember and December issues ofCALL APPLE. The routines enable yourmachine language routine to examineand convert the characters or expres-

sions following the ampersand. Theroutines used in AMPER-SORTare:

July 1979

CHRGET(SOOB1)

This routine will return, in the accumula-

tor, the next character in the statement.

The first character is in the accumulatorwhen the JSR $3F5 occurs. The zeroflag is set if the character is an end-of-line token (00) or statement terminator($3A).The carry flag is set if the charac-

ter is non-numeric, and cleared if it isnumeric. The character pointer at $B8

and $B9 is advanced automatically sothat the next JSR$B1will return the next

character. A JSR $B7 will return a char-acter without advancing the pointer.

FRMNUM(S0067)

This routine evaluates an expression ofvariables and constants in the amper-

sand statement from the current pointer

to the next comma. The result is placedin the floating point accumulator.

GETADR(SE752)

This routine will convert the floatingpoint accumulator to a two-byte integer

and place it in $SOand $S1. FRMNUMandGETADRare used by AMPER-SORTto retrieve the sort parameters and con-

vert each to anunteger.

GETBYT(SE6F8)

This routine will retrieve the next expres-sion and return it as a one-byte interger

in the X-register.

It is the user's responsibility to leave the$B8 and $B9 pointer at the terminator.

Parametersare passed to AMPER-SORT

in the following form:

100 &SRT#(AB$,B,E.7,10,A,1,5,D)

where:

AB$ is the variable nameof the stringarray to be sorted. The general

form is XX$ for string arrays,

XX% for integer arrays, and XXfor floating point arrays.

B is a variable, constant or expres-sion containing the value of the

subscript element where the sort

is to begin, e.g. AB$(B).

E is a variable or constant or ex-pression containing the value ofthe subscript element where the

sort is to end, e.g. AB$(E).Band

MICRO- The 6S02Journal

Alan G.Hill12092OeerhornDrive

Cincinnati, OH45240

Eare useful when the AB$is partially filled or hasbeetioned into logically se

blocks that need to be sindependently.

7 is a variable, constant or esion specifying the begiposition of the major sort fi

10 is a variable, constant or esion specifying the ending

tion of the major sort field.

A is a character specifying thmajor sort field is to be sinascending order.

is a variable, constant or esion specifying the begiposltion of the first minofield.

5 is a variable, constant or ex

sion specifying the endingtion of the first minor sort fi

D is acharacter specifying thfirst minor sort field is

sorted in descending order.

The &SRT command will sort chter, integer or floating point arrays

can be used in either the immediadeferred execution mode similar to

AppleSoft BASICcommands. Of cothe named array must have beenviously dimensioned and initializeeither case.

A. CharacterArrays

1. Equal or unequal elemelengths

2. Someorall elements

3. Ascending or descendinorder

4. A major sort field and up tominor sort fields

Examples:

10 DIMNA$(SOO)

100 &SRTI#(NA$,O,SOO,1,S,A)

200 &SRT#(NAS,O,SOO,1,5,A,6D,11,11,A)

299 F%=0:L=10300 &SRT=(NAS,F%,L,10,1S,D)

Line 100 sorts on positions 1 throuin ascending order for all 501 elem

of NA$(SOO).

1

Page 42: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 42/68

Line 200 is the same as Line 100exceptthat minor sort fields are specified. The

sort sequence on positions 1-5 is inascending order, positions 6-10 are indescending order, and position 11 is

ascending order.

Line 299 and 300 sort on positions 10-15

in descending order for NA$(O)through

NA$(lO)_

B. Integer and Floating Point Arrays

1. Some orall elements

2. Ascending order only. (Step

through the array backwards ifneeded in descending order.)

Examples:

10 DIMAB%(1oo),FP(1oo)

100 &SRT#(AB%,0,1oo)

299 S=50:E= 100300 &SRT#(AB%,S,E)

399 X=49400 &SRT#(FP,O,X)

Line 100 sorts all 101 elements ofAB%(100) in ascending order. Lines 299and 300 sort from AB%(50) through

AB%(100), while lines 399 and 400 sort

from FP(O)hrough FP(49).

Limited editing has been included in the

parameter processing code. Therefore,one must be careful to observe such

rules as:

1. O..;;B<E..;;maximum number of AB$elements.

2. AB$ must be a scalar array. e.g.

AB$(10),not AB$(20,40).

3. The sort array name must be lessthan 16 characters only the first

two count, and they must be

unique.

4. The maximum number of sort fields

isS.

5. The beginning sort field position

must not be greater than the ending

sort field position.

Options:

1. Constants, variables, or ex-pressions may be used for sub-script bounds and sort positions.

2. The &SRT command may be usedin immediate or deferred execution

mode.

Some editing checks are made.You willnotice this when you get a "?SYNTAXERROR IN LINE XXX" error mes-

sage. You will also get a "VARIABLEXXX NOT FOUND" message if theroutine cannot find the AB$ variable

name in variable space.

The AMPER-SORT program is listed inits entirety. A BASIC demo program is

also shown. Anyone desiring a cassettetape containing the latest version of the

object code assembled at $5200,a copyassembled at $9200,and the source pro-

gram text in the Microproducts APPLEIIAssembler format may receive these bysending the author $5.00 at the aboveaddress.

14:40

10001050106010701080109011001110112011301140115011601170118011901200121012201230124012501260127012802000201020202030204020502060207020802090210021102120

21302140215030003010302030303040305030603070308030903100311031203130

31403150

AM PER -SO R~ D em o

G O TO 10000REH CH AR ACTER SO R T

CH $ = "A&CDWXYZ":L = LEN ( CH $ ) - 1NI = 8D IH ABS( Ni .)F O R I = 0 TO Ni .

C$ = H I~S ( CH S, INT R ND ( 1) * L) + 1,1)SS = H ID S ( CH S, INT K ND ( 1) * L) + 1,1)F O R J = 1 TO 3

CS = CS + CS:8$ = SS + S$NEXT J

ABf( I) = B$ + C$NEXT IG aSU S 1240REH SO R T H ALF ASCEND INGR EH SO R T H ALF D ESCEND ING& SRTt<ABS ,0,N i . ,1 ,8,A , 9 ,16, D )G a SU S 1260G OTO 11000R EM PR INT R O U TINEPR INT· BEF O R EDG O TO 1270PR INT" AF TER " : PR INT " ASCEND D ESCEND uF O R I = 0 TO N7.PR INT ABS( I) : NEXT I: R ETU R NR EM INTEG ER SO R T

NI = 8D IM IN~( N%)F O R I = 0 TO N7.

IN7.(I) = 7500 - INT ( R ND ( 1) * 15000)NEXT IG OSU B 2120REM SO R T& SRTt(IN%, O,N7 . )G OSU B 2130G OTO 11000R EM PR INT R O U TINEH TAB 10: PR INT " BEF O R E" : G O TO 2140H TAB 10: PR INT uAF TER u

F O R I = 0 TO N i .

PR INT IN7. 0I) : NEXT I: R ETU R NR EM F LO ATING PO INT

1% = 8

D IM F P( T7.)F O R I = 0 TO 8

F P (I ) = 1000 * R ND ( 1) * SIN ( I * 7.16)NEXT ICO SU B 3120R EM SO R Ts SRTt( FP , O,T%)G OSU B 3130G OTO 11000REM PR INT R O U TINEH TAB 10: PR INT " BEF O R E" : G O TO 3140H TAB 10: PR INT " AF TER -

F O R I=

0 TOTi.

PR INT F P( I) : NEXT I: RETU R N

MICRO- The 6502 Journal July 1979

Page 43: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 43/68

0010 * * * * * * * * * * * * * * * * * * * * * * *0020 *

AMF 'E R-S ORT *0030 * BY *0040 * ALAN G . HILL *0050 *

APRIL, 1979 *0060 · *

CO MM ER CIAL R IG HTS *·070 *RESERVED *

0080 * * * * * * * * * * * * * * * * * * * * * * *0090 NAPT . D L O O D O0100 NMS1 . !:'L00D4

0110 ASII . D L 00D6

0120 CSII . D L 00D8

0130 ASI2 .[IL G O D A0140 CSI2 . D L G O D C0150 IIII . D L O O D E0160 NNNN . D L O OEO0170 F STR . £l L OOE20180 FLEN . t l L GOE70190 DISp . D L OOEC0200 JJ .1 .1. D L OOE D

0210 LEi ' l l . D L OOE F0220 LENJ . D L O O F O0230 TYPE . D L O O F 10240 Z Z 50 . D L 00500250 Z Z6S . D L 006S0260 CH RG . D L O O U0270 GETB . D L E6FS0280 SNER . D L D EC90290 F RN M • tiL D D67

0300 G ET A . D L E7520310 M PLY . D L FB630320 COUT . D L F DE rl0330 . O R 520003400350 · PROCESS '0.'·200- 48 0360 SO R T PH A ENTER WITH FIRST CHAR

5201- 20 D E 54 0370 JSR SV IP SAVE A WORK AREA IN ZERO PAGE

5204- 68 0380 PLA

5205- A2 00 0390 LD X 00

5207- D D 24 55 0400 SR O l CM P SRTS,X EDIT FOR 'SRT# ( •520A- D O 46 0410 BN E ER R X SIGNAL 'SYNT IJ. ER..~OR'

520C- 20 El l 00 0420 JSR C H RG G ET NEXT CH AR ACTER

520F- E8 0430 INX

5210- EO O S 0440 CPX 05

5212- D O F 3 0450 SNE SROl

5214- A2 00 0460 LD X 00 OK SO FAR5216- F O 03 0470 BEQ V NAM5218- 20 Bl 00 0480 SR04 ·1SR C H RG G ET A NO TH ER CH AR ACT ER521B- C9 2C 0490 V NAM CM P r , LOOP TO GET ARRAY N~~

521 D - F O O A 0500 BEG SR05

521 F - 9D 6A 5~ 0510 STA NAME,X SAV E H AK E5222- E8 0520 INX5223- EO 10 0530 CPX 10 16 CH AR ACTER S IS LO NG5225- D O Fl 0540 SNE SR04 ENOUGH F OR A NAME5227- F O 29 0550 BEQ ER R X S IG NAL ER R OR5229- CA 0560 SR05 D EX522A- BD 6A 55 0570 LD A NAME,X W HAT TYPE522 D - C9 24 0580 CMP 'i

522 F - F O 24 0590 BEQ CH AR CHARACTER5231- C9 25 0600 Ct:lP, i.

5233- D O 15 0610 BN E F F ' O ( l F LO AT ING P OINT06200630 INTEG ER SO RT

5235- A2 01 0640 INTE LD X 01 IBTEGER5237- A9 80 0650 INTl LIl A 80

5239- ID 6A 55 0660 O RA NAM E, X BEG. ASCII523C- 9D 6A ~5 0670 STA NAM E, X

523F - CA 0680 D EX5240- 10 F 5 0690 BP L INTl

5242- A9 02 0700 'LOA ( ) 2 IBI~IALIZE DISPLACEMENT5244- 85 EC 0710 STA *D ISP

5246- A9 01 0720 LI.:A 01) 248- D O 19 0730 BH E SR06

0740

July 1979 MICRO- T he 6 50 2 Journal14

Page 44: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 44/68

52"A-5 2 " C -52.o1-E-

5250-

5252-

5255-5257-525A-525D-

525F-5261-

5263-5265-5268-52611-526E-5270-

5272-

527<4-5276-5279-527C-5 2 7 F -5281-

5283-5284-

5286-

5288-528A-

528C-528E-5290-5292-_ 5294-

'5296-

5298-529B-5 2 9 D -

52AO-

52Al-52A3-52A5-52A8-

52AB-5 2 A O -52BO-52B3-52B6-52B7-52BA-52BC-52BF-52C2-52C5-

52C7-52CA-52CC-52GE-5 2 D O -5202-

52D4-5206-5209-

14:42

0750

0760

0770

0780

0790

0800

52 0810

09200830

A9 80 OB~O

OD 6B 55 085080 68 55 0860

A9 03 OB70

85 EC 08BOA9 00 0890

09000910

A9 05B5 ECA9 02

D O 11

~C A5

85 F l 0920

20 81 00 093020 67 D O 0940

20 52 E7 0950AS 50 096085 DE 0970A5 51 098()'

85 D F 099020 Bl 00 1000

20 67 D O 101020 52 E7 1020AS 50 1030

85 04 1040

18 105069 01 1060

85 EO 1070

A5 51 108085 !l5 109069 00 1100

85 El 1110A5 F l 1120D O 59 1130F O 15 1140

1150

1160

A2 00 1170

SO 29 55 118009 80 119020 ED F D 1200

EB 1210

EO 17 1220D O F3 1230

20 01 55 12404C C9 DE 1250

1260

AO 00Be 81 5520 Ell 0020 F a E6GAAC 81 5596 E220 B1 00

20 F a E6AC 81 5596 E7

20 Bl 0090 09C9 .01-4·F O 0.01-A9 F F30 02

A9 0099 7A 5 5C8

12701280

12901300·

1310

132013301340135013601370

1380

13901~0014101420143014. .014501460

1470

: F .P. SOR TFPOO LIlA 05

STA :a :D ISPLOA 02

SHE SR06

ER RX JMP ERR O

: CHAR ACTER SO RTCHAR LOA 80

O RA NAM Et OlSTA NAM Et OlLD A 03

STA *O ISF 'LD A 00

* * SE T UP SORTSR06 STA HYPE

JSR CH RGJSR F R NMJSR GET A

LDA *Z Z 50STA *III!LO A *Z150 to 1STA U IIIt OIJSR CH RGJSR F R NMJSR GETALD A *Z Z 50STA *NMSI

CL CADC 01STA *NNNNL D A : t: Z Z5 0t O1STA *NM Sl tO IAD C 00STA *NNNNt OlLDA HYPESHE TERMSEQ SR16

* * * ERR OR U*ER R3 LOX 00SR 11 LDA M SG1,X

ORA 80JSR COUT

INX

CPX 17BN E SRll

ER RO JSR RS1PJM P SNER

: * * GET SO RT F IELDSSR16 LD Y 00

STY SAVYSR17 JSR CH RG

JSR GETBDEXLD Y SAVY·

STX_ *F STR , YJSR CH RGJSR GET! !LD Y SAVYSTX *F LEN, y.

JSR CH RGBCC ERROCMP ' DBEQ SR07LDA OF FBM ! SR09

SR07 LD A 00SR09 STA U P[IN, Y

INY-

NEG . ASCII

LIMITS UO=CH 1=INT 2=FPNOW GET SUBSCRIPTSAND PUT IN F.P. ACC.CONVERT TO INTEGER

F IR ST SU BSCR IPT

LAST SUBSCRIPT INTO N-1

BRANCH NOT CHARACTER SORT

ARRAY V AR IABLE NA. .. '< IENOT FOUNDNOTIFY USER

RESTORE ZERO PAGE ANDSIGNAL SYNTAX ERROR

* *

GET NEXT CHARACTER

STAR T CO LU MN -1

END COLUMN

SHOULD BE 'A' OR ' D '

DE SCElIDINGASCENDING

S AV E S EQU ENCE

MICRO~ The 6502 Journal July 19.79

Page 45: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 45/68

52DA- 8C 81 55 1480 STY SAV Y52 D D - 20 E l l 00 1490 JSR CHRG52EO- C9 29 1500 CM P ,

52E2- F O 06 1510 BEll LAST52E4- C9 2C 1520 CM P ,,52E6- F O C8 1530 BEG SR17 LOOP FOR NEXT SORT FIELD PAR52EB- D O BB 1540 BNE ERRO52EA- 9C 80 55 1550 LAST STY F ' RSN NO . OF SORT FIELDS52ED- 20 Bl 00 1560 TER M JSR C H RG M UST BE TER MINATO R52 F O- D O B3 1570 BNE E R R O IT W ASN' T

15801590 : SEARCH SOR T AR R AY NAME

52F2- AO 00 1600 I' IC20LO Y 0052F4- El l 6B 1610 LO A (ZZ6E1),Y52F6- CO 6A 55 1620 CI' IPNAME52F9- [10 08 1630 BH E MCn52FB- C9 1640 INY F OU ND F IR ST CH AR ACTER52F C- 81 6I1 1650 LI lA ( Z Z6E1) ,Y52FE- CD 6B 55 1660 CMP NAMEtO l5301- F O 2B 1670 BEl l SETN F OU ND BOTH5303- 18 1680 MC22 CL C K EEP LO OK ING5304- AO 02 1690 LDY 025306- 81 6E 1 1700 LD A ( Z Z6E1 ) , ) ,5308- 65 6B 1710 ADC *lZ6E1530A- 48 1720 PH A530B- C8 1730 IN)'530C- Bl 6S 1740 LO A ( Z Z6E1 ) , ) '530E- 65 6C 1750 ADC *Z Z 6B+015310- 85 6C 1760 STA *ZZ6B+015312- 68 1770 PLA5313- 85 6E 1780 STA *ZZ6S5315- C5 60 1790 CMP $ 6D5317- AS 6C 1800 LD A H Z6B+Ol5319- E5 6E 1810 SBC H E5318- BO 03 1820 BC S SR27 liOLUCK. OUT OF BOUNDS531D- 4C F 2 52 1830 JM P MC20

18401850 * * NAME NO T F OU ND **

5320- A2 02 1860 SR 27 LD X 025322- BD 6A 55 1870 SR 28 LD A NAME,X5325- 9I1 33 55 1880 STA VA RI ,X PUT NAME IN BU FF ER5328- CA 1890 D EX5329- 10 F 7 1900 BP L SR28532B- 4C 96 52 1910 JM P ERR3 SEND A M ESSAG E

19201930 * INITIALIZ E AR RAY PO INTER *

532E- 18 1940 SETH CLC F O U ND V A R .1 :A BL ENA ME O F532F - AS 6E 1 1950 LOA *ZZ6B ARRAY TO BE SORTED.5331- 69 07 1960 AOC 07 CO MPU TE AD DR ESS OF5333- 85 S2 1970 STA $ 52 STR ING LENG TH BYTE.5335- A5 6C 1980 LD A *Z Z 6B+015337- 69 00 1990 AD C 005339- 85 53 2000 STA $ 53533B- AS D E 2010 LD A U III (6B.6C)+7+DISP*IIII533D- 85 50 2020 STA *Z Z 50533F - AS D F 2030 LD A *IIlIt015341- 85 51 2040 STA *ZZ50+0153~3- AS EC 2050 LD A *DISP53~5- 95 54 2060 STA t545347- A9 00 2070 LD A 0053H- 85 55 2080 STA ' $ 55534B- 20 63 F B 2090 JSR I'IPLY R OM M ULTIPLY R OU TINE53~E- A5 50 2100 LD A *Z Z 50535()- 95 D 6 2110 STA *ASII SAVE ADDRESS FOR MUCH USE5352- AS 51 2120 LO A *Z Z5 0+ 015354- 85 D7 2130 STA * ASl It O 15356- 4C 66 53 2140 JM P SR22

July 1979 M ICR O- Th e 6502 Journal 14

Page 46: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 46/68

535y-535A-535C-535E-5360-536.2-5364-5366-

5368-

536A-536C-536D-536F-

5371-5372-5374-

5376-5378-537A-537C-537E-537F-

5381-5383-5385-5387-

5389-538:8-

538E-538F-

5391-5393-5395-5397-

5399-5398-539D-

539F-53A1-53A2-53A4-

53A6-53A8-53AA-

53AD-53AF-53B1-53B3-

53B5-53B7-53B9-53BB-53BD-

53BF-53C2-53C4--

53C6-53C8-53CA-53CD-

53 D O-53D2-53 D4 - -53D6-53DS-53DB-

14:44

18A5 D 665 EC85 D 6A5 [17

69 0085 [17

R O 01B1 [16

85 [18C8B1 - D 685 (19

18A5 D 665 EC85 IiAAS D7

69 00

85 [IB

18A5 D E

69 0185 EDAS D F69 00

85 EE4- C 9B 53

18AS D A65 EC85 Ir AAS [II!69 0085 DBAO 0181 [IA

85 D CCBB1 D A85 [ID

A5 F lF O 034C 2F 54

AO 00B1 06F O 5265 EFIII D AF O 4- C85 FOA2 0084 E2BD 7A 5530 OC81 D 8

D 1 D CBO 14 -

20 89 54-4- C 05 54B1 D 8D 1 D C90 2FF O 1920 89 544 - C 0 5 54

215021602170218021902200221022202230224 -02250

22602270

228022902300231023202330234023502360237023802390240024-1024 -2024-302440

24 -5024-60247024-8024 -902500251025202530254 -02550256025702580259026002610

26202630

2640

26502660

26702680

2690270027102720273027402750276027702780

27902800281028202830284-02850286028702880

** F O R 1=11 TO N- l LO OP **CONI CL C

LDAAD CSTALD AAD CSTA

SR22 LD YLD A

STAINYLDA (AS I I ), Y

STA *CSl It01CL CLDA *ASIIADC *D ISPSTALD AAD CSTACL CLD AAD CSTALIlA

AD C

STAJMP

**** 8EGIN SORT ****

*ASII*DISP*ASII*ASIIt0100*ASIItOl01( ASII l oY

*CSII

*ASI2*ASI It O 100*ASI2tOl

*II I I

01*J.].]J*IIlItO 100

*J.].].JtOSR24

NEXT I AD D RESS

GET AD D RESS OF THE

CH AR ACTER STR ING

ALSO NEED ADD RESS OFADJACENT ELEMENT FORBU BBLE SO RT Cm .r PAR ISO N

J=I+1

** F O R J=1t1 TO N LOOP **C ON . ] C LC

LD A *ASI2AD C *D ISF ' INCREM ENT AB$ (J) AD DR ESSS l" A *A SI 2LD A *ASI2t 01AD C 00ST A *A SI 2t 01

SR24 LD Y 01LDA ( ASI2) ' YSTA *CSI2 GET NEW STRING AD D RESSIN YLD A ( ASI2 > rYS TA *CS 12 t01

LD A *TYPEB EC ! C HS T CH AR ACTER SOR TJMP NCH H

** CH ARACTER SO RT **CH ST LDY 00

LD A ( AS II ) ,YB EC ! M C 40STA *LENILDA ( ASI2) ' YB EC ! I ' IC 40STA *LENJLD X 00

SR29 LD Y *F STR , XI ' IC 33L D A U P DN ,X

'ElMIASNDLD A ( CSII) ' Y

CM P ( CSI2) 'YBG E MC26JSR SWAPJ t tP M C40

ASND LD A ( CSII) , YCM P (CS12)' YBLT MC40BEC! I1C27

I'IC25.] SR SW APJMP I'IC40

STR ING LENG THNULL STRING: SKUS AV E L EN( AB$ ( I»

S AV E L EN( AB$ ( J»

STARTING SORT COLUMNSEQUENCEBR ANCH A SCEND INGCH AR ACTEa BY CH AR ACTER

CO MPAR ISO N F OR D ESCEND INGPOSSIBLE SWAPD EF INITE S~' l. AE

NEXT RECORDASCENDING

NO SWAP: NEXT RECOIl DPO SSIBLE SWAPSWAPNEXT R ECO RD

MICRO- The 6502 Journal July 1979

Page 47: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 47/68

53DE- D O 25 2890 I1C26 BN E MC40 NO Si1AP

53EO- C8 2900 INY LO OK AT REM AINING CHARACTERS

53E1- C4 EF 2910 CP Y *LENI53E3- F O 06 2920 SEQ I1C39 t J 1 > TO THE LLUTS O R U NTIL

53E5- C4 F O 2930 Cr y *LENJ53E7- F O 16 2940 SEQ MC29 WE FIND A REASON TO SWAP

53E9- 90 O F 2950 BLT I1C28

53EB- C4 F O 2960 I'IC39CP Y *LEN·153EII- 90 E9 2970 SL T MC25 SWAP

53EF- F O OE 2980 BED I' IC29 NO SWAP

53F 1- C8 2990 I1C27 INYS3F2- C4 EF 3000 CPY *LENI

53F4- F O 09 3010 BE Q I'IC2953F6- C4 F O 3020 CP Y *LENJ

53F8- F O D E 3030 SEQ I' IC2 5

S3FA- 98 3040 I1C28 TYA

53FB- 05 E7 3050 CM P *FLEN,X END OF SORT F IELD ?

53F D - D O CO 3060 BN E I'IC33 BRANCH NO

53FF- EB 3070 I'IC29INX

5400- EC 80 S5 3080 CP X PRSN YES. ANY M ORE FIELDS?

5403- D O BB 3090 BN E SR2931003110

* * NEXT J * *5405- E6 ED 3120 I'IC40INC *. 1· 1JJ5407- D O 02 3130 BNE I' IC385409- E6 EE 3140 I NC *J .j · j· 1+ 0 J=J+1540B- AS ED 3150 I1C38 LD A *JJ. ], ]540D - CS EO 3160 CI1P *NNNN J=N?540F- AS EE 3170 LD A *JJ. j. Jt Ol

5411- ES E1 3180 SBC *f Il NNNt O5413- 90 14 3190 SCC JHPJ BRANCH NO

32003210

* * NEXT I * *5415- E6 D E 3220 INC UIII

5417- D O 02 3230 BNE MC41

5419- E6 D F 3240 INC U Il It Ol 1=1+1

541B- AS D E 3250 I1C41 LDA tIl II

5410- CS 04 3260 CI1P *NI1S1 I=N-1?541F- AS D F 3270 LD A xr r r r-c 1

5421- ES D S 3280 SSC *NM Sl tO l

5423- 90 07 3290 BCC JM PI BRANCH BO33003310 u** SOR T D ONE

* * * *425- 20 01 55 3320 SD ON . JS R R S ZP RESTORE ZER O PAGE

5428- 60 3330 RTS5429- 4C 8E 53 3340 JH PJ JI1P CON,]

542C- 4C 59 53 3350 JI'IPIJ I1 P C ONI542F - 18 3360 NCH H CLC NOT A CHARACTER SORT SO

5430- 6A 3370 R OR IT MUST BE INTEGER O R F .P.

5431- BO 03 3380 BC S nnc IT' S INTEG ER5433- 4C 6D 54 3390 JI1F'FPCC IT'S FLOATING POINT

34003410 * * INTEG ER SO RT

* *436- AO 01 3420 INTC LDY ( ~1

5438- B1 D6 3430 LDA ( ASII) , Y ASCENDING O RDER OBLY

543A- D l D A 3440 CM F' ( AS I 2 ),Y

543C- e8 3450 D EY CO MPAR E IN%( I) WITH IN%( J)

543D- Bl D6 3460 LDA (ASI l ) , i '

543F- F l D A 3470 SSC (ASI2loY

5441- 90 22 3480 £ICC NOSP PO SSIBLE SWAP

5443- Bl rl 6 3490 LDA (ASII),Y

5445- 51 D A 3500 EO R (ASI2),Y

5447- 30 BC 3510 SI'III1C40

35203530 * * SWAP I WITH J * *5449- C8 3540 SWIN INY544A- £11 D A 3550 LDA (ASI2),i'544C- 48 3560 PH A544D- 88 3570 D EY544E- £11 D A 3580 LDA (ASI2 l rY SWAP IN%(I) WITH IN%( J)5450- 48 3590 F :H A5451- B1 ns 3600 LDA (ASII),i'

July 1979 MICRO- The 6502 Journal 1

Page 48: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 48/68

5453- 91 D A 3610 STA (ASI2),Y

5455- CB 3620 INY

5456- Bl D 6 3630 LD A ( AS II h Y

5458- 9 1 D A 3640 STA ( ASI2 h Y

545A- 88 3650 D EY

5 45B- 68 3660 PLA

545C- 9 1 D 6 3670 STA ( ASII h Y

545E- c a 3680 INY

545F- 68 3690 PLA

5460- 91 D 6 3700 STA ( A S I I ) ,Y

5462- 4C 05 5 4 3710 JM P MC40 NEXT R ECO R D

5465- Bl D 6 3720 NOSP LD A ( A SI I ) ,Y

5467- 51 ItA3730 EO R ( A S I 2 ) , Y

5469- 30 l i E 3740 Bt H SWIN SWAP

546B- 10 98 3750 BPL M C4037603770 * * FLOATING POINT S O R T * *

546D- AO 00 3780 F PCC. LD Y 00

546F- 38 3790 F PO l SEC

5470- B1 D 6 3800 LD A (ASII),Y

5472- F 1 D A 3810 SBC (ASI2hY

5474- F O 04 3820 BEll FP025476- 10 IF 3830 ! l P L FPSP547B- 30 07 3840 ! l M I M B SP THIS BU O F CO NV O LU TED547A- CS 3850 FP02 INY LOGIC TELLS ME IF547B- CO 05 3860 CPY 05 F 1' ( I) IS GREATER TH AN,547D- D O F O 3870 BNE F P O l EQU AL TO , OR LESS THAN547F- F O 3E 3880 BEQ JM 40 n(J).

5481- AO 01 3890 H BSP LD Y 01

5483- B1 D 63900 LD A (ASII),Y A TRUTH TABLE BEYS

54B5- 31 D A 3910 AND ( AS I2 )' Y

5487- 11 D A 3920 O R A ( A S I 2 ) ' Y

5489- 30 20 3930 ! l M I F P 03548B- 88 3940 D EY548C- Bl D A 3941 LD A ( ASI2 ) , Y

548E- D O 2F 3942 BNE JM40

5490- CB 3943 INY5491- Bl D 6 3944 L Il A ( AS II h Y5493- 10 16 3945 B F ' L FP03

5495- 30 28 3946 BM I JH405497- A O 01 3950 FPSP LD Y 015499- Bl D 6 3960 LD A ( A SI I ) ,Y

54911- 31 D A 3970 AND (ASI2hY

549D - 11 D 6 3980 O R A ( AS II h Y

5 H F - 30 l E 3990 BM I JM4054Al- B8 4000 D EY

54A2- 111 D 64010 LD A (ASIIhY

54A4- D O 05 4020 BNE FP03

54A6- C8 4030 INY5' i- A7- 111 D A 4040 LD A ( A S I 2 ) ' Y

5 4A9- 10 14 4050 BPL JH40

54AB- A O 04 4060 F P03 LD Y 0454AD- B1 Db 4070 F P04 LD A (ASIIlrY SAV E F~(I) IN STACK54AF - 48 4080 PH A

500- 88 4090 D EY54111- 10 F A 4100 B F ' L FP0454B3- C8 4110 F P08 IH Y54B4- 81 D A 4120 LD A ( ASI2 h Y5486- 91 D 6 4130 STA (ASII),Y SWAP

.5488- 6B 4140 PLA5489- 91 D A 4150 STA ( A S I 2 ) ' Y54BB- CO 04 4160 CPY 0454! 1D - D O F 4 4170 ! l NE F P08

54 ! IF - 4C 05 54 H 80 . 1 M 40 . 1 M P MC40 NE.ITRECORD54C2- AO 00 4190 SWAP LD Y 00

54C4- Bl D 6 4200 LD A ( AS II h Y54C6- 48 4210 PH A R OU TINE TO SW U nm54C7- C8 4220 INY54C8- A5 ! l 8 4230 LD A *CSII CH AR ACTER ~ OINTER S F O R54CA- 91 D A 4240 STA ( ASI2 >r Y54CC- C8 42 50 INY CH AR ACTER SO RT .54CD- AS D 9 42t-0 LD A * CS II t O 14CF- 91 D A 4270 STA (ASI2),Y

14:46 MICRO- T h e 6 50 2Journal July 1979

Page 49: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 49/68

POWEH§OFT~INC.P. O. BOX 157PITMAN, NEW JERSEY 08071(609) 589-5500

products for the

APPLE uADDRESS FILE GENERATOR $19.95

A professional piece of software which allows the user to create four different types of address files: a) Holiday Fi le, b) Birthday Fi le,

c) Home Address File, and d) Commercial Address F<le. The program contains a menu of seven major commands: 1) Create a File, 2) Add to Fi le,

3) Edit Fi le, 4) Display Fi le, 5) Search Fi le, 6) Sort Fi le, and 7) Reorganize Fi le. Most of the major commands have subordinate commands which

adds to the flexability of this powerful software system. We doubt you could buy a better program for maintaining and printing address files.

REQUIREMENTS: Disk II, Apple Printer Card, 32K of memory with Appleso.ft Rom Card or 48K of memory without Applesoft Rom Card

SUPER CHECKBOOK $19.95

A totally new checkbook program with a unique option ... Bar Graphs. These bar graphs, outputed to a pr inter or video screen, provide

trend analysis data on code expense, income, expenses, or gain/loss on a month by month basis. The program contains a total of fourteen options:

1) Check/Deposit Entry & Modification, 2) Reconciliation of Checks or Deposits, 3) Sort by Check Number, 4) Sort by Code for Year , 5) Sort by

Code for Month, 6) Output Year to Date, 7) Output Month Activity, 8·11) Printer/Video Plot Trend Analvsis-Bar Graphs, 12) Account Status,

13) Reconciled Check Status, and 14) Quit. An excellent program for maintaining your checkbook, or that of a small business. REQUIREMENTS:

Disk II, 32K of memory with Applesoft Rom Card or 48K of memory without Applesoft Rom Card.

$14.95UNCTION GRAPHS AND TRANSFORMATIONSThis program uses the Apple II high resolution graphics capabilities to draw detailed graphs

of mathematical functions which the user defines in Basic syntax. The graphs appear in a largerectangle whose edges are X and Yscaies (with values labeled by up to 6 digits). Graphs can be

superimposed, erased, drawn as dashed (rather than solid) curves, and transformed. The trans-

formations available are reflection about an axis, stretching or compressing (change of scale),

and sliding (translation). The user can alternate between the graphic display and a text display

which lists the available commands and the more recent interactions between user and program.

Expected users are engineers, mathematicians, and researchers in the natural and social sciences;

in addition, teachers and students can use the program to approach topics in (for example)

algebra, tr igonometry,and analytic geometry in a visual, intuitive, and experimental way which

complements the traditional, primarily symbolic orientation. REQUIREMENTS: 16K of

memory with Applesoft Rom Card or 32K of memory without Applesoft Rom Card.

\ I. .." /

~ - -,

-. e 8e ., 88e . . . . , I.... c . . . .

GAMESApple Casino

Apple Derby

Apple II Organ

Cubik

APPLICATIONSAutomotive Diagnosis .

Basic Statistics - .

Electrical Engir:leering I .

Statistics I .

$14.95

9.95

9.95

14.95

9.95

$ 9.95

9.95

19.95

9.95

9.95

9.95

9.95

9.95

9.95

14.95

9.95

Radar Interceptor .

Rocket Pilot , .

Vector Analysis

FINANCIALaucer Invasion

Space Maze

Star War

Financial WiZilrd •.•.... .

Financial Wizard II .....

$ 9.95

9..95

9.95

9.95

Financial Wizard III ....warms .... ,

Wampus Hunt Financial Wizard IV .

SYSTEMS SOFTWARE(Programs recorded on cassette

tape. Documentation lnctuded.)

. . . . .. $ 7.45

7.45

24.95

24,95

Memory Dump , . , ..

Program Unload .

File ·Editor .HARDWARE

Light Pen ... $34.95Assembler . .. ..

(Includes Derno-S oftware)

(File Editor r "Qu lred for

use with Assembler)

Call or write tor our free SOFTWARE & ACCESSORIES.CATALOG

DEALER INQUIRIES INVITED

• Master Charge and VISA

orders accepted.

• Include $1.00 for

shipping and handl ing.

• New Jersey r esidents add

.5% sale. Tax.

(Prices subject to chBngtl. J

POftTEH§OF~ INC.'P. O. BOX 157

PITMAN, NEW JERSEY 08071

(609) 589·5500Apple II i.a registered

trademark of Apple Compute r, In c.

Page 50: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 50/68

54 D l - AS II I 4280 LD A *CS12+0154r13- 91 D 6 4290 STA ( AS II ) ,y

54[15- 85 D 9 4300 STA *CSIItOl

54D 7- 88 4310 D EY

54D8- AS D C 4320 LD A *CSI2

-4 DII - 91 D 6 4330 STA (ASII l rY

54DC- 85 D 8 4340 STA *CSII54DE- S8 4350 D EY

54 D F - Bl D A 4360 LD A (AS12 ),y

54El- 91 D 6 4370 STA ( A S I I),

54E3- 68 4380 PLA

54E4- 91 D A 4390 STA ( A S1 2 ) ,Y

54E6- 60 4400 RTS

54E7- A2 00 4410 SV 1P LD X U O SAV E SO ME O F APPLESO FT' S54E9- B5 D O 4420 H C51 LD A *t-IAPT ,X Z ER O PAG E. SO RT R OU TINE54E( I- 9 D 49 55 4430 STA ZPS V ,X NEEDS SOME ROOM TO WORK.54EE- ES 4440 INX

54EF- EO 22 4450 CPX 22

54 F l - D O F 6 4460 BNE H C5154F 3- AS 68 4-470 LI lA *116B ALSO $ 6:8. 6C54 FS - BD 71 55 4480 STA SV 68

54F8- AS 6C 4490 LI lA *1168+0154F A- SD 72 55 4500 STA S V6B+Ol

54 F D - A2 00 4510 LD X 00

54 F F - 85 50 4520 H C55 LD A *Z 150, X ALSO $ 50. "5501- 9 D 6B 55 4530 STA S V50,X

5504- E8 4540 H IX

5505- EO 06 4550 CPX 06

5507- D O F 6 4560 SNE H C55

5509- 60 4570 R TS

55011- A2 00 4580 R S1P LD X 00 RESTORE ZERO PAGE DATA550C- 8D 49 55 4590 H C6l LIl A 1PS V ,X

550F - 95 D O 4600 S TA * NA PT ,X

5511- E8 4610 INX

5512- EO 22 4620 CPX 22

5514- D O F 6 4630 8NE H C61

5516- AD 71 55 4640 LD A SV 68

5519- 85 68 4650 STA *Z Z 6S551B- AD 72 5S 4660 LD A SV 6B+ Ol

551E- B5 6C 4670 STA *Z Z 6B+ O l5520- A2 00 4680 LO X 005522- SD 68 55 4690 MC65 LD A SV 50, X

5525 - 95 50 4700 STA *Z Z5 0, X5527- E8 4710 INX

5528- EO 06 472u CPX 06

S52A- D O F 6 4730 SNE H C65

552C- 60 4740 RTS

4750

552 D - 53 52 54 4760 SR TS . AS ' SR Tt < '

5530- 23 28 4770 H S G l . H S a D

5532 - aD 4780 . AS 'VARIABLE'

5533- 56 41 52 49 4790 V A R I . HS 2 02 020

5537- 41 4800 . AS,

NO T F OU ND '

5536- 42 4C 45 4810 Z PSV . H S 0000000000000000

5538- 20 20 20 4820 . H S O O O O O u O O O O O O O O O O

553E- 20 20 4830 . H S O O O O O O O O O O O u O O O O

5540- 4E 4F 4840 . H S O O O O O O O u O O O O u u O O

5542- 54 20 46 4F 4850 . HS 0000

5546- 55 4E 4860 SV 50 . H S 000000000000

5 5- 48 - 4 4 4870 SV 6B . HS 00004880 NAM E . H S 00000000000000004890 . H S 00000000000000004900 U PD N . H S u O O O O O O O O O4910 IND S . H S 004920 PR SN . H S 004930 SA VY . H S 004940 .EN

14:48 M ICR O- Th e 6502 Journal July 1979

Page 51: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 51/68

10000100101002010030100401005010060100701008010090101001011010120

1013010140101501016010170101BO1019011000110101102011030

SO fa D EM O

SELECTIONS

R EM * * &SO R T D EM O * *R EM SAV E R O O M F O RR EM SO R T R O U TINEH IM EM : 20992: REM $ 5200

D $ = CH R$ (~>

PR INT D $; "BLO AD S. AM PER -SO RT"R EM SET U P . &. H O O KR EM AT $ 3F S:JM P $ 5200PO K E 1013, 76: PO K E 1014, 0: PO K E 1015 , 82H O M E : CLEARV TAB 8: H TAB 15: PR INT · SO R T D EM O "PR INT: H TAB 15: PR INT · SELECTIONS"PR INT: H TAB 10: PR INT " 1 INTEGER SO R T"

H TAB 10: PR INT " 2 F LO ATING PO INT SO R T"H TAB 10: PR INT " 3 CH AR ACTER SO R T"H TAB 10: PR INT "4 EXIT"V TAB 17: INPU T · SELECTIO N " ISE%IF SEX < 0 O R SEX> 4 TH EN 10090O N S EX G O TO 2 000, 3000, 105 0, 101 90

EN DPR INT " H IT ANY K EY TO R ETU R N TO M ENU "WAIT - 163B4, 128PO K E - 16368, 0G O TO 10090

1 INTEGEI:;;ORT2 F LOATING POINT SORT3 CH ARACTER SORT4 EXIT

SELECTION 1

BEFOF~E

71.53

-130('

--4376,···.~l944

4?48

-2914

3416

--:2.95~:;

·..43?·cj

_ . ; ~ S I 5 ~ .= ;

..-2914--13(i(l

3:'553·(~16

4 < . 1 ' 4 8

7:1.53

AFTEF<

H IT ANY KEY TO RETU RN TO MENU

July 1979

SOFa DEMO

SELECTIONS

1 INTEGER SORT2 F LOATING POINT SO3 CH AR ACTER SORT4- EXIT

SEL.ECTION 2

BEFOF:E

65.0306039

831.0565;'5

4-8:3.823094·-2'16 to 50S}:42

-370. 91~j~H4

-::.~26 ~851 ~72-·61. ():'\3(l44

3~.;3.768754

AFTER- ::) 7 () • . } 1 ~ , : : j344-

-296. ~5(la742

-:~2b.85i7~2

-61.023()·4-4-(i

6'5.03(> 60393 ! ' : " . ; 3 . 7 " 68nS4

4B3.B:230'i4

H IT ANY KEY TO RETU RN TO MENU

MICRO- The 6502 Journal

Page 52: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 52/68

SOR T DEMO SELECTION 1BEFOPE

SELECTIONS -1(l3

-·3561

'-~589n

3111

2l;27

-··:1.089

7'46~5

1 INTEGER SORT2 F LOATING POINT SORT3 CHARACTER SORT- 4 EXIT

::::ELECTON 3

BEFOf.;EX : : < XXX X X X e e c c e c ceA A A A { . " 1 A A ( i D D D D D DD D

D D D D D D D D B B B B B B B B

f~{ :H=1j ' ' ' f iAf ' 'd1; ' :XXXXXXX

C C CC C C C C A ? l f':1.~Iti?) A A

' " o {yyy ' '1"yyyccecccccy y y y \ 'Y Y YW W W W ~ JW W W

B f: B B 1~B B B t " j ( . . j i ; , i l , J W W W W

: ; ' ; ; X X X > < X X X B B B B B B B B

I~FTE:F:

f~ ~~ ~CE N D D E SCE N DA ? " o ; { · i A ; : O ji Fli~1 X X X X X X X X

f:'II;~i~{~;; j t i ( ; ( :1 Ii[inItItI t I t ItB B P B B ) 3 B B t . . . J W W W W W W W

eCCCCCCC{)M)AAf:IAAD D D D D D D D H B B B B B B B

X)< x x > < > : x > ~CCCCCCCC'l/ > < > : > < / X ; ( B B B B B B B B

Y'{ Y Y "j'YYY' t ~ W W W W W W W

Y ' r ' Y Y ' Y "YYY'CCCCCCCCH I T A N Y K E Y TO PET U RN TO MENU

AFTER--5898

''''!:j 2 4 · : : ~

····:35/:;1. . . . : i . (l8?_.1():!,

2340

31i1

7465

HIT ANY KEY TO RETU RN TO MENU

SORT D EMO

SELECTIONS

i INTEGER SO RTF LOATING POINT SORT

SOR T DEMO

3 CHAR ACTER SORT4 EXIT

SELECTION?REENTER

SELECTIONS

1 INTEGEP SORTF LOATING POINT SO RTCHAH ACTER SORTEXIT

SELECTION 2BEFOF :E. ,

-

3

- 4

SO RT DEMO

281 t 3795.q·~·~

659 t ~537J '" salC5.b557004-186 + 59~.'j()71-736.50SJ()4

'-10.1274439

-77.9707171

'3ELE:CTION 11

SELECTIONS 3~i~2t 156·7~j

1 INTEGER SORT2 F LO ATING PO INT SORT3 CHARACTER SORT- 4 EXIT

14:50 MICRO~ The 6502 Journal July 1979

Page 53: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 53/68

AFTER-/":36 t !~: j (}~: l :30.. : }

- :1 _i b. 1 _ : : ' ; 9 ~ : ; i J 7 : L

-77.9707:L71

-1().1274--439

o18~3 < - 6~ ;57 (>4

zs 1 ~:)/ '1 '5 4 · 3

352.:1. 5675

H IT ANY KEY TO RETU RN TO MENU

SOI:;;T DEMO

SELECTIONS

1 INTEGER SOR T2 FLOATING POINT SORT3 CH ARACTER SOR T4 EXIT

SELECTION 3

BEFOREAAAAA(~AAnDDDDDItDCCCCCCCCf~AAAPIAAACCCCCCCCDDDDDDItDW l ,J W W W W W W Y YY - Y YY YY

Y Y Y Y Y Y Y Y X X ; ' : X X X X X

BBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCC

C C C C C C C C X X X X X X X XA A A A A A A A W W W W W W W W

~> iFTEF<

ASCEND D ESCENDA A { . j A r ~ ~ ( 1 A f ~ W W W W W W W W

AAAAAAAADDDDDDDDBBBBBBBBCCCCCCCCC C CCCCCC:X:XXXXXXX

CCCCCCCCDDDDDItDDCCCCCCCCCCCCCCCCCCCCCCCC{~AAA(!tAAAW t · JW l · j W ~ J W i , . . I Y Y Y-fYYYyyy·y'yV .....·XXXXXXXX

HIT A N Y K EY TO RETU RN TO MENUSORT DEM O

SELECTIONS

1 INTEGER SO RT2 F LOATING POINT SORT3 CH ARACTER SO RT4 EXIT

S E L . E C T I O N 1BEFGRE

2B88t . . : : ' : 7 3

--900

- -4-864

--7349

6;:389

~ . J . 83

1D'::.;3

---4 ·Ol :3 AFTER-·7:_3-49

···· .<\·1364··-.cj-O3

'--900

2[:88

4:1. 8::;

,snn?H IT ANY K EY TO RETU RN TO MENU

SORT D EMO

SELECTIONS

1 INTEGER SO RT2 F LOATING POINT SO3 CH ARACTER SO RT4 EXIT

SELECTION 2

BEFORE(;

370.781155

264.527624-

345.96456-119.0()236

-B81.17073

-302.459631

444.30628

AFTER

-f.l81.17073-,302.459631

-:I. 19.()(l236

-77.2<.i9?"615

V

264.527624

345.96456

37(1 + 781155

4.(~·4.3(>628

July 1979 MICRO-The 6502Journal

Page 54: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 54/68

H IT ANY K EY TO R ETU R N TO MENU

SOR T D EM O

SELECTIONS

1 INTEG ER SO RT

F LOATING PO INT3 CH ARACTER SOR T4 - -EXIT

SORT

SELECTION 3

BEFOF:EW W W W W W W W W W W W W W W WD D D D I t D D D B B B B B B B BW W W W W W W W Y Y Y ' " { Y Y Y YD I t [ l D D D D D D D D D D D D DI I I! I i I l D D D D > < X : : 'C : ;( X X X X

Y Y Y Y Y ' y ' Y Y B B B B B B B B

W W W W t \ l l . .f I ~WBBBBBBBBB B B B B B B B Y Y Y Y " { Y Y Y

B B B B B B B B I : - : B B B B B B B

APPLE II SOFTWARE

Tabular 4-Way Number ConverterInteger BASIC (8K min) $3.50

Apple Pi Life (4K min) $5.00

Agenda (16K min) $5.00

HIRES Shape Encode (16K min) $5.00

Integer BASIC Floating Point

Interface (2K Machine Code) $6.50

Each program completely documented.

Prices Include postage and handling.Send SASE for Software List today!

Send check or money order to:

Mlcrospan Software2213A Lanier DriveAustin, TX 18158

(Texas fesldents add 5% sales tax)

flSCEND DESCEND

B B B B B I J B f l Y Y Y " '( '1 'y y y

B B B B B B B B B B B B B B B BDDDDDDDDXXXXXXXXD D D D D D D D D D D D D D D DD D D D D D D D B B B B B B B BW W W W W W W W Y Y Y ' 1 ' Y Y Y Y

W W W W W W W W W W W W W W W W

W L d~ J l t . J t ·.l~ J W ~ j f . { B B B B B B BY'-f'-{''j''{YY\' B B B B B B B B

H IT ANY K EY TO RETURN TO MENU

SORT DEMO

SELECTIONS

1 INTEG ER SOR T2 F LO ATING POINT SOR T

3 CH AR ACTER SOR T4 - EXIT

West S id e E le ct roni cs i nt roduce s t heAPPLnlMETM, • Rea l ru ne C lo ck for th e A pple II

The Appletime (Model APT-I) is a single peripheral

board which plugs directly into any 1/0 slot on the

Apple II. Timing is done completely in hardware lie.NOT an interrupt driven clock). Thus, the Appletime

continues to operate even when the computer is turned

off. Our exclusive ThreeWay Power System keeps the

clock running via its own AC supply, the computer's,

or battery backup in case of power failure. Other

features include 12/24 Hour selection. AC ar crystal

timebase, 50/60 Hz, and BCDor ASCII data format.

Fullyassembledand tested. with instructionsand

APT·1 Real Time Clock .. _ _. _ $19.95

P ra to -lIN n! fo r A pp le II. Over 1300 holes on 0.1 inchcentersfor designing your own circuits.

API·I Prototyping Board _ $16.95

VERBATIM 5%" DISKETTES $34.50Soft sector, in plastic file case. Box of 10

W E S T S ID E E L E C TR O N IC SP.O. 101636

CHATSWORTH , CA. 9 13 11

We pay all shipping in Continental U.S_A.

Others add IO%;Ca/ifornia residents add 6% tax,

MICRO-The 6502 Journal July 1979

Page 55: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 55/68

051 Fast Screen Erase under BASIC

When a BASIC program erases the screen by writingblanks, it can take more time to clear the display than tofill it. Speed up that slow poke with this fast machinelanguageapproach.

While working on a number of game pro-

grams written in BASIC, the need for a

faster method of screen clearing for

animated characters was a desirable

feature that I did not have with the POKE

function of BASIC_ The usual method is

to set the desired number of lines to be

cleared and POKE the ASCII equivalent

for a blank out to the screen, This gives

a slow, line-by-line screen clearing effect

that is not acceptable with fast games

using animated characters. The screen

clear routine must be ultra-fast for this

type of game program.

The following subroutine will work with

most BASIC programs that require a fast

screen clear. The routine is written in

BASIC and assembly language. The ul-

tra-fast screen erase portion is in as-sembly object code and is placed in user

memory. It can be used with programs

written in OSI MicroSoft BASIC for the

OSI computer systems.

My system is composed of the system

boards sold by Ohio Scientific Instru-

ments. The CPU board is a Model 500

with the 8K OSI BASIC by MicroSoft.

The display board is a Model 440 with

4 pages of screen memory and alpha-

numerics only. My system has 8K of

read-write memory on two 420C memory

boards, along with a 430A Super 110

board for the audio cassette interface.

The program is a subroutine that uses

BASIC as a housekeeper to count the

number of pages to be cleared. The ac-

tual work is done in the machine code

routine that is called by the mainline

BASIC program. This program can be set

up as a subroutine and called from your

mainline when a screen erase is re-

quired.

At line 10, the variable D contains the

initial location for the machine code

routine that performs the store-to-screen

function. This is the location at the be-

10 0=20820 POKE 11, 00: POKE 12, 1530 X=U SR ( JCl40 PO KE 3848, 050 D=O+I

60 IF 0(213 TH EN 3010 IF 0=213 TH EN RETU RN

100 FOR R:3840 TO 3853110 READ M: POK E R, M120 NEXT R130 D ATA 162, 0, 232, 169, 32, 234140 D ATA 151, 0, 208, 22~, 255, 208, 245, 961 50 R ET U RN

July 1979 MICRO- The 6502 Journal

William LTaylor246 Flora Road

Leavittsburg, OH 4430

ginning of the screen memory.

screen memory begins at hex D

or 53213 decimal, on the 440 and the

OSI display boards.

Line 20 defines the USR vector and

the vector point to hex OFOOO,or 3

decimal, where the machine code

tine is located. Line 30 causes a jump

the user vector located at hex OA,

and OCin page zero of the user memo

The machine code routine will =xscand one page of screen memory

be cleared. Line 40 updates the p

count by changing the machine c

routine at location OF08, or 3848 d

mal. At line 50, the page pointer is inc

mented by increasing variable Dby 1.

Lines 60 and 70 check to see whether

pages, or all screen locations have b

creared. If they have not (variable

not equal to 213 or 217) then anot

loop will be forced until all pages

screen memory have been cleared. l

70 should be a return, if called as a s

routine: 70 IF D = 213 THEN RETU

for a 440 display board, and 70 IF D

217 THEN RETURN for a 540 disp

board,

The loading of machine code into u

memory can be performed by storing

machine code in DATA statrnents. T

the user location is defined and the d

is read and POKEd into user memo

An example of this method is foundthe subroutine at l ines 100 through 15

A word of caution may be in order at t

point. The memory size must be

when bringing up BASIC. That is, befo

loading your program you must set

size of memory to protect the machi

code routine. Set the memory size

3839 decimal, for this routine, to preve

BASIC from destroying your machi

code.

14

Page 56: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 56/68

THE MICRO SOFTWARECATALOG: X

Mike RoweP .O . B ox 6502

Chelmsford, MA 01824

Name: DISK TEXT EDITOR

System: Apple IIMemory: Minimum of 24K with DOS & Applesoft ROM

Language: Applesoft II BASIC

Hardware: Apple II, Disk II, optional Applesoft ROM &printer.

Description: EDIT is a DOS Text Editor designed to

facilitate changes to disk files, but also supporting in-

put and output via cassette. The text editor will operate

on fixed or variable length disk records and has 27 com-mands. System commands allow the user to DELETE

INSERT, CHANGE, DISPLAY, ADD, and PRINT rec:

ords. String commands, such as STRING CHANGEand SEARCH, find and change a single character string

or the entire file. User defined TABS, file APPEND,and CONCATENTATION, file creation, and other mani-pulations are also provided to modify text from thekeyboard or existing files.Copies: Just released

Price: Cassette $16.95Diskette $21.95 (specify Applesoft ROM)

Shipping $1.25

Includes: User manual and documentat ionAuthor: Robert A_S tein, Jr.Available from:

Services Unique, Inc.

2441 Rolling View Dr.

Dayton, Ohio 45431

Name: AMATEUR RADIO LOG PROGRAM

System: APPLE II

Memory: 8KLanguage: Applesoft IIHardware: Apple II, cassette tape recorder

Description: This program provides a computerizedrecord of an amateur radio operator's log book.

There are seven functions:

1. Add log entries

2. Print log entries by date.

3. Print log entries by call letters.

4. Print log entries by entering only first 3 digits of

call letters and/or entering only call area or district

or call sign.5. Print all log entries.6. Print names of places (cities, states, counties, coun-tries, etc.) or other info that you enter.

7. Print log entries by entering only the OTH.

Data is printed in for form of:

Date: Time: Call: Freq: MODE: OSL: OTH: Name:The program is very useful for OSO's, contests, DX,

awards, QSLing, QTHs, names.

All of the above questions will be answered after you

enter your data and other information.Copies: Just released (at least 10 copies have been sold)

Price: $12.00Includes: Cassette, sample run and instructions to

revise.

Author: Alex Massimo

Available from:Alex Massimo - A F 6 W4041 41 st Street

San Diego, CA 92105

Name: Programmer's Utility Pack

System; Apple IIMemory: 4K to 6K depending on the program usedLanguage: Integer BASIC and Applesoft

Hardware: Apple II with cassettee or disk drive

Description: Set of 11 programs. Appends, STR$ 0 andVAL () are on printed documentation with the tape ver-

sion. Programs include: Renumber-Integer·& Applesoft ,

Append-Integer & Applesoft, Line Find-Integer & Apple-

soft, Address/Hex Converter, Screen find, Memory

Move, and the STR$O and VALO function simulationsfor Integer. By using the various programs one can re-

number Integer and Applesoft programs with allGOTO's, etc, being renumbered and the user alerted

to unusual situations in the program. These include

referenced line #'s not in the program, lines referenced

by a variable or expression, and a number of others.Line Find allows the user to locate the actual address

range of a line in memory so as to be able to insert CLR,

HIM EM:, etc. Can also be used on occasion to recoverprograms garbaged by dropped bits. Address/Hex

Converter converts between the Hex, Integer, and

Applesoft address formats. It also provides the twobyte breakdown of numbers greater than 256 for use inpointers, etc. Screen Find is used for printing directly

on the screen by POKEing appropriate values into the

proper locations in memory. Screen Find gives these

values and locations when the characters desired andthe horizontal, vertical screen positions are input.

Memory Move allows one to move blocks of memory

up or down any number of bytes from Integer or Apple-

soft. The Monitor has a routine similar to this but it can-not be used to move blocks up a small distance and it

is not possible to use it directly from Applesoft.STR$( ) simulates the function of this name in Apple-soft for use in Interger programs. STR$O in Applesoftconverts a number to a string. VALO is similar but

converts strings to numbers.

Copies sold: Just released

Price: $16.95 Calif. residents add 6% sales tax

Includes: Two cassettes or 1 diskette plus documenta-

tion

14:54 MICRO- The 6502 Journal July 1979

Page 57: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 57/68

Name: METRIC·CALCTMSystem: Commodore PETMemory: BKLanguage: BASICHardware: Pet 2001·B(or 2001·4 with 4K external m

ory). Available as special order for 200or 2001-32.

Description: METRIC-CALC turns your PET intpowerful stack-operated (RPN) scientific calculatorincludes metric conversions. Unlike other metricverters, tnls one lets you use the converted figures

your calculations. Unlike other stack-operated calctors, this one lets you see the contents of the stackthe top five levels are displayed during calculatioand all twenty can be reviewed at any time (as cantwenty addressable storage locattons). Numb"buried" in the stack can be copied to stack-top wikeypress. Functions include instructions, arithmeinversion, logarithms, trigonometry, powers ...many to include here. Write for flyer. ReviewedSpring 79 issues of PETGasette, and Best of PET Gette.Copies: More than 60soldPrice: $7.95 (quantity discount available)Includes: Cassette in Norelco style box, descriptand operating instructions, zip-lock protective packa

Designer: Roy BusdieckerAvailable from: Better computer stores or directly f

Micro Software SystemsP.O. Box 1442Woodbridge, VA 22193

Name: MAZE GAMESystem: PET2001Memory: BKLanguage: PET BASICHardware: StandardDescription: This is a real-time game of skill whtests your co-ordlnatlon as you attempt to guide athrough a maze that 'is displayed on the screen usthe PET graphics. There are four levels of play whgrade the speed of the ball and the number of mistayou can make, from the slow learner speed to the ufast masochist level. The maze is 19 by 11 squaresyou have to go from left to right (i.e. the long way).

Copies: ManyPrice: $19.95Author: Jeff LawAvailable from:

Southern Software LimitedP.O. Box 8683Auckland, New Zealand

Name: Sales ForecastingSystem: AppleMemory: 16KLanguage: Apple IISoft

Description: Program displays business forecast frthe best fit of four curve fits. Manual operation istional.Copies: 30Price: $9.95 + $1.00 postage & handling (PA residenadd 6% sales tax)Includes: Cassette with instructionsAuthor: Neil D. LipsonAvailable from:

Progressive SoftwareP.O. Box 273Ply. Mtg., PA 19462

MICRO- The 6502.Journal

Author: Rober WagnerAvailable from:

Local Apple dealers or:Southerwestern Data SystemsP.O. Box 582-MCSantee, CA 92071(714)562-3670SASE for info.

Name: MACRO AsseblerlText EditorSystems: PET,Apple II,SYMMemory: 16K system recommended. Program occupiesBK.Language: AssemblyHardware: Terminal and one or two cassette decks.Disk may be used in lieu of cassette decks.Description: Combined assembler and text editor soft-ware (2000-3FFF) which has the following features:Marco and Conditional Assembly support; binary, hexand decimal constants; labels up to 10 characters;loads/records and appends from tape; string searchand/or replace commands; auto line numbering; copyand more commands; linkage vectors to disks; syntax- similar to MOS Technology specs. Over 25 com-

mands, 22 pseudo ops, and 5 conditional assemblyoperators.

Copies: Just released. 25 as of April 1979Price: $35.00 plus $2.00 shipping and handling.Includes: Manual and either PET, Apple II, or SYM (H.S.)cassette tape. No source.Order Info: Check or money order.Author: Carl MoserAvailable from:

C.W. Moser3239 Linda DriveWinston-Salem, N.C. 27106

Name: Commodity FileSystem: Apple IIMemory: 32K or moreLanguage: Applesoft IIHardware: Disk II,optional printerDescription: The program stores and retrieves virtuallyevery commodity traded on all exchanges. A self· pro-mpting (burned-in) program allowing the user to enteropen/closed contracts. Figures profits/losses, andmaintains a running cash balance. Takes into accountany amending of cash balance such as new deposits orwithdrawals from account. Instantaneous readouts(CRT or printer) of contracts on file, cash balances, P/Lstatements. Includes color bar graphs depictingcumulative and individual transactions. Also includesroutine to proof-read contracts before filing.Copies: Just releasedPrice: $14.95on diskette, $9.95 on cassetteIncludes: Program cassette or diskette, Completedocumentation.Author: S.GoldsteinAvailable from:

MIND MACHINE, Inc.31Woodhollow LaneHuntington, N.Y.11743

July 1979 14:55

Page 58: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 58/68

Name:Table GeneratorSystem: AppleMemory: 16K

Language: Applesoft II .Description: A program that forms shape tables with

ease. Program adds in other information such as start-

ing address, length and position. Saves all of this in-

formation into a useable location in memory.

Copies: 10Price: $9.95 & $1.00 postage & handling (PA residents

add 6% sales tax)Includes: Cassette with instructions

Author: Murray Summers

Available from:

Progressive Software

P.O.Box273Ply. Mtg., PA 19462

Name: Restaurant Evaluation

System: Apple II

Memory: 16K

Language: Applesoft IIHardware: Disk II(optional)

Description: Evaluates potential restaurant/nite clubsites and thereby reduces the margin of risk involvedin purchasing a new or existing business. The program

design is of a computer question, user answer nature.The auther has borrowed against his many years ofexperience in the restaurant business and has builtinto the program all the necessary percentages to

evaluate whether a potential site will be profitable or

not. The program calculates monthly gross, computesmonthly loan notes (or mortgage) and arrives at a

monthly net proftlloss reported in dollar amounts andpercentages.

Copies: Just released

Price: $14.95Diskette, $9.95cassette + $1.00ShippingAuthor: M.GoldsteinAvailable from:

MINDMACHINE, Inc.

31Woodhollow Lane

Huntington, NY11743

Name: Personal Accounting System-PASSystem: PET

Language: BASIC

Hardware: Single cassette drive or COMPUTHINKdiskDescription: PAS relies heavily on the PET's file

capabilities to generate and validate files containing a

detailed description of your financial transactions.PAS consists of six programs including those to gen-

erate and edit data files, balance your checkbook,reconcile your bank statement, report your outstanding

checks and summarize your transactions over a periodof time. PAS creates files for monthly transactions,outstanding checks, andsummaries.

Includes: Excellent user manual, cassette or diskAuthor: Ronald C.Smith, SMITHWARECopies: Just released

Price: Cassette version (8K),$19.95;disk version, $24.95Author: Ronald C.Smith, SMITHWAREAvailable from:

PROGRAMMAINTERNATIONAL3400Wilshire Blvd.

Los Angeles, CA 90010

14:56

Name:SIGNS

System: PET2001Memory: 8K

Language: PETBASIC(IEEEport 5)

Hardware: Printer (PETor RS-232)Description: The signs package is intended for produc-

ing posters, headings and other signs, in severalformats, to be printed on a printer. The package con-sists of two programs written for 8K PET systems.

One program initializes data for the signs program and

then the second program requests text for the signand prints the sign out with three sizes of letter(micro, small and big); left, centre or right justified on

tha page, with options to specify foreground and back-

ground characters. Other options include NEWPAGE,SPACEn,and END.

Copies: ManyPrice: $19.95

Author: TerryTeague

Available from:

Southern Software LimitedP.O.Box8683

Auckland, NewZealand

Name: Othello

System: 6502SYM-1baresystemMemory Required: 1K

Language Used:6502Machine LanguageHardware Required: None

Description: The look ahead ply depth is enteredthrough the key board. Player or computer may move

first. All sequences of moves are evaluated, with the2,3,4,5, etc. ply game requiring 1 sec, 8 sec, 1 min, 8

min, etc. respectively per move. Everymove, is checked

for legality, (beeper sounds if move is invalid) and all

movesand number flipped aredisplayed automatically.Player enters his moves through the keyboard. Ply

depth is automatically incremented near the end ofthe game. For example, in 1 min, the computer playsthe last 7moves perfectly!

Price: $6.95Includes: Cassette (KIM format) and instructionsAuthor: DavidB.SchaechterAvailable from:

DavidB.Schaechter

4343OceanView Blvd. Apt. 261

Montrose, CA91020

Name:ALGEBRA

System: APPLE IIMemory: 16K

Language: Integer BASICandMachine Language

Description: School tested enjoyable algebra pro-grams, using missing words, this interactive programstarts the student learning algebra on the highschool level.

Copies: Just releasedPrice: $9.95for cassette with 2 lessons

Includes: Cassette and loading instructionsAuthor: George EarlAvailable from:

George Earl

1302S.Gen. McMullen

SanAntonio, TX78237

MICRO-The 6502 Journal July 1979

Page 59: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 59/68

To Tape or Not to Tape:

What is the Question?

Dust off that oscilloscope and clear up some of themystery behind digital data recording on audio cassette.

These lines are penned in an attempt to

clear up some of the mysteries of doing

the impossible, and to explain some of

the apparent idiosyncrasies of elec-

tronics. Some microcomputer operators

are neophytes in basic electronics, and

so, this little lesson will endeavor to ex-

plain what each part is, how it works, and

why it is used in a given circuit. I would

suggest you try the experiments shown

in Figure 3 for a better understanding ofthe circuit theory.

Those who don't own an oscilloscope,

could make one of your club meetings in-

to an evening away from talking about

the merits of software or peripherals,

and try to understand what you are pay-

ing for when you layout that long green.

Of course, remember to invite someonewho owns an oscil loscope.

As the title of this episode suggests, we

will investigate why such a simple thing

as making a tape recording can cause so

much discussion. Most computerists

have seen a drawing of the electrical

signal put out from a Teletype keyboard

and have noted the similarity to draw-

ings of an ASCII signal; let's face it,

we've got to learn how to handle these

fast changes of DC voltage called square

waves, obviously a misnomer because

we all know that waves are rythmic u n -

dulations of matter and therefore cannever really be square.

We are told that a square wave is an

"instantaneous" change of voltage from

one level to another, with both levels

maintained without variation until the

next change of state. For TTL circuits

these levels are approximately plus 4.BV

for level 2 and plus D.2V for level 1, usual-

Iy just called 5V for a "1" and zero V for a"0",

July 1979

I hinted that I was going to talk about the

tape recording of digital signals, and I

will. First of all, as Dr. DeJong might say,

Earthpeople have not yet invented an

audio tape recorder that will record or

playback digital signals composed of the

classical description of the same, name-

Iy, "A series of square waves varying o~·

Iy in frequency or timing but unvarying In

amplitude." A Teletype punched paper

tape comes very close to the ideal way of

making a permanent recording of digital

signals and, when played back, will pro-

duce digital signals very close to the

original; however, the expense of one of

these machines puts it beyond the

budget of most of us. And besides,where do you store all that paper tape?

Them fellers in Kansas City are pretty

smart for flat landers 'cause they figured

out a way to fool a computer into think-

ing it is receiving square waves when it

really ain't, and that's the gist of my

story. All your computer wants to receive

on the "from tape recorder" line is data

to say that this frequency of tone means

a "one" and this frequency of tone

means a "zero". "Sounds so darn sirn-

pie" you say, "How come one of us

mountain folk never thought of that?"

Now if we can just make our computer

generate those two tones and put them

on the "to tape recorder" line in the cor-rect sequence and time, we will have a

system like the boys from Kansas City

envisioned.

As we said before, even the best tape

recorder cannot record square waves,

but that is all our computer can

generate, so we must modify these

square waves to fool the tape recorder

into thinking they are distorted sine

MICRO-The 6502 Journal

Noel G. Biles

P.O, Box 1111San Andreas, CA 95249

waves. Then, when they are played

to the computer, it will modify t

distorted sine waves back to sq

waves which our computer can diges

Figure 1 shows the "tape out" circ

of the Synertek VIM·1 microcompute

Because the tape recorder requires

a few millivolts on its input line,

volt square wave from pin 9 mus

reduced to usable proportions by

voltage divider formed by R90, RB9

R B B . R90 does double duty in conj

tion with C14; it forms a low pass

which has the effect of slowing down

rise time of the square wave signal

pin 9 to a modified square wave

rounded corners as shown on

schematic, and if the "La" terminal

this machine is used, some additio

"rounding off" of the signal will b

complished by the added c

capacitance in conjunction with

Now, one important thing is that

recorder input level control must b

so that no overloading of the ampl

stages in the recorder occur (beca

that drives the transistors in there c

but so that a sufficient level is rnaln

ed for operating the tape h

Recorders with automatic level con

(ALC) are great for this type of ser

because they don't have any recordlevel control to adjust.

"Aha!" you say, "My tape recorder is

fi unit and will reproduce these distor

sine waves just as recorded, and th

not what my computer wants to s

This is true, but the computer is exp

ing this type of a signal and is prepa

for it, as in Figure 2. The output sig

Page 60: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 60/68

from most cassette tape recorders

would be a little further distorted from

the passage of semi-square waves

through the output transformer, which

no longer sees the correct load because

we have disconnected the 8 ohm

loudspeaker. It reflects this change of

load impedance back to the primary, in

turn destroying the fidelity of the output

stage.

Looking at Figure 2, the schematic of the

tape recorder input of the Synertek VIM

1, the recorder will see a load of approx-imately 270 ohms formed by the series

impedance of R128 (100 ohms), C15 (170

ohms @ 2,000 Hz), and CR36,37 (approx-

imately 100 ohms) to ground, less the

parallel resistance of C16, R92, and

diodes CR28, CR29 through R94 to

ground, for a total of 264 ohms. The 0.5

watt or more available from the output of

the recorder is capable of driving this

load to better than 11 volts, which is now

divided down to the correct voltage to

drive the op amp "sine to square con-

verter" U26.

This division is accomplished via the

impedance of C16 (8,000 ohms @ 2,000

Hz) plus R92 (1,000 ohms) through CR28,

CR29 (100 ohms) and R94 (3.3K ohms) to

ground. So if we adjust the recorder gain

control for approximately 8 volts at the

input terminal we should have about 2V

of signal at op amp pin 3.

This voltage is more than enough to

cause diodes CR28 and 29 to clip the

voltage peaks at 1.5V and limit the input

to the op amp. With the amplified inverse

voltage from pin 7 fed to pin 2 through

R96, the signal at pin X on the expansion

connector will be a nice clean replica of

the near perfect, zero to 5 volt square

wave we first generated from U37 in

Figure 1. R128, C15 and diode CR37 form

an audio voltmeter, while diode CR36 is a

recording level indicator illuminated bythe rectified voltage from CR37.

Now that we thoroughly understand all

of the above, let's prove that this really

works. Refer to Figure 3 and construct a

Simple square wave generator on a Proto

board with an oscillator operating at ap-

proximately 2,000 Hz and an inverting

buffer to simulate the internal generator

in the computer. We will need a 4011

Quad Dual Gate Integrated Circuit, 5

resistors, and 2 capacitors to build the

generator and' divider chain. In addition,

we will also require a 5V power supply to

operate the unit.

Hook up the power supply and, if there is

no smoke, start by connecting theoscilloscope to point X in Figure 3. It

should reveal a fairly good square wave

approximately 5V in amplitude. With C1

temporarily disconnected, point Y will

show the same square wave at approx-

imately 1.5V of amplitude, while point Z

shows .036V of square wave.

Reconnect C1 to point Y and note the

distortion at this point on the rise and

14:58

::hJ1---- .....

I37

R 6 1

IX

fall times, but not on the amplitude of

the square waves. Point Z will be a re-

duced voltage version of this distorted

square wave. Or is it a distorted sine

wave?

The frequency chosen for this experi-

ment (2,000 Hz is the center of the two

frequencies used on the VIM or SYM

microcomputers) will have a direct bear-

ing on the values chosen for R1 and C1.

Too large a value for either would reduce

the amplitude and shape of the wave we

are looking for. Too little value would

reduce the rounding off of the rise time.

1.4~ Hi

.04Vf"\.../"\fAudio

C U t

to

Figure 1

Try it: add 0.022 mf in parallel with C1

and note the added distortion and reduc-

tion in signal strength to neer triangularwave at one-half the voltage.

Remove this added capacitor and con-

struct Figure 4 on the Proto board, keep-

ing Figure 3 intact. Now jumper point Y

on Figure 3 to "IN" on Figure 4, as per

the dotted line. Because the signal at

point Y is only 1.2V, diodes CA36 and

CA37 cannot conduct, effectively dis-

connecting A6 and C4 and lightening

the load so that point Y does not distort

much beyond the original shape prior

to addition of the jumper. Checking

Figure 2

MICRO- The 6502 Journal

5V"r"lr"1OV-IUUL

July 1979

Page 61: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 61/68

now at pins 2, 3, and 6 should y

signals approximating those shownthe schematic.

Disconnect the jumper from point

"IN" and prepare for the big test. R

ring to your tape recorder instructi

manual, connect a shielded lead fpoint Z or Y to the mike or auxiliary i

and make a five minute recording of

2,000 Hz signal. Rewind the tape

connect the IN terminal of Figure

again with a shielded line, to the mon

or earphone jack on the recorder. Pthe PLAY button and adjust the volu

control to obtain 6 to 8 volts of signa

the IN terminal. With the oscilloscop

connected to pin 6 of the op amp,

should see a fair replica of the squ

wave you first saw at pin 3 of the 4

oscil lator buffer.

Your scope should have a 10 MHz ba

width, to observe fast square waves,

any scope will do for these experiment

and that's why I said a "fair replica"

the signal.

All things considered, the design of

VIM 1 cassette interface is more t

adequate. When I first fired up my V

the only tape I could lay may handsimmediately was a 39 cent, 200 tim

erasure/rewind tape that my daugh

had used to bring home her Fre

language home work. I used this tape

make a Sync tape and record the

few short programs. It still loads ev

digit wi thout dropouts.

2 . 1 '

J1Jl_

C ' 4 O l lR 3

Figure 3

KIM ISYM IAIM ACCESSORIES BY MTU

16K LOW POWER MEMORYDo you want more memory for yourKIM/SYM/AIM but don't have a 5 amppower supply or fan to cool It? Our16K low power dynamic RAM board isdesigned for these processors anddraws a mere 200MA from 8 voltsunregulated and 200MA max (75 MAtypical) from + 16 volts unregulated.Our little K-1000 power supply can infact run 64K of these boards plus aKIM easily.

K·1016A 16K RAM $340.00We now have available a multifunctionsystem board for the KIM/SYM/AIMprocessors. It has a PROM capacityof 12K using the industry standard2708 PROM or 14K using the readilyavailable TI 2716. Also included is a2708/2716 PROM programmer, 4 para-llel ports, and a bidirectional serialport. Low power: + 8 at 350MA, + 16

250MA.

K·1012A PROM/10 $237.00

REAL GRAPHICS FROM OUR VISIBLE MEMORYOver the last year and a half we have delivered hundreds of our VisibleMemory graphic display boards and customers are still finding novel usesfOTthem. The Visible Memory is an 8K byte memory board that is directlycompat ible wi th the KIM/SYM/AIM computers and functions just l ike an 8Kmemory expansion. Its content however is also displayed on a standardvideo monitor as a 320 by 200 dot array with each dot corresponding to a bitin memory. Since each dot is individually controllable, any kind of image,even text (22 lines, 53 characters) with subscripts/superscripts is possible.Our assembly language graphicsltext software package makes programmingthe Visible Memory easy. Microsoft 9-digit BASIC users now have access

to the graphics and text routines through our just released BASIC PatchesPackage. In fact, the images above were created entirely with SIMPLEBASIC programs.

K·1008A VISIBLE MEMORY $240.00OTHER ITEMS

KIM Power supply $35.00 AIM Power supply $80.00Enclosed card file for 4 boards KIM $75 SYM $80 AIM $958-bit audio system DAC-Filter-Amp. KIM/SYM/AIM $40 PET$50PET to MTU style KIM/SYM/AIM bus adaptor $79Prototyping board, f its in card f ile, 2 regulators $42We have sophisticated music and graphics software too!

PLEASE REQUEST OUR NEW, EXPANDED SPRING 1979 CATALOG

MICRO TECHNOLOGY UNLIMITED,841 Galaxy Way, Box 4596, Manchester, NH 03103 (603)627-1464

Page 62: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 62/68

DISK DRIVE WOES? PRINTER INTERACTION?

MEMORY LOSS? ERRATIC OPERATION?

DON'T BLAME THE SOFTWARE!

u-~l

~-' .J:

~'I:O28

ISO-1

Power Line Spikes,Surges& Hashcould be the culprit!Floppies, printers, memory & processor often interact!

Our unique ISOLATORS eliminate equipment interaction

ANO curb damagingPower Line Spikes,Surgesand Hash.

*ISOLATOR OSO-1AI 3 filter isolated 3-prong sockets;

integral Surge/Spike Suppression; 1875 WMaximum load,

1 KW load any socket '" _ . __ .... _• " $49.95

*ISOLATOR IISO-21 2 filter isolated 3-pronj;Jsocket banks;

(6 sockets total]: integral Spike/Surge Suppression;

1875 WMax load, 1 KWeither bank. . . . . .. $49.95

-ISOLATOR OSO-ICB/-2CBI15 A Circuit Brkr $57.95

-ISOLATOR (lSO-ICBS/-2CBSI Brkr-switch/lite $62.95

*SUPPRESSOR/FILTER (SFK-331 three 3-prong sockets,

1250 Watt Maximum load " $32.50

-SUPPRESSOR/FIL TER (SFK-311 3-prong socket;

KW . . . . . . . . . . • . . . . . . . . • .. $24.50

•PHONEORDERS 1-617-655-1532

Dept.mi ..-i£7Electronic Specialists, Inc.171SouthMainStreet.Natick,Mass. 01760

....__ " _". __ n..

M O R E IN N O V A T IO N S !F R O M

P.S. SOFTWARE HOUSEFORMERLYPETSHACK

PEr INTERFACESNE""

PET 10 CENTRONICS INTERFACEPET to PARALLEL INTERFACE with 5V .SA power supplyPET to 2nd CASSETTE INTERFACE

59&00574.95$49.95

PETTt.ISCHEMATICSFOR ONLY 524.95 YOU GET;

24" X 30" schemat ic of t he CPU board. plus oversi zed schematics of the VideoMonitor and Tape Recorder. plus complete Parts layout ~ all accurately and

painstakingly drawn to the minutest detail.

PETTt.IROM ROUTINESFOR ONLY $19.95 YOU GET:

Complete D isassembly l is ti ngs of al l 7 ROMS, p lus Ident if ied subrout ine ent ry

points: V ideo Monitor. Keyboard routine, Tape Record and Ptayback routine, RealT ime Ctock, etc. To en ti ce you we a re a lso induding Ou r own Machine languageMonijor program tor your PET using the keyboard and v ideo d isplay .You can have the Monitor program Oncassene for only $9.95 extra .

SOFTWARE:6502 DISASSEMBLER $12.95MAILING UST - For personal or business applications. $g.95

MACHINE LANGUAGE MONITOR -Write Machine Code. Save on tape $9.95

BUDGET - NEW - Keep-track of Billsand Checks. Update asneeded $ 4.95

STARTREK All-time favorite ......i tten for the PET'sspecial Greptucs $7.95

Send for our free SOFTWARE BROCHURE. Dealer inquiries we/come.

P.S. SOFTWARE HOUSE

P.O.Box 966 Mishawaka, IN46544

II Tel: (219) 255-3408 C IC.................. H•U ..:::~:.-=:.;:::=.:':::-.:;:...... I_ ••••••••••••uu....

KIM •One magazine publishesmore information about6502 based systems,products and programsthan all of the otherscombined:

• AP PLE

• P E TYM •

AIM •

~~~~(~J'P.o. Box 6502

Chelmsford, MA 01824

Are you tired of searching throughcomputer magazines to find articles thatrelate to your 6502 system? MICROmagazine is devoted exclusively to 6502systems. Each month, MICROpublishesapplication notes, hardwareandsoftwaretutorials, interfacing information and

program descriptions with completesource listings. MICROis not just fun andgames. It is the complete referencesource for all 6502enthusiasts.

You can order twelve issues of MICRO tor $15.00, or for $18.00

outside the United States. Air mail subacrtptions cost $27.00 in

Central America, $33.00 in Europe and South America, and

$39.00 I~ all other countries .

MICRO has been published regularly Since October, 1977.

Articles that appeared in the earlier issues of MICRO may be

obtained in two bound anthologies, BEST OF MICRO Volume 1

and the companion collection ALL OF MICRO VOlume 2, both

available at computer stores or from the magazine.

eA EWAM A SSOC IA TE S

.124000 Bessemer Street

Woodland Hills, Ca.91367

• Tarbell Quality

SHORTYC-10 CASSETTES

• "SCOTCH" brand high out-

put/low noise "POSI-TRAK"

back treated tape

• Spring loaded pressure pad

• 5 screw take-apart shell

• Exclusive e,. label

• OSI

Stock No. EAC-10 $13.50/10

CASSETTE LABELS

5626-6 Blank5626·8 BlankCLB·R Blank5626-B BlankEA·EBEA PrintedCLP-R Printed

MAILING LABELS4815-1 2V-x15/16 Fanfold 54.40/10005615·1 3'1,.15/16 Fanfold 4.40/1000

$26.00/20

Fanfold 6Lines/Inch 55.90/100Fanfold 8Lines/tnch 5.90/100Sheet IS/Sheet 6.20/ 90Pack 4.00/100Pack EALabel 5.50/1DOSheet 15/Sheet 7.50/ 90

VOLUME AND DEALER DISCOUNTS AVAILABLE

STOCK NO. QUANTITY PRICE TOTAL

Name Cal.Tax 6% I--------l

Address '------'

City State Zip

Exp. Date Bank No. _

Card No. _

Signature, _

PREPAID ORDERS SHIPPED POSTPAID

~o. 0

Page 63: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 63/68

6502 Bibliography: Part XI

Dr.William R.Dial

438Roslyn Avenue

Akron, OH44320

438. Kilobaud No. 27(Mar., 1979)

Lindsay, LeA "PETpourri", pg. 9·14PETaccessories, Software worth mentioning (renumber,Extended graphics, basic utilities, cassette magazines,

etc) cassette maintenance, programming hints.

McFarland, Dr.Ward J. Jr. "The 'EI Cheapo' EPROMProgrammer", pg. 46-50.

An inexpensive EPROMprogrammer with software for the

6502.

Ruckdeschel, F.R. "The OSI Model 500", pg. 130·132.

The author concludes that OSI's Model 500 comprises acompromise between completeness and cost.

Carptenter, C.R. (Chuck), "Telpar Thermal Printer",

pg. 138-139.

The Apple II is interfaced with a TELPAR PS·40printer;

with software.

439. PETUser Notes 1 Iss 6 (Sept./Oct_,1978)

Butterfield, Jim "FOR·NEXTand GOSUB·RETURNStructures", pg. 2.

Clarification of these important commands for PET.

Paul, Grant "Head Alignment for the PEr', pg. 2.Instructions for a simple method of aligning the PET

cassette recorder head.

Butterfield, Jim "Disabling the PETStop Key", pg. 6.

Provides PETwith a non-stop feature.

Wilcox, David H_"Index", pg. 7.

A program for PETto find a given program on tape.

Butterfield, Jim "View"

A program for placing an image of one given page ofmemory onto the screen of PET

Louder, Mike "Dynamic Keyboard Rvisited", pg. 11.

A technique for adding GOTO and GOSUB expressionswhile a program is running on the PET.

Buttefield, Jim "Cassette File Usage Summary", pg. 14.

Opening files, writing tapes with increased spacing,Closing files, etc.

Group, PETUser "Machine Language from Basic", pg. 14.

Anon. "Non-Zero PIVOTELEMENTSSTRATEGY",back cover.

The program finds the inverse of the left hand coeff.matrix and solves for the roots of the linear equationsystem.

440. Rainbow 1 Iss 1 (Jan., 1979)

Anon. "Basic Music and Sound Effects", pg. 16·17.

Music for the Apple II incorporating Gary Shannon'sroutines.

441. Southeastern Software Issue 6 (Feb., 1979)

Staff, "Apple Diskettes", pg. 2.

Note on the use of the reverse side of diskettes to providetwice the storage space.

Staff, "Tape Save", pg. 2.

How to l,Jsea program TAPE SAVE with the Guil BanksEXECGEN program from Issue 5. Provides Tape backupfor your DISKS.

Staff, "Abbreviated Commands for the Apple DOS", p

Change "Catalog" to "C", etc.

Staff, "How to Edit Print Commands Without IntroduSpaces", pg. 5-6.

A great editing aid.

Staff, "All about Call·868and Call·958", pg. 6.

Explanation and examples.

442. Call· Apple 2 No.1 (Jan., 1979)

Aldrich, Ron "Disk to Disk Transfer", pg. 3.

Integer Basic program for Apple to transfer programs

to disk.

Wigginton, R. "Applesoft Chain", pg. 3-6.

A method whereby user programs in Applesoft can c

between programs and retain all variable values.

Finn, Jeffrey K. "Apple Sharing", pg. 8-10.Standard format options for electronic data transfer,

to modify default settings on the Apple CommunicatInterface Card, etc.

Golding, Val "High Crimes and How to Commit Them"

pg.12.

How to set HIMEM; within a program; How to cr

illegal line numbers such as 65535 in Integer Basic.to execute other illegal commands from within a prog

such as LOAD, Save, Run, DEL, NEW, etc.

Thyng, Michael "Apple Wash", pg. 12.

How to use the Apple II disk ... variables, records and

Schwartz, Marc "Avoiding End of Disk Error", pg. 18.Involves use of ONERRGOTOcommand.

Aldrich, Ron "Disk to Tape transfer Program", pg. 19-2An integer basic program.

Aldrich, Ron "Split Catalog", pg. 20-21.Use this program for your init program and your cat

will l ist out in two columns on booting disk.

Staff, "Tone Routine", pg. 22.

Routine demonstrates tones by setting variables Pato A for next loop. Also demonstrates use of &.

443.Applecore Newsletter 1 No 5, (Aug., 1978)

Hertzfeld, Andy "Disk II review", pg. 1.Transfers data at a rate of 156K bits per second, a100 times as fast as the cassette interface.

Avelar, Ed "Apple II Multi-Cassette Dumper", pg. 3.An easy project to save programs from Apple to si

more cassette recorders simultaneously.

Staff, "Apple Beeps Translated", pg. 4.How to use the Tape beeps to tell how long a program

Wyman, Paul "Integer Basic Subroutine for Multiplying

Whole Numbers Time a Fraction", pg. 5.How to use a fraction with Integer basic, on the App

Doty, Jim "String Arrays in Integer Basic", pg. 6.A simple way to get around the lack of String a

capability in Integer Basic in the Apple. Pack

characters into one integer value.

July 1979 MICRO- The 6502Journal 1

Page 64: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 64/68

Wyman, Paul "Tale of a Klutzy Tape-Recorder Nurd", pg. 6.How to recover parts of a program on a damaged tape.

Rainbow 1 No 2 (Feb., 1979)Simpson, Rick "Introduction to Using HIRES Graphics inInteger Basic", pg. 5-11.

Welcome assistance in understanding HIRESGraphics.

Ellmers, Judd B. "Aligning the READIWRITEHeads on the

Panasonic RQ-309DSCassette Recorder", pg. 12-13.How-to instructions using simple tools.

Staff, "Using the Apple II Mini-Assembler", pg. 19-21.

The Miniassembler is essentially a programming aid inconverting a handwritten program to object code.

445. Applecore Newsletter 1 No 8 (Nov., 1978)Hertzfeld, Andy "DOS-The NameGame", pg. 4.How to use your own names for DOScommands; output

and input "hooks" for the DOS;the advantages of typing

9DB9G from monitor to re-initialize the DOS-said to besafer than the 3DOGtechnique.

Kamins, Scot "MENU", pg. 5.

An effectual program to allow program choice by number

from a disk catalog on the Apple II.

Wells, Arthur "No More 'Catalog' ", pg. 5.

How to make the catalog come up automatically onbooting DOS.

Hughes, Tony "Applecore Disk of the Month", pg. 3.

The catalog of the first disk looks very impressive.

Hertzfeld, Tony "Volume MISMATCHmatched", pg. 10.

A patch to disable the volume check on the Apple Disk.

Danielson, Larry "Pioneer Hardware Mod", pg. 12.

A modification for those who bought Apples before thecolor killer modification was put in.

446_Call Apple 2 No 2 (Feb., 1979)Thyng, Mike "Volume Mismatch", pg. 6.

How to avoid volume mismatch on the Apple DOS.

Aldrich, Darrell "Programming Algorythm", pg. 6.

This is a program for linking routines in the COUTor theKEYIN EXITwhen disk is in use on an Apple.

Golding. Val J. "Debugging as a Learning Aid", pg. 10.

Debugging with examples ...6502 registers, TRACE,Control Dbefore DOScommands, DSP,etc.

Aldrich, Ron "Disk-Disk Transfer Program", pg. 12.

This program will transfer Integer, Applesoft or Binarylistings.

Golding, Val J. "Integer Basic Entry Points", pg. 14.

A program for Integer basic Command Entry Pointsformatted for Printer or screen.

Golding, Val and Huelsdonk, Bob "Applesoft ProgramTokens", pg. 18.

A routine is given to display Applesoft program Tokens.

Golding, Val J. "Convert Catalog to 'C' ", pg. 18.

A routine is given to automatically change DOS com-mands on the Apple.

Thyng, Mike "Apple Mash", pg. 19.

Discussion of Volume mismatch error, the problem about

the Apple DOSnot reading or writing to disk if line numberis over 255,etc.

Anon, "Apple Source", pg. 20.

DOSVersion 3.2can beexpected to beavailable in March

together with a new DOS manual! An UPDATE programwill be made available to modify older disks. Pascal ondisk and a RAM card will give the Apple 60K of Ramavail-able.

Aldrich, Darrell "Disk Free Space", pg. 20.

A routine to print no of sectors and bytes free on yourApple disk.

14:62

447.6502 User Notes No 13(Jan., 1979)Leedom, Robert C. "Kim Hexpawn", pg. 1-5.

Can be played on a 1 K KIM-1.

Butterfield, Jim "6502 OPCODES", pg. 6.

The author has grouped the codes logically so you can

see how the codes are classified and decoded.

Tepperman, Dr. Barry 'Tape Verify (II)", pg. 7.

Program is located in Kims page two rather than in the

VEBas in the case of the earlier version of Verify.

Swank, Joel "Tape File Recovery Routine", pg. 8-9.

How to recover a tape with a dropout. Program for KIM.

Staff, "Language Lab: FOCAL", pg. 10.

Focal for the KIM

Staff, Micro-Z Co "KIM Basic Hint", pg. 11.Fixes and Modifications for KIM Basic.

Herman, Harvey "Basic Renumber Program", pg. 12.

For those who use Microsoft Basic on KIM.

Day, Michael E."Two Tiny Basic Mods", pg. 13.Bugsand Fixes for Tiny Basic.

Rehnke, Eric "Forth", pg. 14.

All about Forth manuals, different types of Forth, etc.

Oliver, John P. "Forth Comments and Example", pg. 14.

Use of Forth on a PETin a telescope pointing program.

Rehnke, Eric C_"A 6522 I/OBoard", pg. 16-17.

Room for four of the versatile 6522PIA's.

Rehnke, Eric "KIM-4 Bus PINOUT", pg. 18.Definition of the 44pin Standard KIMBUS.

Rehnke, Eric "Video Displays", pg. 19.Standalone versus Memory Mapped displays are

discussed.

Rehnke,Eric "Polymorphic Video Board Mods", pg. 20.

Some modifications before adding this board to the KIMsystem.

Leedom, Bob "Random comments about KIM and SYM",pg.22.

Addition of an outboard risistor and AID assists KIM in

games such as ASTEROID.Some Mods are necessary in

using KIM programs on the SYM.

Butterfield, Jim "Multi-Mode Adder", pg. 23.

This program adds and subtracts in either decimal or hex.

Zuber, Jim "ASCII Dump Program", pg. 24.This program will dump ASCII data from memory of KIM

to a printer.

Rubens, Thomas J. "Keyboard Debounce Routine", pg. 25.A fix for noisy KIM keyboards.

Lyon, Douglas "Melodies for the Music Box", pg. 25.Six new tunes for this popular music program.

Firth, Mike "Camera SpeedTester", pg. 26.With aminimum of hardware and software timing KIM can

time the shutter.

Hawkins, Geo.W. "Power-On Reset", pg. 27.

Very simple hardware for this task.

Rehnke, Eric "The Outside World Connection", pg. 27.Useof OPTO-Isolators in interfaces to the outside world(KIM).

Egbert, Dwight D. "More on the OPTO-Isolator", pg. 27.KIM-1to RS232using opto-isolators.

448_Dr Dobb's Journal 3 Iss 3 No 33 (March 1979)Swank, HJoel "PIA's for KIM", pg. 41-42.

Connect a Motorola 6820PIA to your KIM.

MICRO- The 6502 Journal July 1979

Page 65: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 65/68

Page 66: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 66/68

APPLE SPECIAL INTEREST GROUP" you have a spe cia l in te re st in us ing the Apple se nd us your

N am e , A ddre ss, P ho ne N o. a nd wh at yo ur s pe cia l in te re st is , W ewill p ut y ou o n o ur sp ecia l in te re st m ailin g list. E ach tim e th e listg ain s e no ug h n ew m em be rs fo r y ou r s pe cia l in te re st, w e w ill s en d aco py to e ve ry on e o n th e list. T his wa y yo u will b e in co nta ct witho th ers th at h ave th e s am e A pp le in te re st a s y ou rs elf,Your spe cia l in te re st could b e dre ss pa tte rn m aking , RT TY

a pp lica tio n, N C (n um e rica l co ntro l) o r a ny th in g e ls e th at y ou m a yw an t to h ea r a bo ut fro m o th ers ,

~.

\ *5'b is'

-

-L is t P r ice

16K $1195 .00

3 2K $1345. 00

48K $1495 .00

M o du la to r t o c on ne ct t o coor r.v, .

Sa le P r ice

· $ 10 9 5. 00

· $11 9 5. 00

· $12 9 5. 00

" $ 29 .95

SUPERCHIP

• F ull A SC II c ha ra cte r s et (lo we r ca se )

• 3 1 o th e r, u se fu l n on -A SC II c ha ra ct er s

• U se r-d efin ed c ha ra cte rs w ith o ur C ha ra cte r E dit

Cassette

• E nh an ce d e ditin g c ap ab ilitie s fo r p ro gra m a ndda ta mod i fi ca t ion

An d, it w orks with y ou r e ~is tin g AP PLE

p ro gra m s- In te g er B AS IC a nd A pp le so ft.

$94.95

~

l~~~.J\:.pI&~~ ~---'-

l is t . .. ·$225.00

14052 EAST FI RESTONE BOULEVARD

SANTA FE SPRINGS, CALIFORNIA 90670

(213) 921-2111 (714) 739-0711

BUSINESS

EDUCATIONAL

PERSONAL

.u ••••• 1••••••••

'" •• ~..I·I) •__

$49 .95

D.c·~_~!, . .~""",Inc .

. . . .C:.AO~_~~~!'-

$359.00

Apple II E P R O MExpand Your ROM SoftwareA«l~ilf1,lOfOI.O"l)8I...,manoIO OJ/i4!ICforboAi_"o!"" lPPIi,*;o.., A c I d " " " " ' _I~~", , __ jng 1 t 'S I . . . . . N_ _"',"U .,._" 1 )1 00 11 1U o ~OM .. .. ., .. ,. , w nl o vr ~ PROM

E:~~~":~::,:,:o=:'~~~,~~:e~I;\:';;~=: : : . . . ! ' :POd0 l I .K t ..... ' fI O . . .P P I . . . . E II ROM.o IIw _I" oot rl !"U .~,_ O! )IIIU _ n ' " " " '"01..".. 1Ot1_.,.,r_ .imI... I I> P .o l5 C. Al , F OA l L IS P. A I I. " CATRAN , COI l Oi ., A lo o. ..OU·. ,a...S IC lI llC. .. ., .tM_. . . . ' .. lo ,o ..A<l JlU:hFI , )M __

TheE~P tour am ,. _IDl ll tI .a I! i_" *" ""OI . . -..IIIr_CI~tM_''V.-.d ..P tCC _" ! II1a )"o" I .rO"I r_r ra JIO"FFFIQI f. toII IO32~OfH n . .__ . . _heEPIIOMI . .. . bI. cI n D PU . . . , . _ . _ i o r I . D t ' * ",*",...1.1"1\.1: I i,e 11oe ,CRQIIIIODUCTlS" . . .. . .oim Me~~it I 10\ .0 ' A?PLe I ,11 10 ~ _y lu I l0 l' '_ ' _ _ . .. .11 '1*_

• " "Uy . .. . _bec• Comp""..~ M I~I • •_

· l : · ~ . . , _ , ' o n l D r c e . . , . , . _·00"I~d2S"""..,_tupplf

·~8I_PlMed"rou gIl 'IOI""""boI <OIUI i >Ct I <l I onl

'GoODIIMd~COI or• FU1_ae«

·UlMoII~Sc""tnyIC'.'501""''' -

"IWANTAGE!

' : : :"p~,: :" ," in_"" ,p lY~MJk>I ' ' ' '• :" ;;_. .. .. .." , . .. ft~ ~in V . ..PPL I: I IROM

• . r. m " "' O"_!IQ • . ,. ._ . . I e . . .~ t. .E I I

·~~I-:~:~~~~=jlO'~.nIE~S

'Pul~"""""dr",-,,,'per'_"""_ f

• ; :;::;:'E II to P"IO••m EPRQMIar IIIItIe"

$94.95

L is t . .. $200.00

"AtliAU.HPIIIN 1Hl1N![AfACf CAQO

AnpIe ""''''''''' So.bsysIem

L is t . .. $180.00

NAME

STATE

ADDRESS

ZIP PHONE

DESCRIPTION AMOUNT

Expiration Date _

Card# _

Signature TOTAL AMOUNT ENCLOSED

QUANTITYRICE

L:'Bo'",Card •o Subtotal 1- _

Calif. Residents 6% tax 1- _

Shipping 1- _

Page 67: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 67/68

1 - - - - - - - - - - - - - - - - - - - - .ame _

Address __

City State Zlp _

Do you own a computer? What type? _

Do you use your computer for: Business? _

Personal? Education? Other? _

- - - - - - - - - - - - - - -

Page 68: Micro 6502 Journal July 1979

8/3/2019 Micro 6502 Journal July 1979

http://slidepdf.com/reader/full/micro-6502-journal-july-1979 68/68

AIM 65 BY ROCKWElL INTERNATIONAL

AI'M 65 is fully assembled, tested and warranted. With theaddition of a low cost, readily avallanle power supply, it'sready to start working for you. .AIM 65 features on-board thermal printer and

alphanumeric display, and a terminal-style keyboard. Ithas an addressing capability up to 65K bytes. and comes

with a user-dedicated 1K or 4K RAM. Two installed 4KROMS hold a powerful Advanced Interface Monitorprogram, and three spare sockets are included to expandon-board ROM or PROM up to 20K bytes.An Application Connector provides for attaching a TIV

and one or two audio cassette recorders, and gives exter-nal access to the user-dedicated general purpose 1I0.lines ..Also included as standard are a comprehensive AIM 65

User's Manual, a handy pocket reference card, an R6500Hardware Manual, an R6500 Programming Manual and anAIM 65 schematic.AIM 65 is packaged on two compact modules. The

circuit module is 12 inches wide and 10 inches long, thekeyboard module is 12. i nches wide and 4 inches long_They are connected by a detachable cable.

THERMAL PRINTER

Most desired feature on low-cost microcomputer systems ...• Wide 20-column printout• Versatile 5 x 7 dot matrix format• Complete 64-character ASCII: alphanumeric format• Fast 120 lines per minute• Oulte thermal operation• Proven reliabili ty

FULL·SIZE ALPHANUMERIC KEYBOARDProvides compatibility with system terminals ...• Standard 54 key, terminal-style layout• 26 alphabetic characters• 10 numeric characters• 22 special characters• 9 control functions• 3 user-def ined functions

PROVEN R.6500MICROCOMPUTER SYSTEM DEVICESReliable, high performance NMOS technology _..• R6502 Central Processing Unit (CPU), operating at 1MHz. Has 65K address capability, 13 addresslnq modesand true index capability. Simple but powerful 56instructions.

• Read/Write Memory, using R21.14Static RAM devices.Available in 1K byte and 4K 'byte versions.

• 8K Monitor Program Memory, USing R2332 Static ROMdevices. Has sockets to accept additional 2332 ROM or2532 PROM devices, to expand on-board Program

memory up to 2.oK bytes.• R6532 RAM-Input/Output-Timer (RIOn combinationdevice. Mult ipurpose circuit for AIM 65 Monitor functions,

• Two R6522 Versatile Interface Adapter (VIA) devices,which support AIM 65 and user functions. Each VIA hastwo parallel and one serial B·bit, bidirectional 110ports,two 2-bit peripheral handshake control lines and twofully-proqramrnable 16·bit interval timer/event counters.

BUILl-IN EXPANSION CAPABILITY• 44·Pin Application Connector for peripheral add-ens• 44·Pln Expansion Connector has full system bus• Both connectors are KIM·1 compatible

TTY AND AUDIO CASSETTE INTERFACESStandard interface to low-cost peripherals.• 20 mao current loop TTY interface

• Interface for two audio cassette recorders• Two audio cassette formats: ASCII KIM-1 compatibleand binary, blocked fi le assembler compatible

ROM RESIDENT ADVANCED INTERACTIVE MONITORAdvanced features found only on larger systems ...• Monitor-generated prompts• Single keystroke commands• Address independent data entry• Debug aids• Error messages• Option and user interface linkage

ADVANCED INTERACTIVE MONITOR COMMANDS• Major Func·ion Entry• Instruction Entry and Disassembly• Display/Alter Registers and Memory• Manipulate Breakpoints

• Control Instruction/Trace• Control Peripheral Devices• Call User-Defined Functions• Comprehensive Text Editor

LOW COST PLUG·IN ROM OPTIONS• 4K Assembler-symbolic, two-pass• 8K BASIC Interpreter

POWER SUPPLY SPECIFICATIONS• + 5 VDC ± 5% regulated @ 2.0 amps (max)• + 24 VDC ± 15% unregulated @ 2.5 amps (peak)0.5 amps average

PRICE: $375.00 (1K RAM)