8/3/2019 Micro 6502 Journal March 1980 http://slidepdf.com/reader/full/micro-6502-journal-march-1980 1/76 / / L f'_. ,_,r- ""'y ,..,..,_ r- '-::;a ~' ~I -.. L r ~ , _ II ,/ " ,/ L ... A Digital Thermometer for the APPLE II Clocking KIM A Home Message Center
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
list the secret baste ROMs <:>DRIVING ACE~* *2 ACTIONPACKEDVIDEOGAMES* * e
~
PET BASIC BREAKTHROUGH i
So side Software j~prese i
~
SYMBOLIC/STRUCTURED BASIC ~At last, SymbOlic/Structured Basic is ample: LOOP/PRINT "HI": GO TO LOOP. S - ~
available for your PET8-32Kpersonal com- Basic program lines can be up to 255 ~puter! 5-Basic isa pre-cornpiler that enhan- characters long, two-and-one-hal1 times as ~
ces the PET'sbuilt-in basic monitor with the long as on standard Basic. 5-Basic does not ~
addition of extra-control statements found compromise any of PETBasic'sexisting tea- ~
~ only in the most sophisticated computers. tures, All PETBasic commands can be used. ic
t WHILE ... GOSUB'" calls a subroutine as 5-Basic includes an editor with tun text ca- 1 1 :~ long as a condition is true. UNTIL ... GOStm pabillties, a translator/pre-compiler with its ~
:t ...jumps to a subroutine unlessthe condition own error messages,and the 5-Basicloader. +~ is true. The IF ... Then ... ELSEstatement al- Theseprograms are recommended for disk- ~
- + : : lows the programmer to commend the based PETs.A printer-is optional but sug- - + r- + : : computer to execute instructions if the nor- gested. Ca.ssettecopies are available and 1 -: t mal IF condition is not met. require two cassette drives. Comprehen- 1 -
Forget about line numbers, 5-Basic cl- sive instructions are included. Symbolic- ~~ lows you to program naturally only naming jStructured Basic package is available : t~ (nurnericclly or alpha.beticallyl) state- complete for an' introductory price of +* ments that you will need 1 0 refer to, tor ex- $35.95. + :
i·HILE .... GOTO. .. . A PET • UNTn. .... GOTO. . . . ~-y. • IF .. .. THEN .... ELSE PROGRAMMING. SYM BOLIC OPTIONA L ~i·55 CHAR. LINES BREAKTHROUGH· LINE NUMBERS ~
• 305 RIVERSIDE DRIVE, NEW YORK, NEW YORK 10025 ~¥¥ ••• ¥ •• ¥¥ •• ¥¥.¥¥¥ •••• ¥ •• ¥¥¥¥¥¥ ••••• ¥¥¥.¥ ••••••••••••••••
• ULTRA BlOCKADE- the standard against which •DYNAMAZE-a dazzling new real-tjmeqama ..You other versions have to be compared. Enjoy Block-
• move in a rectangular game grid, drawing or erasing ade's superb com bination of fast action (don't be •• walls to reflect baHs 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 lose a 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-o.r •
•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 andre- (or at top speed, if that's you·r styleJ. 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. I.nteger 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 f u l l of dra.gons, dwarfs, orcs, goblins, gold and jewels. Applesoft 1 1 •
• 48K; $19.95 includes diskette. •
•• PEROUACKEY-an exci,ting vocabulary game which pits the player against the clock. The obiect 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 n 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 ships out of the water. The first player to destroy their opponent's ships •• may win the game. A great low-res graphics game. Applesoft II 32K; $14.95.. •
• •Available at your ProgramsAvailable on Diskerre •
•tocal computer store at $5.00 Addirional •
DE.ALER INOUIRIES INVITED• • Check or Money Order e .•
Call or write for our free • Include$1.00 for
SOFTWARE CATALOG PO ftTEB§OFT. INC. shipping and handling •
• ;7 • C.O.D. 1$1.00 add'tl, charge) •
• Apple II is a registered P. O. BOX 157 • Master Charge and VISA •
trademark of PITMAN, ·NEW JERSEY 08071 orders accepted
• Apple Computer, Inc. (609) 589-5500 • New Jersey residents add •
that are basically 8 bit and have an 8bit data bus, but which can perform
some 16 bit operations. There has
been talk Irom time to time about a
pseudo 16 bit version of the 6502. It
has even had a number, 6509 or 6516,
but at present it looks as though it is
only a designer's dream.
If someone were to come up with a
pseudo 16 bit version of the 6502, what
should it contain? And, is there really
a need for such a device? I have a few
ideas on these matters which I will
present next month. An article by Ran-
dall Hyde will describe in detail the
specifications which were generatedfor a Synertek 6516. Between now and
then, why don't you think about these
topics and see what you would like to
have in a 16 bit version of the 6502?
Maybe with enough input from various
sources we can help get such a pro-
ject moving.
A MICROscope Note
If you have applied to be a reviewer
tor the MICROscope product review,
thank you. We will be sending out
acknowledgements and additional in-
formation this month. A number of
products have been submitted for
review, so we will be getting these out
to the reviewers soon, and the first
MICROscope should appear within a
couple of months. If you have a pro-
duct to be reviewed: hardware, soft-
ware, book, or whatever, contact usfor the proper forms.
Statement of Ownership. Manage-ment, etc., required. by t~e act of Con-gress of October 23:, 1962 of MICROpublished monthly at Chelmstorcf,Massachwsetts for March 1980.
The name and addr.ess of thepubllsher is MICRO INK~ Inc.. 349helms·ford Street, Chelmsford,Mass~chus~tts. The EditcrJPubllsher isRobert M. Tripp of Chelmsford, Mass.
The owner is MICRO INK, Inc.,Chelmsford, Mass. and ;thename and ad-
dress (')1stockholders owning or holdingone percent or more of the total amountof stock is: Robert M.Tripp CIf IdDonnaM. Tripp 0 1 Chelmsford, Mass.
The kn·olhAbqrulhoJders, mortgagees'and otrter sacuriJy holders owning onepercent or more of the total ameunt ofbonds, mortgages or other securitiesare: none.
The av.eragenumber of copies of eachissue- of this publication sold ordistrlbuied thougb ttie mails or other-wise to paid subscribers during Ihetwelve months preceding the date'shown above is: 7063.
I certify tnat the statements made b)lme above are c3rrect ano complete.
Slgned: Rober\ M. TrtppEditprJPubliSh~r
Surfa" ..:
United States $15.00
All Other Countries $IB.OO
AirMail:
Central America $.<7.00Europe/So. America $33.00All Other Countries $39.00 $ ...
"BEST of MICRO Volume 1"
Surface $7.00Air MaJi $10,1)0 $ .......•.•.•
"BEST of MICRO Volume 2"
Surface $9.00
Air Mai l $13.00 $ ...
PO Box 6502Chelmsford, Mass 018.24
611·256·5515
"The BEST of MICRO Volume I"contains all of the Impor-
rant material from the first six issues of MICRO In book
form.
"The BEST of MICRO Volume : 2 ' " contains all of the lrnpor-rant material Irom Ihe second six issues 1# 7 to 12] ofMICRO in book form.
Back Issues:
Issues 7 to 12: ..
Issues 13 on: ...
No.Surface @ 51_75 each
Air Mall @S2 .75 each
Surface @ 52.25 each
Air Mail @ $3.25 each$ .o.
All payments must be inUS dollars.Make checks payable to: MICRO
Foreign payments In Internallonal Money Order or cash.
IIyou are a subscriber, attach label or wri te subscription number here:
Name: ...•.. . .. ' .
TOTAL
City: ,
Address: .• , .........•..••••.•.•..........•..
. . .. State: Zip:
Country (if nOI U.s.): ...........• , .
$.
s ,
Hefp MICRO bring you the info you want by complellng Ihls short questionnaire.
Microcomputers Owned/Planning 10 Buy: AIM SYM KIM PET APPLE 051 Other: , .
Per ipherals Owned/Planning to Buy: Memory Disk Video Printer Terminal Other: . .. ..•.
Microcomputer Usage: Educational Business Personal Control Games Other:. . . .. .•.•. .. .. .. .. .•. .. .. .
UPGRADE YOUR APPLE II ® WITH A NEW SYSTEMS SOFTWARE PACKAGE
• Unified Operating System
• Disk File Manager
• Commercial Basic• Editor/Assembler/Debugger
• Data Base Manager
Optimized Systems Software does not use Apple DOS®. OSS is a unified and complete systems software
package with its own Operating System and File Manager. The Operating System, the File Manager andthe Basic combined use only slightly more RAM than Apple DOS ® alone. Requires 48K Apple II® with
Disk II.
Operating System• Byte and Block 1/0• Simple User Interface
• Simple Device Interface(create your own)
File Manager• Open, Read, Write, Delete, Lock, etc.
• Random Access via Note & Point
• Rle Names of Primary. Ext type
Basic
• Nine Digit Precision DECIMAL Roatlng Point
• 32K Byte Strings• Variable Names to 256 significant characters
• Operating System + File Manager• Operating System + File Manager + Basic• Operating System + File Manager + ASM• Operating System + File Manager + Basic + ASM• Operating System + Data Base Manager
$24.95
$49.95
$49.95
$89.95
(2nd Q)
Order today. Add $2.00 for shipping & handling. California residents add 6% sales tax. Visa/Masterchargewelcome. Personal checks require 2 weeks to clear.
Note: Apple II~ Apple DOS ® are trademarks of Apple Computer, Inc.
Here is a guide to the Applesoft BASIC floating pointutility routines which will permit them to be used effec·tively from assembly language programs. Get the best ofboth worlds: optimize your programs by writing them inassembly, and, use these excellent floating point mathroutines directly.
Although floating point capabilities
are available in Applesoft BASIC, it is
still useful to do floating point opera-
tions from machine language. This is
especially true when the floating point
operations are needed at some point in
a machine language routine and it wouldbe very tedious to pass parameters back
up to a FP BASIC program. The alter-
native of writing special machine
language routines for the solution of' a
few calculations can also delay a pro-
gramming project unnecessarily. The
purpose ot this article is to give an ideaof how the AFPUR (Apple Floating Point
Utility Routines) work and how to use
them.
AFPUR uses 248 bytes trorn $F425
to$F4FB and the FIX and underflow
routines from $F63D to $F65D. In case of
overflow, a jump to OVLOC ($3F5) is
taken, where a jump to your own code
should be stored. Floating Point work
space is given in tile reference manual
as $FO to $FF althouqh only $F3 to $FF
are used. Tile floating point work space
bytes and their uses are given in Table 1
E is an extra copy of the FPI man-
tissa saved during all arithmetic opera-tions although it is actually used only in
division. EG is an extra byte changed by
the align and normalize code when FP1
and FP2 are being Shifted. FP=X,H,M,L
is the floating point format of a number
where X is the exponent and H, M, and L
are the high, medium, and low bytes of
the mantissa. Note that the order of the
bytes according to significance is op-
posite that in Integer and FP BASIC and
the Sweet 16 interpreter .
March,1980
The floating polnt format is similar
to 32·bit hardware on many larger corn-puters. The exponent is excess 128 so
that $80 represents 20. The mantissa is
two complement normalized until the
two leading bits are different so that
+1.0 = $S0400DOOand -1.0", $7F80
0000. Here are some more examples of
decimal numbers in hex floating pointformat:
0.0 " $00 00 00 00
L'5 " $80 60 00 00
1.75" $80 70000010.0 = $83 400000
256.0 ~$88 40 00 00
0.1 = :t-7C66 66 66
Note that the floating point lorm
$7C 66 66 66 is a truncated approxlrna-
tion of 0.1 so that 0.1 multiplied by 10.0
will give $7F 7F FF FE instead of $80 40
00 00. The AFPUR will work on unnor-
malized numbers although tl1ere can be
a loss of accuracy because of the way
the alignment code works. For example,
in adding the numbers $7F 80 0000 and
$69 40 00 00, the result is $7F 80 00 00
+ $7F 00 00 01 = = $7F 80 00 01, Using theunnormalized $80 CO 00 00 would give
$80 CO00 00 + $80000000 = $7F 80 0000. These cases give trivial losses of ac-
curacy, but more extreme cases can
make your Apple II seem like it can't add.
Since results of arithmetic operations
are normalized in all cases, unnormaliz-
ed numbers can only be input to the AF-
PUR by tile programmer in the form of
stored constants.
Table 2 gives a general idea of how
the AFPUR works.
MICRO -- The 6502 Journal
Harry L. Pruetz
2213A Lanier Drive
Austin, TX 78758
Trying to POKE or PEEK from ln-
teger BASIC will not work because
critical information is stored in the same
locations as Ihe floating point work
space. For example, $F6 and $F7 con-
tain tile current Integer BASIC line
number and $F8 contains tile automatic
line numbering mode flag. If a machine
language routine is called from Integer
BASIC and AFPUR routines are used,
then location $F8 should be set to 0
before returning to tile Integer BASICprogram.
In the following examples of calls toAFPUR, FP1 and FP2 are used as the
TEXTPRO: Hardware, Firmwareand powerful Software. Apple 1 1
plug,in addition for(~} Text editing,(2 ) Screer:lediting, (3 ) (Drogramming
Upper/Lower case, PowerfulSuper -
mon-a 2716 EPROM Monitor LC.Complete: 45 pag.edocumentation,text-processinq software (disk) andall hardware.1S,minwte instatla-tion. Cal l collect for information.$349.
TextPro Corporation1367 Post St. Studio 19San Fr~ncjsGo; Ca.94109(415) 775<5708
PET MACHINE LANGUAGEGUIDE:Comprehensive manua l toaid the machine language pro-grammer. More than 80 routinesare fully detaUed.so that the reader
can put them to immediate use.For either 011'1 or New ROMs. $6.95plus .75 postage. VISA or Master'charge accepted. Order from:
Aoacus SoftwareP.O. Box 7211Grand Rapids, MI 49510
ASTROsoft presents: Solar SystemSimulator: graphic displaY ofplanets orbiting SUITfor any rallge
01 dates. Requires Applesoft 32K,HIRES character generatm in AP-PL.EII contributrng pages, Volume3. Sflecify RAM orROM Applesoft,
memosize, 1/0. Tape $15_ Disk $30.Check or MO 10:
William Judd701 South 22hd StreetOmaha, NE 681tD.2 .
Soon, Star Map, Life of Sun.
AIM 65 Newslettersix bimonthly issues for $5.00 inU.S. and Can. ($12.00 elsewher.ej.
The Target,c/o Donald ClemAA number 2Spenc!')rville, QH 45887
"SAVE S
L D X 1 1 3
SL LOA FP1,X
STA S,X
D E X
aPL S L
l!LQAD T AND R FO R MULT
LDX#3
ML 10A T,X
STA FP1,X FP1=T
LD A R,X
STP, fP2,X FP2~R
OEX
EPL ML
JSR $F48C FMUL R*TCHALLENGER 1 P OWNERS: Tiredof 24X24 graphics? $40 worth ofcomponents will upgrade your
video display 10 give 30 lines X 50characters on screen arrd doubleyour processor speed. Completesoftware and step by step hard-ware modifications for only $8.00.
Contact:
*SAVE T
LDX #3
TL LOA FP1,X
5TA T,X
D E X
BP L TL
JMP INez
1H • DA #0 LOOP INDEX HIGH
1M .OA #0 LOOP INDEX MIPDLE
S • HS OOOOOOOOSUM
T .I{S OOOOOOOOTERM
R .HS OOOOOOOOFACTOR
A JSR FDIV was substituted in this pro-
S. Chalffn905 ClintonSt.Philadelphia, PA 19107
.I"ram to get the FDIV liming.
", . .forAPPLE IITONEWARE
For the Serious Business or Home User:
MICRO MEMOAnd Just for Fun:
TRANOUILITY BASE
MICRO MEMO is the flO'st sophisticated "Oe5k Calender" program to make
good use of vour- computer's power .
.. M.cro Memo Includes one time, weekly. mont-hllj. serm-annua! and anntial
,"eminde ...s.
TRfI~ljglJ~L ~TYt
. MOJ1t:hh~remlnde.r s ma l' be j ol '" f l:4:ed or "' tl oat lng"' dates (ex. 1s t S,i3t.Llr'dav of
ev e rv mont h I.
.. Each reminder ~llows cbc.ce 01 one week, ., week 0" 1 month advance
nocu::e-rem"'lds YOLIahead of urne to prepare lor meeunqs. pHl'chase nckers,
:* Micro Memo wi ll d '1 !: ;p la~r r" print any dav'Q of'wE!E!k'5 reminders.
* MICI"O Memo 15a "perpeuual " ca lenda l' -8u tom l9 tl caUv create -S new months
wuh all appropl "' late memos fbwthdavs. a n ru v er se n e s. ' 1 '1 0 1 1 th lymeeunqs, et c. ) aspast mOnths are dropped-system holds hili vears rerrun ers OnO ne disk
. ~ J . ~ "s . -
.'
-"',
• ""hero Memo "knows" mas mal or hohdavs. "
$2495
TR j .\ N au I L 1 1 y 81 \ SE rs e ra $l hugh resol _ 1 ~AO r ' lLIJ n er L anee r- ga me b v 8,11 B IJt ! ~ e. e ree to r 'O f
sume's '-P~'l'lV t!ln:l!Iids"' TRANIJUILITY BASEIS ILfSL l ike the uoputar ~ rc .i 3I [JE! 'game. InciuDlIlg
mll J'- lp le r rco ns cep es . f :f T· 51 't r- nr atmn, a nl j 1 00m In IQr a crcse-un view es vtm epprcecn theLunar $llrf .ace
* "BOfnb PI'O{J~"manu rjrlvEW command and ds[ ;~ eri l: ry
$3995* ><eQul"es flSK, ~I"k, RAM 0'- ROM Applesor,
T: I= lA,NOU1L.1TY BASE rer;lllres 3 2K a nd d isk
AliliiI"iI. 'bta at. your favorite! c;:amputlu" sltarll a r d ir ll ct from S ·TONEWARIE ladd S2
Old PET or New PET ...Expand Its User Memory Now!... up to 40K with the precision made Skyles Memory Systems
The printed circuit board adapter connects directly to the data bus on yourPET, with ribbon cable and 50 pin connector that keeps the data bus open tothe outside world.. Installs in minutes without special tools orequipment ... you need just an ordinary screwdriver.
Three Skyles Memory Expansion Systems to choose from: 8K, 16K,24K ... allowing the 2001-8 to be expanded to 32K, the new 8N also to 32K,the new 16N/32N and 168/328 PETs to 40K.You can, atany time, increaseyour PET's memory by 8 kilobyeincrements up to the limits indicated. Letyour PET's user memory grow on you, 8K at a time.
Each System now comes complete with a test cassette--at no extra cost--fortesting high speed read-write and low speed memory retention.
At the great prices you should always expect from Skyles:
8KM 8K Memory Expansion Board
16KM 16K Memory Expansion Board24KM 24K Memory Expansion BoardPMA ..8 Memory Adapter for 2001-8PMA ..16 Memory Adapter for 8N and 8B, 16N/32N and 16B132B
$200.00·
400.00·600.00·50.00·50.00·
Note: All Memory iExpansion Boards require a Memory Adapter.
We're so sure of ourselves,
we're guaranteeing
all complete Skyles
M emory ExpansionSystems for a period
of 16 months!
1
231 E South Whisman Road
Skyles Electric Works ~ O o 8 ) 7 1 5 ~ 7 ~ ~ 1 w , C A4041
[ " i 2 STR $ 0256 P r .i .n te rS e co nd ar y A d dr es s..t,
033F 8D i = > = " 03 STR $ = 0 3 F E Screen L ine Counter-£1342 8 L 1 F f = " ~~1:3 STR " $ 03FF C haracter counter~3I345 :3 5 ItR STP $ DA Index Lo-13yte0347 A S ' fH LDA #$1310349 8Ir 62 1 2 1 2 STR $ 0 2 6 2 GPII3 File Length
STR :J 0:::'4') Logical Fil e if' ~ o : : : .. . . - - . _0351 E :D 4C ~-:'"") S TR 1= £124C D evice Number:.t~
0354 A ' - ' 04 L I t > . : #$04.. . . .~2t:356 20 C9 FF J'3P $ FFC9 Open Fil e (i.e. Open 4,4,0)
[1359 A 9 8f1 LD A #$800 :35B 85 DB STR $D P Index Hi-Byte-'035D AD F F -)3 L I r t = ! $ 03FF£136€1 r":' '-1..-. l:r·~P #$28 40 Characters per l ine, test._ . ~I,:'
(1:362 no 14 B ! 4 E : t o 0 :378 (Go)
1.)364 E E ~~ 0:3 H~C $ 03FE I ncrement Line Counter
er367 A D FE 03 ~D A $= 03Fi::
~~136A C9 16 Cr'iP ~$1622 l ines/ screen test
f136C FO 2:~: i:EO $ 0391 (END)
036E A S t 1 2 ; [ 1 LDA #$000370 8D !"""r 0:3 '3TFt :f, 03FF€ 1 : : : ~ 7 : 3 89 € 1 L ! LIlA #$011 C.R . in A S C I I
1 2 1 3 7 5 20 3~)F2 JS R :f F23~3 Print / f4, C.R.'~1:37;3 1:- ! ( G O J C ! . . ..C
0:;:79 A ' : : : ' l1t1 ! . . . . D > ' : #$00e37:t: A l DR ! . . . D A (fD A .. > : : ) G et next char!lcter via indirect addr.
0 3 7 1 1 r "~ IF CI'~P #$lF Test for Letter. . . .037F !1 02 f:F'L "$ 0':3:::3~Z t381 ~9 4(1 ADC #$40 offset far P et screen to A S CI I121'-' '::' '-:' 2£1 30 i = " . :; . .JS~~ :i F230 Print 41 4,;)'-'.~ . . . . .9386 E6 DR !-! C • D R Increment index La-byte
0388 De 02 3~E • 038C Bra~h if not zero
03:: :A E 6 DB I N C $ .D B Increment Index Hi-byte
e3 :=~C: EE , . . , . . (n l ~C 'f 03FF Increment C ha ra .c te r c ou nt er
e:3:::F 1~~1CC EF'L 'f 035D Return for next character
DAIM is a complete disk operating system for the ROCKWELL INTERNATIONAL
AIM 65. The DAIM system includes a controller board (with 3.3K operating system inEPROM)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 inboth 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 recoverunused space. Everything is complete' - plug it in and you're ready to go! DAIMprovides 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 ~
The "Polled Keyboard" technique used by OSI andothers permits the user to define the function of thevarious 'keys to his own specifications, and to changethem at will. Even though your keyboard may appear tobe UPPERcase only, it is easy to make it lower case as
well.
OSI machines come with a polled
keyboard arranged in the standard 53 key
format. Each .key is a switch whose state
(open or closed) can be ascertained under
software control. Polled keyboard hard-
ware affords maximum flexi.bility to theprogrammer. The most immediate use 01
the keyboard is lor input to BASIC and
other standard soltware which expects
letters to be ASCII capitals but numbers
and symbols 10 be unshifled. For this
reason, Ihe keyboard ROM In OSI
machines has been programmed to
yield capital letters and unshifted
numbers when the SHIFT LOCK key is
depressed. I am writing an editor program
and desire the keyboard to act in the con-
ventional "typewriter" manner with
respect to shifting. The Program Listing
gives a subroutine (lines 80 to 730) for
returning the standard ASCII Irom the
keyboard, and a driver program (lines 10
to 70l to demonstrate the subroutlne. As
a bonus, all the function keys (ESC, etc.)
ignored by IheOSI ROM are implemented
to yield standard ASCI.I code.
When called, the subroutine loops
until a key (other than SHI.FT or GTRL) is
depressed, then returns with the ap-
propriate ASCII code in bits 0 through 6of the accumulator. 1 .1 CTRl was also
depressed, bit 7 in the accumulator is set
(1), otherwise it is reset {OJ. Except for the
March, 1980
CTRl and SHIFT keys, the routine ex-pects only one key to be depressed at a
time. The routine delects the first
character key depressed if several are
depressed at the same time. The
subroutine clobbers the X reg·ister.
Several choices have been made
which you can easily change. The SHIFT
LOCK key is ignored. The program works
the same whether it is depressed or not.
AND #7 in line 540 will enable. the SHIFT
LOCK key. l:EFT and RIGHT SHIFT keys
are made equivalent, just as on a
typewriter. Since REPT is not an ASCII
signal, I chose the code $00 for it ar-bltrartly, The BREAK key on OSI
machi nes is hard wired to the reset line of
the 65XX chips and so is not detectable
by thls program. ESC, RUB OUT, LINE
FEED, and RETURN have .ASCII codes
$1B, 7F, OA, and 00 respectively.
The keys are arranged electrically as
an 8xB matrix. I. will not discuss this
matrix in detail .. It is shown in the OSI
Graphics Manual. The first row 01 the
matrix contains only control keys: LEFT
SHIFT, RIGHT SHIFT, SHIFT LOCK,
REPT, CTRL, and ESG. I call this row
CTLROW and readi! first. II the REPT or
ESC keys are depressed, the program
returns immediately with the appropriate
code. If not, CTLROW is saved and rows 2through Bare polled lor character keys.
MICRO -- The 6502 Journal
Edward H. Carlson
3872 Raleigh Drive
Okemos, MI 49964
.RUB OUT, UN·E FEED, and RETURN areincluded among the character keys.
When shifted, Ihey give $20 "space" astheir code. You could change line 730 sothat some other ASCII Iunctlon not
represented on the keyboard (lor exam-pie, $07 "bell") would be s.ignaled. Thepolling for character keys continues in a
loop until a key closure Is detected. Then
its ASCII code is put in the accumulator.
If a SHIFT key is down, the shifted code is
put in the accumulator. Then the GTRL
key closure is tested. Bit 7 of the ac-cumulator is set il appropriate.
All this happens in a millisecond orso. Many uses 01 the subroutine wiU r e o
quire a Check to see if the keyboard is
clear of the old keystroke so that a new
keystroke can be sought. The KYDONE
subroutine (lines 740 to 780) ac-
complishes this. Once entered, KYDONE
(ignoring; the CTLROW keys) loops until
there are no depressed keys on thekeyboard, then returns.
u u x a : : a : : a : : o o uo u a : : O I - O Z W . . Ja : : I I I l - . . J m . . J a : : I I I U
...IoUoz :L . . .
!SINNu u u
. .. .r -. t fl Wl =l tD l l II SI IJ .. r - I SI IS II SI IS I0 '1 lSI ( [ 0 0 0 0 ' I 1 S 1 ( ! )t D O ' I ( [ l l I r n a : : N I J . . . . .
r - I J l I I I U I J . . N t f l t ' - ( J l" V V V ' < I " I D t f l l I l l J )C > l 1 S J ( S J l S I l S l l S l l S l o S J l S Iu u u u u u u u u
l : > I t > J i S l C O I t > J C O I t > J 6 J wO O O' l( S J . . .. .M V L Il Ul' < I " ' < I " L f l L f l L f l L f l L f l t f l U ' l
ZH
a : :E:
( S J . . . .. S Juou( S J ( S J r - . l J ) M( S J ( S J O L . . . L . . .( S J O ( S J I S I ( S JN O J N I = l L . .
1 S l ( S J ( S J M t o O ' l I l l1 S ) 1 S ) ( S J 1 S l ( S J 1 S I ( S JI S ) N N N ° N N NI S I U U U U U U
1 S l 1 S ) 1 S l 1 S l 1 l . l 1 S I 1 S J. . . . . M ' < I " U ' l l D t ' -
uua : :
z:H
r-
: " . . Jn : : II - U
U z : a:n : :
1 - 1 1 1. . . . .
a : : a:I -W z : Zt f l H ' " "
t f IH n : :
< I :x
n::ua ::IIUI -
. . . . .
L . . . 3 :oz :
r - C t ::J
WCt :
x a: a : : a : : o o a : a : : t f I a : : t na : : O I - O : Z : W O C t : l - O I -1 - . . J U 1 . J a : : I l I . . J O C t : . . J 1 l I :
U1rW:. :
...Io~I -ZoU
Ill:oL . . .
)£
oo...I
. . .+• I S )I I lS I• lS Il!lUWilli
Ct : IIX •
1 - 3 :1-0::0
. C t :0Il::oa...J
- t a . > - I -. > - : . : u
:.:
n : :([
IU
a.a : :U
• U 1 I -m O W H;-<, z: > - I I I
NU
IS) W00 ( S J0 ' I 1 S ) 0 ~I S I U l ( [ U l
a : : 1 l I 0 W " ' V r - . 0 ' I I l I W I S I " ' ~U ' l L f l U ' l t f l t D l D U J ( { ) U J W r - . " . r - .lSI I S ) l S I I S l l SI l S l iS l i S l lS l l S l iS l l S l lS lU U U U U U U U U U U U U
~ ~ e ; J ~ ~ ~ I : ) ! : ; J 1 ' < I 1 S ) 1 S I 1 S I 1 S )r - . O O O 1 I S 1 H N M V L I l t o r - . w O ' lL I l L l l l l l t D l O t D t o t D t D U l l D t D l D ,
n : :IU
...Io
o.!ll!lUW W Qn : : n : : z :X X L . .
3:on : :oz:I J . .
N
t : :H
It f I
0 '1V
•a::ux o1 - ( [
X
.. J 3:III 0I - n : : 1 S In : : U . . J VI U I - I I I Iu<z:u.
r-
I -a.:rw un : : z :, a : :
n : :I - I l lH
- U1UlOWH Z : r
uua :
3:
~
n : :oL. .
: " . . JIl::I -U
UIt f l UW z :
a : :n ::
I - I l l
oWU1a : :W...IW
Il::(fl
. . . .
(fl
> -W:.:
Z. . . .([
l!l([
: : . : :
oo...I X
H
n : :I -([
E:
WoouWo
e-
...Iou
J:
uHUlIr 3 :a : :3: •...13a : :0
n : :IUOZ : Z :C I : : : : ln : : oI l I I J . .
L . . . N L . . . L . . . N N NN N NL . . . O U 0 0 u u u u w u
" ' O I S I C M i S J M i l l N I S ) I S I L I l U ' l t ' - W L . . . I S I W W V t ' - t ' - L . . . I J . . Vl S I l S I lS I l S I l S I l S I lS I ' " I S I I S I I S I I S I L . . O I S I I S I I S ) I S I I l . l I S I I l . l I J . . I S I I S I I S I
~~~~~~~~ffi~~~~~ffi~§~~~~E~~~~~~~ffi~~~~~C W L. . . t > JI SI IS INL Il OO I ll UC L . . . N M VL fl r- . O ' I CI :U L. . . N' < I" U1 t '- O' I UL .. . I Sl Nl 1l 00 < I: UW L. . . Nt f l1 S I1 S I1 S I- t1 S l1 S l1 S )1 S I1 S l1 S I1 S I1 S I1 S I - t . .. .. .. .. .. .. - t . .. .. .. .NN NN NN NM MM MM MM MV <rN N NN I S I I S I I S I I S I I S I IS I I S l I S ) I S l I S I I S I I S I I S I I S I ( S J I S I l S l i S l l S I l S l i S l i S l l S I l S I lS I l S I l S I l S I l S I l S I l S I l S I l S I l S l i S J l S !u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u w
1 S I 1 S ) t > J t > J ~ l : > I i S J l : > I l :> I l : > I l : > I l : > I ~ i S J l S I l S ! t > J I : > I I : > I I : > I I: > I I : > I ~ I : > I I : > I I : > I t > J t > J l S l i S J i S l l : > I ~ i S J l : > I l :> I l : > I ~ t > J 1 : > I( ! ) ( J l I S I . . . N M V L I l I D r - O O ( J l I S ) " ' NM ' < I " I I l W " ' O OO ' l I S l - t N M < r U 1 U l r - . O O O ' l I S l . . . N M V l f l W t ' -
. . . . . . . . . . .. . . . . . . . . . .. . . . . . . _ , . . . N NN NN NN NN NM M M MM M M MM M '< I " < r < r '< l " V V '< I " V
! S I N N Nuu u Ul f l W C I S l U l Wt ' - ( S J I S l V ( S J 1 S )r : l C C O ' I I S I CIII c o a : : N L . . . a:
0..H
~tn
. . . . .• !Jl
!JlOW>-oZ:r
( fJ:U
n : :oL . . .
: : . : :oo.J
C .Z : 3 . . J:JOOo n : : uL . . .II
wuuZ........Ol:Z 3 : : : ; r
. . . . .CJC (!l
n : : I I l I l l U WI > - > - u n : :u a : : : : . : : : . : a : : X
guard bands. This is not a make-shift mod. It makes your
video every bit as good as the 4P's plus you have switch
selectable 1, 2 and 3 MHz. CPU clock as well as 300, 600
and 1200 baud for cassette and serial port all crystal
controlled.
Complete Plans - $18.95
or Send in your C1 P to:
Personal & Business Computer Connection
38437 Grand River
Farmington Hills, MI. 48018
Kit - $39.95
and we will install the video mod. for $79.95. Other mods
available ...Add sound: RS-232 port cassette motor con-
trol
SOFTWARE: (With Documentation) For C1, C2, 4P & BP.
Chess 1.9, Backgammon, Excellent care games, Arcadetype games, Utility Programs, Mini Word Processor,
Memory Maps, etc.
Catalog With Free Program (hard copy) and Memory
Map for BASIC in ROM Models ...$1.00
Progressive Computing3336 Avondale Court
Windsor, Ontario, Canada N9E 1X6
(519) 969-2500
NOTE: Any Modification will VOID your 05 1 warranty.
BACLAN would liketo know if you
WANT TO PROCESS DATAON YOUR APPLE?
• if so you should be looking forefficient tools to assist with data
entry, (i.e. building files) and file
handling (i.e. scanning, sorting,
printing and copying files).
and
if you are also looking for economy,
we think you will be pleasantly
surprised by the low price of the
•
BACLAN FILE HELPER
available at your Apple Computer Dealer
in both Applesoft and Integer Basic versions
6 J BACLAN PO B~36
~3m)997-9610 Columbia, MD. 21045
STO CK MA RKET A NA LYS IS PRO GRA MO JI WE E KLY AVER AG E 1 897 -1 980
A NA l IA NA L V SIS I) is a s e t ot BA SIC Prog ra ms w hich e nab les Ihe user top erform a na lyses on the D ow Jone s Ind ustria l w ee kly a ve ra ge data , From 6months 105 years 01u se r s ele ct ed D JI data ca n bepialied o n t he e nt ire s cre enin one 01 5 colors us ing A pp le s' H ig h R es olu tion ca pa bilitie s. Th e D JI data ca nb e t ra ns fo rm e d in to d iff er en t c olo re d g ra p hic r ep re se nt at io ns c all ed t ra ns to rr ns .T he y a re : u se r s pe cilie d m o ving a ve ra ge s: a l ea st s qu ar es li ne a r Ii! ( bes t slraightl ine); l i l ters lor t im e . m a gn it ud e. o r p erce nt ag e chanqes : a nd u se r c re a te d r e l a-
I l nn sh ip s b etw ee n I he 'O JI d at a, a tra ns fo rm . o r a c on st an t u sin g + .- .x .l o pe ra tors .C olore d line s can b e d ra wn b e tween graph ic points. Graphic data va lues ort he ir d a le s 01o cc ur re nc e c an be d isp la yed in te x t on Ihe scre en A ny g raph ortext ca n beoutputted to a use rs printer, Th e G rid S ca le is automatically set toI he ra ng e 01 the gra phs or can be u se r ch ang ed . A s m any colore d g ra ph s as
w ante d ca n b e p lotte d on Ihe scre en a nd cle ared a l a ny lim e. The use r can coderoutines 10op era te o n th e DJlltransform data or crea te his ow n d isk IIle da tab as e. A NA 1 co m ma nd s c a n b e use d w ilh h is routlne s O r d ata b ose . A n Up da lep rog ra m a llow s Ihe use r 1 0 e as ily up da te the D JI file w ith curre nt O JI w eek lyda ta .The A NA l two letter use r com m and s a re : C A • Cal cu la te . n o graph CG ' Clear
G r a p n s , l e av e G ri ds . C K • C he ck in g o ul p ro gra m . k now n o a t a , C O - Color o f nex lg ra ph I re d. g re en , v iole t. w hile . b lu e). C S =C le ar S cre en. D L· D ra w line b etw ee npolnts. FI = Filler data lor lim e . m ag nitud e. or p erce nt ch ang e. FU • Data, trans-form . or consta nt Function w ith +.-.x .l op era lor. GO = G ra ph ic m od e. d is pla ya ll G ra ph D a la o n s cre en . G R - G ra ph d at a to screen, GS = S e t G ri d S c a le . HE· Help .summa ry 01an y commands usaqe. LD = Loa d D ala Irom d isk t ile tra m inp utte dda te 10m em ory . LG = le av e G ra ph s. a ut om a tic G rid re sc aling . L O = Look. selecta ra ng e 01the LD da ta and GR :A II com mands can now be used on lh is range .LS = Least s qu are s line ar I iI 01 th e d ata . M A = Mo vi ng A v e ra g e 01 the d ata . NS e
No S c a le . next g ra ptJ on s cre en d oe s n o! use Gri d S c a le . N T = No T race . P A = Userlmp flmenteo P ri n te r mur ine. TD = T ex t m od e. d is pla y Text Da t a on s creen , 1 1·
T im e n um b e r 10 d at e o r v ice v ers a. T A = T ra ce . T S -Texi S lo p lo r nu m be r 01 inesourp uued 1 0 s cre en w he n in TO . Ul/U2 = Use r 11 2 im p lim e nle d rou tine s. V D =Values 01 Da t a outputted in text, V G = Values 01 Grid : low/h igh/de l la . VT = Values01Transform outputted in text.
A PP LE ® 1 1.48 K . A PP LE S O nR OM C AR D, D IS K II DOS 3.2ANAl D ISK & MA NUA L ... S 49.95
leA residents add 6% sales tax)
GALAXYDEPT. M ilP .O . B O X 2 20 72
SAN D IEGO. C A 921 22
MIGHTY BYTE CONTINUESPrograms lor our Apple (Take15% off List Price)
Bowling S&cr'9!ary1.0:Excellenl program to reduceyour time in maintainingyour bowling league statisllcs. Programwill recalculate and maintain "II In -
dividual andteamrecords.All you doIsenl.er3weekly scores perman.Keeps
subs records and provide" lor blind scores aswe\l. Provides lor hardcopy 10
printer.(48K,Appleso" ROMandDiskreq.)' $24.95
AppleAlley:Animated HI·Ressimulal.ion 01the All American sport of bowling
complele with sountl ..flecls. roilihe ball down the alley and watch the pins
A SOFIWARE GUIDE fo r h ig h q ua lity Ap plic atio nsPrograms for y ou r H om e a nd B usin ess.
N I B B L E IS :A REFERENCE GUIDE to n ew Prog ra mm i ng M eth ods.
N I B B L E IS :A BU YERS G UIDE for m a king purch ase decision s onn ew p rc x lu c ts .
N I B B L E . S :
A CONSTRUCTION PROJECT COOKBOOK for addingfunction and va lue to th e sy stem y ou a lready ow n .
N I B B L E IS :A COMMUNICATIONS CLEARING HOUSE f or u s er s,v end or s, a n d a ss oc ia ti on s .
Each issu e of N IB BLE fea tures at lea st on e s ig nifica nt n ew a pplica tion prog ra m ofcom m e rcia l qua lity . Th e program s in NIBBLE are su rrounded w ith a rtic les w h ich sh owhow to U SE th e prog ram m ing m eth ods in you r OW N prog ram s .
E xa m ples of u pcom i ng a rtic les:
D M odeling and Forecasting Your Business D Bu ild a Tw o-Tape Con troller for $12D A rcade Sh ootin g G a llery -. Save Y our Q uarters! D D a ta B ase M an ag em e ntSy stem I, II , III
nibble
A nd m any m any m ore! NIBBLE w ill litera lly "N ibb le A w ay" a t th e m y steries of you rsy stem to h elp you U SE IT M OR E. In 1980 , th e principa l fea tu red sy stem is th e A pple IT .
Try. N I B B L E
, - - - - - - - - - - - - - - - - - - - - - - ,I nibble II BOX 3 25 Lincoln, M ass. 0 .1773 II I ' l l tr y N I B B L E ! II E nclosed is m y S15 for 8 issues . I
ID ch eck D m oney order II II Name I
Iddress I'-------------------------II City -------------'
The Challenger II has available a useful feature whichallows the storage and retrieval of sequential data fileson cassette using SAVE and LOAD commands in a pro-gram. This can be used to extend the size of your BASIC
programs by permitting DATA to be INPUT from tape asneeded.
Well, I knew it would happen sooner
or later. I came across a program which Iwished to run on my Challenger II but my
8K of memory was not enough to satisfy
the program's appetite.
The desired program used several ar-
rays to store variable values with DATA
statements being used to supply the re-
quired values for the arrays. After dimen-
sioning the arrays and entering all the re-
quired DATA statements, I discovered,
much to my dismay, that these two steps
had consumed nearly the entire 8K. What
to do...?
Alter staring blankly at the CRT-Ior
several minutes wondering what I was go-
ing to do, I remembered readingsomething in my system documentation
about entering data files from the
cassette interface using the INPUT state-
ment. This seemed to be my only hope to
get the program running.
The Challenger II has a useful
feature available which allows you to con-
veniently store and retrieve sequential
data files on cassette using SAVE and
March,1980
LOAD commands as part of a program.
The remainder of this article will describea simple method to make use of this
leature.
The first step is to store the data In a
sequential file on cassette tape. Program
1 shows how this can be done. Program
line 20 allows for setup and start of the
recorder before the data file is recorded.
Line 30 is a programmed SAVE tnstruc-
'tlon which, when executed, turns on the
cassette output such that any ASCII
characters listed or printed after the
'SAVE instruction will be output to the
cassette tape. Lines 40·70 form a loop
which reads data lrom lines 100 and 110,
prints the data on the screen and outputs
the data to the cassette, one variable at atime, each variable being followed by the
PRINT command's carriage return.
Program 1 shows how to use DATA
statements as the data sou rce. Prog ram 1
can be rncdlfled, as shown in Program 2
to load the data variables into an array via
the keyboard and INPUT statement and
then dump the array variables to the
cassette. In Program 2, lines 20·60 input
MICRO -- The 6502 Journal
Richard A. Lary
P.O. Box 234
Kilausa, HI 96754
and store the variables in Ihe array "0";
lines 80·110 create the sequential dataIi Ie on tape as In Program 1. Line 70
i _ PRS4 + 5V at 2A, + 24V at .5A PTC2 and P102. Has on board 5V regulator for ii. .ii wlmtg hardware, cord, etc. .... . . . . .. $50 AIM-65, 4 expansion slots. Routes A&E ~
!romThe Enclosur'8SGroup signals to duplicates on sides $139 ii- with 4K RAM $189 ii
iii ENC1 AIM-65 case wlspace for PRS31PRS4 $45 MEB2 SEA 16TM16K static RAM board takes 2114L ~
iENC1A AIM-65 case wlspace for PRS31PRS4 with regulators and address switches _
~ 6522 I/O chip and programmer for 5V $200 ::iii EPROMS with cables ii
_ PTC1 P·roto Plus™ Prototype card same size From Beta Computer iii:: as KIM-1, MEB1, VIS1 $40 MEB3 32K Dynamic Memory Card wlon board DC to ~
ii VIS1 Video PIUS™ board with 128 char, 128 user DC converters (5Vonly .8Amax) $419-
i char, up to 4K display RAM, light pen and with 16K $349 ~
~ ASCII keyboard interfaces wlcables $245 with OK $279 ~
-i. .-.-.!!--iii
. .i!!-.i. .~
EX CERT, INC. :~ P.O. Box 8600 i~ Higher quantities quoted upon request. Whl'te Bear Lake, MN 55110 -;ii COOfS accepted. !~ Add $5.00 for shipping, insurance and handling. (612) 426-4114 ~ii i Minnesota residents add 4 % sales tax. ii- ~ii -_ ii
, . I I I I I I L I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 I I !
Miscellaneous
-i TPT2 Approved Thermal Paper Tape
5/165' rolls $10
MEM6 6/2114 RAM Chips ......•..... _. . .. $45-i-i-. SYSTEMS
-..; ; ; ;ii; ; ; ; ;ii. .; ; ; ;; ; ; ; ;. ..i
We speclaltze in assembled and tested systems made from the above items. Normally, the price will be the total of theitems, plus $5 for shipping, insurance and handling. Please call or write lor exact prices or if questions arise. Six month
Beginning Bolean: A Brief Introductionto Boolean Algebra for Computerists
It makes no difference if your computer is maxi or micro,if you program in machine code, BASIC or Pascal, i f youdo simple games or complex real-time simulations. In thefinal analysis: "It's All Ones and Zeros". How these onesand zeros are used is the topic of this primer.
Boolean algebra, invented by George
Boole in the early 1800's, is useful in pro-
gramming a microcomputer for logic
design, designing interface circuits, and
underslanding the functions of in-
tegrated circuits. The last point is il-
lustrated by opening the TTL Data Book
and looking for logical expressions. For
examgle, the 7453 is described by Y = =
AB+ D+EF+GH+X which has to be
somewhat of a mystery without any
Boolean background. The name tends to
scare people, but it turns out that there is
a very simple approach to learning
Boolean algebra, namely Boolean
arithmetic. Anyone who can accept that 1
+ 1 = 1, can also learn Boolean. If you're
an electrical engineer or a professional
computer scientist, turn to the next arti-cle; otherwise give it a t ry.
Beginning Boolean
Boolean arithmetic is super-simple:
there are only two numbers, zero and one.
There are only two operations symbolized
by + and .. ' Long division is out, and
there is not a minus sign in sight. Figure 1
summarizes all you need to know about
Ihe + operation which is called "OR"
rather than addition.
"The symbols VcIncY\frequently replace +and " respectively. The dot (.) is
sometimes implied, that is A·B = AB.
March,1980
The OR facts are read "0 or 0 equals
0," not "0 plus 0 equals 0." Mumble thesefacts 10 yourself several times in the
privacy of your own home. That will help
you get a feeling for them. It is important
to relate the OR operation with the circuit
in Figure 1. A and B stand for switches. If
switch A is closed then A = 1; if it is openthen A = O . The same holds for switch B.
Light L is off when L = 0 and it shines
when L = 1. Referring to either the ORtabl e or the OR facts in Figure 1, it is seen
thai if both switches are open we have 0
+ 0 =: .0 so the light is off. Likewise, the
fact that 1 + 0 = 1 means that if switchA is closed, but B is open, then L = 1 sothe light Is on. This should also be ob-vious from the circuit The last two OR
facts are equally obvious to anyone who
has played with switches and light bulbs.
Slipping in a little algebra, unnoticed of
course, the circuit is summarized by the
simple equation:
A + B = = L, (1)
which gives the correct value for L for
each of the four possible combinations of
switch settings. Go back and study the
table and this paragraph again if you
haven't understood.
Before proceeding, a more conven-
tional representation of the OR operation
MICRO -- The 6502 Journal
Dr.Marvin DeJong
Dept. of Mathematics & Physics
The School of the Ozarks
Point Lookout, MO 65726
should be given, and surprisingly enough
it appears in Figure 2. The information in
Figure 2 is no different than in Figure 1,only the form has been changed. Actually
if·8 " " and A· B from the frrst row and thelast row, respectively. Step two then gives
the equation,
7 i : . B + A· B = L, (4)
which is the equation for the clrcuit, It isimportant for you to verify, by substltu-
ting in the various values of A and B given
in Figure 9, that this equation does not intact give the desired values of L
The iinet step in the design is to con-struct a circuit which is equivalent to the
equation (4) . An examination of this equa-
tion indicates that we need two parallel
branches, one containing Ii : in the serieswith"B; the other containing.A series with
B. This circuit is Shown in Figure 9. The
battery and the light have been omilled
for simplicity. Clearly the Circuit could be
constructeo wilh two SPOT switches.
It is important to realize Ihat Ihe
steps we took 10 design this particular
circuit are perfectly general, that is, they
are the same steps one would go throuqn
to design any log.ic circuit. Of course,
with more switches the truth tables and
the equations get more complicated. For
example, with three switches our truth
table would have 8 rows; four switches,
16 rows, and so on. Since this article is
not meant to be an exhaustive (although
you may feel thai way) explanation of
Boolean algebra, we will no t proceed tomore complex sttuations. For those you
migh.t want to pick up a textbook on digi-
tal electronics or computer science. But ifyou made it this far, you shouldn't have
much trouble with the textbooks.
One other design study will illustrate
several points. Suppose we require a
logic 0 signal on a chip select pin when
either 01 two other signals, call them Aand e , are either both logic 0 or both logic1. When A and e have opposite logiclevels our chip select must be 1. This is
clearly an artificial situation which
originated in my mind and not in a corn-
puter interface circuil, but it illustrates a
point. The truth table which fits the
description demanded by the design is
shown in Figure 10. Following the steps
outlined earlier we find that the Boolean
equation which implements the truth
table IS
A.B + A.S·= es. (5)
An examination of the truth table will
Show that it is identical to the EOH table,
and thus we have proved that EOR can be
implemented with DRs and ANOs. A se
cond point worth mentioning is that if A
and 8 were single digit binary numbers,
22:32
B
A B · A
A B GS
0 0 0
0 1 1
1 0 1
0 0 0
A
Figure 10: Truth Table and logic circuit lor A·B + A·B
the value of es is the value 01 the leastsignificant digit in the binary sum of A
and B. Thus equation (5) is also part of an
adding circuit. If A . and Bare ANDEO the
correct value for the "carry" part of the
b.inary addition is also produced. Toge-
ther these circuits form what is a . "half
adder." Figure 10 also gives the logic
symbol lmplernentation of equation (5).
TO BE OR TOB = 1:Some Boolean Theorems
Once a truth table, closure table, or
function table has been constructed for a
particular design problem and the
Boolean equation has been derived using
the steps outlined in the previous section,
then one usually tries to simplify the
equation to minimize the number of in-
tegrated circuits which will be required
for the Circuit. Here is where Boolean
algebra really becomes useful, for it is the
theorems of Boolean algebra which allow
complex looking equations and circuits
to be simplified.
CS
Because Boolean theorems are quite
easy to understand and prove, and
because they look dillerent from the
equations of real number algebra, a few
of the slmple theorems are listed in Table
1. An .interesting property of Boolean
algebra is illustrated by the firsl Iwo col-
umns. Note that column two can be ob-
tained from column one by replacing all
+ signs with' , if you replace all 1's withO 's _ .
II is quite easy and it is good prac-
tice to prove these theorems. They are
proved by the method of exhaustion,
namely all possible values for the variableare tried. For example, the first theorem
can be proved by reasoning that A can be
1 or O . If it is 1, then from the OR table
1+ 1= 1.. If itis 0, then from the OR table1+0= 1. So, for all possible values of A,
1+ A' " 1 and the Iheorem is proved ..AIIthe theorems in the first two columns
may be proved in this manner. Theorems
involving two variable A and B are usually
proved using the four possible values for
1+ A 1 I-A A A + B B + A0 + A '" A O·A '" 0 AoB '" BoAA + A '" A A · A = = A A + B loBA + A ;:: 1 AoA = 0 A·B = A + B
A"B + A·BA + A·B '"
A !"~:g~
A A=AA
~ ! ~ : ~ : ~ ! ~ 6 ~Table 1: Some Basic Theorems from Boolean Algebra
unit has 6 individu ally fil tered sockets . . .• $93.95
"ISOLATOR (150·5). similar to ISO-2 exeopl
unit has 3 socket banks, 9 sockets total .. $76.95*CIRCUIT BREAKER, any modal (add,CB) Add $ 6.00
*CKT BRKR/SWITCH!PILOT any model
(-CBS) .•............ ... . .. A.dd $11.00
.. PHONE ORDERS 1·617-655·1532 ~ •
L£7Electronic Specialists, Inc. -
The purpose of expressing these in hex is
so that you can try to prove the theorems
on your computer, and at the same time
get some experience in performing
logical operations. All of the problems
given earlier can also be solved on your
computer. Theorems three and four in
column three are the famous DEMorgan's theorems with which one can
connect the ANDs and ORs with the
NANDs and NORs of the real world.
To conclude, go back for a minute 10
that Boolean expression in the firstparagraph. Suppose we ask what the
val ueof Y wi.llbe if A and B are both 1 . us-ing what you have just learned, the
answer should be easy. If A and Bare
both 1 the AS (the dots are frequently
omitted in AND operations) is 1. From the
theorem in the first column of the
theorem tablei! is clear that 1 OR
anything isl. Consequently, no matter
what the other variables are, the value
under the inversion or complementation
bar is 1 if A and B are both 1. Inverting the1 gives 0, so the answer is o . Also if X:= 1,then Y "" 0 ; regardless of the states of the
other variables.
171South Main St,eet. Nalick. Mass. 01760Deptcmi
F R E EIU p 1 0 S 1 7 D , in m e rc h a n d is e
• w ith p u rc h a s e o f P E T -C B M ite m ! !!F RE E M E DC I!
P E T 1 6K L J r g eK e yb o a rd $ 995 $ 1 3 0aE T 3 2 K L a r g e K e y b o a r d $1295 $ 1 7 0
P E T 8 K L a rg e K e vb o a rd (N e w ) s 795 $ 1 0 0
p.
E T 2 .0 4 0 .O.UII i s k 1 3 4 3 K I $1295 $ 1 7 0 . •P E T 2 0 2 3 P rin te r ( p re s fe ed ) s 695 $ 7 0 •P E T 2 0 2 2 P rin te r ( t r a c f e e d ) $ 795 $ 1 0 0 . .K IM - 1 $1 5 9 I A ~ d no fo r P o w er . S up p ly ) S V M - l $ 2 0 9 . 0 0A X I O M E X - 8 0 1 P r i n t e r - P E T , . . . . . , . . . . S 4 7 7 . 0 02 1 1 4 L 4 5 0 n s . . . . . , 5 .3 5 24 /4 .95 100 /4 .45
2 7 1 6 E P R O M [ 5 V o l t ) _ , . . . . . . 2 9 . 0 06 5 5 0 R A M [ l o r 8 K P e t ) , . . . . . . . . . . . . . . 1 2 .7 0P E T 4 V o ic e M u s i c S y s te m IK L - 4 M ) '. 3 4 . 5 0A l l B o o k s a n d S o f tw a r e 1 5 % O F FL e e d ex V id e o 1 0 0 1 2 " M D n i lo r , . . . . . . . . . . 1 1 9 . 0 0
I hope that you had some fun with
this weird arithmetic. Perhaps your mind
got bent out of shape as an added
feature. But my main hope is that some of
the mystery in those words "Boolean
Algebra" has disappeared. I'll leave you
with a homework problem. Draw the logic
diagram 10 Implement a full-adder. then
expand it to handle a-bit numbers. Final-
Iy, implement it with software on your
8·bit machine, and check your answer us-
ing the ADO instruction. Have some fun
and get some books on digital electronics
and/or computer science and dig Into this
stuff.
Bibliography
Digital Principals and Applications,
Malvino, A.P.. and Leach, D.P., McGraw-
Hill, 1975, New York.
Introduction to Computer ScienceScheid, F., Schaum's Outline Series,
McGraw·Hill, 1970, New York.
The Bugbook V, Rony, Peter R, Larsen,David G., and Titus, Jonathan A., E&L In-
struments, Inc., Derby, Connecticut, 1977.
3 M " S c o t c h " 8 " D is k s . . . . 1 0 /3 1 . 0 03 M " S c o t c h " 5 " D is k s , , \ . I0 / 3 1 . 5 0V e r b a t im 5 " D is k s . . ~ \ . . " . . 1 0 / 2 6 .5 0D i s k S i o r a g e P a g e s . . . . . . 1 01 3.9 5
IItapes guaranteed) Premium quaHty, high output lownoise in 5 screw housinq with tabels: AGFA PE 611
STANDARD FEATURES• single key cursor control• automatic word overflow• character, word and line insertion• forward and backward scrolling• automatic on screen tabbing• single key for entering "the"• auto paragraph indentation• character, word and line deletion
• ditto key• multiple text windows
• block copy, save and delete• advanced file handling• global (multi-file) search and replace• on screen math and column totals• column decimal alignment• chapter relative page numbering• complete printer tab control• line centering• superscripting and subscripting
• displays UPPER and lower caseon the screen with Dan Paymar'sLower Case Adapter
FAST EDITING
Super-Text was designed by a professional writerfor simple, efficient operation. A full floatingcursor and multiple text screens facilitate editingone section of text while referencing another.Super-Text's advanced features actually make iteasier to operate, allowing you to concentrate onwriting rather than remembering complicatedkey sequences.
FLOATING POINT CALCULATORA built in 15 digit calculator performs on-screencalculations, column totals and verifies numericdata in statistical documents.
EXCLUSIVE AUTOLINKEasily link an unlimited number of on-line fileson one disk or from disk to disk. Autolink allowsyou to search or print all on-line files with a singlecommand. Typical files of items that can be storedin this way include personne1 files, prospect files,maintenance records, training records andmedical histories.
TheProfessionalWordProcessorfor the Apple II
and the Apple II plus
THE LEADER IN QUALITY SOFTWARE
ADVANCED FILE HANDLING
Single key filemanipulation and complete blockoperations allow the user to Quickly piece togetherstored paragraphs and phrases. Text files arelisted in a directory with a corresponding indexfor fast and accurate text retrieval.
PRINTER CONTROLSSuper-Text is compatible with any printer thatinterfaces with an Apple. Print single or multiplecopies of your text files or link files and they willbe automatically printed in the specified order.User defined control characters can activate mostspecial printer functions.
MODULAR DESIGNThis is a modularly designed system with theflexibility for meeting your future word processingneeds. The first add-on module will be a formletter generator for matching mailing lists withSuper-Text form letters. The form letter modulewill be available in the first quarter of 1980.
SUPERTEXT, requires 48K ($99.95)Available TODAY at Computer Stores
nationwide. Dealer inquiries welcome. For moreinformation write:
MUSE SOFTWARE 330 N. Charles Street Baltimore, MD 21201 (301) 659-7212
Whenever you key in a program in machine code, there issome doubt as to whether or not it has been entered cor-rectly. One minor error is all it takes to ruin a program. Atechnique and program is presented to help overcome
this problem on any 6502 computer.
I decided to write this program for
selfish reasons. My hope is thaI
everybody who transfers or writes pro-
grams for distribution will use it.The pur-pose of the program is to compute a six-
teen bit checksum by adding up all the
bytes in a program. This really isn't atotally new idea. Most methods of
transferring programs or data external to
a CPU use some sort of checksum
routine. Even parity is really a one bit
checksum. There is one major method of
program transler which makes almost no
use 01 checksums. That method is
listings published in magazines. One of
the reasons is probably that noone has
published a simple, general program to
compute a checksum.
ThiS program was written and tested
on a SYM-1, but was designed to be as
machine independent as possible. It
should run on almost any 6502 system.
There are only two monitor routines used,
both of which are probably available in
most monitors. The routine called OUT-
BYT outputs the contents of the 'A'
register as two HEX digits. Just in case
this routine isn't readily available on your
system, I have also included a version of
one at the end of the program. OUTCHR
is a routine that outputs the contents of
'A' as a character; and unless your are us-ing the HEX output routine, it is only used
to output-a space as a separator. The pro-
March, 1980
gram does not assume that any registers
are saved or restored by either monitor
routine. It is completely relocatable (as is
HEXOUTj, and only uses four bytes of
page zero memory. If you want to, you
could even put It into an EPROM. The
work area lor the two byte checksum ac-cumulator is obtained from the stack to
avoid any more page zero requirements.
The theory and method of operation
is simple, The starting address of the pro-
gram to be summed is placed at locations
$00 and $01 (low order first as usual). The
ending address is placed at locations $02
and $03, and the program is started. The
program will output an intermediate
checksum after the end of each page of
the summed program (l.e., each lime the
high order byte of the current address
changes). This intermediate value would
be useful in narrowing down the address
of where a mistake lies. For a long pro-
gram there might be a few of these in-
termediate sums; but then, that is also
when they would be most helpful.
Remember they still only narrow it down
to 256 bytes (or less for the first and lastvalues).
The program starts by zeroing the
Checksum accumulator by pushing two
zero bytes onto the stack. The stack
register then points to the next available
stack location, which is actually $100
plus the stack register value in absolute
address terms. ~The checksum ac-
MICRO -- The 6502 Journal
Nicholas Vrtis
5863 Pinetree SE
Kentwood, MI 49508
cumulator is therefore at locations $101
and $102 plus the stack register value,
since the stack register starts at $1FF
and works toward $100 each time a value
is pushed onto the stack. Transferring the
stack register to the 'X' register lets us
add directly to these two bytes. It wouldbe possible to accomplish the same thing
0300:0310:0320:0330:0340:0350:0360:0370:0380:0390:0400:0410:0420:0430:0440:0450:0460:0470:0480:0490:0500:0510:I D ~HEXOUT
S YM MONI T OR E NT R Y P OINT S U S E DOUTBY T * $82FA OU TP U T ·A · A S 2 H E X D I G I T SOUTCHR * $8A 47 OU TP U T °A · A S A S CI I
00490049 Classified Ads
OR G $000000 0
P ROG RA M ST ART ING A DD RE SS LOWP ROG RA M S TA RT ING A DD RE SS H IG HP ROG RA M E ND ING A DD RE SS LOWP ROG RA M E ND ING A DD RE SS H IG H
$0 0$0 0$0 0$0 0
0000 000001 000002 000003 00
S TR T A D " SYM/KIM Appendix $4.25postpaid,(see MICRO, 19:68 for description).First bk, o f KIM: $10. Combo Ap-pen. &, 1st bk: $13'.50.SYM-1 Hard-ware Theory Manual supplements,SYM-1 Ref. Manual $6:00. Orderfrom:
Robert A . PeckP.O. Box 2231Sunnyvale, CA 94087
OSI C1P,8K RAM; Setchell·Carlsonmnnitor; G-Erecorder; many games·and utilities on tape. $4.25 pp UPS.From:
G. taverickRoute 1Big Lake, MN 55309(612)263-3829
EN D A D
0004 A 9 000006 4 80007 48
P GM S U M L D A I M $00PHA
PHA
Z E R O CH ECKS UM ON TH E ST A CK
0008 B A0009 AO 00OOOB 1 8oooc HI 00O O O E 7 D 02 01001 1 9 D 02 01001 4 90 030016 F E 01 01
M OVE S T ACK P OI NT E R T O I ND E X$00 M AKE S U RE Y R E G I S Z E R O
A D D I N T SXL DY I MCLCL D A I YA DCXS T A X
ST RT A D G E T A P ROG R A M B YTE$0102 A D D TO CH E CKS U M$0102NOCARY$0101
B CCINCX
001 9 E 6 00001 B D O 1 5001 D E 6 01OOUI I D 02 01
0022 4 80023 B D 01 010026 20 F A 820029 68002A 20 F A 820020 A9 20OOl F 20 47 8A
NOCA RY I NCB NEINC
ST RT A D A D VA NCE TO NE XT P ROG RA M BYT ECH KE ND G O CH E CK F OR E ND OF P ROG RA MST RT A D +01 OTH E RW I SE BU M P T O NE X T P A G E$01 02 O UT P UT I NT j; ;R ME D IA TECH E CKS UM A LS O
SA VE LOW ORD E R ON ST A CK
Oolor Graphics for OSI C1P or
Sugerboard II. Details on modifica-tions enable operation in severalcolor graphic modes. Easy installa-tion. Includ£;ls colored·vldeo![larflefor demo, and checkout that runson 4K RAM systems. L,ow·costhardware not included. Sena $8.65to:
LD A X
P H ALD A X $01 01 T O A VOI D SA VING XJ S R OUT B YT OUT P UT H I G H OR D E R P A R TPLA
J S R OU T BYT T H E N LOW OR D E RL D A I M $20 S P A CEJ SR OUT CH R A ND A SP A CE A S SE P A R A TOR
0032 A5 010034 C5 030036 D O 040038 A 5 00003A C5 02003C 90 CA003E FO C8
ST RT A D +01 CH E CK I F T O E ND OF P R O G R A ME ND A D +01CHKNDAS T R T A DEN D A DA D D IN L E SS M E A NS M OR E TO GO
A D D I N
CH KE ND L DACM PliNE
LD ACM P
CH KND A B CCB E Q
Tom Hoffman873 Dorset DriveKnoxville, TN @7919
1U0 percent PET disk orientedMacro Assembler/Text Editor(MAE) Development software. In,cludes a new version of our
ASSMfTED wrltten specifically forIRe 32K new ROM PET and 2040disk drive. Features macros, condl-tional and interactive assembly,and includes a relocating loaderprogram. $169.95 includes disketteand manual. Send $1.00 for details.. Eastern- House Software3239 Linda DriveWinston-Salem, NC 27106
0040 680041 20 F A 820044 680045 20 F A 820048 00
P LAJ SRP LAJ SRB R K
E LSE G E T H I G H OR D E R OF CH E CKS U MOUT B YT E ND NE E D T O P R E SE RVE TH ING S
OUTBY TCA USE WE A RE D ONE
M I CRO-WA RE A SSE MBLE R 6~X X-l .0 P AGE 01
0010:
0020: 02000030: 0200 480040: 0201 4AOO~O: 0202 4 A
H E X OUT ORG $0200P H AL SllALSRALSRALSRACMP I M $OA CHE CK I F )9
B CC H E XOTA WI LL SE T CA RRY I F )=A D CI M $0 6 PL US 7 WI LL OFFSE T TO G E T A SCI I 'A'
H EX OT A A DCI M $3 0J SR DUTCH R NOW OUTP UT THE FI RST HE X CH A RA CTE RP LA G E T OR IG INA L B ACKANDI M $OF ONLY WANT 4 LOW ORDE R BITS NOWCM PI M $01 1. SA M.E CONVE RT TO ASCIIBCC H EX Q TBADCIM $0 &
H EX OT B A DCI M $3 0J M P OUTCH R LE T TH I S G UY DO TH E RE TURN
RELOCATABLESAVE E X TRA COP Y FOR SE COND H ALFSH IFT H IG H 4 BI TS TO l . O W ORD ER
ATTENTION SYM·1 OWNERS:Modify your SYM to have 8K of2114 RAM on board with theIN?AAY piggyback HAM board.Bare board plus instructions is$5,00 (plus a self addressed,stamped envelope per board. Thenew W7AAY RAE·'1, b0ard plugsInto and extends RO M socket R 3 sothat the two chip version of RAEonly needs one SYM socket. Com·pletely assembled, with instr.uc-lions for $10.00 postpaid in theUSA. Order from;
face, it can readily be adapted for manyother applications. Basically, it works as
follows:
Press STart: Tape recorder starts and
tape is read. When seven segment
display reads 0000 A9, then
Fast Tape Retrieval
Although I use the routine primarily for
data retrieval for the TVT-6 video inter-
face, it can readily be adapted for many
other applications. Basically, it works as
follows:
Press STart: Tape recorder starts and
tape is read. When seven segment
display, reads 0000 A9, then
Press 'GO: Tape recorder stops and the
information from tape is displayed on a
monitor. For next display file, again
Press STart, and so forth.
This provides a two button data retrievalsystem. The files on tape consist of ASCII
data loaded into 0200 to 03FF. This, of
course, can vary for other applications
and could contain any type of data which
would not interfere with the program
located at the boll om of page zero. A
small gap between files is convenient.
Hardware Interface: Consists of the
relay circuit shown in figure 1. PBO Is us-
ed as the control port. The tape recorder
must be set in the PLAY position.
Software Interface: Several items
must be inserted memory in order to bring
up the system. First, If used with the
TVT·6, the SCAN program must be loaded
beginning at 1780. Next, 17F9 must con-
tain 00. This will allow continual reading
of files without regard to 1 0 numbers.Finally, the NMI vector must be entered:
17FA DB and 17FB 00
The program utilizes the fact that on a
proper tape read, the monitor returns at
location 0000 XX. Now, 0000 is a memory
location· a location which can be pro-
grammed like any other .. I use this loca-
tlon to begin the lape/stop/display pro-
gram. The ST button provides an
NMI which points to the tape/start/read
program.
0000 ,~9 Dl
0002 40 03 170005 80 03 170008 4C ."D 17
$01$1703
$1703S C A N
T U R N T A P E O F F
B Y T O G G L I N G C O N T R O L B I T
J U M P T O S O M E P R O G R A M
ODOBA 9 01 S T L D A H - 1 $01 S f I NT E R R U P T0000 4D 03 17 E O R $1703 T U R N T A P E O N0010 8D 03 17 S T A $1703 B Y T O G G L I N G C O N T R O L B I T0013 4C 73 18 J ~ 1 P tI8?3 J U M P T O T A P E R E A D
17FA D B ; $08 P O I N T T O 000817FB 00 ; $00 F O R S f K E Y
MICRO -- The 6502 Journal
RelayREMOTE
ON/OFF
GO L D A I ME O RS T AJ M P
on Cassette
Ronald Kushnier
3108 Addison Court
Comwells Heights, PA 19020
ASK the DOCTOR is presented as an opportunity for you to get information about the AIM, SYM, or KIM out to your fellow
cornputerists. If you have a major article, a good program, a discussion of various features, or whatever, that is long
enough for an article, then by all means, submit it as an article and get paid! If, however, you have some short comments,
ideas, facts, warnings, etc. that you feel others will be interested in, but which are too short for an entire article, then send
them to: ASK the DOCTOR, P.O. Box 6502, Chelmsford, MA 01824. You will not get paid for these "tidbits", but you will gel
reviewed several issues ~go? Well HOE wentand fixed up all Ihe problem areas that I
mentlcnec m the review and then took It
several steps furl her The HOE assembler ,s
an honest 10 goodness two-pass assemblerwhich Can assemble anywhere in memory us-
Ing multiple source lileslrom the disc. The as'sernbter IS an optional part 01 the system.
If you're the ~ind of person (as I ami who
enioys having the abi li ty ro custornize, modi'
Iy. and expand everylhmg you cwn - you'll
eruoy rne svstem expansion abillties FODShas to offer. Adding a new command IS as
simple as wrIting the program. givi ng It aumque tMree 'leitar name and saving it to disc.Whenever you type those three letters Ihe
system willl"sl go Ihrough Its ow n cam rn a ndtable. see thai lis not Ihere and then go aut
HERE'S WHAT ONE USER HAS TO SAY.REPRINTED BY PERMISSION FROM THE 6502 USER NOTES - ISSUE NO. 14
. . . . .-
inc.
PLAINSMAN MICROSYSTEMSBox 1712
Auburn, Ala, 36830800·633·8724
•
and read rne disc directory lose" il ii can lind
il. If il's on the disc itwill read it Inand executei l. Simple r ight? I 've added several commands
10my system and REALLY apprecia te havingthis abillty, Some of Ihe things I've added
include a disassembler, an expanded ver-sion of X IM i lhe extended machine language
monitortrom Pyra mid Datal. Hypertape, and a
number of system ulililies which make lile
easier. By the way. 10gel back to the system.all you need to do is execute a BRK lnstruc-
tlon.t-iDE also provides a pIece of sonware Ihallets you lntertace Mrcrosolt 9 dig.t BASIC to
their disc system. The software allows you to
load Ihe BAStC interpreter ltselt from else as
well as savmq and loading BASIC Programs 10and Irom rne disc. This particular version of
the software doesn't allow tor saving BASIC
data but HDE mentioned thallhis ability may
be possible wllh a future veraron, .
The first Ihlng I 0(1 wilh a-new piece 01 sou-ware after I get used to using ill$ Iry (0blow il
Up. I did manage 10 lind a weak spot or two InIhe very tt rst version of FODS (a pre- release
version) but the later, release version hasbeen very lighl
The standard sof tware that is included wllh
the system consists of Ie disc driver son-ware, the system text editor and Ihe BASICsoftware interface. Several command exten-
sions may also be included. All the necessary
stulf like a power supoly. Ihe KI M·4 mterlacecard, and all cables and connectors are in·
eluded. II took me about 45 minutes 10 getthings up and running Ihe lirst lime I put rhe
system together
Adrnlttedly. adUBI lull sue disc svstsm fromHOE ISp robably beyond the mea ns 01 mosthobbYISIS but i f you oryour compa ny Is took-Ing lor a dvnamue 6502 developmenl svs-
<em. I would recommend Ihls one, I've usedII,,, Rockwell System 65 while I was ," MOS
and leel thai dollar for dollar. leature forfealure. the HOE System comes out on lap.
The only place I he HOE system taus snortwhen Slacked up next io Ihe System 65 is In
tne area ot packaqmq. Althispoinl, Ihere Is no
cabinet lor the disc drtv savailable tromHOE.
So tar. I've gOI nothing but good Ihings 10say about HOE and their product s, Everylhlng
I've received 'rom them has been i(Jdustfial
oualitv. That Includes the" documentation
and product sunport.I'm very Impressed withwhat I 've seen lrom this company so tar and
qulle enthusiastic over what my KIM has
become since acqumnq the disc svsrern and
lis associated software.ERIC
THANK YOU MR. REHNKE!
HOE PRODUCTS - BUILT TO BE USED WITH CONFIDENCE
AVAILABLE DIRECT OR FROM THESE FINE DEALERS:
PRODUCT REVIEW of Ihe HOE DtSC SyS-
TEM by Ihe editor.
A number 01 you have asked lor details
about Ihe HDE lull size disc system.
The system is based around the SYKES B"drive wl th the 6502 based Intelligent control-
ler.
This drive is solt sectored. IBM compatible.
and single density which leis you store about
a quarter megabyte of data on a disc.The system software, cal led FODS (Fi le Ori·
ented Disc System). manages sequentlauiteson the disc much the same way files are writ·ten on magnetic tape - one after another,
When a lile is deleted. Irom a sequentiallymanaged file system, the space that the file
occupied Is not Immediately reallocated. as in
some disc operating systems. As it turns out.
this can be an advantage as wen as a dlsad-vanlage since deleted files on the FODS sys-
tem can be recovered after the hie hasbaendeleted. {ThiS has saved my sanuv more thanoncel) Of course w~en you want 10 recoversome Of the disc space taken up by a numberof Ihese deleted files, you can simply , .. -pack
or compress I he disc and all Ihe active lileswill be shined down until there are no deleted
files hanging around using trp space,
FODS has this ability to repack a disc.
When saving and toading in FODS vou work
WIth named Illes. nOI track and sector data or
LD. bytes. This makes life a lot easier. I 've
seen some disc systems where you have tospecify track and sector mto and/orl.D bytes,
What a pain that can be'
I fyou lust want rosave asource file temper-arily. you can do thai on what's known as
"scratch· pads" There are two of these on adisc, "scratch-pad A'· and "scratch-pad B",
each al l nese temporary disc l iles ca nhold upto 16K or If "B" is not used. "A" can hold one
lile up 1032K I~ length, The only f iles IMal canbe ternporn "'y saved Onscratch pad are lilesIhal have been built using I he system text
editor
Being a dyed on the wool assemblv Ian·guage programmer, I really appreciate Ihe
FODS text editor' Trns line oriented editor is
upwards compatible wilh Ihe MOS/ARESCOeditor but includes about evervthrnq you
could ask lor in a line editor There is a lull andsemt-autornatrc lone numb rm q feature, linescan be edited while they are being entered or
recalled and edited later. strings can be 1 0'
cated and substuuted. Ihe line numbers can
be resequenced. I he lile size can be lound,
the hex address 01a Une Can be known andcomments can be appended to an assemblyfil alter II has been Iound correct, OoPS' I
While you probably are not going to use your $180 KIM toreplace your $18 digital clock, a lot can be learned aboutproper use of the KIM and 6502 by building a clock as anexercise. This example Includes use of the IRQ interrupt,driving the display, and calculating time. The program isintentionally NOT optimized, providing a challange forthe reader.
When I first laid eyes on KIM,
something inside my head screamed out
at me. It said, "That six digit display was
just made to be a clock display." Not be-
ing the type 01 person who likes getting
yelled at, I decided to look into the idea.
The idea may seem trivial or worth·
less, but the design of a clock program isboth challenging and educational. When I
first started this project I had only owned
my KIM·1 slightly more than a month, and
I had. nol made use of some of the KIM's
features (such as the interval timer and
interrupt capabi.lities). J had read the MOS
Technology manuals carefully, but some
things had to be learned the hard way
-llke thetact that decimal mode does not
effec!incremenls and decrements, PB7
of the 6530·03 must be wired to IRQ on
the 6502 by the user, and how to use the
KIM's displays. I learned through ax-perience.
A clock program Is not totally
useless, either. Outside of being a good
program for keeping the processor busy,
it also could be valuable when run with
other programs. If, for instance, you had
your KIM connected to an A ID converter,the clock program would enable you to
take readings at specified times during
the day. Or, When you are going to be
away Irom home, your microprocessor
could turn lights, radios,etc. on and of!
as a deterrent to burglary. And, il you had
to scrape together your last dollar to buy
March,1980
your KIM, and the old alarm clock jus!
croaked, you can build an alarm to hang
on your micro with parts from your tool
box (seeKIM·l manual, page 57). You
would then be the proud owner of themost intelligent alarm Clock on the block.
A project such as this is an excel'lent
way to become familiar with the features
of your microprocessor. And, althoughthere are several obstacles lobe over-
come, none are too difficult to surmount,
given a little thought. The following
discussion, intended for the KIM-1 could
also serve as aguide for the deve.lopment
of a clock program on a similar system.
The first diflicul.ty encountered in
designing a clock program is a parallel
processing problem: how to scan a
display (or execute some other process)
while at the same time, count the
microseconds as they whiz by. Parallel
processing on the KIM·l can be achieved
by the use 01 the 6502's interrupt
capabilities. And since one of our pro-
cesses is a simple counting mechanism,
we can use the interval timer on the
6530-03 as our second "processor". The
next two problems revolve around the in-
terval timer.
The KIM's interval timer is only
capable 01 timing intervals of 0.261102
seconds or less (with al MHz crystal).
Problem number two results because 01
tnts. We need to simulate, through soft-
ware, an interval timer able to time inter-
MICRO -- The 6502 Journal
Ronald A. Guesl
12153 Melody Drive, 204
Denver,C080234
vats of up to one second. This can be ac-complished by writing a value(s) into theinterval timer until a certain number 01 in-
terrupts has occurred, and then updating
the time. But, it is not quite that simple.
Which brings us to problem number
three. We want to be asettloient as possl-
ble, which means we want to interrupt
normal processing as little as cossible.Thus, as large a value as possible should
be written into the timer. The problem, the
most difficult 01 all, is; what value(s) to
write where, and how many times. The
discussion must now become a little
more detailed. Keep.ing elflclency in
mind, we want to delay the maximum
value between interrupts as many limes
as possible, without exceeding one se-
cond. This means that we Should wrile a
$.FF into the + 1024 location three times.
This wi IIgive a delay of (3·255 " 024)).Is,.or0.216640 seconds less than one
0 0 1 · 0 :0020:0 0 3 0 :0040:0050:0060:0070:0 0 8 0 : 00200090:0100: 00200110: 002001 20: 0020Ol~O: 002001 0:0150: 0020 480160: 0021 8A01 70: 002?- 480180: O O Z E 4 ~190: 0020200:
0210:0220:0230:0240: 0025 A I) O D0250: 0027 C 9 030260: 0029 10 D A0270:0280: 002B A 9 FF0290: 002D 80 O F 170300:0 3 1 0 : 0030 36 0 1 )
0320: 0032 4G 80 00O i 3 0 :0340:03130:0360: 0035 DO 080370: 0037 A 9 D 30380: 0 0 3 9 8D O F 170390: 003C 4 c ]0 000400:0410:0420:0430': 003F C9 04a ll 1 1O ! 0041 DO 080450: 0043 A9 440460: 004S 8D O D 17047 0 : 00 4 4c 3 0 0 00480:0490:
004E F8')00:0510: 004C 1 1 . 5 DC01)20: 004E 1 8
O')~O: 004!" 69 01
05 0: OJS' 85 DC0550: 005") C9 600')60: O e l , ) 5 30 220 5 7 0 : 00'57 A9 000580: 0059 85 O Co s g O :00;..0:0610:;)620: 005E A5 080630: 0051) 69 0006liO: 005F 85 D B0650: 0061 3A
March,1980
brewers. (I hope no one is going to run
their clock program for a solid year.)
Hopefully, the information information in
this article, and the program. itself, will be
as useful to others as it has been to me.
Good Luck!!
Listing 1
INTE RRUP T SERVICE ROUTINS TO RUN A RE AL-T~M EGLOCK ON A H OS T ECH NOL OG Y KIM-1.
WRI TTEN BY : RONALD A GUEST.
COPYRIG HT 1976 BY RONALN A. G UEST
O H G $0020
10 . O D D . · .OOOCOOOBOOOA
N U M : D L ' i *SEGNDS *M I N U r S *BOURS *
P H ATX AP H ATYAPHA
D E L A Y : D E T E R t " . l I N E DY VALUE I N N U M D L Y .I F D ELAY IS < 3 T H E N DELAY 255 * 1024
SAVE REG ISTE RS ON STACK
LD A NUMDLYCM PI M $03B P L D E L A Y F
MAXDLY L D A I M $F'FSTA $1(OF
INCDLY INC NUMDLY INCREMENT COUNT AND G O RSSTOREJM P RE STOR
IF NUM DLY < > 3 BRANCH TO ONRTST
D ELA I F BN3 Oi'mrST
~ ¥ f : M 1 ~ 1 o FJM P .LNCDLY
IF = 3 TH EN DELAY 21 1*1024
I F ' NUMDLY > 4 THEN O N E S S C O N J H A S ELAPSED
ONE TST CM P:::MBNELDAIMSTAJ M ?
$04ONESEC$44~170:J...NCDLY
IF = 4 THEN ~ELAY 68*8
O N E SECOND HA S SLAP SE n, SO, INC STORED TIMEONESEC SE D USE D ECIM AL M ATH.
LD A SECNDS SE T SECONDS BYTSCLCA J CIM $01 A D D D E CI M A L 1 .
STA SECNDSCMP H'j $60 IF < 60 THEN FnaSHSDBIlI RESETL D A : H $ 0 0 Z E R O S E C O N D SS I l l . SECNDS
I~CREMENT MINUTES
LD A M INUTS GE T MINUTES EYTEA D e I M $ 0 0 A D D I N C A R R Y FROM P R E V : O U S C O M P A R ES I A ! ' 1 I N U I SNOP FOR TIMING
007 0: 02000080:0090: 020001 00: 02000110: 02000120:0130: 0200 A9 010140: 0202 85 O D
0150: 0204 A 9 F'F'0160: 0206 8D OF , " ',0170: 0209 580180: 020A A9 7F0190: 020C 8D 41 1 70200: 020F A2 090210: 0211 AO 000220:0230:0240:0250:0260: 0213 CO 04027 0: 021 5 10 1"80280:0290: 0217 B9 OA 000300: 021A 4A0310: 021B 4A0320: 021C 4 A0330: 021D 1 I A0340: 021E 20 48 IF0350:0360: 0221 89 O A 000370: 0224 29 O F0380: 0226 20 48 IF0390: 0229 A 9 0004QO: 022B 8D 40 1 70410: 0,228 C8042C:0430: 0221" 10 E 2
22:48
Listing 1 continued
IF < 60 , FINISH~DM?IM $60EMI RESETLDAIM $00STA MINurs
ZERO MINUTSS
INCREME NT HOURS
LDA HOURSCLC THI S TIM E CLEA R CARRY (FOR TI MI NG )A DCIH $01STA HOURSCMP~M $25 WOULD BE 13 FOR 1 2 HOUR CLOCKBt-lI RESETLDAIM $01STA HOURS
RESET T I M ER AND NUMDLY
R ES ET LDAIM $00STA NUMDL'iJ MP MAXDLY
RE STORE R EG ISTE RS
RESTOR PLA
TAYPLATA XPLAHTI
TH IS P ROGRAM D ISPLAYS THE H OURS, MINUTES, AND SECOND S
ORG $0200
NUMDLY II
CONVD *TIME *
$OOOD$1F48$OOOA
LDAIH $01 INITALIZE INTE RRU PT COUNTERSTA NUM:)LY
LDAIM $FF :NITALIZS D:VI DE BY 1024 COURTERSTA $1 701"eLI ENABLE INTERRUPTSLDA~.M·17F.. INITALIZE D ISPLAY PORTSI A 1 741LDXIM 09 X REG POINTS TO DIGIT TO BE DISP LAYE DLDY:;:M 00 Y RSG :;:S:LND:<:XO TIME BYTE TO BE D ISPLAYSD
THIS IS THE START O F THE LOOPTH E P RS CS ED ING CODE I S :LNITALIZATION
LOOP CPYIM $04 IF Y RSG IS > = 4 THEN J UM P BACK TO STARTBP L START
START
LDAYLSRALSRALSRALSRAJSR
TIME G ET BYTE OF TI ME ?OINTED TO BY Y REGGET H 7 G H ORDER 4 BITS
OUTPUT 4 BITS TO POSITION POINTEDRE G
CONVDTO BY X
LDAY TnEsANDIM $OFJ SH CONVDLD AI M $00STA $1740INY
GET LOW ORDER 4 BITSOUTPUTTURN OFF DISPLAY
BPL
:iNCREMENT Y REGX REG IS INCREMENTED BY CONVD.LOO? BRANCH A U o J A YS TO LOOP
heaters and more can be put under your computer's control,
Direct plug-In arid software for most computers.
Inctudes a clock, calendar, digital inputs and dig-ital outpurs.
Circle Ihe reader service number, call or write lor our latest catalog.
CONNECTICUT microCOMPUTER, Inc.1$0 POCONO ROAD
BROOKFIELD, CONNECTICUT 06804
TEL (203) 775·9659 TWX: 710·456·0052
Missing MICROInformation?
MICROis devoted exclusively to the 6502. Inaddi-tion, it is aimed at useful, reference typematerial,not just "fun and games". Each month MICROpublishes application notes, hardware and soft-ware tutorials, a continuing bibliography, soft-ware catalog, and so forth. Since MICROcontainslots of reference material and many useful pro-grams, most readerswant to get the entire collec-tion of MICRO. MICROgrew very rapidly, and itvery quickly became impracticle to reprint backissues for new subscribers. In order to make theolder material available, two collections of'reprints havebeenpublished.
A limited number of back issues are still availablefor number 7 through current.,
The BESTof MICROVolume 1 contains all of thesignificant material from the first six issues ofMICRO,covering October/November 1977 throughAugust/September 1978. This book form is' 176pages long, plus five removeablereference cards.The material is organized by microcomputer andalmost everyarticle is included. Only the ads havebeenomitted. Surface $7_00
Air Mail $10_00
The BESTof MICROVolume 2 covers the secondsix issues, from October/November 1978 throughMay 1979. Organized by microcomputer, thisvolume is 224 pages. Surface $9.00
Air Mail $13.00
Use the convenient Order Form on Page 5 toplace your order.
II your house is like mine, there Is nevera pencil aroundwhen you need it, and when a message is left taped tothe refrig, nobodyevernotices. Put yourmessageson theAPPLE and they will not be missed! This "Message
Center" can be a starting point for other automaticdisplay systems.
This program was born from a dual
need: I wanted to find a daytime use formy new computer, and Iwanted to get myfamily involved In some small way with
the APPLE so that they would lose that
feeling of awe and "separation" that Iseeamong the families of many com-
puterists.
As I've had my APPLE for less than
two months, the program would have to
be fairly simple, but I really wanted to in-corporate something creative. A tall order
for a neophyte programmer who only
learned the command LOAD two months
ago, but I'm happy with the results and Ihope that others will find some value in
the ideas incorporated.
A few comments and explanations:
1. If you should happen to get an
error message or hit control C, just type in
GOTO 0 before listing so you'll have a full
page to list without hitting reset.
2. Now you can type in GOTO 90
and the program should recorn-
mence without losing your
message.
March, 1980
3. Temporary register K$ retains
the last message even though it
has been erased from the
registers G$ through H$. So you
can get it repeated by requesting
it again even though the nameno longer shows on the video
screen.
4. This program has been set up to
hold from 1 to 6 messages in a
total of about 10K of RAM but
can be modified to hold almost
as mony more as you like if you
have adaquate memory. You will
need to modify number 90 to
allow an extra line or two to
display names (POKE 35,4 or35,5); number 100 to move thedisplay down an equal amount
(POKE 34,4 or 34,5); line number
145 10 check the extra registers
for status; lines 150 through 160
to add more z "name strings";170 through 180 to add more
"message strings"; and lines
190 through 200 tho erase the
strings, once used.
The Marquis type of scrolling
MICRO -- The 6502 Journal
William McLean
1642 Edgewater Lane
Camarillo, CA 93010
message is also useful for an
nouncemenlS for club meetings, a
attention-getting continuous repta,displays at shows or store windows. YOL
can limit the number of times the
message is displayed by deleting line 460
and assigning R in a 300 a value equal to
the number of repeats that you want.
At home, we leave the video screen
turned off and the APPLE lion. Each
member of the family, upon seeing the
computer "on" light, checks for
messages by turning on the video
momentarily and checking the names at
the top of the screen.
One last hint: if you leave more thanone message lor the same person, you
must change the "name" slightly. (I sug·
gest a simple addition 01 a number, as in"John", "John2", "John3", etc.) If you
should inadvertantly enter two messages
to r the same name, you will erase themboth after only seeing one of them.
•• ~ t!l Cl u..Q we ..J Z• ~Z~~ ~z~ ~Z 0_. •• -q: ! I I - ~ <t ~ <I: If)H
_ . > - Z 0 Z u : : z : . . . . . I -..J w~._,Z w~._, W . .- 1 < I:..JI- ...J W..J..J ('I.. !- ..-.Z ..-.Z ..-.~~x A Z~ AZ A ~o $WA .w tA-u..u..W WI - W. Z W~ ou.....J OW..J oou..
Z o..-...J o..-...J O~u..o,,-, 0 W H ~ zu..,,-, ZW ZOW Z~ ~ Z. Z$ Z$ Z~I ([ ..... ~ -q:..... _([._,zU : : : • • ( [ u, -q :JJ <I: a z ([ U < I:w t- w a U a < I: w-q:o ""'OA""'O W._, t!l ~zzu ..-1 ZZ ..-1 ZI
o ..... Z .....Z ~::J: ..... ..-1 11 ..-1 ([Z w-q:._,. W< J :I I WI-oon Z([..-. Z< I : zt- Z OOH ..-. V..J V..J V..JU : : : vw. vw .vw VW v.v m W ..-1 Z ..-1 . .....WO . . J . . . . .u ..J.......J ..... ..J a W~~"-' W..-. t!l -I-t-..-. ..-...-...-. E OO([ .CA..J .OAt!l ~OAm $ A • A ll . A . ~Z. mW:I :Z t!l Z l .L.ZH ..... :I :C Z t!l C u..O we OWU WLU..J I -q:..-. C!l ([-zu..< I:-t!l ....,z..-.w ....,z..-.._,z..-...... ~::J:'_' I ...J~ .0 .W""'.WI I ([ • ...J ([.C!l < r . ( [ I- t- .....Z ...... OI .....u : : : Z w z a z o z; tA-Z Z .. ~ ".2 W< I:< l:Z ot-z u
> - ..J w ..... W ..........w ............-1 00W ..... OUl <I :WA """ WA"'" WA"'"
W <!...J O...J W..J ...J ...J ...J t- ::.:;....J .....I...J ....... Jt! lU : : : :£: ....2 Z /\ Z :I : r». Z .....Ii ..\ ~ (; 1w : : • . . . . . . Z ...... .......([0 ~ W([ WI- W ~W< I : tA-WA •• WA .Woou_oOu.. . . .J . u . . . . - . . . .J u....-....Ju.......... . . . . . . . ... ZZ:£: u..t!l..J :I :u..u.....J l .L.W...J00 ~ZH wH ...... H . H .WH .H.H H H t!l .......H u.. ......W
e- ._ . . _ . . . . . . . . . . . . C"l H i- li II W H . . . . . . W a Zi-WJM
••If) ..-. ([2 W II II t- ::t: W z.-.lJ.I E
a:I: to If) iJJ 3:H : : : . : : : II II Z 3: :£: II -<ItA-..J....W Nl) '" u : : : : 0 II II W W . ([ l.L. >-. . . .'" ._,N 0 Ull l . . a, II II I- t! l Z • . . . . . ._, . . . . . . . ::E. . . . .0 If) 1.1 ') ,If,- ._, ~ W II II Z < I: !- W Cl
u .. <'-iN 0$ C!l •• •• W II u : : : II <!: . 00 ~ i t - - , ZZ .-. . . . J'-'
_ .. c (!) •• ([ o:£: II W II 1-3 . . . . . U l c, . . . . . .Z W <I $ . . .J. . . . .
~* . . cs O.;j Ul . . . J <t' 0 II l- II Z W Z 0 W . . . . . . . . . . . i u<t0 ut!l . . . . . . ~ ct' :£:Ul<t . .. :1: Z II H:=l ::E H u, :I: • .,-t' ........,
<t' . . . . . If) ....... . . OWl: M W II ;;.::0 r- :I: I-. . . . . . - - . . If) u " ) C"l:I: ::EU:::: $M· U 1 1 !l..>- < I :. . 1 . 11 e n . ,_ . C l\ Z ~
t"'l iI") 1 1 1 N ill C"l . . 0I ct' II . . toH ~ Z iJj c r .l " l ' l N ('-I .,_.N Z ,.. iJjN W ··0 !J..!I.J ..-I z~ .......J
ct'. _ _
. . . . . . . .._ , WC"li- , ; f l o : : : . : : : . . . . t! l a l ! ) : : > w .. .. W tA -W ( , o J ~ - < A - u·~ : : : . : : . . z •• C!l 0l.i1 <I: 1- <l:H 0(.:1 _~IJJ > -: : : . : : : .. w!.1. . U u . . o·Ii)H ....... ~ (Y) I- rn Z::C cn w t-<t . . . . . . . . . . . .. . Q u : : :o I.n . . . . "!.1.. ~ M w: : : . $ z e n HU m W 0(.11 - ! I T .. .. z u : : :~C"l -.. -.. . . . . . . . . a, u, •• U J HI W U:::H ww C!lm c o I.!.. z < t o
1 11 I I" ) If) . .. .. ~ •• w . . . ".0 :::.::::~I ::E . Ii.. I ::Ei:c: W H .-.w (.0
•• W lJ,,) N ~J1u1 o~••:: : o ! ; P . - .. O~ II 3: X N:£: -I;!!-.. .J~ . .- . . . . " ( ' . . I . . . . . . N !Jl 1;" ) II "0 OWNIl. II W 3: . . . Z ! ..!l"-
..-I . .P
. . . . . . .
•. . . . . . . ('..j iO N~!.Jl.L.·"(,,) II : : E : II W . . . . ii $W . . . . I-
+N c, '* W $ . . . . . . . NM til" " " • • II 0 1 1 i-~ ZN t--UJ _J= :t: 0 Z
t:t:: (Y) < : I : . . . . . . . .~'* .. W: : : r . . ! l a lJ J (Y) ! . J . I II : : : c II zz x~· ... U1 z z . . . . . .H~
o, w '*OJjo wz· ..::,:: ..£: II II HH ([ ('I.. u . . . . + ..:I iJJ<I $ e : : :
l J.I::E III If) l: W -e- : : : . : : : ~ ::>H.!f.-·0::-0 Ii II W : : :W : : ::I: u . . z u. . _J _J 0o,. . . . . ... . : : . - : : : "'HNN H . . . :1: II Oct' ZI- G !l.(\') :t: II II ~Il. IL UHH H t R - 1 . ! . . . . . . . . . . . . . .
-.0-.0 1-0 0 0 c, Hri+ ri+ U l u . . ([
e : : : w : : : H 0 0 .....0 ...-1Q ..-I I l , , )
UI 0 N Z~W 0 ~H«U ~ ~ W~Z ~W«~~ UH~o ZU~« A m~~wo ~I~ ~ W oWIW~U~· <t t!l C!:C"lu::o..OOXO«~ ~ ~~W~~ ~W·
t!lWW U CO oom~ ~WEOOZ ~ 1 ... X. (") ( , < 1 <:I: (J):t: . . . . i oWH~Z ~ ~ 0 W03·H o..W~ZOHQ:::'::~~ .. U :: :t:WWi.J.. ZZ u::~~X CO EUHW· ~<tHW:::o.. WI -..01- Wr.O...JZI- ·wIt!l W ~ ~ Z (")X E < tW < tOH OO~ Uwmw«o - ~w au:: U~ ~~Er::u~H·· ~ : : z : J:('!)N Z>-ol!.....JII~ ::CEo~o o~O~~<to..NH~er::U Z O NW o-- I •• 0 L.c:-.oo a I l ..i..O
I--wmo...·ZI - 0"-W Z W ..• lilU::WUC"l~er:: <r ~ ..::) o..~NU to~..-l
lilW ~OU) toi-l<I:0:::lCt:1-0..<t":::tW 0
u : : . . "woooo~~
XI-'W a·Ot!lllo..
Ii I- Z <tI l X I - - < t ( J ) ~IIWZ ( J ) .I I Z H W W ; L :I I ; L : u: t: oI I • • 0.. < t: I . i ..
~0~ U•• 0.. W• L 1 . . . . . . t:l •• ~ If
W~ U· O· W.. I . i.. . . u. :J:. II0)-1-- ,... .. - I(
...J<l:U + + + + + + II~...J'<C" II- II- II· I I - II- I I · IIOO..X.;,AO -i:fT - tA o ... . . .. t ! ' > -;;'I-.1I3:V1W I U~ O-lfl- jJ.li;A- LL..-I:i'I- Ui;A- !l:tA- IIH U!l.O II W 111J.. II C,!)i ::c II II
W01.l1. flU 110 1I;uJ 1I.f.J... lit:.!) III II(.!) E • tA o • ~ • •
<t <:I:+i;A-ZU~ZC~ZW.Zi.J_.Z(.!).Z:::0 " 1 z -~UJ ~ J.Jj yw :::.::: : : : c w ""X W(J ) .:CZ:CZ:CZ ~z ~z :CZW W W'Zi-WZI-WZI-WZI--WZi-WZI-W Wl::>~ W :cW :J:W ~w :t:w IW ~. c . : : l
~I-II I.~I.~~. I-I.~I. I-:C.~ «~:J: ~, 1-, i-' 1 -, ~, 1-, ~ toU z. • • - 1 ; 1 \ - • • .Z 00H a H , tl't II ,. II , • II ,. il ,. II -:l $ !I -:l H II ttlI I- •• , , -:l , , , U : : : II :L
$..... 3: i . . u $. - 1 ; 1 \ - II $ II • II • II ..,. II • II !l.. II<t Z z 0 '" W!l..' II U II 0 II W Ii LL.. n (.!) 1I:r: II W
W /'" W 0- :::.::~ ... • • ill' • - 1 ; 1 \ - tl't.. n :t:II ~ ~ l-H ~" • I . J . . U • I . i .. Cl . \ A o u,W tl't 1..1..J.. - ! f l o u, (.!) • u, :c II a
~ O~...J~ UH OH WH LL..H t!lH IH WII~• tA- 1--:1.. u, u . . u, I . J . . ~ !..I ..1:11W u, U L i .. . • 0 Z ::) LL.. H I. i. . •• H I . J .. • • H LL..•• H LL..•• H u, •• H a IIi . J . . ! HUH <r (.!) H 0 ", ........H H • H .... H • H. -H._ .J: II
For the Professional Programmer andThe Serious Amateur Software Hobbyist... and for anyone who needs to automate dedicated industrial measurementand control applications.
The Macro TeA. designed for use with the Commodore PET to create aremarkable synergism: a complete, integrated software developmentsystem for the 6502... the only 6502 system not requiring a separate diskdrive. With over 60 commands for your complete machine languageprogramming .
... a lightning fast ... fast ... fast. .••• _..•
..•. .machine langua9,eassembler with
true macro capabilities. Assemble16K source text in less than tenseconds! A Single name indentifies awhole body of lines. Macro andconditional assembly support. Auto-matic line numbering. Labels up toten characters long; 1016 differentlabels.
Install permanently without tools and in less time than it takes to load anequivalent sized assembler I text editor program from tape. No tape loadingever. And no occupying of RAM memory space: the MacroTeA puts 10K ofexecutable machine language code in ROM(98~~ to BFFF) and 2K in RAM( 9 ~ ~ t J to 97FF) .
... a super powerful text editor. 26 commands with string search and replacecapability. Manuscript feature. Test loading and storage on tape or disks.Supports tape drives, disks, CRT, printers and keyboard .
.. .an enhanced monitor with 11powerful commands for program debuggingand final polishing .
...with a warm-start button, on a 12 inch cable. Reset the PET but not the1792 bytes of object code in the Macro TeA RAM memory .
...a completely solid state firmware system ...all in ROM and RAM. No'tapes to load. The system is available from the time you turn on your PET tothe time you shut it off.
15chips on asingle high quality printed circuit board; interfaces with PET'sparallel address and data bus or with Skyles Memory Adapter. Acomprehensive 170 page manual is included
Truly, there is simply no other system of this magnitude at anywhere nearth is price. 5395.00 *
{With any Skyles Memory Expansion System, 5375.00
'California reskients: please add 6% or 6.5% sales tax as reouired
ISA, MASTERCHARGE ORDERS CALL (800) 538-3083 (except California residents)
CALIFORNIA ORDERS PLEASE CALL (408) 257·9140
1
231 E South Whisman Road
Skyles Electric Works Mountain View,CA 94041(408)735-7891
ded later ~ this is a one line assembler),Mnemonic (extended mnemonic set, see
below), Operand (decimal, ofcourse, or
label added later), then Comments (also
added later). Since my output device is anIBM selectric that is in no way connected
to my PET, I take the liberty of dressing
up my listings at my leisure.
Now. to the program.
Since our intention is 10 divert the in-
terrupt vector to our own purposes. the
routine at 8000 ($1F40) does just that. ASYS8000 done in immediate mode will
cause the vector to be changed from its
normal value to a value that will cause the
PET to execute a routine located at 8016($1F50) every time an interrupt occu rs.This same routine witt reverse that vector.
This way, you only need to remember onenumber to set or reset the vector. This
routine works like this: the instruction SEI
causes the interrupt disable flag 10 be
set, preventing the cpu from recognizing
any interrupts. This is done to prevent an
interrupt from occurinq while we are half
through altering the vector. There is no
telling where the thing would go if we
don't take this precaution! The LOY VEC·
TORT 1 instruction gets a byte of the cur-rent vector so we can determine whether
it is the normal or the altered vector. Then
we JSR to the SET subroutine which setsthe normal vector. I f the vector was
already set to normal, then we have
wasted. a few microseconds, but J can
wait. Then we compare the Y register to
see if the vector was normal. If Y equals
230 ($E6) then we JSR to the RESET
subroutine and alter it. Else the BNENOTSET causes execution to resume at
8014 ($1F4E), the CLI clears the interrupt
flag,. enabling interrupts once again, andexits via the RTS back to BASIC.
Now that we have altered the vector,
22;58
the PET will execute the routine located
at 8016 ($1F50) every time an interrupt oc-
curs, Which happens sixty times a se-
cond. Let's examine this routine.
First we jump to a subroutine
located at 62250 ($F32A) which checks
Ihe keyboard and returns a zeroin the ac-cumulator il the STOP key is pressed.
Upon return lrom that subroutine, we
check the accumulator for zero, BEQ
STOPPD. If the accumulator is zero, wejump to STOPPD, which is our recovery
routine. If the accumulator is not zero we
jump to CONINT, which is where the in·terrupt would normally have gone.
The instruction at 8024 ($1F58) loads
8 into the X register, then uses this as acounter and displacement to pull 8 bytesoff the stack and store them in memorybeginning at location 8165 ($1FE5) ..We
pull 8 bytes off the stack instead of 6
because we assume at least one level ofsubroutine call beyond the interrupt
After all, we had to SYS or USA into our
machine-language program, didn't we?
We don', want the slack to get too clut-teredo This isn't going to be a complete
answer, but it will help. More will be saidabout this later.
Once we have stripped and saved
the stack contents, we need to restore it.The routine beginning at 8033 ($ 1 F61)
does this. First, we load and stack the
high byte and low bytes of the BASIC
warrn-start routine. Then we recall the
original value of the status register and
stack it. This is important only because of
the interrupt flag ..Then we stull the stack
with three bytes of anything just to lill it
out. After all, the interrupt handling
routine thinks it has stored the ac-
cumulator and the X and Y registers onthe stack; it will expect them to be there.
Since we are not returning to the place
where the interrupt occurred, we don't
care what those bytes are, so let's just
push the status byte onto the stack three
more times.
Now thai we have cleaned the stack
and provided for a fake return from the ln -
terrupt, how about d.i.splaying the lntor-
mation thus recovered? Sounds easy,
yes? Not so.
If we are to display our hard-won ln-
formation, we can either write our own
display routines or use the routines soconveniently provided for in ROM. Beingnaturally lazy, I much prefer to use the
routines already written. But this is a pro-
blem. When I first wrote this program I
got strange results that I eventually trac-
ed to the fact that the interrupt flag was
being Cleared somewhere, permitting the
routine to be interrupted if I don'tremove my finger from the STOP button
within one sixtieth of a second. Idiscovered that at location 58816 ($E5CO)
in ROM there was a Cl.llnsrructlon. Since
MICRO -- The 6502 Joumal
this is the print routine, I needed to find a
way 10 use it without allowing the inter-rupt to screw things up. It was necessary
to exit from our routine, return to BASIC,
and then display our information. How todo it? I chose to use a TRICK!! Follow
closely ...
The PET has a keyboard .buffer that
collects keystrokes until the operatingsystem can service them. This gives the
effect of the PET "remembering"keystrokes even if you enter them while
your program is doing something other
than looking for INPUTs or GETs. If you
load this .buffer while in a machine
language program and then exit toBASIC, the PET will suddenly "see" acommand in its key.boardbuffer and pro"
ceed to execute it.
After we recreale the stack and set
the normal interrupt vector (JSA. SET)
then we load tne keyboard buffer with the
command "SYS8066cr". The. "cr" is a car"riage return. Theinstruclion at 8049
($lF71) loads 9 Into the X register. This
number, which is the count lor the buffer,is then stored in location 525 ($0200).
Then the command is retrieved .byte by
byte from location 8128 ($1FCO) and plac-ed in the keyboard butter, When that is
finished, the PET jumps to CONINT, the
normal interrupt routine.
What follows is this: the PET up.
dates the clock register, then jumps 10
the interrupt routine which restores the
registers and "returns" to the BASIC
warm-start routine. The prompt "READY."
is printed, and control returns to BASIC.
BASIC checks the keyboard buffer, sees
the command "SYS8066", prints it and
executes it. Control is now gi'ven to our
di splay routi ne. Roundabout 'way 01 dol ngit, no?
The display routine begins at toea-non 8066 ($1 F82). First we load the ac-
cumulator and Y register with the address
of our header line. Then we JSA to theprint routine in AOM at 51751 ($CA27).
After that we loadthe accumulator and X
register with Ihe bytes we stored thatrepresent the .interrupted return address,
and JSR to the number display routine in
AOM at 56479 ($OC9F). This routinedisplays numoers tn decimal, so if you
wish them disp.layed in hex you will have
to convert them yourself. Next, a loop is
set up that retrieves each byte anddisplays them - first the status byte,
then the accumulator, and the X and Y re -gisters ~ all in decimal. At the end of all
this wonderful activity, the routine exits
through the START which alters the lnter-
rupt vector so we can do the whole th.ingover again.
key this program in exactly as shown itwill be easier to find errors later if you
miss-key a number.
OK. Are you still with me? Then key
the program into your PET exactly as
shown but do not RUN!! When finished,
SAVE the program on tape. Then replace
line 36 with:
36 FOR X = 8000 TO 8159: READ A:
P", P + X' A:NEXT X:PRINT P
Now RUN the program. If the numberprinted is 146725222, then the odds are
very good that you made no mistakes.
You may now LOAD and RUN the original
proqram, If, on the other hand, your
number did not match the above number.
then recheck your keypunching, correct
your error, and try again.
NOTE: I would like 10 take this oppor-
tunity to encourage all programmers who
write programs involving many DATA
statements to Include a verify routine. It
need not be a permanent part of the pro-
gram, but should be designed to give the
hobbyist some solid evidence that his ef-
forts were accurate.
Now you have LOADed and RUN theprogram. Notice that line 15 protects the
last page of an 8K PET from interferenceby BASIC. This routine will reside safely
here while you write your new machlne-
language program, debug it, and test it. Iput this program in high memory becauseit is a machine-language debugging aid
and most machine-language routines for
the PET are located in the second
cassette tape buffer area 826-1023
($033A-$03FF) for convenience. If you
wish to relocate it, be very sure you
understand how it works.
March,1980
Notice we have not yet activated this
routine. First LOAD your machine-language program if you have it on tape,or your assembler if you are just starting.
Then execute a SYS8000. This activates
the Reset routine. From now on,whenever you hit the STOP key, the
machine will halt and display the address
where it was interrupted plus the register
contents, There are a couple of excep-
tions which will be noted below.
OK. The Reset routine is activated,you have entered your machine-language
program into the second cassette buffer,
and executed a SYS826. Somehow the ex·
pected results do not materialize and the
new program does not return control to
BASIC. Now what? Hit the STOP key!
Suddenly the PET comes back to life and
prints:
ADDR ST AC XR YR
835 34 129 66 202
Eurekal Somewhere around location835 there was an error in your program.
The status register contained 34, theaccumulator had 129 in it, the x registerhad 66 and -the Y register was holding a202. Were they supposed to have these
values? Perhaps a register was initialized
wrong or a relative branch was figured
wrong. At least you know where to begin
looking. Isn't It wonderful?
If the STOP key is pressed during
normal command mode, you will likely
get:
ADDR ST AC XR YR
580133401 3
READY.
Notice that the numbers do not alignperfectly under the header. They are
printed without regard to the size of the
number but are printed in the orderdepicted by the header, separated by
blanks. Also, while it happens too fast to
see, what actually printed was:
READY.
SYS8066ADDR ST AC XR YR
580133401 3
READY.
The SYS8066 and the header areboth prefaced with an up-cursor
character, so that they are printed on top
of each other. This makes less scrolling,
in case the screen contents were impor-
tant.
Now for the exceptions to the rules.
Since it is impossible to know how deeply
nested in subroutines the PET was when
the interrupt occurred we cannot properly
clean the stack. After a while (approx-
MICRO ~~ The 6502 Journal
imately 23 times) pressing the STOP keywill cause a ?OUT OF MEMORY ERROR
remark to appear. The Reset routine will
be deactivated and it will be necessary toSYS8000 again. Nothing to worry about;
the PET corrected the stack before it
printed the error message. Another
message that will deactivate the Reset
routine is ?ILLEGAL QUANTITY ERROR.
Same response: SYS8000.
The command SYS8000 will activatethe Reset routine if it was not already ac-tivated. I f the Reset routine is active,
SYS8000 will turn it off. Be sure it is on
when you are executing your new
machine-language program. And be sure
it is off whenever you want to use the
tape recorder to LOAD or SAVE a pro-gram or read or write data files. The
cassette routines will not work if the in-
terrupt vector has been altered. If indoubt as to the current status 01 the
Reset routine, simply hit the STOP key. If
nothing happens, the routine is off. If you
get a register display, the routine is on.
One final exception to the rule. This
routine is excellent if you get caught in aninfinite loop or you just want to exit froma machine-language program early. Itwon't protect you from all invalid op
codes. Some invalid op codes act like
NOPs or do some mysterious, undefinedfunction. These are OK. There are some
op codes, however, that will cause the
PET to lock up in spite of our marvelous
Reset routine. Hex 04 will do this for ex-
ample. I suspect that these obstinate op
codes do something to affect the inter-
rupt flag, thus disabling our routine. Until
Commodore see fit 10 provide a non-
maskable interrupt, I guess we will haveto live with this incovenience. But even
so, it gi~es us a place to start looking,doesn'tr!? If your PET locks up in spite of
the Rese! routine, look for invalid op
codes.
There you are. I hope this en-
courages more machine-language pro-
gramming for the PET. Let's get full
power out of our computers!
For your free information
regarding the extended
mnemonic set that was referenc-
ed above, send a self-addressedand stamped envelope to:
tL. LL u, U- t.L u, LL LL, . . . . . , . . . . . . r - t - - l , . . . . . . . . . . ' I " " " " I " " " 1 " " " " I
III IIIoW '-'
'" '"'l .q
~ . s
C><
U
'". .,VI
~~,
; , : " " . ; ; : " " . ; ; : " " . ; ; : . ; ; : " " " "o:t:,t::I,-;I:o:::r:::::r:::::t::::'::t:(.I"). . . . J Q . . ~ O " . . . J Q , . . b L O " ' O " ' r ' " ] o
'"~. .,
'". .,'"'",u
'"" "ChOO·CI"I eo o eoco COCO 0£;(~~~~Q"o;; f"~~{"o.j
, . . . . " " . M ' ¢ ~ r - - . , c : ; : ( W U O I , J . J1 O ~ \ . O I i . O \ . O . . . . o I . O ; ; . o 1 . . 0 1 o . O'LL L . L . . . L.L u.. lL.. u, ,u., L . L . . . u, L . L . . .
. . . . . . r = I ~ . . . " . . . . j . . . - - l; - - - 4 r _ 1 r - 1 ~. . . - - I
r_IM'-OO"IUOILL......r-, r-r-,r-, ........-,, u . . u . . L . L . . .L l . . . L . & . . . 1 . J . .. 1 - J , . . . .o = I , . . - . , . . j r _ l . . . . . . . . - l , ; - . - l r _ l. . . . . . .
>-_j
c,
" "Q
" "w" ",_j
C
-:::(1.-!,...,t.b,U l . L . l . . L . . . . . LI...Ur_Ir-IO
L . I : . . . ~ r - - - r - c o ! , . , ! " , . O O O . : ; ; t N r n Dr=lUNw!,.!,JiJ)OWWoc::(Ll.Jo
00"1-0 t::lw CO U U 0::;. Qw,mC;(~N ~o::( N<COO ~ ULL (CI o e t :
N"Q r . . o C7IIU !.LC'J q- r--..:( L.)lJ..J r-IC O C O C O C O O O O O ( J ' j . r r . c n . O ' ! I C h O " l c ; : (L.r.. .1.J ..1-L.L.L..,L.L..I . .!- . .l .b lL.l.L.l.J . . . . . .LL.LI ...LI .. .r=I.---I.----I r_I r-I ........._I .........! " "" " I . . .. . .. . . r 1 " " " " " ' 1 ' . . . . - ' 1
9 . REW'I •••••• fW REWI ••••••••I REM"I ••••••••15 PClKE135, 31 :PDKEI~;4, 6415 DATA 12B,172,26,2,32,174.31,19217 DfHI'I 280,208,3,.82,185,31,88,9618 DATR 32~42,248.240,3.76,133.23019 DATA 1,,2,8,104, 157. ,228,31,202,20820 D.ATA 249,169, j95., 72,169,139,72.,17321 DATA 233, ='1,72,72.72.· 72.32, J 7 422 nATA31, J 62,9,142,13,2,189,19123 DATA 31,157,14.2,202.208,247,7624 DATA 133, 23m, 160.31. 169,202,32, 8S<
25 nRTR 202~173~231~31,174~232,,31~3226 DATA 159.221.161,0.140,237,3),17227 DATA 237,31,192,4.240.162,19.0,23328 DATA 31 J 16SlJ 0; 32, 1 :59, 228~2'38~ 2 : = · q29 DRTR 31,76,151,31,234~234~169,23e30 DATA 162.133.141,26.2.142,25,231 DATA 96.169.31,162,80,76.178,3132 DATA 145..83~89, sa; 56,48~ 54~,5433 DATR13~234..145~32~,,65~5:)68; 8234 DATA 32,83.84,::;:;2,65,67,32,8835 DATA 82,82.89,82,13.0.234.23436 FOR:<=8i !J00T08159 ,REAlIA: POKEiX, A; NEXT
* * * RESET * * *I -J R I TTEN B ' t :
GAR't' J. BUl.LARD4808 S . ELWOODTULSA, OKLAHOMA
?410?
37383 9 PRHlT":"rot!lS'tS801210 TO TURN ON [IR OFF."4121PRHH"ll!! ll"l NOTE: THIS R[!UlINE MUST BE TURNED OF F II"
41 P RI NT""I F CA S SE TT E I /O I S U SE D."
READ'T'.
Listing 2
GREAT
PET
SOFTWARE"Precise, humanized', well documented an excellentvalue" are the applauds now being given to UnitedSoftware's line of software. These are sophisticatedprog rams desi 9ned 10 meellhe most stri ngent needs ofindividuals and business professionals. Every packageis fully documented and includes easy to understandoperator instructions.
D.ATABASE MANAGEMENT SYSTEM - A comprehensive, interactive
system like those run on rnalntramest Six modules comprising 42K of
programming altow you to; create. edit. delete. display, print, sort,
merge, etc .. etc. - databases 01 UP to 10,000 records. Printer routines
automatically generate reports and labels on demand. 60 pages ot
concise documentation are included. Requirements ··16-32K PET and
2040 Dual Disk (printer optional) .... Cost $125
ACCOUNTS RECEIVABLElPAYABLE - A c omplete, yet slrn pie to use
accounting system designed with the small businessman in mind. The
United .Software system generates and tracks purchase orders and
invoices a11the way th rough posting "controlted" accounts payable and
accou n ts re ce iv aoi e s u b sys tern s.
Keyed Random Access file methods makes data access almost
instantaneous. The low-cost solution for the first time computer user
with up to 500 active accounts Requiremen ts - 32K PET, Dual Disk. any
SO·column printer .... Cost $175
CASH RECEtPTS & 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 01 expense. Sortlnq.summary. and audit trails make it easy to post 10 general ledger. This
system also categorizes incoming receipts. Uses KRAM file access
• Versions for PET, APPLE IT, SYM; KIMand ATAR I (1st quarter 1980)
• Written entirely in machine language• Occupies 8K of memory starting at $2000 -Apple version with disk occupies just over9K
• Macro and conditional assembly• 36 error codes, 26 commands, 22 pseudo ops• Labels up to 10 characters• Auto line numbering and renumber com-mand
• String search and string search and replace• Copy, move, delete, load, save, and appendcommands
Cassette aad Manual $49.95(including U. S. postage]
Eastern House Software
3239 Linda Dr. Winswn-Sal.em, N. C. 27106
TRAP
65 For PET, APPLE, SYM, OSl, etc.Any 1 mhz 6502!
Prevents from "banging up" via executionof unimplemented opcodes! Causes yourmonitor to display location of bad op code!Our computers have stopped crashing!Debugging easier!Easy to install - plugs into 6502's socket.
TRAP 65 is currently being used to insure that
there are no bad opcodes in programs beforesubmittal for ROM masks!
Weare using TRAP 65 in experiments onextending the 6502's instruction set - PHX,PHY,INCD.
$149.95 (Add $4.00 postage, $10.00 foreign)
Eastern House Software
3239 Linda Dr. Winston· Salem, N. C. 27106
PET
RABBIT
Load, Save. Verify, Execute
8 K in 38 seconds versus
PETs 2 Minute 45 seconds,
plus more!
High-speed Cassette Routines work with 8K, 16K, or 32Knew ROM PETs which have the new Commodore cassettedeck (like the external version which sells for $95.00).Note; If you have a new ROM PET with the old stylelift-top deck. everything but" the high-speed cassetteroutines will work.
- Auto repeat of any key held down, toggle characterset.
- RAM Memory Test, convert #'s to hex and decimal.
12Rabbit Commands
Note; Rabbit is 2K of machine code at $1800 for 8K PETS.$3000 or $3800 for 16K PETS, or $7000 or $7800 for 32KPETS. (Specify one of the 5 versions.)
Cassette and Manual- $29.95 (Add $5.00 for foreign)
Eastern House Software
3239 Linda Dr. Winston-Salem, N ..C. 27106
Finally, MAE - A PET
DISK-Based MACROASSEMBLER/TEXTEDITOR Works with 32K PET
- Works with 2040 Disk. and can drive 2022/2023Printer. and/or RS232/20 ma Device thru User Port.
- 100% Disk Based. 100% Machine Language.- Macros. Conditional Assembly. and a new feature we
developed called Interactive Assembly.- Coexists with Basic, Auto character repeat, Sorted
Error Codes.- Creates relocatable object code on disk.- Assemble from Memory or Disk.
- String search, search and replace. and inter-line edit.- Auto line II-ing, move. copy, delete, renumber.- Labels up to 31 characters - user specifies length.- Includes extention to PET monitor (disassemble,
trace. etc.I, Library of PET ROM locations. Relocat-ing Loader, plus more.
Manual, Diskette, U. S. postage - $169.95(Requires completion of License Agreement -
fSAM~OS An integrated set of rourlnes for the creation and msnlputetlon of
indexed f iles . Retrieve records sequentla Ilyby keV_value- or partial keyvalue . F iles never have to be reorgan i: tl ld .
Roquires : Di5k, Aoplesott 132K 110M or48K RAM I
$50
P8ASIC~DS A sophlstlcsted preprocessor for structured BASIC, Gain the power
Of P'ASCALrU'ke logic structures al a fraction of The COS1, Use allregul ,ar BASIC sta tements p lus 14commands .and9 new stu temen-tsf structures fWHILE. UNTil. CASE, stc.) Works W I I , h INTEGER 01
APPlESOFT programs,
Requiros: Disk, Appl esof t I32K ROM or48K R~,MI
$35
UTR~DS An Apple-sohul il ily package thai includes improved error huerrupt
handling (rel.urn t o the st at emen t fol lowing Ihe one in er ro r) , a rout ine
thai selectlvelv c lears a rray variables [fOru lDIM or cha in ing] • .an irue r-
face routine thai pro'Vid9s OJ ' (30SUB' fae il lty from machine tan9uag~
10AppJesoftand an advanced formailing routine for printing num~rie
val ue'S. Wor ks wit h neg.atiw values: inserts commas in value, et c.
Alsoconta ins a IOi!Jd~(o puI the rou l ines in to RAM with you r pr09ram.
ReQuires: Disk. Applf ,!$o ft (ROM ot RAM)
$35
(Texas res idents add 5% tax)
Oecislon Systems
P_O, Box 1J006
Denton, TX 16203
. .Apple 111$a reg is ter ed t ra demark o f Ihe App le Compu ter CO.
MUSICAL COMPUTER I AND II
LearnHow to ReadMusic!
Music lessons taught you in your home or at a studio
cost from $7 each half-hour and up! Now, available to
you Apple" owners, is an opportunity for you to have
your private music teacher in the comfort of your own
home.
Written by a M.A. educator with over 20 years 01 music
experience, this two·program cassette provides an alter-
native to music education!
These programs, utilizing high resolution graphics and a
16KApple II,will make music learning fun and enjoyable
• PLUG C OMPA lIBlE WIT H K IM I S Y M I A IM-li5_MA Y B E C ONN EC ie O TO PE TU SI ~G A D AP TO RCABLE. S S 4 4 - E BUS e D G E CONNECTOR
• USES ,S V ONLY ( SUPPL IE D F RO M HOS TCOMPUTER BUS ). 4 W AT TS MAXIMUM.
• BO AR D A DD RES SA BLE IN 4K BYTE BLO CKSW HI CH C AN S E IN OE PE NVE NTL Y P LA CE D O N
4 K B YT E BOU N D AR I E S A N V W H E RE I N A I J. 4 KB YTE A D DR ES S S PA CE ,
• ASSEMBLED AND TESTED BOARDS AREGUARANTEED FO R ONE Y E A R . AN DPUR C H AS E P RI CE IS FU l L Y REFU NVABlE IFBO AR D IS R ETUR NE D UND AMA GE D WITHIN140AYS_
• 8US BUFFE RED W IT H 1 LS TTL LO AD .• 200NS EC 41 16 R AMS ,
• F UL L D O CU M E NT A TIO N
KIM /SYM/A IM-65-32K EXPANDABLERAMDYNAMIC RAM WITH ON BOARD TRANSPARANT REFRESH
THAT IS COMPATIBLE WITH KIM/SYM/A IM-65AND OTHER 6502 BASED MICROCOMPUTERS .
A SSE MBLED I { W)TH 32K RAM __ • , •••• , ••• $ 41 9_DO
TESTED WITH 16K RAM ••••• , _ . , ••• , • 1349.00
. WITHOUT RA M CHIPS . __ $279.00
HARD TO GE T P AR TS O Nl Y (NO RA M C HI PS )_ . 1 10 90 0
BAAE BOARD AND MANUAL. _ _ •.. " .. "." $49.00
P E T IN T E R F A C E K IT $ 4 9 .0 0C O N M ~ C T S THE A B O V E 32K E X P A N D A 8 L E RA M TO A 4K OR 8K P E T _
C ONTA INS E XPA NS IO N INTE RfA CE C AB lE . S OA RD STANDOFFS,
POW £R SUPP LY MO ll iF IC A TI O N K IT A ND COMP LE TE INSTRUCTIONS_
1 i5 02 . 6 4 K B yn R A! li N D C O N T RO l LE R S ET
MA K(s4K BYTE MEMO RV FO R YO UR 5800 O R5502. rHIS CH IP SE T I NC LUDE S :• :l2 M5Kj1 16.3 1 6KX 1.2oo NSEC RAMS_• 1 M CJ4l!1 l MEMO Ry C ONTRO LLER .
• 'MC3242A MEMORY ADDRESSM UL f IP LE X r. R A ND C OUN TE R,
• D ATA A ND A PPLIC ATIO N S HEETS _ PA BTS
TE STE D A ND G UA RA NTt £D
$ 32 5, 00 PER S ET
15 K J I D Y NA M IC R IM
THE MK4116·3 IS A 16,J:e4 SI T H IGH S PE EDNMOS, D Y N A M I C RAM. T H E Y ARE EQUIVALENT
T O T HE MOSTEK, T E X A S IN STR UME NTS , O RM O T O R QLA ; 1 1 O · 3 _
• 200 N5EC A CCES S TIME, 375 NS Ee C YCLETIME,
• 1 6 P IN T TL COMP AI IB LE .• BUR~EO IN A ~D FU Ll Y T ESTE D .
• PA RTS R EPlA CEMEN'T GUA RA NTEED FO RONE Y EA R
!Software forAppJe® I!: for your Entertainment (0Business -Education :
~ *••••••••••••••••••••••••••••••••••••••
+WR lT E- O NI Pr of es si on al W or d P ro ce ss in g leis you e dit , m ove . d ele te . find. change
an d repeat any b ody of te xt, m erg e and sa ve on d isk. D oe s righ t- just ifie d m arg ins.
centering. page num bering . You can e nter na me & a dd re ss onto torm le tte rs w he n
prinUng. Ed it and m erge any te x t d isk tHe-even file s not crea ted by WR ITE -
O N-and spool te x t to d isk for le tte r p rint ing or ed it ing . Cha in up to 1 0 0 I ll es in a
sing le p rinte r run. Ne eds A pplesoft and 32K.
On DIsk w llh opara tlng m anua l. . . . . . . . . . . • . . . .. . .. $99.50
F i f e miste r 2 p rogram s: FO RMA T & R ETR IE VA L com prise a pow erfu l da ta file
m ana ge r. G re al for e ve rything from p hone u s r s 1 0 l eg al a bstra cts. D esig n you r ow nda ta structures. Up to 50 0 cha ra cte rs pe r re cord . Up to 15 se a rc ha o le fie ld s in a ny
com b ina tion. Needs 32K O n D is~ •.. . •. . .• , . .• 534.95
+ S pace (E du -W are) S ix prog ra ms torm a unique ep ic gam e serie s. Mu lii- la ce ted
s im ula t ion of lile in inte rste lla r socie ty. You and opp one nts m ust m ake lile & de ath
d ecis ions . K ee ps t ra ck 0 1 your progress from one gam e to nex t. Needs 4 8 K an d
16 K R ain bow 's C as ino 9 g am bling g am es : R oule tte , Bla ckja ck . C ra ps. Horserace,
vahtzee, K eno, S tot M ach ine , Poke r. a nd Acey-Ducey Needs 16K .
Tape $29.95 Disk $3.4.95
D on'llue wha t you've b ien look ing lor, hire? Then write lor our FRE E SO FTWA RE
C ATA LO G. Wu 're sa ving onB IUlt lor you!
T o ord er. a dd $2 {U.S. ,: $5 1 1 0'" '9 "1 l or s hip p in g. C a lif or ni a r es id e nt s a d d 6 % s al es l ax .Sorry, w e cannot Ship 1 0 P .O . s ex es . V IS A /M A S TE R CHA RGE a nd B AN KAM ERI C AR DWelcomed!
1 6K S pie s Wa r: You in your space ca psule ba tt le ag ainst the com puter's
saucer in hi· res graph ics. Tlpa . .. $12
1 6K M em ory Ve rily D ia gnostic routine to ch eck ra ng e 01 m e mo ry . I nd ica te s la ulty
a dd re sse s. d ata In m em ory ce ll. a nd fa ully d ata . Tlp a $5
1 6K A ppleod lon Music synthssts com poses orig ina l Irish jigs. E nte r your ow n m usic
a nd sa ve on ta pe or d isk. Includ es 3 Bach fugues. Tape . . . . . . . . . . . $10
+ 48 K E du -Pa ck 1 E du -W are) Th is package com bine s C OMPU'R EA D-five spe edre ad ing prog ra ms; three PE RC EPTIO N gam es w he re ra ndom shap es and size s m ust
be m atched; and S TA TIS TIC S lor com puting Mea n. Variance , S tandard D evia -
tion. a nd m uch m ore ' Ne eds A pp le soft R OM. D isk $39.95
+ 32 K SaIgon II (Ha yde n) Here 's the p rogram tha t cam e In th i.rd a ga inst Ihe b ig
m achine s (m ainfra me s a nd m ax is ) at the 9th North A merica n C om pu te r C hess C ham ·
p lonsh ip and p la ced first in the E urop ean Microcom puter C hess C ha mp ionships! Ha s
seve n le ve ls of p lay w ith Leve ls 0 - 3 p la ying in lourna me nt t im e. Ne ed a ch alle ng e?
This is it !! T lpe . . .. $29.95 Disk $34.95
16 K I I I"Res Baseball (Prog ra mm a Inte rna tiona l) This a nim ate d sim ula tion of a m ajor
lea gue ba seba ll ga me is lor t wo p la y er s . The scoreboa rd is in Ihe lower le ft a t
sem en w ith the "throw pointe r" lor d ire cting a throw in Ihe low er rig ht corne r.
Writ ten entire ly in m achine lang uag e, the a ction Is quick and sm ooth, m aking it the
llnest simulat ion 01 its k ind . lIpe . $15.95
O t h e r Spec ia t I I a m s F o r Y ou r A p pla I I
VE RS AW RITE R This d ig itiz er d ra wing b oa rd le ts you cre ate a ny p icture in l ul l c ol or .
w ith h ig h re solut ion g ra ph ics. Id ea l for m ass g ra phics. Pow erfu l softw are p acka gei ne lud ed on d isk . You c a n trace, e c it. sa va and reca ll w ha t you draw . It's a s imple -to-u se syste m lor stud ents. a ritsts, e ng ine ers a nd g ra phic p rog ra mm ers. 8' h "xtt'w orking a re a. A pp le soft R OM a nd 32K required. 5199 .DD
(Add $5 [U.S .) a nd S10 [f or ei gn ) fo r s hi pp in g)
A pp laMonltol Psote d E ve ry1 hing you w ante d to know about Ihe A pp le Monitor but
c ou ld n't l ig ur e c u t . A ll the PE EKS , PO KE S, a nd C ALLS exp la ine d in an easy-to-
u nd e rs ta nd f or m , wr i t ten i n p la in E n g li sh . O n ly . .. .. .. .. .• .. .. .. .. .. .. .. . $9.95
Gold e n P la z a S h op pi n g C e nt er, D e p t. 1 A97 19 R e se da B lv d., N orth rid ge , CA 91324