Skip to main content

Full text of "Micro 6502 Journal Issue 15"

See other formats


liaiiQQQ" 



The Magazine of the APPLE, KIM, PET 
and Other ^3(!)^ Systems 









^ 



■■^ 



GiMx ter^ 



mf^ttY 




I M^fSA 






. "•^'f .sp,...,^ um^^l J ="*^ ^-'^"^'n^^ >*-^''"'^n J 

,f** , i_ '^^% ""* ''-*:;f Z ^—J^ zirHSRTM'^*'*^^!^^ J 

I ,'«tnMi. MIMNSA5 /' TENNESSEE •'W""™ , - -'wiMtflnS-*** •fc4^ '' ^ ^ 

^^ i ,., I , !^\ 

1 ***'S W^^ .^M 



APPLE MEMORY MAP 



MO 15 



^ca^ta^^ ^^^^ 



$2.00 



Apple 




sofit^^^re 

from RAINBO'W 




PIE TEXT EDITOR Machine Language; 
cureor-based text editor for 16K Apple. 

• Features format capabilities of most text 
editors. 

• All commands are control characters. 

• Enables you to define your own function 
commands. 

Order PIE on Cassette:. ....... $19.95 

On Diskette $24.95 




FASTGAMMON 

A high quality, challenging game for you 

and the computer. 

Order FASTGAMMON on Cassette. $19.95 
On Diskette $24.95 



MBW! 



Call or write today for your FREE Apple 
Software Catalog. We welcome B/A-VISA 
and Mastercharge. Sorry, no CODs. Please 
add $1.25 shipping and handling. Califor- 
nia residents add 6% Sales Tax. 

We ship promptly on receipt of your pre- 
paid order. Order direct from: 





m^^ 


IQH 


J M ^ 


Kf\ 


■■^H IB 


^__HBir^Jl 


m ' 


■■ pi^H 


LJtJ 


JjXrVjTbi 


iiin™ 




^j^ 


SARGON for 24K Apple 

• Flip hack and forth between board and 
text with ESC. 

• Correct wrong moves 
•Analyze your position 

Order SARGON on Cassette $19.95 



HIGH RESOLUTION CHARACTER 
GENERATOR Machine language program 
for 16K Apple. 

• Define your own character set and graphic 

shapes. 

• Complete English upper/lower case charac- 
ter set, 

• Complete Greek Alphabet with upper/low 
er character set. 

•Scroll, vary window size, invert characters, 
switch back and forth between two char- 
acter sets. 

Order Hi-Res Char. Gen. on Diskette $19.95 







^ 


BrISi!!.. 




HIT 


MV 


Kit 


im fTtP mo 


RflftOCMfl 



3-D ANIMATION 

• Define a 3-D lores shape. 

• Animate with full perspective. 

• Includes 3 demo shapes. 
Order 30 ANIMATION on diskette .$24.95 

I --^^ 



Garden Plaza Shopping Center 
9719 Reseda Blvd., Northridge, Ca 91324(213)349-5560 



m PonvEnsoFT^ inc. 



p. O. BOX 157 

PITMAN, NEW JERSEY 08071 

(609) 589-5500 



products for the 

APPLE n 



APPLESOFT 11 UTILITY 



(Diskette Only) $12.45 



The Applesoft II Utility program provides the user with the following features, a) Complete automatic renumbering of any Applesoft II 
program, b) The creation of an EXEC File for subroutine file creation. This feature allows you to incorporate the same subroutine in various pro- 
grams, c) No modification of the program in machine memory (RAM), d) Automatic running of the program. No programmer should be without 
this excellent utility program. REQUIREMENTS: Disk 11, Applesoft II, 16K of memory. 



REAL ESTATE ANALYSIS PROGRAM 



$14.95 



The Real Estate Analysis Program provides the user with three features, a) A powerful real estate investment analysis for buy/sell decisions 
and time to hold decisions for optimal rental/commercial investments, b) Generation of complete amorization schedules consistent with banking 
practices and schedules, c) Generation of depreciation schedules for selecting the best depreciation schedule for your use and a determination of 
optimal switch over points to straight line to maximize depreciation. All three features are designed for video screen or printer output. In addition, 
the program will plot; cash flow before taxes vs. years, cash flow after taxes vs. years, adjusted basis vs. years, capital gains vs. years, pre-tax pro- 
ceeds vs. years, post-tax proceeds vs. years, and return on investment (%) vs. years. REQUIREMENTS: Applesoft II, 16K of memory without DOS 
or 32K of memory with DOS (Disk II). 



ADDRESS FILE GENERATOR 



$19.95 



A professional piece of software which allows the user to create four different types of address files: a) Holiday File, b) Birthday File, 
c) Home Address File, and d) Commercial Address File. The program contains a menu of seven major commands; 1 ) Create a File, 2) Add to File, 
3) Edit File, 4) Display File, 5) Search File, 6) Sort File, and 7) Reorganize File. Most of the major commands have subordinate commands which 
adds to the flexibility of this powerful software system. We doubt you could buy a better program for maintaining and printing address files. 
REQUIREMENTS: Disk II, Apple Printer Card, 32K of memory with Applesoft ROM Card or 48K of memory without Applesoft ROM Card. 



SUPER CHECKBOOK 



$19.95 



A totally new checkbook program with a unique option . . . Bar Graphs. These bar graphs, outputed to a printer or video screen, provide 
trend analysis data on code expense, income, expenses, or gain/loss on a month by month basis. The program contains a total of fourteen options: 
1 ) Check/Deposit Entry & Modification, 2) Reconciliation of Checks or Deposits, 3) Sort by Check Number, 4) Sort by Code for Year, 5) Sort by 
Code for Month, 6) Output Year to Date, 7) Output Month Activity, 8-11) Printer/Video Plot Trend Analysis-Bar Graphs, 12) Account Status, 
13) Reconciled Check Status, and 14) Quit. An excellent program for maintaining your checkbook, or that of a small business. REQUIREMENTS: 
Disk II, 32K of memory with Applesoft ROM Card or 48K of memory without Applesoft ROM Card. 



FUNCTION GRAPHS AND TRANSFORMATIONS 



$14.95 



This program uses the Apple II high resolution graphics capabilities to draw detailed 
graphs of mathematical functions which the user defines in Basic syntax. The graphs appear in a 
large rectangle whose edges are X and Y scales (with values labeled by up to 6 digits). Graphs 
can be superimposed, erased, drawn as dashed (rather than solid) curves, and transformed. The 
transformations available are reflection about an axis, stretching or compressing (change of scale), 
and sliding (translation). The user can alternate between the graphic display and a text display 
which lists the available commands and the more recent interactions between user and program. 
Expected users are engineers, mathematicians, and researchers in the natural and social sciences; 
in addition, teachers and students can use the program to approach topics in (for example) 
algebra, trigonometry, and analytic geometry in a visual, intuitive, and experimental way which 
complements the traditional, primarily symbolic orientation. REQUIREMENTS: 16K of 
memory with Applesoft ROM Card or 32K of memory without Applesoft ROM Card. 

Available at your local computer store 




eee i sm i» %%% x •••• 4 



Call or write for our free SOFTWARE & ACCESSORIES CATA LOG 



9 

Q- oil 



P /> 



#: 



c/ d 






DEALER INQUIRIES INVITED 



Apple II is a registered 

trademark of Apple Computer, Inc. 



M^aHVEnSOFT^ INC. 

p. O. BOX 157 

PITMAN, NEW JERSEY 08071 

(609) 589-5500 



• Check or Money Order 

• Include $1.00 for 
shipping and handling 

• C.O.D. ($1.00 add'tl. charge) 

• Master Charge and VISA 
orders accepted 

• New Jersey residents add 
5% sales tax 

Programs Available on Diskette 
at $5.00 A dditional 




BOX 120 

ALLAMUCHY. N.J. 07820 

201-362-6574 



HUDSON DIGITAL ELECTRONICS INC. 

THE HDE DISK SYSTEM. 

HERE'S WHAT ONE USER HAS TO SAY . 

REPRINTED BY PERMISSION FROM THE 6502 USER NOTES ■ ISSUE NO. 14 



PRODUCT REVIEW of the HDE DISC SYS- 
TEM by the editor. 

A number of you have asked for details 
about the HDE full size disc system. 

The system is based around the SYKES 8" 
drive with the 6502 based intelligent control- 
ler. 

This drive is soft sectored, IBM compatible, 
and single density which lets you store about 
a quarter megabyte of data on a disc. 

The system software, called FODS (FileOrl- 
ented Disc System), manages sequential files 
on the disc much the same way files are writ- 
ten on magnetic tape - one after another. 
When a file is deleted, from a sequentially 
managed 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 well as a disad- 
vantage since deleted files on the FODS sys- 
tem can be recovered after the file has been 
deleted. (This has saved my sanity more than 
once!) Of course when you want to recover 
some of the discspace taken up bya number 
of these deleted files, you can simply re-pack 
or compress the disc and all the active files 
will be shifted down until thereare no deleted 
files hanging around using up space. 

FODS has this ability to repack a disc 

When saving and loading in FODS you work 
with named files, not track and sector data or 
I.D. bytes. This makes life a lot easier. I've 
seen some disc systems where you have to 
specify track and sector info and/or I.D. bytes. 
What a pain that can be! 

If you just want to save a source file tempor- 
arily, you can do that on what's known as 
"scratch-pads". There are two of these on a 
disc, "scratch-pad A" and "scratch-pad B", 
each of these temporary disc files can hold up 
to 1 6K or if "B" is not used, "A" can hold one 
file up to32K in length. Theonly files that can 
be temporarily saved on scratch pad are files 
that have been built using the system text 
editor. 

Being a dyed in the wool assembly lan- 
guage programmer. I really appreciate the 
FODS text editor! This line oriented editor is 
upwards compatible with the MOS/ARESCO 
editor but includes about everythmg you 
could askfor ma line editor. There is a full and 
semi-automatic line numbering feature, lines 
can be edited while they are being entered or 
recalled and edited later, strings can be lo- 
cated and substituted, the line numbers can 
be resequenced, the file size can be found, 
the hex address of a line can be known and 
comments can be appended to an assembly 
file after it has been found correct. Oops! I 



forgot to say lines can also be moved around 
and deleted. This isn't the complete list of 
FODS editor commands, just the ones that 
immediately come to mind, 

Another very powerful feature of the sys- 
tem is the ability to actually execute a file con- 
taining a string of commands. For example, 
the newsletter mailing list is now being stored 
on disc. When I want to make labels, I would 
normally have to load each letter file and run 
the labels printing program. But with FODS. I 
can build up a "JOB" file of commands and 
execute it. 

The job file in turn calls each lettered label 
file in and runs the label printer automatical- 
ly. The way computers are supposed to oper- 
ate right? 

Here's a listing of the job file I use to pnnt 
mailing labels: 
:LIS PRTLBL 

0005 LOD A:RUN %LABEL:LOD B;JMP,EOOO: 
LOD CJMP.EOOO: 

0010 LOD D:JMP.E000:LOD EJMP.EOOO 
LOD F:JMP,EOOO: 

0015 LOD G:JMP.E000:LOD -HJMP.EOOO: 
LOD hJMP.EOOO: 

0020 LOD J:JMP.E000:LOD K;JMP .EOOO; 
LOD LJMP.EOOO: 

0025 LOD M:JMP.E000:LOD MC: JMP.EOOO: 
LOD NJMP.EOOO: 
0030 LOD 0:JMP.EOOO:LOD PJMP EOOO: 
LOD RiJMP.EOOO: 

0035 LOD S:JMP.E000:LOD T.JMP EOOO: 
LOD V:JMP.E000: 

0035 LOD S:JMP.E000:LOp T.JMP .EOOO: 
LOD VJMP.EOOO: 

0040 LOD W;JMP.E000:LOD XYZ: JMP.EOOO: 
0045 LOD EXCH:JMP,E000:LOD COMP: 
JMP.EOOO: 

Remember the MOS/ARESCO assembler I 
reviewed several issues ago? Well HDE went 
and fixed up all the problem areas that 
mentioned in the review and then took (t 
several steps further. The HDE assembler is 
an honest to goodness two-pass assembler 
which can assemble anywhere in memory us- 
ing multiple source files from the disc. The as- 
sembler is an optional part of the system. 

It you're the kind of person (as I am) who 
enjoys having the ability to customize, modi- 
fy, and expand everything you own - you'll 
enjoy the system expansion abilities FODS 
has to offer. Adding a new command is as 
simple as writing the program, giving it a 
unique three lettername andsaving ittodisc. 
Whenever you type those three letters the 
system will first go through its own command 
table, see that its not there and then go out 



and read the disc directory to see if it can find 
it, !f it's on the disc it will read itjn and execute 
it. Simple right? I've added several commands 
to my system and REALLY appreciate having 
this ability. Some of the things I've added 
include a disassembler, an expanded ver- 
sion of XIM (the extended machine language 
monitorfrom Pyramid Data). Hypertape.anda 
number of system utilities which make life 
easier. By the way, to get back to the system, 
all you need to do is execute a BRK instruc- 
tion 

HDE also provides a piece of software that 
lets you interface Microsoft 9 digit BASIC to 
their disc system. The software allows you to 
load the BASIC interpreter itself from disc as 
wellassavingand loading BASIC Programsto 
and from the disc. This particular version of 
the software doesn't allow for saving BASIC 
data but HDE mentioned that this ability may 
be possible with a future version. 

The first thing I do with a new piece of soft- 
ware after i get used to using it is try to blow it 
up. I did manage to find a weak spot or two in 
the very first version of FODS (a pre-release 
version) but the later, release version has 
been very tight. 

The standard software that is included with 
the system consists of the disc driver soft- 
ware, the system text editor and the BASIC 
software interface. Several command exten- 
sions may alsobe included. All the necessary 
stuff like a power supply, the KIM-4 interface 
card, and all cables and connectors are in- 
cluded. If took me about 45 mmutes to get 
things up and running the first time I put the 
system together. 

Admittedly, a dual full size disc system from 
HDE is probably beyond the means of most 
hobbyists but if you or your company is look- 
ing for a dynamite 6502 development sys- 
tem, I would recommend this one. I've used 
the Rockwell System 65 while I was at MOS 
and feel that dollar for dollar, feature for 
feature, the HDE system comes out on top. 
The only place the HDE system falls short 
when stacked up next to the System 65 is In 
the area of packaging. At this point, there is no 
cabinet forthediscdrivesavailabletrom HDE 
So far, I've got nothing but good things to 
say about HDEandtheirproducts. Everything 
I've received from them has been industrial 
quality. That includes their documentation 
and product support. Im very impressed with 
what I've seen from this company so far and 
quite enthusiastic over what my KIM has 
become since acquiring the disc system and 
its associated software. 

ERIC 



THANK YOU MR. REHNKE! 

HDE PRODUCTS - BUILT TO BE USED WITH CONFIDENCE 
AVAILABLE DIRECT OR FROM THESE FINE DEALERS: 



• 









LONG ISLAND 




JOHNSON COMPUTER 


PLAINSMAN MICROSYSTEMS 


ARESCO 


COMPUTER GENERAL STORE 


LONE STAR ELECTRONICS 


Box 523 


Box 1 7 1 2 


PO. Box 43 


103 Atlantic Avenue 


Box 488 


Medina, Ohio 44256 


Auburn. Ala. 36830 


Audubon. Pa. 19407 


Lynbrook. N.Y. 11563 


Manchaca. Texas 78652 


216-725-4560 


800-633-8724 


215-631-9052 


516-887-1500 


512-282-3570 



• 



"mi@q®" 







y^j^^?^'^ 









APPLE II Senaiotitj^ur^^ ^ 

■ -.by ■Qpnald'.WrBl^cby;-- :,-^^^ 

Extendlngihe SYM^Monitor 

■ by' Nichoia^.V^t|s;;;4;;■^;^^ ^.V;-;^--=-v. ■ . 

Replace thi^tpWwHWa^^^^ 

V by E. 'O.yiorr\&^;^0^:rU^^^^^ :,-: ZU'-'-M^S; 

■' ■; j^; :^,b v;, Rpn^ldjQj^ 

:TGKENS;-!,>7^--^;';:i-~;^;';::;i^^ 
/•■•; , by E.-DJMp''ris^Jr:^;r 

A Better Life foryourAF>PLE 

, : ..by LvWi■■||■|am.;Bradford^^.<fg^^^^^ 

::/;: '■V:b;y:wiiiiam;a;p^ 

^ ■Wha^i's' Where Jnlt^^f^L^ 
■■^.;:;v^:■"by.;Prp^;AAnj(^ 

The:^MJCi«);S6f:}w^ 

".- ■ ■■ ; ■ ;by;Mtke'BpwS- v{:--p 

lnterfac[ng the Analog Devices 7670JA/DCbnv^^^ 

■ SYMjile'Memofy^Exp^ 
Vv:\,;byOp]in-M.-B1alc^ 

P^fliie HIRES Cftairacjlej^^ 

':;^' ■ :;^/vby ■ Robertl)F;;2;aJn|g^ 

Common Variables oritM^P^ 

6502 Bibliography^ P^^i^^^^^^^^^^^^^^^^^ ^^^^^^ 3 

■ -v;;-^ ; by Dr:#IMarri\B,;Dlial;.-'^^^^ 

■;BAD'^Reyiew.; ;v;.^T;njW;; ■ 



■:;17': 

^222; 



iiiii^^ii^aii 




:v::Sut)spriptiarlfh.0njte8^tat^a^ v^^^yv:*:-;:::^ '-, 






AdViertisef^s Index 



AB Computers 


'■'':.. ?5Z...:'/---: 


: y pbgramrna Interhatio 


tm-a:UBG^ 


ARESCO 


r52 W 


; PraigfeEts lye Sof tvvare ^- : • . ^^ 


m,M:0:^'---r2& 


ComputerlDomponents 


:,■.,: 4-: ■ 


■ P.S. Software Hpuse 


V-0:my---:B2 


Cdmjputer Forum 


IS 


PYGMY Pnogjrarnmin g 


■v^,v:v-;:.-y-;:M 


The Computeristjlna 


6,7,8 


Rairibow Comptiting, Inc. U 


y-y-.-'/:-^:'^\m 


The Computer Shop ' 


- -.■■■■21>-=^- 


RNB Enteiprises ; 


v:-\:- ■,■^.46 


Connecticut microGomputers 


7:"..\-;--^.::39..-' ■ 


■ SKYLE^ JEJectrpnic Works : , 


- ; 44,45 


Electronic Specialists, Inc. 


■-- 37"-- ■■-■■■: 


. ■;;. :-rSof^k--\':yr'r-'':^-.^^^^ /;.■•;:-■. 


L.---;.. -^'^-^ ■;50. 


Elliam Associates ■ v 


,,.-:43 :....■>■:■;; 


■ ■y-vSoftouchv.---^".^.-^-- ■:;■■" ■ ■v;:;-^: :■■.:;..; ■:;>:f-:-: 


?::■--.. -v.. ■y^.-.K-24' 


Enclosures Group 


■■■.:'56:--:-:- 


^ ■■:■ ^:^■ ■^SiibLOGIC ^ ^' ■■ '0:^:-^ 


::-Vvy ..-^.-.•■,- .37 


EXCERT.inc. 


27 


. ^■:;:SYBEX.^- -;.■/:.■:: 


48 


H. Geller Computer Systems 


,:v..;., ,.-V.:i8^; ^,:., 


-Weldon Elect ran jc^^^^ >■ , .; v 


y-\'ry--^'^-\Bb 


HudsohDigitarElectrbhics r 


,.: .:..,:....,. 2■^-.■.. -: 


V -«e^t Side Electronics / " ^ J i 


■^Ty-rr^r-r-SZ 


i^owersoft, Inc^^'V-;. ■,::■■-::■•:;■:■• 


•■-■■•■■■■ ^1-,37-:-:V. 


■^' -■■■;. ^-v; ■;-■/■ ;-:^ ''If.' . ■■■';)^' ■■";i''^'-:\i'.:"'.:;.v>'y^'"'-^''V: "' "''',,"":. ■"-''■ (.-^''-'f- 





^ 



ii£ai](3(^ii)i 



iCippIC II 



see if you qualify for a CCi of DC P /F Card 

and get great discounts on selected 

purchases for your Apple and PET. 



we have the Most Complete Stock of apple and 

PET Software in southern California. 

(Send for our Catalog — $1.00) 



16K RAM CHIP SET FOR APPLE II 



Tested & Burned in Only 



. $95.00 



Reference Books For APPLE and PET Owners 

Programming the 6502 9.95 

PET User Manual (New from Commodore) .... 9.95 

MOS Tech Programming Manual (6502) 12.00 

MOSTech Hardware Manual 12.00 

Hands On Basic with a Pet 14.95 

32 Basic Programs for the Pet 14.95 

6502 Applications Handbook 12.95 

Pet Machine Language Guide 9.95 

CLASSES: Apple Topics 

We offer a series of classes on Apple ll to aquaint owners with some of the unique features and capabilities 

of their system. Topics covered are Apple sounds, Low Res. Graphics, Hi Res. Graphics, Disk Basics, and How to Use 

Your Reference Material. Sessions are held every Thursday Night at 7:00 p.m. 

HARDWARE FOR APPLE II PET HARDWARE 



WORKSHOPS: Call for details. 

• PET— 3rd Saturday of the Month 
• APPLE— 4th Saturday of the Month 

• Telecommunications Line for Apple 
Users with Modems, 714-898-1984. 



• Upper & Lower Case Board 

Now vou can display both upper and lower case characters on 
your video with the Apple li. includes assembled circuit board 
and Instructions 49.95 

• Programmer Aide $50.00 

PRINTER SPECIALS FOR APPLE AND PET 

• TRENDCOM 100 With interface for Apple or PET $450.00 

• LITE PEN used With xv or monitor screen 34.95 

• ALF Music Synthesizer Boards 265.00 

• APPLE Disk utility (DOS 5.2) 25.00 

• Supertaiker 279.00 

• APPLE Clock 195.00 

• Anadex dp-8000 with tracter 

8" paper width and Apple interface $1050 

• Centronics 779-2 for Apple ii 

With parallel interface $1245.00 

SOFTWARE FOR APPLE II 
PASCAL from Programma 49 95 

FORTH 49 95 

LISP— from Apple Software Bk No. 3 n/C 

LISA— Interactive disk assembler 34 95 

WHATSIT— Excellent conversational data base 

manager 32K 100.00 48K 125.00 

SARCON— Champ of 2nd west Coast Computer Faire 19.95 

APPLE PIE— Excellent text editor 24 95 

FORTE— Music editor in hires 19 95 

FASTCAMMON— Excellent backgammon game 

with graphics Tape 20.00 Disk 25.00 

APPLE 21— Excellent blackjack game 9 95 

BRIDGE CHALLENGER— Computer bridge 14.95 

FINANCIAL MANAGEMENT SYSTEM 



Accounts Payable 
Accounts Receivable 
inventory Control 
$200 Each Package 



Ledger Processing 

Payroll 

$800 Complete 

$10 for Manual 



PET 2001-8 computer Standard PET with integral cassette 

and calculator type keyboard 8K bytes of memory 

(7167 net) $795.00 

PET 2001 -IGN computer pet with 16K bytes of memory 
and large keyboard with separate numeric pad and 
graphics on keys. External cassette optional. 
(15,359 net) $995.00 

PET 2001-16B computer As above but has standard type- 
writer keyboard. No graphic keys $995.00 

pet 2001-32N Computer identical to 2001-16N with 32K 

bytes of memory. (31,743 net) $1295.00 

pet 2001-32B Computer Identical to 2001-32B with 32K 

bytes of memory. (31,743 net) $1295.00 



PERIPHERALS 



• PET 2022 Printer 80 column dot matrix printer with plain 
paper or forms handling tractor feed. Has full PET 

graphics $995.00 

• PET 2023 Printer 80 column dot matrix printer. Plain 

paper printer with full PET graphics $849.00 

• PET 2040 Dual Drive Mini Floppy Disk* Dual drive intelligent 
mini floppy system. 343K net user storage 

capacity $1295.00 

•Retrofit kit required for operation with PET 2001-8. 
SOFTWARE FOR PET 

Mirrors and Lenses 19.95 Checkers and Baccarat 7.95 



The states 14.95 

Real Estate 1&2 59.95 

Momentum and Energy . . 19.95 

Projectile Motion 19.95 

Mortgage 14.95 

Dow Jones 7.95 

Petunia Player Sftwr 14.95 



Chess 19.95 

Series and Parallel 

Circuit Analysis 19.95 

Home Accounting 9.95 

BASIC Math 29.95 

Game Playing with BASIC ■ 
vol. I, It, ill 9.95 each 



WHY SHOULD YOU BUY FROM US? 

Because we can help you solve your problems and answer your questions. We don't claim to know 
everything, but we try to help our customers to the full extent of our resources. 

—Prices subject to change.— 



COMPUTER COMPONENTS OP ORANGE COUNTY 

6791 Westminster Ave., Westminster, CA 92683 714-891-2584 

Hours: Tues-Fh 11:00 AM to 8:00 PM— Sat 10:00 AM to 6:00 PM (Closed Sun, Mon) 

Master Charge, Visa, B of A are accepted. No COD. Allow 2 weeks for personal check to clear. 

Add S1.50 for handling and postage. For computer systems please add $10.00 for shipping, handling and 

insurance. California residents add 6% Sales Tax. 



APPLE II Serial Output Made Simple 



Is the APPLE II simple serial output as easy to imple- 
ment as everyone claims? Almost! But a few helpful 
hints gleaned from this designer's experience may get 
that output port into service quite a bit sooner. 



Donald W. Bixby 
5 King Philip Trail 
Norfolk, MA 02056 



When Apple sent the new Apple tl 
Reference Manual (January 1978), I 
junnped at the article on page 114, "A 
Simple Serial Output". A printer output 
was badly needed in nny system. I built 
the RS-232 output as described, 
typed in the program, borrowed a ter- 
minal from my place of business and 
started things up. 

An oscilloscope on the RS-232 output 
disclosed that the signal was reaching 
+ 12v, but going only slightly negative. 

The printer did work correctly, but I was 
concerned. Examination of the RS-232C 
specification disclosed that the printer 
on the data receiving end must have 3K 
input impedance. The printer manual 
stated only that the impedance was "at 
least" 3K. Since the Apple circuit was 
uses a 2.2K resistor to - 12v, the source 
impedance, when negative, is much too 



high. I replaced the Apple circuit with a 
single inverter (74LS04) driving an 
RS-232 driver integrated circuit manu- 
factured by Motorola (MC1488L). This 
worked fine. 

The only other hardware problem related 
to page 1 15 in Apple's manual. The state- 
ment, "The signal output connects to 
pin 3 of the DB-25 connector", is con- 
fusing. It is correct if you are connecting 
it to a DB-25 connector, which is to be 
used with a standard RS-232 cable with 
the other end of the cable connected to 
the printer. The cable connects pin 3 at 
the source end to pin 2 of the receiving 
end. If you are connecting directly to the 
printer, use pin 2, not pin 3. 

Now the fun began. The printer I used 
can be operated at 110 baud, 150 baud, 
or 300 baud, front panel switch select- 
able. Apple's program was all written for 



10 REM PRINTER TEST AND MODIFY PROGRAM IN APPLESOFT BASIC 

15 CALL -936: PRINT: PRINT 

20 INPUT "no OR 300 BAUD"; A 

30 IF As 110 THEN 70 

40 POKE 868,10 

50 POKE 882,78 

52 PRINT: INPUT "200 OR MS CARRIAGE RETURN DELAY" ;M 

54 IF M=200 THEN M=255 

60 POKE 84 3, M 

70 PRINT: INPUT "HOW MANY CHARACTERS TO A LINE";N 

80 POKE 787, N 

90 PRINT: PRINT 

100 PRINT N; "CHARACTERS TO A LINE" 

no IF AsBOO THEN 220 

120 POKE 868,11 

130 POKE 882,215 

132 PRINT: INPUT "200 OR MS CARRIAGE RETURN DELAY" ;M 

134 IF M«200 THEN M=88 

140 POKE 843, M 

220 PRINT: PRINT: INPUT "CHARACTERS TO BE PRINTED", -A* 

230 PRINT: PRINT: PRINT A$ 

240 PRINT: PRINT: PRINT "OUTPUT IS NOW GOING TO THE PRINTER AT A"; A; "BAUD 

RATE" 

250 CALL 778 

260 FOR J=1 TO 10 

270 PRINT A$ 

280 NEXT J 

300 CALL 914 

310 PRINT: PRINT 

320 INPUT "CONTINUE (Y OR N)";B$ 

330 IF B$s"Y" THEN 230 

340 END 



110 baud. Naturally I wanted the fastest 
speed. For any speed higher than 110 
baud, 1 stop bit is used instead of 2. This 
is easily changed by writing location 
$03C6with0A. 

The routine TT0UT4 causes a 9.091 
msec, delay (1/110 baud = 9.091 ms). 
For 300 baud, I needed 3.333 ms. This 
was accomplished by changing location 
03D4fromD7to4E. 

The printer will now work at 300 baud 
with three problems remaining. The first 
was simple, the second took two weeks 
to figure out and the third was minor. 

When a carriage return is transmitted, 
the program sends the carriage return to 
the printer, then automatically sends a 
line feed to the printer, then waits 200 
ms for the carriage return to be com- 
pleted. My printer requires the 200 ms. 
dealy, but others will be different. For ex- 
ample, the DECwriter requires no delay. 
After speeding up to 300 baud, I was not 
getting enough delay. I changed location 
03AC from 58 to FF, an arbitrary choice, 
and this problem was fixed. 

The program is supposed to detect when 
the next column to be printed, COLCNT, 
exceeds the number of columns avail- 
able, WNDWDTH, and then transmit an 
automatic CR, LF, and delay. It won't, 
it can't and it didn't. The intention of the 
Apple program routine, FINISH is to 
make CH equal to 39 and then depend on 
the system monitor routines to generate 
the CR, LF and delay. This doesn't work. 

I have modified their program to make 
this happen within the TTY routines. If 
COLCNT equals or exceeds WNDWDTH, 
the program branches to RETURN. This 
causes a carriage return and then 
branches to AUTOLF, the same section 
of program used for automatic line feed 
and delay by Apple. 

The last problem encountered involved 
getting out of the printer routines and 
back to the video display. New code was 
written to solve this problem. 

The new program, shown here, has been 
relocated to addresses 30A through 
3A2. With all the components, I believe 
it is self explanatory. I also wrote an 
Applesoft BASIC program to modify and 
test the machine language program. 



August, 1979 



MICRO -The 6502 Journal 



15:5 



AIM/SYM/KIM 
8K STATIC RAM pi° ^r 
Sockets for 8K Eprom 
6522 1/0 Port 

ON BOARD REGULATORS 

EPROM 
PROGRAMMER 

MEMORY PLUS: $20000 fully assembled and tested 




^m^^ [^IL^^^o- AIM/SYM/KlM 




UPPER/lower case ASCII 

12B Additional User Programmable 

Characters: GRAPHICS- 

SYMBOLSFOREIGN CHARACTERS 
Programmable Screen Format up to 

80 CHARACTERS - 24 LINES 
KEYBOARD and LIGHT PEN Interfaces 
Up to 4K DISPLAY RAM 
Provision for 2K EPROM 
Provision to add 6502 (or 

STAND-ALONE SYSTEM 

ASSEMBLED AND TESTED 

WITH 2K DISPLAY RAM 

VIDEO PLUS: $24500 



5!a^^l^35i [P[L[I3Q 



ADD UP TO FIVE ADDITIONAL BOARDS AIM/SYM/KI M 

AUDIOnTY CONNECTIONS 
POWER TERMINALS 
APPLICATION CONNECTORS 

FULLY BUFFERED 
FULLY DECODED 
KIM-4 Bus Structure 

MOTHER PLUS: $8000 fully assembled and tested 




l?5i(«)^(«) iJilL^^ 



FOR 



Same SIZE and SHAPE as KIM/SVM 

Prolessional Quality 

Double Sided, Plaled through Holes 

Tw« Sets of GOLD Plaled Dual 22 Fingers 

Designed for WIRE WRAP or 
SOLDER Connections 

Provisions for 40 14/16 pin sockets 
4 24/40 pin sockets 
3 voltage regulators 



AIM/SYM/KIM 




PROTO PLUS: $4000 




6f7/256-3649 



g@[i^[?)(unrg[^D@T 



PO Box 3 
S Chelmsford, mfl OI824 




MICRO-WARE ASSEMBLER 65XX-1.0 PAGE 01 



RS-232 DRIVER ROUTINES 

REVISED 3-30-79 BY DONALD W. BIXBY 

REVISED 6-6-79 BY MICRO STAFF 

TO CALL TTINIT FROM SYSTEM MONITOR: »<30AG 
TO CALL VIDINIT FROM SYSTEM MONITOR: »<392G 

TO CALL TTINIT FROM FP BASIC: CALL 778 
TO CALL VIDINIT FROM FP BASIC: CALL 91^ 



TO READ FROM TAPE: 
TO WRITE TO TAPE: 



•30A.3A2R 
•30A.3A2W 



TO MAKE CHANGES: 

TO CHANGE WINDOW WIDTH: 

»<313:48 (FOR 72 COLUMNS) 

•<313:50 (FOR 80 COLUMNS) 

3 POKE 787,72 (FOR 72 COLUMNS) 

]POKE 787,80 (FOR 80 COLUMNS) 

TO CHANGE CARRIAGE RETURN DELAY: 

»<3^B:58 
]POKE 8JI3,88 

TO CHANGE NUMBER OF STOP BITS: 

•364: DA (FOR 1 STOP BIT) 

»36i*:0B (FOR 2 STOP BITS) 

]POKE 868,10 (FOR 1 STOP BIT) 

IPOKE 868,11 (FOR 2 STOP BITS) 

TO CHANGE THE BAUD RATE: 

•372:7D (FOR 110 BAUD) 
•372 :4E (FOR 300 BAUD) 
]POKE 882,215 (FOR 110 BAUD) 
]POKE 882,78 (FOR 300 BAUD) 



03A3 




WNDWDT 




*0021 


03A3 




CH 




$0024 


03A3 




CSWL 




$0036 


03A3 




CSWH 




$0037 


03A3 




YSAVE 




$0308 


03A3 




COLCNT 




$0307 


03A3 




MARK 




$C058 


03A3 




SPACE 




$C059 


03A3 




WAIT 




$FCA8 


03A3 




RTSl 




$0309 


03OA 






ORG 


$030A 


030A A9 


21 


TTINIT 


LDAIM 


$0021 


030c 85 


36 




STA 


CSWL 


O3OE A9 


03 




LDAIM $0003 


0310 85 


37 




STA 


CSWH 


0312 A9 


48 




LDAIM $0048 


031i* 85 21 




STA 


WNDWDT 


0316 A5 24 




LDA 


CH 


0318 8D 


07 03 




STA 


COLCNT 


03IB A9 


60 




LDAIM $0060 


03 ID 8D 09 03 




STA 


RTSl 


0320 60 






RTS 




0321 48 




TTOUT 


PHA 




0322 48 






PHA 




0323 AD 


07 03 


TT0UT2 


LDA 


COLCNT 


0326 C5 


24 




CMP 


CH 


0328 68 






PLA 




0329 BO 


03 




BCS 


TESTCT 


032B 4B 






PHA 





FOR THE APPLE II 
CURSOR HORIZONTAL POSITION 
CHARACTER OUT SWITCH LO ORDER 
CHARACTER OUT SWITCH HI ORDER 

COLUMN COUNT LOCATION 



EQUALS TTOUT-768 POINTER TO 
RS-232 ROUTINfeS, LOW BYTE 
EQUALS TTOUT/256 
HIGH BYTE 

72 COLUMN WINDOW WIDTH 

PRESENT COLUMN 

STORE CONSTANT 

RETURN FROM TTINIT 

SAVE CHARACTER ON THE STACK 



CHECK FOR A TAB 
RESTORE CHARACTER 
IF CARRY SET, NO TAB 



15:6 



MICRO - The 6502 Journal 



August, i979 



• 



K35!a«"Q 



by Commodore 



The Original 6502 System 



20 mA Current Loop TTY Interface 

Audio Cassette Interface 

1 5 User I/O lines 

2 Interval Timers 

IK* RAM 

2KKlMMoniioTROM 

Hex Keypad/LED Display 




05^0: 033D 85 3£ 
0550: 033F A5 6E 
0560: 03^1 85 3F 



ST A 
LDA 
STA 



J 



The Ultimate Enclosure 
fortheKIM-1 

Protects Your KIM-1 

Neat, Attractive, Professional 

Full Access to the Expansion and 
Application Connectors 




ENCLOSURE PLUS 

for KIM: $3000 



Enhances the LED Display with a Red Lense 

Room for the KIM-1 and One 
Additional Board such as 
MEMORY PLUS or VIDEO PLUS. 



20 Column Thermal Printer 
20 Character LED Display 



Rockwell International 

The Complete 6502 System 



High Speed Audio Cassette 

Up to 4K RAM on board 




Full size 
Typewriter style 
Keyboard 



Up lo 12K additional ROM 
Versatile 8K ROM Monitor 



AIM 6S: $37500 IK RAM- S42000 4K RAM 



ENCLOSURE 

WITH BUILT IN 

POWER SUPPLY 

SPECIFICATIONS: 

INPUT: 11 0/220 VAC 50/60 Hz 

OUTPUT: +5V® 5A 

•f24V@1A 
GROUNDED THREE-WIRE LINE 
ON/OFF SWITCH WITH PILOT LIGHT 
Enclosure has room lor the AIM and one 
additional board: MEMORY PLUS or VIDEO PLUS 

AIM PLUS: $10000 AIM and AIM PLUS: $47500 





617/256-3649 



(g(5)D^pyirii[^o@T 



• 



PO Box 3 
S Chelmsford. fTlfl OI874 




0570: 

0580: 

0590: 

0600: 

0610: 

0620: 

0630: 

06140: 

0650: 

0660: 

0670: 

0680: 

0690: 

0700: 

0710: 

0720: 

0730: 

07^0: 

0750: 

0760: 

0770: 

0780: 

0790: 

0800: 

0810: 

0820: 

0830: 

08^0: 

0850: 

0860: 

0870: 

0880: 

0890: 

0900: 

0910: 

0920: 

0930: 

0940: 

0950: 

0960: 

0970: 

0980: 

0990: 

1000: 

1010: 

1020: 

1030: 

101*0: 

1050: 

1060: 

1070: 

1080: 

1090: 

0050: 

0040: 

0050: 

0060: 

0070: 

0080: 

0090: 

0100: 

0110: 

0120: 

0130: 

0140: 

0150: 

0160: 

0170: 

0180: 

0190: 

0200: 

0210: 

0220: 

0230: 

0240; 

0250: 



0343 AO 00 
0345 20 2C FE 

0348 38 

0349 A5 6B 
034B E5 69 
034D 85 1C 
034F A5 6C 
0351 E5 6A 
0353 85 ID 
0355 60 



0356 A5 
0358 85 
035A A5 
035c 85 
035E A5 
O36O 85 
0362 85 
0364 A5 
0366 85 
0368 85 
O36A A5 
036c 85 
036E A5 
0370 85 
0372 AO 
0374 20 

0377 18 

0378 A5 
037A 65 
037c 85 
037E A5 
0380 65 
0382 85 

0384 38 

0385 A5 
0387 E5 
0389 85 
038B A5 
038D E5 
038F 85 

0391 18 

0392 A5 
0394 65 
0396 85 
0398 A5 
039A 65 
039c 85 
039E A5 
03A0 DO 
03A2 C6 
03A4 C6 
03A6 60 



lA 
3C 
IB 
3D 
18 
6F 
3E 
19 
70 
3F 
69 
42 
6A 
43 
00 
2C FE 

69 
1C 
6B 
6A 
ID 
6C 

6F 
lA 
6D 
70 
IB 
6E 

6D 
69 
6D 
6E 
6A 
6E 
6D 
02 
6E 
6D 



A2L 

$006E 

ASH 

LDYIM $00 

JSR $FE2C 

SEC 

LDA 

SBC 

STA 

LDA 

SBC 

STA 

RTS 



$006B 

$0069 

EL 

$006C 

$006A 

EH 



RECALL LDA 
STA 
LDA 
STA 
LDA 
STA 
STA 
LDA 
STA 
STA 
LDA 
STA 
LDA 
STA 



CL 

AIL 

CH 

AlH 

DL 

$006F 

A2L 

DH 

$0070 

A2H 

$0069 

A4L 

$006A 

A4H 



USE MONITOR MOVE ROUTINE 
COMPUTE DISPLACEMENT 
TO ARRAYS 



BACK TO BASIC 

•»»ENTRY 770 - RECALL VARIABLES 
SET UP MOVE 



START OF STRINGS 



START OF NUMERICS 



LDYIM $00 



A2 



JSR 
CLC 
LDA 
ADC 
STA 
LDA 
ADC 
STA 
SEC 
LDA 
SBC 
STA 
LDA 
SBC 
STA 
CLC 
LDA 
ADC 
STA 
LDA 
ADC 
STA 
LDA 
6NE 
DEC 
DEC 
RTS 



$FE2C 

$0069 

EL 

$006B 

$006A 

EH 

$006C 

$006F 

CL 

$006D 

$0070 

CH 

$006E 

$006D 

$0069 

$006D 

$006E 

$006A 

$006E 

$006D 

A2 

$006E 

$006D 



USE MONITOR MOVE ROUTINE 
COMPUTE START 
OF ARRAYS 



COMPUTE END OF NUMERICS 



TEMP STORAGE 



TEMP VALUE 



TEMP VALUE 
SUBTRACT ONE 

END OF NUMERICS 

BACK TO BASIC 



ROUTINE TO SAVE AND RECALL 

COMMON VARIABLES FOR INTEGER BASIC 

PROGRAMS ON THE APPLE II 

WRITTEN 03/16/79 BY ROBERT F. ZANT 
MODIFIED 7/4/79 BY MICRO STAFF 



0318 
O3I8 
0302 
0302 4C OF 03 

0305 00 

0306 A5 CC 
0308 85 lA 
O3OA A5 CD 
030c 85 IB 
O3OE 60 

O3OF A5 1A 

0311 85 CC 

0313 A5 IB 

0315 85 CD 
0317 60 



CL * 

CH * 

ORG 
JMP 
BRK 
LDA 
STA 
LDA 
STA 
RTS 

RECALL LDA 
STA 
LDA 
STA 
RTS 



$001A 
$001B 
$0302 
RECALL »»»ENTRY 770 



$00CC 

CL 

$OOCD 

CH 



CL 

$OOCC 
CH 
$OOCD 



- SAVE VARIABLES 



»»»ENTRY 774 
SAVE END OF 
VARIABLE TABLE 

BACK TO BASIC 



ENTRY 770 - RECALL VARIABLES 
RESET END OF 
VARIABLE TABLE 



BACK TO BASIC 



August, 1979 



MICRO - The 6502 Journal 



15:7 



032C 

032E 

0331 

0333 

0336 

0339 

033A 

033B 

033D 

033F 

0340 

0342 

0345 

0347 

034A 

034C 

034F 

0352 

0354 

0356 

0358 

035B 

035D 

035E 

035F 

0362 

0363 

0365 

0366 

0367 

0369 

036C 

036E 

0371 

0373 

0374 

0376 

0377 

0379 

037A 

037C 

037E 

037F 

0380 

0381 

0383 

0386 

0387 

0388 

038A 

038D 

038F 

0392 

0394 

0396 

0398 

039A 

039C 

039E 

03 AO 

03A2 



A9 AO 

2C 09 03 

FO 03 

EE 07 03 

20 5F 03 

68 

48 

90 E6 

49 OD 

OA 

DO OD 

8D 07 03 

A9 8A 

20 5F 03 

A9 58 

20 A8 FC 

AD 07 03 

FO 07 

E5 21 

BO 30 

AD 07 03 

85 24 

68 

60 

8C 08 03 

08 

AO OB 

18 

48 

BO 05 

AD 59 CO 

90 03 

AD 58 CO 

A9 D7 

48 

A9 20 

4A 

90 FD 

68 

E9 01 

DO F5 

68 

6A 

88 

DO E3 

AC 08 03 

28 

60 

A9 8D 

20 5F 03 

A9 00 

4C 42 03 

A9 FO 

85 36 

A9 FD 

85 37 

A9 28 

85 21 

A9 00 

85 24 

60 



TESTCT 



PRNTIT 



LDAIM 
BIT 
BEQ 
INC 
JSR 
PLA 
PHA 
BCC 
EORIM 
ASLA 
BNE 
STA 
LDAIM 
JSR 
LDAIM 
JSR 
LDA 
BEQ 
SBC 
ECS 
LDA 
STA 
PLA 
RTS 
STY 
PHP 
LDYIM 
CLC 
PHA 
BCS 
LDA 
BCC 
LDA 
LDAIM 
PHA 
LDAIM 
LSRA 
BCC 
PLA 
SBCIM 
BNE 
PLA 
RORA 
DEY 
BNE 
LDY 
PLP 
RTS 
RETURN LDAIM 
JSR 
LDAIM 
JMP 
VIDINI LDAIM 
STA 
LDAIM 
STA 
LDAIM 
STA 
LDAIM 
STA 
RTS 



$00A0 

RTSl 

PRNTIT 

COLCNT 

DOCHAR 



AUTOLF 



FINISH 



SETCH 



DOCHAR 



TT0UT3 



MARKOU 
TT0UT4 
DLYl 

DLY2 



TT0UT2 
$000D 

FINISH 

COLCNT 

$008A 

DOCHAR 

$0058 

WAIT 

COLCNT 

SETCH 

WNDWDT 

RETURN 

COLCNT 

CH 



YSAVE 

$000B 



PRINT A SPACE 

IS CHARACTER A CONTROL? 

IF SO, BRANCH TO PRINT IT 

IF NOT, INCREMENT COLUMN COUNT 

PRINT THE CHARACTER 

RESTORE CHARACTER 

AND PUT BACK ON THE STACK 

DO MORE SPACES FOR TAB CHAR 

CHECK FOR CARRIAGE RETURN 

ELIMINATE PARITY 

DONE UNLESS HAVE CARRIAGE RETU: 

CLEAR COLUMN COUNTER 

PRINT A LINE FEED 

200 MS DELAY FOR CR LF 

BRANCH IF COLUMN COUNTER = 
ELSE SUBTRACT WINDOW WIDTH 
RETURN IF IN THE MARGIN 

STORE NEW VALUE IN CH 
RESTORE THE STACK 
RETURN FROM TTOUT 
ROUTINE TO PRINT A 
CHARACTER 
FOR n BITS 
(2 STOP BITS) 



MARKOU 

SPACE SEND A SPACE 

TT0UT4 

MARK SEND A MARK 

i00D7 DELAY 9-091 MS FOR 110 BAUD 

$0020 

DLY2 

$0001 
DLYl 



TT0UT3 
YSAVE 



$008D 

DOCHAR 

$0000 

AUTOLF 

$00F0 

CSWL 

$OOFD 

CSWH 

$0028 

WNDWDT 

$0000 

CH 



NEXT BIT 
DECREMENT Y 
IF Y IS NONZERO, 
DO THE NEXT BIT 

RETURN FROM DOCHAR 

PRINT CARRIAGE RETURN 

POINT TO VIDEO DISPLAY ROUTINl 
LOW ORDER BYTE 

HIGH ORDER BYTE 

40 COLUMN WINDOW WIDTH 

SET HORIZONTAL CURSOR 

TO AND RETURN FROM VIDINIT 



SYMBOL TABLE 


2000 209C 






AUTOLF 0342 


CH 0024 


COLCNT 0307 


CSWH 0037 


CSWL 0036 


DLYQ 0373 


DLYR 0376 


DOCHAR 035F 


FINISH 034F 


MARK C058 


MARKOU 036E 


PRNTIT 0336 


RETURN 0388 


RTSQ 0309 


SETCH 035B 


SPACE C059 


TESTCT 032E 


TTINIT 030A 


TTOUT 0321 


TTOUTR 0323 


TTOUTS 0366 


TTOUTT 0371 


VIDINI 0392 


WAIT FCA8 


WNDWDT 0021 


YSAVE 0308 







3 aaiiaii 3 3^^4 



All Include the Following Features: 

ALL METAL HEAVY DUTY CASE 

ON/OFF SWITCH and PILOT LIGHT 

115/60H2 or 230/5OHZ INPUT 

GROUNDED THREE-WIRE 
POWER CORD 



POWER PIUS 5: + 3V at 5A, ±12V at 1A 575«» 
POWER PIUS SUPER 5: +5Vat10A, ±12V at 1A $95<» 
POWER PIUS 5/24: + 5V at 5A, + 24 at 2.5A, ± 12V at 1A $95«> 




SPECIFICALLY DESIGNED FOR THE AIM 65 



Snull Enough to Fit inside the AIM Enclosure 

Enough Power for the AIM 65 Fully Loaded 

Plus an Additional Board 

Worki on IISVfMHz or 230Vr50Hz 

Provides Regulated + SV at 5A and + 24V at 1A 

Grounded Three-Wire Power Cord 
ON/OFF Switch and Pilot Light 




POWER A PLUS:$50*>o 



ALL THE POWER A 
KIM-1/SYM-1 NEEDS 



Neat, Compact, Economical 
Thousands in Use 
INPUT: 11 SVJfeOHz 

OUTPUTS: Regulated + 5V at 1.4A 
+ 12Vat1.0A 
Unresulaled +8V upto4.3A 
+ 16V«pto1.0A 

Will Power a KIM-1(SYM-1 and one 

Additional Board 

Such as MEMORY PLUS or VIDEO 

PLUS 




POWER PLUS: $4000 



SUPERSCOPEC-190 
by Marantz 

A High Quality Cassette Recorder 
with all of the Features Required 
for Microcomputer Systems: 

VU Meter Displays Recording Level 

110V AC or 6#VDt or Battery Operation 

Tape location Counter 

Three Recording Methods 

Variable Speed control: ^20% SUPERSCOPE C-190: $9000 

Rentote Control Leaves Electronics ON 





fit 7/256-3649 



(g@[}^pyT[E[^0@T 



PO Box 3 
S Chelmsford, mfl OI8*24 




^p 



15:8 



MiCRO - The 6502 Journal 



August, 1979 



Extending the SYM-1 Monitor 



A program relocator, a program listing utility and a 
selective, extended trace routine illustrate how true 
monitor extensions can implement additional functions 
and commands. 



Nicholas Vrtis 

5863 Pinetree S.E. 

Kent wood, Ml 49508 



• 



When Synertek wrote the monitor for 
the SYM-1, they left It open-ended by 
vectoring many of the major functions 
through a system RAM vector table. By 
changing the addresses in the vector 
table, it is relatively easy to implement 
additional functions and commands. 

The three routines described in this ar- 
ticle are almost permanently resident in 
my system. They have been coded as 
true monitor extensions in that they use 
only addresses already allocated to the 
monitor and could easily be put into 
ROM. 

The programs are not complex or 
large, but that is also one of their good 
points. I have them sitting up in high 
memory where they are out of the way 
but available when needed. 

The first program is a modified ver- 
sion of one that appears in The First 
Book of KIM. It is a program relocator 
that adjusts all the branches, jumps, and 
absolute address locations in a program 
so that you can relocate it. It is really the 
next best thing to a relocating loader. 

The second routine is a little program 
lister that prints your program, putting 
one instruction on each line. This is 
easier to read and check than the stan- 
dard Verify or Paper tape formats. 

Finally, there is an extended trace 
routine that displays the values of all the 
registers, and additionally allows you to 
specify that only a portion of your pro- 
gram is to be traced. Did you ever 
wonder what was happening to the 
registers when one of your subroutines 
is executed only five times in a two thou- 
sand repetition loop? This utility lets you 
determine just that. There is a price that 
is paid, but I will get to that later. 

If you have looked at the program 
code yet. you may have wondered at the 
unusual address. After all, who ever puts 
an extension in tow memory? When I 
decided to write this article, I intended 
to use addres $C00, where I have it on 



my system, but then I decided to change 
it to low memory. 

Almost everyone has scratch memory 
there to work on a program. After you 
enter it, check the memory dump, and 
run a few tests; you can use the program 
to relocate itself! 

Actually, what you have to do is block 
move the program to the desired ad- 
dress and use the new UO command to 
perform the relocation on the new copy. 
Tell it the correct FROM and TO address, 
but make the program starting address 
the new location. There are three loca- 
tions that must be changed manually, 
and you are all set up. 



Before I go into a discussion about 
the programs, I would like to mention the 
interfaces to the SYM monitor that are 
used, and a few that aren't but are sort 
of handy anyway. The programs them- 
selves are not complicated, and I try to 
keep them pretty well commented. 

The SYM manual contains a small ex- 
ample showing how to add a command 
to the monitor, but isn't really clear 
about how it works. For one thing, the 
monitor uses the unrecognized com- 
mand vector for more than just the UO 
through U7 user commands. It does a 
jump via this vector whenever it en- 
counters a command it cannot process, 
or a character that is non-hex. 



0010 
0020 
0030 
0040 
0050 
0060 
GOTO 
0080 
0090 
0100 
0110 
0120 
0130 
0140 
0150 
0160 
0170 
0180. 
0190: 
0200 
0210: 
0220 
0230: 
0240: 
0250 
0260 
0270 
0280 
0290 
0300 
0310 
0320 



MICRO-WARE ASSEMBLER 65XX-1.0 PAGE 01 



» SYM-1 USER MONITOR FUNCTION EXTENSIONS 



UO - 



» U1 



MODIFIED 7/3/79 BY MICRO STAFF 

RELOCATE PROGRAM 

PI = FROM ADDRESS 

P2 = TO ADDRESS 

P3 = START OF PROGRAM 

MINI-PROGRAM LISTER 

PI = PROGRAM STARTING ADDRESS 

P2 = PROGRAM ENDING ADDRESS 

USER TRACE ROUTINE Y-X-A-FLAGS-STACK 

A626 = INCLUSIVE TRACE STARTING ADDRESS 

A62C = EXCLUSIVE TRACE ENDING ADDRESS 



0200 

0200 53 

0201 44 



0202 32 

0203 32 

0204 43 

0205 2C 

0206 41 

0207 36 

0208 36 

0209 44 



» SYM COMMAND 'E 200' WILL SET UP VARIOUS ADDRESSES 
* AND VALUES FOR THESE EXTENSIONS 
«#««««««««««««««««»«»«*»*»«»«»»«»« ft ««««»«««« «»«t«««««i 

ORG $0200 
INITCO = $53 

$44 
ftft«ftftft«ft«ftftft#ftftftftftft«ftftftftftftftftftftft«ftft«ftft«ftftftftftftftft«ftftftftftft« 

« CHANGE THE FOLLOWING WHEN RELOCATING THE PROGRAM » 
ftftftftftft««ft«ft««ftftftft«f«««««ft*ft«ftftftftftft««ftftftftftft«ftftftftft«ft«ftftft 



STORE "SD" USER ROUTINE VECTOR 



$32 
$32 
$43 
$2C 
$41 
$36 
$36 
$44 



STORE "22C" AND CHANGE 
IF ADDRESS CHANGES 

STORE ",A66D" 



August, 1979 



MICRO -The 6502 Journal 



15:9 



0330: 

03^0: 

0350: 

0360: 

0370: 

0380: 

0390: 

0400: 

0410: 

0420: 

0430: 

0440: 

0450: 

0460: 

0470: 

0480: 

0490: 

0500: 

0510: 

0520: 

0530: 

0540: 

0550: 

0560: 

0570: 

0580: 

0590: 

0600: 

0610: 

0620: 

0630: 

0640: 

0650: 

0660: 

0670: 

0680: 

0690: 

0700: 

0710: 

0720: 

0730: 

0740: 

0750: 

0760: 

0770: 

0780: 

0790: 

0800: 

0810: 

0820: 

0830: 

0840: 

0850: 

0860: 

0870: 

0880: 

0890: 

0900: 

0910: 

0920: 

0930: 

0940: 

0950: 

0960: 

0970: 

0980: 

0990: 

1000: 

1010: 

1020: 

1030: 

1040: 

1050: 

1060: 

1070: 

1080: 

1090: 

noo: 



020A OD 
020B 4D 
020C 41 
020D 36 
020E 35 
020F 38 

0210 OD 

0211 31 

0212 38 

0213 OD 

0214 53 

0215 44 

0216 38 

0217 30 

0218 43 

0219 30 
021A 2C 
021B 41 
021C 36 
021D 37 
021E 41 
021F OD 

0220 53 

0221 44 



0222 33 

0223 34 

0224 31 

0225 2C 

0226 41 

0227 36 

0228 37 

0229 34 
022A OD 
022B 00 



022C 
022C 
022C 
022C 



$0D 
$4D 
$41 
$36 
$35 
$38 
$0D 
$31 
$38 
$0D 
$53 
$44 
$38 
$30 
$43 
$30 
$2C 
$41 
$36 
$37 
1^1 
$0D 

$53 
$44 



STORE "MA658" AND CHANGE 

MAX RECORD 

TO BE 

TWENTY-FOUR 

BYTES LONG 

STORE "18" 



SET TRACE VECTOR 

STORING STRING "SD80C0,A67A" 



STORE "SD" 



STORE "341" AND CHANGE IF ADDRESS CHANGES 



STORE ",A6?4" 



022C CD 57 A6 
022F FO 02 

0231 38 

0232 60 

0233 C9 14 
0235 FO 03 



» CHANGE THE FOLLOWING WHEN RELOCATING THE PROGRAM » 

$33 

$34 

$31 
= $2C 

$41 

$36 

$37 

$34 

$0D 
= $00 ZERO IS END OF EXEC REQUEST 
fffftt««ff«««f««««««t «««««# ««»««««««««««««««««««« ««««#«««« 

• PAGE ZERO ADDRESS LOCATIONS » 

fftt«ff«ff««««««f«fifff«ffffffffffffff««tttt««liffffffffffttffffffttff «««««»»!« 

C.URAD • $OOFE SYM-1 "OLD ADDRESS LOW ORDER 

CURADK • $OOFF AND HIGH-ORDER 

ADJUST » $OOFC SYM-1 PAGE ZERO SCRATCH AREA LOW-ORDER 

ADJUSH • $OOFD AND HIGH ORDER 

•iiffff Iff ffffffffff«ff«fffffff««if«f««tt«««4ffff«fffffftt ««§!§•«§««» 

BY JIM BUTTERFIELD (SEE "THE FIRST BOOK OF KIM") 
MODIFIED BY N. VRTIS TO RUN AS MONITOR 
EXTENSIONS ON THE SYM-'i 

THIS PROGRAM ADJUSTS ABSOLUTE AND RELATIVE 
ADDRESSES OF A PROGRAM SO IT CAN BE RELOCATED 
OR EXPANDED 
>>»> NOTES: 

1- PAGE ZERO REFERENCES ABOVE $8000 WILL NOT 
BE CHANGED UNLESS SPECIFIED AS ABSOLUTE 
THREE-BYTE INSTRUCTIONS 

2- ANY REFERENCES ABOVE $8000 WILL NOT BE 
CHANGED 

3- PROGRAM STOPS WHEN IT FINDS AN ILLEGAL 
OPERATION CODE (CAN USE $FF) 

4- DON'T RELOCATE DATA 

INPUT PARMS: 

PARM1 - RELOCATE FROM ADDRESS 

(FIRST OPCODE THAT WILL MOVE) 
PARM2 - RELOCATE TO ADDRESS (WHERE PARM1 

WILL BE MOVED TO) 
PARM3 - PROGRAM START ADDRESS (FIRST 
INSTRUCTION IN PROGRAM 
•ttififf«fffftt«fffffffffffffffffffffffttfff«««fffffffttfftttttt«««fttfftt«ff« 

CMP LSTCOM SEE IF COMMAND TERMINATED PROPERLY 

BEQ UO YES — SEE WHICH COMMAND 
COMER R SEC ELSE SET CARRY AS ERROR FLAG 

RTS AND RETURN TO MONITOR FOR ER XX 



UO 



CMPIM $14 MAKE SURE IT IS "UO" 
BEQ UOCOMM BRANCH IF IT IS 



This means that it gets used for a lot 
of junk in addition to the defined user 
commands. It also means that you can 
use characters other than Un as com- 
mand extensions, if you want, as long as 
they are not used for valid SYM com- 
mands with the same number of para- 
meters. 

The monitor saves the command value 
in a location called LSTCOM. When a 
carriage return Is entered, the monitor 
reloads the command into the A register 
and loads the number of parameters into 
X. 

So, the first thing our monitor exten- 
sion should do is check the character in 
A against the value in LSTCOM. If they 
are the same, the program was called 
after normal command termination. If 
they are different, the command was not 
terminated properly and we want to 
make sure the carry is set and return 
with an RTS instruction. 

This will cause the monitor to print the 
standard "ER xx" message and return to 
command mode. 

Once we know that the command was 
terminated properly, we have to deter- 
mine which command it was. As I men- 
tioned earlier, the monitor does not 
verify the command character as it is 
entered, so we could be here for any- 
thing, including a "valid" command with 
the wrong number of parameters. 

Finally, if we are on the right com- 
mand, and if it was terminated properly, 
the last check is to make sure that exact- 
ly the correct number of parameters has 
been entered. If not, there will be miss- 
ing information, or information will be in 
the wrong place. For any errors, all the 
extension has to do is guarantee that 
the carry Is set and return to the monitor 
with an RTS instruction. 

As an aside, the command processor 
does not initialize the stack register, and 
so, if you are debugging an extension 
and stop it before the RTS to the 
monitor, you can quickly use up a lot of 
the stack area. This only hurts if you 
have a routine or two located there, as I 
usually do. 

The manual claims that locations $F8 
through $FF are reserved for monitor 
use. Did you ever wonder what they are 
used for? Unfortunately, these locations 
were not assigned a variable name in the 
monitor assembly, so there are no cross 
references to them in the listing. I have 
tracked down most of the applications, 
but I don't guarantee that I didn't miss 
one. 

The most used locations are probably 
$FE and $FF. These are the locations 



• 



15:10 



MICRO -The 6502 Journal 



August, 1979 



that the monitor uses for almost all of 
it's indirect addressing. If you look at the 
command descriptions, this is where the 
"OLD" address is kept. 

These programs use it in the same 
manner that the monitor does. It's im- 
possible to display these locations via 
the monitor commands directly, but do- 
ing a Verify or Memory wilt show you 
what they are pointing to. Also, if you 
plan to use them, none of the monitor 
routines will change them, but almost 
any command will. 

Another important pair of locations is 
$FA and $FB. These contain the address 
of the next byte to be obtained as input 
when processing in the execute mode. If 
your program modifies these locations, 
it can't be invoked from the execute 
mode. 

As another aside about the execute 
mode, all input comes from RAM, so if 
you do a JSR INCHR and expect to get 
keyboard input while in execute mode it 
won't work. The execute command is the 
only one that modifies these addresses. 
The other locations are pretty much 
scratch locations; you can probably use 
them without affecting command opera- 
tion, but 1 would not count on them be- 
ing the same after any call to monitor 
service routines. 

The cassette routines use $FC and 
$FD, as does the block move command. 
Terminal input uses $F8 as a character 
buildup area, and terminal output uses 
$F9 to hold the character as it is being 
output. There may be a few other uses, 
but I would stay away from these unless 
you are really desperate for page zero 
space, or you are writing monitor exten- 
sions. 

The System RAM areas are much bet- 
ter documented in the monitor listing. 
They have also been assigned names, 
and therefore appear on the assembly 
cross reference list. These programs 
only deal with two main areas. This is 
$A630 through $A63F, and they are 
monitor scratch areas. The two bytes us- 
ed here are not used by the monitor, ac- 
cording to the cross reference lists. 

The locations $A64A through $A64F 
are the addresses where the monitor col- 
lects input parameters. Each is a two 
byte parameter area, and all three areas 
are initialized to zero at the start of com- 
mand processing. The problems begin 
when you find that the labels PI, P2 and 
P3 are a little misleading. The monitor 
starts collecting parameters in the P3 
area, and rotates the whole area 16 bits 
left for each new parameter. It works out 
all right for three parameters, but two 
parameters will end up in P3 and P2, 
while one ends up in P3. 



1110: 
1120: 

1130: 

11^0: 

1150: 

1160: 

1170: 

1180; 

1190: 

1200: 

1210: 

1220: 

1230: 

12iJ0: 

1250: 

1260: 

1270: 

1280: 

1290: 

1300: 

1310: 

1320: 

1530: 

13^0: 

1350: 

1360: 

1570: 

1380: 

1390: 

1400: 

1410: 

1420: 

1430: 

1440: 

1450: 

1460: 

1470: 

1480: 

1490: 

1500: 

1510: 

1520: 

1530: 

1540: 

1550: 

1560: 

1570: 

1580: 

1590: 

1600: 

1610: 

1620: 

1650: 

ID=02 

0010: 
0020: 
0030: 
0040: 
0050: 
0060: 
0070: 
0080: 
0090: 
0100: 
0110: 
0120: 
0130: 
0140: 
0150: 
0160: 
0170: 
0180: 
0190: 
0200: 
0210: 
0220: 



0237 4C DE 02 
023A EO 03 
023C DO F3 



023E 38 
023F AD 4C A6 
0242 ED 4E A6 
02^5 85 FC 
0247 AD 4D A6 
024A ED 4F A6 
024D 85 FD 



024F 20 A7 82 



0252 20 24 03 
0255 30 07 
0257 FO 2A 



0259 20 1A 03 
025C FO F4 



025E C& 
025F FO OF 

0261 20 16 83 
0264 20 42 83 
0267 AO 00 

0269 B1 FE 
026B 20 FA 82 
026E 18 

026F 60 

0270 C8 

0271 B1 FE 

0273 AA 

0274 C8 

0275 B1 FE 
0277 20 B6 02 



027A 91 FE 
027C 88 
027 D 8a 
027E 91 FE 
0280 4C 59 02 



JMP U1 GO TRY AS U1 COMMAND 

UOCOMM CPXIM $03 MAKE SURE HAVE THREE FARMS 

BNE COMERR BRANCH FUR ERROR IF NOT 

» NOW COMPUTE THE ADJUSTMENT INCREMENT 

SEC SET BORROW 

LDA P2L GET LOW-ORDER "TO" 

SBC PIL CALC DIFFERENCE 

STA ADJUST SAVE IN PAGE ZERO LOW-ORDER 

LDA P2H SAME FOR HIGH-ORDER 

SBC P1H 

STA ADJUSH IT GOES INTO PAGE ZERO ALSO 



0283 C8 

0284 A6 FE 
0286 A5 FF 
0288 20 B6 02 
028B 8E 30 A6 
028E A2 FF 
0290 B1 FE 

0292 18 

0293 69 02 
0295 30 01 



» NOW PUT PROGRAM POINTER TU PACE ZERO 

JSR P3SCH 
« GET AN OPCODE HERE « 

GETOP JSR DETLEN.FIND OPCODE LENGTH AND TYPE 

BMI TRIPLE MINUS IS LENGTH 3 OR BAD TYPE 
BEQ BRANCH ZERO IS A BRANCH 

«»»«»«»««« «»«ii««)i«ttt«««««ft»tt« «««»«#««»#«« «««»««««««««« 

» HERE WE HAVE TO SKIP FORWARD TO NEXT OPCODE * 

SKIP1 JSR ADVANC 

BEQ GETOP AND THEN GO GET THE NEXT OPCODE 

» GOT A 5 BYTE OPCODE / ILLEGAL / OR END (SPECIAL) * 

TRIPLE INY BUMP Y BY ONE 

BEQ FIX3BY IF NOW ZERO IT IS A 3 BYTER 

QblTDO JSR CRLFSZ OUTPUT LAST ADDRESS 
JSR SPACE FOLLOWED BY A SPACE 
LDYIM $00 AND THE OPCODE 
LDAIY CURAD 
JSR OUTBYT 

CLC CLEAR THE CARRY 

RTS AND RETURN TO SYSTEM 

F1X3BY INY MAKE Y=1 NOW 

LDAIY CURAD LOW-ORDER PART OF ADDRESS 

TAX PUT INTO X 

INY NOW MAKE Y=2 

LDAIY CURAD HIGH-ORDER PART OF ADDRESS 

JSR ADJST GO CHANGE ADDRESS IF NECESSARY 



STAIY CURAD PUT HIGH-ORDER BACK 

DEY MAKE Y=1 

TXA LOW-ORDER TO A 

STAIY CURAD PUT IT BACK ALSO 

JMP SKIP1 - GO SKIP FORWARD TO NEXT OPCODE 



GOT A BRANCH - HAVE TO CHECK 
BOTH "TO " AND "FROM" ADDRESSES 



BRANCH INY MAKE y=1 

LDX CURAD GET CURRENT LOCATION LOW-ORDER 

LDA CURADH AND HIGH-ORDER 

JSR ADJST FIX IT IF NECESSARY 

STX SCRO SAVE LOW-ORDER FOR NOW 

SET FLAG FOR BACK REFERENCE 
GET RELATIVE BRANCH AMOUNT 



LDXIM $FF 
LDAIY CURAD 
CLC 

ADCIM $02 
BMI OVER 



ADJUST THE OFFSET 

BRANCH IF BACKWARDS BRANCH 



August j 1979 



MICRO -The 6502 Journal 



15:11 



I 



0230: 

0240: 

0250: 

0260: 

0270: 

0280: 

0290: 

0300: 

0310: 

0320: 

0330: 

0340: 

0350: 

0360: 

0370: 

0380: 

0390: 

0400: 

0410: 

0420: 

0430: 

0440: 

0450: 

0460: 

0470: 

0480: 

0490: 

0500: 

0510: 

0520: 

0530: 

0540: 

0550: 

0560: 

0570: 

0580: 

0590: 

0600: 

0610: 

0620: 

0630: 

0640: 

0650: 

0660: 

0670: 

0680: 

0690: 

0700: 

0710: 

0720: 

0730: 

0740: 

0750: 

0760: 

0770: 

0780: 

0790: 

0800: 

0810: 

0820: 

0830: 

0840: 

0850: 

0860: 

0870: 

0880: 

0890: 

0900: 

0910: 

0920: 

0930: 

0940: 

0950: 

0960: 

0970: 

0980: 

0990: 

1000: 



A6 



02 



0297 E8 

0298 8E 31 A6 
029B 18 

029C 65 FE 
029E AA 
029F AD 31 
02A2 65 FF 
02A4 20 B6 
02A7 CA 
02A8 CA 
02A9 8A 
02AA 38 
02AB ED 30 A6 
02AE 91 FE 
02BO 20 CE 02 
02B3 4C 59 02 



INX FORWARDS - MAKE FLAG ZERO 

OVER STX SCR1 SAVE THIS ALSO 
CLC 

ADC CURAD CALCULATE "TO" LOW-ORDER 
TAX PUT INTO X 

LDA SCR1 00 OR FF, REMEMBER? 

ADC CURADH CALCULATE "TO" HIGH-ORDER 

JSR ADJST FIX IT IF NECESSARY 
DEX TAKE BACK OFFSET 
DEX 

TXA PUT LOW-ORDER BACK INTO A 

SEC RE-CALCULATE RELATIVE BRANCH 

SBC SCRO 

STAIY CURAD AND PUT IT BACK 

JSR SIGNCH GO CHECK FOR SIGN CHANGE 

JMP SK1P1 GO SKIP FORWARD TO NEXT OPCODE 











• EXAMINE ADDRESS AND ADJUST IT IF NEEDED 










» HIGH 


-ORDER 


IS IN A 




C9 


80 




» LOW- 


ORDER 


IS IN X 


02B6 


ADJST 


CMPIM 


$80 MAKE SURE REFERENCE NOT TOO FAR 


02B8 


BO 


13 






BCS 


OUT DONE IF TOO HIGH 


02BA 


CD 


4F 


A6 




CMP 


P1H CHECK HIGH-ORDER FIRST 


02BD 


DO 


03 






BNE 


TEST2 BRANCH IF NOT EQUAL 


02 BF 


EC 


4E 


A6 




CPX 


P1L EQUAL - NEED TO CHECK LOW-ORDER ALSC 


02C2 


90 


09 




TEST2 


BCC 


OUT BRANCH IF LOW 


02C4 


48 








PHA 


ELSE SAVE HIGH-ORDER ON STACK 


02C5 


8A 








TXA 


PUT LOW-ORDER INTO A 


02C6 


18 








CLC 




02C7 


65 


FC 






ADC 


ADJUST ADD LOW-ORDER ADJUSTMENT 


02C9 


AA 








TAX 


PUT BACK INTO X 


02CA 


68 








PLA 


PULL HIGH-ORDER BACK OUT 


02CB 


65 FD 






ADC 


ADJUSH ADD IN HIGH ORDER ADJUSTMENT 


02CD 


60 






OUT 


RTS 


AND RETURN 




• CHECK TO MAKE SURE SIGN 










» BEFORE BRANCH IS SAME AS AFTER 


02CE 


4D 


31 


A6 


SIGNCH 


EOR 


SCR1 SEE IF SIGNS ARE THE SAME 


02D1 


10 


OA 






BPL 


SIGNOK BRANCH IF THE SAME 


02DB 


48 








PHA 


SAVE "A" ON STACK 


02D4 


20 


16 


83 




JSR 


CRLFSZ OUTPUT CURRENT ADDRESS 


02D7 


20 


42 


83 




JSR 


SPACE AND A SPACE 


02DA 


4C 


77 


81 




JMP 


ERNOCR AND ERROR MESSAGE 


02DD 


60 






SIGNOK 


RTS 


RETURN IF SIGN IS OK 




















» SYM- 


1 FUNCTION - MINI LISTER 










» BY: 

n 


NICK VRTIS — LSl/CCSD — APRIL 1979 










» LIST 


A PROGRAM BY INSTRUCTION PER LINE 










» INPUT FARMS: 










« 


PARM1 - PROGRAM STARTING ADDRESS 










ft 
ftftftft ftft 


PARM2 - PROGRAM ENDING ADDRESS 



02DE C9 15 U1 CMPIM $15 MAKE SURE ON RIGHT COMMAND 

02E0 DO 04 BNE U1ERR BRANCH IF WRONG 

02E2 EO 02 CPXIM $02 MAKE SURE 2 AND ONLY 2 PARMS GIVEN 

02E4 FO 02 BEQ U1STRT BRANCH TO START IF CORRECT 

02E6 38 U1ERR SEC 

02E7 60 RTS 

02E8 20 9C 82 U1STRT JSR P2SCR SET UP BEGINNING ADDRESS 

ftftftft ffftftftftftftftftftftftftftftftftftftftftftftftft ftftftft tftftftftftftftfttftftftftftftftftftftftft 

» LIST PROGRAM EITHER 1 AT A TIME OR "MAXRC" AT A TIME 
ftftftft ftftftft ft ft ftft ftftftft ft ftftftft ft ft ftft ft ftftftft ftftftft ftftftft ft ftft ftftftft ftft ftft ftftftft ftft 



02EB AD 58 A6 LISTER LDA 
02EE 8D 31 A6 STA 



MAXRC # OF LINES CONTROLLED BY "MAXRC" 
COUNT SAVE IN SCRATCH AREA 



02F1 20 16 83 LISTLP JSR CRLFSZ PUT OUT CURRENT ADDRESS 



The addresses 1 used for the high and 
low trace limits are entries in the junnp 
table. I picked these for two reasons. 
The first is that I don't use the junnp 
table, so am not worried about changing 
it. The second is slightly more import- 
ant. If you will note, the default values 
set in these locations during system 
reset turn out to cover normal user RAM. 
This means I don't have to worry about 
making sure they get set every time I 
reset the system. 

There are a number of obscure SYM 
monitor routines used here, and some 
explanation of their function is in order 
now. Where possible, the names corres- 
pond to names in the monitor listing. 

The routine P3SCR takes the two 
bytes from the P3 area and moves them 
to page zero locations $FE and $FF for 
indirect addressing. P2SCR does the 
same thing, but with the P2 data instead 
of P3. To my knowledge, there is no 
PISCRor equivalent. 

CRLFSZ is a very handy routine that 
outputs a carriage return, a line feed, 
and the contents of $FF and $FE (I.e. the 
current address). The routine INCCMP 
does a 16 bit add of 1 to the contents of 
CURAD, and compares the result to the 
value of P3. The compare Is ignored in 
the relocate program; but for the lister, 
P3 has the program ending address so it 
knows when to quit. There is a reverse of 
this routine, called DECCMP, that sub- 
tracts 1 and does the compare. It isn't 
used in these routines, but might be han- 
dy some time. 

There are two other SYM monitor loca- 
tions used which are not labeled monitor 
addresses. The ERNOCRLF label is a 
few instructions into the ERMSG rou- 
tine. It is after the carriage return and 
line feed subroutine jump. Unfortunate- 
ly, where I enter, ERMSG has already 
pushed Aon the stack, so always JMPto 
it from a subroutine and let it do the 
return from your subroutine, or else your 
stack will get out of sync. 

The last address I call DBRTN. I use it 
in the extended trace. It is actually the 
last couple of instructions of the normal 
trace routine. It does a check of the carry 
and continues tracing if the carry is 
clear; otherwise it returns to the monitor. 
This works out conveniently since the 
routines INST AT and DELAY return with 
the carry set if a key is down or the break 
key on the terminal has been pressed. 

The remaining addresses and routines 
used in the programs are defined ade- 
quately in the SYM manual, so I won't 
bother discussing them here. 

The relocate program should not be 
difficult to follow. The program is made 



• 



15:12 



MICRO - The 6502 Journal 



August, 1979 



possible by the subroutine DETLEN. 1 
have to give credit to Jim Butterfield and 
The First Book of KIM for that routine 
and for most of the relocate program. 
DETLEN not only determines the instruc- 
tion length, but also classifies it as one 
of four types: a branch (Y = 0) an ab- 
solute address reference (Y = FF) an "in- 
valid" instruction (Y = FE)and all others 
(Y = number of bytes in the instruction). 

The invalid opcodes detected are only 
those with bits and 1 on. This is not all- 
inclusive, but it does cover quite a few of 
the undefined opcodes. The normal pro- 
cedure for operating the program is to 
insert an FF after the last program state- 
ment, since the relocate program stops 
when it encounters an "invalid" opcode. 

This sometimes catches an attempt to 
relocate a data area instead of a pro- 
gram, which is a definite no-no. The pro- 
gram can't tell the difference between 
most data and instructions, so make 
sure you stop it before it tries to "fix" 
the "addresses" in your data. If you get 
into the habit of collecting your data 
areas in one place, your programs will be 
easier to relocate. 

If you follow the code, you will see 
that there is a lot more work involved in 
relocating a branch instruction than in 
fixing an absolute address reference. 
This is because the program has to com- 
pute the effective FROM and TO ad- 
dresses before It can determine whether 
the relative byte count has changed. 

I have also included a routine to verify 
that the sign (bit 7) of the new displace- 
ment Is the same before and after the 
relocation. This routine was added 
shortly after the first time I relocated a 
backward branch into a forward branch, 
by overflowing the sign, and started ex- 
ecuting one of the 6502's INMI instruc- 
tions (INMI = Ignore Non-Maskable In- 
terrupt). 

The program lister was really easy to 
do with subroutine DETLEN available. I 
have a CRT running at 1200 baud, so I 
set the program up to list a screenfull of 
lines at a time, and then wait for any key 
before continuing with the listing. If you 
have a printer, or run at a slower baud 
rate, you might want to ignore the MAX- 
RC count, do a call to INST AT after each 
line, and only stop when the break key is 
entered. Remember, INSTAT returns 
with the carry set if the break is entered, 
and clear otherwise. 

The extended trace routine is 
probably the hardest to understand. It 
also requires one hardware change as 
outlined in the SYM manual. That 
change Is the Installation of jumpers 
W-24 and X-25. These enable software 
control of the debug flip-flops, but only 
up to a certain point. 



1010: 
1020: 

1030: 

lOiiO: 

1050: 

1060: 

1070: 

1080: 

1090: 

1100: 

1110: 

1120: 

1130: 

1140: 

1150: 

1160: 

1170: 

1180: 

1190: 

1200: 

1210: 

1220: 

1230: 

1240: 

1250: 

1260: 

1270: 

1280: 

1290: 

1300: 

1310: 

1320: 

1330: 

1340: 

1350: 

1360: 

1370: 

1380: 

1390: 

1400: 

1410: 

1420: 

1430: 

1440: 

1450: 

1460: 

1470: 

1480: 

1490: 

1500: 

1510: 

1520: 

1530: 

1540: 

1550: 

1560: 

1570: 

1580: 

1590: 

1600: 

1610: 

1620: 

ID=03 

0010 
0020 
0030 
0040 
0050 
0060 
0070 
0080 

0090: 

0100 
0110 
0120 
0130 
0140 



02F4 20 42 85 
02F7 20 24 03 
02FA AO 00 

02FC Bl FE 
02FE 20 FA 82 

0301 C8 

0302 CC 32 A6 
0305 DO F5 

0307 20 1A 03 
030A BO OC 
030C CE 31 A6 
030F 10 EO 

0311 20 IB 8A 

0314 FO 02 
0316 DO D3 



031B 18 
0319 60 



031A AE 32 A6 
031D 20 B2 82 

0320 CA 

0321 DO FA 
0323 60 



0324 AO 00 
0326 Bl FE 



0328 A8 

0329 A2 07 

032B 98 
032c 3D 82 03 
032F 5D 89 03 
0332 FO 03 

0334 CA 

0335 DO F4 

0337 BC 99 03 
033A 8C 52 A6 
033D BC 91 03 
0340 60 



CUROP JSR SPACE LEADING SPACE 

JSR DETLEN MAKE SURE GOT CURRENT LINE LENGTH 
LDYIM $00 INIT Y TO ZERO 

CURRLP LDAIY CURAD GET CURRENT OPCODE 

JSR OUTBYT OUTPUT IT 
I NY BUMP TO NEXT BYTE 

CPY BYTES SEE IF DONE 

BNE CURRLP LOOP FOR CURRENT NUMBER OF BYTES 

JSR ADVANC ADVANCE TO NEXT INSTRUCTION 

BCS PGMDON SEE IF TO END 

DEC COUNT ELSE DECREASE LINE COUNT 

BPL LISTLP GOT MORE TO DO IF POSITIVE 

JSR INCHR WAIT FOR ANY CHARACTER 

BEQ PGMDON EQUAL MEANS C/R AND HE WANTS QUITS 

BNE LISTER ELSE CARRY ON 



• END OF PROGRAM ENCOUNTERED - RETURN TO MONITOR 



PGMDON CLC 
RTS 



CLEAR CARRY FOR OK RETURN 
AND RETURN 



» ADVANCE TO NEXT INSTRUCTION 

ADVANC LDX BYTES GET BYTE COUNT 

ADVILP JSR INCCMP BUMP CURRENT ADDRESS 

DEX DECREASE COUNT 

BNE ADVILP LOOP UNTIL ALL BYTES ARE COUNTED 

RTS RETURN HERE 

«««««« «««*«««!««««««« «•«!«««« ««««««!«*« ««««l««««««flffff« 

* DETERMINE THE INSTRUCTION LENGTH 
««««««««««««tt««««ff««««ffff« ««•«««#« #««««*«» Iff #»«««««««««« 

DETLEN LDYIM $00 INIT Y TO ZERO 

LDAIY CURAD PICK UP CURRENT OPCODE 

» ENTER HERE IF "A" ALREADY HAS OPCODE IN IT 



DETLN1 TAY 

LDXIM $07 



SAVE IN Y 

GOT SEVEN TABLE ENTRIES TO CHECK 



CHKLOP TYA PUT OPCODE BACK INTO A 

ANDX TABOUT -01 REMOVE THE DON'T CARE BITS 

EORX TABTST -01 TEST THE REST 

BEQ FOUND BRANCH IF FOUND THE MATCH 

DEX ELSE TRY NEXT ENTRY 

BNE CHKLOP UNTIL ALL ARE LOOKED AT 

FOUND LDYX TABLEN GET LENGTH FROM TABLE 

STY BYTES SAVE THE LENGTH 

LDYX TABTYP NOW LOAD THE OPCODE TYPE 
RTS AND RETURN 



««««ff««««««ff«««»ff«ffff*«»«ff««*««««ffff«ff«f «««««« ff !««««•« ««ff 

« ALTERNATE USER TRACE ROUTINE 



BY: NICK VRTIS — LSI/CCSD 



FEBRUARY 1979 



» ALTERNATE TRACE ROUTINE TO PRINT ADDITIONAL DATA 

« 

« WILL PRINT PROGRAM COUNTER-Y-X-A-FLAGS-STACK 

» ONLY PRINTS FOR PROGRAM ADDRESS IN RANGE OF ADDRESS 

» SPECIFIED BY: 

« A62C - EXCLUSIVE ENDING ADDRESS 

« (SYM DEFAULT IS 0000) 



August, 1979 



MICRO - The 6502 Journal 



15:13 



0150 








0160 








0170 








0180 








0190 








0200 








0210 








0220 








0230 


: 0341 AE 


59 


A6 


0240 


: 0344 AD 


5A 


A6 


0250 








0260 








0270 








0280 








0290 








0300 








0310 


: 0347 C9 


03 




0320 


: 0349 FO 


35 




0330 


: 034B CD 


2D 


A6 


0340 


034E DO 


03 




0350 


: 0350 EC 


2C 


A6 


0360 


■ 0353 BO 


28 




0370 








0380 








0390 








0400 








0410 








0420 


0355 CD 


27 


A6 


0430 


0358 DO 


03 




0440 


03 5A EC 


26 


A6 


0450 


035D 90 


IE 




0460 








0470 








0480, 








0490 


035F 20 


4D 


83 


0500 


0362 20 


EE 


82 


0510 


0365 A2 


05 




0520 


0367 BD 


5A 


A6 


0530. 


O36A 20 


42 


83 


0540. 


O36D 20 


FA 


82 


0550: 


0370 CA 






0560: 


0371 DO F4 




0570: 


0373 EC 


56 


A6 


0580: 


0376 FO 


08 




0590: 








0600: 








0610: 








0620: 


0378 20 


5A 


83 


0630: 


037B BO 


03 




0640: 








0650: 








0660: 








0670: 


037D 20 


86 


83 


0690: 








0700: 








0710: 








0720: 


0380 4C 


BB 


80 


0730: 








0740: 








0750: 








0760: 








0770: 








0780: 


0383 OC 






0790: 


0384 IF 






0800: 


0385 OD 






0810: 


0386 87 






0820: 


0387 IF 






0830: 


0388 FF 






0840: 


0389 03 






0850: 


038A OC 






0860: 


O38B 19 






0870: 


O38C 08 






0880: 


O38D 00 






0890; 


038E 10 






0900: 


O38F 20 






0910: 


0390 03 






0920: 


0391 02 







» A626 - INCLUSIVE STARTING ADDRESS 

» CSYM DEFAULT IS 0000) 

» TRACE VELOCITY IS IGNORED IF TRACE IS NOT IN RANGE 

• KEYBOARD IS CHECKED AND RETURN 
» IS TO MONITOR IF KEY OR BREAK 
» REGARDLESS OF ADDRESS 

USRTRA LDX USREGS ALWAYS EXECUTES SO X IS OK 

LDA USREGS +01 A WILL BE OK IF SELF TRACING 

« t t« t tftt «««««««««« t«tt«««««t««tt«««ttt«tt«»t«t««ff«fft «««««« 

» CHANGE THE FOLLOWING INSTRUCTION 

* TO HIGH-ORDER OF PAGE LOCATED ON 
«»*»»«»«««tftfttftttftt««««t»«ttt«tff««tttttt«««««««ftt «*««««««« t 

CMPIM $03 SEE IF TRACING MYSELF 
BEQ RETURN 
CMP THIGH +0 1 
BNE HI 
CPX THIGH 
HI BCS NOTRAN BRANCH IF TOO HIGH 

» IT IS LESS THAN THE UPPER LIMIT 

CMP TLOW +01 CHECK AGAINST LOWER LIMIT 

BNE LO 

CPX TLOW 

LO BCC NOTRAN BRANCH IF NOT IN RANGE 

» IT IS IN RANGE - OUTPUT GOODIES 

JSR CRLF START ON NEW LINE 

JSR OUTPC 

LDXIM $05 

DSFREG LDAX USREGS +01 

JSR SPACE OUTPUT LEADING SPACE 

JSR OUTBYT NOW THE DATA AS 2 HEX 

DEX 

BNE DSPREG 

CPX TV COMPARE TO TV 

BEQ RETURN EQUAL WILL ALSO HAVE CARRY SET 

» PERFORM THE DELAY ACCORDING TO TV VALUE 

DODELA JSR DELAY 

BCS RETURN IF KEY WAS DOWN - DON'T CHECK AGAIN 

• NOT IN RANGE - CHECK FOR KEY DOWN ANYWAY 
NOTRAN JSR INSTAT CHECK FOR KEY DOWN 

• RETURN WITH CARRY ON FOR RETURN TO MONITOR 
» CARRY OFF TO CONTINUE TRACE 

RETURN JMP DBRTN RETURN WILL CHECK CARRY 

«««»««««« «««««ftft«tt ft ««««ttffft«ffffffffff«««ff »«•«#«««««#«««««« 

• TABLES FOR DETLIN 

MASKS TO REMOVE DON'T CARE BITS 



TABOUT = 


$0C 


= 


$1F 


= 


$0D 


= 


$87 


= 


$1F 


= 


$FF 


= 


$03 


TABTST = 


$0C 


= 


$19 


= 


$08 


r 


$00 


s 


$10 


= 


$20 


= 


$03 


TABTYP = 


$02 



When I started writing this routine, it 
was only going to be a one night project. 
It turned out to be a project all right, but 
it was more than one night. In the mean 
time, I found the program bug that caus- 
ed me to write the extended trace in the 
first place. It has been useful on a 
number of later projects, though. 

Let me tell you some things about the 
SYM implementation of hardware 
debug. It all starts with a non-maskable 
Interrupt which is generated at the com- 
pletion of each instruction that is not a 
SYM monitor address, provided that the 
debug flip-flop is set. The 6502 picks up 
the address contained in locations 
$FFFA and $FFFB as the interrupt 
handler. Do to wiring "mirrors", $FFFA 
and $FFFB are actually $A67A and 
$A67B, which are system RAM ad- 
dresses. 

Normally, this vector contains the ad- 
dress of SVNMI, which is the usual trace 
routine. The first thing the monitor does 
is unprotect system RAM, and then save 
all the registers, flags, and program 
counter in the user register save area in 
system RAM. It then resets the debug 
flip-flop so that It is off. For the extended 
trace, this vector is changed to point to 
another SYM monitor routine that does 
the same things, but exits via an Indirect 
jump through system RAM location 
TRCVEC to the user trace routine. 

In theory, this means that the user 
routine should be able to do just about 
anything the monitor can do. The hard 
facts of life are that the debug key 
bounces, and the monitor does not de- 
bounce it before you get control, but it 
does reset the flip-flop. 

This is no problem if I am in the 
monitor (say, waiting for input) when I 
press the debug key. Since the monitor 
does not get interrupted, by the time an 
interrupt is generated, the key is through 
bouncing, and only the interrupt is 
generated. 

If, on the other hand, a user program 
is executing and I press the debug key, 
the extended trace routine get control 
before the key has finished bouncing. 
This means that an interrupt is 
generated within the extended trace and 
it starts tracing itself. 

At first glance, the solution would 
seem the same as for any other bouncy 
input; namely, to wait for it to settle. The 
only problem is that the extended trace 
gets only ONE instruction done before 
the routine is Interrupted. The best that I 
could do was check to see if it is tracing 
Itself and exit gracefully to the monitor If 
so. Unfortunately, the register save area 
doesn't contain any more useful infor- 
mation, but then, there is a price for 
everything. 



f 



15:14 



MICRO -The 6502 Journal 



August, 1979 



• 



• 



Now that we have that explanation 
out of the way, on to a discussion of the 
nnechanlcs of the trace routine. Actually, 
the hardest part is making sure the carry 
gets set or cleared, before returning to 
DBRTN, so we either continue tracing or 
exit to the monitor. If the program is 
tracing itself, or if the trace velocity is 
zero, the return is executed immediately 
after a compare instruction that resulted 
in an equal condition which sets the 
carry. 

If the trace velocity was not zero, then 
this routine uses the DELAY routine to 
slow down the execution rate. DELAY 
even checks the keyboard, via INSTAT, 
for a break key and sets the carry ap- 
propriately. The check of the carry is 
made after the jump to DELAY so that 
the program doesn't check the keyboard 
twice. The second check would probably 
get the opposite results if the keypad 
were being checked, since KEYQ de- 
bounces the keypad. 

You should also note that even if the 
address is not in the requested range, 
the program does a call to INSTAT, any- 
way, to check for a key down or the 
break key. This is so you can interrupt a 
program outside your requested trace 
range. Remember, the debug key is 
already causing the extended trace to be 
invoked, so you can't stop the program 
with that. 

The final thing to remember about the 
trace routine Is that even for those ad- 
dresses you have not selected, there are 
an awful lot of instructions executed 
before that fact is determined. Effective- 
ly, your cycle time has slowed drastical- 
ly when debug is on, and I mean by 
orders of magnitude. This can be sur- 
prising at times, especially when the 
code you are bypassing initializes a two 
thousand byte array. 

Last but not least, 1 would like to ex- 
plain the strange code that appears at 
the start of the program. It comprises 
the ASCII commands that set up the 
user command vector, the MAXRC byte 
count, and the extended trace routine 
addresses. By putting them there, I only 
have to remember one address instead 
of half of a dozen. By using the SYM ex- 
ecute command, all the addresses get 
set up for me. 

Don't forget to change the addresses 
referenced in the execute commands 
when you relocate these routines. Also 
remember that the addresses must be in 
ASCII, not in hex. There is also one place 
in the extended trace routine that must 
be changed to equal the high order byte 
of the address the routine resides at. 
This is so the routine can tell if it is trac- 
ing itself. It also means the program 
won't trace any other program on that 
page. 



0930: 


0392 


FF 






= 


IFF 




0940: 


0393 


FF 






= 


$FF 




0950: 


0394 


01 






= 


$01 




0960: 


0395 


01 






= 


$01 




0970: 


0396 


00 






= 


$00 




0980: 


0397 


FF 






= 


$FF 




0990: 


0398 


FE 






= 


$FE 




1000: 


0399 


02 




TABLEN 


= 


$02 




1010: 


039A 


03 






= 


$03 




1020: 


039B 


03 






= 


$03 




1030: 


039C 


01 






= 


$01 




1040: 


039D 


01 






= 


$01 




1050: 


039E 


02 






= 


$02 




1060: 


039F 


03 






= 


$03 




1070: 


03A0 


03 




PGMEND 




$03 




1080: 
















1090: 




#• 






1100: 








• SYM 


SYSTEM ROUTINE 


ENTRY POINTS AND RAM ADDRESSES 


1110: 
1120: 








##tt#tt# 


IH^jiMMmmmmMMMJi 






1130: 


03A1 






DBRTN 




$80BB 


CHECK CARRY & TRACE OR MONITOR 


1140: 


03A1 






ERNOCR 




$8177 


"ERXX" W/0 CR/LF — JUMP TO ONLY 


1150: 


03A1 






P2SCR 




$829C 


PUT "PARM2" INTO "CURAD" 


1160: 


03A1 






P3SCR 




$82A7 


PUT "PARM3" INTO "CURAD" 


1170: 


03A1 






INCCMP 




$82B2 


BUMP "CURAD" & COMPARE TO PARM3 


1180: 


03A1 






OUTPC 




$82EE 


OUTPUT USER PROGRAM COUNTER 


1190: 


03A1 






OUTBYT 




$82FA 


PRINT A (TWO HEX DIGITS) 


1200: 


03A1 






CRLFSZ 




$8316 


OUTPUT CR/LF AND "CURAD" 


1210: 


03A1 






SPACE 




$8342 


OUTPUT ONE SPACE 


1220: 


03A1 






CRLF 




$834D 


OUTPUT CR/LF 


1230: 


03A1 






DELAY 




$835A 


DELAY ACCORDING TO TV 


12%0: 


03* 1 






INSTAT 




$8386 


GET KEY STATUS (BREAK 


1250: 








OR 


ANY KEY DOWN) 




1260: 


03A1 






INCHR 




$8A1B 


GET ASCII CHAR VIA "INVEC" 


1270: 
1280: 
1290: 
























i#i 






1300: 


03A1 






TLOW 




$A626 


TRACE LOW ADDRESS 


1310: 


03* 1 






THIGH 




$A62C 


TRACE HIGH ADDRESS 


1320: 


03*1 






SCRO 




$A630 


SYSTEM SCRATCH AREA 


T330: 


03*1 






SCR1 




$A631 


SYSTEM RAM SCRATCH AREA 1 


13itC: 


03*1 






BYTES 




$A632 


SYSTEM RAM SCRATCH AREA 2 


1350: 


03*1 






COUNT 




SCR1 


USE SCRATCH AREA 1 


1360: 


03*1 






P3L 




$A64A 


INPUT PARAMETER VALUES 


1370: 


03*1 






P3H 




$A64B 




1380: 


03*1 






P2L 




$A64C 




1390: 


03*1 






P2H 




$A64D 




UOO: 


03*1 






P1L 




$A64E 




UTO: 


03*1 






P1H 




$A64F 




U20: 


03A1 






ENDAD 




P3L 


ENDING ADDRESS IS IN P3 AREA 


T430: 
















14*^0: 


03*1 






TV 




$A656 


TRACE VELOCITY 


1450: 


03A1 






LSTCOM 




$A657 


COMMAND END INDICATOR 


U60: 


03*1 






MAXRC 




$A658 


MAXIMUM RECORD/BYTES FOR OUTPUT 


1470: 


03*1 






USREGS 




$A659 


TRACE HOLD OF USER REGISTERS 


SYMBOL TABLE 2000 2108 








ADJST 


02B6 




ADJUSH OOFD 




ADJUST OOFC 


ADVANC 031 A 


ADVILP 03 ID 




BRANCH 0283 




BYTES A632 


CHKLOP 032B 


COMSRR 0231 




COUNT 


A631 




CRLF 834D 


CRLFSZ 8316 


CURAD 


OOFE 




CURADH OOFF 




CUROP 02F4 


CURRLP 02FC 


DBRTN 


SOBB 




DELAY 


835A 




DETLEN 0324 


DETLNQ 0328 


DODELA 0376 




DSPREG 0367 




ENDAD A64A 


ERNOCR 8177 


FIXSBl 0270 




FOUND 


0337 




GETOP 0252 


HI 0353 


IKCCMP 82B2 




INCHR 


8A1B 




INITCO 0200 


INSTAT 8386 


LISTER 02EB 




LISTLP 02F1 




LO 035D 


LSTCOM A657 


HAXRC 


A658 




NOTRAN 03 7D 




OUTBYT 82FA 


OUTPC 82EE 


OUT 


02CD 




OVER 


0298 




PGMDON 0318 


PGMEND 03A0 


PQH 


A64F 




PQL 


A64E 




PRH A64D 


PRL A64C 


PRSCR 


829C 




PSH 


A64B 




PSL A64A 


PSSCR 82A7 


QUITDO 0261 




RETURN 0380 




SCRP A630 


SCRQ A631 


SIGMCH 02CE 




SIGNOK 02DD 




SKIPQ 0259 


SPACE 8342 


TABLEK 0399 




TABOUT 0383 




TABTST 038A 


TABTYP 0391 


TESTR 


02C2 




THIGH 


A62C 




TLOW A626 


TRIPLE 025E 


TV 


*656 




UP 


0233 




UPCOMM 023A 


UQ 02DE 


UQERR 


02E6 




OQSTRT 02E8 




USREGS A659 


USRTRA 0341 



August, 1979 



MICRO - The 6502 Journal 



15:15 




Buter..., 
rum.... 



14052 EAST FIRESTONE BOULEVARD 



• BUSINESS 

• EDUCATIONAL 

• PERSONAL 

SANTA FE SPRINGS, CALIFORNIA 90670 



(213)921-2111 



(714) 739-0711 



Apple II Software 



for 
the 




;appkzGomputGr 



We do not claim to have the largest selection of APPLE II software available, however, we do have a good selection and it is growing larger every 
week. This is a partial list of the software that we normally have in stock. To get a complete list of all our software, send for our new APPLE II 
software catalog that will be available next month. This catalog will give you descriptions of most of the software listed so that you can tell what 
the program will do before you buy. Due to the ease of copying software, we cannot give any refunds for any software. Should something be 
wrong with the media that the software is on, we will exchange it for a good one. Starting with this ad, we will pay all shipping and handling 
charges for orders over $25.00 in the continental United States. Orders under $25.00 add $2.50 for shipping & handling. Orders outside the U.S. 
add 10% or $10.00 whichever is more. 



001-0O015 


$20 


.00 


APPLF CHFCKBOOK 


004-07214 


$19.95 


SCREEN MACHINE 


035-06940 


$ 9 


.95 


SUB 


VIEW 




001-00021 


$15 


CO 


STARWARS/STARTREK 


O04-0722C 


$14.95 


BACKGA^WOK 


035-03652 


$ 9.95 


STAR DODGER 


001-00036 


$ 7 


50 


COLOR DEMOS /BREAKOUT 


044-C7235 


$14.95 


AFPLF '21' 


035-06891 


$ 9.95 


PERPETUAL CALENDAR 


001-00042 


$20 


00 


APPLESOFT II 


005-00460 


$19.00 


PROGRAM CATALOG [DISC) 


035-06907 


$15.95 


SUPER STARWARS 


001-00057 


$ 7 


50 


RAN. TEST 


005-00476 


$15.00 


NAME & ADDRESS (TAPE) 


035-06913 


$19.93 


INCOME TAX 19 78 


001-00063 


$ 7 


50 


BIxRCKJACK/SLOT MACK INF 


005-10502 


$19.00 


NAME & ADDRESS fDISC) 


035-06929 


$ 9.95 


COLOR STARTPEK 


001-00079 


$ 7 


50 


B I ORH YTHM/MASTERHIND 


005-00481 


$14.00 


HANGMAN W/4 60 WORDS 


035-06934 


$ 9.95 


SUB DETECT 


001-00090 


5 7 


50 


DATA MOVER/TELEPONG 


005-00497 


$ 6.95 


ME>:U ASSORTMENT 


035-06998 


$19.95 


BUSINESS & FINANCE 


001-00106 


$25 


00 


DOW JONES 


005-03904 


$14.95 


MAGAZINE FILES 


035-07031 


$19.95 


PROGR^MW.'S TALKING DISC 


001-03813 


512 


00 


BULLS AND BEARS 


009-00706 


$ 9.95 


PERSONAL EXP. RECORD 


035-07047 


$24.95 


3-D ANIMATION DISC 


001-03829 


$12 


00 


WARLORDS 


009-00712 


$ 9.95 


BLACKJACK TUTOR 


035-07052 


$19.95 


AUDIO ENGINEER DISC 


001-03634 


$12 


00 


MICROTRIVIA 


009-00728 


$ 9.95 


E0PE:IGN LEGION/COMMANDO 


035-07068 


$19.95 


EDITOR ASSEMBLER DISC 


001-03840 


$12 


00 


KIDSTUFF 


009-00733 


$ 9.95 


ROADRACE/SPACEKAR 


035-07074 


$19.95 


DATA BASF DISC 


001-03855 


512 


00 


SPORTS TRIVIA 


009-00749 


$ 9.95 


WORDSMITH/WAMPUS 


035-07089 


S19.95 


Pb!AIL MAILIKG LABLES DISC 


001-03861 


$16 


50 


TRANSACTIONAL ANALYSIS 


009-00754 


$11.95 


CODEBREAKER/SFCP.FT VJRITJWG 


035-07095 


$15.95 


ETRATO LASER 


001-03877 


$16 


50 


FINANCIAL ANALYSIS 


016-01195 


$13.50 


PRESCROOL IQ-BUILDFR 


035-O71O1 


$29.95 


COMPUREAD DISC 


002-00112 


$14 


95 


SKA RMS 


016-01238 


$13.50 


ANALOGIES 


035-07117 


$19.95 


ANALYST DISC 


002-00128 


$ 9 


95 


APPLF DERBY 


016-01259 


$13.50 


VOCABULARY BLDR. I 


035-08093 


$ 6.95 




002-00133 


f 9 


95 


APPLF CASINO 


016-01314 


$13.50 


VOCABULARY BLDR. II 


035-08121 


$34.95 


APPLFFORTH 1.2 (TAPF) 


002-00149 


$24 


95 


FILE EDITOR 


016-01271 


$13.50 


NUMBER SERIES 


035-08136 


$49.95 


APPLEFORTH 1.2 (DISC) 


0D2-0O154 


$24 


95 


ASSEMBLER 


016-01356 


$39.95 


STEP BY STEP 


035-08142 


$19.95 


APPLE PIE 1 .0 (TAPE) 


002-00160 


$ 9 


95 


FINANCIAL WIZARD-I 


016-01399 


$13.50 


WORD MASTER/STORY BUILDER 


035-08157 


$24.95 


APPLE PIE 1.0 (DISC) 


002-00176 


$ 9 


95 


FINAJJCIAL WIZARD-I I 


016-01410 


$13.50 


MEMORY BUILDER 


035-08163 


I 9.95 


HOME ACCOUNTING (TAPE) 


002-00181 


$ 9 


95 


FINANCIAL WIZARD-III 


035-03626 


$ 6.95 


FOOL'S SPOOL 


035-08-79 


$15.95 


HOM^ ACCOUNTING (DISC) 


002-00197 


$ 9 


95 


FINANCIAL WIZARD IV 


035-03631 


$ 9.95 


CONEY ISLAND 


035-08206 


$15.95 


SUPER OTHELLO 


002-00203 


$ 9 


95 


CUB IK 


035-03647 


$15.95 


DEPTH CHARGE 


0?5-08212 


$ 9.95 


LUNARSCAPE 


002-00219 


$14 


95 


STATISTICS I 


035-03668 


$ 9.95 


COUNTRY DFIVFP 


035-08228 


$19.95 


FOOTBALL PREDICTIONS 


002-00225 


$ 7 


45 


MEMORY D'JHP 


035-03674 


$ 9.95 


KALEIDOSCOPE 


035-08276 


$19.95 


STATISTICS 


002-00230 


f 9 


95 


SPACE MAZE 


035-03689 


$ 9.95 


CROSS CHASE 


035-0B281 


$ 9.95 


BIOTHYRHM 


002-01473 


$ 9 


95 


ROCKET PILOT 


035-03695 


$ 6.95 


LEAP FROG 


035-08297 


$69.95 


ASM/65 EDITOR ASSEMBLER 1.0 


002-01489 


$ 9 


95 


SAUCER INVASION 


-035-03700 


$ 9.95 


CHASE 


033-03485 


$12.95 


TANK WAR 


002-01495 


$ 9 


95 


STAR WAP 


035-03716 


$ 6.95 


ECHO 


033-03491 


$17.95 


U-DRAW 


002-01571 


$19 


95 


APPLE II ORGAh' 


035-03722 


$ 6.95 


SUB COMMAND 


033-03501 


$12.95 


MAZE GAME 


002-07123 


$ 9 


95 


WAMPUS HUNT 


035-03737 


$ 9.95 


FOOTBALL 


033-03513 


$12.95 


ESCAPE 


002-0713P 


$14 


95 


Al.'TOMOTIVF DIAGNOSIS 


035-03743 


$ 9.95 


MATCHWITS 


033-03529 


$17.95 


TEXT EDITOR 


002-07144 


$ 7 


45 


PROGRAM UNLOAD 


035-03758 


$ 9.95 


LASER TURRET 


033-C3534 


$ 9.95 


NUMBER CRUNCHER 


002-07159 


$ 9 


95 


BASIC STATISTICS 


035-03764 


$ 9.95 


TABOT CARDS 


033-03540 


$12.95 


MUSIC BOX 


002-07165 


$ 9 


95 


ELECT. ENGINEERING 


035-03770 


$15.95 


3-D DOCKING 


033-03555 


$12.95 


SIDE SHOWS 


002-07171 


$14 


95 


FUNCTION GRAPHS 


035-03785 


$ 9.95 


GALACTIC BATTLE 


033-03561 


$17.95 


ELECTRIC CRA.YON 


002-07186 


$ 9 


95 


VECTOR ANALYSIS 


035-03791 


$ 6.95 


TIME CLOCK 


033-C3577 


$ 9.95 


CHRISTMAS CAROLER 


002-07192 


$ 9 


95 


RADAR IKTFRCEPTION 


035-03807 


$15.95 


PHASOR ZAP 


033-03582 


$49.95 


DR. MEMORY 


004-OQ343 


$39 


95 


INSTANT LIBRARY (TAPE) 


035-06955 


$ 9.95 


FLYSWATTER 


042-04420 


$59.95 


TEXT EDITOR 


004-00337 


$39 


95 


INSTANT LIBRARY (DISC) 


035-06961 


$ 6.95 


QUARTERKORSE RACE 


042-04435 


$39.95 


MAILING LIST (DISC) 


004-00358 


$ 9 


95 


MUSIC KALFIDOSCOPE 


035-06977 


$ 9.95 


GUNFIGHTER 


042-04441 


$29.95 


MEMO CALENDAR (DISC) 


004-00364 


$ 9 


95 


BOMBER 


035-06982 


$ 9.95 


MAGIC SQUARES 


042-04456 


$19.95 


SINGLE DISC COPY 


004-00370 


$19 


95 


INDEX -CARD FILE 


035-07004 


$15.95 


BATTLESTAR I 


042-08763 


$24.95 


DANS DISC UTILITY 


004-00385 


$39 


95 


BEST-OF-BISHOF 


035-07010 


$ 9.95 


PIRATES 


042-08779 


$39.95 


DANS DISC UTIL/SNGL DISC CPY 


004-00391 


$12 


95 


TALKING CALCULATOR 


035-08087 


$ 9.95 


ACK ACK 


032-03368 


$14.95 


STIMULATING SIMULATIONS 


004-00406 


$19 


95 


APPLE-LIS'NER 


035-08233 


$15.95 


I CHING (TAPE) 


032-03389 


$14.95 


BRIDGE CHALLENGER 


004-00428 


$15 


95 


APPLFTALKER 


035-08249 


$19.95 


I CHING (DISC) 


032-03400 


$19.95 


MICROCHESS 


004-00433 


$12 


95 


STARWARS/ SPACE MAZE 


035-08109 


$ 6.95 


KING 


015-01152 


$19.95 


FASTGAMMOK 


004-00449 


$12 


95 


ROCKET PILOT/SAUCER IIA^ASIOK 035-08109 


$ 6.95 


KING 








004-004 54 


$19 


95 


T1C-TAC-TAI,KER/SPECTPUK ANAL 035-08115 


$ 6.95 


SCRAiffiLE 














• BUSINESS 








DESCRIPTION 


PRICE 


QUANTITY 


AMOUNT 


(^ 




14052 East Firestone oiva. 




















• EDUCATIONAL Santa Fe Springs, CA 90670 
•PERSONAL (213)921-2111 • (714)739-0711 


























NAME 










Vw, you m«y charge it! 
■ : B 0* A Care! Lj Ma8»efcharo« 






Subtotal 




ADDRESS 








m m 




Calif. Residents 6% tax 

Shipping 
- TOTAL 
_ AMOUNT ENCLOSED 




CITY 








STATE 






Expiration Date 




Hard* 






ZIP 






PHONE 








Signature 






\ / 


\ / 



It' 



Replace that PIA with a VIA 



E. D. Morris, Jr. 

3200 Washington Street 

Midland, Ml 48640 



Sound effects, timed interrupts and a versatile shift 
register are a few of the benefits offered by this useful 
hardware equipment. 



If your microcomputer board uses the 
6520 Peripheral Interface Adapter for an 
1/0 port, you might consider replacing it 
with a 6522 Versatile Interface Adapter. 
For the two dollars increase in price you 
get all the functions of the 6520 plus two 
timers, a shift register, input data latch- 
ing, and a much more powerful interrupt 
system. 

A block diagram of the VIA is shown in 
Figure 1 . The 6522 appears to the CPU as 
sixteen memory locations, compared to 
four for the 6520. Table 1 shows how the 
various registers are addressed using 
the register select pins. In some cases, 
accessing a register triggers another 
function such as resetting an interrupt 
flag or starting the timer. 

The timers are loaded with data and then 
decremented at the system clock rate to 
create a delay. This can be used to 
generate interrupts at preset intervals. 



Table 1: 6522 Register Address List 



RS3 RS2 RS1 RSO FUNCTION 



Data 
Bus" 



# 











l— > 


Port A 




Dir. 










— > 


Port B 






Dir. 






Tlwr 1 




V. 


Latch 


Counter 


^ 


Latch 


Counter 




Timer 2 




— > 


Counter 




Counter 






Interrupt 




—^ 


Flaqs 






Enables 










_^l 


Shift Req. 


#» 






V, 


Control 






Control 





L 


L 


L 


L 


I/O port B 


L 


L 


L 


H 


I/O port A 


L 


L 


H 


L 


Data direction B 


L 


L 


H 


H 


Data direction A 


L 


H 


L 


L 


Timer 1 counter low byte 


L 


H 


L 


H 


Tinner 1 counter higli byte 


L 


H 


H 


L 


Timer 1 latch low byte 


L 


H 


H 


H 


Timer 1 latch high byte 


H 


L 


L 


L 


Timer2 low byte 


H 


L 


L 


H 


Timer2 high byte 


H 


L 


H 


L 


Shift register 


H 


L 


H 


H 


Timer and shift register control 


H 


H 


L 


L 


I/O handshake control 


H 


H 


L 


H 


Interrupt flags 


H 


. H 


H 


L 


Interrupt enables 


H 


H 


H 


H 


I/O port A 



Figure 1 : Block Diagram of the 6522 



Another use is to connect an amplifier 
and speaker to the shift register output. 
By storing a 11110000 or 11001100 in the 
shift register and placing it in the free 
running mode, square waves at audio fre- 
quencies are produced. BASIC can then 
POKE constants to timer 2 to produce 
various audio tones. You can create elec- 
tronic music, or add sound effects to 
those mute game programs. In fact, this 
scheme is used for the PET sound 
effects. 

The timers can be set to cause interrupts 
at equally spaced time intervals. This 
saves the CPU the chore of keeping time 
or chasing its tail In loops to create 
delays. I found the timed interrupt very 
convenient in writing a single-step 
machine language debugging program. 
The timer is set so the CPU can just 
escape from the monitor and execute 
one step of the main program before 
another interrupt forces it back to the 
monitor. A recent issue of MICRO gives 
details of using the 6522 timers with a 
SYM computer. 



So how do you install this super chip in 
your system? Figure 2 compares the pin- 
outs of the 6520 and the 6522. Thirty-six 
of the forty pins are identical, so that is a 
good start. However changes must by 
made to your circuit board at pins 21, 22, 
37 and 38. The 6522 needs 4 address 
lines compared to 2 for the 6520. I 
jumpered RSO and RSI to address lines 2 
and 3 somewhere on the CPU board. To 
reduce foil cutting, I left RS2 and RS3 
connected to address and 1. You will 
have to make your own list of register ad- 
dresses depending how you connect the 
RS lines to your address buss. IRQ and 
R/W must be re-jumped to the proper 
pins. My CPU board did not use CSO, so 
this was no loss. 

I made this modification on an OSI 500 
CPU board (Kilobaud March 1979). After 
reading the Trouble Shooter's Corner 
(Kilobaud September 1978), I was very 
apprehensive about taking on this proj- 
ect. However the OSI board has no 
"bogus" clock pulsus running around, 
sol had no trouble. 



August, 1979 



MICRO - The 6502 Journal 



15:17 



Any of seven events can cause as inter- 
rupt and set a flag in the interrupt flag 
register. The shift register rate Is con- 
trolled either by timer 2 or by an external 
clock. Two control registers allow selec- 
tion of the many options available in the 
6522 VIA. More details of the 6522 can be 
obtained from Synertek, P.O. Box 552, 
Santa Clara CA 95052. 

So what does the 6522 gain you as far as 
programming? Well, the shift register 
can be used as a serial output port to 
drive a Teletype or printer. The baud rate 
is software controlled by the constant 
stored in timer 2. 



PA,PB 


= 


I/O Port 


CA,CB 


= 


Handshake Control 


RS 


= 


Register Select (Address) 


RES 


= 


Reset 


D 


= 


Data Bus 


CS 


= 


Chip Select 


IRQ 


= 


Interrupt 



vss- 


1 40 


PAO- 


. 


PA1- 


. 


PA2- 


. 


PA3i 


. 


PA4. 


> 


PA5- 




PA6- 


> 


PA7 


. 


PBO 


6520 


PB1 




PB2- 


. 


PB3' 


. . 


PB4- 


^ 


PB5- 


- 


PB6- 


- 


PB7. 


L 


CB1 • 


' 


CB2 


. 


Vcc- 


•20 21 • 



CA1 

CA2 

IRQA 

IRQB 

RSO 

RSI 

RES 

DO 

D1 

D2 

D3 

D4 

D5 

D6 

D7 

02 

CS1 

CS2 

CSO 

R/W 




Figure 2: Pin outs of the 6522 VIA and 6520 PI A 



T.D.O. 
TAPE DATA QUERY 



PET-8K 



SOL-IIA 



TRS-80-LEVEL II 



* FILE MANAGEMENT SYSTEM 

—Utilizes Dual Audio Cassette Recorders 

* INTERACTIVE QUERY LANGUAGE 

—English-Like Commands 
—Powerful Info Retrieval Capability 

* COMPUTERIZED BUSINESS & PERSONAL RECORDS 

—Customize Your Own File Structures 

—Create & Maintain Data Files 

—No Programming Experience Required 

* IMPLEMENTED IN BASIC 

T.D.O. CASSETTE WITH MANUAL & REF. CARD $50.00 

The Following Pre-Defined T.D.Q. File Structures 
Are Available To Solve Your Data Processing Needs: 

INVENTORY CONTROL $35.00 

ACCOUNTS RECEIVABLE $35.00 

ACCOUNTS PAYABLE $35.00 

ORDER PROCESSING $35.00 

CUSTOMER DIRECTORY $25.00 

APPOINTMENT SCHEDULING $25.00 
Each With Cassette And Manual 

Send Self-Addressed Stamped Envelope For 

Complete Software Catalogue. 

Send Check Or Money-Order To: 

H, GELLER COMPUTER SYSTEMS 

DEPT. M, P.O. BOX 350 

NEW YORK, NY 10040 

(New York Residents Add Applicable Sales Tax) 



NOW AVAILABLE 
For SOL-IIA and PET-8K 

GENERAL PACK 1 $11.00 

(Checkbook Balancer, Tic Tac Toe, Metric Conversion) 

GENERAL PACK 2 $19.00 

(Space Patrol, Biorhythm, Battlestar, One-Armed Bandit) 



FINANCIAL PACK 1 

(Loans, Depreciation, Investments) 



$13.00 



FINANCIAL PACK 2 $13.00 

(Mortgage & Loan Amortization, Future Projections, 
Risk Analysis) 

STATISTICS PACK 1 $19.00 

(Mean & Deviation, Distribution, Linear Correlation & 
Regression, Contingency Table Analysis) 

GAME PACK 1 $20.00 

(Basketball, Object Removal, Bowling, Darts, Gopher) 



GAME PACK 2 - (children - educational) 
(Arithmetic God, Addition Dice, Travel) 



$13.00 



For the KIM-1 
PCROS - A Real-Time Operating System in the $50.00 
IK KIM RAM 

Includes: Assembly listing; Cassette with user's 
manual; Schematic for relay control board 



15:18 



MICRO -The 6502 Journal 



August, 1979 



PET Cassette I/O 



No more lost files, missing data or elusive end of file 
marks! Now that great cassette I/O capability can be 
put to work. 



Ronald C. Smith 

P.O. Box 1125 

Reseda, C A 91 335 



• 



At first glance it would appear that 
cassette data storage on the Com- 
modore PET would be a snap. Upon try- 
ing it, you soon discover otherwise. 
Three major problems soon emerge to 
frustrate the uninitialed. The PET does 
not read back all of the data you wrote on 
the tape. It misses the end of file mark, 
causing the system to crash, and occa- 
sionally it even refuses to find a file 
which you have written. 

The first two problems are related. An 
end of file mark is, afterall, data, so if the 
PET is skipping data it could (and does!) 
just skip the end of file mark. Fixing the 
problem of skipping data will fix the 
problem of missing the end of file. 

The PET writes data onto the cassette 
tape in blocks of 192 characters, in- 
cluding carriage returns. The cassette 



motor is turned off in between writing 
blocks. Before writing the next block the 
motor must be turned on, and time allow- 
ed for the tape to come up to its steady, 
proper speed. Apparently, when the PET 
operating system was written, the 
cassette decks came up to speed much 
faster than the cassette units supplied 
with production PETs. 

Because of this, the pause (interblock 
gap) is insufficient. When the PET at- 
tempts to read the block back, data 
starts before the tape is up to speed, re- 
sulting in the first few bytes of the block 
being garbled. Unfortunately, those few 
bytes are what identify the block as 
data rather than noise. As a result, the 
block is ignored completely and the PET 
keeps searching until it comes to the 
next block. Of course, the tape is at its 
correct speed by now, so this block is 



100 HEM PRINT NUMERIC 

110 PR$ = STR$(PR) 

120 REM PRINT STRING 

130 im = LH + LEN(PR$) + 1 

^H0 IF LN? = 191 THEN LNJt = : 

150 PRINT#1,PR$ 

160 RETURN 

170 REM INTERBLOCK GAP 

180 DT = TI ■ 

190 POKE 59^11,53 : IF DT + 10 

200 RETURN 



GOSUB 180 



TI GOTO 190 



read properly. The bottom line is that 
you lose every other block of data! 

To solve this problem you need to funnel 
all of your output to tape through a 
subroutine. The subroutine counts how 
many characters have been written and 
placed into the tape buffer. When it 
detects that the 192nd character is about 
to be written, it should reset its counter 
to zero, start up the cassette motor, and 
pause 1/6 second before allowing the 
character to be written. To start cassette 
#1, POKE 59411,53. For cassette #2, it's 
POKE 59456,207. 

Use of this subroutine will eliminate the 
problem of skipped blocks. It will also in- 
sure that the end of file mark is not 
missed. 

The problem of unrecognized files is 
another operating system idiosyncrasy, 
fortunately much simpler to fix. Ac- 
cording to Commodore, upon occasion 
the system will not property initialize the 
tape buffer before opening a file. This 
causes the data to be placed in the 
wrong place in the memory or buffer. The 
system can't recognize the data when it 
opens for input because it just can't find 
it! The fix is simple. For tape unit #1, 
POKE 243,122; POKE 244,2 before open- 
ing the file. For tape unit #2, POKE 
243,58; POKE 244,3 before opening. 
These POKEs initialize the pointers and 
eliminate the problem. 
The subroutines shown illustrate one 
way to use the methods just described. 
Set PR or PR$ equal to the variable 
which you wish to print and jump to the 
approriate subroutine entry point. Do not 
forget to write an interblock gap before 
closing the file. 

Please note that even though you have 
stored numbers as ASCII strings on the 
tape, this is what the PET does anyway! 
You can still read it as a number. This in- 
formation should help you employ the 
great file handling capabilities built into 
your PET. 



August, 1979 



MICRO - The 6502 Journal 



15:19 



Tokens 



E. D. Morris Jr. 

3200 Washington Street 

Midland, Ml 48640 



The speed and efficiency of Microsoft BASIC result 
from an insightful software design technique. 



i 



Microsoft BASIC used in the PET and 
OSI computers is fast and memory effi- 
cient. One reason for this is that the 
BASIC commands are abbreviated 
through use of tokens. For example, if 
you write the BASIC program: 

10 IFA = BTHENGOSUB99 

you will not find the words IF, THEN or 
GOSUB should you PEEK into the BASIC 
program. If OSI owners with BASIC in 
ROM run the following in immediate 
mode: 



FOR X = 768 TO 781 

PRINT PEEK(X) 
NEXTX 
The BASIC line will look like this: 

014 310 0138 6517166 160140 57 57 

So let's try to pick this apart and see 
what happened. The leading and trailing 
O's are delimiters to separate BASIC 
lines. The "14 3" in the second and third 
byte means the next BASIC line starts at 



Table 1: OSI BASIC Token Index 



151 


PRINT 


128 


END 


174 


INT 


152 


CONT 


129 


FOR 


175 


ABS 


153 


LIST 


130 


NEXT 


176 


USR 


154 


CLEAR 


131 


DATA 


177 


FRE 


155 


NEW 


132 


INPUT 


178 


POS 


156 


TAB( 


133 


DIM 


179 


SQR 


157 


TO 


134 


READ 


180 


RND 


158 


FN 


135 


LET 


181 


LOG 


159 


SPC( 


136 


GOTO 


182 


EXP 


160 


THEN 


137 


RUN 


183 


COS 


161 


NOT 


138 


IF 


184 


SIN 


162 


STEP 


139 


RESTORE 


185 


TAN 


163 


+ 


140 


GOSUB 


186 


ATN 


164 


- 


141 


RETURN 


187 


PEEK 


165 


* 


142 


REM 


188 


LEN 


166 


/ 


143 


STOP 


189 


STR$ 


167 


(power of) 


144 


ON 


190 


VAL 


168 


AND 


145 


NULL 


191 


ASC 


169 


OR 


146 


WAIT 


192 


CHR$ 


170 


> 


147 


LOAD 


193 


LEFTS 


171 


SE 


148 


SAVE 


194 


RIGHTS 


172 


< 


149 


DEF 


195 


MID$ 


173 


SGN 


150 


POKE 


197-211 


BASIC Error 
Codes 



memory location 14 + 3*256 = 782 
(decimal). The "10 0" in the next two 
bytes indicates this is BASIC line 10 + 
0*256 = 10, If you look in a table of 
ASCII codes, 65, 66 and 57 are the ASCII 
values for A, Band 9. 

Thus our code deciphering so far yields: 
14 3 10 138 65 171 66 160 140 57 57 
\ f \ \ I / X/' 

782 #10 A B 9 9 END 

A little inspection of what is still missing 
indicates that somehow, "138" means 
IF, "171" means EQUALS, "160" means 
THEN and "140" means GOSUB. These 
are the tokens used in Microsoft BASIC. 
The following program will decode 
tokens for OSI users. 

10 REM 

20 INPUT X 

30 POKE 773, X 

40 LIST 10 
Start the program via "RUN 20" to skip 
over the first line. Then input a number 
between 65 and 195. For example, if you 
INPUT a 138, line 10 will now contain an 
IF. 

Table 1 is a list of tokens for the OSI 
system. This will help in PEEKing around 
your BASIC programs. You could even 
write a program that rewrites itself. PET 
owners: Don't worry, I haven't forgotten 
you. To look at the first line of the BASIC 
program, run in immediate mode: 

FORX= 1024 TO 1037 

PRINT PEEK{X) 

NEXTX 
Line 30 of the token decoder program 
should be changed to: 

30 POKE1029,X 

You will find the PET tokens are not iden- 
tical to OSI's. So I leave it to you to build 
your own list. 



Editor: Thanks to Alvin i. hooper, 207 
Self St., Warner Robbins, GA 31093 who 
submitted an equivalent table of OS/ 
BASIC tokens. 



15:20 



MICRO- The 6502 Journal 



August, 1979 



F€ister f ficm a speedrng fti/ni 
Able to leap tall micros 
in a single bqui 
4K RAM 
8KROM 



$279 

Ohio Scientific 
Superboard - the 
computer on a board - 
even includes a keyboard 
and interface for video 
display and a cassette 
recorder. 



IT'S 





CDmPUTERSHDP 



288 Norfolk St. (Cor, Hampshire St.) 
Cambridge, Mass. 02139 
617-661-2670 




590 Commonwealth Ave. 
Boston, Mass. 02215 
617-247-0700 



Route 16B 

Union, N.H. 03887 

603-473-2323 



A Better LIFE for Your APPLE 



An enhancement to LIFE makes it easy to establish an 
initial pattem, monitor successive generations, and 
modify the pattern at any particular generation. This 
input technique is cursor oriented and keyboard driven 
to facilitate entering complex patterns. 



L William Bradford 

7868 Naylor Avenue 

Los Angeles, CA 90045 



It was a distinct pleasure to see Richard 
F. Suitor's article, Life For Your Apple in 
MICRO 8:11. Since my introduction to 
this mathematical game through a pro- 
gram written by an associate, I have de- 
rived a great deal of pleasure from 
watching the evolution of many "life" 
forms. I was quite taken by the execution 
speed of Mr. Suitor's program, but I feel 
that his method of designating a living 
cell is awkward, especially for large com- 
plex patterns. 

I would like to pass on to other MICRO 
readers a technique employed by W.P. 
Hennessy in that very first LIFE program 
I used. While I have made sustantial 
changes to make the program easier and 
a little more versatile, the technique re- 
mains the same. 

Instead of using the inconvenient INPUT 
X,Y, the operator may move a cursor 
about the screen, depositing or erasing 
cells, or moving without disturbing cells. 
The cursor is a single white "brick" 
whose motion is controlled by depress- 
ing one of the keys described below: 



KEY 



DIRECTION OF MOTION 



N,U Bottom to Top 

E,R Left to Right 

S,D Top to Bottom 

W,L Right to Left 

The keys N, E, W, and S have a very dif- 
ferent function than the U, D, R, and L 



keys, since the former move the cursor 
without affecting the screen, while the 
latter cause a cell to be deposited or 
erased from the screen. In every case, 
the cursor moves one space per 
keystroke. 

The U, D, R, and L keys are used in two 
modes, the "write" mode and the 
"erase" mode, with "write" mode being 
the default. As an example, suppose that 
the program is in the default mode, and 
the operator depresses the U key. The 
cursor will move one space up, leaving a 
live cell in the square just vacated. The 
erase mode is entered by depressing the 
ESC key, and the write mode re-entered 
by depressing the O (as in orange) key. 

Assuming that the cursor is centered on 
a live cell, and that the program is in the 
erase mode, depressing the U key will 
cause the live cell to be deleted and the 
cursor to move up. There is no effect on 
unoccupied cells. If this sounds com- 
plicated at first, it is nonetheless simple 
in practice. 

Once a pattern has been entered, the 
RETURN key is depressed to start the 
program. I have retained the heart of Mr. 
Suitor's BASIC program which sets up 
the timing loops and calls the machine 
language subroutines. I have made some 
slight changes to his routine to generate 
a random pattern by setting up a default 



using a different ran- 



grid size and 
domization. 

In the present version of the program, ex- 
ecution will stop briefly after some 
number of generations. The number of 
generations is a function of the default 
timer loop interval which the operator 
designates. During the pause, the pro- 
gram will be examining the keyboard, 
looking for certain keys. These keys and 
their functions are described in Table 1. 

The duration of»the pause can be con- 
trolled by changing the value of the 
variable JK at statement 315. If the user 
should wish to pause after each genera- 
tion, the following statements will effect 
that change: 

306 GOSUB315:NEXTI 

350 RETURN 

366 IF IN = 82 THEN RETURN 

The program also allows the operator to 
run without any pauses provided that he 
answers in the affirmative to the ques- 
tion at statement 14. In general, this is 
the way that I run the program. 

The APPLE LIFE fan will find that the 
code presented here, when coupled with 
Richard Suitor's excellent machine 
language code, will provide many hours 
of entertainment and mental stimulation. 
John Conway's game of LIFE is surely 
one of the more exciting uses of the per- 
sonal computer. 



15:22 



MICRO - The 6502 Journal 



August, 1979 



9 



m 



Table t; Single Key Functions 



KEY FUNCTION 

P Stop execution and wait 

K Stop and clear screen, get new pattern 

X Exit to Basic 

M Stop to allow modification of pattern 

G Restart execution 



TFXT : GOTO 2 

1 Q- PF.EK (-1638U): IP a<127 TIIF.M 
l:a«a-128: POKE -16368,0: PFTI'Pr' 

2 CALL -936: VTAB 9: TAB 15: P^WT 
"** LI FE **'•: PRiriT : PRIMT 

3 PRIMT " A VERSION OF JOHN COf'WAY 
'S GAf^E OF LIFE": PRIMT 

k TAB 10: PRIfIT "WRITTEM FOR THE A 
PPLE I I" 

5 VTAB 15: PRINT " ASSEMBLY LANGUA 
GE ROUTINES IVRITTEN BY RICHARD 

F SUITOR AND PUBLISHED IN ISSUE 

6 PRINT "NO. S OF 'MICRO* COPYRIGH 
T 1978": PRIMT "BASIC ROUTINES B 
Y L.IV. BRADFORD 1978" 

7 VTAC 22: INPUT "DO YOU \;ANT INST 
RUCTIONS?", X$ 

a CALL -935 

9 IF X$='"Y" THEN 2000 
10 TEXT : GR 
12 ZZ»0 
Ik INPUT "DO YOU VIANT THE PROGRAM T 

RUN VJITHOUT EXTERNAL COM^'AND 
S",XJ 

15 If'x$#"Y" AftP X5:#"f!" THEM Ik 
: IF X$-"r!" THEN 20: IF X?;« 
"Y" THEN ZZ»1 

20 CALL -936 

21 INPUT "ENTFP. DEFAULT VALUE FOR T 
IMER INTERVAL",KX1 

32 INPUT "no YOU VMNT A RAHPOf^LY OC 
CUP! ED SPACE", X$ 

33 IF X$#"Y" AND Xf;#"N" THEf! 32 
: IF X$»"N" THEM ICJO 

1*0 INPUT " STANDARD GRID SIZE (U<X< 

39,0<Y<i*7) ",XS 
kl IF X$#"Y" AND X$#"N" THEN kO 

1 IF X$»"N" THEM ^h 

U2 Jl = l:J2«it£i: i 1 = 1: U = 3a: oOTO 

59 
5k INPUT "ENTER X DIRECTION LlfilTS 

(0 TO 39)", 11,12 

55 IF IKO OR I2>39 THEM 5k 

56 INPUT "ENTER Y DIRECTION LIMITS 
(0 TO U7)",J1,J2 

57 IF JKO OR J2>U7 THEf! 5C 

59 SI« RfiD (U)'^1:GJ= RND (3) + l 

60 GR : POKE -16302,0 

61 CALL -1998 

62 FOR I«I 1 TO 12 STEP SI 

63 FOR J = J1 TO J2 HTEP flj 



61; C0L0R = 11:X= RMP (2) + l:X = X*( 

r.::n C2)) + i: ir p.fv (x) TMFri 
coi.on=a 

G5 PLOT I, J 

66 r.'F.XT J 

67 NEXT I 
6S GOTO 292 

100 GR : POKE -16302,0 

101 COLOR=G 

105 FOR JK=0 TO 39: VLIN 0,U7 AT 
JK 

106 NEXT JK 

110 LIVE = ll:DEAD«0:CURS = 15:TEriP = 

LIVE 
115 COLORED: FOR X«=l TO 38: VLIN 

1,1*6 AT X: NEXT X 
120 X="18:Y«23 
125 SC1= SCRN(X,Y) 
128 COLOR«CURS: PLOT X,Y 
130 GOSUB 1 

132 IF Q=27 THEN TEMP=0: IF 0=79 

THEN TEM.P = 11: IF Q==27 OR a= 
79 THEN 130 

133 COLOR=TEMP 

13U IF a=69 OR a«G7 OR Q=83 OR 

Q=78 THEN C0L0R=SC1 
136 PLOT X,Y 
lliO I F 0,»13 THEN 290 
1U2 IF Q=32 THEN 200 
Ikk IF a»69 OR Q=C2 THEf! 200 
11*6 IF a=87 OR 0.= 76 THEN 210 
li;8 IF Q=8 3 OR 0-68 THEf! 2 20 
150 IF Q=7C OR n»85 THEN 230 

160 FOR JZ=1 TO 10 

161 J« PEEK (-16336): NEXT JZ 

162 GOTO 125 

200 X«X+1: IF X>38 THEN X='38: GOTO 

125 
210 X = X-1: IF X<1 THEfJ X»l: GOTO 

125 
220 Y»Y+1: IF Y>U6 THEN Y«U6: GOTO 

125 
230 Y=Y-1: IF Y<1 THEN Y=l: GOTO 

125 
290 C0LOR=0: PLOT X,Y 
292 GOTO 307 
29U FOR lal TO K3 
296 CALL 2088 
298 FOR K=l TO Kl: NEXT K 
300 CALL 2265 
302 FOR K=l TO K2 : NEXT K 

306 NEXT I 

307 KX« PPL (O)-IO 

308 IF KX>2U0 THEf! KX«KX1 

309 IF KX<0 THEN KX»0 

310 K2=KX*2:K1="KX*6 

311 K3=500/(Kl+50)+l 

312 IF ZZ'l THEf! 2gU 
315 JK«100 

320 FOR NN«1 TO JK 
325 IN« PEEK (-1538'*) 
330 IF INM27 THEf! 360 
335 POKE -16368,0 
3U0 NEXT NN 
352 GOTO 29t* 
360 IN-IN-128 
365 POKE -16368,0 

369 IF lfl«77 THEfl 120 

370 IF IN»75 THEN 10 

372 I F IN = 71 THEM 29i* 

373 IF IN = aO THEfJ 1*00 
371* FOR 1J = 1 TO 20 

375 KK= PEEK (-15336) 

376 NEXT IJ 

380 IF !N»88' THEN lOUO 
kOQ IN« PEEK (-1638^*) 



August, 1979 



MICRO - The 6502 Journal 



15:23 



I+IO IF iri>127 TIIEfl 360 

kl5 POKE -1G363,0 

klQ GHTO itOO 

1000 TEXT : CALL -936 

1001 Erip 

2000 VTAB 3: PRHiT " YOl' GEflERATE A S 
ET OF 'LIVE' CELLS": P"J f'T 

"BY f'OVlfIG THE ClinSOR WITH THE" 
: PRiriT "KEYS PESCPIBED BELOVf" 
: PRU!T 

2001 PRir!T " in THE 'WRITE' fODE THE 
SE": PRir.'T "CHARACTERS GENERATE 
A LIVE CELL": PRiriT 

2002 PRir!T " in the 'ERASE* r^DE THE 

SAf'.E": PRiriT "CHARACTERS ERASE 
A LIVE CELL" 

2003 PRiriT : PRINT "YOU START OUT If! 
THE '\/RITE' nOOE" 

200U PRINT "AND STAY THERE UNTIL YOU 
HIT 'ESC'" 

2005 PRINT : PRINT "TYPE A '0* TO RE- 
ENTER THE 'WRITE' MODE": PRINT 

2006 PRINT "U=UP D=DOWN R=RIGHT L=LEF 
T": PRINT 

2007 PRIfIT "TYPE ANY KEY TO CONTINUE" 
: GOSUD 1 

2008 CALL -93G: VTAB 2 

2009 PRINT " TO noVE l/ITHOUT WRITING" 
: PRINT " OR ERASiriG ANYTHING" 

2010 PRINT "USE THE FOLLOWING CHARACT 
ERS" 

2011 PRINT : PRINT "N'^UP S*nOWr' E = RIG 
NT W=LEFT": PRINT 

2012 PRINT "V/HEN FINISHED, HIT 'RETl'R 
N'": PRir'T 




Pygmy 



Programming 



* PRESENTS * 



APPLE BUSINESS SOFTWARE 

APPLE-DMS© 46k & disk required $49.00 

Apple data management system ... the ultimate in free- 
form systems. You define the name and length of fields 
within each record. Muiti disk capability gives you access 
to thousands of records at once with the included 
sort/edit features! The print format is also defined by the 
user for custom report generation. Uses include mailing 
labels, inventory, personnel data and other record 
keeping functions. 

APPLE-SCRIBE-2© disk or cassette $49.00 

Text processor ... the perfect addition to any business 
system. This is a non-line oriented editor that allows 
upper and lower case letters, any width paper and any 
length page. Included features are automatic headings, 
date and page number, right hand justification, search 
with universal or individual replacements. Text Is stored 
on disk or cassette for easy retrieval. 

P.O. Box 3078 • Scottsdale, AZ 85257 



2020 
2021 
2022 
202U 

2025 
2026 
2027 
2028 
2029 
2030 

2031 

201+0 

201+2 



20i+5 
2QhB 

3000 
3035 



3036 



PRIMT "AFTEF^ EACH GEN'E'^.ATI Of , YO 

U r'AY/' 

PRIffT "3Y USiriG THE APPROPRIATE 

KEY" 

PRir.'T : PRir.'T "PAUSE (TYPE A 'P' 

) OR": PRir.'T " 

PRiriT "COfiTINUE FROM THE GEflERAT 

ION Ofi THE" 

PRINT "SCREEN (TYPE A 'G' ) " 

: PRIf:T 

PRINT "RETURN TO BASIC TYPE AN ' 

X' ": PRINT 

PRINT "TYPE ANY KEY TO CONTINUE" 

: GOSUB 1: CALL -936 

PRINT "nODIFY THE PRESENT PATTER 

N (TYPE AN 'ri')" 

VTAD U: PRINT "OR TYPE A 'K' TO 

START A r!EW GAriE" 

VTAB 8: PRINT "AFTER YOU HAVE HI 

T 'S' , YOU r-.AY TYPE": PRINT 

TAB 7: PRINT "r,?,G,K, OR X" 

: PRINT 

PRINT 

PRINT " Ar APDfTinf'AL FACILITY n 

F A RANDOr'LY": PRINT "OCrUPIED S 

PACE IS ALLOViEP" 

PRU'T : PRINT 

PRINT "TYPE ANY KEY TO COriTlflUF" 

: GOSUB 1 

CALL -93ti 

PRINT : PRINT : PRINT "TYPE AMY 

KEY TO START THE GAf'.E": GOSUB 

1 

GOTO 10 



« 



eBPtfEEBCJ- 



PRESENTS IT'S 

UTILITY PAG II 




CHECKBOOK UPDATE TO DOS 

AN EXEC FILE WRITES OVER YOUR CHECKBOOK 
PROGRAM TO AUTOMATICALLY UPDATE IT TO DOS 

INDEX FILE UPDATE 

AUTOMATES BISHOP'S INDEX FILE 

FIND CONTROL CHARACTER 

WILL DISPLAY CONTROL CHARACTERS ON ANY 
CATALOG OR PROGRAM LISTING 

• SLOW LIST 

FULL STOP 6 START CONTROL WITH EXIT. WORKS 
WITH APPLESOFT OR INTEGER BASIC 

• LIST HEADERS 

PUT HEADERS ON YOUR LISTINGS WITH NO LINE 
NUMBERS OR REM STATEMENTS. AP II 

• AUTO WRITE 

AUTO WRITE INSTRUCTIONS 

USE EXEC FILES TO APPEND. ADD SUBROUTINES. 
OR EDIT PROGRAMS. CONVERT INTEGER TO APPLE- 
SOFT. DELETE ILLEGAL LINE NUMBERS ETC. ETC. 

• EXEC READER 

READS TEXT FILES FOR ABOVE 

• DISC SPACE 

COMPLETELY WRITTEN IN APPLESOFT. WORKS 
IN 3 SECONDS. GIVES FREE SECTORS AND BYTES 
WITH LISTINGS AND DOCUMENTATION., PRICE $19,95 

.*.•....•• DISC MANAGEMENT SYSTEM ••♦.•♦♦••• 

EIGHT PROGRAMS ON DISK TO PROVIDE THE USER WITH A 
COMPLETE UNDERSTANDING OF THE DISK DRIVE COMMANDS 
PLUS A UTILITY PACKAGE TO INDEX & CATAGORIZE ALL 
PROGRAMS WRITTEN FOR THE APPLE II COMPUTER. THE 
SYSTEM PROVIDES FULL SEARCH, EDITING AND DATA 
TRANSFER CAPABILITIES. 

A TWENTY-SIX PAGE BOOKLET PROVIDES DETAILED, 
EDUCATIONAL TEQUNIQUES GIVING A THROUGH UNDERSTAND- 
ING OF THE DOS COMMANDS. 

SYSTEM REQUIREMENTS: DISK II % APPLESOFT TAPE OR ROM 
PRICE $19.95 ON DISK FOR EITHER OF ABOVE 

CPROCESSED a SHIPPED WITHIN 4 DAYS) 
SEND CHECK OR MONEY ORDER TO: 

SOFTOUCH 

P.O. BOX 511 

LEOMINSTER, MASS. 01453 



EPROMfortheKIM 



Circuits and suggestions for the selection, installation 
and utilization of EPROM. This fully buffered EPROM 
board is easy to build and use. It requires no special 
interfacing. 



William C. Clements, Jr. 

Department of Chemical 

and Metallurgical Engineering 

University of Alabama 

University, AL 35486 



One of the handiest additions for the ex- 
pansion-nninded KIM owner to consider 
is an EPROM board. There^s nothing 
like being able to summon your favorite 
programs as soon as the computer is 
turned on. Most people think of PROM's 
in terms of holding BASIC or an operat- 
ing system, but there's no reason your 
favorite games and utilities shouldn't 
be there too. The most heavily used rou- 
tines in my 2708s are Hypertape and 
Browse, both from the The First Book 
of Kim, and the XIM Teletype utilities. 
Tiny BASIC will go in PROM as soon as 
I can find time to relocate it. QUICK, a 
reaction-time game from The First Book 
of Kim, is there too; it's fun, and a nice 
way to show off the computer. 

There are lots of articles from which one 
can build EPROM programmers, and 
some of these are specifically for use 
with KIM. The most EPROM for the 
money currently seems to be the 2708. 
Prices in the $6 range for 1K 8-bit words 
(650 ns access time, fine for KIM) are 
hard to beat for any type of computer 
memory. Just one of these things holds 
as much as the entire user RAM! 2708/ 
2716 programmers are also available as 
kits or assembled from dealers, but most 
are quite expensive. An exception is 
Optimal Technology's unit, which is in 
the $50 range; that's what I have, and it 
works beautifully. Incidentally, their 
programming software can be relocated 
easily by hand, and it now resides in a 
PROM too. 

There seems to be considerably less in- 
formation available on using PROMs 
with KIM. Most of the commercial 
boards and construction articles are for 
the S-100 bus, which doesn't help the 



KIM owner a bit unless he already has a 
KIMSI or similar' interface. Fortunately, 
a fully buffered EPROM board with ad- 
dress decoding is very easy to build and 
use with KIM with no special inter- 
facing. My unit is shown on the accom- 
panying schematic. It was wire-wrapped 
by hand on a small piece of Vector perf- 
board, using sockets held in place with 
G.E. silicone cement, and contains ad- 
dress decoding for up to 16 EPROM's 
beginning at address COOO hex. 

Two type 8T97 hex buffers are used to 
buffer the lower ten address lines, since 
all the EPROM's are in parallel across 
this part of the address bus. Two sec- 
tions in the second 8T97 were left over, 
and were used to buffer KIM's lines 
ABU and AB15 rather than let them be 
unused; substituting a 74LS00 in place 
of the 7400 would provide a similar load 
on the address bus, but I wanted to buf- 
fer as many address lines as I could to 
make further expansion easier. The 
74LS154 four-to-sixteen line decoder 
provides the CS signal that gates a dif- 
ferent EPROM for each IK of memory 
space, and the NAND gate activates 
this decoder when bits 14 and 15 of the 
address bus are both high (address > 
COOO). 

The vector-fetch and decode-enable sig- 
nals required by KIM are generated in 
my system by expansion RAM boards; 
you will have to provide them yourself 
if you don't already have some form of 
memory expansion. Although not shown 
on the diagram, 0.01 or 0.1 mf bypass 
capacitors were used from +5V, + 12V, 
and -5V points to ground on most ICs. 
A LM320T-5 IC regulator provided -5V 
for the 2708s from my existing power 
supply. 




There is a beneficial side-effect from 
using EPROM's which is not enough 
talked about. Use of these devices pro- 
vides a strong encouragement toward 
cleaning up and refining your program- 
ming habits! If you are not already care- 
ful that your program contains "clean" 
or non self-modifying code, you will 
quickly get into the habit if you have 
any kind of ROM board. 

A certain amount of ingenuity can often 
show you how to adapt other's soft- 
ware to PROM. If a table in page zero 
needs to be initialized before running a 
program, just append your own short 
program to move the data block from 
PROM down to page zero, and then 
transfer control to the start of the main 
program. I like to write short driver rou- 
tines like this when PROMming a pro- 
gram that requires register initialization 
from the keyboard to run different cases. 

If the program is going to be kept in 
PROM for years, it is easy to forget 
which numbers go where and at what 
times. I'd rather just have to remember 
a single starting address for each sepa- 
rate case, and let my driver program do 
the initializing. For instance, I begin 
Microchess at one address for super- 
blitz play, at another for blitz, and at a 
third for regular play. These addresses 
set the proper constants for each level 
of play; the original version required 
changes of instructions in the program 
itself, which is not possible in ROM. 
if a program is self-modifying, and you 
can't figure out how to fix it without 
starting over, don't despair; put it as is 
(unrelocated) into PROM, along with a 
little routine that copies it into lower 
memory and then transfers control to 
it there. 

Using such a routine, the program ap- 
pears to the user as though it is execut- 
ing directly from PROM except, of 
course, that the lower memory is not 
available for other uses during execu- 
tion. If that is not a problem, you could 
even store a/I your programs in PROM, 
preceded by a move routine, and be 
spared the work of relocating or modi- 
fying any of them! If you have lots of 
expansion RAM, this Is probably the 
most hassle-free way to go. However, 
you choose to do it, relocating and run- 
ning direct from PROM, or moving and 
running an unmodified program, using 
EPROM's will be a lot of fun. And think 
of all the tape you'll save! 



August, 1979 



MICRO - The 6502 Journal 



15:25 



(A-N) '^- 



■H^ +12v 



+ 5v 
TOO uf, I5v 



iddress 
Anea to 
JT97 
iddress 
suffers 



lata 

)UtpUt3 

;o KIM 
iata bus 

)B0 - DB7 
;E15 - E8) 




AB10 CE-M> 
AB11 (E-N) 
AB12 (E-P) 
AB13 CE-R) 
To KIM 
address 
bus 



15:26 



MICRO - The 6502 Journal 



August, 1979 





••*•* AIM-65 ***** 






EXCERT INCORPORATED 




P/N 




Qty 1-9 


A65-1 


AIM- 6 5 w/lK RAM 


$375 


A65-4 


AIM- 6 5 W/4K RAM 


$450 


A65-A 


Assembler ROM 


$85 


A65-B 


BASIC ROMS 


$100 



EXCERT has concentrated on the AIM-65 to guarantee YOU that the products we 
offer are fully compatible. We know how these products work since they are 
used in our systems. EXCERT can help you get the system YOU want! 



ACCESSORIES 

P/N 

PRSl +5V at 5A, +24V at 2.5A, 
+12V at lA (does not fit 
inside ENCl) $95 

PRS2 +5V at 5A, +24V at lA 

(mounts inside ENCl) $50 

ENCl AIM-65 case w/space for 
PRS2 and MEBl or MEB2 
or VIBl $45 

NEW I ENC2 ENCl w/PRS2 inside $100 

TPTl Approved Thermal Paper 

Tape, 6/165' rolls $10 

NEW I MCPl Dual 44 pin Mother Card 

takes MEBl, VIBl, PTCl $80 

MEBl 8K RAM, 8K Prom sockets, 
6522 and programmer for 
5V Eproms (2716) $245 

NEW I PTCl Prototype card same size 

as KIM-1, MEBl, VIBl $40 

VIBl Video bd w/128 char, 128 
user char, up to 4K RAM, 
light pen and ASCII keybd 
interfaces $245 

NEW I MCP2 Single 44 pin (KIM-4 

style) Mother Card takes 
MEB2, PGR2 and offers 4K 
RAM sockets $119 

w/4K RAM $169 

MEB2 16K RAM bd takes 2114 's $125 

w/8K RAM $225 
w/16K RAM $325 

NEW I PGR2 Programmer for 5V Eproms 
w/ROM finnware, up to 8 
Eproms simultaneously $195 

v/4 teactool skts $245 



SYSTEMS 
''assembled & TEgTEP'' 

All AIM-65 systems are self contained and 
have the power supply (PRS2) mounted 



inside ENCl. 

P/N 
SB65-1 
SB65-4 
SB65-4B 



''starter'' systems 



A65-1 in ENC2 
A65-4 in ENC2 
Same Plus BASIC 



"b" "c" 



P/N 
E 65-4 



$475 
$540 
$640 



MEBl MEB2 VIBl 



A65-4, ENC2, 

w/one MEB1,MEB2, 

or VIBl $775 $855 $775 

E_65-4B Same Plus BASIC $875 $955 $875 

Higher quantities and systems with other 
options quoted upon request I 

Mail Check or Money Order To: 

EXCERT, INCORPORATED 

Attn: Laurie 

4434 Thomas Avenue South 

Minneapolis, Minnesota 55410 

(612) 920-7792 

Add $5.00 for shipping, insurance, and 
handling* 

Minnesota residents add 42 sales tax. 



[p^@(iK( 



!@[FTW/®i^l 



Presents 
Software and Hardware for your APPLE 



SALES FORECAST provides the best forecast using the four 
most popular forecasting techniques: linear regression, log 
trend, power curve trend, and exponential smoothing. Neil D. 
Lipson's program uses artificial intelligence to determine the 
best fit and displays all results for manual intervention. $9.95 

CURVE FIT accepts any number of data points, distributed in 
any fassion, and fits a curve to the set of points using log 
curve fit, exponential curve fit, least squares, or a power curve 
fit. It will compute the best fit or employ a specific type of fit, 
and display a graph of the result. By Dave Garson. $9.95 

PERPETUAL CALENDAR may be used with or without a 
printer. Apart from the usual calendar functions, it computes 
the number of days between any two dates and displays suc- 
cessive months in response to a single keystroke. Written by 
Ed Hanley. $9.95 

STARWARS is Bob Bishop's version of the original and best 
game of intergallactic combat. You fire on the invader after 
aligning his fighter in your crosshairs. This is a high resolution 
game, in full color, that uses the paddles. $9.95 

ROCKET PILOT is an exciting game that simulates blasting off 
in a rocket ship. The rocket actually accelerates you up and 
over a mountain; but if you are not careful, you will run out of 
sky. Bob Bishop's program changes the contour of the land 
every time you play the game. $9.95 

SPACE MAZE puts you in control of a rocket ship that you 
must steer out of a maze using paddles or a joystick. It is a real 
challenge, designed by Bob Bishop using high resolution 
graphics and full color. $9.95 

MISSILE ANTI-MISSILE displays a target on the screen and a 
three dimensional map of the United States. A hostile sub- 
marine appears and launches a pre-emptive nuclear attack 
controlled by paddle 1. As soon as the hostile missile is fired, 
the U.S. launches its anti-missile controlled by paddle 0. Dave 
Moteles' program offers high resolution and many levels of 
play. $9.95 

MORSE CODE helps you learn telegraphy by entering letters, 
words or sentences, in English, which are plotted on the 
screen using dots and dashes. Ed Hanley's program also 
generates sounds to match the screen display, at several 
transmission speed levels. $9.95 

POLAR COORDINATE PLOT is a high resolution graphics 
routine that displays five classic polar plots and also permits 
the operator to enter his own equation. Dave Moteles' program 
will plot the equation on a seated grid and then flash a table of 
data points required to construct a similar plot on paper. $9.95 

UTILITY PACK 1 combines four versatile programs by Vince 
Corsetti, for any memory configuration. 

POSTAGE AND HANDLING 

Please add $1.00 for the first item 
and $.50 for each additional item. 

• Programs accepted for publication 

• Highest royalty paid 



• Integer to Applesoft conversion: Encounter only those 
syntax errors unique to Applesoft after using this program 
to convert any Integer BASIC source. 

• Disk Append: Merge any two Integer BASIC sources into a 
single program on disk. 

• Integer BASIC copy: Replicate an Integer BASIC program 
from one disk to another, as often as required, with a 
single keystroke. 

• Applesoft Update: Modify Applesoft on the disk to elimin- 
ate the heading always produced when it is first run, 

• Binary Copy: Automatically determines the length and 
starting address of a program while copying its binary file 
from one disk to another in response to a single key- 
stroke. $9.95 

BLOCKADE lets two players compete by building walls to 
obstruct each other. An exciting game written in integer 
BASIC by Vince Corsetti. $9.95 

TABLE GENERATOR forms shape tables with ease from direc- 
tional vectors and adds additional information such as star- 
ting address, length and position of each shape. Murray Sum- 
mers' Applesoft program will save the shape table anywhere in 
usable memory. $9.95 

OTHELLO may be played by one or two players and is similar 
to chess in strategy. Once a piece has been played, its color 
may be reversed many limes, and there are also sudden 
reverses of luck. You can win with a single move. Vince Corset- 
ti's program does all the work of keeping board details and 
flipping pieces. $9.95 

SINGLE DRIVE COPY is a special utility program, written by 
Vince Corsetti in Integer BASIC, that will copy a diskette using 
only one drive. It is supplied on tape and should be loaded onto 
a diskette. It automatically adjusts for APPLE memory size 
and should be used with DOS 3.2. $19.95 

SAUCER INVASION lets you defend the empire by shooting 
down a flying saucer. You control your position with the pad- 
dle while firing your missile at the invader. Written by Bob 
Bishop. $9-95 

HARDWARE 

LIGHT PEN with seven supporting routines. The light meter 
takes intensity readings every fraction of a second from to 
588. The light graph generates a display of light intensity on 
the screen. The light pen connects points that have been 
drawn on the screen, in low or high resolution, and displays 
their coordinates. A special utility displays any number of 
points on the screen, for use in menu selection or games, and 
selects a point when the light pen touches it. The package in- 
cludes a light pen calculator and light pen TIC TAC TOE. Neil 
D. Lipson's programs use artificial intelligence and are not 
confused by outside light. The hi-res light pen, only, requires 
48K and ROM card. $34.95 

TO ORDER 

Send check or money order to: 

P.O. Box 273 

Plymouth Meeting, PA 19462 

PA residents add 6% sales tax. 



# 



U.S. and foreign dealer and distributor inquiries invited 
All programs require 16K memory unless specified 



What's Where in the APPLE 



Professor William F. Luebbert 
Dartmouth College 
Hanover, NH 03755 



Whether you are programming in BASIC or assembly 
language, a memory map helps save time, reduce pro- 
gram size and improve performance. This is the most 
complete and up to date APPLE memory map ever 
published. 



• 



To get the most out of an APPLE, or 
any other computer with limited 
resources, It is Important to know a good 
deal about the hardware and software 
environment. 

When one graduates from simple pro- 
grams to more ambitious programs In- 
volving careful control of man-machine 
interaction, analog to digital or digital to 
analog conversion, extensive use of 
computer graphics, the control of exter- 
nal devices, database management, 
sorting, word-processing or any of a 
wide variety of interesting tasks, this 
knowledge tends to become more impor- 
tant. When (and if) one gets into real 
time programming, adding his own 
specialized interfaces, performs ac- 
tivities where one must get the absolute 
maximum speed or gets into other situa- 
tions where machine language program- 
ming is appropriate, it becomes critical. 

Not every serious programmer needs 
to become a machine language level pro- 
grammer. However, good programmers 
know that when the computer is running 
their programs there is a good deal of 
machine language code in the machine 
providing an operating environment for 
their programs. This operating environ- 
ment typically includes the system 
monitor, a BASIC interpreter and 
possibly a disk operating system (DOS) 
and/or extra ROM packages. 

When one looks at interesting pro- 
grams described in magazines and user 
group newsletters, he finds that these 
programs often contain PEEKs, POKEs 
and CALLS. These are commands which 
are extensions of BASIC (or other higher 



level languages). They are provided to 
allow one to interface with the computer 
hardware, operating environment soft- 
ware, and other machine language pro- 
grams or subprograms. 

PEEKS, POKES and CALLs all refer to 
memory locations which are identifiable 
as to what they contain or what they do. 
a PEEK examines the contents of a 
specified memory location and allows 
one to use that content in a program. 
POKE changes the contents of a 
designated memory location to some 
specified value. It can be used to change 
parameters of the operating environ- 
ment or to set up or change pieces of 
program or data. A CALL transfers pro- 
gram control to a particular memory 
location and sets up a return linkage for 
transfer back to the CALLing routine In 
the user's program. 

Pieces of the monitor or some other 
parts of the operating environment can 
often be accessed via CALLs, POKEs 
and PEEKS to modify system operation 
or to perform desired functions without 
the necessity of additional code. Usually 
this code has been carefully written in 
machine language and optimized by 
good programmers, so it runs faster and 
takes less space or less computer time 
than the same function would require if 
programmed totally by the user. 

A programming manual intended for 
serious programmers should supply 
some sort of memory map and informa- 
tion about the most important and fre- 
quently used PEEKS, POKEs and CALLs. 
A good memory map can show the user 
where he can get information from the 



computer, what potentially useful soft- 
ware is available but perhaps hidden 
away Inside the computer, and the 
"hooks" provided to perform a wide 
variety of functions by means of CALLs, 
POKES and/or PEEKs. Often it becomes 
the most well-worn section of the 
manual. Once programmers begin using 
it as a source of information, they begin 
to wish for a more complete atlas which 
will let them find more and more infor- 
mation and guide them in their own ex- 
plorations inside the computer and its 
software. 

The memory map presented here was 
developed initially as a programming aid 
for my own personal programming. Im- 
portant sources of information for its 
creation included the APPLESOFT II 
Manual, the APPLE Reference Manual, 
WOZPAC and various issues of MICRO, 
Call- Apple and NEAT as well as my own 
Investigations inside the computer. 

The map is being circulated for com- 
ment, correction and modification by 
many of the more active members of the 
New England Apple Tree User's Group. 
They have suggested valuable changes, 
corrections and additions. Inevitably 
there will still be errors and omissions. 
For these I beg your indulgence. 

This memory atlas is stored on-line on 
the Dartmouth Timeshare System in a 
database which can be used for selec- 
tive retrieval and report generation using 
standard database management soft- 
ware. The author would appreciate cor- 
rections or suggested changes or addi- 
tions. Please mail them to him at Hin- 
man, Box 6166, Dartmouth College, 
Hanover, NH 03755. 



August, 1979 



MICRO - The 6502 Journal 



15:29 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS 



MICRO MAGAZINE VERSION 



HEXLOC 


DECLOC 


NAME 


*0000-*OOFF 


0-255 




*0000-*0005 


0-5 




40000-40001 


0-1 


ROL'^ROH 


»0000 





LOCO 


*0001 


1 


LOCI 


*OOOA-*OOOC 


10-12 




*000D-*0017 


13-23 




*001A-»001B 


26-27 




»001A-*001B 


26-27 


SHAPEL^SHAPEH 


*001C 


28 




»001C 


28 


HCOLORl 


*001D 


29 


COUNTH 


»001E-*001F 


30-31 


R15L^R15H 


*0020-*004F 


32-79 




*0020 


32 


WNDLEFT 


*0021 


33 


WNDWDTH 


»0022 


34 


WNDTOP 


*0023 


35 


WNDBTM 


*0024 


36 


CH 


*0025 


37 


CV 


*0026-»0027 


38-39 


QDASL'-GQASH 


*0026-»0027 


38-39 


HDASL-HBASH 


*0028-*0029 


40-41 


DASL-^BASH 


t002A-*002B 


42-43 


BAS2L-"BAS2H 


*002C 


44 


H2 


»002C 


44 


LMNEM 


*002C-*002D 


44-45 


RTNL-^RTNH 


»002D 


45 


V2 


»002D 


45 


RMNEM 


»002D 




V2 


»0O2E 


46 


MASK 


»002E 


46 


CHKSUM 


*002E 


46 


FORMAT 


♦002F 


47 


LASTIN 


*002F 


47 


LENGTH 


♦002F 


47 


SIGN 


*0030 


48 


COLOR 


*0030 


48 


HMASK 


»0031 


49 


MODE 


»0032 


50 


INVFLG 


»0033 


51 


PROMPT 


»0034 


52 


YSAV 


$0035 


53 


YSAVl 


»0035 


53 


L 


*0036-S0037 


54-55 


CSWL-'CSWH 


*003S-*0039 


56-57 


KSWL-^KSWH 


♦003A-*003B 


58-59 


PCL-^PCH 


»003C 


60 


XQT 


*003C 




XQTNZ 


*003C-*003D 


60-61 


AIL-AIH 


*003E-»003F 


62-63 


A2L-A2H 


»0040-*0041 


64-65 


A3L-A3H 


*0042-*0043 


66-67 


A4L-A4H 


»0044 


6S 


FMT 


«0044-«0045 


68-69 


A5L-A5H 


40045 


69 


ACC 


»0046 


70 


XREG 


40047 


71 


YREG 


40048 


72 


STATUS 


40047 


73 


SPNT 


4004A-4004B 


74^75 


LOMEML'^LOMEMH 


4004C-4004D 


76-77 


HIMEML-^HIMEMH 


4004E-4004F 


78-79 


RNDL'^RNDH 


40050-40061 


80-97 




40050-40051 


80-81 


ACL'-ACH 


40050-40051 


60-81 


DXL^DXH 


40051 


81 


SHAPEX 


40052 


82 


DY 


40052-40053 


82-83 


XTNDL-^XTNDH 


40053 


83 


QDRNT 


40054 


84 


EL 


40054-40055 


84-85 


AUXL'-AUXH 


40054-40055 


84-85 


EL-^EH 


40055 


85 


EH 


40062-40066 


98-102 




40067-40068 


103-104 


START. PROG. PTR 


40067-4006A 


105-106 


LOMEM: 


4006B-4006C 


107-lOB 


ARRAY POINTER 


4006D-4006E 


109-110 


FREE SPACE PNTR 


4006F-40070 


111-112 


STRING POINTER 



USE 

HARDWARE PAGE ZERO 

JUMP INSTRUCTIONS TO CONTINUE IN APPLESOFT 

5WEET-16 (16~BIT INTERPRETER) REGISTER RO 

MONITOR MEMORY LOCATION 'LOCO' 

MONITOR MEMORY LOCATION 'LOCI' 

LOCN FOR USR FUNCTION'S JUMP INSTRUCTION 

GENERAL PURPOSE COUNTERS/FLAGS FOP APPLESOFT 

HI-RES GRAPHICS ON-THE-FLY SHAPE POINTER 

HIRES POINTER TO SHAPE LIST 

HI-RES GRAPHICS ON-THE-FLY COLOR BYTE 

HIRES RUNNING COLOR MASK 

HI-RES GRAPHICS HIGH-ORDER BYTE OF STEP COUNT FOR LINE 

SWEET-16 f 16-BIT INTERPRETER) REGISTER R15 

APPLE II SYSTEM MONITOR RESERVED LOCATIONS 



SCROLLING WINDOW 
SCROLLING WINDOW 
SCROLLING WINDOW 
SCROLLING WINDOW 
CURSOR 
CURSOR 



LEFT SIDE (0-39 OR 40-427) 

WIDTH (1-40 OR 4 1-428) (WNDLEFT+WNDWUTH-:40) 

TOP LINE (0-23 OR 40-416) 

BOTTOM LINE (0-23 OR 40-416 )( WNDBTM;;WNDT0P ) 
HORIZONTAL POSITION (0-39 OR 40-427) 
VERTICAL POSITION (0-23 OR 40v417) 



LO~RES GRAPHICS POINTER TO LEFTMOST BYTE OF CUR PLOT LINE 

HI-RES GRAPHICS ON-THE-FLY BASE ADDRESS 

MONITOR BASE ADDRESS POINTER 

MONITOR BASE ADDRESS POINTER 2 

LOW RES COLOR GRAPHICS H2 

MONITOR MEMORY LOCATION 'LMNEM' 

MONITOR RETURN POINTER 

LOW-RES COLOR GRAPHICS V2 

MONITOR MEMORY LOCATION 'RMNEM' 

MONITOR MEMORY LOCATION 'V2' 

LOW-RES COLOR GRAPHICS MASK 

MONITOR MEMORY LOCATION 'CHKSUM ' 

MONITOR .!/ MINIASSEMBLER MEMORY LOCATION 'FORMAT' 

MONITOR MEMORY LOCATION 'LASTIN' 

MONITOR .!-r MINIASSEMBLER MEMORY LOCATION 'LENGTH' 

MONITOR MEMORY LOCATION 'SIGN' 

LO-RES COLOR GRAPHICS COLOR (FDR PLOT./HLI N/VLI N FUNCTIONS 

HI-RES GRAPHICS HMASK ON-THE-FLY BIT MASK 

MONITOR it MINIASSEMBLER MEMORY LOCATION 'MODE' 

VIDEO FORMAT CONTROL; 255< 4FF ) =NORMAL. 127 ( 47F ) ^FLASHING, 63 ( 43F ) = INV 

PROMPT CHARACTER: PRINTED ON GETLN CALL 

MONITOR Zi MINIASSEMBER MEMORY LOCATION 'YSAV 

MONITOR MEMORY LOCATION 'YSAVl ' 

MINIASSEMBER MEMORY LOCATION 'L' 

PROGRAM COUNTER FOR USER EXIT ON COUT ROUTINE (MONITOR) 

PROGRAM COUNTER FOR USER EXIT ON KEYIN ROUTINE (MONITOR.* 

USER PROGRAM COUNTER SAVED HERE ON BRK TO MONITOR 

MONITOR MEMORY LOCATION 'XQT' 

MONITOR MEMORY LOCATION 'XCiTNZ' 

MONITOR WORK BYTE PAIR Al 

MONITOR WORK BYTE PAIR A2 

MONITOR WORK BYTER PAIR A3 

MONITOR WORK BYTE PAIR A4 

MINIASSEMBLER MEMORY LOCATION 'FMT' 

MONITOR WORK BYTE PAIR A5 

USER AC SAVED HERE ON BRK TO MONITOR 

USER X-REG SAVED HERE ON BRK TO MONITOR 

USER Y-REG SAVE HERE ON BRK TO MONITOR 

USER P STATUS SAVED HERE ON BRK TO MONITOR 

USER STACK POINTER SAVED HERE ON BRK 

POINTER TO LOMEM 

POINTER TO HIMEM 

16 BIT NO. RANDOMIZED WITH EACH KEY ENTRY 

GENERAL PURPOSE POINTERS FOR APPLESOFT 

MONITOR POINTER 'AC 

HIRES GRAPHICS DELTA~X FOR HLIN SHAPE 

HIRES GRAPHICS SHAPE TEMP. 

HIRES GRAPHICS DELTA-Y FOR HLIN SHAPE 

MONITOR 16-BIT POINTER 'XTND' 

HI-RES GRAPHICS QDRNT: 2 LSB ' S ARE ROTATION QUADRANT FOR DRAW 

HI-RES GRAPHICS ERROR FOR HLIN 

MONITOR 16-BIT POINTER 'AUX ' 

HI-RES GRAPHICS ERROR FOR HLIN 

HI-RES GRAPHICS ERROR FOR HLIN 

RESULT OF LAST MULTIPLY/DIVIDE 

POINTER TO BEGINNING OF PROGRAM. NORMALLY 40801 

POINTER TO START OF SIMPLE VARIABLE SPACE 

POINTER TO BEGINNING OF ARRAY SPACE 

POINTER TO END OF NUMERIC STORAGE IN USE 

POINTER TO START OF STRING STORAGE. STRINGS TO END OF MEMORY 



15:30 



MICRO - The 6502 Journal 



August, 1979 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS - MICRO MAGAZINE VERSION 



HEXLOC 


DECLOC 


NAME 


«0083-«00a4 


131-132 




«0085-»009C 


133-156 




♦0095 




PICK 


»009D-«00A3 


157-163 




»0OA4 


164 




»O0A5-*00AB 


165-171 




*OOAC-»OOAE 


172-174 




*O0AF-»00B0 


175-176 


PROGRAM POINT 


»00B1 


177 




»OOBl-»OOCe 


177-200 




*00B7 


183 


CHRGOT 


«00BB-»00B9 


184-185 




♦0OB8-»00B9 


184-185 


TXTPTR 


»00C9-»00CD 


201-205 




»OOCA-»OOCB 


202-203 


PPL~PPH 


♦OOCC-»OOCD 


204-205 


PVL^PVH 


»OOCE-»OOCF 


206-207 


ACL^ACH 


«O0D0-»00DF 


216-223 




*OOD0 


216 




♦OODE 


222 




«00E0-»00E2 


224-226 




»00E4 


228 




♦O0E5~»OOE7 


229-231 




»00E8-»00E9 


232-233 




«OOEA 


234 




«O0F0-»O0F3 


240-243 




»00F3 




SIGN 


»00F4 


244 


X2 


»OOF4-»O0F8 


244-248 




♦00F5 


245 


n2 


♦00F7 


247 


516PAG 


»00F8 


248 


XI 


♦00F9 


249 


"11 


♦OOFC 


252 


E 


*0100-»01FF 


256-511 




»0200 


512 


IN 


*0200-»02FF 


512-767 




♦0300-»03FF 


768-1023 




«0300^»03F7 


768-1015 




♦0300. ♦03AF 


768-943 




♦0320-»0321 


800-801 


XOL-^XOH 


♦0322 


802 


YO 


♦0323 


803 


3XSAV 


♦0324 


804 1 


HCOLOR 


♦0325 


805 » 


HNDX 


♦0326 


806 > 


HP AG 


♦0326 


806 \ 


HPAG 


♦0327 


807 £ 


3CALE 


♦032a-^0329 


808-809 i 


SHAPXL'^'SHAPXH 


♦032A 


810 ( 


:OLLSN 


♦03DO 


976 




♦03D0 


976 




♦03D3 


979 




♦03D6 


982 




♦03D9 


985 




♦03DC 


988 




♦03E3 


995 <i 


?95 


♦03EA 


1002 ] 


002 


♦03FS 


1016 L 


ISRADR 


♦03FB 


1019 h 


mi 


♦03FE 


1022 I 


RQADR 


♦03FE-^03FF 


1022-1023 




♦0400-^07FF 


1024-2043 




♦0478+S 


1144+S E 


RATE 


♦0478+S 


1144+S 




♦04FB+S 


1272+S £ 


TBITS 


♦04FB+S 


1272+S 




♦0578+S 


1400+S £ 


TATUS 


♦0578+S 


1400+S 




♦05F8+S 


1528+S 




♦0678+S 


1656+S E 


YTE 


♦0678+5 


1656+S 




♦06F8 


17B4+S 




♦06F8+S 


17B4+S P 


WDTH 


♦0778+S 


1912+S N 


BITS 


♦0778+S 


1912+S 




♦07F8+S 


2040+S F 


LAGS 


♦07FB+S 


2040+S 




♦0800 


2048 




♦0800-^09FF 


2048-2559 




♦0800-^OBFF 


2048-3071 





USE 

POINTER TO THE LAST-USED VARIABLE'S VALUE 

GENERAL USAGE 

MONITOR MEMORY LOCATION 'PICK' 

MAIN FLOATING-POINT ACCUMULATOR 

GENERAL USE IN FLOATING POINT MATH ROUTINES 

SECONDARY FLOATING POINT ACCUMULATOR 

GENERAL USAGE FLAGS/POINTERS 
^ POINTER TO END OF PROGRAM. NOT CHANGED BY LOMEM: 

CHRGET 3/R CALL - GETS NEXT SEQUENTIAL CHR OR TOKEN 

CHRGET ROUTINE. CALLED WHEN A-S WANTS ANOTHER CHARACTER 

CHRGOT S/R CALL. CHRGET INCREMENTS TXTPTR. CHRGOT DOES NOT 

PTR TO LAST CHAR DETAINED THRU CHRGET ROUTINE 

TXTPTR - POINTS AT NEXT CHAR OR TOKEN FROM PROG <C/A DEC 78) 

RANDOM NUMBER 

BASIC START-OF-PROGRAM POINTER 

BASIC END OF VARIABLES POINTER 

BASIC ACC 

ONERR POINTERS/SCRATCH 

POKE TOCLEAR ERROR FLAG 

WHEN ERROR OCCURS*^ ERROR CODE APPEARS HERE 

HI-RES GRAPHICS X^Y COORDINATES 

HI-RES GRAPHICS COLOR BYTE 

GENERAL USAGE FOR HI-RES GRAPHICS 

POINTER TO BEGINNING OF SHAPE TABLE 

COLLISION COUNTER FOR HI-RES GRAPHICS 

GENERAL USE FLAGS 

MONITOR & FLOATING POINT ROUTINES MEMORY LOC 'SIGN' 

MONITOR «< FLOATING POINT ROUTINES MEMORY LOC 'X2' (EXPONENT 2) 

ONERR POINTERS 

MONITOR & FLOATING POINT ROUTINES MEMORY LOC 'M2' (MANTISSA 2) 

SWEET-16 MEMORY LOCATION 'S16PAG' 

MONITOR & FLOATING POINT ROUTINES MEMORY LOC 'XI' (EXPONENT 1) 

MONITOR & FLOATING POINT ROUTINES MEMORY LOC 'Ml' (MANTISSA 1) 

MONITOR ti FLOATING POINT ROUTINES MEMORY LOC 'E' 

SUBROUTINE RETURN STACK 

MONITOR ^ MINIASSEMBLER MEMORY LOCATION 'IN' 

KEYIN (INPUT) BUFFER 

AREA CLOBBERED BY EITHER MASTER OR SLAVE DISKETTE BOOT 

OFTEN FREE SPACE. NOTE COMPETING USES OFTEN FREE SPACE CONSTRAINTS 

DECWRITER PRINTER OUTPUT (IF BLOADED FROM DISK) 

HI-RES GRAPHICS- PRIOR X-COORD SAVE AFTER HLIN OR HPLOT 

HI-RES GRAPHICS YO - MOST RECENT Y-COORDINATE 

HI-RES GRAPHICS 'BXSAV 

HI-RES GRAPHICS COLOR FOR HPLOT"^ HPOSN 

HI-RES GRAPHICS HNDX - ON-THE-FLY BYTE INDEX FROM BASE ADDRESS 

POKE 32 FOR HI-RES PGl PLOTTING" 64 FOR PAGE2 

HI-RES GRAPHICS MEM PAGE FOR PLOTTING GRAPHICS ^20 FOR PGl '"*40 FOR PG2 

ON-THE-FLY SCALE FACTOR FOR DRAW" SHAPE" MOVE 

START-OF-SHAPE-TABLE POINTER 

COLLISION COUNT FROM DRAW^DRAWl 

DOS RE-ENTRY POINT <3D0G) 

INITIALIZE OR RE-INITIALZE DOS ( 3D0G ) 

DOS 3. 1 HARD ENTRY POINT 

DOS 3. 1 ENTRY POINT FOR I/O PACKAGE 

DOS 3. 1 ENTRY POINT FOR RWTS 

DOS 3. 1 ENTRY POINT TO LOAD Y~A WITH ADDRESS AT END OF SYS BUFFER 

DOS 3. 1 ENTRY POINT TO LOAD Y~A WITH ADDRESS OF lOBLK 

DOS 3.2 ENTRY POINT FOR ROUTINE THAT UPDATES I/O HOOK TABLES 

CTL-Y WILL CAUSE JSR HERE 

NMI 'S VECTORED TO THIS LOCATION 

MONITOR MEMORY LOCATION ' IRQADR ' 

IRQ'S VECTORED TO ADDRESS WHOSE POINTER IS HERE 

SCREEN BUFFER (HARDWARE PAGES 4-7) (LOW-RES GRAPHICS Zi TEXT PAGE 1) 

SERIAL INTERFACE BAUD QUANTUM RATE. ♦!- 19200 BAUD; ♦40=300 BAUD 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT #S 

SERIAL INTERFACE: CONTAIN NUMBER OF STOP BITS (INCLUDING 1 PARITY BIT) 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT ttS 

SERIAL INTERFACE; PARITY CHECKSUM OPTIONS (SEE MANUAL) 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOTttS 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT #S 

SERIAL INTERFACE INPUT OUTPUT BUFFER 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT »S 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT #S 

SERIAL INTERFACE PRINT LINE WIDTH (# CHARS PER LINE) 

SERIAL INTERFACE NUMBER OF DATA BITS PLUS 1 FOR START BIT 

SCRATCHPAD MEMORY BYTE FOR PERIPHERAL IN SLOT #S 

SERIAL INTERFACE OPERATION MODE 

INTERRUPT RETURN MEMORY BYTE FOR PERIPHERAL IN SLOT #S 

DEFAULT INTEGER BASIC LOMEM 

AREA CLOBBERED BY EITHER MASTER OR SLAVE DISKETTE BOOT 

SECONDARY SCREEN BUFFER (TEXT U LOW-RES GRAPHICS PAGE 2) 



August, 1979 



MICRO -The 6502 Journal 



15:31 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS - MICRO MAGAZINE VERSION 



HEXLOC 



DECLOC 



NAME 



USE 



*0800- 


-*C000 


2048-49152 




*0800- 


-LOMEM 


204a-L0MEM 




»0C00 




3072 




SOCOO- 


-*1FFF 


3072-8191 




♦0CF2 




3314 




»1B00- 


-»3FFF 


4000-16383 




♦ 1B00- 


-*4000 


6912-16384 




»2000- 


-«3FFF 


8192-16383 




»3000- 


-LOMEM 


12288-LOMEM 




*3F3-»3F4 


1011-1012 




»4000- 


-♦4520 


16384-17696 




♦4000- 


-♦5FFF 


16384-24575 




♦4500 




17664 




♦4500- 


-4520 


17664-17696 




♦5600- 


-♦8000 


22016-32768 




*9600- 


-♦9853 


-27136—26541 




♦9600- 


-♦97O0 


-27136—26880 




»9701- 


-♦9802 


-26879 — 26622 




♦9801- 


-♦9853 


-26623—26541 




♦9D10- 


-? 


-25328-? 




*9D73- 


-♦A7DF 


-25229 — 25561 




»9DB9 




-29159 




♦9E4D 




-25011 




»9E7E 




-24962 




«A1B4 




-24140 




♦A1B9 




-24135 




«A1BE 




-24130 




»A1DC 




-24100 




«A1EE 




-24082 




♦AlFC 




-24068 




*A200 




-24064 




♦A200 




-24064 




♦A208 




-24056 




»A20C 




-24052 




SA223 




-24029 




♦A236 




-24010 




♦A278 




-23944 




♦A2EC 




-23828 




*A327 




-23769 




♦A330 




-23760 




*A3A5 




-23643 




♦A476 




-23434 




♦A48D 




-23411 




♦A4A5 




-23387 




♦A4B0 




-23376 




»A4E4 




-23324 




*A501 




-23295 




♦A50D 




-23283 




♦A531 




-23247 




»A54F 




-23217 




SA566 




-23210 




♦A7E0- 


♦A863 


-22560—22439 




»A8CD- 


♦A980 


-22323—22144 




♦A996- 


♦A997 


-22122—22121 




♦A998- 


♦A999 


-22120 — 22119 




♦A9A3- 


♦A9A4 


-22109 — 22108 




♦A9B5- 


♦A9B6 


-22091—22090 




♦AAOB 




-22005 




»AA3F- 


♦B2CE 


-21953 — 19762 




♦B3EF- 


♦B642 


-19473 — 18878 




SBDOO 




-17152 




♦BF6 








SBFFF 




-16384 




♦BFFF 




-16384 




♦GOOD 




-16384 


KBD -^ lOADR 


♦COOO- 


♦COOF 


-16384—16369 




♦COOO-»CFFF 


-16384—12289 




♦COlO 




-16368 


KBDSTB 


♦C010-»C01F 


-16368—16353 




♦C020 




-16352 


TAPEOUT 


♦C02X 




-16352 




SC030 




-16336 


SPKR 


♦C04X 




-16320 




♦C050 




-16304 


TXTCLR 


♦C051 




-16303 


TXTSET 


♦C052 




-16302 


MIXCLR 


♦C053 




-16301 


MIXSET 


♦C054 




- 1 6300 


LOWSCR 


♦C055 




-16299 


HI5CR 


♦C056 




-16298 


LORES 


♦C057 




-16297 


HIRES 



RANGE OF POSSIBLE SETTINGS FOR HIMEM (DEPENDING UPON MEM SIZE"" DOS 

PROGRAM STORAGE FOR ROM VERSION OF APPLESOFT 

DEFAULT LOCATION FOR START OF SHAPE TABLE AS SET BY HJ-RES SHAPE LOAD 

OFTEN FREE SPACE 

TO CNVRT A/S PROG FM ROM TO CASSETTE: LOAD PROG-^ CALL 331 4'"LIST"'SAVE 

THIS REGION OF MEMORY IS CLOBBERED BY A SLAVE DISKETTE BOOT 

RAWDOS (VERSION OF DOS USED WITH MASTER. CREATE - FROM DISK) 

HI-RES GRAPHICS PAGE 1 

PROGRAM STORAGE FOR RAM VERSION OF APPLESOFT 

DOS 3. 1 - POKE TO ZEROS TO REBOOT HELLO PROGRAM 

NORMAL LOCATION FOR KAPOR 'S HI RES TEXT SET 

HI-RES GRAPHICS PAGE 2 

CALL FOR INVERSION BY KAPOR 'S ROUTINE 

S/R W/ KAPOR 'S HI-RES TEXT SET TO INVERT WHITE TO BLACK &; VICEVERSA 

DISK OPERATING SYSTEM {D0S3. 1) 

DOS 3. 1 USER BUFFER #1 

DOS 3. 1 USER BUFFER #1 DATA BUFFER 

DOS 3. 1 USER BUFFER #1 - LIST OF SECTOR ^. TRACK NUMBERS USED 

DOS 3. 1 USER BUFFER #1 - FILE NAME 4t MISC DATA 

STARTING ADDRESSES FOR VARIOUS D0S3. 1 TASKS 

SYSTEM SECTION OF DOS 3. 1 

INITIALIZE OR RE-INITIALIZE DOS 

ROUTINE WHICH HANDLES DOS INPUT HOOK 

ROUTINE WHICH HANDLES DOS OUTPUT HOOK 

ADDRESS FOR D0S3. 1 PR# COMMAND 



m 



3. 

3. 

3. 
DOS 3. 
DOS 3. 
DOS 3. 
DOS 3. 
DOS 3. 
DOS 3. 



IN« COMMAND 
MON COMMAND 
MAXFILES COMMAND 
DELETE COMMAND 
LOCK COMMAND 
BSAVE COMMAND 
UNLOCK COMMAND 
VERIFY COMMAND 
RENAME COMMAND 
APPEND COMMAND 
OPEN COMMAND 
CLOSE COMMAND 
BLOAD COMMAND 
BRUN COMMAND 
SAVE COMMAND 
LOAD COMMAND 
RUN COMMAND 
CHAIN COMMAND 



INT COMMAND 
EXEC COMMAND 
POSITION COMMAND 



ADDRESS FOR DOS 3. 

ADDRESS FOR DOS 3. 

ADDRESS FOR DOS 

ADDRESS FOR DOS 

ADDRESS FOR DOS 

ADDRESS FOR 

ADDRESS FOR 

ADDRESS FOR 

ADDRESS FOR 

ADDRESS FOR 

ADDRESS FOR 

ADDRESS FOR DOS 3. 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR 0033. 1 WRITE COMMAND 

ADDRESS FOR DOS 3. 1 READ COMMAND 

ADDRESS FOR DOS 3. 1 I NIT COMMAND 

ADDRESS FOR DOS 3. 1 NOMON COMMAND 

ADDRESS FOR DOS 3. 1 FP COMMAND 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

ADDRESS FOR DOS 3. 1 

DOS COMMAND TABLE 

DOS ERROR MSG TABLE 

DOS INTERNAL HOOK ADDRESS TO OUTPUT A CHARACTER 

DOS INTERNAL HOOK ADDRESS TO INPUT A CHARACTER 

LENGTH OF BLOADED FILE 

STARTING ADDRESS OF BLOADED FILE 

START OF LIST OF POINTERS TO SECTIONS OF DOS 3. 1 I/O PACKAGES 

DOS 3. 1 I/O PACKAGE 

DOS 3. 1 SYSTEM BUFFER (FOR CATALOG ETC. ) 

ROUTINE WHICH READS IN DIRECTORY OFF DISK 

VOL NO OF CURRENT DISK 

HIGHEST RAM MEMORY ADDRESS 

DEFAULT INTEGER BASIC HIMEM (W/0 DOS^ 48K MACHINE) 

READ KEYBOARD. IF VAL>127 THEN KEY WAS PRESSED 

KEYBOARD INPUT SUBROUTINE 

ADDRESSES DEDICATED TO HARDWARE FUNCTION 

CLEAR KEYBOARD STROBE. POKE AWAYS AFTER READING KBD. 

CLEAR KEYBOARD STROBE SUBROUTINE 

MONITOR MEMORY LOCATION 'TAPEOUT' 

TOGGLE CASSETTE OUTPUT 

PEEK TO TOGGLE SPEAKER 

OUTPUT STROBE TO GAME I/O CONNECTOR 

POKE TO O TO SET GRAPHICS MODE 

POKE TO SET TEXT MODE 

POKE O TO SET BOTTOM 4 LINES TO GRAPHICS 

POKE=0 TO SELECT TEXT/GRAPHICS MIX (BOTTOM 4 LINES TEXT) 

POKE TO O TO DISPLAY PRIMARY PAGE (PAGE 1) 

POKE TO TO DISPLAY SECONDARY PAGE (PAGE2) 

POKE TO O TO SET LO-RES GRAPHICS 

POKE TO TO SET HI-RES GRAPHICS 



15:32 



MICRO - The 6502 Journal 



August, 1979 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS - MICRO MAGAZINE VERSION 



HEXLOC 


DECLOC 


NAME 


*C058 


-16296 




»C059 


-16295 




*C05A 


-16294 




»C05B 


-16293 




*C05C 


-16292 




»C05D 


-16291 




»C05E 


-16290 




*C05F 


-16289 




*C060 


-16288 


TAPEIN 


•C060/8 


-16288 




»C061 


-16287 




*C062 


-16286 




*C063 


-16285 




♦C064 


-16188 


PADDLO 


SC064/C 


-1618S 




SC065/D 


-16187 




♦C066/E 


-16186 




*C067/F 


-16185 




»C070 


-16272 


PTRIG 


*C07X 


-16272 


PTRIG 


*coax 


-16256 




*C09X 


-16240 




*COAX 


-16224 


DEVICE 


»COBX 


-16208 




»COCX 


-16192 




»CODX 


-16176 




»C0E8 


-16152 




»C0E9 


-16151 




*COEX 


-16160 




SCOFX 


-16144 




♦ClOO 


-16128 




*C100 


-16128 




»C200 


-15842 




SC300 


-15616 




»C400 


-15360 




♦C500 


-15104 




♦C600 


-14848 




»C700 


-14592 




»C800-»CFFF 


-14336 — 12289 




SC93D 


-14109 




♦C941 


-14105 




SCSOO 


-16384+256*5 




♦DOOO 


-12288 


SETHRL 


*D000-»D3FF 


-12288—11265 




*D000-»D7FF 


-12288—10241 




*DOOE 


-12274 


HCLR 


*D010 


-12272 


BKGNDO 


«D012 


-12270 


BKGND 


♦DIFC 


-11780 




♦D2F9 


-11527 




♦D30E 


-11506 




♦D314 


-11500 




•D331 


-11471 




♦D337 


-11465 




♦D33A 


-11462 




♦D3B9 


-11335 




♦D4BC 


-11076 




»D4F2 


-11022 




♦D535 


-10955 




«D6DD 


-10531 




»D6E7 


-10521 




»D717 


-10473 




♦D800-«DFFF 


-10240 — 8193 




♦DD67 


-8867 




♦DEC9 


-8503 




♦EOOO 


-8192 


BASIC 


♦E000-«E7FF 


-8192—6145 




«^003 


-8189 


BASICS 


♦E36B 


-7317 


MEMFUL 


»E51B 


-6885 




♦E6FB 


-6408 




*E800-«EFFF 


-6144 — 4097 




«EE;6a 


-4504 


RNGERR 


*F000-»F7FF 


-4096 — 2049 




♦FllE 


-3810 


ACADR 


SF666 


-2458 




♦F689 


-2423 




♦F800 


-2048 


PLOT 


♦FSOO 


-2048 


PLOT 


♦FSOO-^FFFF 


-2048— 1 





1 APPEARS IN BIT 7 
1 APPEARS IN BIT 7 



USE 

POKE TO CLEAR GAME I/O OUTPUT ANO 

POKE TO SET GAME I/O OUTPUT ANO 

POKE TO CLEAR GAME I/O OUTPUT AN 1 

POKE TO SET GAME I/O OUTPUT AN 1 

POKE TO CLEAR GAME I/O OUTPUT AN2 

POKE TO SET GAME I/O OUTPUT AN2 

POKE TO CLEAR GAME I/O OUTPUT AN3 

POKE TO SET GAME I/O OUTPUT AN3 

MONITOR MEMORY LOCATION 'TAPEIN' 

STATE OF 'CASSETE DATA IN' APPEARS IN BIT 7 

PEEK TO READ PDL(O). IF >127 SWITCH ON 

PEEK TO READ PDL(l) PUSH BUTTON SWITCH 

PEEK TO READ PDL(2) PUSH BUTTON SWITCH 

MONITOR MEMORY LOCATION PADDLO 

STATE OF TIMER OUTPUT FOR PADDLE 

STATE OF TIMER OUTPUT FOR PADDLE 

STATE OF TIMER OUTPUT FOR PADDLE 2 APPEARS IN BIT 7 

STATE OF TIMER OUTPUT FOR PADDLE 3 APPEARS IN BIT 7 

MONITOR MEMORY LOCATION 'PTRIG' (PADDLE TRIGGER) 

TRIGGERS PADDLE TIMERS DURING PHI-2 

DEVICE SELECT 

DEVICE SELECT 1 
? DEVICE SELECT 2 

DEVICE SELECT 3 

DEVICE SELECT 4 

DEVICE SELECT 5 

ADDRESS TO POWER DOWN DISK IN SLOT 6 

ADDRESS TO POWER UP DISK IN SLOT 6 

DEVICE SELECT 6 

DEVICE SELECT 7 

CALL -16128 IS EQUIVALENT TO PR#1 FOR INITIALIZING SERIAL INTERFACE 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #1 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #2 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT tt3 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #4 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #5 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #6 

STANDARD CHARACTER I/O SUBROUTINE ENTRY POINT FOR SLOT #6 

PIN 20 ON ALL PERIPM CONCTRS GOES LOW DURING PHIO ON READ OR WRITE 

SERIAL INTERFACE BATCH INPUT ROUTINE. A1&A2 SPECIFY MEMORY RANGE 

SERIAL INTERFACE BATCH OUTPUT ROUTENE - Al ^ A2 SPECIFY MEMORY RANGE 

TRANSMIT ASCII CHAR IN ACCUMULATOR OUT VIA SERIAL INTERFACE IN SLOT 5 

HI-RES GRAPHICS INIT S/R CALL (ROM VERSION) 

HI-RES GRAPHICS ROM 

ROM SOCKET DO 

HI-RES GRAPHICS CLEAR S/R CALL 

HI-RES GRAPHICS 'BKGNDO (HCOLORl SET FOR BLACK BKGND) 

HI-RES GRAPHICS MEMORY LOCATION 'BKGND' (ROM) 

HI -RES GRAPHICS FIND S/R CALL: PARAM-SHAPE'^ROT'^SCALE 

HI-RES GRAPHICS POSN S/R CALL PARAM- XO^'YO'^COLR 

HI-RES GRAPHICS PLOT S/R CALL PARAM= XCYCCOLR 

HI-RES GRAPHICS LINE S/R CALL PARAM= XCYO'^COLR 

HI-RES GRAPHICS BKGND S/R CALL PARAM= COLR 

HI-RES GRAPHICS LINE S/R CALL: PARAM=XO"'YO'^COLR 

HI-RES GRAPHICS DRAWl S/R CALL: PARAM= XO'^YO'^COLR'^SHAPE'^ROT^'SCALE 

HI-RES GRAPHICS SHLOAD S/R CALL 

INTEGER BASIC PA«1 APPEND PROGRAM ENTRY 

TO CONVERT A/S FM CASSETTE TO ROM- LD FM CASS'-CALL -1 1022^L IST-^SAVE 

INTEGER BASIC PA#1 TAPE VERIFY PROG ENTRY 

INTEGER BASIC PA#1 RENUMBER PROG ENTRY (WHOLE PROG) 

INTEGER BASIC PA#1 RENUMBER PROG ENTRY (PART PROG) 

INTEGER BASIC PA«1 MUSIC PROG ENTRY 

ROM SOCKET D8 

FRMNUM S/R. EVALS FORMULA EXP. INTO FLOATING PT ACCUM 

SNERR S/R. PRINTS "SYNTAX ERROR" AND HALTS PROG 

ENTER INTEGER BASIC 

ROM SOCKET EO (INTEGER BASIC) 

ENTRY 2 OF INTEGER BASIC 

INTEGER BASIC MEMORY FULL ERROR 

INTEGER BASIC DECIMAL LPRINT S/R 

GETBYT S/R. EVALS FORMULA 8/. CONVTS TO 1-BYT VAL IN X REG 

ROM SOCKET E8 (INTEGER BASIC) 

INTEGER BASIC RANGE ERROR 

ROM SOCKET FO (IK INTEGER BASIC 1 K MONITOR) 

HI-RES GRAPHICS 2~BYTE TAPE READ SETUP 

TURN ON MINIASSEMBLER 

SWEET- 16 INTERPRETER ENTRY 

MONITOR S/R PLOT A POINT (LO-RES) AC: Y-COORD Y; X-COORD 

MONITOR S/R PLOT A POINT. AC : Y-COORD-^Y: X-COORD 

ROM SOCKET FS (MONITOR) 



August, 1979 



MICRO - The 6502 Journal 



15:33 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS - MICRO MAGAZINE VERSION 



HEXLOC 


DECLOC 


NAME 


»F80C 


-2036 


RTMASK 


♦F80E 


-2034 


PLOTl 


»F819 


-2023 




•FBI 9 


-2023 


HLINE 


»FB1C 


-2020 


HLINEl 


*F8S6 


-2010 


VLINE2 


»F828 


-2008 


VLINE 


♦FB31 


-1999 


RTSl 


»F832 


-1998 


CLRSCR 


♦F832 


-1998 


CLRSCR 


*FB36 


-1994 


CLRTOP 


♦FB38 


-1992 


CLRSC2 


♦F83C 


-1988 


CLRSC3 


♦F847 


-1977 


GBASCALC 


»FB56 


-1962 


GBCALC 


♦FSSF 


-1953 


NXTCDL 


♦F864 


-1948 


SETCOL 


♦F871 


-1935 


SCRN 


♦F871 


-1935 


SCRN 


♦F879 


-1927 


SCRN2 


♦F87F 


-1921 


RTMSKZ 


*F882 


-1918 


INSDSl 


♦FSSE 


-1906 


INSDS2 


»Fe9B 


-1893 


I EVEN 


♦F8A5 


-1883 


ERR 


♦F8A9 


-1879 


GETFMT 


♦FSBE 


-1858 


MNNDXl 


»FSC2 


-1854 


MNNDX2 


»F8C9 


-1847 


MNNDX3 


»F8D0 


-1840 


INSTDSP 


»FeD4 


-1836 


PRNTOP 


♦FBDB 


-1829 


PRNTBL 


»F8F5 


-1803 


PRMNl 


»F8F9 


-1799 


PRMN2 


♦F910 


-1776 


PRADRl 


♦F914 


-1772 


PRADR2 


»F926 


-1754 


PRADR3 


»F92A 


-1750 


PRADR4 


»F930 


-1744 


PRADR5 


»F938 


-1736 


R EL ADR 


♦F940 


-1728 


PRNTYX 


»F941 


-1727 


PRNTAX 


♦F944 


-1724 


PRNTX 


»F94e 


-1720 


PRBLNK 


»F94C 


-1716 


PRBL2 


»F94C 




PRBL3 


»F953 


-1709 


PCADJ 


»F954 


-1708 


PCADJ2 


»F956 


-1706 


PCADJ4 


»F961 


-1695 


RTS2 


»F962 


-1694 


FMTl 


♦F9A6 


-1626 


FMT2 


»F9B4 


-1612 


CHARl 


»F9BA 


-1606 


CHAR 2 


♦F9C0 


-1600 


MNEML 


»FAO0 


-1536 


MNEMR 


»FA43 


-1469 


STEP 


»FA4E 


-1458 


XQINIT 


»FA78 


-1416 


XQl 


»FA7A 


-1414 


XQ2 


♦FAB6 


-1402 


IRQ 


♦FA92 


-1390 


BREAK 


♦FA9C 


-1380 


XBRK 


»FAA5 


-1371 


XRTI 


♦FAA9 


-1367 


XRTS 


♦FAAD 


-1363 


PCINC2 


♦FAAF 


-1361 


PCINC3 


♦FAB9 


-1351 


XJSR 


♦FAC4 


-1340 


XJMP 


*FAC5 


-1339 


XJMPAT 


♦FACD 


-1331 


NEWPCL 


♦FADl 


-1327 


RTNJMP 


♦FAD7 


-1321 


REGDSP 


♦FADA 


-1318 


RGDSPl 


»FAE4 


-1308 


RDSPl 


♦FAFD 


-1283 


BRANCH 


♦FBOB 


-1269 


NBRNCH 


»FB11 


-1263 


INITBL 


♦FB19 


-1255 


RTBL 


♦FBIE 


-1250 


PREAD 


♦FB25 


-1243 


PREAD2 



USE 

MONITOR MEMORY LOCATION 'RTMASK' 

MONITOR MEMORY LOCATION 'PLOTl' 

HLINE S/R (SEE CALL-APPLE NOV/DEC 78 PG4 ) 

MONITOR S/R TO DRAW A HORIZONTAL LINE (LO-RES) 

MONITOR MEMORY LOCATION 'HLINEl' 

MONITOR MEMORY LOCATION 'VLINEZ' 

DRAW A VERTICAL LINE 

MONITOR MEMORY LOCATION 'RTSl' 

CLEAR SCREEN - GRAPHICS MODE 

CLEAR LOW RES GRAPHICS SCREEN 1 

MONITOR MEMORY LOCATION 'CLRTOP' 

MONITOR MEMORY LOCATION 'CLRSC2' 

MONITOR MEMORY LOCATION 'CLR5C3' 

MONITOR S/R TO CALCULATE GRAPHICS BASE ADDRESS 

MONITOR MEMORY LOCATION 'GBCALC 

MONITOR S/R - INCREMENT COLOR BY 3 

MONITOR S/R TO ADJUST COLOR BYTE FOR BOTH HALVES EQUAL 

SCRN S/R (LO-RES GRAPHICSMSEE CALL-APPLE DEC78) 

MONITOR S/R TO GET SCREEN COLOR. AC : Y-COORD'-Y; X-COORD 

MONITOR MEMORY LOCATION 'SCRN2' 

MONITOR MEMORY LOCATION 'RTMSKZ' 

MONITOR MEMORY LOCATION 'INSDSl' 

MONITOR S/R - DISASSEMBLER ENTRY 

MONITOR MEMORY LOCATION 'lEVEN' 

MONITOR MEMORY LOCATION 'ERR' 

MONITOR MEMORY LOCATION GETFMT 

MONITOR MEMORY LOCATION 'MNNDXl' 

MONITOR MEMORY LOCATION 'MNNDX2' 

MONITOR MEMORY LOCATION 'MNNDX3' 

MONITOR 8t MINIASSEMBLER MEMORY LOCATION 'INSTDSP' 

MONITOR MEMORY LOCATION 'PRNTOP' 

MONITOR MEMORY LOCATION 'PRNTBL' 

MONITOR MEMORY LOCATION 'PRMNl' 

MONITOR MEMORY LOCATION 'PRMN2' 

MONITOR MEMORY LOCATION 'PRADRl' 

MONITOR MEMORY LOCATION 'PRADR2' 

MONITOR MEMORY LOCATION 'PRADR3' 

MONITOR MEMORY LOCATION 'PRADR4' 

MONITOR MEMORY LOCATION 'PRADR5' 

MONITOR MEMORY LOCATION 'RELADR' 

MONITOR S/R- PRINT CONTENTS OF Y AND X AS 4 HEX DIGITS 

MONITOR MEMORY LOCATION 'PRNTAX' 

MONITOR MEMORY LOCATION 'PRNTX' 

MONITOR MEMORY LOCATION 'PRBLNK' 

MONITOR S/R- PRINT BLANKS: X REG CONTAINS NUMBER TO PRINT. 

MONITOR MEMORY LOCATION 'PRBL3' 

MINIASSEMBLER MEMORY LOCATION 'PCADJ' 

MONITOR & MINIASSEMBLER MEMORY LOCATION 'PCADJ2' 

MONITOR MEMORY LOCATION 'PCADJ4' 

MONITOR MEMORY LOCATION 'RTS2' 

MONITOR MEMORY LOCATION 'FMTl' 

MONITOR MEMORY LOCATION 'FMT2' 

MONITOR &t MINIASSEMBER MEMORY LOCATION 'CHARl ' 

MONITOR & MINIASSEMBLER MEMORY LOCATION 'CHAR2' 

MONITOR & MINIASSEMBLER MEMORY LOCATION 'MNEML' 

MONITOR 8t MINIASSEMBER MEMORY LOCATION 'MNEMR' 

MONITOR 5/R- PERFORM A SINGLE STEP 

MONITOR MEMORY LOCATION 'XQINIT' 

MONITOR MEMORY LOCATION 'XQl' 

MONITOR MEMORY LOCATION 'XQ2' 

MONITOR S/R- IRQ HANDLER 

MONITOR S/R - BREAK HANDLER 

MONITOR MEMORY LOCATION 'XBRK' 

MONITOR MEMORY LOCATION 'XRTI' 

MONITOR MEMORY LOCATION 'XRTS' 

MONITOR MEMORY LOCATION 'PCINC2' 

MONITOR MEMORY LOCATION 'PCINC3' 

MONITOR MEMORY LOCATION 'XJSR' 

MONITOR MEMORY LOCATION 'XJMP' 

MONITOR MEMORY LOCATION 'XJMPAT' 

MONITOR MEMORY LOCATION 'NEWPCL' 

MONITOR MEMORY LOCATION 'RTNJMP' 

MONITOR S/R TO DISPLAY USER REGISTERS 

MONITOR MEMORY LOCATION 'RGDSPl' 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 



• 



RDSPl ' 

BRANCH' 

NBRNCH' 

INITBL' 

RTBL ' 

MONITOR S/R TO READ PADDLE. X-REG CONTAINS PADDLE NUMBER 
MONITOR MEMORY LOCATION 'PREAD2 ' 



0-3 



15:34 



MICRO -The 6502 Journal 



August, 1979 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS 



MICRO MAGAZINE VERSION 



HEXLOC 



DECLOC 



*FB2E 


-1234 


RTS2D 


*FB2F 


-1233 


TNIT 


*FB39 


-1223 


SETTXT 


♦FB40 


-1216 


SETGR 


♦ FB4B 


-1205 


SETWND 


♦FB5B 


-1189 


TABV 


♦FB60 


-1184 


MULPM 


♦FB63 


-1181 


MUL 


»FB65 


-1179 


MUL2 


♦FB6D 


-1171 


MUL3 


♦FB76 


-1162 


MUL4 


♦FB78 


-1160 


MUL 5 


»FB81 


-1151 


DIVPM 


»FBS4 


-1148 


DIV 


«FB86 


-1146 


DIV2 


♦FBAO 


-1120 


DIV3 


»FBA4 


-1116 


MDl 


♦FBAF 


-1105 


MD2 


♦FBB4 


-1100 


MD3 


♦FBCO 


-1088 


MDRTS 


♦FBCl 


-1087 


BASCALC 


♦FBDO 


-1072 


BSCLC2 


♦FBD9 


-1063 


BELLI 


»FBE4 


-1052 


BELL2 


♦FBEF 


-1041 


RTS2B 


♦FBFO 


-1040 


STOADV 


♦FBF4 


-1036 


ADVANCE 


»FBFC 


-1028 


RTS3 


♦FBFD 


-1027 


VIDOUT 


♦FCIO 


-1008 


BS 


»FC1A 


-998 


UP "- CURSUP 


♦FC22 


-990 


VTAB 


♦FC24 


-988 


VTABZ 


♦FC2B 


-981 


RTS4 


♦FC2C 


-980 


ESCl 


♦FC42 


-958 


CLREOP 


♦FC46 


-954 


CLEOP 1 


*FC58 


-936 


HOME 


♦FC62 


-926 


CR 


♦FC66 


-922 


LF 


♦FC70 


-912 


SCROLL 


♦FC76 


-906 


SCRLl 


♦FC8C 


-884 


SCRL2 


*FC95 


-875 


SCRL3 


*FC9C 


-868 


CLREOL 


♦FC9E 


-866 


CLE0L2 


♦FCAO 


-864 


CLE0L2 


»FCA8 


-856 


WAIT 


♦FCA9 


-855 


WAIT2 


♦FCAA 


-854 


WAIT3 


»FCB4 


-844 


NXTA4 


♦FCBA 


-838 


NXTAl 


♦FCC8 


-824 


RTS4B 


♦FCC9 


-823 


HEADR 


*FCD6 


-810 


WRBIT 


♦FCDB 


-805 


2ERDLY 


♦FCE2 


-798 


ONEDLY 


♦FCE5 


-795 


WRTAPE 


♦FCEC 


-798 


RDBYTE 


•FCEE 


-786 


RDBYT2 


♦FCFA 


-774 


RD2BIT 


♦FCFD 


-771 


RDBIT 


♦FDOC 


-756 


RDKEY 


♦FDIB 


-741 


KEY IN 


♦FD21 


-735 


KEYIN2 


♦FD2F 


-721 


ESC 


♦FD3!> 


-715 


RDCHAR 


♦FD3D 


-707 


NOTCR 


♦FDUF 


-673 


NOTCRl 


«FD62 


-670 


CANCEL 


♦FD67 


-665 


GETLNZ 


♦FD6A 


-662 


GETLN 


♦FD71 


-655 


BCKSPC 


♦FD75 


-651 


NXTCHAR 


♦FD7E 


-642 


CAPTST 


♦FD80 


-640 


INSTDSP 


»FD84 


-636 


ADDINP 


♦FD8E 


-626 


CROUT 


♦FD92 


-622 


PRAl 


♦FD96 


-618 


PRYX2 



USE 

MONITOR MEMORY LOCATION 'RTS2D' 

MONITOR S/R- SCREEN INITIALIZATION 

MONITOR S/R- SET SCREEN TO TEXT MODE. CLOBBERS ACCUMULATOR 

MONITOR S/R- SET GRAPHIC MODE (GR> CLOBBERS ACCUMULATOR 

MONITOR S/R- SET NORMAL WINDOW 

MONITOR MEMORY LOCATION 'TABV 

MONITOR MEMORY LOCATION 'MULPM' 

MONITOR S/R- MULTIPLY ROUTINE 

MONITOR MEMORY LOCATION 'MUL2' 

MONITOR MEMORY LOCATION 'MUL3' 

MONITOR MEMORY LOCATION 'MUL4' 

'MUL5' 

'DIVPM' 



'DIV3' 
'MDl ' 
'MD2' 



MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR S/R- DIVIDE ROUTINE 

MONITOR MEMORY LOCATION 'DIV2' 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 'MD3' 

MONITOR MEMORY LOCATION 'MDRTS' 

MONITOR S/R- CALCULATE TEXT BASE ADDRESS 

MONITOR MEMORY LOCATION 'BSCLC2' 

MONITOR MEMORY LOCATION 'BELLI' 

MONITOR S/R- SOUND BELL (BEEPER) 

MONITOR MEMORY LOCATION 'RTS2B' 

MONITOR MEMORY LOCATION 'STOADV 

MONITOR S/R- MOVE CURSOR RIGHT 

MONITOR MEMORY LOCATION 'RTS3' 

MONITOR S/R- OUTPUT A-REGISTER AS ASCII ON TEXT SCREEN 1 

MONITOR S/R TO MOVE CURSOR LEFT (BACKSPACE) 

MONITOR S/R TO CURSOR UP 

MONITOR S/R- PERFORM A VERTICAL TAB TO ROW SPECIFIED IN ACCUM (*0-*17> 

MONITOR MEMORY LOCATION 'VTABZ' 

MONITOR MEMORY LOCATION 'RTS4' 

MONITOR S/R- PERFORM ESCAPE FUNCTIONS 

MONITOR S/R TO CLEAR FROM CURSOR TO END OF PAGE. CLOBBERS ACC St Y-REG 

MONITOR MEMORY LOCATION ' CLEOP 1 ' 

MONITOR S/R TO HOME CURSOR S< CLEAR SCREEN. CLOBBERS ACCUM & Y-REG 

MONITOR S/R TO PERFORM A CARRIAGE RETURN 

MONITOR S/R TO TO PERFORM A LINE FEED 

MONITOR S/R TO SCROLL UP 1 LINE. CLOBBERS ACCUM & Y-REG 

MONITOR MEMORY LOCATION 'SCRLl' 

MONITOR MEMORY LOCATION 'SCRL2' 

MONITOR MEMORY LOCATION 'SCRL3' 

MONITOR S/R TO CLEAR TO END OF LINE 

MONITOR MEMORY LOCATION 'CLEOLZ ' 

MONITOR MEMORY LOCATION 'CLE0L2' 

CALL FOR WAIT LOOP 

MONITOR MEMORY LOCATION 'WAIT2' 

MONITOR MEMORY LOCATION 'WAIT3' 

MONITOR S/R TO INCREMENT A4 (16 BITS) THEN DO NXTAl 

MONITOR S/R TO INCREMENT Al (16 BITS). SETT CARRY IF RESULT :>=A2. 

MONITOR MEMORY LOCATION 'RTS4B ' 

'HEADR' 

'WRBIT' 

'ZERDLY' 

'ONEDLY' 

'WRTAPE ' 

'RDBYTE' 

'RDBYT2' 



MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR TWO-EDGE TAPE SENSE 

MONITOR MEMORY LOCATION 'RDBIT' 

GET KEY INPUT FROM THE KEYBOARD. CLOBBERS ACC "- Y-REG 

MONITOR S/R- MONITOR KEYIN ROUTINE 

MONITOR MEMORY LOCATION KEYIN2 

MONITOR MEMORY LOCATION 'ESC 

CALL TO READ KEY h PERFORM ESCAPE FUNCTION IF NECESSARY. 

MONITOR MEMORY LOCATION 'NOTCR' 

MONITOR MEMORY LOCATION 'NOTCRl' 

MONITOR S/R TO PERFORM A LINE CANCEL (\) 

MONITOR S/R TO PERFORM CARRIAGE RETURN AND GET A LINE OF TEXT 

MONITOR S/R TO GET LINE OF TEXT FROM KEYED. X RETND W/ # OF CHARS " 

MONITOR MEMORY LOCATION 'BCKSPC 

MONITOR MEMORY LOCATION 'NXTCHAR' 

MONITOR MEMORY LOCATION 'CAPTST' 

MONITOR S/R TO DISASSEMBLE INSTRUCTION AT PCH/PCL 

MONITOR MEMORY LOCATION 'ADDINP' 

MONITOR S/R TO PRINT A CARRIAGE RETURN. CLOBBERS ACC^ Y-REG 

MONITOR MEMORY LOCATION 'PRAl' 

MONITOR MEMORY LOCATION 'PRYX2' 



August, 1979 



MICRO - The 6502 Journal 



15:35 



LUEBBERT'S COPYRIGHT APPLE MEMORY ATLAS 



MICRO MAGAZINE VERSION 



HEXLOC 



DECLOC 



♦FDA3 


-605 


♦FDAD 


-595 


♦FDB3 


-SB9 


♦FDB6 


-586 


♦FDC5 


-571 


♦FDC6 


-570 


♦FDDl 


-5S9 


♦FDDA 


-550 


♦FDE3 


-541 


♦FDE5 


-539 


♦FDED 


-531 


♦FDFO 


-528 


♦FDF6 


-522 


♦FEOO 


-512 


♦FE04 


-508 


♦FEOB 


-501 


♦FE17 


-489 


♦FEIS 


-488 


♦FEID 


-483 


♦FE20 


-480 


♦FE22 


-478 


♦FE2C 


-468 


»FE36 


-458 


♦FE5a 


-424 


»FE5E 


-418 


♦FE63 


-413 


♦FE78 


-392 


♦FE7F 


-385 


♦FEBO 


-384 


♦FEB4 


-380 


«FE86 


-378 


♦FE89 


-375 


♦FEBB 


-373 


«FE8D 


-371 


♦FE93 


-365 


♦FE95 


-363 


♦FE97 


-361 


♦FE9B 


-357 


»FEA7 


-345 


♦FEA9 


-343 


♦FEBO 


-336 


«FEB3 


-333 


♦FEB6 


-330 


♦FEBF 


-321 


»FEC2 


-318 


♦FEC4 


-316 


♦FECA 


-310 


♦FECD 


-307 


♦FED4 


-300 


♦FEED 


-275 


«FEEF 


-273 


♦FEF6 


-266 


♦FEFD 


-259 


♦FF02 


-254 


♦FFOA 


-246 


♦FF16 


-234 


♦FF2D 


-211 


♦FF3A 


-198 


♦FF3A 


-198 


♦FF3F 


-193 


♦FF44 


-188 


♦FF4A 


-182 


♦FF4C 


-180 


♦FF59 


-167 


♦FF65 


-155 


♦FF69 


-151 


♦FF73 


-141 


♦FF7A 


-134 


♦FF7C 


-132 


♦FF8A 


-118 


♦FF90 


-112 


♦FF98 


-104 


♦FFA2 


-94 


♦FFA7 


-89 


♦FFAD 


-B3 


♦FFBE 


-66 


♦FFC7 


-57 


♦FFCC 


-52 


♦FFE3 


-29 


-^1979/06/25 


VERSION 



NAME 

XAM8 

M0D8CHK 

XAM 

DATAOUT 

RTS4C 

XAMPM 

ADD 

PRBYTE 

PRHEX 

PRHEXZ 

GOUT 

COUTl 

COUTZ 

BLl 

BLANK 

STOR 

RTS5 

SETMODE 

SETMDZ 

LT 

LT2 

MOVE 

VFY 

VFYOK 

LIST 

LIST2 

AlPCLP 

AlPCRTS 

SETINV 

SETNORM 

SET I FLO 

SETKBD 

INPORT 

INPRT 

SETVID 

OUTPORT 

OUTPRT 

lOPRT 

lOPRTl 

I0PRT2 

XBASIC 

BASCONT 

GO 

REGZ 

TRACE 

STEP 2 
USR 

WRITE 

WRl 

WRBYTE 

WRBYT2 

CRMON 

READ 

READXl 

RD2 

RD3 

PRERR 

BELL 

BELL 

RESTORE 

RESTRl 

SAVE 

SAVl 

RESET 

MON 

M0N2 

NXTITM 

CHRSRCH 

ZMODE 

DIG 

NXTBIT 

NXTBAS 

NXTBS2 

GETNUM 

NXTCHR 

TOSUB 

ZMODE 

CHRTBL 

SUBTBL 

COPYRIGHT 



USE 

MONITOR MEMORY LOCATION 'XAM8' 

MONITOR MEMORY LOCATION 'MODBCHK' 

MONITOR MEMORY LOCATION ' XAM ' 

MONITOR MEMORY LOCATION 'DATAOUT' 

MONITOR MEMORY LOCATION 'RTS4C ' 

MONITOR MEMORY LOCATION 'XAMPM' 

MONITOR MEMORY LOCATION 'ADD' 

MONITOR S/R TO PRINT CONTENTS OF ACC AS 2 HEX DIGITS 

MONITOR S/R TO PRINT A HEX DIGIT 

MONITOR MEMORY LOCATION 'PRHEXZ' 

MONITOR S/R TO OUTPUT CHAR IN ACC. CLOBBERS ACCY-REG-^COUT 

MONITOR S/R TO GET MONITOR CHARACTER OUTPUT 

MEMORY LOCATION 'COUTZ' 



• 



MONITOR 
MONITOR 



It MINIASSEMBLER MEMORY LOCATION 'BLl' 



MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR S/R TO PERFORM A 
MONITOR S/R TO PERFORM 



'BLANK' 

'STOR' 

'RTS5' 

'SETMODE' 

'SETMDZ' 

'LT' 

'LT2' 

MEMORY MOVE (A1-A2 TO A4 ) 
MEMORY VERIFY 
MONITOR MEMORY LOCATION 'VFYOK' 
CALL TO DISASSEMBLE 20 INSTRUCTIONS 
MONITOR MEMORY LOCATION 'LIST2' 

MINIASSEMBLER MEMORY LOCATION 'AlPCLP' 

'AlPCRTS' 

'SETINV 

'SETNORM' 

'SET I FLO' 

'SETKBD' 
'INPORT' 

'INPRT' 



MONITOR St 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 'SETVID ' 

MONITOR MEMORY LOCATION 'OUTPORT' 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 

MONITOR MEMORY LOCATION 



MONITOR MEMORY LOCATION 



'OUTPRT' 

'lOPRT' 

'lOPRTl ' 

'I0PRT2' 



MONITOR S/R TO JUMP TO BASIC 
MONITOR S/R TO CONTINUE BASIC 
MONITOR MEMORY LOCATION 'GO' 
MONITOR MEMORY LOCATION 'REGZ' 
CALL TO PERFORM MONITOR TRACE 
MONITOR MEMORY LOCATION 'STEPZ ' 
MONITOR MEMORY LOCATION 'USR' 
MONITOR S/R TO WRITE TO CASSETTE TAPE 
MONITOR MEMORY LOCATION 'WRl' 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
MONITOR MEMORY LOCATION 
CALL TO READ FROM TAPE ■ 



m 



'WRBYTE' 
'WRBYT2' 
'CRMON' 
LIMITS Al 



S< A2 



CLOBBERS ACC 
-REG 



HI-RES GRAPHICS - READ WITHOUT HEADER 

MONITOR MEMORY LOCATION 'RD2 ' 

MONITOR MEMORY LOCATION 'RD3' 

MONITOR S/R TO PRINT "ERR" AND SOUND BELL. 

MONITOR S/R TO PRINT BELL. CLOBBERS ACC^ Y 

CALL HERE TO OUTPUT BELL 

MONITOR & SWEET- 16 MEMORY LOCATION 'RESTORE' 

MONITOR MEMORY LOCATION 'RESTRl' 

MONITOR & SWEET-16 MEMORY LOCATION 'SAVE' 

MONITOR MEMORY LOCATION 'SAVl ' 

CALL HERE HAS SAME EFFECT AS PUSHING RESET BUTTON 

MONITOR S/R- NORMAL ENTRY TO 'TOP' OF MONITOR WHEN RUNNING 

MONITOR S/R TO RESET AND ENTER MONITOR 

MONITOR MEMORY LOCATION 'NXTITM' 

MONITOR MEMORY LOCATION 'CHRSRCH' 

MONITOR & MINIASSEMBLER MEMORY LOCATION 'ZMODE' 

MONITOR MEMORY LOCATION 'DIG' 

MONITOR MEMORY LOCATION 'NXTBIT' 

MONITOR MEMORY LOCATION 'NXTBAS' 

MONITOR MEMORY LOCATION 'NXTBS2' 

MONITOR tt MINIASSEMBLER MEMORY LOCATION 'GETNUM' 

MONITOR MEMORY LOCATION 'NXTCHR' 

MONITOR «t MINIASSEMBER MEMORY LOCATION 'TOSUB' 

MONITOR MEMORY LOCATION 'ZMODE' 

MONITOR 8t MINIASSEMBLER MEMORY LOCATION 'CHRTBL' 

MONITOR MEMORY LOCATION 'SUBTBL' 

PREPARED BY PROF W. F. LUEBBERT DARTMOUTH COLLEGE-" 



?( Y-REG 



HANOVER N. H. 



15:36 



MICRO - TKe 6502 Journal 



August, 1979 



products for the 

APPLE n 

SYSTEMS SOFTWARE 

Memory Dump $ 7.45 

Program Unload 7.45 

File Editor 24.95 

Assembler 24.95 

(Assembler Requires File Editor) 

APPLICATIONS 

Automotive Diagnosis $14.95 

Basic Statistics 9.95 

Electrical Engineering I . 9.95 

Statistics I 14.95 

Vector Analysis 9.95 

FINANCIAL 

Financial Wizard $9.95 

Financial Wizard II 9.95 

Financial Wizard III 9.95 

Financial Wizard IV 9.95 

GAMES 

Apple Casino $ 9.95 

Apple Derby 9.95 

Apple II Organ 19.95 

Cubik 9.95 

Radar Interceptor 9.95 

Rocket Pilot 9.95 

Saucer Invasion 9.95 

Space Maze 9.95 

Star War 9.95 

Swarms 14.95 

Wampus Hunt 9.95 

Programs Available on Diskette at $5.00 Additional 

Available at your local computer store 

See Our Full Page Ad in This Issue 



It's 



• Check or Money Order 

• Include $1.00 for 
shipping and handling 

• C.O.D. ($1.00 add'tl charge) 



• Master Charge and VISA 
orders accepted 

• New Jersey residents add 
5% sales tax 



FOUVERSOFT, INC. 

P. O. BOX 157 

PITMAN, NEW JERSEY 08071 

(609) 589-5500 



LOGIC 

for graphics! 



NEW 

ASSEMBLY LANGUAGE 

3D GRAPHICS 

FOR THE APPLE II . . . 



Our 30 packages allow you to animate 3D or 
2D data bases created with standard XYZ coor- 
dinates. The two users manuals {90 pages total) 
are written at different technical levels to give aU 
Apple users a quick understanding of access 
and uses from BASIC and assembly 
language. The smalt 8K memory 
requirement lets you use the 
subroutine with most of your 
educational, scientific, and 
game programs. 

$45 (available August 25, 
1979). Disc and relocat- 
abfe cassette option 
available. 

We re open 9 to 6 Monday thru 
Friday, central time Give us a call 



t 



The engineering* graphics people 



(217)367-0299 



LOGIC 

'BoxV, Savoy, I L 61874 



DISK DRIVE WOES? PRINTER INTERACTION? 

MEMORY LOSS? ERRATIC OPERATION? 

DON'T BLAME THE SOFTWARE! 





ISO-1 ^^* ISO-2 

Power Line Spikes, Surges & Hash could be the culprit! 
Floppies, printers, memory & processor often interact! 
Our unique ISOLATORS eliminate equipment interaction 
AND curb damaging Power Line Spikes, Surges and Hash. 
•ISOLATOR (ISO-1 A) 3 filter isolated 3-prong sockets; 
integral Surge/Spike Suppression; 1875 W Maximum load, 

1 KW load any socket $49.95 

* ISOLATOR (ISO-2) 2 filter isolated 3-prong socket banks; 
(6 sockets total); integral Spike/Surge Suppression; 

1875 W Max load, 1 KW either bank $49.95 

•ISOLATOR (IS0-ICB/-2CBI 15 A Circuit Brkr $57.95 
•ISOLATOR ( ISO-1 CBS/-2CBS) Brkrswitch/lite $62.95 
•SUPPRESSOR/FILTER (SFK-33) three 3-prong sockets, 

1250 Watt Maximum load $32.50 

•SUPPRESSOR/FILTER (SFK-31) 3-prong socket; 

KW $24.50 

AA PHONE ORDERS 1-617-655-1532 MM 

Dept. mi m^m 

/S^ Electronic Specialists, Inc. 

171 South Main Street, Natick, Mass. 01760 



THE MICRO SOFTWARE 
CATALOG: XI 



Mike Rowe 

P.O. Box 6502 

Chelmsford, MA 01824 



Name: APPLE-80 

System: APPLE 11 

Memory: 16K 

Language: Integer BASIC (manual), Machine Language 

(APPLE-80 interpreter) 

Hardware: Standard APPLE II, 16K, game paddles for 

variable speed trace. 

Description: With APPLE-80, your APPLE II RAM from 
1000 HEX up becomes 8080 programming space. Single- 
Step or Trace with all 8080 registers dynamically 
displayed on APPLE'S screen. When your 8080 program 
is fully de-bugged, let it run — you have full access to all 
APPLE I/O routines via the special C65 instruction, 
which also lets you call user-written 6502 subroutines 
directly from your 8080 program. 8080 I/O ports are ar- 
ranged in a table for ease of user modification. Up to 8 
non-destructive breakpoints may be set to facilitate pro- 
gram debugging. 8080 routines may also be Imbedded 
in the middle of 6502 programs, saving tedious transla- 
tion. Educators and students will benefit from 
APPLE-80's clear illustration of the Inner workings of 
the 8080. APPLE-80 is suitable for all but time- 
dependent applications. 

Copies: 45-1- 

Price: $20.00 + $1.50 Shipping & handling. California 

residents must add 6% sales tax. 

Includes: APPLE-80 manual and APPLE-80 program on 
cassette, 8080 time-of-day clock demonstration pro- 
gram (illustrates use of APPLE II I/O from 8080 pro- 
grams), and APPLE-80 ready reference card. Source 
NOT INCLUDED. 

Order Info: Send Check or Money Order 
Author: Dann McCreary 
Available from: 

Dann McCreary 

Box 16435-M 

San Diego, California 92116 



Name: FLEET 

System: PET 

Memory: 8K 

Language: Machine Language 

Hardware: Standard Pet 

Description: FLEET is a game where the object is to find 
and destroy all of the enemy's ships. The program is 
designed to make optimum use of the features of the 
Commodore Pet, such as its graphic and sound produc- 
ing capabilities. FLEET is written in machine language 
but has been specially recorded so that it can be loaded 



with the LOAD command, and it automatically runs 
after being loaded. 

Copies: Just Released 
Price: $7.95 

Includes: Cassette with two versions of FLEET (one with 
sound effects and one without), manual, and instruc- 
tions on how to hook up a music box to your PET. 

Author: William Robinson 

Available from: 
PETRONICS 
18431 Kingsport 
Malibu, Ca. 90265 



Name: APPLESHIFT 

System: APPLE II 

Memory: 16K for tape version, 24K for Disk It version 

Language: Integer BASIC and 6502 machine language 

Hardware: APPLE II, tape recorder or Disk II, and printer 

Description: A package allowing conventional use of 
the APPLE 11 keyboard shift keys, containing instruc- 
tions for hardware modification, machine language 
subroutines for Input and display, an Integer BASIC 
demonstration program called TEXTPAGE, and com- 
plete documentation. 

TEXTPAGE allows you to enter, edit, store on disk, and 
print (using your own printer driver) a page of text (55 
lines of 80 characters each). The primary purpose of the 
package is to show you how to modify your apple and 
use our subroutines with your programs but TEXTPAGE 
functions nicely as a "mini" word processor. A com- 
plete word processor called APPLETEXT (the only com- 
plete word processor for the APPLE II to allow normal 
use of the shift keys!) is also available. Registered AP- 
PLESHIFT packages may be returned for complete 
credit toward APPLETEXT packages. Both products 
may be used with Dan Paymar's lower case adaptor or 
as stand-alone products, with lower case appearing on 
the screen as upper case in normal mode and upper 
case appearing as upper case in inverse mode. 

Copies: Proprietary 

Price: $29.95 

Includes: Complete documentation with listings, 

discussion, and instructions for hardware modification. 

Disk tl version includes disk. 

Author: C&H Micro 
Available from: 

C&H Micro 

P.O. Box 2161 

Glen Ellyn, Illinois 60137 



15:38 



MICRO -The 6502 Journal 



August, 1979 




CONNECTICUT microCOMPUTER , Inc. 

150 POCONO ROAD - BROOKFtELD, CONNECTICUT 06804 
(203) 775-9659 



8Y8TEMB 



RS-232 
MOO 



3 



RS*232 
INTERFACE MODULE 




PETMOD 





PET IMTERFACE / Njy^ 
KIMMOD \/r\ 



KIMMOD Vnr -i P- '■ ■"'' ! " -^ 



KIM INTERFACE 



6PIB(l£EE-468) 
INTERFACE MODULE 



TRS-80 INTERFACE 



MANUAL AND 
DISPLAY MODULE 




ANAMAN][ 

nnnnn^ 



ANALOG 
MANIFOLD 
MODULE 



SENSORS 

• TEMPERATURE 

• VELOCITY 

• PRESSURE 

• db 

• pH 

• ACCELERATION 

• HUMIDITY 

• LIGHT LEVEL 

• FLUID LEVEL 

• ETC. . , 



DAM SYSTEMS by CmC 
A conpleie swste* of lodules to let uour conpuier listen 
to the real world. 



DAM SYSTEMS F-'RICE LIST 



DAM SYSTEMS components 



AXMi^l ~ AnaloEi Inr-ut Moduie 
16 6-bU snslotf itinits - 10^ klcrosectvid conversioR tiw - 
3 state oulnit - rewires one 8-bit covvter oulnit Fwt 
for control awJ one 8-*it coipytep inpyt port for data. 

AXM162 - AnelofS Input Module 
As above plus! tester sccursn - aold plsted contacts - 
Pilot li^t - strilch selectable start* enable and ready 
ralarities. 

PGWl ~ Power Module 
Supplies power for one AIN16 ndule. 



ICON - Input Connector 
Fx connectiftS analog inputs to the Aini6 - 
ed^ coflnecUr - solder ewlets^ 



20 Pin card 



OCON ••- Output Connector 

For connecting Ihe A3H16 to a co«PUter - 20 pin card edde 
connector - solder eyelets » 

MANMODl - Meni-fold Module 

Use in Place of ICON. Screg tertinal barrier strips for 
connectins jovsticfcsr polentioMetersf voltade sourcesr etc. 
Eliiinates Ihe need for solder ins. Plu£ into the AIHli. 

ANAMANl - An3loi3 Msnirold Module 
Use ift Place of ICON. Connects DM srSTQfS SDGQRS to the 
AIKI6 yithout soldering - sensor cables Just plus in. ?hx3s 
into lheAIH16x the tMHSh 



SENSORS 

Sensors fx teewraturef pressure! floy» hii*idit«i 
pHr lotionf etc. 



leveif 



COMPUTER INTERFACES 

Fx the PCTr KIKf TRS-flOi etc. Use in Place of DCflN. 
Eliiiinates the need fx soldering x special construction. 

PETMOD - PET Interface Module 
Gives two IEEE pxtsf one user pxt and one SMI SYSTEKS 
interface pxt, Saves wear and tear on the PET' s printed 
circuit board. Also called the PETSA^H, 



Hi1.79*00 

*249»00 

^ 1. 4 • 9fJ 
*9.9S 

*9 ♦ 9^=; 
*59*95 

TBA 

TEA 

TBA 

t.49.9S 



*39»95 



TBA 



*:t.9»9S 



KIMMOD - KIM Inter -face Module 
Gives one application connectx Pxt and one DAH SYSTD1S 
interface pxt. 

CABLE "A" - Interconnect Cable*^ 
Connects covuter interface to AIHlif tMffilSb XPANDRh 
etc. 

CABLE A24 - Interconnect Cable 
24 inch cable with interface connectx on one end and an 
OCtM eouivalent on the other. 

MANDISl - Manual and Display Module 
Connects betwen the AIH16 and the coiputer interface. 
Allows ftanual x coaeuter control of the AIHI61 Displays 
channel nuaber and data. 

QPIB MOD - GPIB ( 1EEE--408 ) Interface 
Allows the DM SYSTEHS HODIUS to be used with the GPIB bus 
instead of a coieuter's other I/O pxts. 

RS232 MOD - RS232 Interface Module 
Allow the DM SYSTEHS NUIUS to be used yilh » RS~232 
port X terftinal. 

XPANDRl - Expander Module 

Allow UP to 128 8-^it analos inputs (8 AIH16 Hodules) to 
be connected to one swtea* 



DAM SYSTEMS sets 



AIM161 Starter Get *Jiia9»00 

Includes one AIM6if one POUlf one ICON and xe XON. 

AIM 162 Starter Set i|i259»00 

Includes one Aim&2f one PtMlf xe ICON and me OCON. 

PETSETla ^>29S*00 

Includes xe PETWJDr xe CABLE A24» xe AIHUl. one MKl and 
xeHMHIffil. 

KIMSETla <.).2B^"i ♦ 00, 

Includes xe KIWOOf xe CABL£ A24» xe AI«16if xe POyi and 
xeNANHODh 



TBh 



TBA 



TBA 



TBA 



Interfacing the Analog Devices 
7570 J A/D Converter 



# 



Dr. Marvin L. De Jong 

Department of Mathematics and Physics 

The School of the Ozarks 

Point Lookout, MO 65726 



Complete interfacing information, including a demon- 
stration program, will make real time applications 
responsive to external events when you add this top of 
the line analog-to-digital converter to a 6502 system. 



If you want to go first class in analog- 
to-digital converters, you ought to con- 
sider the AD-7570J marketed by Analog 
Devices, 1 Industrial Park, Box 280, Nor- 
v\/ood, MA 02062. It is a 28 pin, mono- 
lithic CMOS 8-bit successive approxima- 
tion A/D converter specifically designed 
for interfacing with microprocessors. 
The data lines are three-state lines, and 
consequently may be connected to the 
data bus of a microcomputer. 

An interface between a 6530 PIA and 
the 7570 is described in this article. In 
the near future, I hope to describe an in- 
terface directly to the data bus of a 6502 
system. A demonstration program to 
control the A/D converter is also given. 
The interface circuitry and program 
should be applicable to any 6502 system 
with a MOS PIA, such as the 6530, or a 
VIA such as the 6522. 

The circuit is shown In the figure. It 
differs from the one given on the 7570 
specification sheet, supplied with the 
chip, only in the comparator which was 
used. I used an LM318 op amp simply 
because I did not have a 31 1 comparator 
handy. The AD311 or LM311 Is recom- 
mended because it was designed for 
voltage comparisons, whereas the 
LM318 is a high-class op amp. 

The 7570 has an internal clock which 
can be used by adding a resistor-capa- 
citor network, but I chose to use the 
clock signal from the 6502 (either O2 or 
O1) which was divided by ten using the 
7490. This arrangement gives the 
necessary phase relationship between 



the CLK and the STRT signals on the 
7570. 

A Zener diode provided the necessary 
reference voltage. STRT, BSEN, LBEN 
and HBEN are active high control 
signals. Since the 6502/6530 "comes up" 
with highs on the output ports, I used a 
74004 inverter between the control port 
PBO-2 and the control inputs on the 7570. 
The CMOS version of the 7404 is not 
necessary; a 74L04, LS04, or just a plain 
old 7404 may be used. The CMOS ver- 
sion of the 7490 should not be used in 
the divide-down circuit because of pro- 
pogatlon delays which might destroy the 
necessary phase relationships. 

So much for the circuit. The reader is 
urged to study the 7570 spec sheet for 
additional details. Bipolar operation is 
possible, for example, and details regar- 
ding settling time, layout, and grounding 
are also quite important. 

Conversion is initiated by applying a 
positive pulse to the STRT pin. The pulse 
must be at least 500 nanoseconds in 
duration, and conversion begins on the 
trailing edge of the pulse. The BSEN pin 
next receives a logical 1 from the com- 
puter. This is an Interrogation signa l. If 
the converter is still busy, the BUSY pin 
is low, putting a zero on the PA7 line. If 
the conversion is complete, a one will 
appear on t he PA 7 line. If the BSEN pin 
is low, the BUSY pin is in its high im- 
pedance state. 

Once the conversion Is complete, 
BSEN Is brought low, and HBEN and 



LBEN are placed at logic 1 by the 
microcomputer. This results in the con- 
version data appearing at pins DB2-9 to 
be read by the A-port on the 6530. While 
HBEN and LBEN are low, the data pins 
are in their high impedance state. 

The reason for having both LBEN and 
HBEN is simply that a ten bit version of 
the same chip (7507L) is available, and 
HBEN puts the two highest bits on the 
bus, while LBEN puts the low order bits 
on the bus. This also explains why DBO 
and DB1 are not used. The ten bit ver- 
sion is also more expensive. 

The program, while written for the 
KIM-1, demonstrates how the 6502 
microprocessor and 6530 PIA control the 
A/D converter. The comments cover the 
details quite well. Clearly, the machine 
language details will be different for a 
system other than the KIM-1, but the 
mnemonics will remain the same. 

What might you do with an A/D con- 
verter? If you are a game nut, you might 
attach the ANALOG IN signal to the 
center tap of a pot and call it a joy stick, I 
think. You want two, three, four joy- 
sticks? Don't get four of these expensive 
A/D converters; get an analog multi- 
plexer such as the 4052. 

Use the same device and the same 
reference (Lancaster) to build a program- 
mable digital voltmeter. Speech recogni- 
tion circuits convert the filtered and rec- 
tified voice signal to a digital value using 
A/D converters. Here is a real opportuni- 
ty to help the seriously handicapped per- 
son. 



• 



15:40 



MICRO -The 6502 Journal 



August, 1979 



Get a pressure transducer and use 
your A/D converter to monitor pulse 
rates and measure blood pressure 
automatically. Processing analog 
signals with digital techniques, averag- 
ing, filtering, etc. Is also an interesting 
area for experimentation. Finally, docu- 
ment your experiment and send it av^/ay 
to be published in one of the hobby 
magazines, such as MICRO, so the rest 
of us can benefit from your v^/ork. 



Reference: 

Lancaster, D., CMOS Cookbook, 
Howard W. Sams & Co., Inc., In- 
dianapolis, 1977. 

SPEECHLAB'''M, Heuristics, Inc., 
900 N. San Antonio Rd., Los Altos, 
CA 94022. 

Pressure Transducer Handbook, Na- 
tional Semiconductor Corp., 
Santa Clara, CA 95051. 

Analog-Digital Conversion Handbook, 
Analog Devices,' Norwood, MA 
02062, 1972. 



MICRO-WARE ASSEMBLER 65XX-1.0 PAGE 01 



0010: 
0020: 
0030: 
OOHO: 
0050: 
0060: 
0070: 
0080: 
0090: 
0100: 
0110: 
0120: 
0130: 
0^kO: 
0150: 
0160: 
0170: 
0180; 
0190: 
0200: 
0210: 
0220: 
0230: 
02^10: 
0250: 
ID = 



-T 



032D 
032D 
052D 
032D 
032D 
0500 
0300 A9 
0302 8D 
0305 8D 
0308 CE 
030B EE 
O3OE A9 
0310 8D 
0313 AD 
O3I6 10 
0318 A9 
03IA 8D 
03ID AD 
0320 85 
0322 20 
0325 A9 
0327 8D 
032A He 



07 

02 17 

03 17 
02 17 
02 17 
05 

02 17 

00 17 

FB 

03 
02 17 

00 17 

F9 

IF IF 
07 

02 17 
08 03 



* A/D CONVERTER DEMONSTRATION PROGRAM 
» MODIFIED 7/^/79 BY MICRO STAFF 



SCANDS 

PAD 

PBD 

PBDD 

INH 

START 



AGN 



BACK 



« 

ORG 

LDAIM 

STA 

STA 

DEC 

INC 

LDAIM 

STA 

LDA 

BPL 

LDAIM $03 

STA PBD 

LDA PAD 

STA INH 



$1F1F 

$1700 

$1702 

$1703 

$00F9 

$0300 

$07 

PBD 

PBDD 

PBD 

PBD 

$05 

PBD 

PAD 

BACK 



A/D CONTROL PINS SET TO 

LOGICAL VIA PBO-2 WHEN 

DIRECTION REGISTER IS ALSO SET 

TOGGLE STRT PIN TO INITIATE 

CONVERSION 

ACTIVATE BSEN TO CHECK BUSY 



CHECK BIT 7 ON PAD (BUSY) TO 
SEE IF CONVERSION IS COMPLETE 
SET HBEN & LBEN TO LOGIC 1 TO 
PUT DATA ON THE LINES 
FINISH LDA PAD DIGITAL DATA IS NOW IN 

ACCUMULATOR KIM-1 USERS MAY 
JSR SCANDS WISH TO DISPLAY THE RESULT 
LDAIM $07 INITIALIZE CONTROL PINS TO ZERO 
STA PBD AND THEN 
PRGEND JMP AGN START ANOTHER CONVERSION 



SYMBOL TABLE 2000 205C 



AGN O3O8 


BACK 


0313 


FINISH 03ID 


INH 00F9 


PAD 1700 


PBDD 


1703 


PBD 1702 


PRGEND 032A 


SCANDS 1F1F 


START 


0300 







9-iov 



200 



IN 0-lOV ^^ ^^^^ ^^^^^ 



(positive) 




^\7D-GND 



^^^TD-GND 



Figure 1: Interface circuit An LM311 voltage com- 
parator is recommended instead of the LM318 op 
amp. D'GND is short for digital ground, and 



A'GND stands for analog ground. The 6530 is 
assumed to be part of a microprocesor. 



SYMple Memory Expansion 



An 8K SYM from a board small enough to fit in the 
Synertek logo area of a standard enclosure? This in- 
teresting modification may violate good engineering 
practices, but It is difficult to argue with the designer's 
result. 



John M. Blalock 

3054 West Evans Drive 

Phoenix, AZ 85023 



Synertek states in their SYM-1 
manual, *'lt is believed that most users 
of the SYM-1 win ultimately use a TTY". I 
disagree. Most users, like me, will pro- 
bably use some type of CRT terminal. 
The full power of the SYM monitor is not 
really appreciated until you connect it to 
a CRT or TTY. No wonder that Synertek 
made such a statement in the manual. 
The addition of a terminal turns the SYM 
into quite a little computer! 

There is only one drawback to adding 
the terminal. Once you have it con- 
nected, you'll need to expand the SYM's 
memory to keep up with the larger pro- 
grams, interpreters, and assemblers that 
you are sure to come up with! 



Tiny Basic 

One of the easiest and least expen- 
sive additions that can be made to the 
SYM, after the addition of a TTY or CRT, 
is Tom Pittman's Tiny Basic. It is only 
$5.00 in paper tape format from him at 
Itty Bitty Computers. PO Box 23189, San 
Jose, CA 951 53. Several ASK dealers sell 
it on cassette for $10.00. Get Version 
V.I K for the 6502 that starts at 0200 hex. 
It will fit from $0200 to $OAFF, leaving 
$0B00 to $OFFF available for programs. 
Since the SYM already includes a Break 
Test routine in its monitor, it is even 
simpler to interface Tiny Basic to the 
SYM than to the KIM. Make the following 
patches: 



0206 4C 1B 8A 



JMPINCHR 



0209 4C 47 8A JMP OUTCHR 
020C 4C 3C 8B JMPTSTAT 
I also made the following optional 



changes to my copy: 

020F 08 Changes the character 
correction code to the 
ASCII backspace code. 

0210 40 Changes the line cancel 
code to the "@" sign. 

0971 2A Changes the prompt char- 
acter from "colon" to 
"asterisk". 

Memory Limitations 

Tiny Basic Is a very good interpreter, 
for Its size, but only 1024 bytes are left 
out of the SYM's 4K RAM for Tiny Basic 
programs. I had an extra pair of 21 14s on 
hand after I got Tiny up and running, and 
decided to see if there wasn't some way 
that I could make use of them. 

I removed 2114s U12 and U13 from 
their sockets, mounted the extra two 
2114s on top of them in the so called 
"piggyback" fashion, and soldered all 
pins of the extra 2114s to the same pins 
on the originals, except that the pin 8s 
were left unconnected. 

I attached 30 GA wire to these pins on 
the two added 2114s, making sure that 
they were well insulated from the pin 8s 
of the original 2114s. The original ICs 
were then plugged back Into the SYM 
and a memory test was run. So far, so 
good. 

U1, a 74LS138, is a decoder that 
divides the first 8K of the SYM's memory 
into IK blocks. The signals from it that 
correspond to the first four IK blocks 
are used as the chip select signals for 
the original 2114s. The wires from pin 8 
of the two added 21 14s were wired to the 



fifth signal from U1, which is at pin 11 of 
its package. 

Repeating the memory test, I had 5K 
of memory! I had just doubled the 
memory space available for Tiny Basic! 
Could it be expanded further? Perhaps, 
but not this way. The 2114s were too 
close together and got hotter than I 
would like to see them get. 



Bumble Bees Can't Fly 

The address and data lines from the 
6502 are only guaranteed to drive up to 1 
TTL load and 130 pf of capacitance. No 
buffers exist on the SYM to reduce the 
loading. Adding up the capacitance of 
all the devices already on the SYM that 
are wired to the data and address buses, 
and adding a conservative figure for the 
capacitance of all the PC traces them- 
selves, shows that the 6502 is being 
pushed to its limit already. 

But those values of capacitance from 
the spec sheets are maximum values, 
while the 130 pf is a minimum. Let's try! 
The goal is to fit it in over the logo and 
Synertek name. 

I built up a small perf board with IC 
sockets and wired them together using a 
wiring pencil and 36 GA solder strip- 
pable wire. Nine sockets were on the 
board, and an 18-pln homemade DIP 
plug plugged into the SYM's U19 socket 
to pick up most of the required connec- 
tions. 

Additional wires were run to the data 
lines at U12, and to the chip select 
signals from U1. It worked! I had an 8K 
SYM! And the board was small enough 



ii 



15:42 



MICRO - The 6502 Journal 



August, 1979 



to fit in the area of the Synertek logo and 
name, between U1 and the original 
memory chips. 

Several other SYM owners were very 
interested in my design, even though it 
violates good engineering practices. 
Enough interest was shown to commit 
the schematic of Figure 1 to an artwork 
and make up a few dozen copies of the 
board. This version is much neater than 
the prototype. 

The board is double sided and has 
plated through holes. Two 16-pin DIP 
jumpers connect from it to the SYM's 
U12 and U19 sockets. (Ever try to buy an 
18-pin jumper?) Four wires run from the 
board to pins of U1. U12, U19, and eight 
other 2114s mount on the final board. 

None of the copies built to date have 
failed to work satisfactorily, nor does an 
oscilloscope show any degradation of 
the 6502's signals. My SYM has U20, 
U21, U22, U23, and U28 installed, so it is 
close to a worst case. I have had several 
dozen blank PC boards made which I will 
make available to other SYM owners for 
$5.00 each, with instructions. Please in- 
clude a self addressed stamped 
envelope. 

Results 

I will have to admit that the added 
board is an expansion to the SYM, but it 



certainly doesn't expand its size by 
much, does it? Tiny Basic now has 5K 
for its programs, a pretty respectable 
amount of memory. Synertek's BASIC, 
which is excellent, has 7679 bytes free, 
at initialization, instead of 3585. Many of 
the applications that 1 had only con- 



sidered running on my KIM (29+ RAM!) 
system are now being run on the SYM, 
due to the faster tape interface, suffi- 
cient memory, BASIC in ROM, and the 
capabilities of the SYM's monitor. 

It was certainly worth the trouble to 
try, even if bumble bees can't fly! 



pins 11, 12, 
13, 1^ 



pins 9, 10 




Figure 1: W7AAY Sym-I Memory Expansion 



^ 



aUAM ASSOOATK 



24000 Bessemer Street 
Woodland Hills, Ca. 91367 




SHORTY 
C-10 CASSETTES 

• Tarbell Quality 

• "SCOTCH" brand high out- 
put/low noise "POSI-TRAK" 
back treated tape 

• Spring loaded pressure pad 

• 5 screw take-apart shell 

• Exclusive ^ label 



Stock No. EAC-10 



CASSETTE LABELS 

5626-6 Blank Fanfold 

5626-8 Blank Fanfold 

CLB-R Blank Sheet 

5626-B Blank Pack 

EA-EBEA Printed Pack 

CLP-R Printed Stieet 

MAILING LABELS 
4815-1 2y2Xl5/16 

5615-1 3Vax15/16 



$13.50/10 


$26.00/20 


i 6 Lines/Inch 


$5.90/100 


i 8 Lines/Inch 


5.90/100 


15/Sheet 


6.20/ 90 




4.00/100 


EA Label 


5.50/100 


15/Sheet 


7.50/ 90 


Fanfold 


$4.40/1 000 


Fanfold 


4.40/1000 



VOLUME AND DEALER DISCOUNTS AVAILABLE 



STOCK NO. 



QUANTITY 



PRICE 



Name 




Cal. Tax 6% 


Address 


City 




State 2 


Exp. Date 


Bank No. 




Card No. 






Siqnature 



TOTAL 



Zip 



PREPAID ORDERS SHIPPED POSTPAID 
August, 1979 



a 




Figure 2; The 8K SYM, 



MICRO -The 6502 Journal 



15:43 



A Warning: 

The MACROTcA'' 

is for Professional 
Progrommers — and Very 
Serious Amateurs — Only 

Now: a machine language pro- 
gramming powerhouse for the 
knowledgeable programmer who 
wants to extend the PET's capa- 
bilities to the maximum. The 
MacroTeA, the Relocating Macro 
Text EditorAssembler from Skyles 
Electric Works. 

The Skyles MacroTeA is a super 
powerful text editor. 27 powerful 
editing commands. String search and 
replace capability. Manuscript feature 
for letters and other text. Text loading 
and storage on tape or discs. Supports 
tape drives, discs, CRT, printers and 
keyboard. 



The Skyles MacroTeA is a relocating 
machine language assembler with true 
macro capabilities. A single name 
identifies a whole body of lines. You 
write in big chunks, examine, modify 
and assemble the complete program. 
And, when loading, the MacroTeA goes 
where you want It to go. Macro and 
conditional assembly support. Auto- 
matic line numbering. Labels up to 10 
characters long. 

There's no tape loading and no 
occupying of valuable RAM memory 
space: The Skyles MacroTeA puts 9K 
bytes of executable machine language 
code in ROM (from 9C00 to BFFF — 
directly below the BASIC interpreter). 



Like all Skyles Products for the PET 
it's practically plug in and go. No tools 
are needed. And, faster than loading an 
equivalent size assembler/editor from 
tape, the MacroTea is installed per- 
manently 



Define HI-RES Characters 
for the APPLE II 



This program makes it easy to generate and modify 
HI-RES characters on the APPLE II. 



Robert F. Zant 

Department of Accounting 

and Information Systems 

North Texas State University 

Denton, TX 76203 



The user contributed library of pro- 
grams, Volumes 3, 4, and 5, recently re- 
leased by the Apple Computer Company, 
contains a machine language routine for 
generating characters using the HI-RES 
features of the APPLE II. The package 
also includes a character table that con- 
tains 128 predefined characters. 

The characters are represented in the 
table in a coded, reverse image format. 
The code is based on a 7 by 8 dot matrix 
representation for each character. The 
format for an "L" is depicted below. 
Note that a border is left at the top and 
side so that characters will be separated 
on the screen. 



.02,02,02,02,02,42, 7E, 00 

The following program assists in defin- 
ing characters and substituting them 
into the character table. Each character 
is defined in a regular dot matrix format, 
rather than In reverse image. The pro- 
gram automatically calculates the binary 
code for the equivalent rotated version. 
The letter "L" would be entered as: 



The coded table entry is derived from the 
format by substituting a zero for each 
dot and a one for each asterisk. Each 
line of the matrix is thereby coded into 
one byte. The high order bit is set to zero 
in each byte. Eight bytes are required 
to encode each character. The code for 
the "L" depicted above would be 



Note that the dot matrix must remain 
intact, and must contain only dots and 
asterisks. The command to store the 
character, the CTRL S, must be entered 
after the matrix, on the ninth line. A 
carriage return is required after each 
command. 

At the beginning of the run, the operator 
specifies the table position (0 to 127) for 
the first character to be defined. There- 
after, characters are automatically 
stored at succeeding locations in the 
table. Separate runs of the program can 
be used to define characters in non- 
contiguous table locations. 




The Skyles MacroTeA: 11 chips on a single PCS. 

Operates interfaced with the PETs parallel address 

and data bus or with the Skyles Memory Connector. 

(When ordering, Indicate if the MacroTeA will 

interface with a Skyles Mennory Expansion System. 

You can save $20.) Specifications and engineering 

are up to the proven Skyles quality standards. Fully 

warranted for 90 days. And, as with all Skyles 

products, fully and intelligently documented. 



Skyles Electric Works 



10301 Stonydale Drive Cupertino, CA 95014 
(408) 735-7891 




• 



^ 



• 



60 

!=:© 

90 

iO© 

I:uQ 

350 

400 

42^ 

4'jO 

300 

600 

700 

750 

775 

800 

900 

iOOO 

iiOO 

1200 

iSOO 

1400 

11.00 

2000 

2100 

2200 

23:00 

2500 

SOGO 

S050 

laoo 

3200 
3250 
3300 
3400 
3300 
3600 
3700 
3800 
3900 
3950 
4000 
4100 
4200 
4250 
4300 
4400 
4500 
9000 



RSSUNES CHRRFiCTER TBBLE 
EEGir-4S AT 4:6800 



REM 

REH 

REM 

REM 

REM 

TEXT : CBLL -936 

VTflB 5: PRU4T "ENTER DECIMAL EQUIVALENT" 

PRINT '*0F FIRST RSCII- CHRRRCTER" 

PRINT "aiRXIMUM VRLUE OF 127';'" 

INPUT B 

IF E>=0 RND B-::i2S THEN 450: PRINT "RE-ENTER" 

B-26624+E+S 

CRLL -936 



GOTO 400 



CHRNGE THE DOTS IN THE FOLLOWING MRTRIX" 
TO ASTERISKS TO DESCRIBE R FIGURE. " 
USE ESC C'.. -"ESC D".. -->' RND •■:- TO EDIT 
<: LEAVE DOTS THAT ARE NOT REPLACED. >" 



THE FIGURE. 



PRINT 

PRINT 

PRINT 

PRINT 

PRINT "ENTER A 'CTRL S' TO STORE 

PRINT "ENTER A -CTRL Q ' TO QUIT. " 

REM PRINT MATRIX 

VTAB 9 

FOR I-O TO 7 

PRINT " " 

NEXT I 

VTAB 9 

REM GET INPUT CHARACTER 

CALL -657 

IF PEEK V 512 > =147 THEN 3000 

IF PEEK < 512 > =145 THEN 9000 

GOTO 2000 

REM ENCODE CHARACTER 

A=B: REM SAVE BEGINNING OF CHARACTER 

REM LOOK THRU MATRIX 

FOR 1=1064 TO 1960 STEP 123 

c=o 

FOR .J=0 TO 6 

IF PEEK <I+J';'=174 THEN 3700 

IF PEEK •:;I+J:>-.;>170 THEN 4000 

C-C+2 ■"■ J 

NEXT J 

B.. C:B=B+1 

I 

1000 

ERROR IN MATRIX 

20 
"MATRIX CONTAINS INVALID CHARACTER" 



POKE 

NEXT 

GOTO 

REM 

VTAB 

PRINT 

PRINT "RE-ENTER" -B^A 

FOR I-=0 TO 1000: NEXT 

VTAB 20: CALL -958 

GOTO 1500 

END 



I 



To Order PROGRAMM€A'S ToOlKiT or MacRoTcR — 

Custom designed to plug into your PET. So, when ordering, please indicate if your 
Toolkit: 

-Will be used with the Skyles Memory Expansion System, or 
...will be used with the ExpandaPet, or 

...will be used with the PET 2001-8 alone 

fWe furnish connectors to the memory expansion bus and to the second cassette interface. 

..win be used with the PET 2001-16, -32 



$75.00* 
$75.00* 
$75.00* 



$50.00* 



.will be used with Skyles MacroTeA 



$50.00* 



Your MacroTeA. Custom designed for your PET. So specify your PET model when ordering. $295.00' 
(Important Savings: If it's to be used with a Skyles Memory Expansion System, the MacroTeA can 
plug directly into the Skyles connector. So you save $20. The Skyles MacroTeA is only $275.00 
when interfaced with the Skyles Memory Expansion System.) 

Send your check or money order to Skyles Electric Works. VISA, Mastercharge orders may call 
(800) 227-8398. (California residents: please phone (408) 735-7891.) Ten Day Unconditional Money- 
Back Guarantee on all products sold by Skyles Electric Works. 

*M\ prices complete, including shipping and handling. Please allow 3 weeks. 
California residents: please add 6-6^;^ % California sales tax. 

SKYLES ELECTRIC WORKS 10301 Stonydale Drive, Cupertino, CA 95014, (408) 735-7891 



Is ProgromminQ Fun? 

Have More Fun, 
Moke Feuuer €rrors, 
Complete Programs Much 
Foster... uuith the 
BflSICpROGRflMMCR'S 
TOOLKir^ 

Now you can modify, polish, simplify, 
add new features to your PET pro- 
grams far more quickly while reducing 
the potential for error That all adds up 
to more fun . . . and the BASIC 
Programmer's ToolKit. 

The magic of the ToolKIt: 2KB of 
ROM firmware on a single chip with a 
collection of machine language pro- 
grams available to you from the time 
you turn on your PET to the time you 
shut if off. No tapes to load or to 
interfere with any running programs. 
And the Programmer's ToolKit installs 
in minutes, without tools. 

Here are the 11 commands that can 
be yours instantly and automatically 
. . . guaranteed to make your BASIC 
programming a pleasure: 

AUTO RENUMBER DELETE 

HELP TRACE STEP 

OFF APPEND DUMP 

FIND UNLIST 

Every one a powerful command to 
insure more effective programming. 
Like the HELP command that shows 
the line on which the error occurs 
. . . and the erroneous portion is 
indicated in reverse video: 



HELP 
500 J = SQR(A*B/M) 



... Or the TRACE command that 
lets you see the sequence in which 
your program is being executed in a 
window In the upper corner of your 
CRT: 




The Programmer's ToolKit is a 
product of Harry Saal and his 
associates at Palo Alto ICs, a sub- 
sidiary of Nestar Systems, Inc. Dr 
Saal is considered a leading expert in 
the fieid of personal computers and 
the Nestar System is considered to be 
the ultimate multiple microcomputer 
program storage system. 

So, if you really want to be into 
BASIC programming — and you want 
to have fun while you're doing it, order 
your BASIC Programmer's ToolKit 
now. You'll be able to enjoy it very 
soon. We guarantee you'll be de- 
lighted with it: if, for any reason you're 
not, return it within ten days. We'll 
refund every penny. And no questions 
asked. 



SYM-1, 6502-BASED MICROCOMPUTER 

• FULLY-ASSEMBLED AND COMPLETELY INTEGRATED SYSTEM that's 
ready-to-use 

' ALL LSI IC'S ARE IN SOCKETS 

' 28 DOUBLE-FUNCTION KEYPAD INCLUDING UP TO 24 "SPECIAL" 
FUNCTIONS 

• EASY-TO-VIEW 6-DIGIT HEX LED DISPLAY 
' KIM-1* HARDWARE COMPATIBILITY 

The powerful 6502 8-Blt MICROPROCESSOR whose advanced 
architectural features have made it one of the largest selling "micros" 
on the market today. 

THREE ON-BOARD PROGRAMMABLE INTERVAL TIMERS available to 
the user, expandable to five on-board. 

4K BYTE, ROM RESIDENT MONITOR and Operating Programs. 
Single 5 Volt power supply is all that is required. 
IK BYTES OF 21 14 STATIC RAM onboard with sockets provided for 
immediate expansion to 4K bytes onboard, with total memory expan- 
sion to 65, 536 bytes. 

USER PROM/ROM: The system is equipped with 3 PROM/ROM ex- 
pansion sockets for 2316/2332 ROMs or 2716 EPROMs 
ENHANCED SOFTV^ARE with simplified user interface 
STANDARD INTERFACES INCLUDE: 
— Audio Cassette Recorder Interface with Remote Control (Two 

modes: 135 Baud KIM-1* compatible, Hi-Speed 1500 Baud) 
— Full duplex 20mA Teletype Interface 
— System Expansion Bus Interface 
— TV Controller Board Interface 
—CRT Compatible Interface (RS-232) 

APPLICATION PORT: 15 Bi-directional TTL Lines for user applications 
with expansion capability for added lines 

EXPANSION PORT FOR ADD-ON MODULES (51 I/O Lines included in 
the basic system) 

SEPARATE POWER SUPPLY connector for easy disconnect of the d-c 
power 
AUDIBLE RESPONSE KEYPAD 




Synertek has enhanced KIM-1 ^ software as well as the hardware. The 
software has simplified the user interface. The basic SYM-1 system is 
programmed in machine language. Monitor status Is easily accessible, 
and the monitor gives the keypad user the same full functional capabili- 
ty of the TTY user. The SYM-1 has everything the KIM-1 "" has to offer, 
plus so much more that we cannot begin to tell you here. So, if you want 
to know more, the SYM-1 User Manual is available, separately. 
SYM-1 Complete w/manuals $269.00 

SYM-I User Manual Only 7.00 

SYM-I Expansion Kit 75.00 

Expansion includes 3K of 21 14 RAM chips and 1-6522 I/O chip. 
SYM-1 Manuals: The well organized documentation package is com- 
plete and easy-to-understand. 

SYM-1 CAN GROW AS YOU GROW. Its the system to BUILD-ON. Ex- 
pansion features that are soon to be offered: 

*BAS-1 8K Basic ROM (Microsoft) $159.00 

*KTM.2 TV Interface Board 349.00 

*We do honor Synertek discount coupons 



QUALITY EXPANSION BOARDS DESIGNED SPECIFICALLY FOR KIM-1, SYM-1 & AIM 65 

These boards are set up for use with a regulated power supply such as the one below, but, provisions have been made so that you can add 

onboard regulators for use with an unregulated power supply. But, because of unreliability, we do not recommend the use of onboard 

regulators. All I.C.'s are socketed for ease of maintenance. All boards carry full 90-day warranty. 

All products that we manufacture are designed to meet or exceed industrial standards. All components are first qualtiy and meet full 

manufacturer's specifications. All this and an extended burn-in is done to reduce the normal percentage of field failures by up to 75%. To you, 

this means the chance of inconvenience and lost time due to a failure is very rare; but, if it should happen, we guarantee a turn-around time of 

less than forty-eight hours for repair. 

Our money back guarantee: If, for any reason you wish to return any board that you have purchased directly from us within ten (10) days after 

receipt, complete, in original condition, and in original shipping carton; we will give you a complete credit or refund less a $10.00 restocking 

charge per board. 



• 



VAK-1 8-SLOT MOTHERBOARD 

This motherboard uses the KIM-4* bus structure. It provides eight (8) 
expansion board sockets with rigid card cage. Separate jacks for audio 
cassette, TTY and power supply are provided. Fully buffered bus. 
VAK-1 Motherboord $129.00 

VAK-2/4 16K STATIC RAM BOARD 

This board using 2114 RAMs is configured in two (2) separately 
addressable 8K blocks with individual write-protect switches. 

VAK-2 16K RAM Board with only $239.00 

8K of RAM ( Mt populated) 
VAK-3 Complete set of chips to $1 75.00 

expand above board to 16K 
VAK-4 Fully populated 16K RAM $379.00 

VAK.5 2708 EPROM PROGRAMMER 

This board requires a +5 VDC and +12 VDC, but has a DC to DC 



multlplyer so there Is no need for an additional power supply. All 

software Is resident In on-board ROM, and has a zero-insertion socket. 

VAK<5 2708 EPROM Programmer $269.00 

VAK-6 EPROM BOARD 

This board will hold 8K of 2708 or 2758, or 16K of 2716 or 2516 
EPROMs. EPROMs not included. 

VAK-6 EPROM Board $1 29.00 

VAK-7 COMPLETE FLOPPY-DISK SYSTEM (May '79) 

VAK-8 PROTYPING BOARD 

This board allows you to create your own interfaces to plug Into the 
motherboard. Etched circuitry Is provided for regulators, oddress and 
data bus drivers; with a large area for either wire-wrapped or soldered 
IC circuitry. 

VAK-8 Protyping Board $49.00 



POWER SUPPLIES 

ALL POWER SUPPLIES are totally enclosed with grounded enclosures for safety, AC power cord, and carry a full 2-year warranty. 
FULL SYSTEM POWER SUPPLY 
This power supply will handle a microcomputer and up to 65K of our KIM-1 * Custom P.S. provides 5 VDC @ 1 .2 Amps 

VAK-4 RAM. ADDITIONAL FEATURES ARE: Over voltage Protection on 5 and + 1 2 VDC @ .1 Amps 

volts, fused, AC on/off switch. Equivalent to units selling for $225.00 or KCP-1 Power Supply $41.50 

more. .^m.^.i..«m...^„m«»»«m»».».^«^^.i_.»«....m«»^.«.^^i-.^mm 

Provides +5 VDC i 



10 Amps & ± 12 VDC @ 1 Amp 



VAK-EPS Power Supply 

ENTERPRISES 




SYM-1 Custom P.S. provides 5 VDC @ 1.4 Amps 
$125.00 VCP-1 Power Supply 

'KIM Is a product of MOS Technology 



$41.50 



INCORPORATED 



2967 W. Fairmount Avenue 
Phoentx AZ 85017 
(602)265-7564 



Common Variables on the APPLE II 



Modular software designs rely on common variables to 
pass data between interrelated programs. Two short 
subroutines emulate the DOS CHAIN capability by 
allowing use of common variables under Integer or Ap- 
plesoft BASIC, without a disk. 



Professor Robert F. Zant 

Department of Accounting 

and Information Systems 

North Texas State University 

Denton, TX 76203 



The solution of complex problems often 
leads to the writing of several inter- 
related programs. Furthermore, the pro- 
grams usually use several of the same 
variables — called common variables. 
This is accomplished in most systems 
by not destroying the common variables 
when a new program is loaded. Thus, the 
value of a variable can be defined in one 
program and used in subsequent pro- 
grams. 

There is no true facility with the APPLE II 
for using common variables. The CHAIN 
command in DOS comes close to pro- 
viding the capability, but it saves all 
variables instead of just saving 
designated common variables. Also, it 
can only be used with Integer BASIC pro- 
grams run under DOS. No facility for 
common variables is provided for non- 
disk systems or for Applesoft programs. 

The attached machine language routines 
can be used to pass all variables to suc- 
ceeding programs. Integer BASIC and 
Applesoft versions are provided. Both 
versions are used as follows: 

1. Load the machine language 
routine before the first BASIC pro- 
gram is executed. 

2. In each BASIC program except the 
last program, "CALL 774" im- 
mediately before termination or 
before the DOS command to RUN 
the next program. 

3. In each BASIC program except the 
first program, "CALL 770" before 
executing any statement that af- 
fects or uses variables. Do not 
reDIMenslon variables in subse- 
quent programs. 

Since all variables are saved whether 
they are needed or not, main storage is 
used most efficiently if the same set of 
variable names is used in all programs. 
This, of course, is required for the 
variables that are intended to be com- 
mon for all programs. Other main 
storage is reclaimed by the reuse of the 
names of "non-common" variables. 

String variables will not always be saved 
correctly in Applesoft. If the string value 
was read from disk, tape or keyboard, the 



value will be saved. If the string value is 
defined in an assignment statement (e.g. 
A$ = "XXX"), the value will not be 
available to subsequent programs. 

The routine for Integer BASIC is very 
simple. The variable table pointer is 
simply saved and restored. The Ap- 



plesoft version, however, is a little more 
complex. The Applesoft version of the 
routine moves all non-string variables to 
high RAM, just under the strings. Then, 
when called at the beginning of the next 
program, via "CALL 770", the routine 
moves the variables back down to the 
end of the new program. 



0030 






• ROUTINE TO SAVE AND RECALL 


0040 






» COMMON VARIABLES 


FOR APPLESOFT 11 BASIC 


0050: 






» PROGRAMS 


ON THE APPLE 11 


0060: 






« 








0070: 






» WRITTEN 03/16/79 


BY ROBERT F. ZANT 


0090: 






« 








0100: 


03A7 




DL 


« 


$0018 




0110: 


03A7 




DH 


« 


$0019 




0120: 


03A7 




CL 


« 


$001A 




0130: 


03A7 




CH 


tt 


$001B 




0140: 


03A7 




EL 


« 


$001C 




0150: 


03A7 




EH 


« 


$001D 




0160: 


03A7 




AIL 


ff 


$005C 




0170: 


03A7 




AlH 


« 


$003D 




0180: 


03A7 




A2L 


« 


$003E 




0190: 


05A7 




A2H 


» 


$003F 




0200: 


03A7 




A4L 


« 


$0042 




0210: 


03A7 




A4H 


« 


$0043 




0220: 


0302 






ORG 


$0302 




0230: 


0302 4C 


56 03 




JKP 


RECALL 


»»*ENTRy 770 


0240: 


0305 00 






BRK 






0250: 


0306 38 






SEC 




••♦ENTRY 774 - SAVE NUMERICS 


0260: 


0307 A5 


6F 




LDA 


$006F 


COMPUTE ADDRESSES FOR MOVE 


0270: 


0309 85 


18 




STA 


DL 


SAVE START OF STRING ADDRESS 


0280: 


030B E5 


6D 




SEC 


$006D 


END OF NUMERICS 


0290: 


030D 85 


1A 




STA 


CL 


TEMPORARY STORAGE 


0300: 


030F A5 


70 




LDA 


$0070 




0510: 


0311 85 


19 




STA 


DH 




0320: 


0313 E5 


6E 




SBC 


$006E 




0330: 


0315 85 


IB 




STA 


CH 


TEMPORARY STORAGE 


0340: 


0317 18 






CLC 






0350: 


0318 A5 


lA 




LDA 


CL 




0360: 


031A 65 


69 




ADC 


$0069 


START OF NUMERICS 


0370: 


031C 85 


1A 




STA 


CL 


TEMP STORAGE 


0380: 


031E A5 


IB 




LDA 


CH 




0390: 


0320 65 


6A 




ADC 


$006a 




0400: 


0322 85 


IB 




STA 


CH 




0410: 


0324 A6 


lA 




LDX 


CL 


SUBTRACT ONE 


0420: 


0326 DO 


02 




BNE 


Al 




0430: 


0328 06 


IB 




DEC 


CH 


START OF COMMON 


0440: 


032A CA 




Al 


DEX 






0450: 


032B 86 


lA 




STX 


CL 




0460: 


032D 86 


42 




STX 


A4L 


SET UP MOVE 


0470: 


032F A5 


IB 




LDA 


CH 




0480: 


0331 85 


43 




STA 


A4H 




0490: 


0333 A5 69 




LDA 


$0069 


START OF VARIABLES 


0500: 


0335 85 


5C 




STA 


AIL 




0510: 


0337 A5 


6A 




LDA 


$006A 




0520: 


0339 85 


3D 




STA 


A1H 




0530: 


033B A5 


6D 




LDA 


$006D 


END OF VARIABLES 



August, 1979 



MICRO - The 6502 Journal 



15:47 



mCHO-V:;^R'£ ASSEMBLER 65XX-1.0 PAGE 02 



03^3 AO 


GO 


LDYIM $00 




03^5 20 


2C FE 


JSR 


$FE2C 


USE MONITOR MOVE ROUTINE 


03'(8 38 




SEC 




COMPUTE DISPLACEMENT 


C3^^9 A5 


6E 


LDA 


$006E 


TO ARRAYS 


C3^B Cfj 


69 


SBC 


$0069 




03i4D 85 


1C 


STA 


EL 




03i*F A5 


5C 


LDA 


$006C 




0351 E5 


6A 


SBC 


$00 6A 




0353 85 


1D 


STA 


EK 




0355 60 




RTS 

ft 




BACK TO BASIC 


0356 A5 


1A 


RECALL LDA 


CL 


»***tiNTRY 770 - RECALL 


0358 85 


3C 


STA 


AIL 


SET UP MOVE 


035A A5 


IB 


LDA 


CH 




035c 85 


3D 


STA 


A1H 




035E AS 


18 


LDA 


DL 




O36C 85 


6F 


STA 


$006F 


START CF STRINGS 


0562 85 


3E 


STA 


A2L 




056^ A5 


19 


LDA 


DH 




0366 85 


70 


STA 


$0070 




0368 65 


3F 


STA 


A2H 




O36A A5 


69 


LDA 


$0069 


START CF NUMERIC3 


O36C 85 


^2 


STA 


Ai^L 




036E A5 


6A 


LDA 


$006A 




0370 85 


^3 


STA 


AUH 




0372 AO 


CO 


LDYIM 


$00 




0374 20 


2C FE 


JSR 


$FE2C 


USE MONITOR MOVE ROUTINE 


0377 18 




CLC 




COMPUTE START 


0378 A5 


69 


LDA 


$0069 


OF ARRAYS 


037A 65 


1C 


ADC 


EL 




037C 85 


6B 


STA 


$006B 




037E A5 


6A 


LDA 


$006A 




0380 65 


ID 


ADC 


EH 




0332 85 


6C 


STA 


$006C 




O38M 38 




SEC 




COMPUTE END OF NUMERICS 


0385 A5 6F 


LDA 


$006F 




0387 E5 


1A 


SBC 


CL 




0389 85 


6D 


STA 


$006D 




03SB A5 


70 


LDA 


$0070 




O38D E5 


IE 


SBC 


CH 




038? 85 


6E 


STA 


$006E 


TEMP STORAGE 


0391 18 




CLC 






0392 A5 


6D 


LDA 


$006D 




039^ 65 


69 


ADC 


(1:0059 




0396 85 


6D 


STA 


$006D 


TEMP VALUE 


039G A5 


CE 


LDA 


$C06E 




039A 65 


6A 


ADC 


$00bA 




039c 85 


6E 


STA 


$006E 


TEMP VALUE 


Qj9E A5 


6P 


LDA 


$00 6D 


SUBTRACT ONE 


03 AC 1^0 


0^ 


BNE 


A2 




o^a;^ C6 


6E 


DEC 


$006E 


END OF NUMERICS 


03Ai; C6 


CD 


A2 DEC 


$O06d 




03.16 60 




RTS 




BACK TO BASIC 



SYMBOL TABLE 2000 205A 

AQ 032A AQH 003D 

ARH 003F AHL 003E 

CH 001B CL 001A 

EH 001D EL 001C 



15:48 



AQL 003c AF 03A^ 

kW 0043 ATL 0042 

DH 0019 DL 0018 

RECALL 0356 



[SYBEXJ 



LEADER IN 

COmPUTER EDUCATION 



] 



INTRODUCES THE 6502 SERIES 





PftOCftf)mmiNG THE 6K)2 

ByRodnoyZaks 
320pp,refC202 $10.95 

An introductory programming 
text for the 6502. Does not 
require any prior programming 
knowledge. From arithmetic 
to interrupt-driven input-output 
techniques. It has been de- 
signed as a progressive, step 
by step course, with exercises 
in the text designed to test the 
reader at every step. 

6502 cnmES 

ByRodnoyZaks 

refG402 $13.95 

From Piano to tic tac toe, in- 
cluding many popular games, 
and how to program your own. 
7o be published. 



6502 APPLICATIONS BOOK 

byRodnoyZaks 
275pp,refD302 $12.95 

Presents a series of practical 
(hardware & software) applica- 
tions for any 6502 board. 
Applications can be used as 
experiments - or implemented 
at minimal cost. A few ex- 
amples: morse generator, elec- 
tronic piano, digital clock, 
home alarm systems, traffic 
controller.... and morel 

TO ORDER 

■yphoiM: 4I5B48-8233, Visa, M.C., 

American Expre&s. 
■ymall: Include payment. 
Shipping charges: add 65C per book 

4th class - oilow 4 weeks - or $1 .50 

per book for U, P.S. Overseas add 

$3.00 per book. 
Tox: in California add lax. 



AVAILABLE AT BOOKSTORES, COMPUTER. AND 
ELECTRONIC SHOPS EVERYWHERE 




NAME_ 



2020 Milvla Street 

Berkeley, CA94704 

Tel 415 848-8233 Telex 336311 



.POSITION. 



COMPANY . 
ADDRESS__ 
CITY 



Dcharge my: DVisa DAA.C. 
aC202 00302 nG402 
Number 



_STATE/ZIP 

DAmericon Express 

Exp. date 



Signature 

AAM 



DSend Free Catatogue 



MICRO - The 6502 Journal 



August, 1979 



OCIO: 


















0020: 


















0030: 










ROUTINE 1 


'0 SiiVE AND RECALL 




0040: 










COHMCN VAHIAELES 


FOR IirrEGER BASIC 




0050: 










PROGRAMS 


ON THE APPLE II 




0060: 


















0070: 










WRITTEN 03/16/79 


BY ROBERT F. ZANT 




0080: 










MODIFIED 


7/^/79 BY MICRO STAFF 




0090: 


















0100: 


0318 






CL * 


$001A 






0110: 


0318 






CH » 


$00 IF 






0120: 


0302 








ORG 


$0302 






0130: 


0302 


!}C 


OF 03 




JMP 


RECALL 


»»*ENTRY 770 




011^0: 


0305 


00 






BRK 








0150: 


0306 


A 5 


CC 




LDA 


$OOCC 


•••ENTRY 71i\ - SAVE VAf 


UABLE 


0160: 


0308 


85 


1A 




STA 


CL 


SAVE END OF 




0170: 


O30A 


A5 


CD 




LDA 


$0OCD 


VARIABLE TABLE 




0180: 


030c 


85 


IB 




STA 


CH 






0190: 


O3OE 


60 






RTS 




BACK TO BASIC 




0200: 


















0210: 


O3OF 


A5 


1A 


RECALL LDA 


CL 


ENTRY 770 - RECALL VARIABLES 


0220: 


0311 


85 


CC 




STA 


$OOCC 


RESET END OF 




0230: 


0313 


A5 


IB 




LDA 


CH 


VARIABLE TABLE 




O2M0: 


0315 


85 


CD 




STA 


$OOCD 






0250: 


0317 


60 






RTS 




BACK TO BASIC 





Classified Ads 



OPTIMIZE APPLESOFT programs: shor- 
ten variable names; remove remarks 
& extra colons; concatenate lines; 
renumber; list variable cross refs. 
Two 1.3K programs for 16-48K APPLE 
II's. Cassette $15, disc $20 from: 

Sensible Software 

P.O. Box 2395 

Dearborn, MI ^8123 

MACRO ASSEMBLER and TEXT EDITOR: 
for PET, APPLE II, SYM, KIM, other. 
Macros, conditional assembly, 27 
Qommands, 22 pseudo-ops. Cassette 
and manual for $^9.95 ($1.00 for 
Info). C.W. Moser 

3239 Linda Drive 
Winston-Salem, NO 27106 



ADVERTISE in MICRO for a mere $101 
A classified ad such as the ones 
above may be run in this new ad 
section for $10.00. Ad may not 
exceed six lines. Only one ad per 
person or company. Must be prepaid 
and must relate to the 6502. You 
will reach more than 6502 readers I 



BAD BEVIEV 



What's worse than getting a complaint about 
MICRO that is not valid? Getting one that 
is! I received a telephone call from Dr. 
Rodney Zaks the other day concerning a review 
which was published about his book Programming 
the 6502 in an earlier issue of MICRO. His 
complaint was not that the review was unfavor- 
able to his book, but that the "review" went 
beyond the boundaries of a review and made a 
number of unwarranted accusations about the • 
techniques, motivations and values of the 
entire product line offered by SYBEX, the 
publisher of Dr. Zaks' book. I told Dr. Zaks 
that I didn't really remember the review, that 
it was against MICRO'S basic policy to print 
anything of that nature, but that I would look 
into the matter and if he was correct, I would 
print an apology and try to rectify the matter 
as much as possible. 

Well, when I read the "review" I was surprised. 
I agree with Dr. Zaks. While the first part 
of the review is critical of the book, it is 
within the rights of a reviewer. The second 
part of the "review" should not have been 
printed. It does not provide any useful in- 
formation to the reader and its negative as- 
sertions are unjustified. Since I was both 
Editor and Publisher at the time the review was 
printed, I take full blame for its appearance 
in MICRO, and apologize to Dr. Zaks and SYBEX 
for its appearance. 



Since it is against MICRO'S policy to print 
such material, how did it get printed? All I 
can figure is that it "fell through the crack". 
With the very small staff we had at the time, 
most of our efforts were spent on getting the 
major articles into shape for publication: 
technical editing, typesetting, proofing, 
pasting-up, and so forth. Very little time was 
left for a careful analysis or review of the 
small "filler" material, and the "review" never 
got the attention it should have, and so "slipped 
in", I suggest that all readers ignore the neg- 
ative implications of the second half of the re- 
view. With the enlargement of the MICRO staff to 
include a full time editor as well as other sup- 
port personnel, we have more time and similar 
problems should not occur. 

MICRO has printed very few reviews to date: 
three book reviews and only a couple hardware 
or software reviews. The reason for this is 
that we feel that unsolicited reviews tend to 
be biased. The author is writing because he 
either loves or hates a product. We are working 
on a plan by which MICRO can establish a panel 
of reviewers and actively start doing product 
reviews which are both fair and thorough. 
Information about this plan will appear in 
MICRO shortly. 



_£A^^. 




August, 1979 



MICRO - The 6502 Journal 



15:49 



APPLE HhRES GRAPHICS: The Screen Machine bySoftapeM 



SABCDEFGHUKLKNO 
PQRSTUyHXyZCN.3-- 
'^abcdefghijklttno 
pqrstuwwxyz ^ 



Hi-re& Character 
Generator 

by Bill Depeu 

COPYRIGHT 1379 SOFTAPEl 

7 K 8 dot ftatrix 



for Plot 
for blank 
for restart 
or backspace 
load characters 
saOe characters 
exit prograft 



SPRftGUE UOH 28416 
Hi»h Current Driver* 
SCHEMATIC (each driver) 



traftftifttorfi 



lek 7.2fc 3k 




Open the manual and LOAD the cassette. Then get ready to explore 
the world of Programnnable Characters' with the SCREEN MA- 
CHINE^". You can now create new character sets — foreign alpha- 
bets, electronic symbols and even Hi-Res playing cards, or, use the 
standard upper and lower case ASCII character set. 

The "SCREEN MACHINE" lets you redefine any keyboard character. 
Just create any symbol using a few easy key strokes and the "SCREEN 
MACHINE" win assign that symbol to the key of your choice. For 
example: create a symbol, an upside down "A" and assign it to the 
keyboard 'A' key. Now every time you press the 'A' key or when the 
Apple prints an 'A' it will appear upside down. Any shape can be 
assigned to any key! 



The "SCREEN MACHINE" gives you the option of saving your 
character symbols to disk or tape for later use. There is no compli- 
cated 'patching' needed. The SCREEN MACHINE is transparent to 
your programs. Just print the new character with a basic print state- 
ment. The "SCREEN MACHINE" is very easy to use. 

Included on the cassette are Apple Hi-Res routines in SOFTAPES 
prefix format. You can use both Apple's, routines and the SCREEN 
MACHINE to create microcomputing's best graphics. 



Cassette, and Documentation, a complete package $19.95 





MICROGAMMON 1.0 Learn, practice and inhance your Backgammon 
ability with a true competitor $14.95 

APPLE-LIS'NER Voice recognition Software. Create your own pro- 
grams which 'listen' and understand 31 spoken words — English or 
Foreign. No hardware needed $19.95 

APPLE TALKER Your Apple's voice. Create programs which talk to 
you in English or Spanish or any language $15.95 

JUPITER EXPRESS Command your ship thru the hazards of the 
Asteroid belt between Mars and Jupiter $9.95 

FORTE' A music language, written like basic, you use line numbers 
for your notes. You can trace line numbers or notes. You can even 
print the words of any song. Save your song to your Disk . $19.95 

FORTH 3C Is the creation of Wm. Graves. This language gives you 
faster execution of programs than basic and is easier to program than 
machine language. Our 100 page manual will teach you everything 
you will need. FORTH DC comes complete with demo programs on 
one Apple diskette $49.95 

WHERE TO GET IT: Look for the SOFTAPE Software display in 
your local computer store. Apple dealers throughout the United 
States, Canada, South America, Europe and Australia carry the 
SOFTAPE Software line of quality products. 

If your local dealer is sold out of SOFTAPE Software you can order it 
direct from us by check or Visa/Master Charge. If you have any ques- 
tions please call us at: 




BRIGHT PEN What is the difference between a light and a Bright 
Pen? Intelligent Software and extensive documentation . . . . $34.95 



V/SA 



1-213-985-5763 




Or mail your order to the address below. We'll add your name to our 
mailing list for free literature and announcements of new products. 

SOFTAPE r 

10432 Burbank Blvd. • North Hollywood, CA 91601 




'^^SfSM 



ZIPTAPE loads 8K BASIC in 15 sec- 
onds! Slower than a speeding disk? 
Sure, but it only costs $22.50 
plus $1.00 S&H. $3.00 extra for 
software on KIM cassette. Des- 
cribed in MICRO #6. SASE for info. 
Order from: Lew Edwards 

1^51 Hamilton Ave. 

Trenton, NJ 08629 

PROFIT from your micro. Don 
Lancaster's -outrageous new book 
THE INCREDIBLE SECRET MONEY 
MACHINE tells, shows you how. 
$6.95 autographed, postpaid, 
guaranteed. Visa accepted. Quest 
your tinaja NOW! Order from: 

Synergetics MC-7 

Box 1877 

Thatcher, AZ 85552 

APPLE RENUMBER/APPEND - Integer 
and applesofti Programmer's Utility 
Pack. $1695 for disk or tape. 
Includes many other programs as 
well. SASE for info or order from: 

Southwestern Data Systems 

Box 582-M 

Santee, CA 92071 

714/562-3670 



Classified Ads 



SYM-1 OWNERS - SYM/KIM Appendix to 
First Book of KIM details changes 
to KIM games to run on basic SYM-1. 
Load KIM programs, modify portions 
and then run. Appendix. Only $4.25, 
First Book of KIM at $9.00, combo 
$12.50 post paid. Order from: 

Robert A Peck 

1276 Reisling Terrace 

Sunnyvale, CA 94087 

GRAFAX, the full screen graphics 
editor for the OSI 2P, 540 video 
graphics ROM, polled keyboard. 
Single keystroke coauoands make 
drawing a breeze. $10 + $1.00 post- 
age for BASIC/assembler cassette 
and documentation: 

Mark Baas 

269 Jamison Drive 

Frankfort, IL 60423 

APPLE II IBPC.1 - Integer BASIC 
Partial Compiler, Phase 1, replaces 
multiple-statement BASIC line with 
calls to machine code for muoh 
faster programs! Documentation and 
cassette for $20.00. Order from: 



MICROSPAN SOFTWARE 
P.O. Box 9692 
Austin, TX 78757 



"REALTIME BASEBALL" for your PET. 
A realtime simulation of Major 
League Baseball. Excellent graphics. 
Play against the PET, a friend, or 
let the PET play against itself. 
Now at reduced prices. Send check 
or M.O. for $9.95, IN residents add 
4J. Order from: 

SOFTBREW 

6206 Newberry Rd. #318 

Indianapolis, IN 46256 



Software for the APPLE: 
$25 buys SCROLLING WONDER 
+ GIANT LETTER 

+ HI-RES ALPHANUMERICS 
on cassette, 16K. $25 buys: 
MULTI -MESSAGE + 

INTERLEAVED KALEIDOSCOPE + 

MULTI-MESSAGE w/ ABSTRACT ART 
on cassette, 32K. Send check or MO 
to: Connecticut Information Systems 
218 Huntington Rd. 
Bridgeport, CT 06608 



MANUSCRIPT COVER SHEET 

Please enter all of the information requested on this cover sheet: 
Date Submitted: 



saasatii" 



Author(s) Name(s) 

(To be published exactly as entered) 



.Telephone: 

{This will NOT be published) 



Mailing Address: 

(This will be published). 



AUTHOR'S DECLARATION OF OWNERSHIP OF MANU- 
SCRIPT RIGHTS: This manuscript is my/our original work and 
is not currently owned or being considered for publication by 
another publisher and has not been previously published in 
whole or in part in any other publication. I/we have written per- 
mission from the legal owner(s) to use any illustrations, 
photographs, or other source material appearing in this manu- 
script which is not my/our property. If required, the manu- 
script has been cleared for publication by my/our employer(s). 
Note any exceptions to the above (such as material has been 
published in a club newsletter but you still retain ownership) 
here: 



Signature(s):, 



.Date:. 



Any material for which you are paid by Micro Ink, Incorporated, 
whether or not it is published in f\/1ICR0, becomes the ex- 
clusive property of Micro Ink, Incorporated, with all rights 
reserved. 



A FEW SUGGESTIONS 

All text should be typewritten using double or triple spacing 
and generous left and right margins. Figures and illustrations 
should be drawn neatly, either full size or to scale, exactly as 
they will appear in MICRO. Photographs should be high con- 
trast glossy prints, preferably with negatives, and program 
listings should be machine generated hard copy output in 
black ink on white paper. Assembly language program listings 
need not be of especially high quality, since these are normally 
re-generated in the MICRO Systems Lab, but they must include 
object code as a check against typographical errors. 

Since other MICRO readers will be copying your program code, 
please try to test your program thoroughly and ensure that is 
is as free from errors as possible. MICRO wilt pay for program 
listings, figures and illustrations, in addition to the text of an 
article; however, MICRO does not normally pay for figures that 
must be re-drawn or for programs that must be re-keyboarded 
in order to obtain a high contrast listing. Any program should 
include a reasonable amount of commentary, of course, and 
the comments should be part of the source code rather than 
explanations added to the listing. 

Send your manuscripts to: 

MICRO, P.O. Box 6502, Chelmsford, MA 01824, U.S.A. 



1 PET SPECIALS 

UST 


SALE 


PET 16K $ 995 


$860 


PET 32K $1295 


$1125 


PET 8K $ 795 


$695 


PET 2040 Dual Disk $1295 


$1125 


PET 2023 Printer (pressure feed) $ 849 


$750 


PET 2022 Printer (tractor feed) $ 995 


$860 



KIM-1 $159 SYM-1 

Memory Plus 

SEA-16 New 16K Static RAM 

Seawell Motherboarcl-4K RAM space 



$ 229 

(FOR $ 199 

SYM $ 325 

AIM) $ 99 



3M *^Scotch" 8" disks 
Verbatim 5" dislcettes 



SALE 



I0/$3I.00 
IO/$28.50 



2114 L 450 ns 4K Static RAM $ 6.95 

2716 EPROM (5 volt) $ 45 

Programming the 6502 (Zaks) $ 9.90 

6502 Applications Book (Zaks) $11.90 

6500 Programming Manual (MOS) $ 6.50 

6500 Hardware Manual (MOS) $ 6.50 

First Book of KIM $ 8.90 
Programming a Microcomputer:6502fFosferj $ 8.90 

Cassettes (all tapes guaranteed) 

Premium quality, high output lownoise in 5 screw 
housing with labels: 

C-10 10/5.95 50/25.00 100/48.00 

C-30 10/7.00 50/30.00 100/57.00 

WRITE FOR 6502 AMD S-100 PRODUCT LIST 

. ^ ^ 115 E. Stump Road 

A B Computers Montgomeryville,PAIB936 
^ (2151 699-8386 



Put Yourself in Control with the 



=APPLETHROTTLE 



That's right! The M>91ETHR0TTLE will turn 
your game paddles Into a speed controller. 
By simply pushing a button, you can stop 
your computer for as long as you want 
Release the button, and your computer 
enters a slow-motion mode with one 
paddle controlling the speed And if that 
isn't enough, look at these additional 
features: 

• Plugs into any slot 

• Works with machine language, Integer 
BASIC, and Applesoft 

• Momial - stow - stop 

• Gse to UST, TRACE, RUM, etc 

• NO SOmVARE to load 

• Unveil program secrets -^APPLEWffOmf 
And there's more! Mo more multiple UST commands to view small program 
sections. With the APPIETHROTTLE, you'll be able to list or trace long 
programs while watching your program flow in slow-motioa So get in control 
with the APPLETHROTTLE and order yours today! 




$89.95 



APPLETIME,a Real Time Qock 
for the Apple B. Plugs directiy into any 
slot and keeps time even when 
computer is off. Features 12/24 
Hour, BCD/ASai data format, and 
AC/Ciystal time base selection. 
Includes software examples for 
machine language and BASIC pro- 
grams. Completely assembled and 
tested. 
APT-1 Real Time Oock $79.95 



PROTOBOARD,with over 1300 
holes on 0.1 centers for designing 
your own circuits. 
APB-IProtoboard .... $17.95 



VERBATIM SVa" DISKETTES 

Soft-Sector Box of 10.,. $34.50 

(plastk: file case included) 




west side electronics 

P.O. Box 636, Chatsworth, CA 9131 1 

We pay all shipping in Coniinenial U.S.A. 
Others add W%, California residents add 6% tax 



m 



$74.95 
$49.95 



mRE IMMOVATIONS! 

FRQM 

P.S. SOFTWARE HOUSE 

FORMERLY PETSHACK 

PET" INTERFACES 

NEW! 

PET to CENTRONICS INTERFACE 

PET to PARALLEL INTERFACE with 5V .8A power supply 

PET to 2nd CASSETTE INTERFACE 

PET™ SCHEMATICS 

FOR ONLY $24.95 YOU GET: 

24" X 30" schematic of the CPU board, plus oversized schematics of the Video 
Monitor arxj Tape Recorder, plus complete Parts layout - all accurately and 
painstakjngty drawn to the minutest detail. 

PET"* ROM ROUTINES 

FOR ONLY $19.95 YOU GET: 

Comptote Disassemt>ly listirfgs of all 7 ROMS, plus identified sutxoutine entry 

points; Video Monitor, Keyboard routine. Tape Reconj and PJaytack routine, Real 

Trme Clock, etc. To entice you we are also including our own Machine Language 

Monitor program for your PET using the keyboard and video display. 

You can have the Monitor program on cassette for only $9.95 extra. 

SOFTWARE: 

6502 DISASSEMBLER $12.95 

MAILING LIST • For personal or business applications. $9.95 

MACHINE LANGUAGE MONITOR - Write Machine Code. Save on tape $9.95 

BUDGET - NEW - Keep-track of Bills and Checks. Update as needed $ 1 4.95 

STARTREK • All-time favorite written for the PET's special Graphics $7.95 

Send for our free SOHWARE BROCHURE, Deafer mquiries welcome. 

P.S. SOFTWARE HOUSE 

P.O. Box 966 Mishawaka, IN 46544 

gji Tel: (219) 255-3408 



DO YOU OWN A PERSONAL 
COMPUTER? 

A PET? AN APPLE II? 
A SORCERER? A VIP? 

If so, then you need the ARESCO 
newsletter specifically dedicated to 
YOUR personal computer systenn. 
One of the ARESCO newsletters Is 
tailored to meet your computer's con- 
figuration—for $15.00 you can find 
out what's new with the rest of the 
folks who purchased machines just 
like yours. Your $15.00 buys all ten 
issues of the current volume of one 
newsletter— you won't miss a single 
issue! 

Just tell us which computer you own 
or which newsletter you need: 

• The PAPER— for the Commodore PET^"^ 
•The RAINBOW— for the APPLE l|t"i 

• The SOURCE — for the SORCERERt"^ 

• The VIPER— for the RCA viptfi" 



Send an SASE for further information— or send 
$15 (cash, check, MC/VISA) and get your subscrip- 
tion started at once. Non-USA subscribers add 
$10.00 for airmail postage. 

ARESCO 

BOX 1142 

COLUMBIA, MD 21044 

301-730-5186 



# 



6502 Bibliography: Part XII 



Dr. William R. Dial 

438 Roslyn Avenue 

Akron, OH 44320 



449. Road and Track Magazine (May, 1977) 

Dinkel, John "Computerized Road Testing", pg. 60. 
Using a KIM-1 based system to gather road test data. 

450. Personal Computing 3 No 3 (Mar., 1979) 

Anon, "Tom Pittman, Tiny Basic and Cosmac", pg. 20-22. 
Comments on merits of various microprocessors from the 
viewpoint of writing higher levei languages. 

Zimmerman, Mark "Line Renumbering on the PET", 
pg. 24-29. 

Both Basic and Assembly Language versions of a 

renumbering program. 

451. SES Newsletter Issue 7 (Mar., 1979) 

Romano, Nicholas A. "Billboard", pg. 2. 
A horizontal scrolling message ala Goodyear Blimp for 
Apple. 

Romano, Nicholas A. "Circle Graphics" pg. 2-3. 
Several interesting circle programs including SEWER 
PIPE. For Apple. 

McClelland, Geo. "Machine and Assembly language Pro- 
gramming", pg. 4-6. 

A tutorial leading you by the hand thru the mysterious 

machine language of Apple. 

McClelland, Geo. "The & Command", pg. 6. 
How to use & in the Apple. 

452. Cider Press 1 No 11 (Feb., 1979) 

Nareff, Max J. "R&R for Decimal Dumps", pg. 5. 
How to round off those long decimal strings on the Apple. 

Kamins, Scot "FP Disk Trace", pg. 5. 
Tracing an Applesoft program with disk booted. 

Hoag, C.G. "Page Flip", pg. 6. 

Procedure to move Page 1 to page 2 from Basic on the 
Apple. 

Hertzfeld, Andy "Free Sector Program", pg. 8. 
Calculates the amount of free space available on an 
Apple II diskette. 

Nareff, M.J. "Space Commanders-SPC(X) and TAB(X)", 
pg. 10. 

Useful commands for formatting tables, etc. for the 

Apple. 

Kamins, Scot "Son of N", pg. 
A novel HELLO program for the Apple Disk. 

Anon, "February Disk of the Month", pg. 11. 
List of programs. 

453. MICRO No 10 (Mar., 1979) 

DeJong, Marvin L. "A Simple 24 Hour Clock for the AIM 65", 
pg.5. 

Displays time in hours: min: sec on the AIM display. 

HIM, Alan g. "Apple ll-Trace List Utility", pg. 9-14. 
The utility presented here wilt list each Basic program 
source statement line by line in the order executed. 

Rowe, Mike "The MICRO Software Catalog: VI", pg. 15-16. 
Review of 9 6502 software packages. 



Kosinski, John T. and Suitor, Richard F. "6522 Chip Setup 
Time", pg. 17. 

One more article on the 6522 I/O problems that should put 

this controversy to rest. 

Sherburne, John R. "High-Resolution Plotting for the PET", 
pg. 19-23. 
Some very interesting graphics programs for the PET. 

Zuber, Jim "Using Tiny Basic to Debug Machine Language 
Programs", pg. 25-30. 
Debugging on the KIM-1 and other 6502 machines. 

Tripp, Robert M., Ph.D. "Ask the Doctor: An ASK EPROM 

Programmer", pg. 31-35. 
This EPROM program will run on AIM, SYM or KIM sys- 
tems. 

Herman, Harvey B. " Thanks for the Memories' A PET 
Machine Language Memory Test", pg. 37-40. 
A very efficient memory test for the PET. 

Jones. Robert E. "The OSI Flasher: Basic-Machine 
Language Interfacing", pg. 41-42. 
Tutorial 6502 program. 

Dial, Wm. R. "6502 Bibliography— Part IX", pg. 47-48. 
the literature on this most popular of microporcessors 
continues to grow, 

454. Cider Press 1 No 12 (Mar., 1979) 

Anon, "March Disk of the Month", pg. 2. 
21 New programs, for Apple. 

Uhley, John "HIRES" Using its Commands and Saving 'Still 
Life' Pictures", pg. 4-5. 
Hires Tutorial article, for Apple. 

Nareff, Max and Kamins, Scot "V.X. Defeat", pg. 6. 
Two methods of avoiding the volume mismatch message 
on the Apple disk. 

Anon, "MAT Functions with the Apple— Part I", pg. 6. 
Simple Matrix operations can be accomplished on the 
Apple. 

Garrigues, Chris "Simple Animation in One Easy Lesson", 
pg- 7. 
Demonstration of the use of Pagel/Page 2. 

Rahl, Robert R. "Great Grand Nephew of N", pg. 7. 
Yet another modification in the development of this Hello 
program for the Apple disk. 

455. Interface Age 5 Iss3 (Mar., 1979) 

Margolin, Jed "A Musical Synthesizer for the KIM-1", pg. 
65-67. 

Plays two tunes or you can key in your own tune. 

456. Kilobaud No 28 (April, 1979) 

Lindsay, Len "PET-Pourri", pg. 8-10. 
New Accessories for PET, Software Review, How to 
protect programs, etc. 

Grlna, Jim "RePROM", pg. 19. 
A completely revised version of a PROM program for the 
KIM. 



August, 1979 



MICRO - The 6502 Journal 



15:53 



Luffman, Frederick E. "Bar-Graph Generator", pg. 90-92. 
A useful program for PET owners who want graphing 
Information without learning statistics. 

Schwartz, Marc "Starship Attack", pg. 106-107. 
A game for the Apple. 

457. Byte 4 No 3 (March, 1979) 

Meushaw, Robert V. "The Standard Data Encryption 

Algorithm— Part 1: An Overview", pg. 66-74. 

KIM is used to demonstrate the advantages and dis- 
advantages of the 6502 in handling the data algorithm. 

458. Creative Computing 5 No 3 (Mar., 1979) 

Palenik, Les "PET Machine— Language Programming", pg. 

49. 

Here is a low levei monitor for expanding the PET's pro- 
gramming capabilities. 

Anon, "Personal Electronic Transactions", pg. 33-37. 
Notes on disk for the PET, machine language commands 
PEEK, POKE, SYS, USR, etc. and Music programs. 

Owens, Dr. James "Teachers! A Social Science Survey 
Program", pg. 68-72. 

An OSI computer program (6502) for analysis of survey 

questionaires. 

459. The Paper 1 Iss 10 (Dec, 1978) 

Sparks, Paul W. "Tape Head Alignment on the PET", pg. 4. 
Simple instructions for a critical and important adjust- 
ment. 

Anon, "More on Allen Basics", pg. 9. 

Hints to help translate programs into PET Basic. 

Julich, Paul M. "Delete", pg. 12. 
Code to be used to delete a group of statements from any 
program on the PET. 

Bunker, W. Marvin "The Great Circle Route", pg. 20. 
Determining distance between two points on the Earths 
surface. 

Strasma, James "Saving Time and Space", pg. 23-26, 
How to condense your PET programs into less space. 

Anon, "Automatic Repeating Keys", pg. 27. 

How to make any key on the PET auto-repeating. 

460. EDN 23 No 15 (Aug. 20, 1978) 

Conway, John "Serial I/O Thrusts INDECOMP into Asyn- 
chronous communications", pg. 89-97. 

The successful conclusion of project INDECOMP using 

the Apple II and a PIA interface. 

461. EDN 23 No 17 (Sept., 1978) 

Patstone, Walt "Apple II— No PIA Problem", pg. 17. 
The Editor of EDN Magazine reports that the controversy 
about the questionable compatibility of the APPLE II with 
the PIA was all a mistake, and efforts to duplicate the 
"problem" have met failure. 

462. Creative Computing 5 NO 3 (Mar., 1979) 

Swenson, Carl "Disk Power: How to Use It— Apple's New 
Disk System", pg. 124-127. 
Helpful hints for Apple Disk users. 

463. The Paper 1 Iss 9 (Nov., 1978) 

Connely, R. Dale "Fix for the Disappearing Cursor", pg. 3. 
A simple diode fix for this common problem in the PET. 

Morehead, James C. "Cursor Problems", pg. 3-4. 
The cursor problem in the PET was alleviated by a fan. 

Baltay, Mlphael "Limitation in the Dimension Statement", 
pg.8. 

This program for the PET checks the limits in the DIM 

statement. 

Anon, "ROM Test", pg. 17-18. 
A program to test the ROM on your PET. 



Busdiecker, Roy "The PET Symbol and Data Formats", 
pg. 19-22. 

Explore your RAM to get interesting information on the 

PET'S management of variables. 

464. Personal Computing 3 No 4 (Apr., 1979) 

Anon, "Apple Slices the Grovery Bills", pg. 9-10. 
A description of one practical use of the APPLE II. 

Vizzone, Raymon T. "Artist Extraordinaire", pg. 58-60. 
Create pop-art images on your color TV. 

465. Call— Apple 2 No 3 (Mar., 1979) 

Golding, Val J. "Applesoft from Bottom to Top", pg. 3-10. 
Includes several useful utility programs: Print current 
value of all Applesoft pointers; Program to store Apple- 
soft programs at 3072 so 2nd text screen may be used; 
program to display Applesoft tokens; appending Apple- 
soft programs; examining variables in memory. 

Golding, Val J. "A Note or Three About BINADR 3.2", pg. 1 1. 
A BINADR program for the forthcoming DOS Version 3.2 

Cross, Mark "Hi-Res Colors", pg. 12. 

Program to Clear the GR screen to any color. 

Aldrich, Ron "Illegal Control Characters in REM lines',, pg. 

13-17. 
Program to insert illegal control characters into pro- 
grams. 

Aldrich, Darrell "The Mystery of Text Files", pg. 15. 
A short tutorial article. 

Paymar, Dan "Disk Access Utility", pg. 16-17. 
This program dumps a whole disk or a track at a time to 
the printer or screen. 

Sedgewick, Dick "Applelock", pg. 21. 
An integer Basic program to add to the end of a program 
to "write protect" or "lock" the entire program. 

Paymar, Dan "Keyboard Modifications to Get "[", "/" and 

"-"", pg. 23. 
At the risk of voiding the warranty, changes can be made 
in the Apple circuit board to provide the extra characters. 

Aldrich, Darrell "The Apple Doctor", pg. 25. 
A number of useful tips including how to save variables 
in Integer basic to disk and how to uncover control 
characters used in catalog titles to lock programs. 

466. The Paper 1 Iss 8 (Oct., 1978) 

Anon, "Intro to Basic", pg. 12-14. 

Discusses MAT READ and MAT PRINT and other alien 
commands giving the appropriate PET translation. 

Maier, Gary A, "Resequence", pg. 19-20. 
A renumbering program for the PET. 

Butterfield, Jim "Some PET Routines", pg. 23-24. 
Index to some useful routines. 

467. Recreational Computing 7 No 5 Iss 38 (Mar./Apr., 1979) 

Carpenter, Chuck "Easy Pokeing with Applesoft Basic", 
pg. 46-47. 
An easy way to enter in machine language problems. 

Saal, Harry "SPOT", pg. 52-54. 

New models of the PET are said to be on the way, with 
improved keyboard, external cassette, etc. More on music 
programs for the PET. 

Day, Jim "Apple-Rose", pg. 55. 

Program for the Apple plots rose-leaf patterns. A lot of fun 
can be had by changing parameters in this program. 

468. Rainbow 1 Iss 3, (Mar., 1979) 

Watson, Allen III "Don't Ignore Integer Basic", pg. 2. 
Some real advantages of Integer Basic are discussed. 

Anon, "Apple II Memory Map, Showing Areas Over-written 



• 



15:54 



MICRO - The 6502 Journal 



August, 1979 



when Booting DOS", pg. 6. 

Helpful in diagnosing 'What Happened?' 

Wozniak, Steve "Auto Repeat for Apple II Monitor Com- 
mands", pg. 7. 

How to automatically repeat Monitor Commands. 

Watson, Allen III "Add a Color-Killer for Clearer Text 
Display", pg. 9-12. 

This simple modification is now being incorporated in 

production Apples. 

Dubas, Andy "Hires Graphics Plotting Program", pg. 14-16. 
A plotting program that will solve and plot almost any 
polynamial equation. For an Apple {48K) with AS ROM and 
DOS. 

Watson, Allen Ml "Integer Basic Square Root", pg. 18. 
Simple program for this omission from Integer Basic. 

469. The Paper 1 Iss 7 (Sept., 1978) 

Sokel, Ralph J. "Looking at Basic ROM", pg. 6. 
How to examine the Commodore PET Basic ROM. 

Garst, John F. "Renumber", pg. 7. 
A modified program. 

Anon, "Intro to Basic: Strings", pg. 8-12. 
Tutorial article with examples on PET basic. 

Smith, Ron "Cassette I/O", pg. 20-21. 
All about PET Cassette format. 

470. The Paper 1 Iss 6 (Aug., 1978) 

Alexander, Frank "Demo for ARCOS(X(", pg. 6. 
A short demo for PET. 

Schwartz, Glenn "Tone on the PET", pg. 11. 
A short program and hardware for producing tones. 

Martin, Russell "Interfacing an Audio Cassette Deck to the 
Cassette I/O Port", pg. 16. 
How to hook-up two cassette recorders to the PET. 

McCarthy, Charles A. "PET Basic Documentation", pg. 
18-21. 
Discussion of floating point numbers in PET Basic. 

471. Dr. Dobbs Journal 3 Iss 6 No 26 (June/July, 1978) 

Herzfeld, Andy "Lazarus", pg. 31-33. 
A program to resurrect BASIC programs on the Apple II. 

477. Sofftalk 1 Issue 1 (Apr., 1979) 

Smith, Wm. V.R. and Depew, Wm. H. "Transferring Apple- 
talker to Disk", pg. 1. 

Detailed instructions from Softape on modifying their 
tapes for disk. SOFTALK is a newsletter published by 
Softape, 12 issues $5.00. 

Anon, "Talksaver, a Disk Save for Appletaiker", pg. 2-3. 
Procedure and software listing to allow Disk II owners to 
save the data tables created by Appletaiker to a named 
disk file. 

Anon, "Append Procedure for Prefix Programs", pg. 4. 
Detailed procedure for appending prefix programs to tape 
or disk programs. 

Anon, "How to Save Any Program in the Apple's Memory", 

pg. 6. 
Many programs contain subroutines which interface with 
saving the progrm to tape. Here is a way to overcome this. 

Anon, "Apple Memory Map", pg. 5. 
Map showing just how Apple Talker and Apple-lis'ner 
are situated in memory. 

473. Dr. Dobbs Journal 4 Issue 4 No 34 (Apr., 1979) 

Prigot, Jonathon M. "OSI Basic for the KIM-I", pg. 37-39. 
How to adapt the OSI Basic to KIM. 

Lentezner, Mark "Improve Your OSI Resident Editor", pg. 46. 
A simple program to fix a problem with OSI's resident. 

475. Creative Computing 5 No 4 (Apr., 1979) 

Milewski, Richard A. "Apple-Cart", pg. 22-23. 



All about the EXEC command of the Apple DOS. With 
examples. 

Yob, Gregory "Personal Electronic Transactions", pg. 28-32. 
Discussion of the PET Clock with example, PET files, 
etc. 

Zorn, Michael d, "Superose", pg. 98-99, 
A rose program for the PET. 

475. MICRO No 11 (Apr., 1979) 

Hill, Alan G. "An Apple II Program Edit Aid", pg. 5-7. 
A basic program to locate all occurences of a variable 
name, character string or Basic statements. 

Stelty, J. "Lifesaver", pg. 9-11. 
This program makes it easy to save LIFE patterns to 
cassette, run Life at different rates, etc. 

Vrtis, Nicholas J. "Corrected KIM Format Loader for 
SYM-1", pg. 12-14. 

Program helps overcome the SYM-1's KIM tape "2F" 

problem with a corrected loader. 

Hoyt, Bruce "A Close Look at the Superboard 11", pg. 15-18. 
In addition to an overview report on the Superboard II, 
there is presented a cassette save/hex memory dump 
program and a very useful table of memory usage. 

Sensicle, Andrew V.W. "SKIM or MAXI-KIM", pg. 19-20. 
An extended monitor supports a PC decrement function, 
as well as "open up" and "close up" modes to move 
blocks of data to make room for adding code and a branch 
calculator to help determine the relative branch ad- 
dresses. 

Stein, Robert A., Jr. "A Cassette Operating System for the 

Apple II", pg. 21-23. 

Program makes it possible to load programs into the 
Apple by typing the name of the program and the cassette 
operating program goes looking for it and if it is found it is 
loaded into the Apple. 

Tripp, Robert M., PhD "Ask the Doctor—Part III— Bits and 

Bytes", pg. 25-26. 
Problems and fixes discussed this month include a cor- 
rected AIM SYNC program, a patch for the AIM-Dis- 
assembler, Sym Tape evaluation, and comments on 
Synertek Basic (8K) V1.1. 

Rowe, Mike (Micro staff) "The Micro Software Catalog: 
VII", pg. 29-30. 
Ten more entries. 

Gieryic, John "SYM-1 6522-Based Timer", pg. 31-32. 

A tutorial article on the timer and the working of the 6522 
versatile interface adapter. 

Chalfin, Edward "The TVT-6; A User's Report", pg. 34. 
A user's impression of this inexpensive method of getting 
a video signal out of the KIM-1. 

Dial, Wm. R. "6502 Bibliography— Part X", pg. 36. 
Forty more references to the 6502 literature. 

Rindsberg, Don "The Ultimate PET Renumber", pg. 37-47. 
A major program for the PET. 

476. The Paper 1 Iss 5 (July, 1978) 

Oakes, Peter L.A. "Routines for Finding Arcsin and Arccos", 
pg, 4. 
Improved routines for the PET. 

Laudereau, Terry "PET Files", pg. 5. 
Discussion of PET files and the commands, OPEN, 
CLOSE, IN PUT#,GET#, etc. 

VanDusseldorp, Dean "Pause Routins", pg. 7. 
PET program to provide pauses in a program. 

Anon, "Simple Memory Test for PET", pg. 9. 
Program runs until a bad Ram Is found. 



August, 1979 



MICRO - The 6502 Journal 



15:55 



PERFECT AIM 




ATTRACTIVE FUNCTIONAL PACKAGING 
FOR YOUR AIM-65 MICROCOMPUTER 

• Professional Appearance 

• Striking Grey and Black 
Color Combination 

• Protects Vital Components 



• 



ENGINEERED SPECIFICALLY FOR 
THE ROCKWELL AIM-65 

• All Switches Accessible 

• Integral Reset Button 
Actuator 

• Easy Paper Tape Replacement 

EASILY ASSEMBLED 

• Absolutely No Alteration 
of AIM-65 Required 

• All Fasteners Provided 

• Goes Together in Minutes 



MADE OF HIGH IMPACT STRENGTH 
THERMOFORMED PLASTIC 

• Kydex 100* 

• Durable 

• Molded-ln Color 

• Non-Conductive 

AVAILABLE FROM STOCK 

• Allow Three to Four Weeks 
for Processing and Delivery 

• No COD'S Please 

• Dealer Inquiries Invited 



TO ORDER: 



NAME 



1. Fill in this Coupon (Print or Type Please) 

2. Attach Check or Money Order and Mail to: 



STREET. 
CITY 



STATE_ 



ZIP- 



Please Ship Prepaid SAE 1-1(s) 

@ $43.50 each 
California Residents Please Pay 

$46.33 (Includes Sales Tax) 



*TM Rohm & Haas 



enclosures 
group 

753 bush street 

san francisco, California 94108 



• 



Patent Applied For? 



rial»»»' 



an actBjna}!?*"' 



I 



'nr;'" »'"•'■* 



Ulall Btiial 



^.ndyouwMf'fr 



ODMPtfTER 



=*ff^ 



7w.valu.Weca.a,o8» 
today. ^ 



__Educationr 
personal? ---^-" " " ^ 



State 
What type' 



-Zip 



Business! 
.Other? 



Or phone. 



V^ayzata, 



APPLE II® PRaFESSiOIVAL SOFTXA/ARE r 



PIE TEXT EDITOR 

PIE (PROGRAMMA IMPROVED EDITOR) 
is a two-dimensional cursor-based editor 
designed specifically for use with memory- 
mapped and cursor-based CRT's. It Is totally 
different from the usual line-based editors, 
which were originally designed for Teletypes. 
The keys of the system input keyboard are 
assigned specific PIE Editor function 
commands. Some of the features included in 
the PIE system are: Blinking Cursor; Cursor 
movement up, down, right, left, plus tabs; 
Character insert end delete; String search 
forwards and backwards; Pags scrolling; 
GOTO line number, plus top or bottom of 
file; Line insert and delete anywhere on screen; 
Move end copy {single and multiple lines); 
Append and clear to end of line; Efficient 
memory usage. The following commands 
are available in the PIE Text Editor and each 
is executed by depressing the systems argu- 
ment key simulataneously with the command 
key desired: 

[LEFTl Move cursor one position to 

the left 
[RGHT] Move cursor one position to 

the right 
[UP] Move cursor up one line 

[down] Move cursor down one line 
[bHOM] Home cursor in lower left 

left hand corner 
[HOMEl Honne cursor in upper left 

hand corner 
[-PAG] Move up (toward top of file} 

one "page" 
[-•-PAG] Move down (toward bottom 

of file) one "page" 
ILTABJ Move cursor left one 

horizontal tab 
[RTABl Move cursor right one 

horizontal tab 
[GOTO] Go to top of file (line 1) 

[ARG]n[GOTO] Go to line 'n' 
[BOT] Go to bottom of file 

(last line + 1 ) 
[-SCH] Search backwards (up) Into 

file for the next occurence of 

the string specified in the last 

search command 
[ARGltt-SCHj Search backwards for 

string 't' 
t+SCH] Search forwards (down) into the 

file for the next occurence of the 

string specified in the last search 

command 
(ARGltt-t-SCHl Search forward for string 't' 
[APP] Append -move cursor to last 

character of line +1 
[INS] Insert a blank Ime beforere 

the current line 
[ARG] nllNS] Insert "n' blank lines before 

the current line 
[DEL] Delete the current line, saving 

it in the "push" buffer 
[ARG] n[DELl Delete 'n' lines and save the 
first 20 in the "push" buffer 
[DBLK] Delete the current line as long 

as it is blank 
[PUSH] Save current tine in "push" 

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

buffer 
[POP! Copy the contents of the "push" 

buffer before the current line 
tONS) Enable character insert mode 

[C1NS) [CINSJ Turn off character insert mode 
[BS] Backspace 

[GOB] GobbJe - delete the current charac- 

ter and pull remainder of characters 

to fight of cursor left one position 
[EXIT] Scroti all text off the screen and 

exit the editor 
[ARG] [HOME] Home Lme - scroti up to 
move current line to top 
of screen 
[APP] (APPl Left justify cursor on current 

line 
[ARG] [GOB] Clear to end of line 
Apple PI E Cassette 16K $19.95 

TRS-80PIE Cassette 16K 19.95 



6502FORTH 
6800 FORTH 



Z-80FORTH 



FORTH is a unique threaded language that ts 
ideally suited for systems and applications 
programming on a microprocessor system. 
The user may have the interactive FORTH 
Compiler/Interpreter system running stand- 
alone in 8K to 1 2K bytes of RAM. The 
system also offers a built-in incremental 
assembler and text editor. Since the FORTH 
language is vocabulary based, the user may 
tailor the system to resemble the needs and 
structure of any specific application. 
Programming in FORTH consists of defining 
new words, which draw upon the existing 
vocabulary, and which in turn may be used 
to define even more complex applications. 
Reverse Polish Notation and LIFO stacks 
are used in the FORTH system to process 
arithmetic expressions. Programs written in 
FORTH are compact and very fast, 

SYSTEM FEATURES & FACILITIES 

Standard Vocabulary with 200 words 

Incremental Assembler 

Structured Programming Constructs 

Text Editor 

Block 1 /O Buffers 

Cassette Based System 

User Defined Stacks 

Variable Length Stacks 

User Defined Dictionary 

Logical Dictionary Limit 

Error Detection 

Buffered Input 



CONFIGURATIONS 

AppleFORTH Cassette 16K S34.95 
AppleFORTH Disk 32K 49.95 

Pet FORTH Cassette 16K 34.95 

T RSSO F O R TH Cassette 1 6 K 34. 95 

SWTPC F O R TH Cassette 1 6 K 34.95 



ASM/65 EDITOR ASSEMBLER 

ASM/G& is a powerful, 2 pass disk-based 
assembler for the Apple II Computer System, 
tt is a compatible subset of the FORTRAN cross- 
assemblers whJch are available for the 6500 
family of micro-processors. ASM/65 features 
many powerful capabilities, which are under 
direct control of the user. The PIE Text Editor 
co-resides with the ASM/65 Assembler to form 
a comprehensive development tool for the 
assembler language programmer. Following 
are some of the features available in the 
ASM/65 Editor Assembler. 

PIE Text Editor Command Repetoire 

Disk Based System 

Decimal, Hexadecimal, Octal, & Binary 

Constants 
ASCII Literal Constar^ts 
One to Six character long symbols 
Location counter addressing "*" 
Addition & Subtraction Operators in 

Expressions 
High'Byte Selection Operator 
Low-Byte Selection Operator 
Source statements of the form: 

pabe!] [opcode] [operand] 

[;commentl 
56 valid machine instruction mnemonics 
All valid addressing modes 
Equate Directive 
BYTE Directive to initialize memory 

locations 
WORD Directive to initialize 16-btt words 
PAGE Directive lo control source listing 
SKIP Directive to control source listing 
OPT Directive to set select options 
LINK Directive to chain multiple text fifes 
Comments 
Source listing with object code and 

source statements 
Sorted symbol table listing 

CONFIGURATION 



Apple II 



48 K/ Disk 



S69.95 



Apple PI E Disk 



32K 24,95 



LiSA INTERACTIVE ASSEMBLER 

LISA is a totally new concept in assembly language programming. Whereas ali other assemblers 
use a separate or co-resident text editor to enter the assembly language program and then an 
assembler to assemble the source code, LISA is fully interactive and performs syntax/addressing 
mode checks as the source code is entered in. This is similar in operation to the Apple II Integer 
BASIC Interpreter. AN error messages that are displayed are m plain, easy to understand English, 
and not simply an Error Code. Commands in LISA are structured as close as possible to those 
in BASIC. Commands that are included are: LIST, DELETE, INSERT, PR ^n. IN#n, SAVE, 
LOAD, APPEND, ASM, and a special user<lef meable key envisioned for use with "dumb" per- 
ipherals. LISA is DISK 11 based and will assemble programs with a textfile too long to fit into 
the Apple memory. Likewise, the code generated can also be stored on the Disk, hence freeing 
up memory for even larger source programs. Despite these Disk features. LISA is very fast: »n fact 
LISA is faster than most other commercially available assemblers tor the Apple If. Not only is 
LISA faster, but also, due to code compression techniques used LISA requires less memory 
space for the text file. A full source listing containing the object and source code are produced 
by LISA, in addition to the symbol table 
Apple II 32K/Oisk $34.95 



PROGRAMMA 
IIMTERIMATIONALJIMC. 

3400 Wilshire Blvd. 
Los Angeles, CA 90010 

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

Apple (I is a registered trademark of Apple Computers, Inc. These professional products 
are availabfe at your tocaf computer dealer. 



CxU