micro 6502 journal december 1979
TRANSCRIPT
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 1/84
•OS I
Pei
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 2/84
~•••••••••••••••••••••••••••••••••••••• *t N O W P R E S E N T IN G .. · ..
: Apple®software ~t for your Entertainment" Business" Education :~ *••••••••••••••••••••••••••••••••••••••
FIL EM A ST ER 2 pro gram s: FORMAT & RETRIEVAL compr i se
a po werfu l da ta file m an aq er, G reat fo r ev ery th ing fro m p ho ne lis ts
to legal abs tracts . N eeds 32K . D esign you r ow n data s tru cture. U p
to 500 cha racters per reco rd , U p to 15 searchab le fields in any com -
bination . O n D isk . . . . . . . . . . . . . . . . . . . . . . . . . $34 ,95
S PA C E MU lti,fa ce ted s im ulatio n o f life in in te rs tellar s oc iety . Y ou
and opponen ts m ust m ake life & d eath d ec isio ns. I(e ep s trac k o f
your progress from one gam e to nex t. N eeds 48K and A pp leso ft
ROM . D isk , , ..................• $29 .95
Pot O 'G oid I or our A ll N ew Po t 0 ' G o ld II A collection o f 49 p ro -g ram s for 16K A pple. Everyth ing from Logic to ac tion gam es. O nly
a buck a gam e. Specify I o r II . P rice each: T ape $49 .... D isk $54
A DV EN TL I R E F ig ht off p irates an d vic io us d warfs. 7 00 travel o p-
tion s, 14 0 lo ca tio ns , 6 4 ob jec ts . N eeds R OM & 48K . D isk .. $29 .95
1 6K C ASS ET TE IN VE NT OR Y U se item nu mber, desc rip tio n,
stock am oun t, reo rd er am ou nt, res tock d ate , cost & s ell p ric e. H o ld s
up t o 140 item s. Tape ..• ............•.•• , .•.. $35
32 K D ISK IN VE NT OR Y: U se s tock nu mb ers d escrip tion , v en do r,
reco rd o f purchase and sales da te , am ount on hand , cos t & s e ll p r ic e ,
to tal v alue. H o ld s up to 300 item s. D isk $40
W ith Parts E xp lo sion : D isk , .....•. , . . , $ 50
3 2K D A TA B A SE C ro ss fille f or p ho ne lis ts, b ib lio grap hie s, re cip es .
Run up to 9 lines o f 40 co llum ns each . S ea rch by item anyw here .D isk ..........•................•....... $ 20
2 4K H I·R ES LIFE SIM UL ATIO N C onw ay 's equations on 296x180
screen . A m ath em atical sim ulation to dem o p op ulation gro wth w ith
b irth , d ea th and su rv iv al as, facto rs . T ape $10
16K C IR CU IT LO GIC D EV ELO PM EN T A ID E valua te circu its o f
up to 255 ga tes, inc luding AN D, OR , NO R, N AN D, XO R, X NOR
and INVERTER . T ape ..•....• ...............• $10
16K M ORSE CODE TRA INER Learn M orse C ode, and transm it o r
receive over radio . T ape . , , ...• , $10
16K D EV IL 'S D UN GE ON : A dventu re th rough da rk passages w here
m onsters, d em ons , po ison ou s gas, d ro po ffs threaten ... a ll to d isco -
ver fanta stic treasures . C om es w ith in struc tion book . T ape ... $10
16 K P AC IFIC A: D iscov er th e flo ating is land an d rescue the beau ti-fu l p rin cess . T o w in you m ust recover th e enchanted crow n, bu t you
face the th reat o f m ag ic spells and dem ons. Tape $9,95
Don't see what you've been looking for, here?Then write for our IFREESOFTWARE CATALOG.We're savingone just for you!
To o rder, add $2 sh ipp ing . C alifo rn ia residents add 6%
sales tax . So rry , w e can not sh ip to P .O . B oxes . V ISA /
M ASTERCHARGE and BANKAM ERICARD W elcom ed!
R A IN BOW 'S C A SIN O 9 g am blin g g am es: R ou lette, B la ck jac k,
C rap s, H orserace, an d a few orig inals that V eg as hasn 't h ea rd ab ou t.
N eeds 16K . T ape $29.95
16K SPA CE W AR: Y ou in you r space capsule battle again st th e
com puter's saucer in h i-res g raphics . T ape $12
16K M EM OR Y V ER IFY D iagnostic rou tin e to check range of m em o
o ry . In dicates faulty ad dresses , d ata in m em ory cell, and faulty d ata .
T ape , • .• ..... , $5
1 6K A PP LE O DIO N M u sic s yn th es is co mp ose s o rig in al Irish jig s.E nter you r own m usic and save on tape o r d isk . Inc ludes 3 B ach
fugues . T ape ..•................. , $10
1 6K A PP LE VIS IO N D em o for H i-R es graph ic s an d m usic .
T ape $10
32K C OM PU ·R EA D 5 prog ram s to teach you speed reading , in
stag es. In clu de s s yn on ym an d an to ny m id en tifica tio n. Y ou co ntro l
you r ra te of speed , o r keep up w ith the com pu ter's p ace.
D isk . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . . $ 24 .95
48K PE RC EPT IO N I, II, III random shapes and sizes m ust be
m atched . In III , you contro l fo rm at and disp lay tim e and get
w eighted sco res . N eeds ROM . E ach D isk $24 .95
32K ST OR Y T EL LER U se your bizarre im agina tion and input key
w ords for fan tas tic and fu nn y tales. N ev er the sam e sto ry tw ice .
T ape , . . . . • . . . . . . . . . . . . . . $12 .95
32K W AR/RE SCU E Engage in 10 battles w ith you r infan try again st
th e A pp le rob ots. C alcu late A pple 's strateg y and w in m ore ba ttles
th an the com pu ter . T ape. . . . . . . . . . . . . . . . . . . . . $ 12 .95
24K PO L AR PLO T Plo t po lar equa tions in H i·Res G raph ics .
T ape ................•................. $10
32K SH APE SC ALE R U tility to genera te and anim ate H i- Res
g raph ic shapes. S im ple rou tin e pro vided to in sp ec t po sitio n o f
sh ap es , and sp ec ify precise X /Y co ordinates and sca le . N eeds R OM .
D isk .......• .....•... , , . . . . . . . . . . . . . . $ 13 .95
32K ZIN T A R/PR OPH ET G rea t pa rty gam e. U nder con tro l of the
m igh t-{ Z in tar's ed ic t you take a very spec ial trip to th e w orld o f
K rin tar. H eightened visua l graphics. N eed s R OM .D isk .... $16 .95
A PPLE M ON ITOR PEELED Everyth ing you w anted to know abou tth e A pp le M onitor bu t cou ld n't f igu re o ut. U ser-w ritten m an ua l in
plain E nglish clears your confusion . O n ly , $9 ,95
G arden P laza Shopp ing C en ter , D ept. 11 A
9719 R eseda B lvd ., N orth ridge , C a 91324
Telephone: (213 ) 349 -5560
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 3/84
)
H IG H RESO LU T IO N GRAPH IC SLOOK TO MTU. WE SUPPORT HIGH RESOLUTION GRAPHICS ON:
PET - AIM - KIM - SYM
Micro Techno logy U n lim i tedp.o. Box 4596, 841 Galaxy WayManchester, N.H. 03108603-627-1464
Call Or Write For Our Full Line Catalog
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 4/84
B r l i n g i n g M u s i c H o m e. ,l-
'i~{r-'r' l j
• Sing along
• Compose
• Play• Learn from Specialists
Being a spectator is great
... but why not participate?
LET M ,CRO MUSIC TURN
VISIT THE APPLE DEtER NEAREST YOU AND ASK FOR ADEMONSTRAJlON OF MrS MICRO COMPOSER™The MICRO COMPOSE LETSYOU-• Play up to 4 simult neous voices• See all 4 voices at th same time you're hearing the music-amust for music editin~!
• Enter music notes bV a fast, simple and well·tested codingsystem. ,
• Program the pitch,rhythm, and timbre of the music. Tempo isvaried by the Apple !paddle.
• Choose 7 different lone colors for each voice or create yourown tone color.
• Compose, edit, diSP~y, and play music through an interactive,
commend-driven Ian uage that's easy to learn.• Save your music on isk or cassette. TM
• Hear quality music so nd at lowcost through the MICROMUSICDAC card. No amprfier needed! Designed for MMI by HalChamberlin and Micro Technology Unlimited.
• Select from future MMImusic instruction software to accompanythe MICRO MUSIC QAC.
Ask your local dealer for information on MMI products, or contact:
The MICRO COMPOSER is an APPLE II® compat ibile, low-costmusic system designed bythe folks at MMI.Our music software wasdesigned by leading experts in music education. A simple step-by-step instruction manual leads you through entering, displaying,editing, and playing music with up to four voices-soprano, alto,tenor, and bass. You can change the sound of each voice to reed,brass, string, or organ sounds and you can even color your own musicsounds!
THE MICRO COMPOSER comes complete with an instruction manual,software disk or casse tte -in e ither Integer or Applesaf t ROM BASIC, and the MICROMUSIC DAC music card. Just plug the MICRO MUSIC DAC intothe APPLEextension slotond conned the·audio cable to a speaker.
Suggested retail price $220.
Micro Music Inc 309 Beaufort, University Plaza, Normal, IL 61761APPLE II 15 a trademark of Apple Computer Inc.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 5/84
\j
)
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 6/84
what's Nfrom
I~~&R A C E R
Slip behind the wheel, ignite theengine and get ready for II high speedrace. RACERuses Hires and paddlesto simulate Grand Prix excitement.Requires 24K.
C R A Z Y 8,'sCrazy 8's is a card garne using BillDepew's HIRES playing I cards. One
player can play the ApPLE. Thebeginner can select the option of see·ing the APPLE's hand wtlile playing.
Crazy 8's is an easy to learn cardgame. Great for all ages. Requires24K.
p ~ } 0 ~ r ~ 9 n ~ ~ O O ! ' ! 1 d~ a~ai2tthat of the Apple with thlis computerimplemented version of ;the popular
board game BaCkgam~n. All themoves are displayed 0 the videoscreen along with the ard layoutand pieces. ,
This program requires at~least 16K ofmemory to run from cass tte and 32Kof memory to be stored and played
from an Apple II Disk Sy tem. No ad-ditional handware is nee ed.
Learn, practice, and en ance yourBackgammon ability ate competi-tor. (To our knowledge,' the Appledoesn't cheat!!!)
S O L IT A IR E P O K E RThe ultimate poker machine! SOLI-TARE POKER sirnulatea the poker
machines that line thetLas Vegasstrip. Practice your poke ability withHires playing cards. SOLITAREPOKER is a sure winne! Requires24K.
' I · · · · · · · · · · · · · · · · · · · · · ·.· · . . · · · · · · · i '
1 1 1 . . . . . . . . . . . .
Two More By Steve Baker
: G O M O K UThe ancient game of five men in a row. You play against a machinelanguage routine with thr,e levels of excellence. A Hires board usingSCREEN MACHINE gives this game the beauty and style of chess.Requires 16K.
F I H T E R P I L O TIt's war, and your mother hip is under attack. The adrenelin flows asyou accelerate through e launch tube and penetrate the void ofspace. With all systems perating, your sensors show the directionof the enemy racing to m et you. After a few bursts he explodes, andyou fly through his debrl to meet the next one.
FIGHTER PILOT is a fast moving game of excitement and skill. Thisgraphics program, writte in integer basic, requires 16K of memory.
R O U L E T T ERoulette is a realistic duplication ofthe popular casino favorite usingHIRES graphics and a spinningwheel. Bets can be placed with thekeyboard or you can use SOFTAPE'sBRIGHT Pen. One or two players canbet against the house. Requires 24K.
C R A P SPlay Las Vegas Craps on a high
resolution playing table created byyour APPLE. Plqce bets, play thefield, passline and hardway rolls ...all are possible with this detailedsimulation. Dice rolls are animatedon the screen. Improve your game ordevise your own "system". Craps re-quires INTEGER BASIC and 24K ormemory. BONUS!! Included on t~6back side of the tape is Bright PenCraps for those lucky guys with theSOFTAPE Bright Pen. You will beamazed how easily moves are madeand how fast the game progresses!!
P R O G O L FNow, even on rainy days, you can improve your game with PROGOLF. With the Apple II as your caddy, you choose your own clubsand irons on each shot on this full 18-hole course. Every fairwayhas its own challenging sandtraps and water hazards, but distrac-
tions disappear when the screen displays only the green as youbegin to putt. Your Apple-caddy keeps track of your score. Havefun, and remember ... keep you eye on the bali !
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 7/84
Data Statement Generator
If you have ever had trouble getting those pesky DATAstatements at the end of your BASIC program correct,then you will appreciate this program which "writes" itsown DATA statements! Written for APPLESOFT, itshould be adaptable to other BASICs.
)
I had just finished adding several
new data statements to a sewing pro-gram of mine that utilized a number of
data statements, and now I was reading
the information into their respective ar-rays. "BEEP," said the Apple, " •• 'SYN-
TAX ERROR." I found the offending line;
I'd left out one of the elements and Ap-
plesoft would not accept "RED" as avalue for "YARDS." I entered the line
again and this time I typed the wrong
line number and erasedmyprevious line.
There ought to bea waYII decided, to let
the Apple keep track o~these things. I
experimented with input statements,and while these allowed me to update
the arrays, I couldn't save the informa-
tion.
Using the information from Jim But-
terfield's article on "Pet Basic" and the
information in the Appiesott Manual, Ideveloped a program that "writes" its
own data statements. This routineautornatlcally " increments the line
numbers and inputs the data elements
in response to appropriate prompts. It's
all poked into place an~ becomes a per-
manent part of the program.
It is first nscessarv to understandhowROMApplesoft is stored. The basic
program begins at $801 (2049 decimal)
and there are only two bytes between
the end of the program and the start ofthe simple variable table which begins at
LOMEM:. Anytime a Basic line is
entered, altered, or deleted, the value of
LOMEM: is changed and the programmust be rerun to incorporate this new
value. Therefore, LOMEM:must beset at
December, 1979
some value past the endof the programto allow for expansion of the program
without writing on top of the variable
table.
To use this routine it is alsonecessary to recognize the following
locations of a data statement in Ap-
plesoft:
2 bytes-pointer to next line
of Basic (to next pointer)
2 bytes-hex equivalent of
the line number1 byte-"83" -token for
"DATA"N bytes-ASCII equivalents
of the program line1 byte-"OO"-indicates the
end of the line
Then the sequence starts again untilthere are two bytes of "00" in the first
two positions (total of three "00" bytes
in a row.)
The program uses the fact that the
locations $AF.BO (175-176decimal) hold
the value of the location where the next
line number would go; or put another
way, two less than this is where the"pointer to next line" would go. Call this
PSN(for position). Thus the values to bepoked into PSNand PSN+ 1 are the lowand high order bytes of the hex
equivalent of LINE number. Then the
DATAtoken (131in decimal) is placed in
PSN+ 2.Since this program was design-
ed to handle several elements in onedata statement, a series of strings is
next input as one string array. (It could
just as easily havebeend6ne as several
MICRO -- The 6502 Journal
Virginia Lee Brady
0·3 Arthur Ct., Apt. 453Salisbury, MO 21801
19:5
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 8/84
"INPUT A$" 's, but using anarray allowsyou to change a string before it is poked
into memory). This is handled in lines1035-1045. If there are no further
changes, then the individual strings are
concatenated into one long string with
commas separating the individual
substrings. Next this string is poked,one ASCII value at a time, into
PSN+ I+ 2; then the "0" is poked intothe end as the terminator.
Since PSN+ 1+ 3 is the start of thenext line (remember the value of Iwas in-
cremented one extra time in the FOR-
NEXTloop), call this NUMBER,convert itinto hex, and poke it into PSN-2 and
PSN-1.If the program is to becontinued,
PSN is given the value of NUMBER+ 2and the sequence restarted. If this is to
be the last entry, then place "0" into
NUMBER and NUMBER+ 1. All that re-mains is to reset the $AF.BO pointers to
reflect the new value of the end of the
program (NUMBER+ 2). This is done inline 1085.
List the program - the new data
statement is in place at the end of theprogram and can be read into the
necessary string of numeric variables. If
you want to use this program as a
subroutine to an existing data program
,where you already have some data
statements being read in, you could usethe fact that $7B.7Cgives the line from
which data is being read. Then insert a
statement that sets LINE equal toPEEK(123)+ PEEK(124)*256.
If your program uses trailers, then
have a TRAILER$ that is the same as
your trailer line (eg. "0,0,0,0"). To write
over this, set PSN equal toPSN-6-LEN(TRAILER$) and your first
data statement will start that much
earlier and replace this trailer. At the end
of the program, handle this as before
and poke the TRAILER$into place...This
way every time you update your pro-
gram, the original trailer is "erased" and
re-appended after the last data state-
ment.
It is important to remember that the
line numbers you insert this waymust begreater than those of an existing pro-
gram line. If not, they will be placed at
the end of the program, but will not be
recognized as legitimate line numbers.(If you try to erase or list it, Applesoft,not finding it between the next lower and
next greater line numbers will think itdoes not exist.) Also, do not try to
Control-C out of the program once it hasstarted the "poking" portion, since the
pointers would be incorrect at this point
and Applesoft would not know where to
find the end of the program.
Since I developed this routine, I
have used it in another program and in
both cases I haverun into only one prob-
lem. When I've added lines, saved theprogram to tape and later tried to reload
it, I got an error message even though it
still listed and ran alright. This may have
something to do with the header on the
cassette tapewhich I knowcontains the
length of the program; but I've not yet
found out how to alter this. I would ap-
preciate any information a reader couldoffer. This has not, however, been a
problem when a disk is used. Other thanthat, it's worked fine and it sure beats
typing:
3000 DATA RED, SOLID,
1.25,POLYESTER
3005 DATA BLUE/GREEN,STRIPE,1,COnON ...!!
10 REM EXAMPLE OF A ROUTINE THAT AUTOMATICALLY WRITES20 REM ITS OWN DATA STATEMENTS THROUGH THE USE OF INPUT STRINGS
30 REM VIRGINIA LEE BRADY
50 HOME60 LOMEM: 4000
70 LINE = 2000
80 GOTO 100090 REM CALCULATE HI/LOW BYTES100 HI=INT(NUMF.ER/256):LO=(NUMBER/256-HI)*256:RETURN
1000 REM INPUT SUBSTRINGS
1010 PSN=PEEK(175)+PEEK(176)*2561015 INPUT"INPUT THE COLOR" ;F$(l)1016 INPUT"INPUT THE PATTERN" ;F$(2)
1017 INPUT"INPUT THE YARDS IN DECIMAL ";F$(J)1018 INPUT"INPUT THE FABRIC TYPE ";F$(4)
1020 REM ALLOW CHANGES1035 FOR I = 1 TO 4:PRINT I; TAB(5)F$(I): NEXT I
1040 INPUT"ANY CHANGES? ";Y$: IF LEFT$(Y$,l)="N" THEN 10501045 INPUT"WHICH ONE? ";W: PRINT"CHANGE PART ";W;" TO ";: INPUT
F$(W): GOTO 10351050 F$="":FOR I = 1 TO 3:F$= F$ + F$(r) + ",": NEXT: F$= F$+F$(I)
1055 LINE = LINE + 5: NUMBER = LINE: GOSUB 100
1060 POKE PSN, LO: POKE PSN + I, HI: POKE PSN + 2, 1311065 FOR I = 1 TO LEN(F$): PONE PSN + I + 2, ASC(MID$(F$,I,I»: NEXT I1070 POKE PSN + I + 2,0: NUMBER = PSN + I +3:GOSUB 100
1075 POKE PSN -2,LO: POKE PSN-1,HI
1080 INPUT"ADD MORE? ";Y$: IF LEFT$(Y$,l)="Y" THEN PSN = NUMBER + 2:
GOTO 10151085 POKE NUMBER, 0: POKE NUMBER + 1,0: NUMBER = NUMBER + 2: GOSUB 100:
POKE 175,LO: POKE 176,HI1090 END
19:6 MICRO -- The 6502Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 9/84
Figure 1: "MAP" of Two New DATA Statements being Added
"-O rig in al L as t Line First Added Line New Last Line
POINT LOW 08 1000 PSN-2 OA 2000 PSN-2 40 1234POINT HIGH 10 1001 PSN-l 20 2001 PSN-l 12 1235LINE LOW 64 1002 PSN 65 2002 PSN 66 1236
LINE HIGH 00 1003 PSN+l 00 2003 PSN+l 00 1237"DATA" 83 1004 PSN+2 83 2004 PSN+2 83 1238data XX 1005 PSN+3 XX 2005 PSN+3 XX 1239
XX 1006 PSN+I+3 XX 2006 PSN+I+3 XX 123A"END" 00 1007 XX 2007 XX 123BNEXT LOW 00/02 1008 XX 2008 XX 123CNEXT HIGH 00/20 1009 "END" 00 2009 XX 1230Orig. End 100A NEXT LOW 36 200A XX 123E
NEXT HIGH 12 200B "END" 00 123F
Note: Original Last Line NEXT LOW 00 1240
NEXT LOW/HIGH change from 0000 NEXT HIGH 00 1241
to 2002. (AF.BO)"New End 1242
~
\"
/
SYNERGISTIC SOFTWAREr:5'v1AILING LIST DATABASE ~,k G]fIGHER {jRAPHICS
This new, user oriented mailing list program intro-duces professional quality and speed to the processingof name and address files. The self prompting features
of Mailing List Database aid the user in creating andmaintaining address files. Labels or printed lists canbe readily produced at any time.
SINGLE KEYSTROKE COMMANDS - Any recordcan be displayed, edited, deleted or printed with
just a few keystrokes. Updates and additionshave never been easier.
CONVENIENT DATA ENTRY - All required in-puts are prompted by the program. Recurringinformation and default names and numbers canbe entered with a single keystroke.
MACHINE LANGUAGE SEARCHES· Any recordcan be found in less than one second by specifyingpart or al!1of 1 or 2 fields.
MACHINE LANGUAGE SORTS· All records canbe sorted by any field or combination of any 2 or3 fields. Sorting 200 records, comparing 50 char-acters takes less than a minute. After sorting, filescan be saved, printed, or displayed.
FLEXIBLE APPLICATION· The program can beadapted to numerous commercial and personaluses. Current suppliers, customers, clients, patientsmembers, even Christmas card lists can be kept on 'individual, updated files at all times.
Mailing List Database is supplied on disk and
comes with a program for automatically convertingexisting text mailing list files. It requires 48K AppleII with Applesoft on ROM (or language card) and atleast one disk drive. Now available for $34.50.
A collection of programs and shape tables that letsany programmer create detailed and beautiful high res·olution displays and animation effects. Make your pro-grams come alive by utilizing the full graphical capabil-
ities of the Apple II. Package contains:
SHAPE MAK ER . Create shapes with this easy to useshape table generator. Start new shape tables or addto existing one. Correct shapes as they're being pro-
duced. Delete unwanted shapes from the table.Display any lall shapes with any scale or rotation atany time.
TABLE COMBINER· Pull shapes from existing gen-eral purpose tables (see below) and add the ones you
want into a new special purpose table. May corn-bine shapes from any number of tables. All shapescan be viewed or deleted.
SCREEN CREATOR - Place your shapes on the hiqh-
res screen. Add areas of color and text to make de-
tailed displays or game boards for high resolutiongames. A screen can be created in minutes with this
easy to use program. Utilizes any number of shapetables and allows screen to be saved at any time.
SHAPES· Four shape tables with over 100 shapesare provided. Included are alphanumerics, chessfigures, card symbols (club, spade, etc.I, tanks,planes, spaceships, ships, cars, trees, mountains,buildings, etc. Add the shapes you like to your own
tables.HIGH RES TEXT· How to use high resolution graph-
ics in your programs. Animation effects and displaytechniques.
Requires Apple II with 32K and disk drive. Completepackage now available for $24.95 '
AVAILABLE NOW AT YOUR DEALER OR SEND CHECK TO SYNERGISTICSOFTWARE,5221 120th AVE. S.E., BELLEVUE, WA 98006
(Washington State Residents add 5.3% sales tax)
December, 1979 MICRO -- The 6502 Journal 19:7
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 10/84
~lJr1T~I~ 1J~1][I~fl rnI I ] E f l t f J ( [ J [ ] l t [ ] l i f l in r n l I f J l I J U J
~I] [ 1 I J t I J m [ ] l i l l l I J ' "
~I] m [ ] l i l mrn[ I I ] r 1 f J [ ) f J i l l f J t ! ' l f J JJfJ(~IJfl[]l1
[ ) I J m ( J l J t f J ( [)[]It[]lIIJ~
~I] E r I [ J
U J E l I I [JllrJEI! . f J~:~ TH E
Follow this simple program and you will receive ~: cm1WIi ~
: ~ E E £ : i ~ ~ : ~ J ~ ~ ; : ' ~ ~ ~ : ~ ~ ; ~ ~ ~ ~""!\~r"
This valuable catalog is FREE so mail your order _ i f l . . . . . _ . .today.
- - - - - - - - - - - - - - - - - - - .ame __
Address ___
City~ State Zip _
Doyou.own a computer?---What type? _
Do yo u use your computer for: Business?_-'--- __
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 11/84
, , " \
Women and Ch iid re nk _L a st!
If you are a subscriber. attach label or write subscription number here: .....................•..............................
Name: .
Address: ................................•........................................................................
City: :..... State: Zip: .
Country (if not U.S.): .
Help MICRO bring you the Info you want by completing this short questionnaire.
Microcomputers Owned/Planning to Buy: AIM SYM KIM PETAPPLE OSI Other: .
Peripherals Owned/Planning to Buy: Memory Disk Video Printer Terminal Other: .
MicrocOll1puter Usage: Educational Business Personal Control Games Other: .
Languages Used: Assembler BASIC FORTH PASCAL Other: .
Your comments and suggestions on MICRO: .•........................................................................
I havea feeling that the real "revolutionary" part ofthe microcomputer revolution is just starting to takeplace. Of course, parts have gotten smaller andcheaper; more software is available; new high level
languages are coming along; and so forth. The realsignificance of all of these things lies, I believe, in the
fact that millions of new people aregoing to get involv-
ed in computers and computing. While the overwhelm-ing majority of individuals involved in all levels of com-puters currently are men, the microcomputer has made
access to computers available to women and childrentoo. This growing interest was demonstrated to merecently at a computer show in Boston. A significant
number of the people who stopped bythe MICROboothto ask questions or talk about systems werewomenandteenagers. This issue of MICROcontains tbettrst arti-cle by a woman. We have several articles in process
from the younger set. The home computer is starting to
make its effect.
I am hoping that the inclusion of these two new
groups of compuferists is going to havea beneficial im-pact on computing. Manyof the individuals who ownedthe earliest micros were men already in the computer
business in one way or another. They came tomicrocomputing with a large set of preconceived no-
tions. Most microcomputer programs in use today areeither games or new versions of old programs. Not
\I
Al l payments must be in US do lia rs .Make checks payable to: MICROForeign payments in Internat ional Money Order or cash.
P O B ox 6502Chelmsford, Mass 01824
617-258-5515
"The B,ESTof MICRO Volume 1" contains a li of the Impor -tant material from the lirst six issues of MICRO in bookform.
"The BEST of MICRO Volume 2" contains all of the irnpor-tant material from the second six issues (#7 to 12J ofMICRO in book form.
"ALL of MICRO Volume 2" is all six issues of Volume 2.
issues 7 to 12. at a specia l reduced pr ice for a l imited t imewhile suppl ies last.
Back Issues:
lssues 7 to 12: .
Issues 13 on: ..............•......................
many really exciting new concepts, ideas, programs,techniques, languages, approaches, etc. haveappeared
- yet. One of the reasons has to be the self-imposedrestraints of the microcomputer 'professionals'. Sincethey already know 'how to solve problems', they tend to
usethe old tools that they areused to: BASIC, index se-
quential access methods, etc., and may not be alert tothe new possibilities that the microcomputer provides.Where are the 'innocents' willing and able to try newdirections, create chaos out of order, invent newtechni-
ques?Watching my six and eight year old children 'at-tack' the computer answers the question for me. They
arenot interested inwhat "Daddy knows about the com-puter". They just want to pushand poke and find out forthemselves. And my wife - she asks some pretty in-
Sightful questions when I try to explain why a programdoeswhat it does. Perhaps the concept of 'ego-less pro-gramming' really takes on meaning when you getamateurs just having fun.
If microcomputing is going to break out of the
doldrums of games and inventory control, then signifi-cant numbers of new ideas and individuals aregoing to
have to be added to the system. Perhaps 'a child
williead them'! ~ ~ ~
Subscription: One Year = 12 issues. Circle correct cate-gory and write amount in space provided.
Surface:
United States $15.00
Ali Other Countries $18.00
Air Mall:
Central America $27.00Europe/So. America $33.00All Other Countries $39.00 $ .. ..........
"BEST of MICRO Volume 1"Surface $7.00AirMail $10.00 $ ............
"BEST of MICRO Volume 2"Surface $9.00Air Mai l $13.00 $ ..
"ALL of MICRO Volume 2"Surface $9.00Air Mai l $13.00 $.
No.Surface @ $1.75 each
Air Mai l @$2.75 each
Surface @ $2.25 each
Air Mai l @ $3.25 each$ .
$ .
No.
TOTAL $ ..•.........
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 12/84
19:10 MICRO -- The 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 13/84
How to do a Shape Table
Easily and Correctly!
The mechanism for generating shapes and characters inAPPLE High Reslution Graphics is cumbersome andprone to error. A very clear explanation of themechanism and pitfalls is presented here. But, best ofall, a program is presented which permits the user toc~eatethe shapes interactively, using the Keyboard andDisplay_
The Problem
One of the most discouraging tasks
facing the owner of anAPPLEcomputeris the creation of a shape table. Thetable is required for generation ofshapes and characters for high resolu-
tion graphics, since APPLEdoes not of-
fer pre-formed plotting characters. Thus,
if one wants to label the axesof agraph,
the shape table can be used to supply
the characters required for the labels. Itis also useful for producing special
shapes for games.
}
j
If, like me, the reader has evertried
to prepare a shape table using APPLE's
proceedure, I am sure he/she dis-
covered, as I did, that the proceedure is
time-consumung, tedious, and error-
prone. In several attempts, I have yet togenerate a shape table using the manual
proceedure given by APPLE, that didn'tend up with missing dots, spurious pro-
jections or anunpredicted shape.At first
I thought the problem was of my ownmaking, since APPLE's directions are
clear and apparently faultless. The use
of the words "apparently faultless" in
the last sentence implies that what I
found was in fact the case: APPLE's pro-ceedure for creating a shape table has
some real glitches. I discovered these in
the course of pursuing the work describ-
ed below, and developed a proceedure
that circumvents the glitches and pro-
duces perfect results every time. So,read on.
APPL,E's proceedure for pre-
paration of a shape table is carried out
as follows: the shape is first laid out as a
dot pattern on a grid (Figure 1);a series
of plotting vectors is superimposed onthe pattern to trace out a continuous
path that covers all points to beplotted.
The plotting vectors are defined either
as move-only or as plot-then-move vec-
tors.
moveright ~
moveup l'plot then move right
plot then move left
plot then move upplot then move down
moveleftZ'_
movedown .J ,
~~
1 ' . r ,The shape in Figure 1 is reproduced inFigure 2 with the chain of plotting vec-
tors superimposed. The plotting vector
chain may start at any point, but in
selecting this point you should know
that the initial point in the shape is thepoint that gets plotted at coordinates
John Figueras
65 Steele Road
Victor, NY 14564
(X,V) in the DRAWcommand. Therefore,
your choice of initial point determines
the justification of the shape or
character with respect to the plotting
location. If you want a center-justifiedcharacter, then start the vector se-
quence at the center of the shape; a left-justified character must be started at
the left side, and so on. The APPLE
manuals give the impression that it is
imm.aterial where you start the shape,but If you want to haveyour characters
fall properly on a line, it is something
you must attend to. Knowing justifica-tion of the shape is important in games
where things bang together and in
building up large patterns by plotting
sub-units adjacent to each other-
cases in which it is important to know
where the boundaries of the shape fall
relative to the point atwhich it is plotted.
The next step in preparing theshape table requires that the chain of
plotting vectors in Figure 2 be unfolded
into a linear string, beginning with the in-itial polnt of the pattern. For the shape
in Figure 2, the following sequence ofvectors is obtained after unfolding:
f-~~<;-.1't~l ~t~t t<--~(-- ~l
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 14/84
The ploting vector string is then broken
up into groups of two or three, eachgroup (confusion!) reading from right toleft. To add a little more danger to thegame, the rules require that no group ofvectors may end with a move-upvectororwith aplot-then-movevector, inwhichcase the group will contain at most twoplotting vectors. The table in Figure 3ashows howthe above string is subdivid-
ed. In this case, because of the restric-
tions on termination, each group cancontain only two vectors. The rules for
formulating these vectors groups are ac-tually quite soundly based, as will
becomeclear in later considerations.
~-~ ic'--C--:' --~---- --,----- ..-- ~.---... :~_:___ ---'.'--f--,----c-- ~' ;----c-
- - , - . . . : - - - : ! T - - = : - - - : : - : - c ~ _ , : - ' ; ' . ' -;-~-_' -----, -- __;----~~-- -,-
~=!-=J~-- , - ~ - - ~ ~ ~ - = ~ --- - _. ---~ .- - . .. . . , . --. --.- . , -----------
- ~ = = ~ - - = ~ - - : - ~ = - = -.. - - ~ _ : _ _ : : _ _ _ = • . . . : - = - = - - = - - - - = - : -. -c-...:-c---;- __:.c_ . -..- --
We are not done yet. In the nextstep, each plotting vector as it appearsin the table in Figure3a is replaced bya3-bit (octal) code. The code is shown inFigure 4, along with the decimalequivalents. Note that the decimal codefor a plot-then-move vector is obtained
simply by adding decimal 4 to the cor-responding move-onlyvector. There is acertain amount of method in thismadness. The 3-bit code translation forthe plotting vectors in Figure 4, whichrepresent our shape, is displayed inFigure 3b.
_______.__ _ ~ -' c,--. c . _ _ - - , _
~ _ _ _ _ : _ _ : : _- = - J : - = - - - - = - _ : ~ ~ . : : : - - . : : : : - : = ~ i- ~ ~ ; - = = ~ _
Figure 1: Shape to be coded
The next.opportunity for confusion
(and error) appears now, when the bit-strings in Figure 3b are re-grouped andassembled into nybbles (Figure 3c) andthe nybbles areeachtranslated into hex-idecimal numbers (Figure 3d).The pairsof hexidecimal numbers, of course,represent the content of one byte. This
is the byte that is stored in the shapetable. In essence, then, the shape tableis a list of hexidecimal numbers, which,after translation into binary and re-grouping, represents the collection of3-bit codes equivalent to the plotting
vectors, which in turn represent theoriginal shape. In the parlance of
mathematics, the shape has beenmap-
ped onto the set of hexidecimalnumbers.
-"____-~
. . _ :.J . .
If by now the reader is feeling atingle of impatience with this descrip-tion, multiply that feeling by a factor ofat least ten, and you will beon the vergeof understanding what it feels like tocarry out these steps. To add to thefrustration, there are enough boobytraps laid byAPPLEto ensurequite ade-cent probability that after you havegonethrough this travail, the shape that final-ly appears on your screen will be
misshapen. With a computer at hand, itseems silly to bebogged down bya pro-
cess like this-and that's what the restof this article is about: a computer pro-gram in APPLESOFTBASIC that allowseasy graphic: input of a shape orcharacter with automatic generationand storage of a correct shapetable-graphics without tears, so tospeak.
Fig. 2: Layout of Plotting Vectors. (S)is the starting point. Withthis choice of (S).the shape will be lower right justified and willplot with one empty column to the right of the shape,
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 15/84
f--f- 00 III 011 0011 1011 3B
~ ~ 00 III III 0011 1111 3F-,,\
t t 00 100 100 0010 0100 24
l' ~ 00 100 001 0010 0001 21
t ---1 00 100 001 0010 0001 21
t---} 00 100 001 0010 0001 21
~ t 00 011 100 0001 1100 Ie
~ ~ 00 III III 0011 1111 37
t t 00 110 010 0011 0010 32
Ca) Cb) Cc) Cd)
Fig. 3: Translation of shape vectors to Hexidecimal Code
Approach to a Solution
Every computer programmer has
his own mind-set. For some, it is struc-
ture: a beautiful program that reads like
a novel. For others-start at the middle
and develop a nice, tight, efficient
algorithm. I am an input-output bug. Tome, the proper questions that should befirst answered are: how can I make iteasy for the user of the program to get
his data into the program; and how can
the output be made digestible? In the
present case, of course, the major pro-blem is one of input. With the equipmant
at hand-an APPLE keyboard, videoscreen and a couple of floppy disks-I
settled on a display of a 15x 15grid anda cursor that can bemoved byhitting ap-
propriate keys (Up, Down, Left, and
Right). The shape is created by plotting
the shape asa dot pattern under control
of the moveable cursor, using the P (forPlot) key to lay down the dot pattern.
Onenecessary key is the Quit key,whichinforms the computer that the shape isdone. A convenience key, E for Erase is
provided to accomodate some of my
sloppy keyboard habits; it facilitates un-
dOing the last plotted point. The selec-
tion of keys U,D,Land Rfor directing thecursor was modeled after the set of
allowed plotting vectors (there are nodiagonal moves in the set), and was a
fortunate selection for easy formulation
of the algorithm.
While the general format for input
was quite clear, the approach totranslating that input into a shape table
was not immediately clear. Two pro-
ceedures are possible: you can store all
of the input data in some sort of two-dimensional array in memory and then
December, 19179
analyze it, or you can take the input dataas they are acquired and develop the
shape table on the fly. I seriously con-
sidered the first path, and in fact, wrote
a program that would translate the input
pattern into a matrix of zeroesand ones.
Further consideration showed that
analysis of the pattern would be dif-ficult, one of the major problems being
that of ensuring proper plotting of theshape with respect to its starting point,
i.e., justification. Moreover, the most ef-
ficient approach in terms of processingtime and storage requirements for theshape table is to confine generation of
the plotting vectors to the occupied cellsof the grid as much as possible. Such
pattern tracing on an arbitrary two
dimensional array presents a formidable
search problem, particularly with
disconnected patterns. The solution of
the problem of efficienly tracing the in-
put pattern was obvious as soon as Irealized that the keystrokes used by a
person entering the pattern on the grid
constituted a continuous record of thepattern. By analyzing the keystroke pat-
tern, I could produce a string of
equivalents. The inspiration for this maybe tracable in part to my knowledge of
the way in which chemical structuresare recorded at Chemical Abstracts Ser-
vice of the American Chemical SOCiety,where chemical typewriters, used for
creating chemical structures, are con-
nected to computers which record the
keystrokes of the operator entering the
structure. The recored of keystrokes can
then be "played back" to reproduce thestructure exactly as it was keyed in.
With this basic approach decided upon,the outline of the required algorithm
became clear:
MICRO -- The 6502 Journal
1)Select the position in memory
at which the shape table is to bestored.2)Generate and display the work-
ing (15x 15)grid.3) Input the starting coordinates
for the shape (required for justification).
4)Generate the proper3-bit codes
that represent the plotting vectors, bas-
ed on the keystrokes used to input the
pattern.5) Assemble the 3-bit codes (in
groups of two or three, depending uponAPPLE'S strictures) into a byte.
6)Store the assembled byte in the
shape table.7) Provide for proper finishing-off
of the current byte when the Quit key is
hit.8) Add an end-of-record mark ( a
zero byte) required byAPPLEas a shape
terminator.9)Store the table.
Most of these steps are straightfoward,
but two of them, generation of the 3-bit
codes that represent plotting vectors,
and their assembly into bytes (steps 4and 5, above), require further elabora-
tion.
In APPLESOFT BASIC, the
character returned by a keystroke is ac-
cessible with a "GET" command; the in-
struction GET KEY$ will load the
character accessed by the next
keystroke into the variable KEY$. Wemay examine KEY$ to determine
whether it contains a "0" "L" "U" or"R" and then do a table I~ok-~p (uS'ing
the definitions in Figure 4)to retrieve thedecimal value associated with the direc-tion implied by the keystroke. Eachdecimal value, of course, as stored in
memory will generate the proper 3-bit
binary code. Subsequently, the
keystroke preceding the current one(which we thoughtfully saved in variable
KSVE$)is examined. If KSVE$ is a "P"
then the current 3-bit code must repre:
sent a plot-then-move vector anddecimal 4 usadded to the deciaml factor
for the current key.If KSVE$is not a "P",then the current decimal key equivalentremains unaltered.
Assembly of the 3-bit codes intobytes involves only basic consideration
of decimal to binary conversion. Byteassembly is done in the program aseach
3-bit code becomes available, but for the
purposes of discussion, let us assumethat 3-bit codes, V" V" V,are available inthat order from the last three
keystrokes. The first 3-bit code in-
itializes the byte:
BYTE=V,
V ,, . . . - . .O O O O O X X X
The second 3-bit code must beadded tothe byte, but must first be left-shiftedthree bits if the V, bits already present
19:13
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 16/84
are to remain unchanged. This is done
by multiplying V, by 8:
BYTE= BYTE+ 8·V,
~OOYYYXXX
Now for V,. To refresh your memory, you
will observe in Figure 4 that all plot-then-
move 3-bit codes have their left-mostbits "on." Since there are only two bits
remaining unfilled in the byte, there is noway inwhich the plot status of the third
3-bit code can be entered into the byte.
In this case, processing of the byte
stops, and it is stored in the shape table,
while V, is used to initialize the nextbyte. This is the reason that plotting vec-
tors cannot bestored as end vectors in a
byte, one of APPLE'S restrictions
previously noted. In similar fashion, if V,
corresponds to a move-up vector, with
all bits zero, it is not loaded into the cur-
rent byte, but is used to initialize the
next byte. The reason for this is not so
obvious, but is related to the aforemen-
tioned deduction that plotting vectors
cannot appear as end vectors in the
byte. For, suppose that the zero move-upvector V, could bestored as an end vec-
tor; then everytime V, happened to be aplotting vector, the last two bits in the
byte would bea zero, and undesired up-
moves would be enabled whenever aplot-then-move vector happened to oc-
cur in V,. APPLE'S restrictions make
sense!
In the event that V, is neither a
move-up nor a plot-then move vector, itis added to the byte, for it then consists
of an unambiguous two-bit code (Figure4)that can fit into the remaining two bits
of the byte. Addition of V, requires a6-bitleft shift of V, to avoid changing the bits
already present. This is done bymultiplying V, by 64(=26):
V, V, V,
BYTE=BYTE+64·V, Z:ZYYYXXX
Earlier, I mentioned glitches design-
ed into APPLE'S shape procedure that
would offer problems in obtaining cor-
rect shapes in graphics. There are ac-
tually two kinds of glitches, one predic-
table and the other not. The predictableone is aconsequence of two facts: 1)AP-
PLEuses a zero byte as anend-of-recordmark to terminate every shape; 2) the
move-upvector is represented by a 3-bit
code of 000. It follows that several move-up vectors in a rowwill generate an end-
of-record mark and any part of the shapefollowing thereafter will be forgotten.
That's bad enough. Worse is the unex-
pected fact that move-up codes (000)
that lie on the left part of the byte (most
significant bits) are not recognized. For
example, consider the two cases of aplot-then-move right command followed
by a move-upcommand,
19:14
00000101(decimal 5)
and a move-up command followed by aplot-then-move right command,
00101000(decimal 40).
Presumably, these commands should
give the same net result. That's what you
think, and what I thought also! In fact,
the move-upcommand implied in the left
bits of decimal 5 is not recognized bythe
system, and the byte is interpreted as aplot-then-move right instruction only.
Therefore, if you try to generate a 450
line with the sequence
plot-then-move-right: move-up:plot-then-move-right: move-up...
you will get a horizontal line, whereas
the sequence
move-up: plot-then-move-right:
move-up: plot-then-move-right...
will give the desired 450 line!! There is
nothing in APPLE'S literature that would
lead the unwary to suspect that these
two sequences will not plot alike. Nowyou know the source of thosemisshapen shapes.
The two problems described in thepreceding paragraph-premature end-of-
record mark and non-plotting up-vectors
that appear in the left bits-arise from the
definition of the up-vectoras a zero3-bit
string. In fact, a concise statement of
the problem is that anybytewith a value
less than decimal 8 can be expected to
misbehave, unless it is the last byte inthe shape table. The solution to the pro-
blem lies in preventing the occurence of
these dubious bytes. This can be doneeasily-especially with a computerprogram-by introducing dummy right-
and left-moves. The technique is simple:
check the value of the assembled byte; if
it is less than decimal 8, the second vec-
tor in the byte must correspond to the
move-up (000) vector. In that case,
replace the left-most zero bits bya non-
zero, move-right vector, transfer the
move-up(000)vector to the next byte andfollow it by a move-left vector. By plac-ing the move-up (000) vector into the
right-most three bits of the next byte,
you ensure that it will be recognized asan up-vector. The succeeding move-left
vector un-does the effect of the move-
right vector installed in the preceeding
byte so that the correct shape is main-tained. Implementation of this routine in
a computer program is actually quite
easy, and resolves the problems in-
troduced by the up-vector. Frankly, I
don't see how anyonecould beexpected
to obtain predictable shapes from Ap·
PLE'S procedure using hand-methods
for creating shape tables, considering
the inherent problems posed by the zero
up-vector.
THE PROGRAM(S)
Three programs were written to im-plement the computer-guided formula-
tion of a shape table: A) a shape file in-
itialization program (Figure 5); B) a
shape creating program (Figure 7); C ) a
shape display program (Figure 8).These
will bediscussed briefly. I hopethat the
folowing discussions coupled with the
comments scattered through the pro-grams will enable you to follow the pro-
grams without difficulty.
Plotting 3-bit DecimalVectors Codes E9.uiva1ents
i000 0
~ 001 1
J , . 010 2
~ 011 3
t 100 4
------t 101 5
l 110 6
~ III 7
Fig. 4: Representation of Plotting Vectors as 3-bit Codes anddecimal equivalents
MICRO-- The 6502Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 17/84
) First Shape
N, No. shapes
Empty
Directory
Byte 1
Byte 2
2*N Bytes
Fig. 5: Memory Map for Shape Table
Shape File Initialization
The principle shape-creat ing pro-gram requires a previously allocateddisk file for shape table storage. The in-it ializat ion program (Figure 6) createsthe disk file and also establishes thename and length of the file. The program
allocates space for the shape tabledirectory based on the number ofshapes to be stored in the file, a numberthat is declared by you during initial iza-tion. The memory map.for a shape tableis stored in the first byte of the table; itsmaximum value is therefore 255, andthis is the maximum number of shapesthat can be' stored in one shape table.The directory contains addressing infor-mation that allows random access to
J
December, 19790
any shape in the table.
The directory falls between the firstbyte of the table and the beginning ofthe first shape. The amount of spaceallocated to the directory is determinedby the number of shapes ultimately to bestored in the table; each shape requirestwo byte in the directory for addressing.The shape tables themselves may beany length, up to a total length consis-tent with the 15x 15 matrix in which theshapes are created. The shape tablesare stored end-to-end as they are addedto the file, each shape determining in azero byte as end-of-record mark. Thelayout of the shape file requires that anytables added to the file be accuratelydone, because once a table is buried inthe file, it cannot be simply replacedunless the replacement has preciselythe same length.
The file initialization program isalso used for creating the cursor re-quired for mapping shapes on the15x 15 working grid produced by theprincipal program. This relieves the userof the need to generate the cursorhimself everytime he opens a new shapefile. The cursor is stored as the firstshape in the shape file, and the shape-creating program assumes that the cur-sor has already been stored for its use.As a consequence of this arrangement,you must remember that the user-generated shapes start with the secondshape table in the f ile.
Although the file init ialization pro-gram zeroes out all of the bytes in thedirectory, there is no substantial reasonfor doing this, except that the string ofzero bytes make it easy to determinewhere the directory ends and the shape
tables begin in a memory dump. This ad-vantage will last only until the directoryis filled.
The Shape Creating Program
The BASIC program (Figure 7) thatenables shape generat ion requires theuse of dual f loppy disks, but can be easi-ly changed for single floppy use byreplaclnq "D2" in step 110 by "D1."(Similar adjustments will have to bemade in the initialization and displayprograms, which store and access theshape file from disk 02). Tape users willhave to replace disk tlO by suitable tape1/ 0 in steps 100, 110 and 1360.
The program loads a pre-existingshape file (created by the initial izationprogram, if necessary) from disk, usingthe shape file name supplied by you onrequest from the program. The file isloaded into a memory location whichyou are also asked for by the program. Acheck is made (step 220) that there isroom in the shape flle .directory foranother entry. If not, you will be so advis-ed and the program will abort. A pointer
MICRO -- The 6502 Journal
to the shape file required by the APPLEsystem is set up in step 260. The 15x 15plotting grid is turned on (steps 300-330)and you will be asked to input the star-ting grid coordinates for the shape.Note, these are grid coordinates and notscreen coordinates that are asked for.The cursor will be displayed on thecenter of the grid square that you havejust selected as the starting point. Someuser helps are displayed in the text areaunder the grid (steps 410-440), and you
are off and running. Manipulat ion of theR,L,O,and U keys will move the cursor inthe appropriate directions. The REPEATkey will work with these commands.Pressing the P key will plot a small circleinside the square in which the cursorcurrently resides, and this plotted pointwill become part of the shape table be -ing built in memory. An image of the cur-sor will persist in the initial square-as a"negative" image if you happened toplot at that square. The persistent cur-sor image serves as a reminder to you ofthe location of the start of the shape.The cursor is made to disappear andreappear in adjacent squares as youpress the move keys by XDRAW com-mands at steps 500and 530;the IFstate-ment at step 1040 in the subroutine thatdraws the plott ing circle is responsiblefor keeping the persistent image of thecursor at the starting square. The flag,FLAG, that appears in step 480 andelsewhere is used to allow the cursor tobe turned off in a plotted square and tobe turned on again when the cursormoves to the next square.
Keystrokes are recorded in step570. A previous step (550) saves theprevious tw o keystrokes in KI$ andKSVE$. The former record, KI$, is re-quired to allow the erase feature, con-
trolled by the E key and discussedbelow. KSVE is needed for propergeneration of plot-then-move 3-bitcodes, also discussed below. Interpreta-tion of a keystroke takes place in steps590-710, a sequence of IF's called asieve. This particular form of key screenwas chosen because it gives almostcomplete protection against inadvertententry of incorrect keys. Once you are inthe program, you will find that thekeyboard is effectively locked out for allkeys except those required by the pro-gram. If a non-applicable key is pressed,the sieve eventually routes the programthrough step 710 back to another key ac-cess at step 570. Inside the sieve, when
a keystroke has bee identified as a movecommand (L,R,U,D),the appropriate X-orY- coordinate adjustment is made andthe decimal value of the 3-bit code ap-plicable to the move is stored where thevariable KSVE$ is checked to see if theprevious keystroke was a Plot com-mand. If it were, SYMBOL is in-cremented by a 4 (remember Figure 4?),and SYMBOL is then transmitted to thebyte assembly area, more of this later.
19:15
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 18/84
If the current keystroke cor-responds not to a move command, but toa Plot command, the program sets thecursor disable flag, FLAG, calls the plotsubroutine and then branches back toget the next keystroke (all of this is donein step 680). The Quit command forces abranch to a routine that closes out thecurrent byte {starting at step 1080),addsa record mark (step 1170) and drawsthew completed shape (step 1170). Atthis juncture, you are asked a series ofquestions, the answers to which willallow you to:
1)forget the current shape and goback and try again without re-accessingthe current shape file from disk;
2)keep the current shape, updatethe shape file directory and start a newshape;
3) forget the whole thing-add nonew shapes to the file and quit;
4)load an updated shape file todisk and quit.
These alternatives will help you to avoidfilling up the shape table with unwanted
shapes, and allow you to experimentwithout being forced to save all of yourexperiments.
The closing out of the current bytepreparatory to ending the current shapedefinition (step 1080)poses a problem ifthe last keystroke is a Plot commandbecause a P command alone does notgenerate a vector. There is nothing tostore after a final P command, unless itis followed by some sort of move. Theproblem is handled in steps 1100-1140byadding an arbitrary up-move after a finalPlot command to generate a plot-then-move-up vector. (Note that in the illustra-
tion Figure 2, the concluding vector is aplot-then-move-down. This was done forthe sake of clarity in drawing only. Thepoint is mentioned in case someunusually perceptive reader notices thatthe foregoing description does not tallywith the example in Figure 2). The finalvector is either added to the currentbyte, in which it will appear as the onlyentry. If the last keystroke prior to clos-ing the current shape table is anythingother than a Plot command, the currentbyte can be closed out immediatelywithout further ado.
The erase command has the very
limited capability of erasing the last Plotcommand only. As discussed before, aPlot command alone does not result information of a vector until it is followedby a command. Therefore, if a Plot com-mand is issued in error and no movecommand follows it, no vector will begenerated and the shape table remainsunchanged at this point. It is thereforepossible to undo the Plot commandsimply, without the complication of
19:16
analyzing the last byte for returning tothe state that preceeded the mistakencommand (and it would becomplicated! !). At the point at which thePlot command is mistakenly issued,KSVE$ has a certain value. I f we wish togo back to the condition prior to themistaken Plot command, we mustrestore that value to KSVE$so that whenthe correct command is issued it is pro-perly interpreted when KSVE$ is examin-ed subsequently. The character requiredfor this purpose lies waiting in KI$. Thus,the erase command loads this previousvalue into KSVE$ and "unplots" the in-correct plotting circle by re-plotting withthe color "black" (HCOlOR = 0 in step720). Note that because of these limita-tions, no plot command can be undoneafter a move has been made.
Byte assembly using the 3-bit codes(stored current ly in SYMBOL) occurs in780-980.The variable CYCLE keeps trackof the number of 3-bit codes entered intothe current byte (called BYTE in the pro-gram). After the second 3-bit code isloaded into BYTE (step 820) a check is
made (step 840) to see if the byte is lessthan 8; if it is, we know that the byte con-tains an unrecognizable move-up vectorin the left five bits. In that case, a dum-my move-right 3-bit code is inserted intothe byte, the byte is stored (step 860)anda new byte is formed consisting of therequired move-up (000) followed by adummy move-left (110) to compensatefor the dummy move-right. The resultingbyte contains the bit string 0001 1000,decimal 24, generated in step 880.Statements 950-980 take care of thecases in which the third 3-bit code is aplot-then-move code or a move-up onlycode, which require that the current bytebe stored, and the current 3-bit code be
loaded into the next byte.
The Display Program
It is likely that your disk or tape willbe replete with shape files tailored tovarious uses, now that creating shapetables is so easy. A convenient displayprogram will become essential in orderto find out which shapes are storedwhere. The display program that ac-complishes this (Figure 8) is an exampleof how shape files may be used is a pro-gram. The program constructs a 6 x 6grid on the high resolution screen anddisplays one shape per grid cell. To iden-
tify the location of the shapes in theshape table, each occupied cell carriesthe shape index in the upper left-handcorner. The numerals required for plot-ting these indices are extracted from ashape table called NUMERALS that youwill have to create at storage location20000 (decimal) by means of the shapecreating program. The numerals arerestricted to a 5 x 7 grid, and are format-ted as illustrated by the example in
MICRO -- The 6502 Journal
Figure 1. Sufficient space is reserved inthe display squares to accomodatethree-digit numerals from 1 through 255."Aha," you ask, "how can 255 shapes bedisplayed in a 6 x 6 grid?" The programprovides for paging through the shapetable, 36 shapes at a t ime. The paging isactivated by hit ting any alphanumerickey on the APPLE keyboard.
The display program opens by get-ting the shape files that it needs-onefor numerals (step 50)and the table to bedisplayed (step 90). Pointers to thetables are set up (steps 70 and 120).Starting at step 180, each shape I is ac-cessed in a FOR...NEXT loop. A grid·specific index is calculated (step 190)bytaking the current shape index I modulo36(step 190). For the first shape in eachgroup of 36 (I modulo 36 = 1), the screenis cleared (step 240) and the 6 x 6 grid isdisplayed (steps 250-330). The row andcolumn positions for the I-th shape inthe grid are found (steps 360, 370). Theshape index is "unpacked" into itsseparate digits (steps 380-410)and thesedigi ts are plotted in the correct grid cell
in the upper lett-hand corner (steps430-480). The NUMERALS shape table isaccessed in step 420 by placing thepointer to the NUMERALS shape table in(decimal) addresses 232 and 233, so thatsubsequent DRAW commands will referto this table. Insimilar fashion, when theshapes to be plotted are required, theaddress of the shape table must beentered into addresses 232, 233. Thisprogram illustrates how any number ofshape tables may be used inside a pro-gram simply by supplying the correctpointers at the time that shapes are tobe DRAWn or XDRAWn.
Parting Words
The 15x 15 grid used for shapecreation is the largest pract ical size forthe APPLE screen with space providedfor text. A larger grid can be accornodat-ed by eliminating the text area, but thiswill compromise the required startingcoordinate input. However, the numberof cel ls could be increased by decreas-ing cell size and using a smaller plottingfigure. If you try this, it is convenient toselect a plotting grid with odd numbersof X and Y segments so that the centralplotting area falls on a grid square andnot at the intersection of two grid lines.This is of help in centering shapes.
You should also be aware, if it is notobvious by now, that the location of ashape on the grid has no bearing onwhere it plots in high resolutiongraphics, except with regard to the in-itial point of the shape, which alonedetermines justification. You may useany convenient subsection of the fullgrid for plotting, and it does not have tobe the same subsection for each shape.
continued on page 19
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 19/84
)
SUPER·TEXT is a professional word processing system for the Apple II and Apple II Plus computers.
SUPER· TEXT is the most innovat ive word processor available on any personal microcomputer and includes
features previously found only on word processing systems cost ing thousands morel
An advanced multiple paging system allows you to view two text screens simultaneously. You may keep notes
or instructions on one text screen while you edit on the other.
SUPER·TEXT is a character or iented editor with complete cursor controls to easily move the cursor to any position
in the text wi th a minimum of keystrokes.Bui lt in f loat ing point math and automatic tabbing facili tate the preparat ion of all manual reports including f inancial
reports. insurance forms. real estate set tlements and more.
SUPER·TEXT is easier to operate than a typewriter yet challenges the flexibility of pencil and paper.
SELECTED FEATURES:
EDITING - Full f loating cursor. Cursor control-left.
right. up, down or to center of screen. Add or insert
a character. word or line. Automatic carriage return
eliminates a word breaking at the end of the screen
line. Delete a character. word. line or screen. Automatic
on screen tabbing and right or left justification of
columns. Unlimited text movement. Scroll either a page
or a line forward or back. Move :0 the beginning or endof the text or screen. Move to the last change made
in the text. Move to a block marker. Global search and
replace (selective or ail ). Block operations - copy. deleteor save to disk. Select multiple or single screen mode.
ADVANCED FILE HANDLING - Requires only two
keystrokes to load or save a file to disk. The file name
does not have to be entered which el iminates misspell ing
and "FILE NOT FOUND" errors. Save entire text
or portion of to disk. Complete f ile merging capabilit ies.
MATH - Automatic column totals. Formula computations.
User selectable number of decimal positions.
Automat ical ly swi tches to scient ific notation when
necessary. 14 significant digits.
PRINTCONTROLS - Upper and lower case print ing
without addit ional hardware. Automatic paragraph
indentation. Single ordouble space printing. Selectable
right justi fication of text. Variable page length and width.
Automatic page numbering. Selectable chapter-relative
page numbering. Automatic print tabbing. Right or lef tjustif ication of columnar data. Single sheet or continous
form printing. Superscripting and subscripting.
Underscoring. Line centering. Automat ic link and printing
of multiple text files. (48k) 99.95
MICRO INFORMATION SYSTEM,m (48k) S99.95 is a b reakthrough in effective in·
tor rnauon systems o f any size. This one sys tem handles accounts payable/receivable,
mven tones. appo intment calendars. cost es timat ing, real estate l is ti ngs . sales sol ic ita-
tions, manpower accounting, selective mailings and label printing, dietory intorrna-
non. phone directories and more! On diskette
U·DRAW lI'm (32k) S39.95. a complete graph,cs package for the Apple II wrt n di sk.
You can create a figur e and rotate. expand, contract or move it anywhere on your
video screen with a lew simple keystrokes. Save individual figures or complete draw-
I ngs on disk and recall them rarer U-ORAW II automatically builds and edits multi-
f igure shape rabies that are directly transferable to your BASIC programs. You won't
l ind better qraprucs capabi li ties at 100t imes the pr ice!
APPILOT EDU·DISK,m (32k) S49.95 A complete multi-proqrarn CAL system tor the
APPLE II Includes program editor and APPILOT interpretor on diskette with exten-
s.ve on-tine HELP lessons pius documentation manual
THREE MILE ISLANDtm (48k) S39.95· Is the technology of a n uclear reactor too
c.ornptex 10nancie' Now you have the opportuni ty to decide tor yoursel" with
THREE MILE ISLAND. a reansnc simulation 01a pressurized nuclear reactor. Four
spectacutar o.spraes monitor the containment buil9ing, turbines, f ilters, condenser,
reactor core and tne pump house. Valves, pumps, turbines, f il ters and control rods
are Individually acnvated by keyboard command. The comprehensive documentation
oescnbes Indetail rtte ooerannq mechanisms and component interactions.
SUPER-LOAD CASSETTES
U·ORAW (16k) S, 7 .95
ELECTRIC CRAYON (8k) S1795
MAZE GAME (8k) $ t2 .95
ESCAPE (16k) S12.95
S IDE SHOWS (8k ) t2.95
TANK WAR(16k)$12.95
MUSIC BOX (8k) $12.95
BASEBALL( t6k )' S14.95
UNCLE SAM'S JIGSAW (32k) ' $12.95
GLOBAL WAR (32k) ' St7.95'Plu5 APPlESOFT Board
THE LEADER IN QUALITY SOFTWARE
•Available from dealers or write today to the
MUSE CO., 7112 Darlington Drive. Baltimore. MD 21234
Order by phone (301) 661-8531 MASTERCHARGE and VISA welcome
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 20/84
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • •:Safl;ware far I;heApple . 1 1 ~*~• o'dO •
• •I •
·~
., I •
• •• •: a~ I I ~I :
·1 •: . I :.' .•• ••
• S C O R E : 1 9 S S C O R E : I S S • •
ULTRA BLOCKADE- the standard against which• DYNAMAZE-a dazzling new real-time game. You other versions have to be compared. E,njoy Block- •• move in a rectangular game grid, drawing or erasing ade's superb combination of fast action (don't be •• walls to reflect balls into your goal (or to deflect the one who crashes) and strategy (the key is •
them from your opponent's goal). Every ball in accessible open space-maximize yours while min- •• your goal is worth 100 points, but you 10se .8 point imizing your opponent's). Play against another• for each unit of elapsed time and another point for person or the computer. New high resolution •• each time unit you are moving. Control the speed graphics lets you see how you filled in an area-or •
•with a game paddle: playas fast as ice hockey or use reversibility to review a game in slow motion '.
'. as slowly and carefully as chess. Back up and re- (or at top speed, if that's your style) .. This is a •play any time you want to; it's a reversible game. game that you won't soon get bored with! By
• By Don Stone. Integer Basic (plus machine lan- Don Stone. Integer Basic (plus machine language); •
• guage);32 K; $9.95. 32 K; $9.95. •
• What is a REVERSIBLE GAME? You can stop the play at any point, back up and then do an "instant •
• replay", analyzing your strategy. Or back up and resume the game at an earlier point, trying out a different •• strategy. Reversibility makes learning a challenging new game more fun. And helps you become a skilled •
• player sooner. •
• •WORLD OF ODYSSEY-a new.adventure game utilizing the full power of Disk II, which enables the player •• to explore 353 rooms on 6 different levels full of dragons, dwarfs, orcs, goblins, gold and jewels. Applesoft II •
• 48K; $19.95 includes diskette. •
•• PERQUACKEY-an exciting vocabulary game which pits the player against the clock. The object of the ••
game is to form words from a group of 10 letters which the computer chooses at random. The words must• be 3 to 10 characters in length with no more than 5 words of any particular length. Each player has only •• 3 minutes per turn. The larger the words the higher the score. Applesoft II 16K; $9.95. •
• APPLESHIP-is a naval game in which two players enter their ships in respective oceans. Players take turns •
• trying to blast their opponent's .,hips out of the water. The first player to destroy their opponent's ships •• may win the game. A great low-res graphics game. Applesoft " 32K; $14.95. •
• •Available at your Programs A v ailable' on Diskette •
• local computer store , I at $5.00 Additional '.DEALER'INOUIRIES INVITED
• • Check or Money Order .'
•Call or write for our free • Include $1.00 for
SOFTWARECATALOG PDHTEH§tJFT. INC. shipping and handling •• :7 • C.O.D. ($1.00 add'tl. charge) •
• Apple II is a registeredP: O. BOX 157 • Master Charge and VISA •
•trademark of PITMAN, NEW JERSEY 08071 orders accepted •
•
Apple Computer, Inc. (609) 589-5"500 • New Jersey residents.add •5%sales tax
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 21/84
6: Shape File Initial ization Program 7: Shape Creating Program
-~,
1 9 R E M S H A P E F I L E I N T I A L ! Z } ! T ! O f · ! 1 9 P R H lT T A B ( 6 ) ; 1 I : t . : r t . : t : C R E A T E A
$ P E T A B L E : t : n : t .1 I
2 0 P R H IT
3 9 P R ! H T T A B ( 5 ) j I I B Y J. F I G U E ~ : AS . . R O L .T £ S T E R ~ N.Y.I I : PR ! t · f T
4 9 P R I H T T A B ( 16/'9.····12/79": P R I N T
2 9 I W U T I I ~ ~ M E O F S H A P E T ~ I S ! . . E II.;
H A M E $3 9 I N P U T " S T A R T I ~ !G A D D P E :~ :: . . D E C !r~f . t . " ; A O D R
4 9 I N P U T "m . O F S H A P E S T O B E S TO R E D " ;N
5 0 R E ~ 1 Z E R O D I ~ : E C T O ~ : Y
60 FOR I = e T O 2 : t . H + 17 9 P O K E A D D P + r. 0 : ~ ~ E : '< T8 9 R E M C A !" C !_ !! . . :~ T E I N D E : ) : ; T O C U F :: : :C
R9 9 ~ ~ = 2 : t . N + 2
100 REr-1 PUT C ! J R : 3 C ! P I t ·! D E : · < Inro Q
I R EC T O P ' . . . .
1 1 0 P O K E A D D R ~ 2 , ~l - 2 5 £ : t . H I T(H .-' 2 5 6 )1 2 0 P1ik"C A D C t F . : ~
. ,TI·.IT 0.' /1 2 5 £ : : '_ , . , . ."- -.1.1 " ' . , 1 ·.I"r
130 R E ! ' 1 C A L C HJTTT ('I ! ~ D D R E ~ : : : : : ~n4 \... \ ...t !.... I ,_
60 REt1 I~Pl!T TABt.E Nf~!~E~!NQ LOt :A T I O N7 9 I t - P U T H S H A P E T A B L E ~!I~!'1E".; N A t ~E $
8 9 I t - f U T · S T A R T I H G A D D R E : : : : : : , . a E C I ~ 1f . t . " ; A S U E9 9 R E M D I S K A C C E ~ ~ S E f : ! _ ~ : : E [ ) ! S } · : : D
2100 0$ = CHR ! (4 )' P R I N T Df,; "~ lm '~1 )4 C . ' LO "110 PRINT D$; "8!_ !Jf~[! II + H A r ~ E $ +IIIA " + S T R ! (A Sl.}~~' ~ ". t , l 0 i 0
2 "l f . : 3 0 ! ! :1 4 0 I N I T = A D O P ~ t - !1 5 0 R E r'~ E ~ -r r E ~ ~ C U R ~ ::C !~ I! ~ H : : : f P E
D R S1 6 0 D A T A 6 2 J 3 6 ; 4 5 . , 5 · ~ , . ! ~ 4 " 0 !3
170 FOR I = 0 TO 51 8 e RE~7([! A ' P O K E IH IT + I J A :
'JC'-'T' _ . _ '_ ' 1
1 2 0 R E M G E T C A P : : ) C ! T ' . . . . t ~ A ~ < G F F I L
E130 M A;~ = PEH~ ~A :3 '..E + 2) + 25 6 : t .P E E K < : A S t ' E + : 3 )
1 4 0 M A X = ( M A : :< - 2 ) / 2
1 5 0 R E M G E T N O . O F S H I ~ P E : : : H I T ~.!
B L E1 6 0 N = P E E ~ : :
1 7 0 R E M G E T
180 H(l~)~=2 ) + 2 5 6 :~N + 3 )1 9 0 R E M CO r ' 1 P ' _ ' f E [ ' ) D D ~ E : :: : : ' O F ~E>~T
(A:~f.E )
F I L E LP!GTHP E E ~ : : : (ASI ')E + : 2 :tPEEK (A :3 ' ..E ~ 2 : t .
N +0 0 ~ ~ = N + 6
210 RE t~ S T O ~ : E ~' lE!- ! !~I[ !E:" ' :HI O I ~ : Ee T O P ' " ( ,220 C,ii·"C f~{O[!P + 4 , . ~!- 256 : t . IUTO_"i-',_ k" 1
(H .,.1 2 5 6 >
23e P O K E ! ~ D O P ~ c : IW (N ./ 256>_,l
2 6 0 eTI C... __
F R E E B Y T E
2ge A m p = ~ f: : ! . . J E ~ I ~ ~ D E > ' :
2 1 0 R E M S E E ! F F " I ! . . E I S F U U _
228 IF M ~~:~: N TH £~t 2€ !?2 3 0 P R H f r " : 3 H A P E T A B L E F U L L . N P <T F R E E B Y T E A T " , ; A D m : :
240 GOTO 137!?250 R 81 SET UP APP '_ .E p e ! ~ · r n : : e : ~ :I) T A B L E
~'6e P O K E 2 :? 2 . · A S '. } ! : - 2 5 6 : t . I N T (
~')E ./ 25 6 ) : P O K E 23 3 . . IN T (AS tlE / 256 )
2 4 0 F .H ~ U P L '~ tT E : : : H : ~ P E ceUHT~~ :2 5 0 P O ! < E A D [ : ~ : . 1
O N D IS K
2 7 0 0 $ = C H F . : ! r: : 4 : : .280 P R !~ r D!.: 11 N!J!~:!J~'r- T nil. . . . ,' . . .~. . . .
2 9 0 P R I ~ · r r D $ . : Ii8 ~ : ~ ! ~ _ i . } E ; 1+ N : = ~ M E $ " • If
J A R + S T R ! ( A O O R ) ~ " .L " +S T R : t un ~ " , l '0 . . D 2 "
300 END
)
December, 1979 MICRO -- The 6502 Journal 19:19
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 22/84
2 7 0 R P 1 U P D : : ~T E ~ : : ! - ! A F ' ! : c : c u ~ · r T ' : :R
2'20 N = N + 1: P IJKE A : ~ ' .. 'E . . t · !2 9 0 R P ~ O ! ~ : : P L _ : : Y ( P U J " f T I N G G R I C ! .
I H I T I A L I Z E C ~ jU ~ ~ T ~P ," C Y C : ! . .E:?a1 H C ! J ! . . a C !R - =3 ' ~ ;C A L E , : : 1 ~ ~ : c ! T , : : ~J'
C Y C L E = 0
3 1 e? . 2 e
19:20
H G R
x .e330e l Y340
H d . .
35 0
F O P > ~ = 0 T O 1 5 f ~
TO x . 150 ' ~E )~TF O R .- ( = (1 T O 1 5 0
T O ise. Y : H E:'~T
R P 1 C L E ~ :~ T E } : TOf rr r ('("InC·',':·I ...._ . I . _O_OO_" : - , ,__ .. .. .
P R!t'!T P R!t'!T
C " TCC 'o_ " ... ..
UOII-!T" i ~ . . . ' :
eTCC'o_o~~r H P L C ~ T
rur r. . . . '''-'
P ~ : ! t " T
36 0II
DC·T ~.ITrJ; .101 I I, - o . - , . - . o n · : ·._••J•••• .,J .
I H F 'l ! T " X II.;xx =I t - - F ' U T N y "; ' i:Y =
1 0 :t . X
r e : * Y570
3 l S " e
3904 e € 1 R H 1
TRl ( :T I ON : : :410 P R H ! T
5= y
T > • . • • : ;~f I · _ .
= x y~;o r : : : F ' ! _ f ( ~ · l
D R A ! ' l
P R ! ~ I T PI;'HIT........ ! r
P R I t · I T IIMf l l iC C .I rrr PI iPc·nc· 1,1T TUi : o_ , . .. ~ I ;,-._. t 'J~~''.'_"_'~', r'll" I 1 1
KE ' ) / ~ : : I I
430 PR I t · n II
Lf' O-[ lm~r· !n4 4 0 P R I m II
lJ -_I ~CT'- ....1-1 ,
P T O P L O T !] T O o u rT. "450R S O F . :4 60 K E'i'!
e470
QCM••..... 1 t
V"~ • .. ..: t 01 nr I-'I!1,_ 1_ •r __ '_:
r::~.
'-'J U; rC , - " i t : '.._ ., .. ._ . . . . .,..RP;1. . . . , ,
C:':- iA._• .;. . t_,
occurru Ii 1··.:_·.··.1.',."~.'I N
S S Q .500 >~:~::{!.!1 A T ::< 1..V15Hl RE'~ acr c : u ~ : ~ : : c ! pSA I . } E x . It520 :;~1= x :': '15 3e >~~:H ~'~1 A T
540s. ~:::$ ! ~ f E E . c t E - : [ ~ C " D ~ ~ Ef:~~·~~::E:
O U T I H E .~3 KIt -:: r , : : S t . . 'E ! · y . : ~ : : ! . . ! ~ : ! " : ' KE··(!
Y~FL :~G = 0x . \ ; )
! ; oCM, . . _ . 1 TI.I1-, L-··CV":·TOOL·"CI"'~•• 1',_ t '_' ~ ~', '..," . L_
R Er·! G ET t'fE~'! ~ - : : E : · t : : T ~ : n ~ ' : · E
G E T (E';I$"
s s e f : E ~ : : G C ! T O s : E '-r I E r o G E T 3 -BI T F 'L OT t ) E C T C ! P F ~ : C ! ! 1 ~ : : E " ( $ " :~t'(D
KSI )E!
MICRO -- The 6502 Journal
: >1 1 1 1 1 1
'_ .
60 06 0610
6 2 060
6 3 e640
6 065066060
67 0680e6907 9 0 R E ~ ~ ~ E : ' < ' T S T ~ Y ! " E ! ' ! E H ' ! ' != '~~CT~CT~::F R O M K E Y ! ~n~E R ~ : ! J ~ :
IF KE~/!H ) ] L ! J R : - : -
IF KEY$ .... > "~~IIT u e : , . :11.... 1 ,
IF KE"~'! .,'C:vtlfO .-, ; .") ......·_ ·.,1 ._ ··.·,'.. ~,
TUC~.rii:i.... ,
' ' [ ' + J-nT,', 70.J0_ I '_
IF K E'~/! <S ~ - ' !'" ! B ! = ! !_- . . , . V
III II'- T ! - ! P · j
10 · f-I-ITI-! -.,'..J~_.: ,_.
IF I(E\'! /F LAG :: 1:
> "P " TH E~'f t9!~G O ~ :U E ~ 1 e ! ~ ! ; t · C C !E ! r::-,
. . . . . . . . . .
710
ne0 0
7307405 0 07 5 0 R E M
P l O T
760 IFS Y M B C ! ! _ + 4
770 R P lB Y T E700
. . . . > IIE II THE~ 'l 57 ;~1
!~~~L::)C -:: 0 · G e ~~u ~:
S E T U P PRE -PU } r ~ : T : : j T U : : := - k" r e- Lh-'n, c.c,- .,. ,-n'rc,
., .. 'T , I ·_ · ·_ .~ ,_ · t · ,. ,_ , .. .J '_ ,' , ' _'
ene,, '-'\.
TU~~II ''-' !
':·'.lMi:"-!!'_ •• tl_ .. _",--
VC' I IC4"I··.·~·.._....11011
L OA !. ! : ; -E ' I T IIC.~T"I:''I.':__; ,_l'
C Y CL E - : : C Y CL E + 1
IF C Y C LE '- : : > 1 T H E ~ j s:~~8 " ~ " T E = s · , J r · ! E Q ! . _ · G C ! T C ! 4 ~ : : ~
8108 2 e B " ; 'T E = B '; - 'T E ~ H :t . ! : : ' · / ~1E : : ! ! " .: 3 3 0 R E r '1 ~:CTECT : ~ O f G ; ~ ! ~i : = . ' T ~t~~E~I~!:: ;! ~ . :RE E~fO-~JF-~~ECC~PC~
840 IF S '1 'T E ::--7 T H E ~ ' J -4~~!~~85eAt{)
8 6 0 B Y T E · = e Y T E + !:;. P O ~ : : E : :: " ! :! C ! 9 . . e ' , ; , '
T E : A O D ~ : - : : P .D C 'P + 18 le REt'1 B ·ITER U != ' f ' :C ! l . .E ~,!~·!c}_;t ,?r,~'./
L E F T M O t'E !.!N E~'~E~ "{:'E
R E M E N T E ~ ~ D ! _ ! ~ ! ~ t 1 I ,.
crooc DVTC"OJ i '~': 1 ',_ .
Dl',-UTl· . ..:,'-!" :
S T O P E
B Y T E .
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 23/84
9~39 1 09 2 09 3 0
I F !~ "j "~ r:~~C~~_" 2 THE~'~93?8 \'TE ':: E ~ ' ; ' T E -! - 6 4 :t . !:IT'~~E~~_~~~.~
1 2 3 ~ 3
1 2 4 0
HITH
1 2 5 01~,£j3
R Y
R C ' , '&....I r
C'TCIC'C C"·/YC'_ 1 '_" ',1_ ,_ r
194 e R Et': : : : T C : P ! : 3-f:r~'E :~T 8 'r'~E I ~ ~'lEE~:E~:i9 5e ! ~::Yr:~E~!~~L- £ O~:
9 8 0960
f ICl--~r!-!~l', ;-'~, .
1 2 7 £ 1
6
*28~:~.:.I·lMi:!!-j!'_ ! : .!_••_.•••
.... 7 °iUC;.;:"~; .
«(C[!P
1 2 9 01 3 e e1 3 1 £ 1
$
1320
n ~ T1 3 3 01 3 4 0135~1
1 3 6 0
ET t 'lE:~~ :' ::3 - E ~ r T ' .}ECTC~~
9 7e (:'": 'CLE 0 ~ G erc! 4 ee9 8 0 C:'r'CL.~ = i: E ~ ' · ; · I T E C"lr9~E~~~!~_.
4 8 1 - )
99010€ ' (~6 : H F 'L C T x2 : ~E :<T1 0 1 04 : H P !"'!jT :.-::-
: : - { - 3 . , Y 2 T OH1 .3 f1 R ! :! '~O T T E [ ! : : : C : .1 M 0 I F > :; =
2: H E'::T
1020
)!
1 9 5 01e60
1 0 7 0E - O t ' J L ' r '
1 0 : 3 0
l f l9f~R T O
nee111f1
111201130114011501116f1
'i~lB~1 1 7 0
J
f-f-!Tf"r'ol '_ , '0-
' - f ' + 3 ST !:~'i ...... . . . .
' . r ' _ ~- _ . T C !1.~Y2 Tn " 0 - ' ~
,_
em: '' _o r - ,
~I T n y + .::' CTC!:''_I ~
- '·lI
oj ','_:'......!-
' . _ ) + . :. .. ..'
cncj '-. .
Tn v +1 ._ ~ • 1 H P ! _ C ! :
IIJ A i l +
S T R : !1 3 7 0
' . , . 1 .: . _ v _o . • 1I . , . ' • . , v.:-.Ir • 'J." r1_
I. . fCr·iTi'ti_l·r.
vc r:.)~ill V,,._ In f t _ " :
vnc',···If.ii'~a-'r~.I-l~T.
H i: U : t .
2 '9
~-!frr'_ "_ ' r
C,',:/TC!.-, ~ t~..
I.I(C·,":·:ti I·.·..··..,_~ T H E ~ ' l i"1:'"
~:E!r~EN~ } 3 0"1/ KE" ;" FO~~Et~CH ~I~::;~j:.II
40 [!$ - =
N C o L O "5 0 P R I ~ I T€ t e . .D2"
s a REt~
IF •••• ~I TUC~.l,.' 1.11_; .r
i1':';J. :. , 1 0 , , -, _ .
: X D R ~ 'I ~ t H A " ! " : ~ ! ? ! ? - . - ; . , ; : :118J3 IN f'C~ n ~ A f ' ) E ~ : : - ! ~ ; : ~ F - ' ~ ' 7 - '
$
11901290 H - = t· 1
1 2 1 0E B Y T E
1 2 2 f . 1 t· 1
evc" C .'·_·I·~~I...
T C " I~VI-'fC ,.,-• I ._ I '_'-:r..
£'-;'TE 4
P C ! ~ < E A [ ! Q P , ~ ~ ~ ' ( T E ~::-!!]~~j~:= A D C : f ~ ' .1. L '~J7e
809 0E$
1 0 1 - 3O R110T A B L E
1 2 0 A H !IF T H E ! , !
.1'./11- ,
r CO Te!!~1 If'i[!~:'<
1 ; : 1 ~ ; ~ ? :
T ~ ~ E ~ _ ~ :
L'CM: - ", _1 _
P D ~ < F . ;~ ' f S ~ , fE~ : ~ :t : ~'i: ~ 'fC ~ C :: ; . ': .: :
I NT < ~)L;D~'....2 5S >
P O ~ < E ~ :: : ~ . } ~ ~ ;~ t ~.~i
.. . , IW
!' f P ! _ ! ~ IiQ ! ~ ! ! . ~ ~ - - : .
IF ~~:I! - = "WI N P U ' r U~::~I}~:'
- : " · f '~ f l. : ~ ' :'!
T ~ E ~ ! ~.~)?~-:, iI •i/T
C:Ct(!T:':: : - '- r : .~-;,
~:~f~'~C:C;~"~':'~":/~ . ~ - rTC !-··T·~· IfI·iU TUC~.t~ 1 r,:;'' I 1 I~_: ;
IF K I! "~~i! T~E!;rr!Tn 171~::::'.J._ r ,_. ~ ._ ..... :_
p~:!iT f~~!.:p~:~(:':f.::7 !: . . t . . ~i;::~~r~E'!.1. Ii"L . I I +
( ~ ) ! J [ :F : ': ,Ckilii-£ !I_
8: The Display Program
QCM1......~ :
T{·,Dl .C'.~.I ~l""~_"
QCM" ..... 1
oonrr11··. .. 1 t:
OC'T'.ITI ",. i:
P ~ : H ' l T"UTT ;:i~!
oc T l'~L'j =_ .. , r :'~!",.__
C'CT J IL l i:'I-!r~'fTCC' T,-! •.HIMC ' C ) ( · :"_ ... r '_ ; , ~., . , !._., I__' ',::
f · t H I - = 7 : : : ' ~' fL - : : 2 2PCM f:t"T ToO; C" C"r l l : 'I.......I ....t-• ":,.....:-.•'_".
I N P ! _ ! T Ut:H~:: ;~:~~ ~ E ~ ~ _ E
IIC"'T'" 'J: nr:'T(",OT TJ..h- "'·,i!nC:Ct:·,: .•_ I : ''!r -, , .: ~' . . . . i (1 ...'''',
PCM. . . . . . . :; C-CT ell'1 r ~.fT~C': '_ ' . : r r ~j.
T[)
Im ,.' .;.~,c",. , : , i n. . . . . _ .. ._ .. ' , . . . . . . _ .cnoe . _ ., . A O D F .: - 2 5 6 :t A H !
130 REM GET ~-l!:}.
ISPUYl
,iC C-U(-;C'C(;- cnc' Ii'_" '~I II ~I ,:.-._ : '_:.
C!:';:r ' - ._
December, 1979 MICRO -- The 6502 Journal 19:21
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 24/84
1401501 6 0170l e e1ge
200
210
t·IN - = P£Ef< ( :~OOP :: 'R E ~ I t - ! I T I A U 2£ :~CR£E~i
HG R : PO KE - 16202,0H !:!JLO ~~-=2 ~ S C : A L E = !~: O T = eF O R r = 1 T O H N
I M ! X ! - = I - 3 6 : t . I H T ( I / 3 6 , )
T~ TM(Jr, f.A. I ... ,......_. ",
GET KE";'~
> - 1 TH H ! ? 5 0
2 2 0 R E M S C ! . . . E R ~ ~~ :C R E E ~ ' f A N D Cf:E~rr
E G F .~ ! !
23 0 R E~E S240
250o T O2 6 1 3
2702 8 t 1'~QCl. . . . _ . . _ .
CAL L 6 2·~, 5~~H P L !J : 0 , 1 3 T O 2 6 5' ..! : ~ T ! : ! 2 6 5'., 1 8
0 . . 189 TO 0 " ~3FCt~~L = 4~ TO 2£9 STEF f 45
FG~ : .J = 0 TO 18 !~ :~TEP 10~PI'-'T I IIII __ r .._; ,_,
UCVT Iii~I:' _
3 0 1 3
310
Fe~:L = 30 E! 18t~ !::TE P 3 ~3
F!Jx , J = 0 TO 269 :::TEP 10~j iiT ! ,If _._ I '_ ~3 2 1 - 3
3~334 0 R E'1O f f iC I : : :
350 IF I~~C ![!~ !~ THE~ '~f ' 1 0 r . : ~ - = 36~~O~!! !N: « I : ' 1 C !C ! - 1) .,,1 6)
- = I M C ! C : - 6 : t . ~ : m · ! - 13 6 03 7 0 r - '- ' ! ', . _ . _
C 1 - =r"l - =, -..,..-.~,-'7 - =_" .. .'
3 :3 (~ IN T (I / 1e ! ~ ~: .3 90 I - H 3 t ~ :t : C 1400 H lT < C 2 .. . . H3;-410 I - l!~:t IHT (!-"10>4 20 PO~ <E~~~2 "~'fLC!' PO~ ::E2 33 " ~!!-!
4- , ; : , : .- '7 , =~ '~-'- ,-..- .- :_ .: : .3 0C 3 + 2440 I F C l ~
4 50R O H46 ( 1
2 THE t·f 4 £!~~r\T A'::: '¥ , - ' r , !;-1 t -; ..... ·r· "_"_-"_
p(J1.i 1''\1.... '••.• '1 I ,_ • .,
+ 7T~ ,-'': ' = =.&., '- ~
€ 1
470R D ! : ~
480R O ' , 449 ( l
50~510R I Y " , J52~35 3 ( 1
5 4 05 5 0
+ 7, .r- » l"IT ·~5 :t '-'nl o !- 1 i) 3!~'¥. . . .- n ' _ " _ " _ . . . :_".o 'j
,-'7 ~ : : ' ~ T45 :t : , - · , - , f o !- 1'::: 3f~ . + .. . . . . . . . . . . . '_' " . ,.
.J.. '7
RE~·'·~~ · I C ! ! · ~G E~~-:~Ht~P ~~:~
F ' C ! ~ · :: E2 3 2 . .~ ~ ~ C · ~ I C : ~ < ~ 2 2 3 " r~~DF;~~·~ H ; 4 5 : t . C C ~ ~ ~ 3e..3!~ :t :.J.. i & : :~ .i. '_ '
•.Ij:"·.lT T, , _ . 1 ) " "G E T ~·:~El.;i!TC'·iT
NIBBLE is an unusual new Newsletter
for Apple n Owners. Each Issue will
follow a major theme ... such as:
* DATABASE MANAGEMENT* PROGRAMSFOR THE HOME
* TEXT PROCESSING
* COMPUTINGFOR KIDS* SMALL BUSINESSJOBS* GAMESANDGRAPHICS* PRACTICAL PASCAL
* etc.
Significant programs will be in eachissue, surrounded by articles which
show how to USE the programming
ideas in your OWNprograms.
Examples of Upcoming Articles ...
* Building a Numeric Keypad.
* Home Credit Card Management.* LO RES Shape Writing .* Arcade Shooting Gallery Game.
* Random #'s in Assy. Language.* HI RES Weaving Design.
And many many more. NIBBLE will
literally "Nibble Away" at the myster-
ies of the Apple n to help Beginning
and Advanced Programmers, Small
Businessmen, and the Whole Family
enjoy and USE the Apple MORE!
It costs a paltry $15.00 for 8 Issues!
It will invite and publish user ideas
and programs. DON'T ¥/AIT! Send
your check or money order right now,
to receive the January issue! Mail to:
S.P.A.R.C.
P.O. Box 325
Lincoln, Mass. 01773
Software Publishing AndResearch Co.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 25/84
\
)
r
As outlined briefly in MICRO
18:511,MICRO is instituting areviewpolicy/procedure inwhich a
"Review Staff" of volunteer, in-
dependent, qualified com-
. puterists will be asked to review
6502based products:hardware, software, books, etc.
Product SubmissionWhile any6502based product is
"fair game" for a review, we planto handle products whose
manufacturer requests a review
first. The procedure is simple. Fill
out the attached "ReviewRequestForm" and send it to us. We will
select products for review from
the submitted forms and select a
reviewer from our Review Staff.We will conlact the reviewer to
make sure he is willing to reviewthe product, has time to do the
review, has no "conflict of in-
terest", etc. Once a reviewer isset, we will contact you to supply
a sample of the product you wish
reviewed. This will be sent to the
reviewer. Upon receipt of thereview, we will send a copy to you.
You will have a chance to make
comments about the review, clear
up any misunderstandings, point
out items that may have been
Manufacturer: ..............................................................................
MICROProduct Review
overlooked, discuss significant
changes and rmprovements being
planned, etc. If valid errors in the
revieware pointed out, wewill getback to the reviewer and see that
all points are clearly covered and
understood before the review isprinted. This does not mean that
you will have any editorial rights
in regards. to what is finallyprinted. It does mean that you will
have opportunities to help insure
that the review adequately coversthe important features of your pro-
duct and that minor problems will
not be blown out of perspective.
In the event that a review is, inour opinion, biased - too bad or
too favorable - wemayhavease-
cond reviewer evaluate the pro-
duct. Our goal is to be able to pre-
sent to the MICRO readers a
reviewthat is ascomplete and un-biased as possible. We think that
this will be an important service
both to the readers and to themanufacturers. Herewill bea way
to get a fair evaluation about your
product out to thousands of in-terested readers (customers?).
Since the review wm be by an in-dependent reviewer, the material
will have a lot moreimpact than a
MICRO Review Request Form
"self-serving" product newsrelease.
Supplying Samples
The manufacturer must furnish
a sample of the material to be
reviewed. In the caseof books and
software, the sample will normallybe kept by the reviewer and not
returned. In the case of hardware,
the sample will be returned. Wewould like to suggest, in the caseof hardware, that the reviewer bepermitted to purchase the hard-
ware at dealer price or some other
reasonable discount if he sodesires. If such a discount is ac-
ceptable to you, this should be
mentioned on the ReviewRequest
Form. The reviewer will not be in,
formed about any product dis-
count until after the review is
finalized in order to prevent anyunwanted bias from entering into
the review.
All of this effort to provide a
newmethod for getting reviews isintended to produce accurate, un-
biased, believeable reviews.Thesewill be of service to the readers
and manufacturers. We hope that
you will submit your 6502 based
product for review. It should
benefit everyone.
~~~
Address: .
City: State: Zip: .
Phone: Days: Evenings: .
Name of Product: .
Description of Product: - .
.......................................................................................... .
.......................................... .
6502 Systems it works with: .
.......................................................................................... .
Special Equipment/Software Required: .
.......................................................................................... .Retail Price: First Delivery: Number Delivered: .
I declare that I am the manufacturer, or legal representative of the manufacturer, and request that MICROproduce a review on this product. I agree to provide a sample of the product for review. I understand thatsoftware or book samples will not be returned, but that hardware samples will normally be returned. Iam/am not willing to provide a discount on the hardware sample to the reviewer.
Signed: Date: .
Title: .
Pleasecomplete, using additional pages if necessary, and return to : MICRO,P.O.Box6502,Chelmsford, MA01824
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 26/84
Skyles Electric Works
You love your PET , but you'lllove it more with this BigKeyboard?
74KB Big KeyBoards @ $125.00 (Plus $5.00 shipping & handling)
The Skyles Big KeyBoard™. More than 15 inches wide. A layout nearly 0dentical to the PET Keyboard and with all functions-alpha, numeric, Sgraphics, special symbols, lower case alpha-on full-sized, almost plump, .key-tops double-shot to guarantee lifetime durability.
Actual size
Would you like to turn on your PET
. . . and see this8KB 8K Memory Expansion Systems @ $250.00
(Plus $3.50 shipping & handling)
16KB 16K Memory Expansion Systems @ $450.00(Plus $5.00 shipping & handling)
24KB 24K Memory Expansion Systems @ $650.00
(Plus $5.00 shipping & handling)
Skyles Memory Expansion Systems are complete; nothing more to buy .• First qualitystatic RAMs • Solid soldered on first quality glass epoxy board. Separate PET AdapterPrinted Circuit Board connects directly to data bus on your PET -no rat's nest of hang-ing hand-wiring. Ribbon cable and 50 pin connectors that keep your PET open to theoutside world (one on the 8KB; two on the 16KB and 24KB).
__ 8KB Memory Expansion System(s) at $250 each. $ _(Adds 8,192 bytes; total 15,3 59)(shipping and handling $3.50 each)
__ 16KBMemory Expansi n System(s) at $450 each. $ _(Adds 16,384 bytes; total 23,551) (shipping and handling $5.00 each)
__ 24KB Memory Expansion System(s) at $650 each. $ _(Adds 14,576 bytes; total 31,743) (shipping and handling $7.00 each)
__ 74KB Big KeyBoard(s) at $125 $ _(shipping and handling $5.00 each)
__ SPECIAL DEAL(S): 8KB Memory and 74KB KeyBoard at $350 complete $ _
__ SPECIAL DEAL(S): 16KB Memory and 74KB KeyBoard at $525 complete $ _
• Please add 6% sales tax if you are a California resident; 6.5% if a resident of BART, Santa Clara or Santa Cruz Counties (CALPlease add shipping and handling costs as indicated.
VISA, MASTERCHARGE ORDERS CALL (800) 227-8398 (except California residents)
CALIFORNIA ORDERS PLEASE CALL (415) 494-1210
I10301 Stonydale Drive
Skyles Electric Works f4ri;)r~~~~;~;5014
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 27/84
Relocating PET BASIC
Programs
Some. i~portant details are presented about theorgamza.tlon of PET BASIC and a technique is providedto permit BASIC programs to be shifted to differentmemory locations.
,l
Have you ever wanted to time share
with your PET? How about ROM routines
in BASIC? You can do both of these and
more by writing "shifted" BASIC pro-
grams and redirecting PET's monitor.
First, I'm going to very briefly describe
where PET stores BASIC programs and
where the important pointers are
located. Then, I'll tell you how to ENTER
and RUN BASICprograms antwhere in
PET's lower 32K of memory. Finally, I'll
give you a practical example.
Initialization
j
When PET's monitor initializes
memory, either with power on or by ex-
ecuting SYS(64824), a bunch of things
happen. PET writes decimal 36 (24 HEX
or screen symbol $) into each memory
location. After each location is written
the same location is read. PET thus ac-
tively determines its contigous memory
sl.ze by finding the first non-36 location.
Since the lower page (decimal 0 to 1032)
IS used as a scratch pad, PET starts its
mem.ory check at decimal 1024. Memory
size IS stored in 134, 135, as two bytes.
The first byte is low and the second byte
is high, standard 6502 format. After
?etermining memory size, PET initializes
ItS BASIC program memory to ready it
for a BASIC program. Table 1 gives these
values. Just why these location hold
what they do requires a detailed descrip-
tion of how PET BASIC works. Such a
description is too long for this article.
December, 1979
But, this peculiar pattern is necessary.
Scratch Pad Usage
The scratch pad memory also has
some other important values. As I men-
tioned above, memory size was stored in
134, 135. Now six additional values are
inserted. These values are calledpointers. They point to locations in the
program memory where the monitor
goes during BASIC execution and/or pro-
gram entry. These pointers are BASIC
start address, simple variables star ad-
dress, array variables start address
~vailable space start address, top of str:
mqs and bottom of strings. let's see just
where these pointers are stored and
what their initial values are. The BASIC
~ointer, which is stored in memory loca-
tion 122, 123, is initialized to 1025. This
pointer tells the monitor where to start
storing and reading BASIC program
statements. The simple variables
~ointer, which is stored in memory loca-
tion 124, 125, is initialized to 1028. Thispointer tells the monitor where the sim-
ple variables start. The array variables
~ointer, which is stored in memory loca-
tions 126, 127, is also initialized to 1028.
This pointer is always equal to the sim-
ple variables pointer until an array
variable is DIMensioned. It performs a
similiar function to that of the simple
variables pointer. The available space
pointer, stored in memory locations 128,
MICRO -- The 6502 Journal
Michael Tulloch, Ph.D_103 White CircleNiceville, Fl 32578
129, is initialized to 1028. Top and bot-
~omof string variable pointers are stored
Inmemory locations 132, 133, and 130,
131 respectively. Strings are stored top
down while both simple and array
variables are stored bottom up. Figure 1
shows how PET's monitor arranges the
BASIC program and variables in
~emory. To store a BASIC program in a
different place in memory we have to
change the values of these pointers
let's assume for a moment that these
seven pointers have been changes. This
will force the monitor to try to store a
program, entered from the keyboard in a
location defined by pointer values.
However, there is one more thing which
must be done. The area which has been
defined by the seven pointers must be
initial ized as shown in table 1. Once that
has been done everything is ready. The
program is entered in the normal
fashion. When completed, the program
~an be executed without any further ad-
[ustrnents, It can be RUN or relOADed
as long as PET isn't turned off. Pro-
grams entered this way aren't in the nor-
mal place for a BASIC program.
Saving Shifted Programs
Saving a shifted program isn't as
straightfoward as you might wish. For
those lucky enough to have Version 2
ROMs it's easy. All you have to do is call
the machine language monitor and
SAVE the program like you would SAVE
a machine language program. The rest
of us have to resort to tricking the PET.
19:25
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 28/84
" : . ·E ·
~'19:;: -rt'P OF
:'E}jO~:;:IT'
E ' O T T C L . <
: :: :F : I t~I;':;
1~ : 1 : : : : : : H I ) q I ! _PE~LE
:::~H'-:!:.
10 2::: P ~'F :P 'T 'I')HH1Ht:.Lt::;
1 (et: s H " c ' ! . . . . EI ; }HR I1~8 !_E :3
1025 8H::;ICSTpr:;:T
- _ .-_ - ' . : ; .
+---------+
+ ~j +
+ T ++ F : .;.
+ 1 +
+ t·j +
+ ~-.~:;++---------+
+
+
·r
2St:*f='E~J:~(135 )+Pc.£~« 134 .:.2~>€*~'t:.!::.~~:.(.2;.3 )+PEE:~:: . ( . l.~::::)
++
Figure 1: Pet Memory Map and Pointer Locations
+---------+
+ .', < +
+ . . • . +
+ r j< "7 ) +_ ,
+---------+
+ .~'. ++ [I +
+ c +
+ 1 -" =" ~ . +'':'"
+ +
+ - - - - - - - - - ++ e-. ++ ++ 8wnc ++ PHOGF:P t · i ++ ++---------+
When SAVE is used from the keyboard
the routine initializes one of the cassette
buffer pointers to 1024. POKEing the
starting address of the shifted program
doesn't work (and finding this out
delayed this article several months-I was
SAVING all of memory from 1024 up)!
Fortunately there is a way around this
problem. IN "Commodore PET Users
Club Newsletter", Vol. 1, Issue 4&5 there
is a program which demonstrates just
what we need to trick the PET. Table 2lists the required lines. By using SYS to
access the SAVE routine we can bypass
the initialization. The listed code can be
used either as direct commands or as
part of a program.
How it Works
Line 1 sets the first address for
cassette #1. Lines 2 and 3 set the high(S)and low (A) bytes of the start address.
Lines 4 and 5 set, in a similiar fashion,
set the end address ,to the value of the
simple variables start address. This ad-
dress is the same as the ·end of the
BASIC program. Une 6 calls 'the SAVE
routine. There is one disadvantage-this
simple approach leaves the program
name undefined. "$$$" or" "is assign-
ed as the file name, Shifted programs
can be l:OADed, and VERIFIED just iike
19:26
regular BASIC programs. However, if the
monitor-has reinitialized memory, any at-
tempt to LIST or RUN a shifted program
will fail. If a shifted program has been
SAVEd, PET turned off and back on, and
the shifted program is relOADed it still
cannot be LISTed or RUN.
How come? I did just say it would
RUN when entered from the keyboard.
Well, it's those seven pointers. When
PET SAVEs a program, any program, i1
Memory location
Sase 10 Hex
1024 400
1D25 401
1026 402
1027 403
1028 4041029 405
1030 406
1031 407
1032 408
1033 409
1034 40A
1035 40S
1036 40C
stores an image of the program as it ap-
pears in RAM. However, not all of the
pointer values are stored on the tape.
Since PET uses a compiled (not really
compiled like FORTRAN but actually
compacted) listing, it must also store
the forward chain addresses along with
the compacted code. Each BASIC state-
ment has a forward chain address. This
forward chain address points to the for-
ward chain address of the next BASIC
statement. Therefore, the program mustbe stored in exactly the same memory
location from which it originally came.
Forward cahin addressing is absolute
rather than relative. If PET has reinitializ-
ed its potnters, the BASIC pointer is
pointing to the normal BASIC location.
Upon loading a BASIC program tape
under keyboard control the SV, AV, AS
registers are loaded with data from the
tape. Unfortunately, the monitor
assumes BASIC programs will always
start at .1025. Therefore when PET is ask-
ed to RUN or LIST, the monitor will start
looking at 1025. It won't find a program.
To use a shifted program after it has
been lOADed back into the PET the
BASIC pointer must be changed.
There are several ways to do this.
One can simply POKE the correct values
into the pointer memory locations. This
works, but if you make a mistake the
PET will "go away" when you try to RUN
the program. With version I ROMs the
only thing you can do is turn the PET off.
There may be a good side to this ap-
proach; it can be used as a neat way to
protect a program. Wi1hout some clever
PEEKing at RAM and without understan-
ding how to set the pointers based upon
that PEEKing, the program won't run.
Another approach is to have a machine
language program do the required in-
itialization. With this approach several
shifted programs can be RUN at once.
To call a specific program you can use
the USER (X ) or SYS commands. The
machine language program does the
rest. I'll give an example of a simple
routine like this in the last section.
Value
Base 10 Hex
0 0
0 0
0 0
36 24
73 490 0
139 8B
0 0
0 0
0 0
0 0
0 0
36 24
Table 1: Pet BASIC Initialization Values
MICRO -- The 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 29/84
I
!~] p n r , : : " ~ · : : ' . : : L i j.; r:::E~·J:~EI)Ct. ::t( 1 .=T;:!PE 1)
105 R=cEEK( 22):B=PEEK(12~); I
someone familiar with the PETmontior
could adapt its program adjustmentsoftware. It works on normal programs
and it sure is fast. PETuses the routinewhenever new lines are added or old
lines deleted. If variable pointers are thesame for all programs and if assignment
statements are used to initialize all pro-grams, then several programs might be
able to share the variable working area. Ihaven't tried a lot of this, but it doeswork in simple cases.This technique will
allow FORTRAN like passed variablesubroutines, support BLOCK type
statements and conserve a lot ofmemory.
REM BPS C STORl ~U!NI~R
II
~q:3ICt = J ·D
I
110 P O K E 2 4 7 1 ~ : P O K E 2 4 8 , 8 :hEr~ : : = , ~ : ' I ) E J = " r ; : C L1 P O I ~.;;~=r;:
120 8 = P E E V ( J . 2 . 4) : ! : 'CW:E22:3 18: R E ~ ' 1130 B=PEEK(125):~UKt~~~~~:~tM140 :3Y:383153:
R E M R O M SRUE R O U T I ~ ER~~D'r ' •
Figure 2
So much for the pitfalls, here'ssome of the good news.The shifted pro-
gram technique can be used for BASIC
programs to coexist with Commodore's
tape machine language monitor. Sure,
you'll be able to buy a newset of ROMs
that have the monitor-someday. But
you can havenearly the same-thing now.You may need an additional routine to
transfer the bottom of paqe one (OA-22hex) memory back and forth between
machine language monitor and BASIC
usage. Both BASIC and the machinelanguage monitor want this part ofmemory for scratch pad.
Shifted programming has several
advantages but there are also some pit-
falls. I'm sure that I haven't found them
all. I'll tell you about those that I'vefallen into, and Murphy will find some
new ones for you. As a first example,let's take the case where shifted pro-grams are loaded in under keyboard con-trol. When this is done, all memoryabove 1024 is reinitiallzed. Any shifted
programs already in memory are 36'dout. Theonly way to prevent this is to ad-
just the top of memory pointer so that itpoints below the existing shifted pro-
grams. This must bedone before atemp-ting to LOADfrom the keyboard. Shifted
(or normal) programs LOADedunder pro-
gram control do not 36out memory. Butthe first part of memorymay beset upto
receive BASIC. In addition, pointersaren't changed.
Another pitfall is the tendency for
PET to "go away". Any error in polnter
setup will usually c use this problem. Itis the rule rather th n the exception. Ver-sion 2 ROMs are umored to allow a
warm reset. Unfort nately, they aren'tavailable for the o n 8K PETsyet.
A third pitfall is really just the result
of careless progra mingoThe availablespace within any rogram should bereduced as much a possible. Programspace includes v riable and stringspace. Although m PET has 16K ofmemory (half in BET I),I've found it easyto over-run memory or to overlap pro-
grams. If multiple ASIC programs are
to coexist, a mem ry map and someplanning are neces ary. I don;t have a
dynamic adjustmen routine. Perhaps
What else can be done with shiftedBASIC programs? ROM BASIC pro-grams, truly modular development,
library routines, and lots more. Now that
BASICprograms can beplacedwherever
you want them, your imagination is theonly limit.
)/'
T.['.Q.
TAPE DAl A QUERY
THE IDEAL SOLUTION FOR PERSONAL AND
VERY·SMALL BUSINESS DATA MANAGEMENT
PET·8K TRS·80·LVL II• COMPLETE CASSETrE ILE MANAGEMENT SYSTEM
- ENGLISH-LIKE ( OMMAND LANGUAGE- REPORT GENEFATOR- UTILITY PACKA~E- NO PROGRAM~ ING KNOWLEDGE REQUIRED- REQUIRES 2 CA~SETTE RECORDERS
• T.D.Q. APPLICATION C~SEBOOK
COMPLETE DIRECTIONS 1,0 MICRO-COMPUTERIZE:• INVENTORY CONTROL • CUSTOMER DIRECTORY• ACCOUNTS RECEIVABLE • APPOINTMENT SCHEDULING• ORDER PROCESSING • VENDOR MASTER FILE
• LABEL PRINTING • PAYROLL JOURNAL• CHECK PRINTING • CHECKBOOK JOURNAL.INVOICE PRINTING • TELEPHONE BOOK
• RENT COLLECTION
•• SPECIAL YEAR-END SALE PRICE - $100_00·· - INCLUDES:CASEBOOK; 2 CASSETTES; 3 USER'S MANUALS & REF. CARDS
ORDERS MUST BE R~CEIVED BY JAN. 31, 1980
SEND CHECK Dil l MONEY-ORDER TO :
i
H. GELLER CO~~PUTERSYSTEMSDEPT. M
P.O.EOX 350NEW YORI<, N.Y. 10040(N. Y . RESIDENT~ ADD SALES TAX)
)
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 30/84
High Iresolutlon LIght PenMlcromodem (D.C.Hayesl .
12" B IW Leebex MonitorCable from Mon itor to App le I I13" Color TV Compatible withApple II 290.00
CDmputc!r~~~~~~~~:reBkN03 ;~;LlSA-lntel'3ctlve dlslCassembler 34 95
~a:eTS~;;:~~l Ient con3vi~~~&:1 :8al(~25.oo
S~~~Op~i :r a~ rreOf 2nd Wes t Coas t 19 .95
APPLEPIE-Excellent text eencr 24.95FORTE-Muslc ealtor In hires 19,95FASTGAMMON-Excellent backgammongame wi th graphi cs Tape 20.00 Di sk 25.00APPLE21 -Excellent b lackj ack game 9 .95
BRIDGECHALLENCER-Computer brlage 14.95FINANCIAL MANAGEMENTSYSTEM.. ,"ccounts P3V~ .. leag@r Processing• Accounts Receivable • payroll
: _~n2"&,n~~1~~~~ : ~~~;~~~~~~
PRINTEI SPKJALS ~R APPLE AND PET
TRENDCDM100 with Interface forApple or PET
2001-8 $795 CBM20232001-16N $995 Prlnter $8492oo1-32N $1295 IEEEto IEEE2001-32B .. $1295 Cable $49.95ExternalCassette.PETto IEEECable. . . $39.95
2001-168$995
-Join Now~ABecome a m of ComputerWorld's RAYGAMCOComputer Discount Club.By being a RAYGAMCO Member you receive substantial discounts on every item you purchase,including all hardware, software, accessories, even books and paper! You will also receive amonthly newsletter with all the latest available for your particular computer system, and much,much more - exclusive to RAYGAMCO Members only!Here's how to join.Nothing to buy. Simply complete the self-addressed postcard in this magazine with name,
address, and your computer system. You'll receive your personalized RAYGAMCO ComputerDiscount Club Membership Card in the mail with information on how to use your card whenordering for big savings!
Charter RAYGAMCOMembers' Special. Join now and receive 20% OFF of any purchase.*' 20% of fer expi res December 24 , 1979. O ffer i s va lid for RAYGAMCO Membe rs on ly.
APPle II Reference ManualApple Soft Manual . .Pr~rammer's Culcie(Computer Station) ..
App e II Monitor Peeled . . . . . .Software Directory for Apple• Business,Finance & Utility• Cames,Demo, UtilityBestof Contact '78 .Programming InPASCALCrogono) ..
.. $10.0010.00· .5.95
. ..... 9.95· .4.95· .4.95
. 2.50. 9.90
199.0037900
149.00
9.95
LITEPENused with TVor monitorscreen 34.95ALFMusic Synthesizer Boards 265.005upertalker 279.00Anadex DP-8000 with rracter8" paper width and Interfaceto Apple 1050.00Centronics 779-2 for Apple IIwith parallel Interface 1245.00
SOfTWARE (Send for complete SoftwareCatalog $1_001
Dow Jones portfolio EvalUator,lStock eucre Reporter Disk 50_00Mlcrochess 2.0 Chess Disk 25.00
DiskUtili ty PaCkwltn DOS3.2 25.00The Controller (General BUSinessSystem) 625.00Apple Post IMalling list Systeml 49.95
Bowling PrOQr3m oueeree- 15_00The c a sn re r tRetall5tore Management 250_00Checkbook Cassette 20.00
Applesoft " language & Demo
Cassette 20.00RAMTeSt race with Manual 7.50Finance 1-2 Cassette Package 2500Datamover I Telepong Cassette(Com. Card & Modem ReQ'OI 7 SOMlcrochess 2.0 Chess Tape 20.00Bowling Program Tape 15.00Pascal with language System
I 1481(rAM & Disk IIeeouiren 495 00
$1895.00 for dual driveI.
tlClppktcomputarJoystick for Apple" Only $39.95 eac
ComputerWorld's Complete Library of
600 Apple "programs Only $60.00
Commodore PETService Kit .Beeper-Tells when tape IsLoadedPetunia-Play music with PET .. . ...Video Buffer-Attach another displayCombO-Petunia and Video Buffer
S O FTW AR E F O R P ET
. . . $30.0024.95.29.9529.9549.95
Mirrors and Lenses. . .19.95
The States .14.95RealEstate 1 & 2 . .. . ... 59.95MomentumandEnergy. 19.95ProJectile Motion 19.95Mortgage .. 14.95Dow Jones 7.95Petunia Player Sftwr. .14.95
Checkersand Baccarat .... 7.95
Chess. . . .. .... 19.95Seriesand parallelCircuit Analysis ..... 19.95Home Accounting .9.95BASICMath 29.95CamePlaying with BASICvot. I, II, III 9.95 each
ACCESSORIESDlslI:II-Drive OnlyDisk II-Drive & cenrrcuer (321(Min.RAMRecommenGeaIVinyl carrying CaseTape Recorder ..
Programmers Ala No. 1 Firmware (forus e with Integer BASIC)Clock ICalendar CardAuto-Start ROMPackage IForApple IIOnly)
Dlglkltlzer Pad by Talos
(1(Itform) ..
INTERFACECAIDSPrototyPlng IHobby card
Parallel Printer Interface cardCommunications Card & DB25Connector cableHigh-Speed Serial Interface card
l~~.r=X:' S~~~~~I ~~r;uir~lal
Applesof t " fi rmware card16Input Analog Card
$ 24.00180.00
225.00195.00
495.00
200.0029500
495.00
595.0030.0040.00
50.00199.00
65.00
499.00
New for Apple Computer Ownersat Low ComputerWorld Prices8" Disk Drives with housing $1295.00 for single drive
A P R O FES S IO N A LB U S IN E S S S Y S TE M~ CMB2022
~ C O C B M ~ : 'c caM ~-
CoftlRulerWorldA RAYGAM COMPANY
6791 Westminster Ave., Westminster, CA 92683 (714) 891-2587
. . $95 CBM2040$1295
II
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 31/84
WANTED: A T A R I ®••• FIND IT AT COMPUTERWORLD.
ATARI® S O O T MPERSONAL COMPUTER SYSTEM
PRICE INCLUDES:
Computer Console
BASIC Language Cartr idge
Education System Mas ter Cartridge
BASIC Language programming
Manual (Wiley)
800 Operator's Manual with Note Book
ATARI 410 Program RecorderGuide to BASIC Programming Casset te
8K RAM Module· Power Supply.
TV Switch BOx
$99999
A TA RI® 4O 0™PERSONAL COMPUTER
SYSTEM
PRICE INCLUDES:
Computer Console
BASIC Language Cartr idge
BASIC Language programming
Manual (Wiley)
400 Operator's Manual with
Note BookPower Supply
TV Switch Box
$54999
P ER IP H ER ALS A ND A CCES SO R IESATAR F 810™D IS C DR IV E ·DISKETTES .
CX8100 BLANK DISKETIES'CX8101 DISK FILE MANAGER'
ss .oo /ea
A T A R P " 820™P R I N TER · $599.99
ACCESSORY CONTROLLERS
CX2C-01 DRIVING CONTROLLER PAIRCX30-04 PADDLE CONTROLLER PAIRCX40-04 JOYSTICK CONTROLLER PAIR
S19.9S/ea.
ATAR I® 410TMP RO G R AM R ECO R DER $89_99ADD-ON MEMORY (800 ONLYI
CX8S2 8K RAM MEMORY MODULE $124.99CX85316K RAM MEMORY MODULE $249.99
$749.99
S O F TWA R EGAMES , , , , . , , , $49.99/ ea. APPUCATION _ .... , _ ... $69.99
CXL4002 ATARI BASICCXL4003 ASSEMBLER DEBUG"CXL4007 MUSIC COMPOSERCXL4009 COMPUTER CHESS' •
ROM CARTRIDGES
CXL4001 EDUCATION SYSTEM MASTERCARTRIDGE . . . . .. $34.99KEY: IJ) = uses jovsncx control le r
IP) = uses paddle control le rIdl = uses driving control le r
CXL4004 BASKETBALLCXL4005 LIFE. . . .. . ...CXL4006 SUPER BREAKOUTTMCX4008 SUPER 8UGTM'-
IjII))
IP)« n IjI
EDUCATION SYSTEM CASSETTE PROGRAMS $39.99/ea.BASIC GAME ANDPROGRAM CASSETTES
CX4101 GUIDE TO 8ASIC PROGRAMMING'CX4102 BASIC GAME PROGRAMS'
$29.9S/ea.
• octoeer Delivery .. November Delivery
CX6001 U.S. HISTORYCX6002 U.S. GOVERNMENTCX6003 SUPERVISORY SKILLSCX6004 WORLD HISTORY IWESTERN)CX6005 BASIC SOCIOLOGYCX6006 COUNSELING PROCEDURESCX6007 PRINCIPLES OF ACCOUNTINGCX6008 PHYSICS
CX6009 GREAT CLASSICS (ENGLISH)CX6010 BUSINESS COMMUNICATIONSCX6011 BASIC PSYCHOLOGYCX6012 EFFECTIVE WRITINGCX6013 AUTO MECHANICSCX6014 PRINCIPLES OF ECONOMICSCX6015 SPELLINGCX6016 BASIC ELECTRICITYCX6017 BASIC ALGE8RA -Prices subject to change.-
We Promise to Deliver!• We GUARANTEE ship dates on prepaid Computer System orders.*• If for reasons beyond our control we miss a ship date, WE WILL REFUND THE SHIPPINGAND HANDLING CHARGES TO YOU - PLUS GIVE YOU A 10% DISCOUNT ON YOLIRNEXT PURCHASE OF ANY ATARI SOFTWARE!• For prepaid Computer System orders, you'll receive an Accessory Controller of your choice.
'AII prepaid orders must be for full amount by Cashier' s Check only, payable to ComputerWorld. Calif ornia residents, please add 6% sales tax.
ORDERING INFORMATION: TELEX 1822741. Type or print item(s) you wish to order.
2. If you pay by personal check: please allow 2 weeks for personal check to clear.3. If you pay with bank card: We accept VISA, BankAmericard, MasterCharge. Please include bank card number,
card expiration date, and your Signature.4. Add 50¢ for postage and handling of books, manuals, catalogs, and magazines. Add $10.00 for shipping,
handling, and insurance for hardware and systems orders.
5. Send orders to ComputerWorld, 6791 Westminster Ave., Westminster, CA 92683. California residents, please add6% sales tax.
ComRulerWorldA RAYGAM COMPANY
6791 Westminster Ave., Westminster, CA 92683 (714) 891-2587
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 32/84
FOR
10 Boards $298G r o w t o a F L O P P Y o n y o u r C 1 - P o r
8K static expandableto 24K and dual mini-floppy controlier
_COLOR
C O I P U T I R S16COLOBS
The C4P and C8P offer a brilliantarray of 16colors including
black available in both alphabetics andgraphics. The C4P and C8P
have execution speed that istwice as
fastas Apple II, or Commodore
PETand over THREEtimes as fastas TRS-80 more display than
other personal computers.
$399 for
COLOR MONITORB l A T T H I R U S H - . a l R O R P IC K R U P N o l !
o Send me a
• Apple II, Commodore PET. TRS-BO.and Alan 8(X) are reqrstered trade names ofApple Computer Inc.. Commodore Business Machines Ltd.. Redic !:)'hack.,Atari, respectively.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enclosed
Name _
Address _
LDmpUTEPlSHDP CreditCardAccounl'~ _
City ------------- Boston UnionNH Cambridge
State Zip 590Comm.Ave. file lot! 2B8Nor1o!k51. Expires ---
(acrossfromB.U.) 603-473-2323 (nearM.1 T) TOTALCHARGEDORENCLOSED _Phone ~ 247-0700 661-2670 All orders shipped Insured UPS unless ornerwrse requested
Paymentby BAC(VISA) _MasterCharge _
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 33/84
'\ I f You. Treat It Nicely
It Won't Byte
Tools and techniques for using the Superboard II arepresented - including a Double Disassembler. This pro-gram gives a lot of information about each byte ofmemory, not just the opcode. Several other Superboardfeatures are discussed.
I selected the Superboard " for useas an intelligent terminal in a PDP-II
system. It enables the designer of a
distributed processing system to take a
number of liberties due to the speedand
power of each distributed branch.Before this multi-processor system can
come into full operation, a number of
things need to be discovered about the
internal workings of the Superboard.
This article describes some of the tools,
techniques and discoveries found on the
road to the goal. I hope you find them as
useful as I have.
)
In order to really gain an under-standing of the inner workings, a
disassembler or something similar will
be required, as the monitor leaves a lot
to bedesired. The listing in figure 1uses
about 3.6K of memory, i.e. you need atleast 5K to run it. It is a combination
December, 1979
mnemonic lister and intelligent
disassembler. The leftmost column willalways print amnemonic, thusly treating
each and every instruction as though itwere only one byte in length. The
rightmost column attempts to decipherwhether the instruction is one, two, or
three bytes in length and differentiate its
print to distinguish op-codes from their
operands. Columns two and three are
the address and op-code in decimal formto help when using PEEKand POKEat
later times. The fourth column prints any
valid ASCII characters that it finds tohelp with the recognition of text or
buried cues when the disassembler
"gets confused" and has to re-sync
itself or might needsome help.
The reason I mention manual re -sync is that one soon grows weary of
MICRO'-- The 6502Journal
Jack Robert Swindell
P.O. Box 8193Canton, OH 44711
seeing "resync??????" time and time
again when the program is running
through a giant table of either stringdata or numeric data. Of course it will reo
sync...but why waste the paper? On to
columns five and six; these have the ad-
dress and op-code in hexidecimal formatto help when looking in books (whichare
nearly all in hex now).Therightmost and
seventh column is what it is all about.
The seventh column is the in-
telligent column. It attempts to conveyto you its interpretation of what it'sreading out of memory. It does not rese-
quence the order of bytes for printing
when looking at a multi-byte instruction
asmanydisassemblers do. I didn't deem
it necessary at the time. To illustrate mypoint, look at illustration 2. The JSR athex0222 hasABdirectly following it andCD two bytes later. A little human
19:31
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 34/84
translation saves much software. ,,-lustration 2 is a nonsense program,thereonly to showyou what it looks likewhen it runs and how it runs. Hex lines
0228to 022Cshow what happens whenthe program runs into something itdoesn't recognize; the string prompt"CARP?". The response is always the
same: it prints the first line it didn'trecognize followed by the row of ques-
tion marks and then four more lineswithout trying to assign an "intelligent"
co-code or do anything else except getready to re-sync(or try) on the fifth byteafter the initial unlock. If this byte also
lacks a valid mnemonic the process isrepeated until i t finally drops out andfinds one.
After you start the program, it willask you for the addresses of the lowestbyte and the highest byte that you wantit to try to disassemble. This must bein-put in decimal form as the program hasno provisions for a hexidecimal todecimal converter. The next thing thatwe'll do is examine the program to helpyou to see how it works and where thevarious routines are. Lines 100 through
730 comprise the data table. Eachdatastatement holds the information todecode four different instructions of6502op-codes and also "fillers" to tellthe program when a non-exlstant in-struction is found. The format is"MNEMONIC", NUMBEROF BYTESforthat instruction. If it is a non-existant in-struction then the data statement for itwill read: "?" ,9. Since as far as I knowthere aren't any nine byte 6502 instruc-tions, it sticks out quite well amidst aforest of ones, twos, and threes.
Now it's time for th e fun part. Line1020 inputs the address range to beworked on. Lines 1040and 1050print the
header: Line 1070 sets the major loopwhich cycles through the op-codes onebyte at a time. 1100to 1120 cause the
data table to be scanned until the cor-rect op-code is found. The second state-ment in line 1120 tells the program thetotal number of lines to print withoutmnemonics when it gets out of sync.
1130to 1150print the leftmost four col-umns. 1220 to 1260 control theprogram's intelligence and tell it whenand when not to try and print amnemonic in the rightmost column.
A GOSUB1500with 0 to 15 in Hwillreturn the hexadecimal equivalent in H$.GOSUB1400with 0 to 255 in 0 returns
the hex equivalent in 1$.GOSUB 1300with 0 to 65535in R returns 0000to FFFF
(hex) in J$. These last three routines are"quick and dirty" but may be of someuse to you at a later time. Thedata tableis easily modified to allow for future ex-pansion. Standard Hockwell/Sybexmnemonics are used except for the useof hyphens as opposed to commas (the
data statements WOUldn'tlike these toowell I fear).
19:32
Input low&hish addresses of block to be listed:Decimal? 546,565
I'INE A-nEC O-nEC ASCII A-HEX O-HEX I'INE (ifvalid )
JSR 546 32 0222 20 JSR
'? 547 171 0223 AB *** AB ***CMP 548 205 0224 CD *** CD ***
JSR 549 32 0225 20 JSR
? 550 18 0226 12 *** 12 ***? 551 52 4 0227 34 *** 34 ***
? 552 67 C 0228 43 ?Resync??????????????????????????????????????????11???????????????EOR-I-X 553 65 A 0229 41 *** 41 ***? 554 82 R 022A 52 *** 52 ***BVC 555 80 P 022B 50 *** 50 ***? 556 63 ? 022C 3F *** 3F ***
BRK 557 0 022D 00 BR K
PHA 558 72 H 022E 48 PHA
TXA 559 138 022F 8A TXA
CI'IP-IMM 560 201 0230 C9 CI'IP-II'II'I? 561 67 C 0231 43 *** 43 ***
BNE 562 208 0232 DO BHESBC-O-P-X 563 245 0233 F5 *** F5 ***
NOP 564 234 0234 EA NOP
NOP 565 234 0235 EA NOP
Figure 2
50000 FORD~BTOB+11'CSTEPC:POKED.32:NEXTD:A'.STR'(A):E=LEN(A')5 0 01 0 F O RF = BT O B+ ( E- 1 ). C ST E PC : PO K EF . AS C (H I D. ( A • • ( F - B+ C )/ C .1 ) )' NE X TF5 00 20 R ET UR N
OKFigure 3
Numeric To Video Conversion
This short BASICroutine will enableyou to print numeric variables on yourvideo monitor while your software is
busy generating real-time graphics. Seefigure (3). The opeeration is not overlycomplex. First the program clears thescreen positions which are going tohave new characters placed there. Thisis done by POKEingblanks there with aFOR-NEXTloop. The number that youaregoing to display is first converted toa string with the STR$ function. Thelength of the resultant string is foundwith the LENfunction. MID$is usedwith
a FOR-NEXTloop to dissect the stringinto individual characters which arecon-verted to the correct values to bePOK'dinto the screen memory with the ASefunction.
The display is a fixed format whichuses the 12 screen positions: the man-tissa sign, 6 digits of mantissa with adecimal point, exponent sign and twodigits of exponent. Or ±O.ooOOOE00.
MICRO -- The 6502 Journal
1 0 0 F O R D= 5 3 24 0 T 05 4 2 71 : P OK E D ,3 2 : NE X T D1 10 B =5 37 761 2 0 A = R ND ( 2 )* 1 0 ~( RN D ( 4) * 1 0)1 3 0 C = 1: G OS U B5 0 00 01 4 0 F O R C= 3 4 T0 3 0 ST E P -1 : G OS U B 50 0 0 0: N E XT C1 5 0 C = -1 : GO S UB 5 00 0 01 6 0 F O R C= - 3 4T O - 30 l G OS U B 50 0 0 0: H E XT C1 70 G OT 01 20
OK
Figure 4
Beware of blank characters when ex-
amining strings for videoconversion! 12screen positions ARE required! It is im-portant to remember that when thenumber is pushed into the display the
starting videoaddresswill always bethemantissa sign position. This can beanyscreen address but beware of overlapp-ingwhenyoutry and print off the edgeofthe screen. The number to bedisplayedneednot always bedisplayed ina left toright fashion. By changing the video in-crementing factor many print anglesbecome possible. Here is a listing in aclock fashion with the mantissa sign atthe starting video address.
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 35/84
***************** 1 o'clock - 31 * 7 o'clock 31*
* 2 o'clock - 30 * 8 o'clock 30*
* 3 o'clock 1 * 9 o'clock - 1 **4 o'clock 34 * 10 o'clock-34*
* 5 o'clock 33 * 11 o'clock - 33*
* 6 o'clock 32 * 12 o'clock - 32 *
**.**************
To run this' routine place the
number which you wish merged to thedisplay in register A. Load the starting
videoaddress in register B.Put the video
incrementing factor in register C.Gosub
50000.OnceA, B, and C are loaded theyremain intact after program execution.
A picture is worth a thousand words
(2Kbytes?). Loadand run the program infigure (4) to see both how all the dif-ferent display angles look and what hap-
pens when a scientific notation display
is caused to overlap the edge of the
display when run at a steep angle. Make
sure you load figure (3)or it will try and
call a non-existant subroutine.
On-Screen Expose'
Did you know that there is a
graphics/control character that you can
print on the screen by just pressing two
keys?There is! Control Gwill create the
character that you see when you try to
type in a line that's a bit too long. Youcan type it into a string just like it was a
letter or symbol. As an added bonus, ifyou have a printer tied in, it will ring itsbell...instant prompt.
I haveone more thing of interest for
you before I return to bury myself in my
favorite world of semiconductors andsoftware. The location (in page zero) of
the on screen text begins at 19 decimal
and continues up to 90 decimal whichalways contains a zerowhen examined.
Therefore 71 bytes can be defined, the
72ndis a zero.Toseewhat I meando the
following in command mode:
1) Press Return (to make sureeverything is terminated).
2)Hold down the space bar until the
screen starts to show the control Gcharacters mentioned earlier.
3)Press Return (this clears the onscreen text internally).
4) Type
perfectly:FORS = 19T090:?CHR$(PEEK(S));:NEXTS.
5) Press Return.
)
Now do you see what I mean?Hap-
py computing, that's all for now. Wouldanyonewant to hearabout aSuperboard
speedup?Almost 2MHZor double speed
and it doesn't alter the I/O baud rates,
however, none of the OSI RAM chipscould cut the mustard. If youwant anar-ticle on this, write! Bye.
December, 1979
Fig. (Listing) 1.
10 R EM D ouble D is ass eff ibler20 REM Written b~30 REM Jack Robert Swindell40 REM Au~ust 23, 19791 0 0 D A TA 'B R K' 0 1 , ' O HA - -I '' 'X '2,"i",9, '? ,O r1 1 0 D A T A'? ' , '1,·O R A- O - ·f ; '·2, •ASL·..O·-p·2, '," ,'1120 DATA'PHP',1,'ORA-IMM',2,'ASL-A',1,'?',91 30 D AT A' ?' , 9, ' O RA ' , 3 , ' AS L' , 3, ' ? ', 91 40 D AT A' SP L' , 2, ' Of ~ A- 'I -Y '2 , . ? , 9, ' ? ', 9150 DATA'?',9,'ORA-0-P-X',2,'ASL-0-P-X',2,'?',91 60 D AT A'C LC ', 1 , 'O HA -Y ' , 3, . ? , 9, ' ?' ,9
1 70 D AT A' ?' , 9, ' O RA "X ' , 3, ' A SL -X ' , 3, ' ? ', 91 80 D AT A' JS R' , 3, · AN D- ·I ·- X·2 , . ? , 9, ' ?' ,9190 DATA'BIT-0-P',2,'AND-0-P',2,'ROL-0-P',2,'?',9200 DATA'PLP',1,'AND-IMM',2,'ROL-A',1,'?',92 10 D AT A' BI T' , 3, ' A ND ' , 3, ' RO L' , 3, ' ? ', 92 20 D AT A'B MI ' , 2, ' AN D- I- Y' , 2, . ? , 9, ' ?', 9230 DATA'?',9,'AND-O-P-X',2,'ROL-O-P-X',2,'?',92 40 D AT A' SE C' , 1 , ' AN D- Y' , 3, ' ? ' , 9, ' ? ', 9250 DATA'?',9,'AND-X',3,'ROL-X',3,'?',92 60 D AT A' RT I' , 1 , ' EO R- I- X' , 2, ' ?' , 9 , ' ?' ,9270 DATA'?',9,'EOR-0-P',2,'LSR-0-P',2,'?',9280 DATA'PHA',1,'EOR-IMM',2,'LSR-A',1,'?',9290 DATA'JMP',3,'EOR',3,'LSR',3,'?',9300 DATA'BVC',2,'EOR-I-Y',2,'?',9,'?',9310 DATA'?',9,'EOR-0-P-X',2,'LSR-0-P-X',2,'?',93 20 D AT A'C LI ', 1 , 'E OR -Y ' , 3, . ? , 9, "r',9330 DATA'?',9,'EOR-X',3,'LSR-X',3,'?',9340 DATA'RTS',1,'ADC-I-X',2,'?',9,'?',9350 DATA'?',9,'ADC-0-P',2,'ROR-0-P',2,'?',9
360 DATA'PLA',1,'ADC-IMM',2,'ROR-A',1,'?',9370 DATA'JMP-I',3,'ADC',3,'ROR',3,'?',9380 DATA'BVS',2,'ADC-I-Y',2,'?',9,'?',9390 DATA'?',9,'ADC-0-P-X',2,'ROR-0-P-X',2,'?',9400 DATA'SEI',1,'ADC-Y',3,'?',9,'?',9410 DATA'?',9,'ADC-X',3,'?',9,'?',9420 DATA'?',9,'STA-I-X',2,'?',9,'?',9430 DATA'STY-0-P',2,'STA-0-P',2,'STX-0-P',2,'?',9440 DATA'DEY',1,'?',9,'TXA',1,'?',9450 DATA'STY',3,'STA',3,'STX',3,'?',9460 DATA'BCC',2,'STA-I-Y',2,'?',9,'?',9470 DATA'STY-0-P-X',2,'STA-0-P-X',2,'STX-0-P-X',2,'?',9480 DATA'TYA',1,'STA-Y',3,'TXS',1,'?',9490 DATA'?',9,'STA-X',3,'?',9,'?',9500 DATA'LDY-IMM',2,'LDA-I-X',2,'LDX-IMM',2,'?',9510 DATA'LDY-0-P',2,'LDA-0-P',2,'LDX-0-P',2,'?',9520 DATA'TAY',1,'LDA-IMM',2,'TAX',1,'?',9530 DATA'LDY',3,'LDA',3,'LDX',3,'?',9540 DATA'BCS',2,'LDA-I-Y',2,'?',9,'?',9
550 DATA'LDY-0-P-X',2,'LDA-0-P-X',2,'LDX-0-P-Y',2,'?',9560 DATA'CLV',1,'LDA-Y',3,'TSX',1,"',9570 DATA'LDY-X',3,'LDA-X',3,'LDX-Y',3,'?',9580 DATA'CPY-IMM',2,'CMP-I-X',2,'?',9,'?',9590 DATA'CPY-0~P',2,'CMP-0-P',2,'DEC-0-P',2,'?',9600 DATA'INY',1,'CMP-IMM',2,'DEX',1,'?',9610 DATA'CPY',3,'CMP',3,'DEC',3,'?',9620 DATA'BNE',2,'CMP-I-Y',2,'?',9,'?',9630 DATA'?',9,'CMP-0-P-X',2,'DEC-0-P-X',2,'?',9640 DATA'CLD',1,'CMP-Y',3,'?',9,'?',9650 DATA'?',9,'CMP-X',3,'DEC-X',3,'?',9660 DATA'CPX-IMM',2,'SBC-I-X',2,'?',9,'?',9670 DATA'CPX-0-P',2,'SBC-0-P',2,'INC-0-P',2,'?',9680 DATA'INX',1,'SBC-IMM',2,'NOP',1,'?',9690 DATA'CPX',3,'SBC',3,'INC',3,'?',9700 DATA'BEO',2,'SBC-I-Y',2,'?',9,'?',9710 DATA'?',9,'SBC-0-P-X',2,'INC-0-P-X',2,'?',9720 DATA'SED',1,'SBC-Y',3,'?',9,'?',9730 DATA'?',9,'SBC-X',3,'INC-X',3,'?',9
800 REM End of data table9 00 CLE AR1000 PRINT'6502 Double Disasseffibler - 1979 - J. Swindell'10 10 P RI NT1020 INPUT'Input low&hish addresses of block to be listed:Deciffial';P,Q1 0 3 0 P R I NT : P RI N T :P R I NT : P RI N T1040 PRINT'MNE';TAB(15);'A-DEC';TAB(25);'O-DEC';TAB(33);'ASCII';1 05 0 P RI NT TA B( 39 ); 'A -H EX '; TA B( 48 ); 'O -H EX '; TA B( 55 ); 'M NE (i f v al id )'1 0 60 P R IN T: P RI NT1 07 0 F OR U= PT Oa1 08 0 M =P EE K( U)1 09 0 R ES TO RE1 10 0 F OR O= OT OM
MICRO -- The 6502 Journal 19:33
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 36/84
GREAT I
PET
SOFTWARE"Precise, humanized, well documented an excellentvalue" are the applauds now being given to UnitedSoftware's line of software. These are sophisticatedprograms designed to meet the most stringent needs ofindividuals and business professionals. Every packageis fully documented and includes easy to understandoperator instructions.
DATABASE MANAGEMENT SYSTEM - A comprehensive, interactive
system like those run on mainframes! Six modules comprising 42K ofprogramming allow you to; create, edi t, delete, display, print, sort,
merge, etc., etc. - databases of up to 10,000 records. Printer routines
automatical ly generate reports and labels on demand. 60 pages of
concise documentation are included. Requirements -16-32K PET and
2040 Dual Disk (printer optional) .... Cosl $125
ACCOUNTS RECEIVABLE/PAYABLE - A complete, yet simple to use
accounting system designed with the small businessman in mind. The
Uni ted Software system generates and tracks purchase orders and
invoices all the way through posting "controlled" accounts payable and
accounts receivable subsystems.
Keyed Random Access f ile methods makes data access almost
instantaneous. The low-cost solution for the fi rst time computer user
with up to 500 active accounts. Requirements - 32K PET, Dual Disk, any
BO-column printer .... Cosl $175
CASH RECEIPTS & DISBURSEMENTS - Makes it a breeze to track all
outgoing payments made by any type of business operation. Checks
are tracked by number and categorized by type of expense. Sorting,
summary, and audi t t rails make i t easy to post to general ledger. Thissystem also categorizes incoming receipts. Uses KRAM file access
method. Requirements - 32K PET, Dual Disk (printer optional) .... Cosl
$99.95
KRAM - Keyed Random Access Melhod - The new, ultra-fast access
method for the PET Disk, provides keyed retrieval /storage of data, in
either direct or sequential mode, by either ful l or partial key values.
Wri tten by Uni ted Software in 6502 machine code, and designed with
the PET in mind, i t exploits all the benefi ts of the PET Disk, al lowing ful l
optimization of your system. El iminates the need for "Sort" routines!
KRAM provides flexibility never seen on a micro before. KRAM is
modeled after a very powerful access method used on large-scale IBM
Virtual Storage mainframes. So "KRAM" all you can into your PET - it
will love you for it. .. Cosl $79.95
(Sublicenses available to software houses.)
PROGRAMS FOR
ENTERTAINMENT
Super Startrek 14.95
PET Music Box 29.95
Space Intruders UNITED SOFTWARE
("Best Game of 1979") .. $19.95 PROGRAMS FOR BUSINESSJury/Hostage. .. . 12.50
Kentucky Derby/Roulette 9.95 Checkbook $15.95
Alien I.Q.lTank 9.95 Mortgage 15.95
Tunnelvision/Maze Chase 14.95 Finance 12.95
Submarine Attack....... 9.95 Bonds 12.95
Battle of Midway........ 7.95 Stock Analyzer .. , ,.,. 22.95
Laser Tank Battle. . . . . . . . 9.95 Stock Options , .. 24.95
Swarm 14.95 6502 Macro Assembler 49.95
Look for the RED-WHITE-SLUE United Software Display at
your local computer dealer, or-send check or moneyorder,
plus $1.00 shipping to:
UNITED SOFTWARE OF AMERICA750 Third Ave.
New York, N.Y. 10017Dealer inquiries invited
1110 READM$,N
1120 NEXTO:IFN=9THENN=5
1130 PRINTM$;TABl1S);UiTABI25);MiTABI33);
1140IFM(320RM>126THENPRINTCHR$132);
11S0IFM>=32ANDM:127THENPRINTCHR$IM);
1160 R=U
1170 GOSUB1300
1180 PRINTTAB(39)iJ$;TABI48)i
1190 D=M
1200 GOSUB1400
1210 PRINTI$;TAB(SS);
1220 IFV=OTHENT=N
1230 IFV=OTHENPRINTM$
1240IFV=OANDT=5THENPRINT'Reswnc';:FORB=lT058:
PRINT'?';:NEXTB:PRINT'?'
1250 IFV>OTHENPRINT'*** 'iI$i' ***'
1260 V=Vtl:IFV=T THENV=O:PRINT
1270 NEXTUIPRINTIPRINT:PRINT:PRINT
1280 PRINT'END OF RUN':F~INTIPRINT
1290 END
1300 D=INT(R/256)
1310 GOSUB1400
1320 J$=l$
1330 D=R-D*2S6
1340 GOSUB1400
1350 J$=J$t 1$
1360 RETURN
1400 E=INTID/16)
1410 F=D-EU6
1420 H=E
1430 GOSUB1S00
1440 I$=H$
1450 H=F
1460 GOSUl.i15001470 l$=I$tH$
1480 RETURN
1500IFH(10THENH$=MID$(STR$IH),2.1)
1510 IFH(OTHENH$='O'
1520 IFH=10THENH$='A'
1530 IFH=llTHENH$='B'
1540 IFH=12THENH$='C'
1550 IFH=13THENH$='D'
1560 IFH=14THENH$='E'
1570 IFH>=lSTHENH$='F'
1580 RETURN
DISK DRIVE WOES? PRINTER INTERACTION?
MEMORY LOSS? ERRATIC OPERATION?
DON'T BLAME THE SOFTWARE!..
l.~I
" ' . " "1~~.
' ' ' ' ' t . ' ' 150·250·1
Power Line Spikes, Surges & Hash could be the culprit!
Floppies, printers, memory & processor often interact!
Our unique ISOLATORS eliminate equipment interaction
AND curb damaging Power Line Spikes, Surges and Hash.
*ISOLATOR (ISO·l A) 3 filter isolated 3·prong sockets;
integral Surge/Spike Suppression; 1875 W Maximum load,
1 KW load any socket ".. $54,95
*ISOLA TOR (ISO·2) 2 filter isolated 3·pronll socket banks;
(6 sockets total); integral Spike/Surge Suppression;
1875 W Max load, 1 KW either bank , $54.95
·SUPER ISOLATOR (\S().3), similar to ISO·1A
except double filtering & Suppression . , ., $79.95
*ISOLATOR (lSO-4), similar to ISO-l A except
unit has 6 individually filtered sockets. .. $93.95
*ISOLATOR (ISO·5), similar 10 ISO·2 except
unit has 3 socket b ....ks, 9 sockets total .. $76.95
*CIRCUIT BREAKER, any.model (add·CB) Add s 6.00
*CKT BRKRISWITCH/PILOT any model
(·CBS) .•.. " ,.... Add $11.00
• PHONE ORDERS 1·617·655-1532 !lISA
.f£7Electronic Specialists, Inc.171 Soulh Main 5l,eel. Nalick, Mass. 01760
Dept, M I
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 37/84
P.O. Box 3, S. Chelmsford, MA 01824617/256·3649
~[3~®[3\1 ~[! .~@l
tm
FOR
AIM/SYM/KIM
8K STATIC RAM P~~~R
for8K Eprom
ON BOARD REGULATORS
EPROM
PROGRAMMER
MEMORY PLUS: 5 20 0 , 0 0 FULLY ASSEMBLED AND TESTED
IT 'S EA SY TO A DD V ID EO PLU S™ TO Y OU R SY ST EM .
EX PA ND Y OU R SY ST EM W ITH M EM ORY PL USTM
MEMORY PLUS combines f ou r of the mos t impor tan t s yst em expan sion c apabi li ti es on one PCboa rd. Thi s board u sesthe s tolndo lrd KIM-4 Expolnsion Bus and i s the same si ze/ sha pe as the KIM-l /SYM-l so it can be convenien tly p laced
under any AIM/SYM/KIM sys tem, The four funct ions are:
8K RAM -with low power 2102 static RAM - t he most important addition for most systems
8K EPROM - sockets and address decoding for up to 8Kof Intel 2716type EPROM.
EPROM Programmer - program your EPROMS on the board! 110 - 6522 Versatile Interface provides two 8 bit 1/0
ports , two multi-mode timers, and a seria l/pa ra llel shift res is te r
Other fea tu res of Memory Plus inc lude :
On-board voltage regulators for + 5Vfor general power and +25V for the f;PROM Programmer
Independent switch selec tion of the RAM and ROM sta rt ing addresses .
AlIlC's socketed for easy field replacement.
Fu lly as sembled and burned in - r e ady to p lug in a nd go.
Documen tat ion include s a 60+ page manua l w ith sch emat ics, p ro gram l ist in gs , 2 716 and 6522 da ta she et s, and a
c ass et te t ap e w ith an EPROM Prog ramming Program and a Memory Tes t.
Over 800 MEMORY PLUS units a re a lready inuse with AIMs, SYMsand KIMs
May bed i re ct ly c onnec ted to your sys tem wi th our c ab le o r through ou r MOTHER PLUStm board
VIDEO PLUS is the most powe rfu l exp an sion boa rd e ve r o ffered fo r 6502 ba sed sy st ems I th as many impo rt an t video
features including
Programmable D is pl ay Forma t- up to 100 charact er s by 30 l in es on a good mon itor .
A ROM Character Generator with UPPER and lower case ASCII characters.
A Programmable Cha rac ter Gene rator f or up to 128 us er de fined cha rac ter s wh ich may be changed under prog ram
control . You can def ine graph ics, mus ic symbols , chess p ieces, lo re ign chotraden , gray sca le -and change them at wil l!
May be us ed w ith an ine xp ens ive TVs et o r a n exp en sive mon itor
Up to 4k o fD isp lay RAM, wi th Hardware s crol li ng. programmab le c ur sor , and more
Inaddit ion to the v ideo fea tures, VIDEO PLUSalso has .
A keyboard Interface which wil l work with any "reasonab le" keyboard.
A built-in Light Pen Interface.
Provi sion fo r a 2k EPROM or ROM fo r v ide o cont rol or other so ftware.
All of the memory - 6 K RAM and 2K EPROM can be used as system memory whenever it is not in use as display or
programmable character generator
VIDEO PLUSmay be u sed di rec tly as a n expan sion of an AIMISYM/KIM sy st em, or ha s p rovi sion fo r the addi ti on
of a 6502 for use as a Stand-Alone sys tem or Termina l!
Only requires + 5V and has on board volt age regulator s. Since it's t he same si ze/ shape as the KIM or SYM, it may
eas ily be p laced under an AIMfSYw.jKIM sys tem Ituses the K1M-4expansion format.
Ful ly as sembled , t es ted and bu rn ed in. Conne ct di rect ly to your s ys tem or v ia the MOTHER PLUSboa rd.
)
A IM / SYM /K IMS~m~ SIZE ~nd SHAPf loS KIM/SYM
Profl!ssional Qu~lily
Doubll! Sided,PI~led Ihrough Holes
Two Sl! ls of COLD Plall !d Dual 12 Fi... ~rs
Dl!si llnl !d for WIRE WRAP or
sOLDER Connl!clionll
Provisions for 40 14/16 pin sockets
414140 pin !oO<kl!ts
)\IOIt~1I1!rl!gul~lors PR OTO PLU S: 540 00
AIM/SYM/KIMUPPER/lower case ASCII
128 Addlllonal Ueer Programmable
Charact ers: GRAPHICS-
SYMBOLS-FOREIGN CHARACTERS
Programmlble Sereen Format up 10
80 CHARACTERS· 24LINES
KEYBOARD and LIGHT PEN Interfaces
Up to 4K DISPLAY RAM
provision .or 2K EPROM
Provision to add 6502 lor
STANO-ALONE SYSTEM
ASSEMBLED AND TESTEDWITH 2K DISPLAY RAM
VIDEO PLUS: $24500
AO D Y OU R OW N C IR CU IT S W ITH PRO TO PLU STM
PROTO PLUSis the simple way to add special circuits to your system. It is the same size
and shape as the KIM and SYM, making it extremely easy to use with these systems, and
can be neatly added to the AIM as well. It provides about 80 square inches of work
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 plated
fingers - exactly like the AIM/SYM/KIM. This means that there are a total of 88 edge
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 can
use wire wrap sockets or solder sockets- each Ie pad comes out to multiple pads. There
is room for voltage regulators and a number of other "non-standard" devices. The
PROTO PLUSwill plug directly into the MOTHER PLUSmaking for a handy package
PU T IT A L L T OG ETH ER W ITH M OTH ER PLU STM .
MOTHER PLUSp rovides the s impl iest way to c on trol and package your exp anded sys tem MOTHER PLUSdoes three
ma jor thmgs 1 - p rovides a me thod of int erconnec ting the ind ividua l b oa rds (MEMORY PLUS. VIDEO PLUS . PROTO
PLUS); 2 . p rovides bu ffer ing fo r the add re ss. da ta and cont rol s ign al s: a nd, 3 - ac ts a s a t ra ffi c cop f or de termining
which address es a re res erved fo r the p roc ess or and which f or the expan sion boa rds . I t su ppo rt s the st and ard klM-4
Expansion Bus , so it is electri cal ly compatibl e with a large number of expansion boards. It is st ructur ed so that the
prOC~550r boa rd fi ts i nto the top slot s w ith the expan sion boa rds mount ing b elow. Thi s pe rmit s a sys tem to be n eat ly
packaged - it doesn't have its guts hanging out all over a table top. Provision is also made for application
conne ct ions through so ld er e yel et conne ctor s Sp eci fi ca lly des ign ed to work w ith AIMISYM/KIM sy st ems. O the r
feat ures are: a l erminal for bringing power int o your system; phono jacks for the Audi o In/Audio Oul; phono j acks
fo r c onnec ting a TTYdevice; p rov ision for a TTY/HEXswi lch f or the KIM; a 16 pin 110 so cke t fo r a cce ssing the host
Po rt A/Por t B ;p lus two unded ica ted 16 pin so ck et s which may be u sed to a dd inver ter s, b uf fer s, or whateve r to you r
system
Prices listed do not include shipping and handling.Piease write for complete catalog and order form.
FOR
ADO UPTO FIVE ADDITIONAL BOARDS
AUDIOfTTY CONNECTIONS
POWER TERMINALS
APPLICATION CONNECTORS
AIM/SYM/KIM
FULLY BUFFERED
FULLY DECODED
KIM·4 Bus Structu
MOTHER PLUS: $8000 FULLY ASSEMBLED AND TESTED
The COMPUTERIST makes it easy for you to expand your AIM, SYM, or KIM system.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 38/84
compa£imicrosystems
P.O. Box 687
224 S.E. 16th Street
A m es , Iow a 5 00 10
DAlm
DAIM isa complete disk operating system for the ROCKWELL INTERNATIONALAIM 65. The DAIM system includes a controller board (with 3.3K operating system in
EPROM)which plugs into the ROCKWELL expansion motherboard, packaged power
supply capable of driving two 5 1/4 inch floppy drives and one or two disk drivesmounted in a unique, smoked plastic enclosure. DAIM is completely compatible in
both disk format and operating system functions with the SYSTEM 65. Commands
are provided to load/save source and object files, initialize a disk, list a file, list a disk
directory, rename files, delete and recover files and compress a disk to recover
unused space. Everything is complete - plug it in and you're ready to go! DAIM
provides the ideal way to turn your AIM 65 into a complete 6500 developmentsystem. Also pictured are CSB 20 (EPROM/RAM) and CSB 10(EPROM programmer)
which may be used in conjunction with the DAIM to provide enhanced functional
capability. Base price of $850 includes controller board with all software in EPROM,power supply and one disk drive. Now you know why we say -
There is nothing like a
DA lm Phone 515-232-8187
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 39/84
Sharpen Your AIM
A collection of four programs are presented whichenhance the capabilities of the basic AIM 65. These pro-grams improve hex loading, clear memory, movememory and slow down the display.
)
Recently several Rockwell AIM-65
microcomputer systems were purchas-ed for use in teaching courses in
microprocessors and microcomputers
at the campus of the Pennsylvania State
University at which I teach. These wereintended to supplement the KIM-1
systems which have been used for that
purpose for the past three years.The
press of other activities has prevented
more than intermittent exposure to the
full capabilities of the AIM-65; however,
some basic impressions and evalua-
tions are possible.
Overall, the impression has been
highly favorable. First, due to thesimilarity with the KIM-1, the AIM has
been easy to learn. Even students with
virtually no exposure to any type of
microcomputer have had little difficulty
in learning to use the system effectively.In this regard, the documentation provid-
ed with the AIM-65 is excellent. The
AIM-65 Microcomputer User's Guide iseasy to follow and has a sizeable
number of examples to clarify concepts
stated in the material related to a por-tion of the system or its operation. Iden-
tification of many of the most useful
subroutines and their characteristicshas proved to bea special blessing. The
clock program used as an application
example at the end of the manual in-volves virtually every mode of operation.
It provides an excellent base for
understanding the system and in addi-tion serves as a firm foundation for a
flexible data sampling and logging
system. Although a few errors exist inthe User's Manual, most are of minorconsequence.
December, 1979
Second, the extensive monitor pro-gram has a great many features not
generally found in a system of this price
class. These features make it possible toprogram the AIM more rapidly and with
fewer errors than is possible for an
essentially identical program using theKIM-1.The features which come to mind
most readily are the mnemonic entry
capability, the disassembler, and the
text editor. The printer with its hard copy
put the topping on the physical at-
tributes of the system. Less visible, but
equally as convenient, are the cassette
interface with its much higher speed andflexibility when compared with the
KIM-1.The ability to use the KIM formatpermits the application of many KIM pro-
grams to the AIM. Finally, the 20
character display with the ability to use
alphanumerics expands the capabilitiesof the AIM-65.
Nosystem is completely without its
shortcomings and the AIM is no excep-tion. Fortunately, the shortcomings are
few and most are easily corrected. One
of the problems arises from the fact thatin the memory modify mode,(I),the pro-
gram is returned to the system monitor
after four entries. While all that is
necessary to return to the modify modeis to again press (I),often whenentering
a program from a hex dump format orentering hex values into a table or enter-
ing a short ASCII message statement, it
is easy to forget to re-enter (I).The short
program shown below, HEX LOAD, uses
the same format as the M followed by(I)
process but automatically remains in
the modify mode until terminated by anESC. There is a printout of the entered
characters and the address of the
lowest byte just as in the normal opera-tion. The only difference is that it is no
MICRO -- The 6502Journal
Robert E. Babcock
1706Fawcett Ave.
White Oak, PA15131
longer necessary to enter (I ) after eachfour entries. Touse HEXLOAD,begin ex-
ecution at 0600 (or the beginning ad-
dress selected if in a different location)
by the usual entries, "(*) = 0600",
RETURN,"G", RETURN.The display will
show" = ". Enter the address at which
hex entries are to start, RETURN, andthe starting address will be displayed
with the prompt ' 'A''. Make the desiredhex entries as a continuous string, then
terminate with ESC.
HEX LOAD(K)*:0600
/200600 20 JSR ~4AE0603 20 JSR 3B3£0606 AD l,DY#000608 20 JSP EA5~060E 90 BCC 0613060D C 9 C ~T #20060F DO BNE 06230611 FO BEQ 061E0613 20 JSR EE780616 FO BEQ 061B061B 4c JMP SB33
061E 20 JSR 3B3E061E CB INY061F CO CPY #040621 DO ENE 06080623 20 JSR E2CD0626 20 ._TSREA130629 20 JSR E2DB062C 20 JSR 3B3£062F DO ENE 0606
19:37
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 40/84
SLOW DIS(K)*=0200/38
0200 A9,LDA #4B02P2 20 JSR E97A0205 A9 LDA #2A0207 20 JSR E97A020A 20 JSR EAAE
020D BO BCS 0200020F 20 JSR E5D70212 20 JSR EBJ70215 20 JSR E7850218 20 JSR EA24021B 20 JSR F46c021E AD LDA A4250221 )8 SEC0222 65 ADC EA0224 8D STA A4250227 90 BCC 022C0229 EE INC A426
022C 20JSR EA24022F 20 JSR E90702J2 20 JSR E79002J5 FO EEQ 02JD02J7 20 JSR 0240023A 4C JMP 021B02JD 4: JMP E1Al0240 A9 LDA #100242 85 S TA AC0244 A9 LDA #000246 aD STA AOOE0249 A9 LDA #FF024B 8D STA Ao08
024E 8D STA A0090251 A9 LDA #20.025J 2C BIT AOOD0256 FO BEQ 02530258 AD LDA A008025B c6 DEC AC0250 DO BNE 0249025F 60 RTS
ZERO PAGE LOCATIONS USED:
OOAC Timing Loops
OOEA Length (Used by monitor
ROM)
The second difficulty is an an-noyance with the speed at whichdisassembly occurs when the printer isnot in operation. This mode of operatlon
19:38
is sometimes desirable to conservepaper while debugging or while checkingf,OLJlDLrtlc_yla.r part of a program. Theprogram left , SLOW DIS, Introducesaoout a Tsecond delay between stepsduring disassembly without. the printer.Location 0241 can be modified tochange the speed as desired. Executethe program in the normal way using(*)=0200, RETURN, "G", RETURN. Thedisplay will indicate "K* = OJ. Enter thestarting address of the material to be
disassembled and the number of stepsas in .normat operation. If an Indefinitenumber of steps was selected by"SPACE", then the program must be ter-m in ate d ,b Y -ESC.
One of the major advantages of theAIM-65 over the KIM-1 and other similarsystems using 7·segment read-outdisplays (limited to six digits), is therelative ease of using meaningfullyprompted programs which eliminate theneed to record or remember the properaddresses into which data must beentered to initiate the program. Withprompting, the required information canbe asked for, inserted, and stored in ap-propriate locations under program con-trol. Two utility programs, CLEAR andMOVER, Included below, are of theprompted type. MOVER is a datatransfer program capable of moving anyamount of data either forward orbackward to a deSignated starting ad-dress. Execution of the progam resultsin a prompting message of "OLDFROM =" to elicit the entry of the star-ting address of the data to be moved.After the address has been entered andRETURN activated, "TO =" calls for theending address of the data to be moved.When RETURN is again used, theprompt"NEW FROM =" appears to bring aboutentry, of the starting address at which
the moved data Is to start. This timeRETURN causes exe'cution of the moveprocess, completion of which is in-dicated by a cleared display except forthe normal " " at the left side of thedisplay. Similarly, CLEAR uses promp-ting messages, "CLR FROM=" and"TO = " to obtain the limiting addressesof the area into which zeros or any otherdesignated character may be entered.The area can be of any size.
A general breakdown of thefeatures of these two programs can beused to show the various sections andtheir functions. In CLEAR, the programfrom 0300 through 0314provides the pro-mpt message generation; 0315 through
0330 contains the address input andstorage functions; 0331 through 0330contains the calculation of the high andlow order bytes of the length of the areainvolved; and the remainder of the pro-gram performs the actual data storageprocedure. Location 0340 may bemodified to any value with which it isdesired to load a selected memory area.Locations 035F - 0361contain the "CLR"message.
MICRO -- The 6502 Journal
O:)*=OJOO/46
OJOO 20 JSR EA1J030J AO LDY #00
0305 B9 LDA 035F0308 48 PHAOJ09 29 A N D #7F030B 20 JSR E97AO JO E: C 8 INYC30r' 68 PLA
OJ10 10 EPL OJ05OJ12 20 JSR £8JEOJ15 20 JSR ?7A3OJ18 AD LDA A41C031E 85 STA 00OJ1D AD LDA A41D0320 85 STA 01OJ22 20 JSR E7A70325 EO BCS 0322OJ27 AD LDA A41COJ2A 85 SI'A 02OJ2C A D T.~~ A41JOJ2F 8) 3TA OJOJJ1 38 S~COJ32 ;._ i,JA 02OJ34 ?: 5 SEC 00cJJ6 85 SI 'A 04OJ38 A5 L.JA 03OJJA £5 SBC 01
OJJC FO :CE~ OJ4COJ) S AA TAX
CJ3? A9 LDA #00C3!.;.18 TAY0342 91 STA (OO),YC j J ' ; ~ cs I~ YOJ! ' ;· )~JL7O J~ S J
)0 l3i'i:; OJ4211'\C 01J2X
JJ~.'; )J ~:\::; O:1J2
')Jb: - : : 6 r x c 04OJ~:: /..9 LJA ]:00
0350 _ , \0 LDY //00OJ52 9~ STA (OJ),y
'J354 C8 INYOJ5 5 c4 CPY 04o 3 5 7 'JO r~ S o 3 52OJ59 20 . _ T S R S:~130350 4c Jr,:? SlA1
(i,;) =OJ5F 43 ~ :: D2
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 41/84
h i C J V ER Z ERO PAGE LOCATIONS USED:
(K)*=0200 CLEAR
'~/96
0000 Start ADDR Low0200 20 JSR ~Al) 0270 E6 INC AA 0001 Start ADDR High020) AO LDY #00 0272 A6 LDX A9 0002 Ending ADDR Low0205 20 JSR 02B8 0274 FO BcQ 0286 0003 Ending ADDR High0208 20 JSR E7A) 0276 Bl LDA (A2) ,Y 0004 Length Low
020B 20 JSR F910 0278 91 STA (AA),Y020E 20 JSR E7A7 027A 88 DEY MOVER
0211 BO BCS 0208 027B CO CPY #FF OOAO OLD Start ADDR Low
021) 20 JSR EAl) 027D DO B N E 0276 OOAI OLD Start ADDR High
0216 AD LDA A41A 027F c6 DEC A) 00A2 OLD Ending ADDR Low
0219 85 STA AO 0281 c6 DEC AB 00A3 OLD Ending ADDR High
021B AD LDA A41B 028) CA DEX 00A4 NEW Start ADDR Low
021E 85 STA Al 0284 DO ENE 0276 00A5 NEW Start ADDR High
0220 AD LDA A41C 0286 .26 INC A8 OOA6 Move Distance Low
022) 85 STA A2 0288 11 LDA (A2),Y OOA7 Move Distance High
0225 AD LDA A41D 028A 91 STA ( AA ) , Y OOA8 PGM Length Low
0228 85 STA A) 028C 88 DEY OOA9 PGM Length High
022A AO LDY /104 028D c6 DEC A8OOAA NEW Ending ADDR Low
022C 20 JSR 02B8 028F DO EN E 0288 OOAB NEW Ending ADDR High
022F 20 JSR E8)E 0291 20 JSR EAl) A similar examination of MOVER
02)2 20 JSR E7A) 0294 4c J!l1PEIAI will show that the segment from 0200
02)5 AD LDA A41C 0297 AO LDY #00 through 023E generates the promptingmessages by way of a subroutine at
02)8 85 STA A4 0299 A6 LDX A9 0288 • 02C5, obtains the requested ad-
02)A AD LDA A41D 029B F.O BEQ 02AE dresses and stores them. From 023F
023D 85 STA A5 029D Bl L;)A (ACl ),Y through 0266 is found the calculation
) procedures for the length of the data to
023F 38 S~C 029F 91 STA ( A L I - ) ,Y be moved, determination of the newen-
0240 A5 LDA A2 02Al C8 IHY ding address, and decision as to
0242 E5 S1: ..1.0 02A2 .J O- . . . . . . . . . . . ,
029Jwhether movement Is forward or
. t . . . : . , . z _ . backward. Movement upward in address
0244 85 3TA A8 02A4 £6 L:~C Al ' by starting at the end and working back
02)'}6A5 L.JA A) 02A6 s6 INC A5 to the start is contained in 0268through
0248 1?5 SBC Al 02.'; r"" ~2J. . 0294, while movement downward in ad-L ,J.......... dress is handled from 0297 through
024A 85 STA A9 02 .: ;'90 Lo;\ ~ ~29J 02B7. The "OLD" and "NEW" messages
024C 18 CLC 02Ab .26· I l ' J C A8 are contained in 02C6 . 02CC.
024D A5 LDA A4 02.4D II 19A( . ~, v These programs have been found.~U i , ~ very useful In assisting an already
024F 65 ADC A8 02AF 91 STA (.)+),Y powerful system to be even more
0251 85 STA AA 02Bl C8 IhY responsive to the desires of the pro-
025) A5 LOA A5 02£2 c4 C?y ASgrammer. Other programs which would
bevery helpful would bethe ability to ln-
0255 65 ADS A9 02B4 DO ENE 02AD sert an instruction into the middle of a
0257 85 STA AE 02B6 FO EEQ 0291 program with automatic movement of
0259 38 SEC 02B8 B9 LDA 02C6,Ythe remainder to make room, as is done
in the text editor and some assemblers.
025A A5 LDA A4 02BB 48 PHA Related would also be a deletion pro-
025C £5 SBC AO 02BC 29 AND #IF cedure with automatic closure. Not
025E 85 STA A6 02BE 20 JSR E97A
enough time has been available to ac-
complish these programs. Perhaps0260 A5 LDA A5 02Cl C8 INY later...
0262 E5 SEC Al 02C2 68 P LA Receipt of the 8K basic ROM's for
0264 85 STA A7 02C) 10 EPL 02138 the AIM-65 has finally occurred after a
lengthy wait. Not enough opportunity
0266 90 B e e 0297 02C5 60 RTS has arisen to delve into that aspect of
0268 At) LJY 7JFF(J , : ) =o2c6 4F 4c !;4 '''1
the AIM very deeply, as yet. A brief ex-
026A c6 .04'.'" A).~" posure has made a very favorable lrn-
Lv (,)02CA 4E 45 J7 pression. The addition of the BASIC
026c C6 J2C :A E makes the AIM-65 into exactly what its
) 026£ £6 INC A2 name implies; a self-contained Advanc-
ed Interactive Microcomputer.
December, 1979 MICRO -- The 6502 Journal 19:39
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 42/84
A Warning:
Th e MACAO T E A™is for ProfessionalProgrammers - and VerySerious Amateurs - Only
Now: a machine language pro-gramming powerhouse for theknowledgeable programmer whowants to extend the PET's capa-bilities to the maximum. TheMacroTeA, the Relocating MacroText Editor.Assembler from SkylesElectric Works.
An Additional 1 /0 Interface
for the PET
Interfacing a VIA 6522 to your PET is simple.
The 6522 VIA chip has a lot of in-teresting features, however, many ofthem are on the "PB"side of the chip.The Commodore PET does not have the"PB" lines on its user port, only the"PA" lines. The following interface givesnot only the wanted "PB" lines but alsoan extra set of "PA" lines &CB1, CB2,CA1, & CA2.
The Hardware
The circuit itself uses only a 6522VIA and two 74i 's. It is mostly direct in-terfacing, other than the address lineswhich had to be decoded. Once built, itconnects directly to the Memory Expan-sion Port.
The interface (in figure 1)is design-ed to occupy the top 16 bytes of RAM. Itshould be noted here that addinganother interface is as simple as chang-ing the address decode. For example, byplacing an inverter on "BA4" (see figure2)the circuit would occupy the 16 bytesof RAM just under the top 16 bytes.(note-if you build both of the circuits
from figures 1 & 2 you would have twoVIA's and would be using the top 32bytes of RAM). The original circuit isshown in figure 1.
The Software
After connecting it, operation isvery simple. The addresses concernedand what they are follows. (for the circuit
The Skyles MacroTeA is a superpowerlul text editor. 26 powerlulediting commands. String search andreplace capability. Manuscript featurefor letters and other text. Text loadingand storage on tape or discs. Supportstape drives, discs, CRT, printers andkeyboard.
The Skyles MacroTeA is a relocatingmachine languageassembler with truemacro capabilities. A single nameidentif ies a whole body of lines. Youwrite in big chunks, examine, modifyand assemble the complete program.And, when loading, the MacroTeAgoeswhere you want it to go. Macro andeondltional assembly support. Auto-matic line numbering. Labels up to 10characters long.
The Skyles MacroTeAis an enhanceMonitor. 11 powerful commands toease you past the rough spots ofprogram debugging.
The Skyles MacroTeA is a wannstart button. Over 1700 bytes ofprotected RAMmemory for your objectcode.
There's no tape loading and nooccupying of valuable RAM memoryspace: The Skyles MacroTeAputs 10Kbytes of executable machine languagecode in ROM (from 9800 to BFFF-directly below the BASIC interpreter).2K bytes of RAM (9000 to 97FF)_
Like all Skyles Products for the PET,it's practically plug inand go. No tools are needed.And, faster than loading anequivalent size assemblerleditor from tape, the MacroTeA isinstalled permanently.
The Skyles MacroTeA: 13chips on a single PCB. Operatesinterfaced with the PET's parallel address and data bus or withthe Skyles Memory Connector. (When ordering, indicate if theMacroTeAwill interface with a Skyles Memory Expansion
System. You can save $20.)Speclflcatlons and engineering areup to the provenSkyles quality standards. Fully warranted for 90
days, And, as with all Skyles products, fully and intelligentlydocumented.
Kevin ErlerP.O. Box 3032
Edson, Alberta TOE OPOCanada
shown in figure 1)32752 - ORB32753 - ORA32754 - DDRB32755 - DORA32756 - TIL-L TIC-L32757 - TIC - H32758 - TIL-L32759 - TIL·H32760 - T2L·L T2C-L32761 . T2C·H
32762- SR32763- ACR32764 - PCR32765-IFR32766-IER32767 . ORA (no handshake)
The operation is as with other VIA-··PEEK POKE etc., only with the previous-ly listed addresses.
Note-for the addresses whichoperate the circuit in figure 2, simplysubtract 16from each address.
Output Example
To create a tone on CB2 for the cir-
cuit in figure 1;POKE 32763, 16 (ACR)POKE 32762, 15 (SR)POKE 32760, 155 (Timer 2) for the
circuit in figure 2.POKE 32747, 16 (ACR)POKE 32746, 15 (SR)POKE 32744, 155 (Timer 2)
For further specs. on the "PB" port ofthe 6522, refer to the 6522 data sheet.
ASSEMBLE LIST
Q ) 1 Q ) Q ) :MOVE TBl 1 TO TBl2
Q ) 1 1 0 .BA $ 4 Q ) Q )
M 0 Q ) - A I 0B 0120 LOOP LOY #000402- B9 0B 04 013(,1) lOA TBl1.Y
0405- 89 0B 05 0140 STA TBl2.Y
Q ) 4 Q ) 8 - C8 0150 INY
0409 OQ) F7 0160 BNE lOOP
Q ) 1 7 0
M0B 0180 TBl1 .OS 256
05Q)B 0190 TBl2 OS 256
0200Q ) 2 1 0 EN
VISA, Mastercharge orders call (BOO)27-8398(Except Calif.)@ . California orders please call (415)494-1210.
6!r.~!~D"~~~~~!~~!'~!:~SlABEL FilE 1= EXTERNAL
START = 0400 lOOP = 0402
TBl2 = 050B
11Q)0Q)Q).06Q)B.Q)60B
TBl1 = 040B
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 43/84
A.40
A33
A30
A29
A.28A27A22
A12
A5
A4
A1
07
)
,-------------------1DO
R/W
0 2
t~ ~ ~ = = ~ ~ ~ = = ~ ~ ~ ~
RQRESCS2
Figure 1: Interface designed to occupy top 16 bytes of RAM
B07t---- ....07
ToOrder P R O G R A M M E A 'S T O O L K I T or M A C R O T E A -Custom designed to plug into your PET.So, when ordering, please indicate i f yourToolkit:
A40
------.---------------------1
---- .----..--------------1
A33
A30
A29A28A27A22
---------------1BOO ---"1 DO
R/W R IW02 02IRQ __ IRQ
R~ R~SEL CS2
$80.00'
$80.00'
$80.00'
$50.00'
Is Programming Fun?
Have More Fun,Make Fewer Errors,Complete Programs MuchFoster ... with the
B A S I C P A O G A A M M E A ' S
TOOlKIT™Now you can modify, polish, simplify,add new features to your PET pro-grams far more quickly while reducingthe potential for error.That all adds upto more fun . . . and the BASICProgrammer's ToolKit.The magic of the ToolKit: 2KB ofROM firmware on a single chip with acollection of machine language pro-grams available to you from the timeyou turn on your PETto the time youshut if off. No tapes to load or tointerfere with any running programs.And the Programmer's ToolKit installsin minutes, without tools.Hereare the 10commands that can
be yours instantly and automatically... guaranteed to make your BASICprogramming a pleasure:
AUTO RENUMBERHELP TRACEOFF APPENDFIND
DELETESTEPDUMP
Every one a powerful command toinsure more effective programming.Like the HELP command that showsthe line on which the error occurs... and the erroneous portion isindicated in reverse video:
HELP500 J = sa R(A' B / C t J )
READY
... Or the TRACE command thatlets you see the sequence in whichyour program is being executed in awindow in the upper corner of yourCRT:
A12
A5
A4
A1
Fig. 2: Interface designed to occupy 16 bytes just under top 16bytes of RAM.
. . ,wil l beused with the Skyles Memory Expansion System, or
... will beused with the ExpandaPet, or Expandmem
.,.will be used with the PET2001-8alone(We furnish connectors to the memory expansion bus and to the second cassette interface.
... will be used with the PET2001-16,-32(chip only)
... wil l beused with Skyles MacroTeA $50.00'
Your MacroTeA. Custom designed for your PET.So specify your PETmodel when ordering.$395.00·
(Important Salfings: I f i t's to be used with a Skyles Memory Expansion System, the MacroTeA canplug directly into the Skyles connector. So you save $20. The Skyles MacroTeA is only $375.00when interfaced with the Skyles Memory Expansion System.)
Send your check or money order to Skyles Electric Works. VISA, Mastercharge orders may call (800)227-8398. (California residents: please phone (415)494-1210.)Ten Day Unconditional Money-Back Guarantee on all products sold by Skyles Electr ic Works, except chip only.California residents: please add B·B'h " 1 0 California sales tax.
Skyles Electric 'Works 10301Stonydale Drive, Cupertino, CA 95014, (408) 735-7891
The Programmer's ToolKit is a
product of Harry Saal and hisassociates at Palo Alto ICs.
So, if you really want to be intoBASIC programming - and you wantto havefun while you're doing it, orderyour BASIC Programmer's Toolkitnow. We guarantee you'll be de-lighted with it.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 44/84
NEW APPLE I I® SOFTWARE
-- iIIII. - . . --.• --- -II!
·1 • •-2
6 28 12 se
. .. . P RE Ss 1 ' 1 ' TO RETUR~ TO MENU H
FUNCTION PLOT $24.95
• •• •• •• * * •• 1..s 1.••••• *QUESnOI-! 12 3CORE;B
••••••• n ••••• **u:tts:., Skat•• *t•• '6iiU~
I I ICHAEL IGOR P £S CHKOWS I< i Ollle£ "IICHOLS)D IRE CT E D AN N BAN CROFT IN 'T HE GRAD UAT E 'HH REAL HAttE WAS
( 'l 'BElE ELLIOTA LI CI A W U HO ER L AH DAGHES HEAOf OR£ANNAMIUA ITA llAHO
ANSWER 7
tu.u.TII'I£ '* Z8t
uuu
TRIVIA BOX $19.95
MOTO·CROSS $9.95
FRUSTRATION $9.95
GUIDED MISSILE $15.95
Ji.o 00
or 0s S s
g oo : ~ ; ) ( ) ( )0
" ~o
0
~0 g !!J o g O~
~ 0 0"0
oM0
~ [ 0 ) 0g g o~ [,j
oj
0~
, J ; J co [.j 8 ' I " ~O~~l . .• •r-e-sea scoe. Hl;~H
LASER BLAST $9.95
THE PLANETS $15.95
APPLE INVADERS GAME
CASSETTE $15.95
DISKETTE $19.95
AND MORE ...
ACTIVE FILTERS $24.95
ALIEN INVASION. . . . . . . . . . . . . . . . . . . . . . 9.95
AMPERSORT II ...........•....•.....•. 15.95
APPLE ALLEY ................•....... , 6.95
BASEBALL , 15.95
BATTLEFIELD. . . . . . . . . . . • . . . . • . . . . . .. 9.95
BREAKTHRU . . . . . . . . . . . . . . . • . . . . . • . .. 9.95
CHECK BOOK. • . . . . . . • . . . . . . . . . . . . . . . . 34.95DATABASE MAILER •..........•....... , 29.95
DEATH RACE ......•...••...........• , 15.95
EARTH QUEST .....•...••..••••...... , 19.95
HOME BUDGET ....•..........•.•..... , 24.95
HOUSEHOLD FINANCE •..•............. , 24.95
MINI GENERAL LEDGER ..............•. , 59.95
MOUSE HOLE .....•....•.•........... , 6.95
PEG JUMP. . . . . . . . . . . . • . . . . . • . . . . . . . .. 9.95
RICOCHETTE .....•..... " . • • . . . . . . . .. 9.95
STAR VOYAGER ..............•..•.... , 15.95
STUNT CYCLE . . . . . . • . . • . . . . . . . • . . • . .. 15.95
All orders must include 3% postage and handl ing. Cal ifornia
residen ts add 6% sales tax. VISA and MASTERCHARGE
accepted.
Apple II isa trademark of Apple Computers, Inc.
PROGRAMMAINTERNATIONAL,lnc.3400 Wilshire 8lvd.los Angeles, CA 90010
(213) 384·0579
384·1116
384-1117
Dealer Inquiries Invited
I·CHING $15.95
SHAPE BUILDER $19.95
SCORE A ? SCORf 8 1
BLOCKADE $9.95
BOXING $9.95
ALGEBRA I $15.95
SPACE WAR $9.95
SIRIUS $15.95
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 45/84
APPLE INVADER'\
-s
>N
«a : :oz«0..
«,w
oa : :
Cw~
«~
wJ:I-
) PROGRAMMA INTERNATIONAL, Inc.3400 Wilshire Blvd. Los Angeles, CA 90010(213) 384-0579 384-1116 384-1117
Zmsmo11
-t~, .IIm
Announcement:
NEW!From the leader
of Apple II ®
Software
• UNIQUE HI-RESGRAPHICS
• REALISTICSOUND EFFECTS
• REAL-TIME ACTION
• FUN & EXCITING
• CHALLENGING
• ADDICTING
Requires 32K APPLE II
with Integer Basic
Price: $15.95 on cassette
$19.95 on disk
Apple II is a Trademark of Apple Computer, Inc.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 46/84
softside...-SOltware0~ Riverside Drive New York. N.Y. l002~ •
t L e -etprogram.1
Quadruple your PET's graphic resolution. Why be
stuck with the PET's cumbersome 25 x 40 1000point
display. With Graphics Pac you can directly control
(set and clear) 4000 points on screen. It's great for graphing, plotting, and gaming. Graphics
Pac allows you to plot in any combination of two modes: 4 Quadrant graphing with (0,0) center
screen, and Standard graphing with (0,0) plotted in the upper left hand corner. Complete docu-
mentation shows how you can merge this useful routine with any of your own programs with-
out retyping either one! All this on a high quality Microsette for only $9.95.
GRAPHICS PAC 2New Version
2ASSEMBLER 2001 A full featured assembler for your PET microcompu-
ter that follows the standard set of 6502mnemonics.
Now you can take full advantage of the computingabilities of your PET. Store and load via tape, run through the SYS or USR functions. List and
edit too with this powerful assembler. No other commercial PETassembler gives you all these
features plus the ability to look at the PET'S secret Basic ROMs all in one program. This valu-
able program is offered at $15.95
An exciting new simulation that puts you III
charge of a bicycle manufacturing empire. Juggle
inflation. breakdowns. seasonal sales variations,
inventory. workers. pr ice s. machines. and ad campaigns to keep your enterprise in the
black. Bike is dangerously addictive. Once you start a game you will not want to stop. To
allow you to take short rest breaks. Bike lets you store the data from your game on a tape
so you can con ti nue where you left off next time you wish to play. Worth a million in fun.
we'll offer BIKE at $995.
PINBALL
3BIKE
4Dynamic usage of the PET's graphics features
when combined with the fun of the number 1arcade
game equals an action packed video spectacle foryour computer. Bumpers. chutes. flippers. free balls, gates, a jackpot, and a little luckguarantee a great game for all. $995.
Authors: Our lties are unbeatable
*~ MUSICAL MADDNESS ~add an exciting new dimension to your PET computer
with Soundware's soundsational music box
and sonicsound software from Softside & Soundware
tiTHE SOUNDWORKS
* "The Soundware music box for your PET
comes complete with controllable volume,
an earphone jack, a demo tape with two
programs, an instruction book, and a one
year warranty. this sturdy unit is enclosed
in an attractive plastic case. Notes tell
how to program your own sound effects.
All this during our musical madness for
just 29.95
WORD FUN: Speller: fun ways to practice
spelling + Scramble + Flashcards 9.95
*OUND
*"MUSICAL SOFTWARE*"ACTION PACK: Breakthru + Target +
Catterpillar: non stop graphic action 9.95
PINBALL: a video action spectacle with
real time flippers, chutes gates, bumpers,
tags etc. . 9.95
CLASSICS: Checkers + Backgammon
Board +Pieno Player; checkers vs. com-
puter or friend. Piano plays Minute Waltz9.95
MUSIC MANIA: Try to repeat a growing
sequence of tones. With graphics. Chal-
lenge to the best ear 9.95
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 47/84
A 60 x 80 Life for the PET
Have you ever wished that your PET display was bigger,especially when playing the Game of LIFE? Here is amethod of providing a moveable window that permitsyou to examine any portion of an area that is:
'Larger than Life'.
When you have played some time
with the 25 x 40 LIFE by Dr. Covitz, you
will find that the area is too small for
many patterns to expand. Therefore I
decided to write a program which gives
them more space. As I still wanted to
use the nice round CHRS(81) dots as cell
symbols, I decided to show only a sec-
tion of the whole area on the screen. The
screen is practically used as a movable
window which can be shifted in 8 direc-
tions by the number keys 1 to 9. The '5' is
used to bring it back into the center.
Program Description
The BASIC part of the program does
the following: Line 0 sets the memory
pointers to prevent BASIC from destroy-
ing the machine code and to restore the
"end of BASIC" pointer in dec 124, 125.
Then in sub. 100, a short explanation, is
given. The cells are set on the screen in
the input mode with A$, where A$ is not
used. line 4 to 10 do the shifting of the
December, 1979
screen versus the Life area. The pointer
PA which determines the displayed sec-
tion is changed by the pokes into 2940,
2941. Line 3 again raises the memory
pointer and lifts the "end of BASIC"
pointer over the end of the machine
code. Thus it is possible to save the
whole program including machine code
by a simple SAVE.
The machine program starts at the
location hex OA80. The memory used as
Life-area starts at OC51 and ends at
1F11. All necessary pointers are located
in the BASIC input buffer from 0029 to
003F. They are initialized with the
subroutine INIT from TBL2 starting at
OB6A. The pointer P9 points (indexed by
Y) to the place which is currently in-
vestigated. The pointers P1 to P8 point
to the neighboring places. PA points to
the upper left corner of the displayed
section and PS to the start of the screen.
CNT is a page counter.
MICRO -- The 6502 Journal
Werner Kolbe
Hardstr.77
CH 5432 NeuenhofSwitzerland
Cells are represented by bit 7 of the
memory. The cells for the next genera-
tion are stored in bit 6. Subroutine
CLEAR sets everything to zero. Then in
NE the screen is inspected and if a 51 is
found, bit 7 is set in the associated
memory place. Subroutine INPDEX in-
creases the pointers PS by dec 40 and
PA by dec 80 if one row has gone
through (Y running). By storing hex 34
respectively hex 3C into E811 the screen
is switched off resp. on again to avoid
"snow". After START the new genera-
tion is computed. The number of
neighbors is counted by inspection of
the neighboring places and decreasing
X if bit 7 is set. If the life condition is
found for the next generation, bit 6 is set
in the memory place. When one page is
worked through, all high values of the
pointers P1 to pg are incremented. The
pages are counted by CNT. With
RESTORE, the old generation is pushed
out by a left shift, and the new one
19:45
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 48/84
Listing 1
o FOKEl3:i, 10: POKEl24 , 216: POKEl25, 006: CLa: GOSUB100
1 3YS27 30: GETAl3: IF A t 3 = " "THENl
2.IFM)=" "mEllINFUTAl3:SYS2691:GOTOl
3 IF A$=" E'''!'lIENPOKE13 5,32: POKE124, 131: FOKEl25, ll: END
4 EM,=" S ," TIiENOX=0: OY=0
5 A=V£( Ai3) :OX=OX+OX( A) :OY=OY+OY( A)
6 IFOX>2cmENOX=20
7 IFOX<-20THENOX=-20
8 IFOY>18THENOY=18
9 IFOY<-lSTHENOY=-18
10 P=4 533+0X+OY*80: FH= HIT ( P /256) : PL=P-FH* 2 5 6: POKE2940 ,FL: POKE2941 ,PH
11 POKE515,255:GOTOl
100 P H IllT" chcdcdcd *** LIFE 60X80 *** cdcdcdcdcdcd
101 FOKE2940,181:POKE2941,17
102 FOitA=OT09: READOX( A) ,OY( A) : NEXT
104 P,'lINT"cdcdcdFUT THE CELLS WITH '.' ON THE SCREEN.
106 FRINT"cdSTAH.T '!lITH 'HET.', STOP WITH 'SPACE'.
107 FIl.INT"cdEND WITH 'E':
108 PRINT" cdMOVE THE '>'/INDO':/ WITH 1 '!O s
cdTHE 5 CENTERS IT.109 FRIilT" cdcdcdrvsPRESS Al'lY KEY.
llO GEl' At: IFA;;="" GOTOllO
III FR INT" chcdcdcdcdcdcdcdcdcd" : IN :pu ' rA13 : SYS2688 :RETURN
120 DATAO,0,2,-2,0,-2,-2,-2,2,0,0,0,-2,0,2,2,0,2,-2,2
cd = Cursor down ch = Clear-Home rvs = Reverse
comes from bit 6 into bit 7. Since there
does not exist an indirect addressing for
the ASL command, I had to use the ab-
solute indexed to increment the argu-
ment directly. Finally, TSCR throws the
cells on the screen with 51 's if bit 7 is set
and 20's (blanks) else. The RTS returns
the control back to BASIC. For one
generation the programs needs about
1/2 second. The speed may be slowed
down by a waiting loop in BASIC.
Combining BASIC and Machine Code
If you have entered the machine
code, type in NEW (but don't switch off)
and enter the BASIC code. If you have
finished, find out the actual values of the
"end of BASIC" pointer in dec 124 and
125 by PEEK commands. If they differ
from 216 resp.6, the pokes in line 0 must
be changed. Before a run, this POKE
must contain the actual value of the
pointer, after the last change in the
BASIC program.
To save everything on tape enter:
POKE 124,130: POKE 125,11: CLR and
then SAVE "LIFE 60480". With the POKE,
the "end of BASIC" pointer is raised
beyond the end of the machine code and
thus with the save, both program parts
are combined. When running the pro-
gram, line 0 restores the old values of
the pointer. The program can be loaded
and run like any other program. Only if
changes are made in BASIC, line 0 must
be updated.
L is tin g 2
OA80 20 57 OB FS JSR CLEAR OAC4 Bl 31 LDA (P5) , YOA83 20 4C OB NE JSR INIT OAC6 10 01 BPL 01OA86 A9 34 LDA=34 OAc8 CA DEXOA88 8D II E8 STA
zanOAC9 Bl
33LDA (P6) , Y
OA8~ A2 18 LDX=18 OACB 10 01 BPL 01OA8D AO 27 LPl LDY=27 OACD CA DEXOA8F Bl 3D LP2 LDA (PS),Y OACE B1 35 LDA (P7), YOA91 C9 51 CMP=51 OADO 10 01 BPL 01OA93 DO 04 BNE 04 OAD2 CA DEXOA95 A9 80 LDA=80 OAD3 B1 37 LDA (P8), YOA97 DO 02 BNE 02 OAD5 10 01 BPL 01OA99 A9 00 LDA=OO OAD7 CA DEXOA9B 91 3B STA (PA), Y OADS 8A TXAOA9D 88 DEY OAD9 10 10 BPL TODOA9E 10 EF BPL LP2 OADB C9 FE ClilP=FEOAAO 20 34 OB JSR INPDEX OADD FO 06 BEQ LBNOAA3 10 E8 BPL LPI OADF 30 OA EMI TODOAAS A9 3C LDA=3C ~AEl B1 39 LDA (P9), YOAA7 8D 11 E8 STA rsri OAE3 10 06 BPL TODOAAA 76 START 8EI OAE5 A9 40 LBN LDA=40OAAB 20 4C OB JSR INIT OAEl 11 39 ORA (P9), YOAAE A2 01 LP3 LDX=l OAE9
91 39STA (P9) ,Y
OABO B1 29 LDA (P1) ,Y OAEB 88 TOD DEYOAB2 10 01 BPL 01 OAEC DO CO BNE LP3OAB4 CA DEX OAEE A2 12 INPTS LDX=12OAB5 Bl 2E LDA (P2) , Y OAFO F6 28· LP4 INC TBL-l,XOAB7 10 01 BPL 01 OAF2 CA DEXOAB9 CA DEX OAF3 CA DEXOABA E 1 2D LDA (p3), Y OAF4 DO FA BNE LP4OABC 10 01 BPL 01 OAF6 C6 3F DEC CNTOAEE CA DEX OAF8 10 B4 BPL LP3OABF El 2F LDA (F4),Y
OAFA A9 12 RESTR LDA=12OACl 10 01 BPL 01OAC3 CA DEX
OAFC 85 3F STA CNT
19:46 MICRO -- The 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 49/84
OAFE A9 OC LDA=P9H OB4C AO 17 I N I T LDY=17OBOO 8D 05 OB STA P9H' OB4E BE 69 OB LB7 LDX TBL2-l, Y
OB03 lE 51 OC LB4 ASL P9' ,X OB51 96 28 STX TBL-1, YOB06 CA DE X OB53 88 DE YOBO? DO FA BNE LB4 OB54 DO F8 BNE LB7
OB09 EE 05 OB INC P9H' OB56 60 RTSOBOC C6 jF DEC CNTOBOE 10 F3 BPL LB4 OB57 20 4C OB CLEAR JSR INIT
OB5A E6 3F INC CNTOB10 A9 34 TSCR LDA=34 OB5C A9 00 LDA=OOOB12 BD 11 EB STA EB11 OB5E 91 29 LB8 STA (Pl), Y
OB15 A2 lB LDX=lB OB60 88 DE Y
OB1? AO 27 LB5 LDY=27 OB61 DO FB BNE LBBOB19 Bl 3B LB6 LDA (PA),Y OB63 E6 2A INC P1HOB1B 10 04 BPL 04 OB65 C6 3F DEC CNTOB1D A9 51 LDA=51 OB67 10 F5 BPL LBBOB1F DO 02 BNE 02 OB69 60 RTS
OB2l A9 20 LDA=20OB23 91 3D STA (Ps), Y TBL2 TB L
OB25 88 DEY OB6A 00 TBL2 0029 00 PlLOB26 10 Fl BPL LB6 OB6B OC 002A OC P1HOB28 20 34 OB JSR INPDEX OB6C 01 002B 01 P2 L
OB2B 10 EA BPL LB5 OB6D OC 002C OC P2HOB2D A9 3C LDA=3C OB6E 02 002D 02 P3 LOB2F 8D 11 EB, STA £811 OB6F OC 002E OC p3 HOB32 58 CLI OB?O 50 002F 50 P4 L
OB33 60 RTS BACK TO BASIC OB7l OC 0030 OC P4H
OB?2 52 0031 52 P5LOB34 18 INPDEX OLC OB?3 OC 0032 OC P5H
OB35 A9 50 LDA=50 OB74 AO 0033 AO P6L
OB3? 65 J B ADC PAL OB?5 OC 0034 OC P6HOB39 85 3B STA PAL OB?6 Al 0035 A1 P7LOB3B 90 03 BCC 03 OBn OC 0036 OC P7ROB3D E6 3C INC PAR OB?8 A2 0037 A2 P8L
OB3F 18 CLC OB?9 OC 0038 OC P8R
OB40 A928 LDA=28 OB?A 51 0039 51 P9LOB42 65 3D ADC PSL OB?B OC 003A OC P9HOB44 85 3D STA PSL OB?C B5 003B B5 PALOB46 go 02 BCC 02 OB?D 11 003C 11 PAROB48 E6 3E INC PSR OB?E 00 003D 00 PS LOB4A CA DEX OB?F 80 003E 80 PSHOB4B 60 fiTS OBBO 12 003F 12 CNT
. 8 5 0 2 . 8 4K B Y T E R A M A N D CONTROLLER SETM AK E" 64K "B YTE M EM OR Y FO R Y OU R 6B OO O R
6 50 2. T HI S C HI P S ET I NC LU DE S:
* 32 M5K 4116·3 16KX1.200 NSEG RAM S.
* 1 M C3480 M EM ORY CONTRO LLER .
* 1 M C3242A MEMORY ADDRESSM U LT IP LE XE R A N D C OU N TE R.
* DATA AND AP PLICATIO N SH EETS. P ARTS
T ES TED A N D GU A R AN T EED.
1 32 5 .0 0 P E R S fT
16K X I DlN AM IC RA M
THE M K4116·3 IS A 16 .364 B IT H IG H SP EED
N M OS . D YN AM IC R AM . T HE Y A RE E aU IV AL EN T
TO THE M OSTEK . TEXAS INSTRUM ENTS. OR
MO TO RO L A 4 1 16 ·3 .
* Z OO N S EC A CC ES S TIM E. 3 75 N SE C CY CL ETIME.
* 1 6 P IN T TL C OM P AT IB LE .
* B U RN ED I N A N D F U LL YT ES TE D.* P AR TS R EP LACEM EN T G UARA NTEED F OR
O N E Y EA R .
$ 8.5 1 1 E A C H IN O U AN T I T IE S O F 8
A S S E M B L E D I { W I T H 32K R A M ' " $ 4 1 9 .0 0T E S T E D W I T H 16K R A M $ 3 4 9 .0 0
W IT H O U T R A M C H IP S . . . . . . . . . . . . . . . . . ' 1 2 7 9 .0 0
H AR O lD G E T P A R T S O NL Y ( N O R A M C H IP S ) . $ 1 0 9 . 0 0
B A R E B O A R D A N D M A N U A L $ 4 9 . 0 0
* P LU G CO MP ATIB LE W ITH K IM /S YM / A IM ~.M AY B E C O NN EC TE D T O P ET U SIN G A DA PT ORC AB LE . S S4 4-E BU S E DG E C ON NE CTO R
* USES +5V O NLY (SUPP llED FROM HOST
C OM P UT ER B US ). 4 W AT TS M AXIM U M.* B OA RD A DDR ES SA BLE IN 4 K B YTE B LO CK S
W HICH CA N B E I NDE PEN DE NTL Y P LA CED O N
4K B YTE B OU NDAR IES AN YW HER E IN A 64K
B Y TE A DD RE SS S P AC E.* ASSEMBLED AND TESTED BOARDS ARE
G UARANTEED FOR O NE YEAR . AND
P UR CH AS E P RICE IS F ULLY R EF UN DA BLE IFB OA RD IS R ETU RN ED U NDA MA GED W ITH IN
1 4 D A YS .
* B US B UF FE RED W ITH 1 LS TTL LO AD.
* 2 00 NS EC 4 11 6 R AM S.* F U LL DOCUMEN TA TI O N
K IM / S Y M / A IM - 6 5 - 3 2 K E X P A N D A B L E R A M
D Y N A M IC R A M W I T H O N B O A R D T R A N S P A R A N T R E F R E S HT H A T I S C O M P A T I B L E W IT H K IM /S Y M /A IM -6 5A N D O T H E R 6 5 0 2 B A S E D M I C R O C O M P U T E R S .
C O N NE C TS T H E A B O V E 3 2 K E XP AN DA B L E R AM T O A 4 K O R B K P ET .
C O N TA IN S E X P A I I S 1 0 N I N TE RF A C E C A B LE . B O A RD S T A ND O F F S .
P O W E R S U P PL Y M O l l i F IC A T I O N K IT A N D C O M P LE T E IN S T RU C T IO N S .
P E T IN T E R F A C E K IT $ 4 9 .0 Q
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 50/84
EASYWRITER~the 1st true Word Processor for the Applel"
Are you looking for the best Word
Processor for your Apple? Well we are
so sure you'll choose EasyWriter that
we've prepared this ad to help you
make your decision EASY.Check out
these powerful features:
• Incremental spacing to support your
Qume, Diablo, or Spinwriter
• Character oriented (No line numbers
to deal with)
• Menu selectable routines for all
known printers and interfaces
• Word wrap around on screen for
continual text entry
• Our own new high speed DOS
(Twice as fast as Apple's)
• Of course full editing, disk, and
printer commands
• Subscripting, Superscripting, and
MORE MORE MORE ...
The straight facts make EasyWriter the
only logical choice. By the same people
who brought you WHATSIT. Available
at your local computer store or our newCalifornia office!
793 Vincente
Berkeley, CA94707
(415) 525-4046
146 N. Broad Street rGriffith. IN 46319(219) 924-3522
It Isn't Software Until itWorks!
A perfect Christmas gift!
"EasyWriterEasyWrite r is a TM of Cap'n Software
"Dr. Memory
Dr. Memory is a TM of Muse
·Big EditBig Edit is a TM of Gravey, Martin & Sampson, Inc .
·Apple Pie
Apple Pie is a TM of Programma International, Inc.
"Super-TextSuper-Text is a TM of Muse
Apple
Apple is a TM of Apple Computers, Inc.
WhatsltWhatsit is a TM of Computer Headware
"" ~ *'" *
. . .~ Q ~ ~. . .
S"it
~
§. . .
E - o. . .~ "t7 ~ . : .~ :£ U J - ~III
",' C) ]Q, Q,
IC J . . . . Q, ::U J Q t: Q < (J)
Incremental Spacing X
Character Oriented Screen X X
Printer Interface Routines X
Word Wrap Around X X
Editing Commands X X X X X
High Speed Disk X
50 Pages of Text per Disk X
Subscripting & Superscripting X X
Your Choice
ORDERFORM
Information
_Unlimited"Software~.CUT ALONG DOTTED L INE
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Name:
Company:
Address:
CIty: State: Zip:
Iwould like more information on:
ITEM QUANTITY PRICE TOTAL
Easy Writer (EZ 2) $ 99.95
Whatsit Model A-I (Apple) 125.00
Whatsit Model CP·2 (CP/M) 150.00
Whatsit Model NS-3 (NStar) 100.00
Whatsit Manual 25.00
EasyWriter Manual 30.00
Subtotal $
CA Residents add 6% sales tax $
Shipping & Handling $ 2.50
GRANDTOTAl. $
Master Charge or Visa Number:
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 51/84
)
Applesoft Program Relocation
GeorgeS.Guild, Jr.117 Cardinal Drive
Hampton, VA 23664
Here is a simple technique to change the programstorage space when using Applesoft.
Integer BASIC has commands to set
boundaries for both the program upperlimit (HIMEM) and data lower limit(LOMEM). This gives Integer BASIC
users total freedom to protect areas ofmemory for HIRES graphics and/or
machine language subroutines. Ap·
plesoft however, uses fixed programstorage, and uses HIMEM and LOMEMonly to set the upper and lower boun-
daries of stored data. This lack of flex-
ibility can result in problems when using
Applesoft.
For example, RAM Applesoft userswere forever limited to 4K of program
space, when they wanted to use HIRESgraphics, even if 48K of memory was
available. Selting LOMEM to $6000(24576)preserves all 4K for programmingwith data saved above the HIRESpage2.Users of the Heuristics Speechlab have
found that the firmware stores its datastarting at $800(2048).This data wouldoverwrite any BASICprogramcreated by
the ROMApplesoft, limiting its use to In -teger BASIC.
The sequence of commands shown in
the insert allows Applesoft users toovercome this limitation. First decidewhere you want your program to start,l.e, the lowest address of the program.
For example, if you want to use the
memory space above HIRESpage 2, thisaddress would be $6000 (24576)for the
start of program storage. Store $00 to
the first three bytes here and then setthe program pointer ($67,68) to the star-ting address plus one.
Programs loaded will now start at
$6000 until you reset the pointer orreload/reinvoke Applesoft. CLEAR,
NEW, LOAD, and RESETdo not affect
this pointer. Change the start addressand program pointer for your re-quirements.
December, 1979
Do not set the program pointer lowerthan $801 for ROM Applesoft or $3001
for RAMApplesoft becausedoing sowilleither interfere with the text screenarea($400to$800)or overwrite the RAM inter-
preter which is stored at $800to $2FFF.
]SAVE
]"Reset"
*6000:0000
00
*67:0160
* 3DOG
]NEW
]LOAD
MICRO-- The 6502Journal
Users of DOS versions earlier than
DOS 3.2 may have to execute a CALL3314, for disk Applesoft, or a CALL
54514,for ROMApplesoft, in order to up-
date programs loaded from disk. DOS3.2does the required CALLautomatical-ly. Cassette systems have no such pro-
blem.
If the program you wish to
relocate is in memory you
must save it first.
Enter monitor.
Store zeroes at beginning
of new program space. If
omitted, strange syntax er-
rors occur.
Set program pointer to new
start address plus one.
Note that pointer is stored
in low byte first, then high
byte, as usual for 6502
microprocessor.
Disk system return to
BASIC. (Cassette
system/ROM Applesoft:
Control-B; RAM Applesoft:
O G )
Initialize Applesoft
Program will be loaded
starting at address $6000.
19:49
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 52/84
Presents
S oftware and H ardware for your A PP LE
SALES FORECAST provides the best forecast using the four
most popular torecasting techniques: l inear regression, log
trend, power curve trend, and exponential smoothing. Neil D.Upson's program uses artificial intelligence to determine the
best fit and displays all results for manual intervention. $9.95
CURVE FIT accepts any number of data points, distributed in
any fassion, and fits a curve to the set of points usinq log
curve fit, exponential curve fit, least squares, or a power curve
fit. It will compute the best fit or employ a specific type of fit,
and display ag raph of the result. By Dave Garson. $9.95
PERPETUAL CALENDAR may be used with or without a
printer. Apart from the usual calendar functions, i t computes
the number of days between any two dates and displays sue-
cessive months in response to a Single keystroke. Written by
Ed Hanley. $9.95
STARWARS is Bob Bishop's version of the original and best
game of intergallactic combat. You fire on the invader afteraligning his fighter in your crosshairs. This is a high resolution
game, in full color, that uses the paddles. $9.95
ROCKET PILOT is an exciting game that simulates blasting off
in a rocket ship. The rocket actually accelerates you up and
over a mountain; but if you are not careful, you will run out of
sky. Bob Bishop's program changes the contour of the land
every time you play the game. $9.95
SPACE MAZE puts you in control of a rocket ship that you
must steer out of a maze using paddles or ajoystick. It is a real
challenge, designed by Bob Bishop using high resolution
graphics and full color. $9.95
MISSILE ANTI·MISSILE displays a target on the screen and a
three dimensional map of the United States. A hostile sub-
marine appears and launches a pre-emotive nuclear attack
controlled by paddle 1. As soon as the hostile missile is fired,
the U.S. launches its anti-missile controlled by paddle O. Dave
Moteles' program offers high resolution and many levels of
play. $9.95
MORSE CODE helps you learn telegraphy by entering letters,
words or sentences, in English, which are plotted on the
screen using dots and dashes. Ed Hanley's program also
generates sounds to match the screen display, at several
transmission speed levels, $9.95
POLAR COORDINATE PLOT is a high resolution graphics
routine that displays five classic polar plots and also permits
the operator to enter his own equation. Dave Moteles' program
will plot the equation on a scaled grid and then flash a table of
data points required to construct a similar plot on paper. $9.95
UTILITY PACK 1 combines four versati le programs by VinceCorsetti, for any memory configuration.
P O S TA G E A ND H A NDLIN G
P lease add $1.0 0 for th e fi rs t itemand $.5 0 for each additional item .
• P rog ram s accepted for publication
• H ighes t royalty paid
Integer to Applesoft conversion: Encounter only those
syntax errors unique to Applesoft after using this program
to convert any Integer BASIC source.• Disk.Append: Merge any two Integer BASIC sources into a
single program on disk.
• Integer BASIC copy: Replicate an Integer BASIC program
from one disk to another, as often as required, with a
single keystroke .
• Applesoft Update: Modify Applesoft on the disk to elirnin-
ate the heading always produced when it is first run.
• Binary Copy: Automatically determines the length and
starting address of a program while copying its binary file
from one disk to another in response to a Single key·
stroke. $9.95
BLOCKADE lets two players compete by building walls to
obstruct each other. An exciting game written in Integer
BASIC by Vince Corsetti. $9.95
TABLE GENERATOR forms shape tables with ease from orrec-tional vectors and adds additional information such as star-
ting address, length and positlon of each shape. Murray Sum-
mers' Applesoft program will save the shape table anywhere in
usable memory. $9.95
OTHELLO may be played by one or two players and is similar
to chess in strategy. Once a piece has been played, its color
may be reversed many times, and there are also sudden
reverses of luck. You can win with a single move. Vince Corset-
ti's program does all the work ot keeping board details and
flipping pieces. $9.95
SINGLE DRIVE COpy is a special utility program, written by
Vince Corsetti in Integer BASIC, that will copy a diskette using
only one drive. It is supplied on tape and should be loaded onto
a diskette. It automatically adjusts for APPLE memory size
and should be used with DOS 3.2. $19.95
SAUCER INVASION lets you defend the empire by shooting
dawn a flying saucer. you control your position with the pad-
die whire firing your missile at the invader. Written by Bob
Bishop. $9.95
HARDWARELIGHT PEN with seven supporting routines. The light meter
takes intensity readings every fraction of a second from 0 to
588. The light graph generates a display of light intensity on
the screen. The light pen connects points that have been
drawn on the screen, in low or high resolution, and displays
their coordinates. A special utility displays any number of
points on the screen, for use in menu selection or games, and
selects a point when the light pen touches it. The package tn-
cruces a light pen calculator and light pen TIC TAC TOE. Neil
D. Lipson's programs use artificial intelligence and are not
confused by outside light. The hi-res light pen, only, requires48K and ROM card. $34.95
TO O R DER
S end check or m oney order to:
P .O . B ox 273
P lym outh M eeting , P A 19462
P A res idents add 6 % sales tax .
U .S . and foreig n dealer and dis tributor inquiries invited
A ll prog ram s require 16 K m em ory unles s specified
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 53/84
KIM and SYM Format
Cassette Tapes on APPLE IISteven M. Welch309 S. Sunset
Longmont, CO 80501
Now you can swap programs and data between yourAPPLE and any AIM, SYM or KIM via cassette I/O.
Many KIM and SYM owners havegraduated to bigger and better 6502systems" as their needs and financialsituations changed. If you are one ofthese people, and find that your KIM issitting in the corner gathering dustbecause your APPLE is so much easier
to work with, read on. With this program,you can use your APPLE as a "host corn-puter" for assembly language programdevelopment and then "down load" thef inished program into your single boardcomputer (SBC). Just like the big boys!Not only will you make better use of yourseveral hundred dollar investment, butyou will also have the bonus of a new setof computer jargon to bore your friends.The value of developing assemblylanguage programs in this fashion can·not be fully appreciated until you use theAPPLE to develop a sizeable program forthe SYM or KIM. The many miseries ofhand assembling magically disappear.The constant verbal self-abuse which
generally accompanies calculatorkeyboard entry and debugging quicklybecomes a fading memory. Have youever forgotten to initial ize a loop counteronly to realize it 300 bytes of handassembly later?
The program listed here was pro-duced to fill a need; a need to develop alarge program on a SYM_I estimate thatwe have saved an absolute minimum of2 man-months in the development of a1500 byte program by using the APPLEfor entry, debugging and assembling.Also, having a real assembler easilyavailable to us, we have written bettercode and have not needed the numerous
patches and kludges which inevitablycrop up when one writes large programsin machine code. At the University ofColorado at Boulder, where I amemployed, we are developing amicroprocessor-controlled ChargeCoupled Photo Diode [CCPD] spec-trographic detector for the Sommers-Bausch Observatory using a SYM-1 com-puter. Although this is a very nice SBC, itlacks certain features which are highlydesireable in a computer that will be us-
December, 1979
ed for program development, e.g., fastmass storage, an assembler, text editor,ASCII keyboard, and display device. Itseemed to us that the controlling pro-gram was going to take a great deal oftime to devise without these several con-veniences.
The "big boys" get around the lackof these features by purchasing [usuallyfor $10-20,000], a MicroprocessorDevelopment System. While our obser-vatory didn't havethe ten or twenty thou-sand dollars to throwaway, we did haveaccess to an APPLE II computer belong-
lSYM AND KIM FORHAT CASSETTE TAPE OUTPUT FOR APPLE II
J
J
J
J
J
J;BY STEVE WEl.CH~ 13 JUNE 79~ 389 S SUNSET, LONGMONT, co Be51lI,USA
J MOST SW COMMENTS ARE INDICATED BY ---
LARGEl.Y COPIED FROM THE SYNERTEK MANUAL, AND REPRODUCED
HERE WITH THE PERMISSION OF SYNERTEK SYSTEMS CORP.
(STARTING AT PAGE 8 OF THE AUDIO CASSTTE INTERFACE PROGRAM)
.DEF TAPOUT-SC828
J--- USE APPLE GAME PADDLE ANNUNCIATOR '8 FOR TAPE RECORDER
;--- ON-OFF CONTROL. RECORDER ON IS LOW
.DEF TAPEON-SC859 ;---PUT 8 HERE TO TURN ON
~'DEf TAPEOF-SCS58 J---PUT I HERE TO TURN OFF
~DEF TM1581-S47 J---PROB SHOULD BE TWEAKED'~DEF TIKE99-SIA J---FOR DELAY ROUTINE
'''DEF EOT-SI4
'''DEF SYN-S 16
';DEF BUFAOL-SE7 ;---ARBITRARY PLACE ON ZERO PAGE'''DEF BUFACH-SEa
~OEF CHAR-SEA
J
J---PROGRAK STARTS HERE. LINE 399 OF SYM CODE, LaC BEB7
J
.OEF BEGIN-S I881 ;---MUST START IN MIDDLE OF PAGE
.LOC BEGIN J---OUT OF THE WAY OF MOST SYM PROGS
J--- INITILIZ:E
1S81i12S Bell SYKOUTl JSR
1183 AI 81 LOY'1185 2C £811 BIT
lS88 II 10 BPL
J--- WRITE 8 SECOND
IS8A A2 18 LOX'
118C AI 15 KARK8Al LOY'118E 21 9511 MARK8Bl JSR
1891 88 DEY
1192 01 FA BNE HARK8B
1194 CA OEX
1195 DI F5 BNE MARK8A
J--- WRITE 256 STHS, FOR SYNC
1897 A9 16 OUMPTll LDA' STH
1199 21 1711 JSR OUTCTX
1'9C 88 DEY
1'9D De F8 BIlE OUMPT I;--- WRITE START CHARACTER
119F A9 2A LOA' '.'IIAI 21 1111 JSR OUTCTX
,--- VRITE 10IIA4 AD DFII LOA
1'~7 21 3BII uSR
START J---ENTRY- PARAMETERS SET BEFORE CALL
S8. J---IN CASE WE TAKE KIM BRANCHHODE J---TEST BIT 7 OF MODE (I-SYM,Il~KIM)
OUMPTI JKIH-DO 128 SYNS
HARK (THIS COULD BE SHORTER)
S8 J8 TIMES •••SIS J••• ONE SEC (21 DELAYS PER SEC)
DELAY J~~~BENIGN PAUSE, SYM USES KIM CHAR
10OUTBTX
MICRO -- The 6502 Journal 19:51
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 54/84
ing to my boss, Dr. Bruce Bohannan. TheAPPLE has almost all of the features ofthe typical Microprocessor DevelopmentSystem, except perhaps, a means ofcommunicating with the SSC in ques-tion. How can an APPLE talk to a SYM?Fortunately, both computers use the6502 micro-processor chip, so programsassembled for the APPLE have little orno trouble running on the SYM or KIM.Also fortunately, all of these machines
have a means of reading and writing pro-grams on audio cassettes. It goeswithout saying, of course, that the tapeformats of these machines are totally in-compatable. So we had to do sometranslating; either convince the SYM tospeak APPLE, or convince the APPLE tospeak SYM. Since it 's easier to developprograms on the APPLE [that's why I didall this in the first place), I decided toteach my APPLE to speak SYM.
It turns out that there is anothergood reason to teach the APPLESYMese. The SYNERTEK people, whomake the SYM, have been so kind as topublish listings of ·the SYM monitor in
the back of their manual. This monitorlisting has routines in it which produceSYM or KIM cassette tapes. The result isthat the program is very easily modifiedto run on the APPLE. No timers are used(the APPLE has none), and the serialdata is sent out through a single bit of a6522 output port. Although the APPLEdoesn't have any 6522s, it does haveseveral single bit outputs, and in par-ticular, it has a single bit output with thelevel adjusted to be used as a cassetterecorder interface. Even though this isnot a 6522 output, under certain condi-tions it can be thought of as one. Theway that the APPLE works, any time theaddress of the cassette output port ap-
pears on the address bus, the cassetteoutput flip-flop changes state. On theother hand, in the SYM, we send a par-ticular bit pattern to an address andthese bits appear on the output latch.Basically, what this means, is that wecan pretend that the APPLE cassette isthe SYM cassette output if we write onlyto this output when we want to changethe level of the cassette port. With theAPPLE, it should be noted, there is nocontrol over the phase of the outputsignal, but all of the cassette-readroutines in question are not sensit ive tophase. Fortunately, through good luck orthe good planning of the programmersat SYNERTEK, 90 % of the cassette out-
put code was written in just this way.This feature makes the program a snapto adapt to the APPLE. Once I had pick-ed out the proper pieces of theSYNERTEK code and figured out whatthey had done, I had only to change afew lines to obtain the results listedhere. Since I did not write the program, Iwon't explain how it works, but I haveheavily commented the listing for thosereaders who are interested.
19:52
1--- WRITE STARTING ADDRESS
111M ADDifi 1 l.OA SAl.
IIIIAD'1113811 .ISR OtTrBCX
11BI AD· DC 11 l.DA SAlt
IIS3 21 3811 JSR OUTBCX
l111B62C EIII BIT KODE
IIS9 II IC BPl. DUMPT2
1--- WRITE ENDING ADDRESS +1
IIiBSAD DoH l.DA EAl.
IIBE 21 3811 JSR OUTBCX
'ICI AD DELI l.DA EAH
IIC4 al 3811 JSR OUTBCX
1--- START OF MEMORY DUMP •••
1--- FIRST CHECK If THIS lS"THE !.AST BYTE OUT
IIIC7AS E r DUMPT21 l.DA BUFADl. J---l.OAD ADDRESS OF CURRENT BYTE
l11C9 CD 0011. CHP EAl.IICC 01 29 BHE DUHPT4 J---COHPARE TO ENDING ADDRESS
IIiCEAS E8 l.DA BUFADH
1101 CD DELI CMP EAH
'103 011 22 BNE DUHPT4 I---BRANCH IF WE HAVE MORE TO OUTPUT
1--- YUP, l.AST BYTE ••• WRITE "'-liDS A9 2F l.DA' f/'
11107 21 11711 .ISH OtrrCTX
;--- WRITE CHECKSUM
ll11DAAD En I l.DA
'IIlDD283SII JSRll1EIAD E211 l.OA
IIE3 28 3BII JSRI---WRITE TWO EOT'S
I.E6 A9 14 l.DAI EaTIIIE828 3BII JSR OUTSTX
liES A9 14 l.DA' EaT
'lED 21 3BII JSR OUTBTXI--Og, NOW WE'RE DONE, SO Cl.EAN UP & EXIT
IIIF. 18 -C1.C ;---INDICATE SUCESS
J--- SKIPPED l.OTS OF STUFF, MOSTl.Y SYM SPECIFIC
IIF1 A2 11 l.DX' SIll ;---SHUT OFF TAPE RECORDERl1T3 BE 58C. STX TAPEOT
JlT6 6. RTS
1--- NEXT IS THE CODE WHICH
I.F7 AI II DUMPT41 l.DY' SI
'.T9 BI E7 l.DAfY BUTADl.
IITS 2. 3811 JSR OUTSCX IWRITE IT & UPDATE CHECKSUMliTE E6 E7 INC BUTADl. IBUMP SUFTER ADDR
1111 DIllC5 BNI: DUKPT2
11.2 E6 E8 INC BUFADK ICARRY
11.4 4C C718 .IMP DUMPT2 I---GO BACK & SEE IF WE'RE DONE
Using the Program
It is a good idea to make a SYNCtape first. The APPLE output level isabout % of the SYM's output level whichmay require changing the volume onplayback from the usual value. Also, theAPPLE does not have a high-frequencyroll-off capacitor which the SYM uses,and as a result, the tone controls mayneed adjustment. The SYNC tapeenables you to set the controls properlyon your tape recorder (as outlined in theSYM manual, Appendix F). To make aSYNC tape, load the SYMOUT programinto your APPLE, set the mode by settingthe parameter, MODE (location $11EO),to $80 for SYM format or to $00 for KIMformat and begin the program at SYNC:($1000). This is an endless loop, sorecord a few minutes of the outputbefore you hit RESET and use the result-ant tape to set the level and tone on thetape recorder when reading it into theSYM (see Appendix F in SYM manual).Once you have the proper level and tonesettings, down-loading your program isfairly easy. First, load the SYMOUT pro-
gram. Then, load your executable pro-gram into RAM. Next, put in theparameters: Starting Address ($11DB-C).
CHKL
OUTSTX
CHKH
OUTBTX
MICRO -- The 6502 Journal
Ending Address ($11DO-E), Tape 1.0.Number ($11OF), and the MODE (11EO )and start the program at SYMOUT:($1080).Record the program, play it intoyour SYM, and there you have it!
Direct Computer toComputer Communication
A discovery by Dr. Bohannan: Ifyour tape recorder has a monitorhookup, through which you can listen toWhatever is being recorded, you canhook up the APPLE directly to the SYMand reduce the error rate astronomical-ly! On our SYM (whose tape interface ismodified as per MICRO's instructions),we have about a 70% chance of a sue-cessful load of our 1500 byte programwith our tape recorder, a Sony. The leveland tone control settings are extremelycritical as well. When the machines arehooked up directly through the monitorjack of our tape recorder, we have sue-cess eve ry time and the level and tonesettings are unimportant. I've also foundthat several of my tape recorders workvery well this way and have the monitorfeature through the earphone jack eventhough it is not marked.
IKIK OR HS?
I---AND WE'RE ALl. DONE
OUTPUTS THt NEXT KEH LOCATION
J---TIND THE NEXT BYTE
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 55/84
. . .. .. :J..0
~ ~ ~ e :. . . . . . . . : c
a . .:c
a ..: c
a ..o
IIIU
> -U
a ... . . l
< C: c
. . .~oU~
11\
1 0 1:E
. . .
.0. . ,. . .II.
oo. . . l
U1 0 1
"'1Il
:J::>II."'00:J.001
" ' 1 1 :> - 1 5 ~
~~III0 .. III
I I : : >I I CI I II.~ ~ ~
IIIU
> -U
a ... . . l
< C:c
. . .§oU~
I I I
D : I I I. . . .)(" ' I D. . . - 01 1 1 . . . 1 0 1
w i S t :~i5; ;. .. D :1 IlIIlU
W.fII'"D : 0 1 o o
1 0 1. . .> -I I I
C
~o,> -)(
1 0 1D:o. . .III
IIIa ::~
wzo.,- o
e iN
III
. . .. .I I I
1 0 1
~III
III
C~
. . .. . .I I I~
e ::c
1 0 1a : > -o...0
: : l ~a :I II I
I I
.1.11.0000. . . l . . . J
. . ,. . .
I I;"_
I I M . , I I I C 0 00..,.,
I I W W . - " " " " 1 0 1 1 0 1
~;~:!jg~~~~~~:z~!:~!=~::~ 1 I I 0 1 l l - . . , . , . o 1 l D 4 U W . M • . o ~ . C ~ C . M .. o . o . o ~~ ~~~ ~~ ~~ I I D I I D I I D I I D I I D I I D I I D I I D I I D • • ~
- - - - - - - - - - - - - - - - - - - ~ - - - -- - - - - - - - - - - - - - - - - - - - - - -
~ . . . . . . . . " " ' . . .1 01U ' " I I I l I D II I C II I W UI I IC l l O O C C O O C U O C C . o
::~:;::~~~~~~- - - - - - - - - - -- - - - - - - - - -
III
1 0 1Z. . .5oD:
. . .:: >o
a :w. . .UC
~:cU
III
:: >o
. .a :
~
" "o. . .a :C. . .III
December, 1979
. . .-I I
. . .a :C. . .I I I
•I I I
-I~ -I~
:cU
:l !a :I I I
zo. .. .U
:: >a : C I...I I I . .ZE- . . . .. . .. . .1 : i ~z a . .
I I I
II.oo. . . J
" "o:c. . .C I
~. . . J
. . .I I IC. . . J ~
""D :III
. .. . .. l. . .I I I . . .
. . . .. . . 1 1 1
1 : i ~Z
> -ti~C I
II.oo. . . J
I I I. .:c. . .a :
e1 0 1:E. . . .. . .
. . .. .I I Ii
U-. .-:U
C IZ-E-. .
. . .D:C. . .I I I+III. . .
. . .EIII....:.::.:C
D : . ..oX
III ....
:C:.:
a . .. . -
-I I
. . .:c
W u0...0 : : >:co
wC ICII.
1 0 1Zo
. . .. . . . .I I I II.
ti5C I " ,
. .. . .. J
-II.I I I I I I
x. . .U. . .:: >o
U W - . . , . o o o c c 0 " " . " ' ' ' . 0 . I I I U W " " - 4 " ' . o&~- --~~ww W~W~W~~MM
------ - - - - - - - - ------ - - - - - - - - -
x-xU...1 1 1 1 1 1. . . . . .: : > : : >00
MICRO -- The 6502 Journal
UU
C
z- 1 0 1...> - uI I I C C
...u> -uI I I C C
_ 1 0 1
:CO:o
1 1. . . .
! l : : lI I I D :
III
:.:I; l:cU
;!;!!(!:!: c : z : : z : : cu u u u
.M. . . .. . . :.:
1 : i aU
. . . .!( I a : ~: z : c . . .U ... 111
III
.D:UIII(\I
II.
--(")Q
W W & W
o o o o c O . l & l O O .c - , . , o o . , . w ~ . o
. 1 S I " ' 0 1 S l ~ 0 0 "ct .. . C C I I . o C C O O O O - D
U O W - 4 . o . , . C I I I W - " ' . o ~ ~ u a . .C C C I I II II II II II I II I I II II Uu uu uu u
-------- - - - - - - - - ~------- - - - - - - - - -
!i :E~D : I ! Io za . . . .E
:,; . .- . . ..:a :
20_ a . .
III
I-. . . .I I I
I-
:2
:Jo > -U a :
C I a :o z c cI- _U
a :EUlW_Z. . . . . . . . . . -: : ~a : . . .xoo_l I I u a . . 1 I I 1 I I..... ;II
: ' I - > - C O-x ...
a . . 1 I I ~ C C I I Ia . . w o ° ! i
~~:ti~:Jill I C l C C
" '" " " ' . " " . " " " '"
. . .-I I~
. .oa :10 1
N
III
w;>c cI I I.,
. . . . . .X > - C C C C C C D : X I I I X. . . . . . I - O : z : O I I I O U Q1 I I I 1 1 I 1 1 . . . l I l . . . . J . . . J . . . J I I I . . . J
M M. . . . . .z : _
U I I I. . . :,;: : > . .o :.:
- - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -19:53
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 56/84
<IIII
. . ,~
. . , III <"I..,<" I <" I w " ,
00-W I !I
III a ", . " , . ",Q", 10 , • cDC",
'"• ~ •<"IW",OI'" <I III <I :I e- QII'IW WQlo,onwu • <"I U • ",,,,on e-- . . --- • •----(\Io.~u- ~:t::::g!!l
., e- e - W <" I e- UIII. <"I "'QoO ",III.Io,-UIII e- oo • III W Q QQ • • OIat", 0100- 1 S t - - - & - . - - 5 • • • - - . •---- ------
.",U.Wr--oOwu",onr-r-<"I."'oOlo,_OO",_1o,1II U<I<"I..,onOloO"'<"I WQ<"I- •• onlll r- OO<"l<"lC<"I-QQ<lr-OI<"101.UU-IIICCIII",,,,UQQUWOIon<loOr-QOO r-OOCC"''''III<"IIII <"IQonCQQQIII '" .Io,U-"'<"I._~U---lStm&------a •• s•• ------- ---- ••• _. -.-. .... _- - - & - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -~~re::::~~~~=:~~u~:!~;:~:~~~~~;~=~~~~~~:~=:~::::- - - • • • • • • - - • • • • • • • - - - - - . - - - - - - • • • - s - - . - . _ & • • • • • • • • • _ _ • • - _- - . . . . - - - - - - - - - - a - - - - - - - - - - - - - - - - - - - - . _ ~ . . . _ _ . . _ _
...0:J: .J
Q Q
~ ~I!I ..,
Z Z. . . . .5 ~- t-III IIII I
I I
I I~
- -OOIllr-QWQW
~ : : : ~ : : : =.<"I"'OOCaaQQa----------
19:54
Wc:I
:.:.... _._ III
;U:::IS-aI I l I l l i 3 w ~ i !
••••••••••-01<"1., on1 0 1 1 0 1 " ' 1 0 1 1 0 1- _ . . . . _ ------
I.
I:I :~ . . . . . . . . . . . .
- .. . . . . .
••• uOIC~".<"I",at
••••••••
o:.
~:I~~~g~~~~=~~!~:~~~- . - - . - - - - - . - - - - .. , - -.- u__
~:~~~:::!$~~~~~~!!- . . - a - - - - - . - - - - . . - a- . - - - - - - - - - - - - . u - .
a
i9.:1II1IIr--onr-.,..,.UIo, •• <"IU • ..,.Cr-.00WW", •• .,Qr-",w,,"'Qoo •• -U.-.-- ..-------- ....-_ . . ~ _ u . _
MICRO -- The 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 57/84
I I I:.:u. . .I -I I I
e
~
flI I I
elll. 1 0 1 1 0 1l i l a :III 0.1 0 1
Ui:.:
~ I o .:.: . . .
.- , . ....o
Z. . . 1 0 .
I - "X I -1 - ' "0 4z~
~o.II:a :oI I I
a :o1 0 .
I -C I I1 0 1I -
1 0 . X-uzti~III I I I
. .. 1Il
1 0 11 - : ' :"'41 1 1 1 -
CIIZooC I
l S I I S I I S IU u-l S a & a . . c s a C O t S l C 8 0 1 - e g
C S l" '- -c J l.C 5a &a .. .& a. . .. . .
III
Z O...x u1 - 1 0 11 0 1 "z :o •III I -
. a :C l I O" ' 1 l .
W I -
1 5 ~X I -1 - 0o
1 0 .. . . 1 0 1X
e l -
~OI -
~l;1 0 . 01 0 .0 1 -", . . .
:.:el;li5X C I IU
~U
1 0 1oZ
l S I l S I . . l S I . l S I,- - u u--.&~...CI •• - - ~ . C I I C I I M e • • I o . C I I -. 1 o . ~ . I o . I o . C I I . U . ~ I o . U I o . I S I . . . I o . . I o . . 1 o .
~~~"'" " '"u l S l l S l e ~ u • • ~ . ~ - . C I l G . l I l e . l S l e ~ l S I - e u l S I . ~ C I l ~ . ~ .C I I M ~ 4 C 1 1 C 1 1 C 1 1 4 I o 1 e l o l ~ ~ 4 u e 4 u I o . 4 4 C 1 1 I o . I I I ~ C I I - C I I u 4 u e ~ ~
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~l S I l S I l S I l S I l S I l S I • • • l S I . l S I . . I S I • • • • • • • • • • • • • • • • • • I S I- - - - - - - - - - - - - - - - - - - - -
!,a."'- ....... I ,a . . .. .. . & a . . . ..
1 01 W W 1 01 ·1 01 01 W W We e e . c e e e e e.........
1 0 1 1 0 11 - 1 -> - > -1 1 1 1 1 1
e i1 0 .1 0 . :oI I I
. . . . l
~1 - :U
4
I -Z. . . -
0 1 0 .1 0 . 1 1 . . . .. . . - . .
. . . . l X1 - 1 - 1 -Z z z. . . . . . . . .0 0 0I I . I l . I l .
1 0 . to. 1 0 .1 0 1 1 0 1 1 0 1e e e
a :oIII
a :oU
I i :4. . . .III. .10 1
J:oX
C5 I
51C5 I
CII. . . .0I -
:i1 0 . > -1 0 . I -0 1 l .I I I :£
1 0 11 0 .0 sCI 1 0 .Z 1 0 .. . . 0:z : I I I
~tiI
1 0 1 III
I I Ie
t i ~III
. .X
I -
i5sa :
l;Ie
!.eto.oC O
.a :X > - > - > - > -u ....... • ••1 - 4 > - 4 0 : 4 4 4 a : a : > - 4 a : 4 1 1 lI o I x e e O I - . . . . l a : C l l C l l e e o l - l -1 ! I 1 l . . . . . l . . . . l I o l C I I I l . O . , . , . . . . l . . . . l I o l C l l a :
Z...1 0 1 -l o I up:;1Il
u 4III
III0 1 0 1;"CI
o::.~O XI - U4
. . . . l e
i~oU.0
u a : 1 o I4 0 eIll...
z a : ; >...0
u l o l
1 5 1 o . ~1 - 0 1 0 1<.l ; >
:~~44x a : oU I - I -
. . . 1 I l 1 ol
" ' 1 l . C I Iu I o I 4C l l i o l u4:':
c o :C l I O 1 0 1elll~
i 5~3C I I
1 0 1• a :•0
Z ' I -O a : C I I
4 1 0 1O X a :X uU I -w l o I C I I
; > 0 :Z 4 . . .I o I C 1 1 ~;. . .
uo. . . . l
.J. . . .. . .. . . I. . .I -. . .Z. . .
a :oC I I
~U
iii:.:4z :. .
.",IIt ...CJOU
•••••••••• IS I- - - - - - -
MICRO -- The 6502 Journal
CI
Z
XIII
4
t; !
. . . I . . . IC I I I S I C I I
X 4 U 4U I I I . .. I I I
ItIt
It
III~XC I I4
It
ItIt
IE1 0 11 0 1II:U
'"
Z10 1
1 1 : 1 0 1l o l a :I o . uI o . C I I
i zC i0 ' "
Z 1 0 ." ' I - ! : )
0 1 1 1: ' : 1 l .u :£- . 0 I -
l;;l;~ II:0
I l . I l .• Z a :
I -. . . 410 1 X ;:)
C I I : l : U I l .C l I O Z1 o I e ; 1 -
g : 1 :i I:c o : z 0
t ~ 1 -II: •1 0 . 2 1
: . : u o 10 1
G o a : 1 01
titisl o l a :. 1- U
I ! I I ! I O U I I l4a : z4 0
t i a : 1 o . X:co UI -
: ' : U I D Zt i l - : ' : ' " . .. 1 I l
I ! I r J a ; ! UI -C l I O
4 1 l .
a : c o : a : I I. I I l QC l l C I I I I I X ti~,.,.,.,
CI
~:II . X. . . U< c l -X W
CI
. . . I4Z
ex a :0:: «,...W 021I - a-
e ov,
,-1 l .0 CI - . . . . l l l :C I I 4 4
.,; _ 04 III II: III
0 WW III I -:.: 4. . . 1Il;C
. . . I l S I l S I -
~ '".: C5 I 1 - 1 -II: 0
'"I I I 0
CI 0 > - . . . 10 . . . I ~ 0 C l l I I la : . . . U It
I l . 1 o I ~ U 5 I. . . I - . . . . . - . . . . . . . . . . . .
> - I l . I - z-oooI - I l . C I Z O_..J..J..JI - 4 0 0 a : C l l e l l l I l
4 ' 1 ' : C I - + + +e l l e l l -CI U - I S I C I II I I W ~ " z ., ; 1 0 1 " ' G O G O4 ; : j - ' " ' O ;;I l S I l S I lSI. . . I 1 1 . . . 1 Z u u uCI E ~ 0 tI iI ..... .,.. . . . . . . . U'l4l' •••
1 0 1
'G~ti-r W ..." I -
. . . I . . . " ' 1 0 1 - 0I l . ~!3;:;~ Z O l - I - O l l .1l. - 0 < c 0 . 1 -« a : > 1 S I 0 1 0 . ~ . . . I I - Z O
CI M C I I 1 0 1 CI1Uli"'O
0 1 0 1 " e Q a :a::> Vl C II l . W I o l 1 0 1 0
I - Z ~ :c a :~ C I I O . 0 Q . . . .. .. . & &. . . . .
X M C I I W l o l 1 0 1 1 0 12 1 > - 0 . e I I Q Q Q C" ' 1 1 1 I - . . .!
C I I Xa : I -. . .
I - 1 0 .
~ . . . . . . . . . . . . . . . . . . . . . . . . . "'- . . . .
December, 1979
. . . . l . . . l x x1 - 1 - 1 - 1 -
!S I ~ ~ . ~ ~W . . . I
. X . III. 0 0 0 1 0 0
~ : a =CI
. . . 1 I I 1 l . . . .1 I I 1 l . 0a :
> - I I .
. . . . . . . •4 < C < C 4 < C 4 a : 4 > - C 1 0 .e l - I - e l - - I - C I I Q e l - 0. . . I C I I C I I . . . I C I I .C I I . , . . . I .. . I C I I
0 .
;: . 00. . . ..J
WX Z0 . . .:c C
x
~a :oC I I Za : o0...UI --I ' "2 1 0- 1 l .XC l l i o l«E. . . 1 · 0...x
• • u ••••
~; •• ~- ~ •• ~ ;ftW;• 1 0 . 1 0 . 0 1 1 0 . 1 0 . C I l ~ C l l C I I M " ' ~ _
" " ' - ~ . ~""'~~~~~~:~~;:::~...A.- - - f t••••
w_ntl).---••••
~ : l i i i ~ ; ; : ~ : : ~ ; i i i ~ ; ; : ~QW.Nq~""'C)l.U ...C?lOr-. . . . . . I D G O G O G O G O G O ~ G O ~ c ) O ~ ~. . I 5 I S I . . . . I S I . I 5 . . . . . . 1S I- - - - - - - - - - - - - -
·u. . . C) VI
Z .,;W
1: :x : 0OWl- I -U . . . I W
I I I : ; : VI
«40 r1 - . . . 1 III 0 f !j... a :e 4 1 - « :>:>0 0 Z
" ' 4 ' " I I I 04 UX « • z:>
I - X 0 1 - ·. : « U 0:: ~e z "0
l i l l o . ; : !I - :.:
a :U I o . I I I 4 1 - I I Ia X . . . l -
I - e l l U W
I I I X 1 0 1 e CI
~~~ ti~ ·- : I : I - C l I I l ae l le l l
e l l I - W
0 1 - ; : ) II:0 . 1 - Z ; : ) 0 I l .0 « . . , 0 1 l . a :O l - G O O Z X e l l. . . I e I I . .CI " ' U
Z ~- . . .4 4 Q W e I I « l t : e I I :.:z : g ~ ~ l i : g ~ 1 i : 1 0 .> -Ill"
a :Q X
~i I U Z. . . I I - 0 :.:
.~~~o
tiIo C IlSI C 5 1 1 S 1
I U u -1-.- . . etuea. U . . .
e ~ l S I l S I e l S l l S l4 C 1 1 e ~ « C I I ~
, " , . : 1 1 0 4 1 1 1 1 0 1 -O I 0 1 0 1 C 1 1 C 1 1 0 1 , " ,l SI " I S I " I S I l SI •-------
1~:55
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 58/84
z. . .< CX
l S I l S IID W. . . .
b l b I b I W W. . . . . . . . . . . . . . .> - > - > - > - > -I I I I 1 1 I 1 1 C 1 1 1 1 1. , .. ' ..
l S I
e-
o I S I I S I I S I I S I I S I. , 1 SI 1D 1i I1 SI 1S I
ta l _OIM.;JU')
1 0 1 . .. .. .. .. .. .. ..l S I I S I I S I& I S II S I-----
II:oI I I
!5o
. .J< C. . .ob ID .
I I I •1 0 11<:111
O< C"'0
Q C i~>0 0I I I . . J
i :iQ:.:~:Eo •
e :~1 0 1
I I I ' "
1 5 ~
~i11:0< C: < : . . J00II:
:.: . . .oz1 0 1 0: J : Oo
oD .I I I
~o
19:56
~ : ~ ~ ~ g j ~ ~ ~ ~ : : ! u : i : : g. . . 1 S l 5 i Q I S l I S l I S l I S I & 1 S l 1 S l 1 S l 1 S l 1 S l 1 S 11 & . - - . . . .--O_U5 _
III
I I D I I l I o l Q ~ N II D I S I . .. O~ I S l I l l I S l -~0 1 ' " " ' . . . . . . M I Il IS l - I I l0 0 . . . ., . , . . . l S I5 I I S I I S I I S I I S I I S I U & I S I C I I l S l m I S l S . -
1SI-----ia.U--UIS-Sl-
.,
. . .l S I
1 0 1 < C O l< c . . . . . .0 5 1 l S I l S I
. . . ~ 1 1 1 1 1 1 1 0 1 l S Il I D . . . .0111" lS I . . .0 5 1 l S I 0 5 1 l S I l S I lS I l S I
l S I
O I l l . , W Q~ lID iii 1 I I ~ 1 I l ~ 0 5 1 1 i I -. . . . . . . . . . . . e- M 1 0 1 .,"'., l S I 1 1 1 0
0 5 1 0 5 1 l S I l S I & l S I 0 5 1 0 5 1 & I S I & l S I 0 5 1 0 5 1 l S I0 5 1
'"~!:; i : i Q . . . ~t _~
~~~~~t~E~~~~~§5:C l l I I I O O W ~ : J : : ' : Z Z D . D . I I I I 1 1 " ' ~
l S IIDl S I
III
l S I
l I D ' " l S I M 1 o I 1 1 1 1 D . . . O Q . . . . . . M W I I I II D b i... 1Il1ll ... . , 0 " ' 0 0 1 D 4 Q Q W M W M &l S I l S I l S I & l SI l SI l S I 0 5 1 & • • I SI &I SI l SI l S I &
I I I '" l I D&o M 1 1 1 M" W Q . 4 ~ 1 I I 0 0& & . & I S I & & &---tIII----
! l l O I Q . . . . ~ O O O . . . Q O O . O I l l -N M M O N " ' Q l I l o O ~ < C . & & O• • • 1 S l . 1 S I . & . & . & & & . &- - - - - - - - - - _ 1 8 _
II:oI I I
!5o
1 0 1: J:. . .II:1 0 1Q
~
Q1 0 1I I II I I Q
~~D . : E
: £1 1 1 0"0
;:Jill. . .g !4...5o . . .Q;:J
11:0< CO Q
~i5Q I I I
. . .I I I4o
II:
~o.. J
1 0 1I I I< Co
. .J< c:< :. . . ~:EZ11:0
: ! < l
1 0 1;cI-
. . .. . .o
~o. .J
o1 0 1Q
~
I-. . . til
:.:o1 0 1:. :o
< Cp..0 > -O . . J. . J . . J
z~" ' 1 1 :< CE ...Z
0111. . . . . .2:111
~;;ti!:II:
~o:co1 0 1
Q
Q
< C
2:II:;:J
tiII:
1 0 1:c. . ... J
5D .
1 0 1::>o1 1 1 1 0 1< coo
1 0 1 : £:c...
:J :...ow1 o I l l .Z...O . . JZ'"
.§tiII:
Q
:= !
II:o. . .:.:ob I:co
s ~. . . . .
!;o
tiI I I
MIC RO -- T he 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 59/84
APPLE [email protected] & EXPANDA·PORT
E VE R Y A P P L E II O WN E R S H O U LD H A VE O N E !
JOYSTICK $49.95
The PROGRAMMA JOYSTICK is an input peripheral that
attaches to the APPLE II Computer's game I/O Port. The
JOYSTICK is a must for the serious game player, and it
offers a degree of linearity not currently available with other
joysticks. The ease of manueverability and the availability
of the "functional" switches make the PROGRAMMA
JOYSTICK a much needed enhancement to any APPLE II
Computer System owner. The PROGRAMMA JOYSTICKcomes completely assembled and tested, including a User's
Guide.
The PROGRAMMA EXPANDA-PORT is a multi-port ex-
pander for the game I/O port of any APPLE II Computer
System. In addition to allowing expansion for up to six
devices, the EXPANDA-PORT contains a built-in speaker
that replaces the function of the Apple II's speaker. The
switches on the EXPANDA-PORT allow for the selection of
the specific device desired and for the switching of that de-
vice. No unplugging of any device connected to the
EXPANDA-PORT is required. The PROGRAMMA EX-
PANDA PORT comes completely assembled and tested.in-
cluding a User's guide.
The PROGRAMMA JOYSTICK and EXPANDA-PORTare
available on a limited basis through your local computer
dealer. Apple II is a registered trademark of Apple Com-
puters, Inc.
EXPANDA-PORT $49.95
PROGRAMMAINTERNATIONAL. INC.
3400 Wilshire Blvd.Los Angeles, CA 90010 (213) 384-0579 • 384-1116• 384-1117
' D no~ m 3
a. '< - acinen rt rtrt m mU J 3 ,
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 60/84
The world we live in is full of variables we want tomeasure. These include weight, temperature, pressure,humidity, speed and fluid level. These variables arecontinuous and their values may be represented by avoltage. This voltage is the analog of the physical varia-ble. A device which converts a physlcal, mechanical orchemical quantity to a voltage is called a sensor.Computers do not understand voltages: They under-stand bits. Bits are digital signals. A device which con-verts voltages to bits is an analog-to-digital converter.Our AIM16 (Analog Input Module) is a 16 input analog-to-digital converter.
The goal of Connecticut microComputer in designingthe DAMSYSTEMS is to produce easy to use, low costdata acquisition modules for small computers. As theline grows we will add control modules to the system.These acquisition and control modules will includedigital input sensing (e.g. switches), analog input sens-ing (e.g. temperature, humidity), digital output control(e.q, lamps. motors. alarms). and analog output control(e.g. X-Y plotters, or oscilloscopes).
Connectors
The AIM16 requires connections to its input port(analog inputs) and its output port (computer inter-face). The ICON (Input CONnector) is a 20 pin, soldereyelet, edge connector for connecting inputs to each ofthe AIM16's 16 channels. The OCON (Output CONnec-tor) is a 20 pin, solder eyelet edge connector for con-necting the computer's input and output ports to the
AIM16.The MANMODl (MANifold MODule) replaces theICON. it.has screw terminals and barrier strips for all 16inputs for connecting pots, joysticks, voltage sources,etc.CABLE A24 (24 inch interconnect cable has an inter-face connector on one end and an OeON equivalent onthe other. This cable provides connections between theDAM SYSTEMS computer interfaces and the AIM16 orXPANDRl and between the XPANDRl and up to eightAIM16s.
ICON $ 9.95OCON $ 9.95
MANMOD1 " . $59.95CABLE A24 ... $19.95
Analog Input Module
The AIM16 is a 16 channel analog to digital converterdesigned to work with most microcomputers. TheAIM16 is connected to the host computer through thecomputer's 8 bit input port and 8 bit output port, orthrough one of the DAM SYSTEMS spectal interfaces.The input voltage range is 0 to 5.12 volts. The inputvoltage is converted to a count between 0 and 255 (00and FF hex). Resolution is 20 mill ivolts per count. Ac-curacy is 0.5%± 1 bit. Conversion time is less than 100microseconds per channel. All 16 channels can bescanned in less than 1.5 milliseconds.Power requirements are 12 volts DC at 60 rna,
The POWl is the power module for the AIM16. OnePOWl supplies enough power for one AIM16, oneMANMOD1, sixteen sensors, one XPANDRl and onecomputer interface. The POWl comes in an Americanversion (POWla) for 110 VAC and in aEuropean ver-sion (POWl e) for 230 VAC.
AIM16. .. $179.00POW1a $ 14.95POWle $ 24.95
XPANDR1
The XPANDRl allows up to eight AIM16 modules to beconnected to a computer at one time. The XPANDRl isconnected to the computer in place of the AIM16. Up toeight AIM16 modules are then connected to each of theeight ports provided using a CABLE A24 for eachmodule. Power for the XPANDRl is derived from theAIM16 connected to the first port.
XPANDR1 ... $59.95
TEMPSENS
This module provides two temperature probes for useby the AIM16. This module should be used with theMANMODl for ease of hookup. The MANMODl willsupport up to 16 probes (eight TEMPSENSmodules).Resolution for each probe is 1°F.
TEMPSENS2P1 (·1 O aF to 120°F) ... $49.95
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 61/84
Computer Interfacesand Sets
For your convenience the AIM16 comes as part of anumber of sets. The minimum configuration for a usablesystem is the AIM16 Starter Set 1. This set includesone AIM16, one POW1, one ICONand one OCON. TheAIM16 Starter Set 2 includes a MANMOD1 in place ofthe ICON. Both of these sets require that you have ahardware knowledge of your computer and of computerinterfaci ng. .For simple plug compatible systems we also offercomputer interfaces and sets for several home com-puters.The PETMOD plugs into the back of the Commodore
PET computer and provides two PET IEEE ports, oneuser port and one DAMSYSTEMS port. The PETMODisconnected to the AIM16 or XPANDR1with CABLE A24.The PETSET1 includes one PETMOD,one CABLE A24,one AIM16, one POW1 and one MANMOD1. To readand display a single AIM16 channel (N) using thePETSET1 the BASIC statements
F'OKE59426, N:POKE59426, 255: X;F'EEK( 59471 ): F'RINT "CHANNEL "N";" X
are all that is needed.The KIMMOD plugs into the COMMODORE KIM ap-plications connector and provides one application con-nector and one DAM SYSTEM'S port. The KIMMOD isconnected to the AIM16 or XPANDR1with CABLE A24.Assembly and machine language programs for readingand displaying data are included. The KIMSET1 in-cludes one KIMMOD, one CABLE A24, one AIM16, one
POW1 and one MANMOD 1.All sets come in American and European versions.
AIM16StarterSet1a(110YAC) $189.00AIM16 Starter Set 1e (230YAC) $199.00AIM16StarterSet2a(110YAC) $259.00AIM16 Starter Set 2e (230 YAC) $269.00
PETMOD $ 49.95KIMMOD $ 39.95
PETSET1a $295.00PETSET1e $305.00KIMSET1a $285.00KIMSET1e $295.00
Coming Soon
TEMPSENS-2P with other temperature ranges. Inter-faces for TRS-BO,APPLE. AIM65. Light sensors. Out-put modules. Contact us for price and availability.
Give your potential customers a reason for buying yourcomputers. We offer excellent discounts to legitimatedealers. Contact us for our dealer pack.
Dealers
Our Guarantee of Satisfaction
Our customers are our most important asset. We wantyou to be pleased with whatever you purchase from us.We strive to offer top quality products at reasonableprices. We believe you should see an item before youspend your hard earned cash for it.Ask for a demonstration at your local computer storeso you can be sure our products perform as you wantthem to perform. Yourdealer is a valued source of infor-
mation and advice.If you cannot see our products in advance, and orderdirect from us, we offer a money back guarantee. If ourproducts don't perform as you expect. return the mer-chandise to us within 30 days, in its original condition,and we will refund the purchase price.Our standard warranty for all our products is 90 days.
Order Form
CO N N EC T IC U T m ic roC OM PU T E R , In c .150 POCONO ROAD
BROOKFIELD, CONNECTICUT 06804
TEL: (203) 775·9659 TWX: 710·456·0052
QUANTITY DESCRIPTION PRICE TOTAL
SUBTOTAL
Handling and shipping - add per order $3.00
Fo reign orde rs add 10% for AIR postage
Connec ti cut res iden ts add 7% sa les tax
TOTAL ENCLOSED
NAME __
COMPANy· __
ADDRESS __
CITy _
STATE ZIP __
VISA 0 MI C 0 Expiration date __
Card number' . _
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 62/84
PET Printer Adapter
The CmC ADA 1200 drives an RS-232 printer from thePET IEEE-488 bus. Now, the PET owner can obtainhard copy listings and can type letters, manuscripts,mailing labels, tables of data, pictures, invoices,graphs, checks, needlepoint patterns, etc., usingRS-232 standard printer or terminal.A cassette tape is included with software for plots,formatting tables and screen dumps. The ADA1200sells for $169.00 and includes case, power supply and
cable.
Order direct or contact your local computer store.
VISA AND "Ie ACCEPTED - SEND ACCOUNT NUMBER, EXPI RATION DATE AND StGN ORDER.ADD 13 PEA OROE" FOA SHIPPING a HANDL ING _ FOREIGN ORDERS ADD 10' 1. FOR A IR POSTAGE
CONNECTICUT microCOMPUTER, Inc.150 POCONO ROAD
BROOKFIELD, CONNECTICUT O 6 S 0 < f
TEL: (203) 775-9659 TWX: 710-456-0052
Put Yourself in Control with theAPPLETHROTTLE
That's right! The IWPLETHROTTLF wil l tumyour game paddles into a speed controller.Bysimply pushing a button, you can stopyour computer for as long as you wantRelease the button, and your computerenters a slow-motion mode with onepaddle controlling the speed. And if thatisn't enough, look at these additionalfeatures:
• Plugs intoany slot
• Works withmachine language, IntegerBASIC,and Applesoft
• Normal - slow· stop
• Use to UST, TRACE,RUN,etc.
• NO S O F TW A R E to load=APPLE THRO TTLE $89.95
• Unveilprogram secrets
And there's more! Nomore multipleUST commands to view smallprogramsections. With the APPLETHROTTLE, you'll be able to list or trace longprograms whilewatching your program flowin slow-motion, So get incontrolwiththe A PP lE TH RO T TL E and order yours today!
PROTOBOARD,with over 1300holes on 0_ 1 centers for designingyour own circuits.APB·1 Protoboard . _. _ $17.95
APPLETIME,a Real Time Clockforthe Apple D . Plugs directly intoanyslot and keeps time even whencomputer is off. Features 12/24
Hour, BCD/ASCII data format, andAC/Crystal time base selection.Includes software examples formachine language and BASIC pro-grams. Completely assembled andtested.
APT·1 RealTime Gock $79.95
VERBATIM 5'/4" DISKETTES
Soft-Sector Boxof 10 • • . $34.50(plastic file case included)
west side electronicsP.o. Box 636, Chatsworth, CA 9131 1We pay all shlppmg In Commenral USA
Ochers add 10% California residents add 6%rax
Apple-DocBy Roger Wagner
An Aid to the Development
and Documentation of Applesoft Programs
This 3 program set is a must to anyone writing or using programs
in Applesoft! It not only provides valuable info. on each of your
programs, but allows you to change any element throughout the
listing almost as easily as you would change a single line!!
With Apple-Doc you can produce a list of every variable in your
program and the lines each is used on, each line called by a GOTO,
GOSUB, etc., in fact, every occurance of almost anything!
You can rename var iables, change constants and referenced line
#'5, or do local or global replacement editing on your listing.
In fact, we guarantee that after purchase, if you don't feel
APPLE-DOC is one of the most valuable programs in your library
we will even refund your money! (Upon return of product.)
Unheard of? Yes! But that's how good APPLE· DOC really is!
That's not all!! Send for free info. or visit your nearest Apple
dealer.
Only $19.95 Please specify diskette or tape.
(Calif. residents add 6%Sales Tax)
Available from your local computer store or :
Southwestern Data Systems
P,O, Box 582·M
Santee, CA 92071(714) 562·3670
(Dealer inquiries invited)
PET Word Processor
8Ka n d
16/32KPET
versions
This program permits composinq and printing letters,flyers, advertisements, manuscripts, etc., using theCOMMODORE PET and a printer.Printing directives include line length, l ine spacing,left margin, centering and skip. Edit commands allowyou to insert lines, delete lines, move lines andparagraphs, change strings, save files onto and load
files from cassette (can be modified for disk), moveup,move down, print and type,Added features for the 16/32K version include stringsearch for editing, keyboard entry during printing forletter salutations, justification, multiple printing andmore,A thirty page instruction manual is included.The CmC Word Processor Program for the 8K PET is$29.50. The 16/32K version is $39.50.
Order direct or contact your local computer store.
YISA AND "Ie ACCEPTED - SEND ACCOUNT NUMBER, EXPIRATI ON DATE AND SIGN ORDER.ADO 11 PER ORDER FOA SHIPP ING a HANDLING - FOREIGN ORDERS ADD 10'1. FOR AIR POSTAGE
CONNECTICUT microCOMPUTER, Inc.150 POCONO ROAD
BROOKFIELD, CONNECTICUT O 6 S 0 < f
TEL: (203) 775-9659 TWX: 710-456-0052
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 63/84
Graphics and the
Chalienger1P
The Challenger computers have some interestingsgraphic capabilities. A discussion of the inner workingsof the graphics and programs for using them arepresented..
Introduction
Recently I purchased an OSIChallenger C1P, and I find its graphicsand polled keyboard to be interestingtools for the programmer. But to the
computer hobbyist with little experiencein programming, it may seem very con-fusing. Since the C1P's introduction, Ihave seen few articles describing thegraphics capabilities or use of the polledkeyboard.
Part I
Programming the C1P in BASIC toutil ize the graphics elements containedin the character generator and the polledkeyboard are simple tasks when oneunderstands how these functions work.This article will explain the polledkeyboard functions and give a brief
descript ion of a program that I have wrlt-ten in Microsoft OSI BASIC to lrnple-ment the graphics characters containedin the C1P character generator ROM.
The user of the C1P will find thekeyboard a very interesting feature.Every key on the keyboard can be pro-grammed and read under BASIC. Thismakes for real-time utilization of thekeyboard. The program included in part Iof this article shows how the keys are
December, 1979
read with a PEEKstatement and how thekeyboard is strobed with a POKE state-ment. The keyboard is laid out in amatrice of eight rows and eight columns.To use the keyboard in a program, 'thatis, a direct access in a running program;the programmer must f irst disable Con-trol C. In the normal polling routine in aprogram the keyboard is interrogated tocheck for a Control C to signal the corn-puter that a break is desired in the pro-gram. The Control C must be disabled.
To disable Control C, a flag in RAMmust be set to 1. Normally the flag is setto O.Next, the row that the key or keysthat are to be read must be strobed. Todo this, we POKE the row number. In theC1P,the rows are labeled ROthrough R7.Each row has a decimal value asslqnedto it. The C1P keyboard is accessed inthe following manner: POKE(570BB),127.This statement signals the keyboard
that a row is to be examined for a keyclosure. To check the row for a closurethe column in which the desired key islocated must be examined. We do thiswith a PEEK statement, such as, IFPEEK(570BB) = 127 THEN 100. Thisstatement checks for the 1 key. If the 1key were closed, then a jump to line 100would be executed.
In the program that I have provided,you will see how the keyboard is polled
MICRO -- The 6502 Journal
William L. Taylor246 Flora Road N.W.Leavittsburg, OH 44430
to read the keys 1 through B. If any ofthese keys are pressed the computermakes a decision concerning where tojump for a specific task. The followingexample shows how Control C is dlsabl-ed and the row is strobed: 30 POKE530,1: POKE (Y) ,127. Variable Y is thekeyboard location which is 57088decimal. The next step is to read the col-umns in which the expected keys arelocated. For this we must PEEK the col-umns. This is done in lines 35 through 80in the BASIC program. By examining theprogram further, we see that if a keyfrom 1 to 8 is pressed, the program willjump to a subroutine. These subroutinesare located at l ines 100·800.It is in thesesubroutines that the actual plotting andwriting of the graphics are accomplish-ed.
At this point, a few words about theOSI C1Pvideo display are in order. Thisdisplay can produce up to four pages ofalpha-numerics, which are in a 25character line by 25 lines format. Thealpha-numerics include upper case andlower case letters, the numeral set,punctuation marks, and 160 graphicselements.
Part Iof this article is mostly con-cerned with the graphics elements andhow they are executed in a BASIC pro-gram. To display any character on the
19:61
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 64/84
video monitor screen, the ASCIIequivalent must be written in the video
memory. This memory occupies 1
kilobyte of memory dedicated to the
video display. This memory is located at0000 through D3FF hex, or 53379 to
54171decimal. In the program I haveset
the video graphics pointer to point to
mid-screen, as can be seen in the pro-
gram at line 15.The mid-screen position
is contained in the variable L . This is set
to 53775decimal.
The complete code set for thealpha-nimerics and the graphics
elements is listed in the OSI "Graphics
Manual" for the Challengers, so Iwill not
delay in explaining all the elements or
their codes, but rather, define the
character that will beused in the enclos-
ed program. In each of the subroutines
in the BASICprogram, the decimal code
character is POKEd out to some video
memory location. An example is 100
POKE L+A, 161. This places a square
box on the screen depending on the
value of L+ A. If the program were just
started and the 1 key were pressed and
held down, the box would be placed at53775decimal, or mid-screen. If the key
were kept held down the box would then
be written at L +A again, but at 31
greater than the last box because Awasincremented by 31 in the statement at
line 110. As long as the 1 key is held
down, the box would continue to bewrit-
ten at a location 31 places greater. This
forms a diagonal downward to the left
bottom of the screen. If the key is then
released the program will halt and wait
for another key to be pressed. If, for in-
stance, the 6 key were next pressed,
then the box would be written upwardfrom the last point displayed on the
screen where the diagonal ended. In ex-
amining the program, you will see thatthere are eight subroutines beginning at
line 100 through line 850. These
subroutines form a method for plottingthe point where the box can be drawn
from the use of the keys 1 through 8 on
the keyboard. These keys are used as
pointers, and theyaredefined in figure 1.
The figure shows the direction of angle
for each key. Each subroutine has a
delay loop that allows the user to obtain
a single point with a single key closure.
I have presented a brief description
of the C1P's polled keyboard, and how toplace a graphics element out to the
video monitor screen with a BASIC pro-
gram. This BASIC program allows an"etch-a sketch" type drawing on the
monitor screen. From this quick descrip-tion of the keyboard function and how a
BASIC program can be used to read the
keyboard in real-time, and from the ex-
planation of how to place a graphics
character out to the monitor screen with
a BASIC program, you will be able towrite similar programs using these
techniques.
19:62
Listing 1
10 FOH R= 1 TO 32: PRINT: ~EXT R
12 A=O:B=O:C=O:D=O
13 ~=O:F=O:G=O:H=O
15 L=5377 5
20 Y=57088
30 POKE 530,1: POKE'Y, 127
35 IF PEE~(Y)=127 ~HEN lOu
40 H' pr;EK(Y)=191 THEN 200
45 Ii' l '~EK(Y) =223 THEN 300
50 I . I ! ' .t 'Eii:K.(Y )=239 TI~ 400
,5 IF P~EK(Y)=241 THEN 500
60 IF PBEil(Y)=251 THEN 600
65 iF PEEK(y)=253 THEN 700
70 POKE Y, 191
75 IF PEEK(Y)=127 THEN 800
so GOTO 30
100 roKE L+A, 161
110 A=A+31
140 FOR T= 1 ro 300:MlUT T
145 L=L+A
147 A=O
150 GVTO 30
20u .t'OKE L+II, 161
21 0 B= B+ 32
240 l!'OR T= 1 TO 300:NEXT T
24, L=L+B
247 B=O
250 (jO'rO 30
300 POKE L+C, 161
310 C=C+33
340 FUR T= 1 TO }OO:- NEXT T
345 L=L+C
347 C=O
350 GOTO 30
400 POKE L+D,161
410 D=D+l
440 FOR T= 1 TO 300: NEXT T
44, L=L+D
447 D=O
450 GUTO 30
500 POKE L+E, 161
510 E=.8+-31
540 FOR T= 1 TO 300: NEXT T
545 L=L+.
547 E=O
550 UO'ru 30
600 POKE L+F, 161
6 0 1 9 ~=r+ -32
640 FOR T= 1 Tu 300: l;NUT T
64, L=L+'
647 F=G
700 ~OilE L+G,161
710 ~=G+ -33
740 FOR T= 1 TO 300: NEXT T
745 L=L+G
MIC R O -- T he 6502 Journal
747 G=O
750 GOTO 30
800 POO L+H, 161
810 H=H+ -1
840 FOR T= 1 TD 300: liEX..T T
845 L.=L-Hi
847 H=O
850 GO ' fO 30
Part II
Now I will expand the basic pro-
gramming principles pertaining to thedevelopment of graphics elements. This
time we will develop graphic elements
that represent large numbers as viewed
on the system monitor screen. Pleaseremember that the program following
part 2 of this article is for demonstrating
the methods of using a BASIC program
to generate graphics elements utilizing
the expanded graphic capabilities of the
graphics generator that is resident in the
C1P, and the OSIC2-4Pcomputers.
I hope to give the reader the
building blocks that will enable him todevelop larger graphics programs using
the techniques discussed here and in a
companion article, in which I will give aBASIC program for a twelve hour clock
that utilizes the large graphics numbers.The demonstration program is written in
BASIC. It is written in subroutines and
modular blocks. In the subroutines the
graphic elements for the large numbers
are generated and POKEd out to the
C1P's video display. To begin, the
subroutine at lines 1000 through 1100
will generate a large number (in this
case, a large number 1).
To describe the operation of the
subroutine, refer to the program listing2.At line 1000the screen parimeters are
set up with a FOR -NEXT loop (FORA=5400 TO 54128 STEP32). Line 1010
POKE A, 161: NEXT A. In these state-
ment lines, the variable A will be in-
cremented by 32 for every pass throughthe FOR-NEXTloop. When this portion
of the subroutine is executed, the value
161 in statement line 1010will place awhite square block on the monitor
screen beginning at the initial value in
the A variable. In this instance the Avariable will contain decimal 54000,
located on the monitor screen near the
bottom right hand corner. With everypass through the FOR-NEXT loop a
white block will be placed 32 places
ahead of the last video graphicscharacter. On the C1P's monitor 32
places will place the next characterdirectly below the last character placed
on the screen. This FOR-NEXTloop in
the subroutine will generate of place
four white squares, one over the
other,which will develop the graphics
representation of the number one on the
monitor screen.
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 65/84
Listing 2IWii NlTh,Bt1t GHA.J:'lJICSDEMO!ISTRATOR
2 lU ll. BY \ I.L. TAYLOR
3 RE K J ULY 4 1979
5 }RIN~ " THI;:; IS A DEI.IONSTRATION"
10 PhINT " Or' TjlE c tr GliApHICS .AND LARGE NU1:BERS"
20 htlliT " ALl. NUl'oBliliS FRO~ 1 TO 10 wnL BB DISPLAYED"
30 GOCiUb 2900
39 lUll' lNlTlALI~J:; U3R VECTOR FOR JUII',P TO 2FE8
40 FOKE 11,232: POKE 12,47
49 Iill., GEN':;RATE lUNDOwi NUiI,BER FROM 0 TO 10
50 R= INT((ll+l)*RNll(l)-l)
52 Rcl ; , COII,PARE RANDOI \ ' NUMBER AND JUMP TO LARGE NUtlBER"".l:ABLE
55 E' 3.>~1 'l'l!EN 50
56 IF R < ' ~ 'rll~ 50
5 9 Ri!1L EXECUTE r'AS'f SCREJ!:N~RASE
60 ..(=USR(X)
65 IF It= 11 'l'.,EN GOSUS 1900
67 H' 'R = 11 'l';LE;~f iIOU:iB 1000
70 IF R= 1 THEN GOSUB 1000
80 IF R= 2 'rHEN GOSUB 1100
90 IF R= 3 THEN GOSUB 1200
100 IF R= 4 'HEN (SOCiUB 1300
110 lb' It= 5 ":LEN GOSUB 1400
120 IF R= 6 THBN GOSUS 1500
130 H' H= 7 THEN GOSUB 1600
140 IF R= 8 THEH GOSUil 1700
150 H' R= 9 ' fEB. ' l GOSUB 1800
160 It R= 10 l'HBN GOSUl 1900: GOSUB 2000
165 u' R= 0 THEN COSUB 2000
170 FOIt 1= 1 TO 1000: NEXT I
180 X= USR(X)
1-90 GOTO 50
999 R.E};l GENElUT E LSD
1000 FOR A= 54000 TO 5412£ S~EP 32
1010 POKE A,161:~~T A
1020 RETURN
1099 REM GENERATE LSD 2
1100 FOR A= 54000 TO 54002
1110 P OKE A, 161: NEXT A
1120 POKE 54034,161
1130 FOR_£= 54064.'1'0 54066
1140 POJU: A,161: N~T A
1160 POKE 54096,161
1170 FOR A= 54128 TO 54130
1180 POKE A,161: NEXT A
1190 RETURN
1199 REU GENERATE LSD 3
1200 FOR.\.= 54000 TO 540021210 POKE A,161: NEXT A
1220 FOR A= 54064 10 54066
1240 P OK E A,161: NEXT A
1250 POKE 54098,161
1260 PaR A= 54128 TO 54130
1270 POKE A,161: NEXT A
1280 RETUBN
1299 !Wi GENERATE LSD 4
December, 1979 MICRO -.. , The 6502 Journal
.At this point I will give a brief
description of the BASIC program, ex-
plaining the unique features. This will
give the user abetter understanding ofhowthe graphic characters can beutiliz-
ed in other programs, such as games,
clock programs, etc. In the BASIC pro-
gram at line 30, a jump to subroutlne at
line2900 will load a machine language
subroutine in user memory. that win be
used for an ultra-tast screen erase when
needed by the Main Line BASIC pro-gram. The Machine Language object
code for the fast screen erase routine is
stored in DATAstatements at lines 3000
through 3030.
This data is read-witha READstate-
ment and POKEd into user memory at12264 decimal through 12287 decimal.
This corresponds with 2FE8Hex through
2FFE Hex. The machine code routine
when executed with the BASICprogram
will clear the last two pages ofscr-een
memory (that is, the bottom half of the
C1p's monitor screen).Thiswasdoneso
that the usercould utilize the top half for
displaying amessageand haveit remainuntil1he need to erase that half of thescreen is desired. After the machine
code is loaded into user memory, a
RETURN from subroutine will be ex-ecuted and the program will return to
line 40, where the USRvector will be in-
itialized to point to the beginning of thefast screen routine in user memory.The
USR vector locations in the C1Parelocated at 11and 12decimal or 0Band
OC Hex. At line 50 a random number isgenerated and stored in the R variable.
The statements at lines 55and 56 insure
that the random number will be only 0
through 10.The statement at line 60will
execute the fast screenerase.This is the
USRfunction of BASIC,which causes ajump to the USR Vector at 11 and 12,
where the jump to the fast screen erase
is located. After the fast screen erase
routine has been executed and the Opcode Hex 60 is reached in the machine
code routine, a return to BASICwill be
executed and continue at line 65. Theprogram forms line 65 through 165, is a
table wherethe randomnumber from the
random number generator is compared
to fixed constants. If the randomnumber
equals any of the constants, a jump to
the subroutine -that generates that
number will occur. At line 170,the FOR-N:EXTloop will allow the last generatedvideo display to beviewedfor the period
of time that was set in the loop. Thestatement in line 180, calls up the fast
screen erase machine code routine. The
statement at line 190forces a newpassthrough the mainline program.
From the program listing, you will
see that the formation of the videographics digits are developed in
subroutines. Thesesubroutines begin at
19:63
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 66/84
l ine 1000. There is a subroutine for eachof the least significant digit and asubroutine for the next most digit. Todevelope the digit 10, we must use twoof the subroutines. This would also bethe case for any number greater than 10.The program is separated by REMstatements. Each module wil l begin witha REM statement that defines the tunc-tion of the subroutine, and if the readeranalyses each module he will get a clearpicture of how the numbers aregenerated and placed on the monitorscreen.
The program listing beginning atline 3500, gives the object code listingfor the fast screen erase. This is themachine code that is loaded into usermemory when the BASIC program In-
itializes the user memory through theBASIC subroutine at line 2899. TheBASIC program listing has the fastscreen erase routine loaded at 12264 to12287 decimal. This was loaded at thetop of a 12k memory. If your C1P doesnot have this much memory, you will
have to change the program to work withthe amount of memory that you mayhave in your system. The program listinggives the necessary changes for eitheran 8K or 4K memory system. Thesechanges are listed starting at l ine 3500.A word of caution must be conveyed atthis t ime. The user must set the memorysize of his machine to reflect the size ofmemory that will allow the machinecode routine to be intered and protected.That is, the memory size must be setwhen bringing up BASIC to less than thebeginning of the machine code routine.If your system has only 4K of memory,set the memory size to 4050 decimal. Ifyour memory has 8K, set the memory
size to 8160. If you should have 12K, asmy memory does, then set the size to12263. Be sure that you changesubroutine beginning at 2899 for yourpersonal system depending on theamount of memory your system hasavailable.
In conclusion, I have presentedwhat I think will help you with the pro-gramming techniques needed to-understand the inner workings of theC1P's graphics capabilities, and the useof BASIC as a tool to be utilized with thegraphics capabilities of the C1P, orother Challenger computers. Thedevelopement of large graphicsnumbers is only one example of how theexpanded graphics set of the C1P can beused. The same techniques used in thisarticle can be utilized for more complex'exploration of the graphics and BASICprogramming functions to develope pro-grams such as games etc. In a future ar-ticle, I will further expand the exampleprogram here to include a larger numberset and have the C1P function as atwelve hour clock running under a BASICprogram. Until then, good luck.
19:64
1300 FORA= 54000 TO 54064 STEP 32
1310 POKE A,161: NEXT A
1320 FORA= 54064 TO 54066
1330 POKE A,161: NEXT A
1340 FORA= 54002 TO 54130 STEP 32
1350 POU A.161: NEXT A
1360 RETURN
1399 RD 4 GENERATEL5D 5
1400 FORA= 54000 to 540021410 POKEA,161: NEXT A
1420 FORA= 54064 TO 54066
1425 POU A,161: NEl.T A
1430 lOR A= 54128 TO 54130
1440 POKEA,161: N~T A
1450 FOKE 54032,161: FOKE 54098,161
1460 RJmJ I I N
1499 R])I GENJiliATELSD 6
1500 FORA= 54000 TO 54002
1 510 PO KE A,161: NEAT A
1520 FORA= 56064 TO 54066
1530 FOKEA,161: NEXT A1540 FOR A= 54128 to 54130
1550 l'OKE A , 161:NEXT A
1560 POKE 54032,161: FOKE 54096,161: POKE 54098,161
1570 RETURN
1599 hat GENERATE LSD 7
1600 b'ORA= 54000 TO 54002
1610 FOKE A, 161: NE:.T A
1620 FORA= 54002 TO 54130 STEP 32
1630 POKE A,161: NEXT A
1640 RETURN
1699 RE;~ GENERATELSD 8
1700 F Oil. A == 54000 TO 54128 ST1l.'P32
1710 FOKBA,161; NEXT A1720 FORA= 54002 TO 54130 STEP 32
1730 FOKE A, 161: NEtT A
1740 FOR k= 54001 TO 54129 STEP 64
1750 FO KE A,161: NEXT A
1760 RETUHN
1799 R E M GENERATELSD 9
1800 FOI , A= 54002 TO 54130 STEP 32
1810 POKEA,1E1: N&'T A
1820 FOR A= 54000 TO 54002
1830 FOKEA.161: NEXT A
1840 FOR A= 54064 TO 54066
1850 POKE A, 161: NEXT A
1860 FOll A= 5412tl TO 541301870 FOKE A, 161: NEXT A
1880 FOKE 54032,161
1890 RETURN
1899 ~ GENERATESkD 1
1900 FORA= 53998 TO 54126 STEP 32
1910 FOKEA,161: NEXT A
1930 RETURN
1999 R E W GENERATELSD 0
M ICR O -- The 8502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 67/84
2000 FOh A; 54000 TO 54002
2010 }OK~ A, 161: NE~T A
2020 FOK A= 54000 TO 54128 STEP 32
2030 POKE A,161: NEXT A
2040 FOR A= 540'j2 TO 54130 STEP 32
2050 POKE A,161: NEXT A
2060 POKE )4129,161
2 070 RE TUR N
28 99 RE i. FA ;; T ERAS . ! ! : K O VI . 'I NE ~ ! A CH l lI E C O D E L O AD
29CO FOR R= 12264 TO 12287
2920 READ F: POKE R,F: NE,.T .H .
2930 hET U R N
3 00 0 D AT A 1 69 ,3 2, 16 0, 4, 16 2, 0, 15 7, 0
3 01 0 D AT A 2 10 ,2 32 ,2 08 ,2 50 ,2 38 ,2 40
3 02 0 D AT A 4 7, , j3 6, 20 8, 24 4, 16 9, 21 0
30 30 DA TA 14 1, 24 0,4 7, 96
3500 lWiI ~lACHINE CODE F~T SCREEN EHASE
3510 !WI! LOADS AT HE): 2FE8 TO 2E'FF
'520 1:111 2PJi8 . £ . 9 20 .0 04 .\2 00 9D 00 D2 is DO FA
3530 itDi EE . FO 2F 88 D O F4 A9 D2 8D FO 2F 60
'540.~ TYPE CONTROL C TO END
' 5 5 "0 RBi C H A NG E L IN E 2900 to ( lO R R~ 4072 TO 4095) FO R A . 4K
SISTlII.3560 R IM CHANGELIH~ 3000 !O 3030 TO REFLECT THE NEXT LIST
DlfA. 169,32,160,4,162,0,157,0
,010 DATA 210,232,208,250,238,240
3020 DotU 1,,''':~208,244,169,210
3030 DAU 141,¢#),15.96
3580 R.I I I . THESE ARB lOR .\ .. C1P
3590 RBI CHAlfGBLIU, 40 '(iN ieU 11,2'2: POD 12,15)
EDITED BY
DAVID E_SMITH
YOU BOUGHT THE BEST! NOW LEARN TO
AT LAST!A magazinedevoted to Applications as
well as Technique for the Altple Co.npute[.
THE APPLE SHOPPE WILL TEACH YOU HOW TO
DO ALL THOSE FANCY THINGS ON THE APPLE.
LEARN HOW OTHERS ARE USING THEIR
APPLES IN THE HOME, SCHOOLS AND BUSI·
NESSES.
DYES I want to lear n how to get the most out 01my Apple. Send me aone year
subscription. I enclose $12.
NAME: _
ADDRESS: _
CITY STATE __ ZIP __ PHONE _
o NO, I already know il ali, but send me a free sample of next issue.
Send check or money or der to: Appl e Shoppe, P.O. Box 701. Placent ia , CA 92670
or cal l (714) 996-0441
The PET®G azeHeand P ET Us e r Notesare now a part o f
COMPUTE . 1M
The Journal for Progressive Computing
C on tinu in g m a jo r s ec tion s o n B u sin es s, In du s-tria l and E ducationa l A pp lica tions and R e-s ou rc es , P lu s T h e P E T®G a z ette, T h e A T A R I®
G azette, Th e A P PLE ®G azette and Th e S B C
(S ing le B oard Com p uter) G a zette . A ll in eachi ssue l
A Sampling of Our 104 page "Super" FallISlue:
T ok en s in M i cro so ft B A S I C: H a rv ey
H e rm a n. A T A I < IC om p ute rs : T h e U ltim a teT ea ch ing M a ch ines ?: J oh n V ic to r. C arl
M o ser P res ents a U n ivers al 6 5 02 M e m ory
T es t. M i croc om p uters in N u clear In stru -m enta tion : Joe B yrd. A IM 6 5 R ev iew : Don
C lem . M a stering Th e O h io S cien tific Ch al-
le ng er 1 8A L ea rn -B y -D oin g A p pro ac h :
K e ith R u ss ell a nd D ave S h ultz . C O R V U SllA D is k D rive fo r A P P LE :A R eview by
M i ch ae l T ullo ch . P ierre B a rrette on M i cro -
com pu ters in E ducation . Len L inds ay R e-vie ws T h re e W o rd P r oc es s ors . P E Tin T ra ns -
ition /R O M U pg rade M a p: J im B utterfie ld.
T ra ce fo r th e P E T :B re tt B u tler. 3 2 K P E TP ro -g ra m s A rr iv e: L en L in ds ay . U s in g D ire ct
A cces s F iles W ith th e Com m odore 20 40
D ua l D is k D rive: C huc k S tua rt, p lu s R e-
vie ws , R e s ou rc es a nd P r odu cts .N ew F eatu res Com ing in January inc lude:
"R am bling " by R oy O 'B rien and "Th e Tape
Ex chang e" by G ene B eals .
$ 9.001.00
$10.00
M ake Ch eck o r M oney O rder P ayab le to CO M P UTE.P os t O ffice B ox 5 11 9Greensboro , North C aro lina 2 74 03 U S A
1 9 80 B I m on th ly S u bs cr ip tio n ( S ix I ss u es )" S u pe r" F a ll I s su e W i th 1980 Subscr ipt ion
COM P U T E., th e new6 5 0 2 res ource m agaz ine forPET ,A pple, A tari, K im , S ym , A im
and O S I O wners .
C O M P U TE . Th e J ou rna l fo r P rog res sive C om p uting is p ub-li sh e d b y SmaU S y s te m S e rv ic es . I nc . o f G r ee ns bo ro , N o rthCarol ina. Robert Loc k . Ed it o r IPubl i sher ,
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 68/84
SYM-l, 6502-BASED MICROCOMPUTER
• F U LLY -A SSEM BLED A ND CO MPLETELY IN TEG RA TED SY STEM tha t 's
r e ady - t o - u s e
• A L L L S I Ie 'S A RE IN SO C K ET S
• 28 D O U BLE -FU N C T IO N K EY PA D IN C LUD IN G U P TO 24 "S PEC IA L "
FUNCT I ONS
• EA SY -TO -V IEW 6 -D IG IT H EX LED D ISPLA Y
• K IM -1 ' H AR DW AR E C OM PA TIB IL ITY
T he p ow erfu l 6 50 2 8 -B it M IC R O PR O C E SSO R w ho se ad v an ced
a rch itec tu ra l fea tu res h av e m ad e it o ne o f th e la rge st s e lling "m ic ro s "
o n th e m ark e t to d ay .
• T H R EE ON -B O A RD PR OG RAM MAB LE IN T ER VA L T IM ER S av a ilab le to
th e u se r , ex pan d ab le to f iv e o n -bo a rd .
• 4K B Y TE .R OM RE S ID EN T M ON ITO R an d O pe ra t in g P ro g ram s.• S in g le 5 V o lt p ow er sup p ly is a ll th a t is requ ired .
1 K B Y TE S O F 211 4 STA T IC R AM onb oa rd w ith so cke ts p ro v id ed fo r
im m ed ia te ex p an sio n to 4K by tes on b o a rd , w ith to ta l m em ory ex pan -
s io n to 65 , 5 36 b y tes .
• U S ER PR OM /RO M : T h e sys tem is eq u ip p ed w ith 3 PROM /RO M ex -
p an sion so ck e ts fo r 2 3 16 /2 3 3 2 RO M s o r 2 7 16 E PRO M s
• EN H AN C ED SO FTW AR E w ith s im pl if ied u se r in te rfa c e
• STA N DA RD IN TER FA C E S IN CLU DE :
-A ud io C a sse tte R eco rd e r In te rfa c e w ith R em o te C on tro l (T w o
m od es: 1 3 5 B aud K IM - 1 * com pa t ib le , H i-S p eed 1 5 0 0 B aud )
-F u ll d up lex 2 0m A T ele ty p e In te rfa c e
-S y stem E xp ans io n B us In te rfa ce
- T V C on tro lle r B oa rd In te rfa ce
-C R T C om pa t ib le In te rfa c e (R S -2 32 )
• A PPL IC AT IO N PO RT : 1 5 B i-d irec tion a l T T L L in es fo r u se r ap p lic a t ion s
w ith ex pa ns io n ca pab ili ty fo r add ed lin es• E X PA N S IO N PO RT FO R ADD -O N M ODU LE S (51 I/O L in es in c lu d ed in
th e b osic sy stem )
• SE PA R A TE POW ER SU PPLY co nn ec to r fo r ea sy d isc on n ec t o f th e d o c
p owe r
• A U DIB L E R E SPO NSE K EY PAD
S yner tek ha s enh an ced K IM -l * so f tw a re a s w e ll a s the h a rdw a re . T h
so f tw a re ha s sim p lified the u se r in te rfa c e . T h e b a sic S YM -1 sy s tem
p ro g ram med in m ach in e lan gu ag e . M on ito r s ta tu s is ea s ily a cce ssib le ,
an d th e m on ito r g iv es the k eyp ad use r th e s am e fu l l fu n c tio n a l co pa b il i-
ty o f th e T TY u ser . T he SY M -1 h a s ev e ry th in g th e K IM -1 * h a s to o ffe r
p lu s so m uch m o re tha t w e can n o t b eg in to te ll y o u h ere . S o , if y o u w an
to k now m ore , th e S YM -1 U ser M anu a l is av a ila b le , s epa ra te ly .
SYM-l Complete w /manuals $269.00SYM·l User Manual Only 7.00SYM·l Expansion Kit 75.00
E xp ans io n in c lu des 3K o f 21 1 4 RA M ch ip s an d 1 -65 2 2 I /O ch ip .
SY M -l M an u a ls : T h e w ell o rg an iz ed d ocum en ta tion p ack o g e is comp le te a nd e as y- to -u nd er st an d.
S YM -l CA N G ROW A S YOU G ROW . Its th e sy s tem to BU ILD -O N . E
p an sio n fea tu re s tha t a re so o n to be o ffe red :
* BAS-l BK Basic ROM (Microsoft)
* KTM-2 TV Interface Board$159.00
349.00
* W e do honor Synertek discount c o u p o n s
QUALITY EXPANSION BOARDS DESIGNED SPECIFICALLY FOR KIM-l, SYM-l & AIM 65T h ese b oa rd s a re se t u p fo r u se w ith a reg u la ted p ow er sup p ly su ch a s th e o ne b e low , b u t, p ro v is io n s hav e b een m ad e so th a t y ou can ad d
o n b o a rd reg u la to rs fo r u se w ith an u n reg u la ted p ow er sup p ly . B u t, b ecau se o f u n re l iab i lity , w e do n o t recom m en d the use o f o n b oa rd
regu la to rs . A ll I .C 's a re soc ke ted fo r ea s e o f m ain tena nce . All boards carry full 90-day warranty.
A ll p ro du c ts th a t w e m an u fac tu re a re d es ig ned to m ee t o r exc eed in du st ria l s tand a rd s . A ll com po n en ts a re f irs t q ua l tiy an d m ee t fu ll
m an u fa c tu re r 's s pec if ic a tio n s . A l l th is and an e x te nd ed b u rn - in is d on e to red uce th e n o rm a l p e rc en tag e o f fie ld fa ilu res b y u p to 7 5% _ T o y ou ,
th is m ean s the ch an ce o f in co n ve n ie nce an d lo s t tim e d u e to a fa ilu re is v e ry ra re ; bu t, if it s h ou ld h ap pen , w e gu a ran tee a tu rn -a ro u n d t im e o f
le s s th an fo r ty -e ig h t h o u rs fo r rep a ir .
Our mon e y back guarantee: I f , fo r an y rea so n y ou w ish to re tu rn an y b o a rd th a t y ou hav e pu rch a sed d irec tly from u s w ith in ten (1 0 ) d ay s o f te r
rece ip t, c om ple te , in o r ig in a l co n d itio n , o n d in o r ig in a l sh ipp in g ca rton ; w e w ill g ive y o u a com p le te c red it o r re fun d less a $ 10 .0 0 res to ck ing
ch a rge p e r b o a rd .
VAK-l B-SLOT MOTHERBOARD
T h is m othe rb o a rd u ses th e K IM -4 * b u s s tru c tu re . I t p ro v id es e ig h t (8 )
exp an sion b o a rd sock e ts w ith r ig id ca rd cag e . S ep a ra te ja ck s fo r au d io
ca sse tte , T TY a nd p ow er sup p ly a re p ro v id ed . F u lly bu ffe red bu s .
VAK-l Motherboard $129.00
VAK-2/4 16K STATIC RAM BOARD
T h is b o o rd u s in g 2 11 4 R AM s is co n fig u red in tw o (2 ) sep a ra te ly
o d d res sab le 8K b lock s w ith in d iv id u a l w rite -p ro tec t sw itch es .
VAK-2 16K RAM Board with only $239.00
BK of RAM ( \ I ; z populated)VAK-3 Complete set of chips to $175.00expand above board to 16K
VAK-4 Fully populated 16K RAM $379.00
VAK-5 270B EPROM PROGRAMMER
T h is b o a rd req u ire s a + 5 V D C an d ± 12 V D C , b u t h a s a D C to D C
m ultip ly e r so the re is n o n eed fo r an ad d itio n a l pow er su pp ly . A
so f tw a re is re s id en t in an -b o a rd RO M, an d ha s a ze ro -in s e r tio n so cke t .
VAK-5 270B EPROM Programmer $269.00
VAK-6 EPROM BOARD
T h is b o a rd w ill h o ld 8K o f 2 7 08 o r 27 5 8 , o r 1 6K o f 27 1 6 o r 2 51 6
E P ROM s . EPROMs not included.
VAK-6 EPROM Board $129.00
VAK-7 COMPLETE FLOPPY-DISK SYSTEM (May '79)
VAK-B PROTYPING BOARD
T h is b o a rd a llow s y o u to c rea te y ou r ow n in te rfa ces to p lu g in to th
m othe rb o a rd . E tch ed c ircu itry is p rov id ed fo r reg u la to rs , ad d ress an d
do ta bu s d r ive rs ; w ith a la rg e a rea fo r e ith e r w ire -w rapp ed o r so ld e red
I C c i rc u it ry .
VAK-B Protyping Board $49.00
POWER SUPPLIES
A LL POW ER SU PPL IE S a re to ta lly enc lo s ed w ith g ro un d ed enc lo su re s fo r sa fe ty , A C pow er co rd , an d ca rry a fu ll 2 -y ea r w a rran ty .
FULL SYSTEM POWER SUPPLY
T h is pow er sup p ly w il l h and le a m ic ro com pu te r o n d u p to 6 5K o f o u r
V A K-4 R AM . A DD IT IO N A L F EA TU R E S A RE : O v er v o ltag e P ro tec tion on 5
v o lts , fu sed , A C on /o ff sw itch . E qu iv a len t to u n its s e llin g fo r $ 2 25 .0 0 o r
KIM-I' Custom P.S. provides 5 VDC @ 1.2 Amps
and +12 VDC @.1 Amps
KCP-l Power Supply $41.50more.
Provides + 5 VDC @ 10 Amps & ± 12 VDC @ 1 Amp SYM-l Custom P_S.provides 5 VDC @ 1.4 AmpsVAK-EPS Power Supply $125.00 VCP-l Power Supply
* K IM is a p rod u c t o f M OS T e chn o lo gy
$41.50
I N CORPORATED
ENTERPRISES 2967 W F airm ou nt A ven ue
Phoenix AZ. 8 5 0 1 7
(602)265- 7564
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 69/84
Time of Day Clock
and Calendar for the SYM·1
Now you can have a Clock and Calander running in yourSYM at the same time you are running programs inBASIC. The concepts presented can be easily generaliz·ed into other 'multl-task' operations.
Here is a machine languagesubroutine for the SYM-1 BASIC whichkeeps track of time and date while allow-ing BASIC programs to be run.
A useful adjunct to a microcom-puter, especially one used in a system,is a continuously running clock whichcan be used to record the time at whichevents occur or to generate signals at
specified times. The SYM-1 includestimers on the 6522VIA chips which makeimplementation of such a clock easy.The clock can be started, set, and readfrom BASIC.
The clock is based on the use of the6522 to generate a train of accuratelyspaced interrupts. The April, 1979, issueof MICRO contained an article by JohnGieryic (page 31) which presented thetechniques of setting up and servicingthe interrupts. The clock is an adapta-tion of those techniques. The programconsists of sections which set the clock,initial ize the interrupt, service the inter-rupt, and update the clock. The clock-
calendar needs to be reset only onFebruary 29!
The program is loaded into thehighest bytes of available memory. On a4K machine this is $OF54-$OFFF.Afterthe program is loaded, BASIC is initial iz-ed with Memory Size set at 3920to avoidoverwriting the program. The clock is setand started by the command PRINTUSR(3924,M,d,h,m), where the fourparameters represent the month, date,
December, 1979
hour, and minute, respectively. The pro-gram stores the t imes, then init ializesthe interrupt and starts the timer asdescribed in MICRO 11:31. The timerlocated at $ACxx was used to avoid in-terference with the cassette taperoutines. Once every 1/20 second an in-terrupt occurs which is serviced in theroutines starting at $OF90.Accumulatorand registers are pushed on to the stack,
then the 1/20 of seconds, seconds,minutes, and hours are incremented asneeded. These four updates are done inan indexed loop, using a table of com-parison values (20 fractions, 60 seconds,60 minutes, 24 hours) stored at $OFE9tosee if the next timing unit should be in-cremented. The days and months cannotbe incremented in the same loop, and soare done in the routines starting at$OFBD. There is a comparison table giv-ing the number of days (plus one) in eachmonth starting at $OFF4 used to deter-mine if the month should be in-crernentsd. When all needed incrementsare made the flag is cleared and the sav-ed registers pul led back from the stack.
The clock may be read from BASICby PEEKing at the appropriate storagelocations. To print the date and time inthe form 7/20/1979 17:45:02 execute thecommandPRINTPEEK(4083)"I"PEEK(4082)"/1979"PEEK(4081)":"PEEK(4080)":"PEEK-(4079). The number of the month in thedate can be replaced by a three letter ab-breviation by using the following shortprogram to print the date.
MICRO -- The 6502 Journal
Casmir J. Suchyta, IIIand Paul W_Zitzewitz
Univ_of Michigan, Dearborn4901 Evergreen RoadDearborn, MI 48128
1 A$ = "JANFEBMARAPRMAYJUN-JULAUGSEPOCTNOVDEC"2 MO= 1+ 3·(PEEK(4083) - 1)3 PRINTMID$(A$,MO,3);PEEK)4082);",1979"
Starting each program with thisroutine will let you know exactly whenyou did each job. Another use of theclock is to serve as an alarm clock. You
may want the SYM to turn on a light, orstart an experiment at a certain time. Todo this include a tight loop which in-cludes an IF statement comparing oneor more of the storage locations with thedesired time. When the comparison isgood, the loop will be exited and thecomputer can execute the command.
.,. F5~-Ffr
C r SL ; '3 C H ' C r E8 G c' F I Z r f'3. , ,"
0F5C 68 8D F2 e r c'l Ea 3D FJ.2!'"
CFE -L : er es ~ e S f 8E A9 9[ gD.9C
C FfC 7::: A.f Pc? I?F 3D 71' 1'6 1'.9. D3
G F7L1 C13 3 [1 I 'lF AC AG ~o p _ c 29.69
r F7 C E F 9 r erA C PC ) C I? g C o ' " B. 6 r
r1'!'"~lJ P.C A'J se 8 D 06 AC A9 C3>1lr
e!''3C 3D 0~ 1'C ce es 48 SA Ll8.7Y
0",4 93 LlcS D'3 f '_ (l q ,' 1'9 e e 99.19
(' F9 C ED e : F C8 C" \ 3 : : re I f' 18. C4
('!'"A429 ED ~F 69 e : D9 F8 e'F>ll3
0FAC F0 FE 99 ED <'F f'? C3 3D. ic
e FE4 07 AC 68 f'.8 E~: f'P. 66 213.81
~rEC Ll0 18 AD F2 0F 69 el AE.9Y
eFCLI F3 \'F DD F3 I1IF Fe '16 BD.e3
0FCC F2 I1!F LlC EI e r 1'.9 el 90.41
r FOIl F2 0 F rs Fe e [I ff' e f ,3E. A II?FDC F3 e'F 4C EI O fI'2 e: 3E>!:eeH~ F2 r r LlC EI 0F' la 3C 3C.1A
(CrEe 113 H 05 IE 3Ll (,E IS 05.11
eFFLI 20 ID 2f1 IF 20 IF 21 Z 2C,rC
I?HC IF 21 ? I!' 28.81'
LI?3P
19:67
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 70/84
OFS4OFS?OFS8OFSBOFSCOFSDoF60OF6lOF62OF6SOF66OF69JF6BOF60:OnO
OF?)OF7SOn8
OF7BOF?OOF80OF82OFBS
OF8?
OFBAOF8COF8F
0% $OFS4
!!IN * $OFFOHR * $OFFlDA Y * $OFF2MO N * $OFF)COMP * $OFo;DACCO:SS * $8B868C FO OF Setime6880 Fl OF68688D F2 OF686880 F) OF6820 86 8BA9 9080 7E A6A9 OF80 ?F A6A9 CO8 0 0 0:A CAD 00 AC29 BF8D 00 ACA9 CO8D OB ACA9 SO
8D 06 AC
A9 C)80 OS AC60
OF90 08OF9l 48
OF92 S AOF9) 48
OF94 98OF9S 48
OF96 08OF97 AO 00OF99 A9 00OF9B 99 ED OFO F9 0: C 8OF9F CO OSOFAl FO lAOFA) 18OFA4 B9 ED OFOFA? 69 01
OFA9 D9 E8 OFOFAC FO EB
OFAE 9 9 ED OFOFBl A9 C)OFB) 8D O? ACOFB6 68OFB? A8oFB8 68OFB9 AA
O F B A 68OFBB 28OFBC 40o no 18OFBE AD F 2 OFOFCl 69 01OFC) AE F) OFOFc6 DO F) OFOFC9 FO 0 6OFCB 80 F 2 OF
OFCE 4c B1 OFo rn i A9 01om ) 8D F 2 OFom 6 E8OFD? EO 00OFD9 FO 06OFDB 8E F) OFornE 4c Bl OFOFE1 A2 01OFE) 8E F) OFOFEP 4c Bl OF
Introt
INCR
LOOP
RETN
ADOAY
REDAY
EN D
OFE9OFECOFEFO F F 2
OFF4OFF?OFFA
OFPD
14 )C )C
18 00 0000 00 0000 0020 1D20
lF 20 lF
20 20 iF
20 lF 20
HIGH
STY MIN Stores minutesPLA Pulls hoursST A H R a nd s to re sPLA Pulls DayPLA andSTA DAY storesPLA Pulls monthPLA andSTA MON storesPLA Clears stackJ SH A CC ESS U nw rit e pr ote ct t he s yst em R A MLDAim $90 Store lowSTA $A6?0: byte IRQLDAim iOF Store highSTA $A6?F byte InQLOAim $CO SetSTA $ACOO: mLDA $ACOO SetAND $BFSTA $ACOOL DA im $ COST A $ A CO BL DA im $ SOSTA $Ac06
L DA im $ C)STA $ACOSRT S
L is ti ng ' T im e- of -O ay C lo ck a nd C al en da r
1m
Se tAC'l
Se tan d
starttimer
return
PHP Push processorPHA AccumTXA
PHA X regTY APHA Y regCLD Clear dec flagLDYim $00 Zero YLDAim $00 ASTAy COMP Zeros counterINY To next counterCPYim $OSNeed new day'?BEQ AODAY G o to itCLC Clear carryLDAy COMP Cat coUnter valueADCim $01 incre..nt
C MP y HI GH- l C om o w it h h ig hes tBE Q LOOP Go to zero and carry to
STAy COMP Store new valueLD Ail l$ C) Fi nis hed . c le arSTA $ACO? interrupt f18gP L A RestoreTAY Y regP L A
TAX X regP L A AccullPL P
RT ICL CLDA DAYADCill$01L D X l'IlNCMPx l'IlNBEQ REDAYSTA DAY
JJIIP R E T NL DA im $ 01STA DAYIN XCPX $00BEQ ENDSTX KONJPlP RETNL DU II $ 01STX MONJPlP RETN
next
ProcessorLeaveClear carryG et d ayincrementPut month in x regSee if at lest dayYes, go t o m on th c ha ng eS ave ne w d ay
LeaveBack to day one!SaveT o n ext m ont hAt end of ,.ar (lJ)?
G o t o r es et , .arS av e n ew m on thLeaveB ac k t o J an ua ry ( 1)SaveLeave
T ab le o f h ig he st v al ue s o ffractions, seconds, minutes, hours,(dummy)f ol lo we d b y s to ra ge a re a f or f ra ct io ns ,seconds, minutes, hours, days.,IIIOntheT ab 2e o f II&X days in e ac h . an th(plus o ne ) f at t he t we lve m on th s.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 71/84
APPLE II Speed Typing Test
With Input Time Clock
So, you think you are a pretty fast typist! Care to take aSpeed Typing Test on your APPLE?
The qiuck brwn fpx jumped ovre ...
The speed typing test is a must forall APPLEliers, like myself, who consider
themselves expert typists. However, I
did not set out to write a typing test, butto make an input subroutine (GOSUB
8400) which puts the user under the
pressure of a time clock.
Try the program below:
2000call-936:
2010VV= 10: rem set VTAB
2020TT= 1: rem set TAB
2030GOSUB8400
2040GOTO2000
You should hear and see the time at the
bottom of the screen with the seconds
and tenths of seconds flying by as you
type in an alpha-numeric string.
Subroutine 8400reads the keyboardin line 8434 with K equal to the ASCII
number. Line 8447 subtracts 159 from
ASCII so that now K is equal to the posi-tion of the equivalent character in string
A$ (line 8406). So you can see that we
are slowly building up two words in W$at line 8447 by adding, to the end of
string W$, the next letter coming in on
the keyboard until the ASCII equivalentof carriage return (141)is detected at line
8444.
Now when the princess falls into
the snake pit, if she doesn't make the
right decision fast enough the snakes
will probably get her.
December, 1979
W RIT TE N B Y J OH N B ~['{R ICKD ALLA S, T EXA S
14 R EM JU NE 21, 1979SU BRO UTIN E 8400 IS A SELF
CO N TA IN ED IN P UT TIM E CLO CK
16 R EM DEF IN E VV=VTP S " TT=TASTH EN G O SU B8 40 0- TH IS O O ES TH ES lIM E A S A N O R DIN AR Y I,",'P UT 10 1$
20 R E f " C OP YWR lTE D-CA N N O T B E S O lDBUT CAN BE G IVEN AWAY
40 DIM TYPE$(250 ): CA lL -9 36 : P O KE
33 ,3 680 IN P U T " D O YO U H ISH TO M AKE UP YO
U R O WN T ES T S EN TEN CE Y IN ?·
,TYPE$84 IF TYPE$I"Y · THEN 90 : PR IN T
: PR I N T "EN TER TEST SEN TEN CE N OH
": P R IN T: P R IN T: IN PU T TYPE$: G O TO 10090 TY PE$= ·N OW IS THE TIM E FO R ALL G000 M EN TO COM E TO THE A ID O F TH
E I R CO U N TR Y ."100 CALL -936 : PR IN T :ER R =O : P R IN T
"YO U ARE TAK ING A SPEED TYP IN G T
EST"120 P R IN T: P R IN T "TY PE THE NEXT SEN
TEN CE AP PEAR IN G O N TH E SCR EEN A
S FAST AS YO U CAN "130 FO R 1= 1 TO 4000 : N EXT I: R EM
135 R EM --- B ODY O F PR OG RAM ----140 CALL -936 :E R R=O150 VV= 13 : R EM SET SUBR JUT VU E
160 TT= l: R EM SET SUBRO UT TAB170 VTAB (9 ): TAB 1: P R IN T TYPES
: GO SUB M OO180 VTAB (16 ): TAB 1200 IF W$=TY PE$ TH EN 510 : R EM
204 R EM CO MP UTE ER RO RS 210 -410210 F OR 1= LEN {W$) TO LEN {TY PE$
):W${I+1)= S${l,l) : N EXT I220 FOR 1=1 TO LEN {TIPES ): IF I)
LEN {WS ) TH EN ER R=ER R+1: IFI)LEN {W$) TH EN N EXT I
230 IF W${I,I)#TY PE${I.i) TH ENER R=ER R+1: N EXT I
4 00 P R IN T: P R IN T: CALL -198 : P R IN T" H ;E RR ;" E PRO RS H IT RETU
R N": G OTO 520
MICRO-- The 6502 Journal
John Broderick, CPA8635 ShagrockDallas, TX 75238
410 CALL -198 : P R IN T" ";ER R ;" EPRORS ·;" H IT RETU RN "
500 R EM - CO MPUTE 10 1M501 T= { X"'23 )+ J :L= LEN { TY PES ): IF
L( l TH EN 520502 L= L-{ERR "'6 ): IF L(? THEN G O TO
50 6503WPM={L" '12" '2O) /T506 VTAB (24 ) : TAB 3 0 : P R IN T IoIP ~;
" WPM ": VTAS (16 ): TAB 1: R ETU RN
510 P R I NT • CO RRECT - H IT R ETURN ·: P R IN T: P IlIN T : P R IN T :
520 G OS UB 500 : IN PU T W$ :IoIP M=O : G OTO
140 : R EM
8400 R EM -SU BR OU TIN E TO IN PU T VIAK EY BO AR D T O R ETA IN A NDI N PU T WO RD I N 101$
8 405 IF S IO ITCH =l TH EN 8407 :S WITCH =1 : O I M \ ~$ (2 5 5) ,A $ {7 0 ), B S{ 2):B$:II II
8406 A$= " #$%& ' { ) " '+ ,- . / 0123456789 : ;, = ?@ABCOEFGH I JKLMNOPQR STUVh 'XYZ
1 m •
8407 Y =T: PO KE -16336 ,0 :101$= " ":
X=O:J=O8410 FOR U = l TO 2508 412 R Et·, U SER . A REA H ER E X= SECO N DS
SO USER CAN TEST X LIK EIF X=12 THEN RETURN
8430 J= J+ 1: IF J(23 THEN 8434 :X=
X +1 : J= O8431 FO R BB = l TO 3 :K K = PEEK (-16336
l- PEEK (-1633 6 ): N EXT BB : G O TO
8434843 4 VTAB (24 ) : TAB 13 :U =U -1: P R IN T
X·· "'J"'10/23'" SECONDS" "K ; P EEK (-1638 4 ) ••
84 37 IF K #136 TH EN 8444 :Y =Y -1
8438 VTAB (VV): TAB TT+Y -1: P R IN T
B $ { 1 ,1 )8 44 0 W ${ 1 )= W${ 1, LEN {W $)-l)8 4 41 VTAB (l3 ) : TAB 1: PR IN T W$
8442 PO KE -16368 ,0 : N EXT U8444 IF K =141 THEN 85 40 : IF K ()6 0
TH EN N EXT U8 4 47 K = K -1 5 9:W$ {Y ) = A$ {K , K )84 61 PO KE -16368 ,0 : VUE (VV): TAB
• P R IN T W$:Y =Y +1: N EXT U
8540 trl: CALL -756 : R ETU RN
19:69
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 72/84
Instant Software, the Best Value
Wehave it all-conflict simulation, games of chance, fast-paced fun.We havea package of good times for every taste.
TREK·X Command the Enterprise as you scourthe quadrant for enemy warships. This packagenot only has superb graphics, but also includesprogramming for opt ional sound effects. A one-player game for the PET BK. Order No. 0032P$7.95.
GOLF Without leaving the comfort of your chair,
you can enjoy a computerized lB holes of golfwith a complete choice of clubs and shootingangles. You need never cancel this game be·cause of rain. One or two players can enjoy thisgame on the Apple with Applesoft II and 20K.Order No. 0018A $7.95.
BOWLINGITRILOGY Enjoy two of America'sfavorite games transformed into programs foryour Apple:oBowllng- Up to four players can bowl while theApple sets up the pins and keeps score. RequiresApplesoft II.oTrilogy- This program can be anything from aSimple game of tic-tac-tos to an exercise indeductive logic. For one player.This fun-titled package requires an Apple with20K. Order No. OO4OA$7.95.
TANGLEISUPERTRAP These two programs reoquire fast reflexes and a good eye for angles:oTangle - Make your opponent crash his l ine ln-to an obstacle.oSupertrap - This program is an advanced ver-sion of Tangle with many user control options.Enjoy these excit ing and graphically beautifulprograms. For one or two players with an BKPET.Order No. 0029P $7.95.
CHECKERS/BACCARAT Play two old favoriteswith your PET.oCheckers - Let your PETbe your ever-ready op-ponent in this computer-based checkers pro-
gram.oBaccarat - You have both Casino- and Black-jack-style games in this realist ic program.Your PET withBK will offer challenging playanytime you want. Order No. 0022P $7.95.
CASINO I These two programs are so good, youcan use them to check out and debug your owngambling system!oRoulette - Pick your number and place your betwith the computer version of this casino game.For one player.oBlackjack - Try out this version of the popularcard game before you go out and risk your moneyon your own "surefi re" system. For one player.This package requires a PETwith BK.Order No.0014P $7.95.
CASINO II This craps program is so good, it 's thenext best thing to being in Las Vegas or AtlanticCity. It will not only play the game with you, butwill also teach you how to play the odds andmake the best bets. A one-player game, it reoquires a PET BK. Order No. 0015P $7.95.
TURFAND TARGETWhether on the field orin theair, you'll have fun with the Turf and Targetpackage. Included are:oQuarterback - You're the quarterback asyou tryto get the pigskin over the goal line. You canpass, punt, hand off, and see the result of yourplay with the PET's superb graphics.oSoccer II- Play the fast-action game of soccer
with four playing options. The computer can playitself or a single player; two can play with corn-puter assistance, or two can play without help.oShoot - You're the hunter asyou try toshoot thebird out of the air. The PET wil l keep score.oTarget - Use the numeric keypad to shoot yourpuck Into the home position as fast as you can.Te run and score, all you'll need is a PETwith BK.Order No. 0097P $7.95.
DUNGEON OF DEATH Battle evil demons, castmagic spells, and accumulate great wealth asyou search for the Holy Grail. You'll have to de -scend into the Dungeon of Death and gropethrough the suffocating darkness. If you survive,glory and treasure are yours. For the PET BK.Ordert.lo. 0064P $7.95.
PET DEMO I You can give yoursel f, your family,and your friends hours of fun and excitementwith this gem of a package.oSloI' Machine - You won't be able to resist theenticing messages from this computerized one-armed bandit.oChase - You must find the black piece as yousearch through the ever·changing maze.oFlylng Pheasant - Try to shoot the flying pheas-ant on the wind.oSlttlng Ducks - Try to get your archer to shootas many ducks as possible for a high score.oCraps - I t's Snake Eyes, Li ttle Joe, or Boxcarsas you roll the dice and try to make your point.oGran Prix 2001- Drivers wi th experience rang·ing from novice to professional will enjoy thismulti-leveled race game.oFox and Hounds -It 's you against the computeras your four hounds try to capture the computer's
fox.For true excitement, you'l l need a PETBK.OrderNo. 0035P $7.95.
PENNY ARCADE Enjoy this tun-til led packagethat's as much fun as a real penny arcade-at afract ion of the cost!oPoetry - Compose free verse poetry on yourcomputer.oTrap-Control two moving lines at once andtest your coordination.oPoker- Play five-card draw poker and let yourPET deal and keep score.oSolitalre- Don't bother to deal, let your PEThandle the cards in this "old favorite" card game.oEat.Em.Ups - Find out how many stars yourGobbler can eat up before the game is over.These six programs require the PET with BK.Order No. 0044P $7.95.
MIMIC Test your memory and reflexes with thefive different versions of this game. You mustmatch the sequence and location of signalsdisplayed by your PET.This one-player programincludes optional sound effects with the PETBK.Order No. 0039P $7.95.
MIMIC (see description for the PET version
0039P) This package requires the Apple 24K.Order No. 0025A $7.95.
ARCADE I This package combines an excitingoutdoor sport with one of America's most pop-ular indoor sports:oKlte Fight -It's a national sport in India. Afteryou and a friend have spent several hours maneu-vering your ki tes across the screen of your PET,you'l l know why!oPlnball- By far the finest use of the PET's ex -ceptional graphics capabil it ies we've ever seen,and a heck of a lot of fun to boot.Requires an BKPET.Order No. 0074P $7.95.
ARCADE II One challenging memory game andtwo tast-paced action games make this onepackage the whole family will enjoy for sometime to come. Package includes:
°UFO - Catch the elusive UFO before it hits theground!°Hit - Better than a skeet shoot. The target re-mains stationary, but you're moving al l over theplace.oBlockade-A two-player game that combinesstrategy and fast reflexes.Requires BK PET.Order No. 0045P $7.95.
On the bottom line you'll knowthat our business packages
mean better business for you.
ACCOUNTING ASSISTANT This package wi llhelp any businessman solve many of those day-to-day financial problems. Included are:=Lean Amortization Schedule-This programwill give you a complete breakdown of any loan
or investment. All you do is enter the principalamount, interest rate, term of the loan or invest-ment, and the number of payments per year. Yousee a month-by-month ust of the principal, in-terest, total amount paid, and the remainingbalance.oDepreciation Schedule·- You can get a deere-elation schedule using anyone of the followingmethods: straight line, sum of years-diqits,declining balance, units of production, ormachine hours. Your computer wil l display a listof the item's lifespan, the annual depreciation,the accumulated depreciation, and the remain-ing book value. This package requires the PETBK. Order No. 0048P $7.95.
ACCOUNTING ASSISTANT (see the descriptionfor the PET version 0048P)This package requiresthe Apple 16K.Order No. 0088A $7.95.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 73/84
MORTGAGE WITH PREPAYMENT OPTION/Fl·NANCIER These two programs will more thanpay for themselves if you mortgage a home ormake investments:·Mortgage with Prepayment Option-Calculatemortgage payment schedules and save moneywith prepayments.=Flnancier c-Calcutate which investment wi llpay you the most, figure annual depreciation,and compute the cost of borrowing, easily andquickly.All you need to become a financial wizard with anBK PET. Order No. 0OO6P$7.95.
MORTGAGE WITH PREPAYMENT OPTION/FIN·ANCIER (see description for PET version 0006P)This package requires the Apple 16K.Order No.0094A $7.95.
BASEBALL MANAGER This pair of programs willlet you keep statistics on each of your players.Obtain batting, on-base, and fielding averages atthe touch of a finger. Data can be easily storedon cassette tape for later comparison. All youneed is a PET with BK. Order No. 0062P $14.95.
HomeandPersonal
Our programs can't boil an eggor change a diaper, not yet. Butthey can help you solve manyeveryday problems.
DIGITAL CLOCK Don't let your PET sit idlewhen you are not programming - put it towork with these two unique and useful pro-grams:.Digital Clock - Turn you PET into an ex -
tremely accurate timepiece that you can useto display local time and time in distantzones, or as a split-time clock for up to ninedifferent sporting events..Moving Sign - Let the world know what's onyour mind. This program turns your PETinto aflashing graphic display that will put yourmessage across. Order No. 0083P $7.95.
DECORATOR'S ASSISTANT This integratedset of f ive programs wil l compute the amountof materials needed to redecorate any room,and their cost. All you do is enter the roomdimensions, the number of windows anddoors, and the base cost of the materials.These programs can handle wallpaper, paint,panell ing, and carpeting, letting you comparethe cost of di fferent finishing materials. Allyou'll need is a PET BK. Order No. 0104P
$7.95.
PERSONAL WEIGHT CONTROL/BIO·RHYTHMS Let your PET help take care ofyour personal health and safety:.Personal Weight Control- Your PETwil l notonly calculate your ideal weight , but also ot-fer a detailed diet to help control your caloricintake .•B iorhythms - Find out when your criticaldays are for physical, emotional, and intellec-tual cycles.You'l l need only a PETwith 8Kmemory. OrderNO..OOO5P$7.95.
Education and a PET or Apple go together as naturally as pencil andpaper.
MATH TUTOR I Parents, teachers, students, nowyou can turn your Apple computer into a math-ematics tutor. Your children or students canbegin to enjoy their math lessons with these pro-grams:·Hanglng - Perfect your skill with decimalnumbers while you try to cheat the hangman.·Spellbinder-Cast spells against a compet ingmagician as you practice working with fractions.
·Whole Space- While you exercise your skill atusing whole numbers, your ship attacks theenemy planet and destroys alien spacecraft.All programs have varying levels of difficulty. Allyou need is Applesoft II with your Apple II 24K.Order No. 0073A $7.95
MATH TUTOR II Your Apple computer can gobeyond game playing and become a rnathe-matics tutor for your children. Using the tach-
nique of immediate posit ive reinforcement, youcan make math fun with:-car Jump- Reinforce the concept of calculat-
ing area while having fun making your car jumpover the ramps.·Robot Duel- Practice figuring VOlumes ofvarious containers while your robot fightsagainst the computer's mechanical man.·Sub Attack - Take the mystery out of worki ngwith percentages as your submarine sneaks intothe harbor and destroys the enemy fleet.All you need is Applesoft I Iwith your Apple II and20K. Order No. 0098A $7.95.
all about. Requires a PET with BK. Order No.0026P $7.95.
DOW JONES Upto six players can enjoy this ex -citing stock market game. You can buy and sellstock in response to changing market condi-tions. Get a taste of what playing the market is
Ask for Instant Software at a computer store near you, or use theorder form below to order your software direct, or call Toll-Free1-800-258-5473.
Name __r------------------------------1Address
Cily state Zip _
o Check 0 MoneyOrder 0 VISA o AMEX o MasterCharge
Card No. Expiral ion Dale _
Signed Dale _
Order your Instant Software today!
Ouantity OrderNo. Program name Unit cost Tolal cost
Shipping andhandling $1.00
Total orderInstant Software Inc.Peterborough,N.H, 03458USA Dept. 69Mo Prices Valid I n USAOnly I
~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 74/84
BOX 120
ALLAMUCHY, N.J. 07820
201-362-6574inc.
H U D S O N D IG IT A L E L E C T R O N IC S I N C .
THE HDE CARD CAGE
Shown With KIM-1 (not included)
Now you can expand your 65XX single board micro-
computer into a powerful microprocessor based
system with the 19" (RETMA standard) HOEDM816-
CC15 Card Cage. The DM816-CC15 has virtually all
of the features you need for even the most demanding
situations. Complete with power supply, backplane,
card guides and supports, the HOE DM816-CC15
accepts state of the art 4'12"wide cards permitting
your system to remain a compact configuration,while expanding with a variety of functions.
HOE has developed the DM816-CC15 for the
demanding industrial marketplace. Consequently,
you can design your KIM*, AIM* or SYM* based in-
stallation using RETMA standard cabinet or rack
components. Sufficient clearance has been included
for custom front panel switches, lights and controls
as well as cable and fan installation at the rear. The
microcomputer is mounted to permit convection
cooling in all but the most densely packed situ-
ations.
The self-contained power supply is rated +8 VDC
at 12 A and ±16 VDC at 3 A (both unreg.). The back-
plane, with the standard S44 bus, accepts up to 15
cards and hasonboard 5VDCand 12VDC regulators.In addition to power on reset, the backplane in-
VERSIONS
KIM* AVAILABLE
AIM* 1st Otr. 80
SYM* 1st Otr. 80
$525.00
Complete With Power Supply
eludes the logic connectors for remote reset stop
and single step as well as cassette and 20 mA loop
terminal I/O. Provisions for data and address bus
termination are included. Two 16 pin DIP pads are
available for unique requirements and the micro-
computer application and expansion connectors
are extended to the backplane further increasing
the utility of the total package.
Other HOE products include:
• 5%" and 8" single/dual disk systems
• 8K static RAM memory
• Prototyping cards
• Software (disk and cassette)
- Text Editor (TED)
- Text Output Processing System (TOPS)
- Assembler (ASM)
- Comprehensive Memory Test (CMT)
- Dynamic Debugging Tool (DDT)
Watch for announcements:
EPROM Card, RS232 Card, PIA Card, DAC Card
* KIM Is a Commodore product
* AIM is a Rockwell International product* SYM is a Synertec product
HOE PRODUCTS - BUILT TO BE USED WITH CONFIDENCE
AVAILABLE DIRECT OR FROM THESE FINE DEALERS:
Johnson Computer Plainsman Microsystems
Box 523 Box 1712
Medina. OhIO 44256 Auburn. Alabama 36830
(216) 725-4560 (800)633,8724
ARESCO
PO Box 43
Audubon. Pa. 19407
(215)631-9052
Long Island Computer Lone Star Electronics Computer Lab of N.J.
General Store Box 488 538 Route 10
103 Atlantic Ave. Manchaca. Texas 78652 Ledgewood. N.J.07852
Lynbrook. NY 11563 (512) 282·3570 (201) 584'0556
(516)887-1500
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 75/84
SUMTEST: A Memory Test
Routine for the 6502
No microcomputer is better than its RAM memory. Hereis a RAM memory test that can be adapted to any 6502based system.
SUMTEST is a short (107 byte)machine lang,uage program to testmemory. The algorithm is not originalwith me, as I have seensimilar routines
published for the 8008, 8080, and 6800mlcroprocessors. I have not, however,seen the SUMTESTalgorithm used in a6502memory test routine.
SUMTESTwill detect all "stuck" bits,and will print the error address and theoffending bit pattern. SUMTESTwill alsodetect address sensitive errors, such as
the set of writing to hex location 0208changing the contents of hex location03BC. The sensitive address errors canresult from shortened address lines or
interaction of adjacent memory cellswithin a memorychip. SUMTESTwill notdetect byte sensitive memory failures(except by accident).
The routine is assembled to residein the first part of page 01, the stackpage for the 6502.The stack page is ln-tentionally used due to the fact that if
your 6502 machine is running, at leastthe few bytes of page 01 used by the
December, 1979
stack are "good." The routine can berelocated elsewhere in memory if youwant to test the first part of page 01where the routine resides. You will notbeable to test the top few bytes of page01 used as stack space by theprogram,as any modification of the stack area
while the routine is running will result ina program bomb.
S Y I ' I B O LT A B L E 3 1 1 0 1 13 " 9 6B G N A D H 1 1 0 8 1 B G N A D L 1 1 " 8 1 1C R L F I E 2 F E N D A D H 1 1 0 8 3I N C P T R 0 1 5 B I N I T 1 1 1 1 1 1 1O N C E " 1 2 1 O U T C H I E A I IR E T U R N I I I I C R T N 1 1 1 6 BS t m t m " 1 5 3 T E S T I II 1 1 3
T P i P Y " " 8 7 Figure 1
S Y P I B O L T A B L E 3 1 1 0 0 3 1 1 9 6B G N A D L 1 1 0 8 1 1 B G N A D H 1 1 1 1 8 1C O U N T R 1 1 0 8 4 T M P A D L 1 1 1 1 8 5I N I T 1 1 1 1 1 1 1 S U P I T S T 1 1 1 1 1 1 1L O O P B 1 1 1 1 5 R E T U R N I I I I CS E T E P I B I 4 A S U P l t m " 1 5 3R T N 1 1 1 6 B C R L F I E 2 FO U T C H I E A I I
Figure 2
MICRO -- The 6502Journal
S. Felton Mitchell, Jr.c/o The Bit StopP.O.Box 973
Mobile, AL 36601
The program as currently assernbt-ed uses KIM output routines. If yourmachine is not a KIM (as mine is not),then you will have to SUbstitute yoursystem print routines. The print routinesare defined at the beginning of thelisting supplied.
The algorithm used calculate~adata byte to store eachmemory location
C I ' I P A D L " 1 6 1E N D A D L 1 1 0 8 2L O O P A " 1 0 8O U T S P I E 9 ES E T E P I " 1 4 AT P i P A D H " 0 8 6
E N D A D L 1 1 0 8 2T P i P A D H 1 1 0 8 6T E S T 1 1 1 1 1 3O N C E 1 1 1 2 1I N C P T R 1 ! J 1 5 8P R TB Y T I E 3 8
C O U N TR 1 1 1 1 8 4E R R O R 1 1 1 2 BL O O P B 1 1 1 1 5P R TB Y ! I E 3 BS U P I T S T 1 1 1 1 1 1 1T M P A D L 1 1 1 1 8 5
E N D A D H 1 1 1 1 8 3T P I P Y 1 1 1 1 8 7L O O P A 1 1 1 1 1 8E R R O R 1 1 1 2 8C I ' I P A D L 1 ! J 1 6 1O U T S P I E 9 E
19:73
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 76/84
to betested byadding the high order ad-dress and the low address of each loca-
tion to a "counter" byte. After all loca-
tions to be tested have been filled with
their calculated data byte, the routinethen recalculates the data byte that
should be stored in each location and
checks it against the actual contents ofthe location. If the data in memory is dif-
ferent from the calculated value, then
the location and offending bit patternare printed. As previously mentioned,
there can bedifferences due to "stuck"bits or interaction of memory locations.
Eachtime that the routine is successful-ly executed, it wUI print a "plus" on thesystem terminal. To completely . test
the memory (adding all 256 possible"counter" byte combinations to the ad-
dress), it is necessary to have 256
"plusses" printed on your terminal. The
program listing is exhaustively com-
mented and should be pretty much selfexpanitory for even a novice machine
language programmer.
To test 4K of memory occupying
hex locations 200 to 2FFF, enter 00 at
0080, 20 at 0081, 00 at 0082, and 30 at0083 (end address plus 1) and run at
0010. If no errors are detected, you willget a string of plusses on your terminal.
Rememberthat 256plusses are requiredto complete the test. An example of an
error would bea carriage return line feed
on the terminal, a four digit address (inhex), a space and a two digit number.
The two digit number represents the badbit pattern. Now convert the "bad bit"
pattern to its binary equivalent. Each"1"
in the binary pattern represents a bad bit
at the memory location printed. If
23A840was printed on your terminal, it
would mean that bit 6 was bad at loca-
tion 23A8. By reference to the memory
board documentation, you should beable to determine which chip on the
board is faulty.
An interesting observation was
made during the developement of the
program. My machine is a homebrew5100 bus, dual processor system. I have
a 6502and a 6800on an 5100 prototype
board, each sharing all of the system ex-cept for a little PROMwhich is unique
for each microprocessor. The system
clock is derived from the clock generator
in the 6502 (1MHz.). An equivalent
5UMTE5T program for the 6800 wouldcycle through my24Kof memorywith no
errors detected. The 65025UMTE5T pro-gram would consistantly catch several
bad bytes. Apparently there is a few
nanosecond's difference in the timing of
the two microprocessors, and that was
just enough for some of the memory tofail. All of the memory that tested bad onthe 6502was purchased from onevendor
as 450 nanosecond memory. So be
aware that a fewnanoseconds can make
a big difference, and purchase your
memory from a reputable supplier.
19:74
0 \ t l 0
0 1 0 0
0 1 0 00 1 t 1 0
t l u ef I l l t l f l lt l t t l 0
t l l t l 0t l l M !
t l l t l 0t l l t l 0t l i t i t lt l i t i t l
B i t i t l2 t 1 2 F I Et l l t l 3 A t i t I t it l l t l 52 t 1 4 A 1 : 1 1t l I 8 8 2 f 1 l5 3 t i lf I l \ 1 J 31 8 50 1 0 D 2 0 5 8 f i l l
f I l l l f l lt i F 6f i l l2 2 1 1 14 A 0 11 J 1 1 5 2 f 1 l5 3 t i l0 1 1 8 5 1 8 5
I JI I A 00 IlFt l I I C 2 1 ' l5 8 0 1f I l I I F00 F 4t l I 2 1 A 9 2 8
0 1 2 3 2 t 1 A 0 I E0 1 2 6 E 6 8 40 1 2 8 4 C f I l 3I I I0 1 2 B 8 4 8 7f I l l 2 D 4 8f I l l 2 E2 t 1 2 F I E0 1 3 1 A 5 8 60 1 3 3 2 f J 3 B I E0 1 3 6 A 5 8 5f I l l 3 82 1 J 3 8 I Ef I l l 3 B2 1 l 9 E I E1 1 1 1 3 E 6 8t l I 3 F 2 0 3 8 I Ee l 4 2 2 8 2 F I E0 1 4 5 A 4 8 7f I l l 4 74 C I C f i l l
t l I 4 A A 5 8 1 lf I l l 4 C8 5 8 5f I l l 4 EA 5 8 1f I l l 5 f 1 l5 8 68 1 5 2 6 0
0 1 5 3 1 8f I l l 5 4A 5 8 6f J I 5 6 6 5 8 5
0 1 5 8 6 5 8 40 1 5 A 6 0
f J I 5 8 E 6 8 5e ie n 00 azf J I 5 F E 6 8 6e i s : A 5 8 50 1 6 3 C 5 8 2
0 1 6 5 D I J f I l 40 1 6 7 A 5 8 6
0 1 6 9 C 5 8 31 J 1 6 8 6 1 J
Usting 1
S U l ' r r S T O R G $ 0 1 0 0 A S S E M 8 L E I N S T A C K P A G E
R E M E M B E R T H A T T H E R O U T I N E D E S T R O Y S T H E C O N T E N T S O FT H E M E M O R Y T E S T E D • .
B G N A D L •
B G N A D H •E N D A D l •
E N D A D H •C O U N T l i •T M P A D L •T M P A D H •T M P Y
U 0 8 0 S T A R T A D D R E S S O F M E M O R Y T O 8 ET E S T E D
$ e 0 8 1$ t l f I l 8 2 E N D A D D R E S S & 1 O F M E M O R Y T O B E
T E S T E DS t l t l 8 3U f I l 8 4 C O U N T E R A N D S E E D F O R T E S T$ 8 1 1 1 8 5 W O R K I N G A D D R E S S P O I N TE RS t l t l 8 6$ t l f I l 8 7 T E M P O R A R Y S TO R A G E O F Y
K I M R O M R O U T I N E S U S E D
C R L FO U T C HP R T B Y T •O U T S P
I N I T J S RT E S T L D Y I M
J S RL O O P A J S R
S T A I YJ S R
B N EJ S RL O O P B J S R
E O R I Y
B N ER E T U R N J S R
B N EO N C E L D A I M
J S RI N CJ P l P
E R R O R S T YP H AJ S RL D AJ S RL O A
J S RJ S RP L AJ S RJ S RL O YJ M P
S U B R O U T I N E S
S E T E M L O AS T AL O AS T AR T S
S U M U P I C L CL O AA D C
A D CR T S
I N C P T R I N CB N EI N C
C P l P A D L L O AC P l P
8 N EL O A
C P l PR T N R T S
MICRO -- The 6502 Journal
S I E 2 F C A R R I A G E R E T U R N - L I N E F E E DS I E A f I l O UT P U T A S C I I C H A R A C TE R$ I E 3 8 P R I N T I H E X B Y T E A S T W O A S C I I$ I E 9 E O U T P U T B L A N K
C R L F P R I N T C R / L F$ 0 0 I N I T I A L I Z E I N D E X R E G I S T E RS E TE I ' ! C R E A T E W O R K I N G A D D R E S S P O I N T E RS U P I UP I C A L C UL A T E T E S T D A T A B Y TET P I P A D L S T O R E T H E T E S T B Y TEI N C P T R I N C R E P I E N T T H E W O R K I N G P O I N T E R
L O O P A P l O R E T O B E T E S T E D ?S E T E P I R E I N I TI A L I Z E W O R K I N G P O I N T E RS U M U P I R E C A L C U L A T E T H E T E S T D A T A B Y T ET M P A D L C H E C K M E M O R Y W I TH C A L C U L A T E D
T E S T B Y TEE R R O R G O T E L L I F T E S T F A I L E DI N C P T R I N C R E M E N T T H E W O R K I N G P O I N T E RL O O P 8 P l O R E T O B E T E S T E D ?' & P R I N T A " P L U S " T O I N D I C A T E
S U C C E S SP R UI T A S C I IS E T U P N E W P A T T E R NT E S T U N T I L P l A N U A L R E S E TS A V E YS A V E T H E B A D B I T P A T T E R NP R I N T C R / L FG E T H I G H A D D R E S S O F E R R O RP R I N T I TG E T L O W A D D R E S S O F E R R O R
P R I N T I TP R I N T A S P A C ER E S T O R E T H E B A D B I T P A T T E R NP R I N T I TP R I N T A C R / L FR E S T O R E YC O N T I N U E W I T H T H E T E S T
O U T C HC O U N T RT E S TT M P Y
C R L FT P I P A D HP R T B Y TT M P A D L
P R T B Y TO U T S P
P R T B Y TC R L FT M P YR E T U R N
B G N A D L G E T B E G I N N I N G A D LT M P A D L M A K E A C O P YB G N A D H G E T B E G I N N I N G A D HT M P A D H M A K E A C O p y
G E T R E A D Y T O A D DT M P A D H G E T W O R K I N G P O I N T E R A D HT M P A D L A D D I N W O R X I N G P O I N T E R A D L
C O U N T R A D D I N C O U N T E RR E T U R N W I T H C A L C U L A T E D T E S T D A T A B Y T EI N A R E G I S T E R
T M P A D L I N C R E M E N T W O R K P O I N T E R A D LC P l P A D L P A G E N O T C R O S S E DT I ' I P A D H I N C R E P I E N T W O R K P O I N TE R A D HT P I P A D L G E T A D L O F W O R K P O I N T E RE N D A D L S E E I F E N D O F P l E P l O R Y T O B E
T E S T E DR T N R E T U R N I F N O M A T C HT I ' I P A D H G E T A D H O F E N D 0' M E P I O R Y T O B E
T E S T E DE N D A D H S E E I F A D H ' S M A T C HR E T U R N W I T H R . E S U L T S O F C P l P I N Z F L A G
December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 77/84
The MICRO Software
Catalogue: XV
Mike Rowe
P.O.Box 6502Chelmsford, MA01824
Name:
System:
Memory:Language:
Mother Goose Rhymes
APPLE II16K
Integer BASICand Machine Language
Description: Children who love Mother Goose Rhymes will
have fun with this interactive program using missing words.
The program enjoyably guides children towards readingmastery.
Copies:
Price:Includes:
Author:
Available from:
Just Released
$9.95for cassetteCassette and loading instructions
George Earl
George Earl
1302S.Gen. McMullen Dr.
San Antonio, TX 78237
Name: SYM/KIM Appendix
System: SYM·1Memory: 1KMonitor Version:
1.0or 1.1 - works with both
Language: Machine LanguageHardware: SYM·1 alone,no additions or expansion memory
required
Description: This appendix is used as a supplement to the"First Bookof Kim" (pub. byHaydenBooks). It takes the entirerecreational program section of the FBOK and provides theuser with detailed changes to each program to allow them torun on an unmodified 1KSYM-1.The user is assumed to have
access to the FBOKsince only the changes are detailed in theappendix (along with explanations as needed).The basic goal
of the appendix was to allow the purchaser of the most basic(1K)SYM to have some beginning software. Since the instruc-
tions indicate 'load the KIM program, modify parts as follows ...then run', one might consider purchasing KIM games tapes
and loading them using the KIM format load available on theSYM-1.Then he could modify the program and redump it for
his own personal use later, using the SYM format. Themodification techniques used in the appendix can also be us-
ed to convert other KIM programs for use on the SYM-1.
Copies: 20 delivered (as of 10/79) more availablePrice: $4.25,First Class postpaid - Appendix only
$9_00,First Book of Kim, separately$12.50, combo First Book of Kim and Appendix(FBOKandcombodelivered4thclassor add$2.00for
first class. Cal. residents add 6% sales tax.
Available from Author:Robert A. PeckP.O.Box 2231
Sunnyvale, CA94087
Name:
System:Memory:
Language:
Hardware:
PETQuick ReferenceCard
PET4K, 8K, 16K,and 32KEnglish
None
Description: A complete summary of the CommodorePET BASIC language along with examples and definitions of
every command. Also on the card is a table of the PET's
graphic characters with their hexadecimal equivalents.Machine language programmers will find a table of important
memory locations (for all model PETs),as well as informationon the user port, PETsound, and the IEEE-488 interface bus.The information that PETowners used to have to hunt for inseveral books and magazines is now in one quick, convenient
place!
Copies:Price:
Available from:
Just released
$3.50postpaidLeading EdgeComputer Products
P.O.Box 3872Torrance, CA90510
Name:
System:Memory:
Language:
Hardware:
Dakin5 Programming Aids
APPLE II48K
Assembler/Applesoft II
APPLE II, 2 Disk II's, and printer
Description: Set of seven programs: I) Lister - prints BASICprograms using full line capacity of printer. Peeker- displaysor prints all or selected records from a text file. 3)Cruncher -
removes REM statements and compresses code in Applesoftprograms. 4)Text FileCopy- copies a particular test file fromone diskette to another. 5)Prompter - data entry subroutine
that handles both string and numeric data. Options for using
commas, decimal points, and leading zeros, with right-justifiednumerics. Alphanumeric data is left-justified with trailingspaces added as required. Maximum field length can be
specified to prevent overflow in both numeric and
alphanumeric fields. 6) Calculator - an addition/subtractionsubroutine that handles numeric string data. Written in
Assembler code, and uslnq twenty place accuracy, it functions
40 times faster than if written in an equivalent BASICsubroutine. 7)Diskette Copy - formats an output disk, copies
each track,and verifies that the output matches the input.
Copies:Price:
Includes:
Just released$39.95
35 page documentation and programdiskette
Dakin5 Corporation (developer of The Con-troller for Apple Computer, Inc.)Local Apple dealers
Author:
Available from:
December, 1979 MICRO -- The 6502Journal 19:75
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 78/84
Name:
System:
Memory:
Stock Market Option Account
APPLE II Computer32K with Applesoft ROM
48K with Applesoft RAM
Applesoft IIDisk II, 132column printer
Language:
Hardware:
Description: The Stock Market Option Account program stores
and retrieves virtually every option traded on all option ex·
changes. A selt-promptlnq program allowing the user to enter
short/long contracts. Computes gross and net profits/losses,
and maintains a running cash balance. Takes into account any
amending of cash balances such as new deposits and/orwithdrawals from the account. Instantaneous read-outs (CRT
or printer) of options on file, cash balances, P/L statement. In-
cludes color bar graphs depicting cumulative and individual
transactions. Also includes routine to proofread contracts
before f il ing.
Copies: Just Released
Price: $19.95 + $2.00 (P&H) - Check or Money Order
Includes: Diskette and Complete Documentation
Available from:
Mind Machine, Inc.
31Woodhollow Lane
Huntington, N.Y. 11743
Name:
System:
Memory:
Language:
IFO·DATA BASE MANAGER PROGRAM
APPLE II OR APPLE PLUS COMPUTERS
48KAPPLESOFT II on Firmware (or APPLE II pluscomputer)Single Disk Drive and Serial or Parallel Printerardware:
Description: The IFO (Information File Organizer) Program can
be used for sales activity, inventory, check registers, balance
sheets, price markups, library functions, client/patient billing
and many more applications. In order to use the IFO no prior
programming knowledge is required. All commands are in
English and are self-prornptlnq. Up to 20 header can be created
and a maximum of 1000 records can be stored on a single
diskette. Information can be sorted (ascending or descending
order) on any field and cross-referenced using 5 criteria on up
to 3 levels of searches. Mathematical functions (adding,dividing, multiplying, squaring) can be performed on any 2 col-
umns of data or on I column of data in combination with a con-
stant to create a new column of data. Information in the data
base can be printed in up to 10 different report formats USing a
40,80 or 132 column, serial or parallel printer or may be viewed
on the screen only. There are numerous error protection
devices in the program so that the program is easy to use and
allows the user to run the program error free.
Copies: Just Released.
Includes: Program Diskette and Instruction Manual
Price: $100 (Manual Only:$20)
Author: Gary E. Haffer
Available From:Software Technology for Computers
P.O. Box 428
Belmont, MA 02178
BASIC Programmer 's Toolki t
PET
AllMachine Language FirmwareAll standard PETs, or with Betsi, Expand
amem or Skyles add-on memory
Name:
System:
Memory:
Language:
Hardware:
Description: The BASIC Programmer's Toolkit is a collection of
programming aids, coded in 6502 machine language, and
delivered as a 2KByte add-on ROM. Adds 10 new commands to
the PET; namely, AUTO, RENUMBER, DELETE, HELP, TRACE,
STEP, OFF, APPEND, DUMP and FIND. Commands are entered
as shown above, with optional parameters. Guaranteed to
make the developing and debugging of BASIC programs for
the PET faster and easier.
Copies:
Price
Author:
Several thousand in use already
$49.95 or $79.95 (depending on version)
Palo Alto IC's, a division of NestarSystems, Inc.
430 Sherman Avenue
Palo Alto, California 94306
Local PET dealersvailable from:
Name:
System:
Memory:
Astronomer
APPLE II16K with Applesoft ROM, 32K with Ap·
plesoft RAM
Applesoft IIApplesoft ROM (optional)
Language:
Hardware:
Description: Astronomer applies the personal computer toaspects of astronomy which previously were available only in
almanacs for specific times and conditions. Using expres-
sions in the Almanac for Computers (U.S. Naval Observatory),
times of sunrise-sunset-twilight, sidereal time, precession and
Julian Date are calculated in this program for any date, time or
location. The computations are completed without delay and
conditions are set through an efficient user-interface.
Copies:
Price:
Includes:
Author:
Available from:
New Program
$10 + $2 handling and postage
Complete documentation
Bruce Bohannon
Bruce Bohannon
2212 Pine Street
Boulder, CO 80302
Name:
System:
Memory:
Language:
Hardware:
DISCOUNT & YIELD
PET
8K
BASIC
PET(8K) With Cassette
Description: Discount and Yield is deslqned to provide the
time-value calculations necessary to determine the required
discount or yield when purchasing or selling contract for
deeds, land contracts or mortgages. The program will also
handle the complexity of calculating discounts and yields
when prepayments are made at nonscheduled intervals.
Copies:
Price:
Includes:
Just Released
$8.95
Cassette and instructions
Author: D.J. Romain
Available from:
D. J. Romain, P.E.
405 Reflection Road
Apple Valley, MN 55124
19:76 MICRO -- The 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 79/84
6502 Bibliography: Part XV
Will iam R. Dial
438 Roslyn AvenueAkron, OH 44320
505. MICRO No. 13
Dial, Wm. R., "6502 Information Resources Updated", pgs.29·30.Additional and updated information on the publisher's ad-
dress, subscription rates etc. for the publications cited inthe 6502 Bibliography.
Lipson, Neil D., "The Color Gun for the Apple II", pgs. 31·32Turn your Apple into a device which will determine the col-ors of any object.
Tripp, Robert M., "Ask the Doctor ..Part V", pgs. 34·36Discussion of AIM or SYM problems in loading KIM formatcassette tapes, a short routine to get by the SYM "2F"loading bug and a routine which mimics the KIM SCANDSroutine on the SYM.
Reich, L.S., "Cornputer-Deterrnlned Parameters for Free·Radical Polymerization.", pgs 38·40Program for determining parameters for weight·fractionversus polymer size. Includes Example run using
polystyrene data.
DeJong, Marvin L., "AIM 6522 Based Frequency Counter",pgs. 41·42 •Usingthe AIM 65 as a six digit frequency counter capableof counting to at least 450kHz.
Scarpelli, Anthony T., "KIM-The Tunesmith", pgs. 43·52Play, compose, save and play back music on your KIM.
Rowe, Mike (staff), "The MICRO Software Catalog:IX" pgs.53·54Ten interesting software offerings are reviewed.
Gieryic, Jack, "SYM·1: Speak to Me", pgs. 57·58Some starting techniques for storing speech. Lots ofmemory is the key--about 5K per second of speech.
Kemp, David P., "Reading PET Cassettes without a PET",pgs.61·63A program is given which makes it possible for a SYM·1 toread a PET cassette.
506. Recreational Computing 7, No.6 (May/June 1979)
Day, Jim, "PT2: Apple Scan Simulation", pg. 5.An Applesoft " program that simulates a high resolut ionPPI scan.
507. The Cider Press 2 No.3 (June 1979)
Larsen, LeRay, "Having Disk Problems?"pg. 5A bad sector of a disk can often be rectified by putting asmall amount of recording tape lubricant on the window.
Then erase and reinitialize.
Wilson, Gene, "Apple II Utility Disk Software Review", pg. 5Review of a diskette by Roger Wagner. of SouthwesternData Systems, P.O. Box 582, Santee, CA 92071
Anon, "Disk of the Month - June, 1979", pg. 419 programs totaling some 60 kilobytes.
508. Byte 4 No.6 (June, 1979)
Watson, Alan III , "More Colors for your Apple", pgs. 60·68How to get additional High Resolut ion Colors out of yourApple.
Leedom, Bob, "Approximation Makes Magniture of Dif-ference", pgs. 188·189 (June, 19]9)
Some tips in adapting a fast Fourier transform programfor the 6800 to a KIM 6502 system.
509. Kilobaud Microcomputing No 31(July, 1979)
Lindsay, Len, "PET·Pourri", pgs. 6·7Information on the new 32K PETswith fuil size keyboards,how to modify programs for the new PET, further discus-sion of cassette problems, etc.
Anon, "Ohio Scientific Small Systems Journal", pgs. 8·11Discussion of the OS·DMS data management system.
Pepper, Clement S., "Safe Ports", pgs. 60·62Protect your I/O ports with this bidirectional buffer. lrn-plemented on a KIM·1.
Chamberlain, Bruce 5., "OSI's Superboard II;;, pgs. 66·70
A favorable review of this inexpensive micro board.
Lindsay Len, "Teach an old PET New Tricks" pgs. 72·74Some reference charts to make less difficult the job ofmodifying programs for the OLD PET to run on the NEWPET
Sybex, 2020 Milvia St., Berkeley, CA 94704, pg. 104Rodney Zak's new book "6502 Applications Book" isadvertised.
December, 1979 MfCRO -- The 6502 Journal 19:77
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 80/84
Hallen, Rod, "The 6502and Its Little Brothers" pgs. 124-126
A discussion of some of the other members of the 65xx
family.
510_6502 User Notes No. 15(June, 1979)
Williams, J.C., "A 32K Dynamic RAM Board for the KIM-4
Bus" pg. 1
Constructional Article.
Green, Jim, "650X Saveand Restore Routines pg. 4
Routines save and recover A,Y, and X register values.
Kantrowitz, Mark, "Telephone Dailer' pgs. 6-9
Saves and dials up to 16different telephone numbers.
Flynn, Christopher, "Some Important BASIC Mods" pg. 9
MLDSPT can be used to activate user-written machine
language routines. ARRSAV/ARRLOD provides an easywayto saveand loaddata oncassette from BASICarrays.
Mulder, Bernhard, "Focal Mods" pg. 13Speed it up a little with these mods.
Clements, William D., Jr., "Tiny BASIC Cassette Save andLoad"pg. 13-14
Add save and load commands to your TINY BASIC.
Day, Michael E., "TINY BASIC Strings" pgs. 14-16Here is a string MODaccessed thru USR
Fatovic, J., "Assembler" pgs. 16-17
A symbol table sort for the MOS/Aresco Assembler.
Scanlon, Leo, "Warning" pg. 18
A warning about the types of thermal paper to use in the
AIM 65. Apparently some types are abrasive and can ruinthe printer head.
Goga, Larry, "Notes on AIM User I/O" pgs. 18-20
All about RDRUBand also a Memory test Program.
Campbell, John R.,"Modification to KIMSI to add 4Kto RAM
to Memory Space Below Monitor" pg. 20How to add 4K from address $0000 to $13FF.
Schilling, Heinz J., "CPU Bug" pg. 22
A bug in the JMP Indirect instruction of the 6502.
The Editor, "6522 Info and Data Sheet Corrections" pg. 22
A number of corrections are given.
Lewart, Cass, "Extending the Range of KIM-1 Timer to1:32640" pgs. 22-23
A simple fix to make the extension.
Dejong, Marvin L ., "SYM and AIM Timer Locations." pg. 23This will help in modifying programs to run on AIM orSYM.
BOisvert, Conrad, "Use of the ROY Line to Halt the Pro-cessor" pg. 23.
A simple circuit is given.
Nazarian, Bruce, "Additions to the MTUSoftware Package"(KIM) pg. 26
Some additions and changes for Hal Chamberlain's DACSoftware.
Lewart,Cass R., "A Simple Microprocessor InterfaceCircuit" pg. 26
An interface to let KIM control LEOs, relays, or ACoperated appliances.
19:78
511. Personal Computing 3 No.7 (July, 1979)
McKee, Paul, "Merging on the Challenger", pg. 8
Discussion of merging two BASIC programs.
Franklin, Larry, "Line Renumbering on the OSI" pg. 9
Discussion and modification of a line renumbering pro-gram.
Scarpelli, Anthony T., "Making Music with Fractals" pgs.
17-27
RandomTones on the KIM-1.
512. Southeastern Software Newsletter, Issue 10 (June, 1979)
Banks, Guil, "Diskette Space", pgs. 1-2
Machine Language program to tell howmuch space is left
on a diskette. Also an Integer Basic program to call upthe
routine. With tutorial discussion by the editor.
Anon, "Input/Output Control Block", pg. 3
Discussion of uses for the lOBand DeviceCharacteristicsTable for the Apple II DOS3.2System.
Howard, Clifton M., "How to Use the TOKEN Routine", pg.4
A step-by-step description of how to use the TOKEN
Routine.
Anon, "Shorthand Commands for 3.2", pg. 5How to add a series of shorthand controls to the Apple
DOS3.2 system.
Anon, "Turning Your Printer On", pg. 6
Short program to turn printer on and off.
513. Stems from Apple 2 Issue 6 (June, 1979)
Griffith, Joe, "Plotting Algebraic Equations", pg. 3Several programs for different types of equations.
Hoggatt, Ken, "Ken's Korner", pgs. 6-7
Discussion of the Apple Contributed programs Nos. 3, 4and 5. Also covered are the character generator and the
character table.
Anon, "Apple Stem's Software List"
A list of 100programs for the Apple was enclosed with the
newsletter.
514. Call - Apple 2, No.5 (June, 1979)
Golding, Val J., "Hiding Out in BASIC", pg. 5
Discussion of methods of imbedding machine code in
Basic, PokeStatements, Monitor Routine, Data and Read
Statements, Linker, and other routines.
Winston, Alan B., "The Multilingual Apple", pgs. 11-13
Discussion of the Fourth Language and a look at the
CHRs pseudo-function and GET C$ for Apple IntegerBasic.
Anon, "DOS 3.2 Changes", pg. 15Rewriting file-oriented programs to accommodate the
change to the Apple DOS3.2 System.
Thyng, Mike, "Applemash", pg. 5
How to pass basic serial data thru your Apple Com-munications Card.
Kotinoff, Jeff, "LORES Color Picture", pg. 19
Two color programs for the Apple II.
MICRO -- 'rhe 6502 Journal December, 1979
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 81/84
Skyles Electric Works PAL·80™
"Catifomta residents add 6 to 6%% sales taxwhere applicable.
The Skyles PAL-80™ is a high speed thermal printer
offering the combination of text printing at 80 charac-
ters per line and continuous graphics at 60 dots per
inch. In the text mode, upper and lower case data are
printed at 40 characters per second. The 5 x 7 charac-
ters provide clear readable copy on white paper; no hard
to find, hard to read aluminized paper.
In the graphics mode, seven bits of each byte correspond
to the seven dots in each of the 480 print positions per
line. Since the computer driving the printer has full con-
trol over every print position, it can print graphs, barcharts, line drawings, even special and foreign l anquaqe
. symbols. Despite its low cost, the Skyles PAL-80 is a
Please send me Skyles PAL-80 printerts)
complete with 2% foot interface cable to attach to my
PET at $675.00 each* (Plus $10.00 shipping and hand-
ling). I also will receive a test and graphics demonstra-
tion tape at no additional charge and over 150 feet of
8% inch wide black on white thermal paper $ _
I would also like to order rolls of 8% inch wide
by 85 ft. long thermal paper (black ink) at $5.00 each
$_----
____ 10 roll cartons at $45.00 $ _
VISA, Mastercharge orders call (800) 227-8398
California orders call (415) 494-1210
• 80 characters per line
• 8% inch wide thermal paper
• Full graphics at 60 dots/inch
• Interfaced to PET
• Works with all PET peripherals
• 40 character per second rate
• Microprocessor controlled
• Bidirectional look-ahead printing
• Quiet operation
• No external power supplies
• Only two driven parts
• High reliability
• Clear 5 x 7 characters
• Attractive metal and plastic case
true intelligent printer with full line buffering and bi-
directional look-ahead printing.
High reliability is designed in: The thick film thermal
print head has a life expectancy of 100,000,000 charac-
ters. Two DC stepping motors provide positive control
of the print head and the paper drive.
The Skyles PAL-80 operates directly from a 115V 60 Hz
line (230V 50 Hz available). No external power supplies
are required.
It comes complete with an interface for the PET: a two
and a half foot cable plugs into the IEEE interface atthe back of your PET. Works with all PET models and
PET or Skyles peripherals.
PAL-80 SPECIFICATIONS
TEXT
Format
Print speed
Line Feed
Character Set
GRAPHICSFormat
Print Speed
COMMON
Paper
Dimensions
Weight
Skyles Electric Works I
TM PAL-80 Printer on A Leash, a trademark of Skyles ElectricWorks Inc.
80 characters per eight inch line
6 lines per inch nominal
40 characters per second
50 milliseconds nominal
96 Characters, including upper and
lower case, numerals, and symbols
480 print positions per line
240 print positions per second
8% inch wide thermal paper, available
in 85 foot foils, black image on white
12"W x 10"0 x 2'%"H
8 Ibs (3.6 kg)
10301 Stonydale DriveCupertino, CA 95014. (408) 735-7891
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 82/84
F rom th e M akers of TH E B as ic S witch lM for O ld P ET®Ow ners com es
T he S pacemaker'"for New PETOwners
N o R oom For Your R OM?
If you 're an owner of a "new-s1y le" P ET,you 've probably dis covered by now th at y ourCom m odore W ord P roces s or R O M and your B A SIC P rog ram m ers Toolk it R O M both g o in-to th e sam e em pty s ocket in you r P ET.W ith th e S p ac em a k er, lM y ou 'll s im p ly in sta ll b othR O M S on th e S pacem aker, p lug it in to your em pty R O M socket, and flip a convenient ex -ternal s witch to s elec t e i" th er t he Too lk it o r "th eW ord P ro R O M .
S pacemaker $2100
R O Mdriver $3100
S witch R O MsManually or
from S oftware
T h e RO Mdriv erlM i s acom panion device th at can driveu p to ·th re e S p ac em a k ers ...a llo win gR O M selec tion on each S pace-m a ker under s oftw are contro l. Th eS pacem a ker w ill be a va ila ble inD ec em b er, 1 97 9 .T he R O M d river inJanuary , 1 98 0 . Th e S pacem a ker is
des ig ned for both m anual s witch ingand s oftw are s witch ing , s o R O M -driver i s not requ ired for us e o f th eS pacem ak er in m anua l m ode.
Spacemaker and ROMdr ive r wil lbe availa ble at "th es e a nd oth erdealers :A BCompute rs115E . S tum p R oodM o ntg om e ry ville , P A 1 89 3 6N ew E ngland E lectronics C o ., Inc.6 7 9 H ig h lan d A ven ueN eedh am , M a ss . 0 219 4or m ay be o rde re d dire ctly fro m
Small S ys tem S erv ices, In c.9 00 S pring G arden S treetG r eens boro , I\JC27 4 0 391 9 - 2 72 - 4 8 67M /C V is a Accepted. N . c . Res identsadd 4 % S ales Tax .
The Basic Sw itch. Spocemoke r and ROMdr ive r are t rademar1cs a f Smal l Sys tem Services. Inc. PETisa t rademar1c o f Commodo re BUSinessMachines . Inc.
BAS IC Programmers Toolki t i s a t rademar1c of Palo A lto ICs.
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 83/84
Look To MTUFor 6502System Expansion
Micro Technol
M
P .O. Box 4596 841ogy Unlimited
anchest ' Galaxy W603.627.146:;' N.H. 03108 ay
Call Or Wr"t e For Our Full L·me Catalog
8/3/2019 Micro 6502 Journal December 1979
http://slidepdf.com/reader/full/micro-6502-journal-december-1979 84/84
(:commodore
2001 ·32N $129500
2001 • SN $79500
2001 • 16B $99500
2001 • 16N $99500
2001 • 32B $129500
16 /32K DIAGNOSTICKIT $22500
AUDIO AMPLIFIERPET $2995
N DENOTES GRAPHICS ON LARGE KEYBOARD
PET to IEEE Cable
IEEE to IEEE Cable
C2N CASSETTE
SK DIAGNOSTIC KIT
DISKETTES:
DVSAN [Business Quality]
VERBATIM
B DENOTES NO GRAPHICS ON LARGE KEYBOARD
BUSINESS SOFTWARE
OSBORNE - CMSGeneral Ledger Disk $29500
Accounts Payable Disk $19500
Accounts Receivable Disk $19500
Word Processor 16/32K Disk $9900
SO Column
Dot Matrix PrintE:lI
PRINTERCOM
2022 $99500
2023 $S4900
$3995
$4995
$9500
$3000
5/$2450
10 /31 95
Inventory Control Disk $19500
[Available 12·1·79]
Mailing List Disk $9500
Payroll Disk $29500
[Available 1·15·80]
Word Processor Tape $2495
CBM - MISGeneral Ledger Disk $12000 Inventory Disk $12000