micro 6502 journal january 1984
TRANSCRIPT
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 1/100
NO. 68 COMMUNICATIONu.s . Edition:International Edition:
$2.50
$3.00
for the Serious Com l?_uterist
zoI-«oz:J
~
~
oo
- - . .Smart Modem Program
for the • Apple • Atari • C·64 • CoCo
MODCOMM: A Simple Modem Driver for CoCo
DOSPLUS: New Commands for Commodore 64
SPEEDUP: Reduce Apple Disk Loading Time
Atari Player: Electronic Organ Program
o
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 2/100
10610 BAYVIEW ( Ba yv iew P la za )
RICHMOND HILL, ONTARIO, CANADA L4C 3N8
(416) 884-4165
C64-LINK"The Smart 64 RTe
Call or write
payments
by VISA,
MASTERCARD
or BANK
TRANSFER.
Mail orders
also by
certified
check, etc.
Many more 64s
1
Cartridge
Expansion Slot
Serial
Audio I/O
Switch RF Video Port Cassette Port Users Port
VL 16
VIC Modem
ISpooling
to
Printer
Contact your local Commodore dealer or RTC.
(future)
Cartridge
M other Board
POWER@
And
PAL ©
Other
Cartridges
IEEE Disks
(2031) (4040) Tape
(8050) (8250)
(9090)
IEEE Printers 1541 Drive
(4022) (8023)And
(8300)1525 Printer
etc. or 1515 Printer
lEE E to Par a II e I IEEE to Serial
Interface Interface
Parallel True Serial
Devices Devices
or VL4 Cable
to Standard
Modem
or VL3 Cable
to Parallel
Printer
Give These Expanded
Capabilities To Your 64
*The ability to transfer data from any type of device to another (IEEE, Serial,
Parallel)
* BASIC 4.0 which allows you to run more PET BASIC programs and gives you
extended disk and 110 commands.
*The ability to have several 64s on line together - sharing common IEEE
devices such as disks or printers with Spooling Capabili ty.
* Built-in machine language monitor
* A built-In terminal or modem program which allows the system to communi-
cate through a modem to many bulletin board systems and other computer
mainframes.
*Compatibility with CP/M. Copyrights and Trademarks
C64 is a copyright of Commodore Business Machines.Inc. C64-LlNK is a copyright of Richvale Tele-communications. CPIM is a registered trademark ofDigi tal Research. POWER is a trademark of Pro-fessional Software. PAL is a copyright of BradTempleton.
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 3/100
Whenyoleast expect it,
•••Ina few millionths of a second, common electrical surges and spikescan enter your data processing equipment and cause memory loss,
false logic and misregistratlon. Surges very often do permanent
damage to microcircuitry.
FUXlDUCT Surge Suppressors catch surges and spikes before they
have a chance to enter your equipment In billionths of a second
(Nanoseconds),FUXIDUCT Surge Suppressors dissipate surges and
spikes from any side of the line (most protect only one side).
The multi-outlet unit is ideally suited to the computerized work-
station.lt givesyou the advantage of circuit breaker protection with
plenty of outlets for data processor and peripheral equipment
No computer should be without the protection of a FUXlDUCT Surge
Suppressor...apcdally yount Write or call for further information.Available from office products retailers.
® Su rge Suppre ssors
a product of Winders & Geist, Inc. P.O. Box 83088 Lincoln, NE 68501 402/474-3400
No. 68 - January 1984 MICRO
1:
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 4/100
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 5/100
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 6/100
for the Serious Computerist
MICRO
Communication Commodore.o. Box 6502
Chelmsford, MA 01824
617/256-3649
7 The Network 17 Downloading
Primer BASIC on PET, VICPublisher/Editor-in-Chlef Randall Hyde and C64
Robert M. Tripp
Associate PublisherThe organization and Kevin Stone &
Cindy Kocher implementation of local Andrew Cornwall
Technical Editor networks A program to allow BASICPhil Daley
Production Manager Using the Smartto be downloaded over amodem
Nancy Lapointe Modem in YourTypesetter 22 DOSPLUS'forLynda Fedas System:
Advertising Manager John KeltyCommodore 64
Cindy Kocher Michael KeryanSales Manager
A BASIC
C. Skip Bentle program that services the Add new utility functions
Circulation Manager Hayes Smart Modem for called from the keyboard
Linda Hensdil l the following33 Generating
Customer Service microcomputers:Kim Dundas
Apple Characters for theAccounting
Donna M. TrippAtari EPSON FX80 on
Contributing EditorsColor Computer the Commodore
Cornelis Bongers Commodore 64David Malmberg Robert M. Tripp
John Steiner 62 MODCOMM Create user defineableJim Strasma
Paul Swanson Walter Charlton characters for the FX80
Richard C. Vile, Jr.A simple modem to
interactively on theLoren Wright Commodore 64 display
modem communicationprogram for the Color 39 Commodore
MiCRO is published monthly by: ComputerMICRO, Chelmsford, MA 01824. Reviews
Second Class postage paid at: 17 Downloadinghelmsford, MA 01824 andadditional mailing offices. BASIC on PET, VIC 40 Commodore to
uSPS Publ ication Number: 483470.ISSN: 0271-9002. and C64 Smart ModemSend subscriptions, change of address,
USPS Form 3579, requests for back issues Kevin Stone & John Kelty &and all other fulfi llment questions to:
MICRO Andrew CornwallPhil Daley
P.O.Box 6502 A BASIC program thatChelmsford, MA 01824 A program to allow BASICor call 617/256-3649. to be downloaded over a
services the Hayes Smart
Subscription Rates: (per year): modem into the family ofModem for the C64
u.s. $24.00 or $42.00 for two yearsForeign surface mail: $27.00 Commodore computers 43 Commodoreir mail: Europe $42.00Mexico, Central America, Middle East, Compassor th Africa, Central Africa $48.00South America, South Africa, Far East,Australia, New Zealand $72.00
Loren Wright
Copyright © 1983 by MICRO. High resolution graphicsA ll Rights Reserved. on the Commodore 64
4 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 7/100
Color Computer A tar; Apple
60 CoCo to Hayes 46 Atari to Hayes 74 Apple to Hayes
Smart Modem Smart Modem Smart ModemJohn Kelty & John Kelty & John Kelty &
Phil Daley Phil Daley Phil Daley
A BASIC program that A BASIC program that A BASIC program that
services the Hayes Smart services the Hayes Smart services the Hayes Smart
Modem for the Color Modem for the Atari Modem for the Apple
Computer49 Atari Music Player 79 Speed load:
62 MODCOMM Tom Marshall Enhanced AppleWalter Charlton Compose, save, load and DOSA simple modem to replay songs from your
Enirco Colombinimodem communication Atari keyboard
An enhanced version ofprogram for the ColorComputer 57 From Here to Atari DSO 3.3 that performs
Paul Swansonloading operations about
67 A VOX Input for four times faster.The ATR8000 peripheral
Your CoCo controller and Bulletin 71 Apple ReviewsSean Moyer Boards
Subroutines that allow
59 Atari Reviewssound to be used as inputto the computer
69 CoCo Bits GeneralJohn Steiner
The OS-9 operating7 The Networkystem
71 TRS·80C ReviewsPrimerRandall Hyde
A primer describing thefundamentals of localnetworks, with specificexamples on the NESTARsystem
91 Interface ClinicDEPARTMENTSRalph Tenny
Factors involved in getting 2 Editorial
two or more 112 Advertiser's Index
microprocessors to worktogether
No. 68 - January 1984 MICRO 5
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 8/100
You've got the loot ... now, GETAWAYI to a greatnew game from the Atari® Program Exchange!
It's all there! The squall of sirens, the crazyturns down endless city streets, the anxioussearch for ill-gotten gain, the race againsttime for a safe place to stash your cash!
Now your gas tank is nearly empty and night
is about to fall. The coppers are closing infast. Before you learn again that crime
doesn't pay ...Quick! GETAWAYl
Ask for GETAWAY! at your local Atari softwareretailer, or order direct. Phone 800-538-1862, or
800-672-1850in California. OrwriteAtari Program
Exchange, P.O. Box 3705, Santa Clara, CA 95055.
Cassette(410) APX-1019532K $29.95
Diskette (81 0) APX-2019532K $29.95
For direct orders, add $2.50.
You're in for a nasty spell ... unless you stop the Typos!In the dusky world beneath yourkeyboard the gruesome Typos dwell
...waiting to attack! Term paper duetomorrow? Got to get that book re-port typed? Fool! The Typos will
devour your letters as you type!That could spell O-O-O-M-E for
you!
Before you start typing, get downto the real work: destroy the Typos
before they destroy your proase ...
uh, proze ...prrrose ...Oh NO! THETYPOS!I! Get TYPO ATTACK, a
grand and glorious game fromAtari® Program Exchange. It might
even improve your typing!
Ask for TYPO ATTACK at your local Atari
software retailer, or order direct. Phone 800-
538-1862, or800-672-1850 in California. Or
write Atari Program Exchange, P.O. Box
3705, Santa Clara, CA 95055.
Cassette (410): APX-10180 8K $29.95
Diskette (810): APX-20180 16K $2995
For direct orders, add $2.50.
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 9/100
W sA l ~ .. s A l . . ' J t . s w'}ftc W4t/ts w~fts•_ ........A,. .. '" 'A~" " " .. .._ J . , . _ . . . _ . . . e v . . . . . . p Wlir.,..--., W'\i" ~" ..~ • VII'
ferent users to share a common database or communicate
with one another. For this reason many computer depart-
ments continue to purchase large computers instead of
decentralized personal computers.
The need to share peripheral devices is, of course, very
important. While a single user may have the need to use a
printer, he might not be able to justify the high cost of
such a device for use at his work station alone, especially if
it is a special purpose printer such as a letter quality
printer that will be used infrequently. It would be muchbetter ifa lot of different users could have access to a single
letter-quality printer. Since each user would only beusing
the letter quality printer a small fraction of the time, it
would almost always be available for use whenever a user
desired to print something on it. Since the printer is
available to several users, instead of just one, its utiliza-
tion would bemuch higher than if it were connected to a
single work station. Using the same idea hard disks, real-
time clocks, floating point processors, and other special
devices would bemuch more cost effective if they could be
shared amongst several users.
Several manufactures have created special multiplex-
ing devices that allow several personal computer users to
share a particular hardware device. For example, CORVUS
has a device called the CORVUS Constellation that lets
several microcomputer systems share a CORVUS hard
disk system. Other manufacturers provide black boxes
that let several personal computer users share printers,
tape drives, and other peripheral devices. While this
approach lets personal computer users share peripheral
devices land to a lesser extent, share databases), it suffers
from the drawback that it does not allow users to easily
communicate with one another, nor does it let users share
exotic peripherals forwhich there is nomultiplexer available.
TheNetwork
Pr imerby Randall Hyde
Ihe early sixties the integrated circuit was introduced.
Engineers were delighted to pay $20.00 for a single DIP
package containing four NAND gates. Due to the ex-
pense involved, every device designed using these devices
was optimized to use as few of these devices as possible.
With every technological advance that came along the
high price of silicon dropped dramatically. Today you can
buy that same NAND gate for less than fifteen cents in
suitable quantities.
Since computers designed in the sixties required
thousands of those $20.00 NAND chips, computers
(specifically CPU's) designed at that time were very ex-
pensive. Since CPU's were so expensive computer center
administrators wanted to squeeze every bit of useful com-
putational power out of their system as was possible. It
was considered heresy to leave a computer idle. Amillion-
dollar instrument sitting around idle was a very expensive
waste of money.
The same advances in silicon technology that gave us
the fifteen cent NAND gate also gave us the micropro-
cessor. It is now possible to buy a complete computer forless than $2.00 (Intel just announced an 8048-type
microcomputer for less than $2.00 containing CPU, RAM,
ROM, and 110 - everything you need for a complete com-
puter system). Even considering a personal computer,
such as the Apple II system, that sells for $1,000 to $2,000
it becomes apparent that the CPU utilization is not very
important - if the computer sits around all day with a
blinking cursor waiting for input from the user, no big
deal, for the same million dollars that bought the
System/360 in 1965 you could buy 500 to 1,000 personal
computers and get more through-put even if over three-
quarters of the computers sat idle at any given time.
There were only a few problems associated with using
1,000 personal computers instead of a single, large com-puter. First, although the overall through-put is increased
tremendously, certain compute-bound operations such as
math-intensive floating point calculations will proceed
much slower on a personal computer than on a larger com-
puter complemented with a floating point instruction set.
Second, while the price of the CPU has dropped
dramatically, electromechanical devices such as printers,
disks, tape drives, and other such devices haven't dropped
in price by the same proportion [i.e., these devices are still
relatively expensive). Lastly, with the big expensive com-
puters several users and processes could communicate
with one another and share databases. With the localized
personal computer it is difficult, if not impossible, for dif-
II
I II If:he Answer: A Network
To solve the problems inherent with a bunch of
autonomous computers a technique employed by larger
computers is employed: the computer network. A com-
puter network is simply some medium that allows two or
more computers to communicate with one another. In a
very general sense, the RS-232 line is an example of a com-
puter network since it allows computers to communicate
with one another. Real-life computer networks usually use
a different transmission scheme than RS-232, but the idea
is exactly the same-some method for transmitting data
between two computers is used.
In general there are two types of computer networks:
Remote networks and Local networks. A remote network
is usually associated with large mainframe computers.Anyone who has connected to the SOURCE via TELENET
or some other service has used a remote networking
system. Remote networks are seldomly used as a means to
share peripherals such as printers, hard disks, etc. since
data transmission rates are very slow and the end user
typically has little access to such device (so the hard copy
output, for example, could be picked up). Remote net-
works do allow access to shared data bases such as the UPI
and API data bases and stock quotation from the DOW
JONES and other financial systems. In general, however,
remote networks are of little interest to the group of per-
sonal computer users who wish to share a common set of
peripheral devices and files.
No. 68 - January 1984 7ICRO
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 10/100
The local network is used to connect various devices
that are located within a short distance ofone another. For
example, within an office building you might place a fast
dot-matrix printer in the engineering lab, in the account-
ing department, in the sales department, and in the shipping
departments. Persons using a local network would send
draft output to the printer nearest their workstation. A
single letter-quality printer might be found in the sales
department. Anyone could use the letter-quality printer by
sending the data to the proper device. The choice of dot-
matrix printer would be made simply by distance to the
printer. The people in the engineering lab would probably
use the printer in the engineering lab since it is closer
(although if the printer in the engineering lab is tied
up for a while output could bedirected to the sales depart-
ment's printer).
The local network also lets several individuals share a
single high-speed, high-capacity hard disk. This also
allows several users to share a common database and other
files. For special applications such as floating point opera-
tions, a special floating point processor can be placed on
the network and complex floating point operations can
be loaded into the floating point processor for further
calculations.Finally, a local network lets individual users com-
municate with one another. Since, after all, a network is
simply amedium of communication between two ormore
computers, two users can easily communicate by sending
data from computer to computer. This allows conversa-
tions to take place "CB" style over the network.
Within a local network there are two types of users:
clients and servers. A server is a computer system on the
network (a computer system on the network is called a
node) that provides a service to other nodes. For example,
a file server may consist of a small computer system con-
nected to a hard disk. It recognizes requests from other
users in the system and reads data from (orwrites data to)
the hard disk. A client is some node that requests servicefrom a server. For example, a typical user requesting data
from the file server is a client of the file server. Note that a
node can beboth a server and a client. For example, the file
server may become a client of a node containing a real-
time clock in order to obtain information to "date-stamp"
a file.
The Seven-Layered Network
Most of the modern network technology is directly
attributable to researched performed by the Department of
Defense and several major universities. A few years back
the International Standards Organization IISO)decided tocreate a draft containing several standards for implement-
ing network systems. A subset of the standard lin one
fashion or another) is implemented in almost all modem
networking systems. Therefore, an understanding of the
ISO model is extremely useful for understanding specific
networking systems.
The ISOmodel divides the basic networking system in-
to seven major components or layers. Each successive
layer builds on the layer just below it (see figure I). The
physical layer is the electrical and mechanical specifica-
tions of the networking system. For example, consider the
RS-232standard. Mechanically, a DB-25 connector is used
with certain pins allocated certain functions. This is the
8 MICRO
ApplicationLayer
PresentationLayer
SessionLayer
Message!TransportLayer
NetworkLayer
Data-LinkLayer
Physical
Layer
Figure 1: ISO seven-layer network model.
mechanical specification of the RS-232 standard. Elec-
trically, the signal is allowed tovary between Ovand + I2v
for a logic one, and between Ovand -I2v for a logical zero.
These specifications are the electrical specs for the RS-232
system [granted, somewhat abbreviated). The Physical
Layer for any network system defines the connection in
these terms, the connector used, voltage ratings, type of
transmission (phase encoded, pure digital, analog, etc.],
and other specifications of interest to the engineer wiring
the system together.
The Data Link Layer is responsible for the reading and
writing of data to the network, error detection land
possibly correction), and the assembly and disassembly of
data packets. More specifically, the data link layer is
presented with a packet of data containing, in addition to
the data to be transmitted, a destination address and other
useful information. The data link layer adds a checksum
(or other error-detecting scheme) to the end of this packet
and transmits the data over the network. Note that the
packet was given to the data link layer as a complete
package, the data link layer did not have to assemble thepacket a byte at a time. Likewise, when the data link layer
reads data from the network it reconstructs the data packet
transmitted and presents the higher levels with a com-
plete, error-free packet of data. In the event an error is
detected the data link layer disregards the entire transmis-
sion and requests a retransmission. The higher layers are
completely unaware of this. Most networks provided
error-free data above the data link layer.
The Network Layer is usually found only in the remote
network systems. The purpose of the network layer to to
insure that data packets move smoothly throughout the
network system. In most remote network systems data
packets being sent from system A to system C must first
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 11/100
MICROSPEC
SOFTWARE MEANS
BUSINESS FOR THECOMMODORE 64
When it's time to get serious, it's time to boot upMicroSpec business software. Our complete lineofbusiness software ismade to giveyou some real
applications for your Commodore 64. From database management to full accounting software, wehave the package for you.It's attention to detail that makes our packages
so beautiful and makes them stand out from therest. We realize that most people are firsttimeusers, sowe designed all our packages tobe completely menu driven and user prompt-ed for each input. We also know that mostpeople use only one disk drive, so wedesigned all our packages to virtuallyeliminate disk swapping. Other features likenon destructive input routines really makeour software easy to use. But all this doesn'trestrict you. Pure random access file struc-ture maximizes your disk capacity andallows you to bring up any record for viewingin less than a second.In our efforts to put together the best pack-
ages available, we worked on more than thesoftware. We took the same approach with thedocumentation as the software. We made it com-plete and easily understood for the first time user.We even provide sample reports inmany cases.
L_/" /" /"/" ./ L.. »: ./?..:::::::.J?-. . . . . . . . . . . . . . . . . . . . . . . .
:::a
'T '"Z~ ;: c ~ :::a . . . . .,. :a - '" C
,.- C n . . . . C
'" '" . . . .!::z ,. ::0:: . . . . C
,. ~zc . . . . . '" C :a - ~ :a - . . . . , . .. . . '"
,. . . . .G c: . . . . ,. . . . :::a m coz
" ' ". . . . GO. . . . . c:a
-'"
z co . . . .
'"'"
GO . . . .
~. . . . . , . . z . . . . .
'"o ,. co z
. . .c:
co . . . . . . . . . . ,. , . .. . . ,. . GO co '" z . . . . :a - ,. . . . . . : : : ; !. . . . . . . . '" " ' ", . . :::a . . . . . . . . . . . . . '"~ ~,.
m . . . . . . .~ ~ . . . . . . . . . . ~ . . . . ~ ~ ~. ,. - co. ,. . . . m ,. ,.
c:,. ,. ,.
z z z z '" :c . . . . z z z z z. ,. ,. ,. C ,. ,. ,.:::!
,. ,. ,.. . . . . . . ., . . . . . . - - . . . . . . . . . . . .'" m
'" m m . . . . . . . . '" z '" '" '". . ,. . , . . ,. . , . .'"
m ,. . . . . , .. , . . , . .
". . . . . . . . . . . . . . . . . . . . ._ _ _ _
The Demonstration Package, which shows howeach program runs, is available for $19.95. So, ifyou're serious about your 64, call or write for acomplete brochure or go right down to your
nearest computer retailer for a demonstration.
WHEN YOU AND YOUR 64 ARE READY TO GET DOWN TO BUSINESSGIVE US A CALL
No. 68 - January 1984
P.O. BOX 863085 • PLANO, TX 75086(214) 867-1333
MICRO 9
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 12/100
pass through system B. Obviously the data being trans-
mitted to point C is of little interest to the application pro-
gram running on machine B,but due to the structure of the
network system B must store and forward the data being
received from system Aon to system C. The network layer
handles this problem as well as other problems associated
with congestion and flow control.
The Message/Transport layer concerns itself with
machine-machine communications. The transport layer is
responsible for taking a complete message and "transport-ing" it to the destination machine. Likewise this layer is
responsible for accepting a message and presenting the
whole message to higher layers in the protocol.
The transport layer is responsible for taking a complete
message, breaking it up into smaller packets [ifnecessary),
and presenting these packets of data to the network (or
data link) layer for transmission. This allows the higher
layers to treat data strictly in terms of message units
without having to worry about maximum message
lengths, minimum messages lengths, the type of transmis-
sion, etc.. Another responsibility of the transport layer is
handling the type of communication. There are typically
two types of transmission "modes":
Virtual Circuits and Datagrams.
Datagrams are very important in remote networks
where each data packet can take one of several different
routes. In a datagram model the network simply accepts
messages and attempts to transport them to the destina-
tion as a single unit. Datagrams may arrive out of order or
not at all. The receiving station is responsible for col-
lecting these datagrams, assembling them in their proper
order, and making sure that all datagrams have arrived and
are error-free.
Avirtual circuit attempts to treat the network systemas though the source and destination stations were the
only systems on the network. In this type of setup the net-
work appears as a single circuit between the source and
destination stations. Virtual circuits always provide an
error-free transmission channel where no data packets are
lost and they always arrive in the order they were
transmitted in. Once the transmission is set up, all data is
transmitted at which point the virtual circuit is discon-
nected. Most local networks use some combination of vir-
tual circuit/datagram service.
The Session layer is the true user's interface into the
network. The session layer is responsible for setting up a
communication channel between users and tacking on the
necessary address information for each packet trans-mitted. The session layer is also responsible for making
sure the transmission of a message isn't terminated
halfway through. For instance, a database management
program would be completely destroyed if a session was
terminated halfway through the update of a particular
record. Typically, the session level would gather all the
data required by a particular routine and present the
message as a complete package, not allowing the system to
continue operation until the entire package was received.
The Presentation layer is typically a small collection of
routines that handle data compaction, encryptionation,
etc.. This layer is rarely implemented in local networks [or
remote networks for that matter).
10 MICRO
The Application layer is the user program making use
of the network system. The definition of this layer is en-
tirely up to the user.
A Network System You've Used Since Childhood
Believe it or not, you've been using a remote network
for a good part of your life. Thanks to Alexander Graham
Bellmost of the people in this country, even those who've
never seen a computer in their life, are well aquaintedwith the most important network of all: the telephone
system. Bell labs (the R&D portion of the Bell system)
has put forth considerable research into optimizing the
telephone system. Luckily, many of the concepts
developed by Bell labs can bedirectly applied to computer
networks. With this in mind, a discussion of the telephone
system may behelpful beforediscussing computer networks.
In many respects, the telephone system can be divided
up into the seven layers just described for computer net-
works. For example, at the physical level you have the
connector plug in the wall, the allowable voltages, the
number of wires, and (for all you modem fans) esoteric
things like the ringer equivalence value. The data link
layer is the circuitry required to handle the analog
transmission from the mouthpiece to the telephone line.
The network layer is responsible for picking out the route
which the phone call will take [yes, sometimes a call from
L.A. to San Francisco gets routed via Washington D.C.).
The transport layer defines a virtual circuit mechanism for
data transmission (after all you do want the data to arrive
in order, it would beuncool if you said "Hello there" and
it came out "there Hello" at the other end). The session
layer consists of the circuitry required during dialing and
the maintenance of the virtual circuit during communica-
tion. The presentation layer (if present) could be
represented by one of those magic "black boxes" that the
CIA uses to scramble and unscramble phone conversa-
tions. And the applications layer is the actual phone con-
versation taking place. As you can see, the OSI network
structure provided by the ISO model is very general and
easily re-worded to fit almost any communication system
in existence.
Itwas noted earlier that Bell Labs has done quite a bit
of research into network structures, much of which has
found its way into many of the modern network designs.
This combined with the DOD's ARPANET, IBM's SNA,
and other early networking systems has structured many
of the modern networking systems including ETHERNET,
OMNINET, NESTAR, and others.
An Introduction to Local Networks
The need for local networks grew from two basic
desires: wanting to share expensive peripheral devices
among several inexpensive CPU's and wanting to improve
communication between various workstations.
Consider the average sales office. At any given time
you may have several secretaries using word processing
stations, executives using some financial modeling system
(VISICALCanyone?)I salesmen checking stock and placing
orders on computer terminals, and clerks maintaining the
inventory using workstations in the warehouse. This
much activity would bog any conventional timeshare
system down tremendously. Could you imagine how
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 13/100
Ie til.- ..... ' " . . . . . . . r a , . e P ' I / t : l < _ - - " "useful VISICALCwould be if it took 20 seconds to perform
each calculation? So a timeshare system would be out of
the question. Yet the individual members have to be able
to share data, for example whenever a salesman sold
something it would be nice if the stocking clerk was
alerting so that he could order a replacement. Likewise,
you wouldn't want two salesmen selling the same item if
it is the last one in stock, or at least you would want to
alert them so that they could advise the customer of any
possible delays. By combining a group of small computersinto a network it is possible to allow members of a
organization to easily share computer data without the
hassles of using a timeshare system.
Since there is a need to provide many of the employees
with access to some common data (like the number of
items in stock) a bunch of isolated microcomputers won't
be able to completely solve the problem. But if those same
microcomputer systems could be connected together so
that peripherals, data, and other communications lines
could be shared the problem could be solved. Suchwishful
thinking lead to the development of the local network.
The ETHERNETnetworking system is an example of a
local network. The ETHERNET system allows office
employees to share databases, peripherals, programs,
"chat" between stations, share a single communications
line [such as TELEX/TWX datacom lines], and have access
to larger, expensive computer systems. ETHERNET
features a high-speed data communications protocol that
provides an almost instantaneous transfer of data. The
problem with ETHERNET is that in addition to its high
speed, it is also very high cost. A controller card for a
microcomputer may well cost you $4000. When you stop
and realize that one of the main reasons for using a net-
work is to save the expense of putting a $2,000 printer at
every station you begin to realize that ETHERNET is not
yet cost effective. Luckily, there are alternatives to
ETHERNET.
slow the entire network will be slowed down since all
communication must go through the central station. 'Even
if the central node is fast, attaching additional stations to
the system will cause severe network degradation since
the central node becomes vastly overworked. The STAR
topology does have one highly redeeming value. Much of
the necessary connecting hardware is in place in many
business offices-the PBX telephone system. The PBX (or
private branch exchange) is the little operators console you
find on the desk of the front receptionist in any large cor-
poration. While intended to handle voice transmissions,
most PBX's are easily upgraded to handle data transmis-
sion. The PBX system is a good example of a networkusing the STARtopology. Since all the wires are already in
place, many businesses will opt to use their existing
equipment thus saving thousands of dollars in installa-
tion costs.
The RING topology [see figure 3) was developed mainly
for remote networks between large computer systems.
The basic idea behind a ring network is that data packets
The Shape of Things to Come: Network Topology
Anetworking system is used to connect several com-
puter systems together. Each computer system within a
network is called a node or a station. There are all kinds of
ways to connect several nodes together, any child playing
with tinkertoys can attest to that fact. In a networking
system there are various layouts possible when connecting
a group of computer systems together; the layout, or
graph, of the computer network is called the network
topology. While there are infinitely many ways to connect
up computer systems in a network there are three basic
topologies from which most others can be derived. Thesetopologies are the STAR, RING, and BUS lor tree)
topologies.
The STARtopology (seefigure 2 ) consists of some cen-
tral node through which all communication must pass.
The STAR topology is probably the most obvious since
this type of layout is used by largemainframes and mini-
computers which are connected to computer terminals. In
a networking system, if a node other than the central node
wished to transmit data to any other, the transmission
would have to go through the central node in order to
reach the destination node. This form of communication
has two drawbacks. First, if the central node goes down so
does the whole network. Secondly, if the central node is
No. 68 - January 1984 MICRO
Figure 2: Star Topology.
Figure 3: Ring Topology.
11
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 14/100
are passed from machine to machine in a "hot potato"
fashion until the data packet arrives at the destination
system. Since few local networks use the RING topology,
there's little need to discuss it any further here.
The BUStopology (seefigure 4) is the favorite topology
amongst the various local networks. ETHERNET, OM-
NINET, NET/80, SOFTWORKS, Z/NET, and most other
local networking systems use some variation on the BUS
topology. The BUS topology is high robust. Any compo-
nent (with the unlikely exception of the connecting cable)in the network system can fail and the network will still
operate. The BUS topology allows you to add and remove
nodes at will (in some cases without powering the system
down). The BUStopology has another big advantage: often
the circuitry required is less expensive than that required
for other networking topologies.
Network topology is very important in remote net-
works where delays due to routing can be significant.
Many remote networks use a store and forward approach
where one station transmits data to an adjacent station
from which point it is transmitted on down the line. Since
it takes time to receive and retransmit a package of data,
delays grow proportionally to the number of systems in a
ring topology network Iring topologies are in many large
networking systems). Since the network nodes are stationed
fairly close to one another in a local network, the bus
topology is normally used. The bus topology removes the
problem of routing delays, but requires special cables and
hardware which would be much too expensive for widely
separated stations.
Figure 4: Bus Topology.
Data Transmission in a Networking System
Since the same transmission medium is used by all the
nodes on a network, some supplemental information must
accompany each data transmission. For example, a
destination address must be tacked onto every transmis-
sion so that the intended receiver can recognize a data
transmission. Other auxiliary information, such as a
length field, type field, acknowledgement field, and
checksum may be tacked onto the data.
A block of data containing the necessary source,
destination, checksum, data, and other optional fields is
12 MICRO
called a frame ordata packet. Data packets are constructed
at each level in the network protocol. For example, the ap-
plication layer sends data (possibly a character at a time) to
the session layer where it is sent to the message/transport
layer with a destination and source address. The
message/transport layer collects the data until a complete
frame is constructed, adds any required length, type, and
other necessary fields and passes the data packet to the
data link layer for transmission. The data link layer adds
the checksum and any necessary acknowledgements and
transmits the data over the network.
One important feature of a networking system is its
data transmission rate. The data transmission rate is
usually measure in bits per second (BPS) which is also
called BAUD. For example, the familiar 300 BAUD line
used in telecommunications is a three hundred bits per
second data transmission rate. Many remote networks
operate at 300 BPS and 1200 BPS (using leased lines).
These data rates, however, are very slow. Most local net-
working systems operate in the range of one to twenty
MBPS [megabits per second) which is 1,000 to 60,000
times faster than the lines used by the remote networks.
The maximum data transmission rate of a networkingsystem is called its bandwidth. Even though a network is
capable of operating at 1MBPS, the medium can operate at
300 BPS if need be.
In almost any networking system there isn't constant
traffic on the net. So although a cable (or whatever) is
capable of handling data at high speeds, the average data
transmission rate is usually much lower than the band-
width of the transmission medium. If the average band-
width is low because no one is transmitting data, it's no
big deal. After all, the average network user isn't in-
terested in the quality of the cable being used to connect
nodes, he's only interested in response time. If the average
data transmission rate is only 50 BPSon any given day, but
users get instantaneous response then things are just fine.But if the network is noisy, congested, or has some other
problems, many packets will have to be retransmitted
thus cutting the average transmission rate and the
response time down considerably.
At any given time only one data packet can be in the
process of being transmitted over a single circuit. If two
nodes attempt to transmit over the same wire at the same
time both transmissions will be garbled up and the
transmission will be completely invalid. Such an occur-
rence is called a collision. Collisions occur most often in a
network using a bus topology since must nodes in such a
system share the same transmission circuitry. Receiving
stations have no way of determining if a collision has
occurred. If fact, the only time a receiving station candetermine that a collision has occurred is when it performs
some sort of error check and the checksum doesn't match.
One of the major problems with a collision is that the
entire data packet must be retransmitted. Which means
that the average data transmission rate is reduced. This is
compounded by the fact that data transmissions occur
asynchronously. That is to say anybody can start trans-
mitting whenever they please. So halfway through your
transmission someone else could start talking and wipe
out your entire message. This problem is easily solved by
by first listening to the bus to see if anybody else is
transmitting. If someone else is using the transmission
medium you wait until they are through. If there is no traf-
No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 15/100
Produ cts fo r Commodo re , A tari, A pp le , and o the rs !
T H E M O N K E Y W R E N C H I IA PROGRAMMERS A ID FOR ATARI8 00
N E W A N D IM P R O VE D - 1 8 C O M M AN D SP LU G S IN T O R IG H T C A IU R ID G E S LO T
-, "'~,~ .• ,, ..,~..,.,,TH E
MONKEYWRENCHII
~~i V
. . . ~ ~ V IC R A B B IT C A R T R ID G E\ ' A N D C B M 6 4 R A B B IT C A R T R ID G E
. '- ) $39 .95~ .\:) \.)) (Includes Cartridge
~ e- and Manual)
- Expansion Connectoron the V IC Car tr id ge
" Do n't w as te yo ur L ife aw ay waitin g to LOADa nd SAVEp rog rams on Cas se te Dec k. "
L oad o r S ave 8 K in ap pro xim ately 3 0 s eco nd s! T ryit - yo ur U n-R ab bitized V IC takes alm os t 3 m in utes .It's n ot o nly F as t b ut V ERY REL IABLE.
A lm os t as fas t as V IC D is k D rive! D on 't b e f oo lis h -W hy bu y the disk wh en you can get th e V IC R ab bit
for m uch, m uch less!E as y to install- it ju st plU gs in .E xpansion Connec to r on r ea r.W o rk s w ith o r w ith ou t E xp an sio n Memo ry.Wo rk s w ith V IC Cas se tte Dec k.1 2Commands p rovide o ther nea t f ea tu re s.
A ls o A vailab le fo r 2 00 1 , 4 001 , a nd 8 03 2
" H igh-SpeedCassetteLoad and Save! "
I f y ou a rea per son who l ik es t o monkey a roundw i th
t he ATAR I8 00 , t he n THE MONKEY WRENCH I I i sf or you l!Make your p rogramming tasks eas ier , lesst ime -c on sum in g a nd mo re f un . W h y s pend e xt rahou rs working on a BA SIC program when theMONKEY WRENCH c an d o it fo r yo u in s ec on ds .It can also m ake backu p copies of boot typec as s et te p ro gr ams . P lu g s in to t he r ig ht s lo t a ndwo rk s w it h ATAR IBAS ICca rt ri dge.
The M ON KEY W REN CH provides 18 direct m odec omm an ds . T he y a re : A U TO L IN E N UMBER IN G - P ro -v id es n ew l in e n umbe rs when ent er in g BASI C p r og raml in e s. RENUMBER - Renumber s BASI C' s l in e n umbe rsI nc lu d in g i nt er na l r ef er en c es . DE LETE L INE NUMBERS $ 59 . 95- R em o ve s a r an ge BAS IC lin e n um b er s.
V AR IA BL ES - D is pla y a ll B AS IC v ar ia ble s a nd th eir c ur re nt v alu e. S cr ollin g - U se th eSTAAT & SELECTkeys t o d is p lay BAS IC l ines au toma ti ca ll y. Sc rol l up o r down BAS ICp ro -g r am . F INDSTR ING - F in d e ver y o c c u rr en c e o f a s tr in g , XCHANGESTR ING - F in d e ver yo c cu r re nc e o f a s tr in g a nd r ep la ce i t w it h a no th er s tr in g . MOVEL INES - M ove l in es f romo ne p ar t o f p ro gr am to a no th er p ar t o f p r og ram. C O PY L IN E S - C op y l in es f ro m o ne p ar to f p ro gr am to a no th er p art o f p ro gra m F DR MA TIE D L IS T - P rin t B AS IC p ro gra m in
s pe cia l li ne fo rm at a nd a uto m atic p ag e n um b er in g, D IS K D IR EC TOR Y- D is pla y D is kD ir ec to ry . C H ANG E MARG IN S - P ro vid es th e c ap ab ility to e as ily c ha ng e t he s cr ee nm ar gin s. M EM OR Y T ES T - P ro vid es th e c ap ab ility to tes t R AM m em or y C UR SO RE XC HA NG E - A llo ws u sag e o f th e c ur so r k eys w ith ou t h old in g d ow n th e C TR L k ey.U PPER C AS E LOCK - K ee ps th e c om p ut er in th e u p pe r c as e c ha ra cte r s et. H E XCON -V ER S IO N - C on ve rts a h e xa de cim al n um b er to a d e cim al n umb er . D E CI MA L CONV ER-S IO N - C on ve rts a d e cim al n um be r to a h ex ad ec im al n um ber . M ON IT OR - E nte r th emach in e l an g uage mon it or .
In ad ditio n to th e B AS IC c om ma nd s, th e M on ke y W ren ch a ls o c on tain s a m ac hin ela ng ua ge m o nito r w ith 1 6 comma nd s u se d t o i n te ra ct w ith t he p ow er fu l fe at ur es o f t h e6502 m icrop roces so r
T E L S T A R 6 4So p hi s ti ca te d Te rm i na l C ommuni ca ti on s Ca rt ri dg e f o r t h e 6 4 .
'PF O' 100000 C P< 01> D2 BE LL 12 :3 0:00 10:14 :3 6
(TELSTAR 'sS ta tus L ine )
D o n 't s e tt le f o r l e s s t h an t h e b e st !
• U p lo a d/ D own lo a d t o /f rom d is k o r t ap e .
• Au toma ti c F i leTrans lat i on .
• C ommuni ca te s i n I n du s t ry S t an d ar d ASC II .
• R e al -T imeC lo c k p lu s A l arm C lo c k.
• L in e e d it in g c a pa bi li ty a ll ow s c o rr ec ti ng a n d r ese nd in g l on g
c omman d l in e s.
• 9 Q u ic k R ea d f u nc ti on s .
• Menu-d ri ven .
• S im il ar t o o u r f amo u s STCPTerm in al p a ck a ge .
• W o rk s w it h C omm o do re M o dems a nd s u pp or ts a ut O -d ia li ng .
T h e b e s t l ea tu r e i s t h e p r i ce - o n ly $ 49 .9 5 ( C ar tr id g e a n dMa n ual )
A TARI, PE T, A ND CBM 64
EPROM PROGRAMMER
Program s 27 16 and 253 2
EPROMs. Includes hardware
and so ftwa re . PET = $75.00- A TA RI a nd C BM 64 (both
includesoph is tica ted mach ine •
language monitor) = $119.95 j
M a c h in e L a n g u a g e M o n it o r
C a r t r i d g e
f o r t h e C B M 6 4
More t ha n 2 0 c omman ds allo w y ou to a cc es sthe C BM 64 's M icroproces sors R egis ters
an d M em ory C on ten ts . C omman ds in clu de
a ssemb le , d is as semb le , r eg is te rs , memo ry ,
t ra ns fe r, c ompar e, p lu s many mo re .
S om eday every C BM 64 owner will need a
mon ito r s uc h as t his .
C artrid ge and M anu al - $ 24 .9 5
CBM 64 DebuggerA mo r e so p hi st ic a te d Ma c hi ne L a ng uag e Mo n it o r/ D eb ug ge r. 2 0 K
o f o bj ec t c od e m ak es t his a p ow er fu l t oo l. W or ks a s a s ym bo lic
d eb u gg er l or t he M A E a s s em b le r. D is k et te a nd M an u al - $ 4 9. 95
Mo re t han j us t a n Assemble r/ Ed it or !Now for Ihe "64 " .
M A Efor
PET
APPLEATARI
~Only$59.95
No. 68 - January 1984
It 's aProfessionallyDesigned
Software
Development
System
NOW, The Best for Less!• Des igned to imp rove Programmer Product iv it y
• S im ila r syn tax and com mands - N o need 10 re learn
pe cu li ar s ynt ax es and commands whe n you go
f rom PE T to APPLE to ATAR ! .
• Cor es iden t A ssemb le r/ Ed it or - No n ee d t o l oad
t he Edi to r t hen t he Assemb le r t hen t he Ed it or , e tc .
• A lso i nc ludes 'No rd Processor , Rel ocat ing l oade r
an d much mor e
• Jo in t he ATUG User Gr oup t or MAE format ted
disks
• ST IL L N OT C ON VIN CED ? S end lo r tree s pec sheet !
. T R A P 6 5TRAP65 ISa h a r dwa re d e vi ce t n atp lu g s I n to y o ur 6 502 ' s s o ck e t P r ev en t sexecution 01 un imp lemen ted opcodesand p rOV idescapab i li t y to ex tend themachines' Inst ruct ion se tFo rPETIAPPLE/SYMRedUCed f rom St 49 .95 10 $ 69 9 5
MICRO
5 % IN C H SOF T
SECTORED DISKmES
Highest q uality. W e use them on
ou r PETs ,APPLEs ,ATAR ls , and o ther
computers. $ 2 2 . 5 0 / 1 0 or $ 4 4 . 5 0 / 2 0
13
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 16/100
fie on the network then you can start transmitting. This
method, called the Carrier Sense Multiple Access (CSMA)
improves efficiency tremendously. CSMA does not com-
pletely eliminate collisions, but it does cut them down
tremendousl y.
A collision can still occur if two stations happen to
look at the bus at the same time and find that the carrier is
absent. Since data transmission takes place at somewhat
less than the speed of light there is a finite (although
small) time delay between the time a station puts a carriersignal on the network and it travels to all the stations.
This time, although measure in microseconds, is quite
long compared to the cycle time ofa typical personal com-
puter. For example, in a normal local networking system
this time interval, called the round-trip transmission time
might be 30-60 microseconds. If two nodes attempt to
transmit data within one round trip transmission time
there will probably be a collision. Collisions in a CSMA
collision detection system are"quite rare unless there is an
enormous amount of traffic on the network.
An Introduction to the NESTAR CLUSTER ONE
There are hundreds of different networkingarrangements, with new ones being introduced everyday.
Therefore, in order to discuss some specific details a
specific system must be discussed. The remainder of this
paper will concern itself with the NESTAR
CLUSTER/ONE MODELAlocal networking system.
The Cluster/one lets you connect up to 64 Apple II
computers together in a local network. EachAppleis inter-
faced to the system via a plug-in card that attaches to the
Apple's bus. This circuit card contains the necessary inter-
face circuitry as well as 1KofRAMand 2KofROM. Nodes
in the Cluster/one network are interconnected with
16-conductor cable similar to that used to attach disk
drives to an Apple II.
The Cluster/ one transfers data at 240 KBPS,quite slow
for a local network. Slow, however, is a relative term. 240
KBPS is roughly 1,000 times faster than the 300 BAUD
lines used by the SOURCE and other telecommunications
systems. 240 KBPS is the maximum data rate sustainable
by software methods using a 1Mhz 6502. By comparison
Xerox's ETHERNETtransfers data at 10MBPSyet the cir-
cuitry required to support ETHERNET is better than ten
times the cost of the Cluster/one. In general, the 240
KBPS is fast enough. To put it into concrete terms, you
can transfer 64K of data in less than four seconds using a
240 KBPS data transfer rate, that's much faster than a
floppy disk or printer.
The Structure of the NESTAR System
The NESTAR Cluster/one implements three of the
lowest four levels defined by the ISO reference model of
Open Systems Interconnection (OSI). These are the
physical, data-link, and message/transport layers. The
networking layer is usually not present in a local network,
and is absent from the Cluster/one networking system.
The remaining layers (session, presentation, and applica-
tion) are either supplied by the user or left
unimplemented. How the lower layers are implemented is
determined by the configuration of the network and the
software purchased with the system.
14 MICRO
~ III~ ~ .. tJlr wt~ IIf't/t, - 1 ' 1 / ' "One of the most important network design considera-
tions is the network topology. The Cluster/one normally
uses the bus topology. Due to the structure of the hardware
almost any topology can be accommodated. Typically,
however, the bus topology is used because it is the least
expensive and the software was designed with the bus
topology in mind.
A typical NESTAR consists of several user stations
Iclients) and one or more file server stations. Afile serverconsists of a dedicated Apple computer with an 8" floppy
or 14" hard disk. All the other users on the net share the
resources provided by the file server. The disk drives sup-
ported by the Cluster/one provide 1.2 megabytes to four
Gigabytes of disk storage using one or more drives on the
system. In addition to the file server, the dedicated Apple
also provides a clock/ calendar server so that files sent to
disk can be "time-stamped" with the creation and update
time. The Cluster/one network interface cards were
designed using low-cost non-critical components in an
effort to keep the total package cost down. It would be in-
sane to require a $4,000 interface card on a computer
system that only costs $2,000 (don't laugh, Intel is selling
ETHERNET interface cards for $4,000). The network in-
terface was optimized for low-cost and reliability at the ex-pense of speed. As mentioned previously, the bandwidth
of the NESTAR system is quite low.
The Cluster/ one interface carduses a passive interface.
This gives you the ability to power up and power down
stations on the net without adversely affecting the net-
work. It also allows you to add new nodes to the system
without having to power the system down or even halt
network communications. In the event ofa station failure,
the network may continue to function providing the con-
troller card itself isn't damaged. In many topologies [Iike
the ring and star topologies) the failure of one or more sta-
tions can shut the whole network down. In the caseof the
Cluster / one, the net will continue to function as long as at
least two stations are functional.The NESTAR system using a 16-conductor cable to
connect nodes in the net. This is the second unusual
feature to the Cluster/one system, most local networks
use a twisted pair or coax cable (two conductors). Of the
16-conductors, eight are used to transmit data in a byte-
serial fashion. By transmitting the data eight bits at a time
the effective bandwidth is increased by eight. Although
the system is transferring data at around 240 KBPS, the
data is actually being transferred at a data rate of 30 KBPS
on any given data wire. This gives the 6502 roughly 34
cycles in order to perform the necessary checksum calcula-
tions and store the data in memory or fetch the next byte
from memory. An additional line is used for the carrier
signal. When active, someone is attempting to use the net-
work, when inactive the network is free and ready for
transmission. Three of the remaining seven lines areused
for handshake using the standard data available/data
taken/ready to accept handshake protocols. The remain-
ing four lines are signal grounds.
To transmit data over the network a controller card
first checks to make sure everyone is listening and then it
places the data on the bus. The data available line is set ac-
tive and the destination node senses the data available line
and reads the data off of the bus. Once the data is read the
data taken signal is set active and the source station may
transmit additional data. Due to the structure of the net-
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 17/100
work, it's real easy to reverse the direction of the data lines
and acknowledge a data transmission. This fact is used by
the NESTAR software to handle frame acknowledgements
as will soon be pointed out.
The Cluster/one system is highly tolerable of
transmission errors. First of all its low bandwidth allows
inexpensive flat ribbon cable to be used instead of expen-
sive coaxial cable. Secondly, rather than use extra-cost
passive terminators in the system, the software was
designed to accept unterminated connections by providing
a software delay whenever data was placed on the bus.
This delay allowed all the ringing and echoes to die down
before attempting to read the data on the bus. Byrunning
at such a slow data rate 13 0 KBPS/conductor) many of the
problems associated with transmission lines is avoided.
All data transmitted over the NESTARCLUSTERBUS
fapossibly trademarked name for the 16-conductor inter-
connect) is transmitted in a purely digital form. No phase
encoding (like that used by ETHERNET) is performed, nor
are the signals converted to some type of analog signal
before transmission. This simplifies the data conversion
process and likewise lowers the cost of the NESTARsystem.
The NESTAR Data-Link Layer
The data-link layer in the Cluster/one is implemented
in hardware and firmware. The software required for the
data-link layer is contained in the 2K byte ROM on the
NESTAR interface card. The data-link layer is responsible
for transmitting data onto the net and accepting data from
the net. The data link layer attaches a checksum to the end
of a transmission and checks the checksum value at the
end of a transmission. It is responsible for handling
retransmissions in the event the data wasn't transmitted
properly. The data link layer is also responsible for media-
access scheduling, addressing, flow control, and conges-
tion control. To sum it up, the data link layer is respons-ible for providing error-free data transmissions between
two stations on the network.
Transmitting data:
The data link layer is presented with a data packet from
the transport layer. The data packet is of variable length
and consists of 4n bytes where n is the number of bytes of
data to transmit. The first byte transmitted is the source
address. This is used to detect a collision on the Cluster-
bus. If two stations attempt to place their source addresses
on the bus at the same time at least one of the transmitting
stations will recognize a collision since all source ad-
dresses are different. If a collision does occur, all stationsrecognizing the collision will jam the bus to make sure
that everyone else sees the collision aswell. The data-link
layer only checks for collisions during the first few bytes
of transmission. Later collisions during the transmission
of the data frame are highly unlikely since the carrier
signal is checked before attempting to transmit data. In
the case some station erroneously transmits data a
checksum error will occur and both packets will have to be
retransmitted. By not checking for collisions after each
transmitted byte, the data transmission rate is increased.
After the cable has been allocated (by placing the
source address on it) the source station places the destina-
tion address on the bus and, after a suitable delay, ac-
No. 68 - January 1984
tivates the carrier control line. On the active edge of the
carrier control line hardware on each of the interface cards
triggers an address comparator that compares the address
on the Clusterbus to the source address of the particular
card. If a match is made then the software in the destina-
tion interface will be activated in order to read the data
packet being transmitted.
After the destination address is placed on the bus and
accepted by the source station, the type and length bytes
are transmitted. Following the length byte, "length" bytes
of data are transmitted over the network. During the
transmission of the type, length, and data bytes the source
station is constantly computing a checksum. At the end of
the data transmission the 16-bit (two byte) checksum is
transmitted over the network.
Once the checksum is transmitted the data packet
transmission is complete-almost. The only thing remain-
ing is to make sure that the data packet was properly
received. In order to check that the data packet was cor-
rectly sent the source station reverses its data lines and
becomes a receiver. The destination station transmits a
single byte containing a ACK (acknowledgement) or NAK
(negative acknowledgement) code. If a NAK code is re-ceived then the source station retransmits the data frame
beginning with the type field. If an ACK code is received
then the source station frees the network bus by setting
the carrier line inactive.
Data Reception:
Receiving data is almost the converse operation to
transmission. Data reception begins when the destination
hardware recognizes its address on the bus. Once the
destination hardware accepts the destination address from
the bus it reads the type and length fields respectively. The
destination interface software begins calculating the
checksum with the receipt of the type byte. Once thelength byte is accepted the destination station reads that
many data bytes from the bus. After the data bytes are read
two checksum bytes are read and the final checksum is
checked. If the checksum is ok then the destination sta-
tion transmits anACKcode to the source station. After the
ACK is transmitted the destination station goes on about
its business. If the checksum didn't match, then a NAK
code is transmitted to the source station and the destina-
tion station waits for a retransmission.
Congestion and flow control are also taken care of by
the data-link layer. Flow control (making sure the source
doesn't transmit data any faster than the destination can
receive it) is handled automatically by the hardware. A
new byte isn't transmitted until the old one is taken. Flow
control isn't quite that simple however. For example, if a
destination station is powered down in the middle of a
transmission the source station would be left hanging in alocked-up state if a timeout mechanism was not provided
for. Checking for timeouts also comes under the heading
of flow control since making sure that the destination sta-
tion is accepting the data fast enough is just as important
as making sure the transmitting station doesn't transmit
data too fast. This prevents stations from monopolizing
the network if for some reason they decide to start accept-
ing data at only one byte per minute.
Congestion control is possibly more important than
flow control in the Cluster/one. Congestion control deals
MICRO 15
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 18/100
with preventing too many users from accessing the net-
work at any given time. Congestion control is handled in
one of several methods. Since the Cluster/one uses a
CSMA collision detection the number of collisions is
reduced tremendously. Whenever a large number of sta-
tions start wanting to use the bus, however, the number of
collisions rises dramatically. While the bus is jammed and
garbage is being transmitted the average data transfer rate
is sorely reduced. Worse than that, it's reduced at the time
it's needed the most when there are a lot of stations re-
questing network service.
When a collision is detected, the stations recognizing
the collision back off of the network (i.e., attempt to set
the carrier line inactive) and jam the bus so that all sta-
tions on the Clusterbus recognize the collision. Once the
jamming is complete each station attempting to transmit
waits a small, random amount of time and tries again. It
should beobvious why a random amount of time is used,
if everyone waited the same amount of time a collision
would besure to re-occur. Bywaiting a random amount of
time (instead of a fixed, but different, amount of time) all
stations will be given equal priority on the bus. Another
responsibility of the congestion control is to make sure
that a pair of stations don't hog the bus. As you will soon
see it is possible to hold the carrier line active while
several data frames are transmitted. The congestion con-
trol portion of the data-link layer is responsible formaking
sure no one hogs the bus for too long.
The Message/Transport Layer
The next layer ofprotocol in the Cluster/one system is
the message/ transport layer which manages the handling
of messages and conversations among stations. Due to the
fact that the length of a data packet is limited to 260 bytes
(256 bytes of data, two bytes for type and length, and a
two-byte checksum) data must be transmitted in adatagram fashion. Remember, in a virtual circuit opera-
tion the source and destination stations connect just once
and then all data is transmitted across the line until the
transmission is complete. In a datagram system data
packets, or datagrams, are transmitted a block at a time
with the receiving station making heads or tails of the
received data. Since you can transmit a maximum of 256
bytes in a data fraine on the Cluster! one the system is
limited to datagram service. Since, in the Cluster/one,
datagrams are always transmitted in order and are never
lost, a sort of "pseudo-virtual circuit" operation can be
achieved by transmitted datagrams back and forth be-
tween two stations.
The simplest form of communication is a one-way,
single-packet transmission (the datagram). Datagrams in
the NESTAR system are always acknowledged (as dis-
cussed in the section on the data-link layer). One-way
communications, however, are only moderately useful. A
truly useful communication system requires a series of
two-way communications. This type of virtual circuit
operation is easily accomplished by sending datagrams
back and forth between the two stations. Such action, of
course, requires a certain amount of cooperation between
the two stations.
One of the more interesting features ofthe Cluster/ one
system revolves around the carrier line. By leaving this
line active inbetween packet transmissions a multiple
16 MICRO
packet transmission can be accomplished without any in-
terruption on the bus. While this does provide a small in-
crease in performance (especially when the packets being
transmitted are small), What's more important is that the
data frames can be exchanged without interruption. This
very important operation allows the construction of in-
divisible operations like the "set and test" instructions re-
quired by operating systems. Thus, semaphores can be
efficiently implemented in the NESTAR network. Care
must be taken, however, to make sure that two processes
don't accidentally hog the bus. As was previously men-
tioned, the data-link software checks certain time-out
counters to make sure that the current process isn't
hogging the Clusterbus.
Network Transparency
One of the most important features of a hardware
system like anetwork is that it must betotally transparent
to the user. A networking system would be absolutely
useless if you had to throwaway all the software you've
written and start over again to satisfy the network re-
quirements. Such a horrible thought need not come true,
due to the structure of the network itself, it is perfectly
possible to treat the network as though all the devices at-
tached to the network were, in fact, attached to the in-
dividual work station. This concept of virtual I/O makes
the system completely transparent to the end user. He
need not change the wayhe thinks about the file system or
I/O. Almost all of the existing software will run un-
modified on the network. And the modifications required
to adapt existing single-user applications for a multiple-
user environment are easy to make.
Some of the stations on the network (the servers) are
designed to serve other stations (the clients). The printer
server is a good example. This consists of an Apple II at-
tached to a printer connected to the network. From theuser's point ofview he need only type PRI (fromBASIC)or
OPEN(F,"PRINTER;")i [from Pascal) in order to access
the printer. Everything else is handled by the network and
patches made to the resident operating system. The only
difference is that the printout comes from the printer
server instead of the peripheral connected to slot one in
the users Apple.
To the Apple user the most important feature the
Cluster/ one offers is that it forces very little change on
current work habits. The system is easily learned and the
software enhances productivity through its combined
computational and communication facilities. In any cor-
porate structure communication is essential. A group of
widely separated computer systems doesn't enhance com-munication throughout the corporation. Unfortunately,
although a timeshare system provides the communica-
tions capabilities response time is not very good. The
Cluster/ one network allows several microcomputer
system to communicate with one another while maintain-
ing the excellent response time microcomputer owners are
used to and without obsoleting existing software.A \ ICRO"
Randall Hyde. is vice president in charge of advanced research
and development at Lazer MicroSystems, Inc., a Southern
California software development firm. You may contact Mr.Hyde clo Lazer MicroSystems, Inc., 1791 Capital, Unit G.
Corona, CA91720.
No. 68 . January 198"
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 19/100
Download ingBAS IC on thePET • VIC·20 • C64
byKevin S tone
and
Andrew Co rnwall
Tired of typing in a listing from a friend
or having to travel to a friend's place to
copy a program you would like? If so,
continue reading. This article explains
a simple method to send and receive
BASIC programs for machine language
programs with a BASICloader) over the
telephone using a VIC, C-64 or PET.
Equipment requirements are minimal,
consisting of the microcomputer and
compatible modems connected to the
serial port of the VICor C64 or the IEEEport of the PET. The program trans-
ferred is sent as a listing and automatic-
ally converted by the dynamic
keyboard technique to tokenized (pro-
gram) form by the receiving computer.
After communication, the received
program can bereadily run, or saved to
cassette or disk. Programs can be
received from any other system.
Kevin Stone, VIC enthusiast, is a
former Equipment Technician for
CNCP Relecommunications, and iscurrently a Technical Support
Representative for Victor [Canada) Ltd.
Kevin resides in Halifax, Nova Scotia,
Canada.
Andrew Cornwall, is a PET hobbiest
with a wide range of interests in
microcomputer applications. He is
Secretary of the Nova Scotia
Commodore Computer Users Group.
He resides in Dartmouth, Nova Scotia,
Canada.
No. 68 - January 1984
Sending a Program
The first step in transferring a pro-
gram is to coordinate the modems at
the sending and receiving ends. As
usual for any communication, one
modem should be in the originate and
the other in the answer mode [for the
Bell 103 standard modem). Although it
does not seem critical, we prefer setting
both modems at full duplex, if there isa duplex option.
To send a program, load it into the
transmitting computer's memory in
the usual way (either from tape or disk,
or direct entry). Once telephone con-
tact has been established between
modems, the transmitting computer
lists the program to its modem device.
The procedure to do this is slightly dif-
ferent for the VIC or C64 and PET, and
each is described separately below.
Note that if only a portion of a program
is to be transferred, the LISTcommand
would contain the appropriate line
number references [e.g. LIST50-, LIST
50-100, etc.].
VIC or C64 Transmit
In direct mode, type the following lines
and hit return after each. Serial port
parameters are set by CHR$ , 6 } at 300
baud, no parity with 8 data bits, full
duplex, 1 stop bit, and three line hand-
shake. This will work with most
modems, but some may require
slightly different parameters.
MICRO
OPEN 2,2,O,CHR$,6}CMD2
LIST (with line range if
required)
The program will now be sent over the
modem as a full listing - not in
tokenized form. When listing is finish-
ed, indicated by return of the screencursor, wait about 15 seconds for if the
modem has a transmit light, until this
light stops flickering) for the serial port
buffer to empty to the modem, then
type in:
PRINT2
C LOSE 2
This redirects normal output to the
screen and closes the file.
PET Transmit
Enter the following lines in direct modeand hit return after each. The open
statement assumes that the modem is
device number 5, a common but not
universal modem device number. Use
the correct number for your system.
OPEN 5,5
CMD5
LIST
When listing is finished and the screen
cursor returns, enter:
PRINT5
CLOSE 5
Transmission Time
The time needed to send a program is
governed by the modem baud rate. At
300 baud, transmission requires about
30 seconds per kilobyte of listing. Since
a program listing can be as much as
twice as "long" as its tokenized pro-
gram form, a 4K program in memory
can take up to four minutes to transmit
as a listing.
Receiving a Program
The receive method uses the dynamic
keyboard append technique. While the
routines for the VIC, C64 and PET are
somewhat different, the general idea is
the same. In each casea program listing
is taken in and appended line-by-line to
the small receive program. When the
process is completed, the total program
in memory consists of the receive
routine plus the communicated pro-
gram. The receive routine can be
removed by using a toolkit delete com-
mand or simply by entering the line
17
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 20/100
numbers for the routine and hitting
return after each.
As with any append process, the
line numbers of the program being
transmitted should not overlap those in
the receive routine. If the line numbers
do conflict, then simply renumber the
program. The GOTO's must be fixed
along with the renumbering. Solong as
overlapping line numbers is not a prob-
lem, we prefer using the receive routine
with low line numbers, since it is
technically faster (and easier to
delete!) .
Upon being run, the receive routine
will ignore all transmitted characters
(such as the word READYsent after the
CMD command) until a numeric
character with a value 1 to 9 is en-
countered. The routine presumes that
the first numeric character is part of the
initial line number of a listing, andcommences to take in the remainder of
the listing after a valid number is
received.
At some point in the routines
dynamic keyboarding takes over to
carry-out the listing-to-program append
process. This is visible as each com-
municated program line appears on top
of the screen, a transfer line (ending
with a GOTO statement) is printed
under it, next READYflashes once, the
screen clears and the sequence starts
over. This will continue until the word
READY,which is automatically sent at
the end of the listing, is encountered.At this point the process will stop with
a harmless OUT OF DATA ERROR.
VIC and C64 RECEIVE Programs
These routines take advantage of the
serial port 256 byte input buffer, which
makes the timing of the receive and ap-
pend processes less critical, although
on average the routine keeps up with
the character input rate at 300 baud.
Upon being run the routine clears the
screen and waits for the listing to be
transmitted. When listing starts the
action of dynamic keyboarding can be
seen on the screen. The routine
simultaneously receives and appends
the incoming program listing. The
buffer prevents data being lost during
the dynamic keyboarding phase of the
receive/ append process.
Although the input buffer takesonly 256 bytes, the actual serial port
buffer occupies 512 bytes. The addi-
tional 256 bytes is for a transmit buffer,
which is not used when receiving. After
allowing for the buffers and receive
routine itself, only about 2K of
memory is available on a basic VIC for
the received program. The routine will
work with any memory expansion
configuration however, without
modification to the routine.
Receive Program Detail
LINE 0: OPENs a file to the serialport. CHR$(61 sets port parameters to
300 baud, no parity with 8 bits, full
duplex, 1 stop bit, and 3 line hand-
shake. These parameters are
appropriate for most common
modems. The screen is then cleared.
LINE 1: GETs a character via the
modem and tests for receipt of first
numeric character 1 through 9.
LINE 2: PRINTs first received
numeric character to screen.
LINE 3: GETs via the modem and
PRINTs across the screen. End of pro-
gram line is determined by receipt of a
carriage return.
LINE 4: PRINTs dynamic
keyboard transfer line to the screen.
POKE 152,1 tells the VIC/C64 that one
file remains open; GOTO 6 instructs
the routine to restart at LINE 6 when
the transfer line is executed in
simulated direct mode.
LINE 5: Fills keyboard buffer
locations 631 to 634 with a home
cursor and three carriage returns; POKE
198,4 tells the VIC/C64 that the
keyboard buffer contains four
characters. After this the routine is for-
V I C
o O P E N 2 , 2 , O , C H R $ ( 6 ' : P R I N T " ~ " ;1 G E T A $ : I F V A L ( A $ ' = O T H E N G O T O2 P R I N T A $ ;3 G E T * 2 , A : f : P R I N T A $ ; :
I F A $ ( ) C H R : f ( 1 3 ) T H E N 34 P R I N T : P R I N T " P O K E 1 5 2 , l : G O T O 6 "5 P O K E 6 3 1 , 1 9 : P O K E 6 3 2 , 1 3 : P O K E 6 3 3 , 1 3 :
P O K E 6 3 4 , 1 3 : P O K E 1 9 8 , 4 : E N D6 P R I N T " ~ " ; I G O T O 3
18 MICRO
mally instructed to END. In fact,
however, the routine continues as the
characters in the keyboard buffer are
executed (simulating direct mode
operation) which enters (appends) the
transmitted program line printed to the
screen and activates the transfer line.
LINE 6: Clears the screen in
preparation for the next received line. Itthen executes a GOTO 3 to continue
the input.
Using Other Line Numbers
Since many programmers use the
convention of starting at LINE 10, the
above routine which resides from LINE
o to LINE 6 should not normally be in
the way of the program being transfer-
red. If there is a conflict, then simply
renumber the BASIC program,
remembering to change the line
numbers for the three GOTO
commands in lines I, 4 and 6.
PET Receive Program
The PET IEEEport does not have an in-
put buffer. As a result, when
simultaneous receive and conversion is
attempted, incoming characters are
missed during dynamic keyboarding.
To overcome this problem, the receive
and conversion operations are done
separately. First, the listing is received
and POKE'd verbatum into a protected
area ofmemory above 2K.When receiv-
ing is finished, sensed by a 64 milli-
second time-out error, the listing is
automatically PEEK'd from memory
and dynamic keyboard appending
commences.
Overall, the PET routine is slower
than the VIC/C64 version, since it
takes about an extra second per line to
perform the separate appending pro-
cess. Another disadvantage is that in-
itial storage of the full listing requires
as much as twice the memory as its
counterpart in tokenized program
form. Very large programs, however,
can be communicated in stages, saved,
and appended together afterwards.
When run, the PET routine clears
the screen and prints the message
"READY TO RECEIVE". When a
listing is being received, the message
"RECEIVING" is printed. When the
receiving is completed, i.e. aREADYis
received, the dynamic keyboarding
takes over.
PET Receive Program Details
LINE 0: POKE 53,8 sets top of
BASICmemory at 2Kto protect higher
memory for character storage. It then
OPENs a file for device number 5,
which is presumed to be the modem
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 21/100
o r C BM-64
nd VICn ers o nly:
his is just 1 of0 pages of theewest and biggest
yles catalog, hotff the press.
knowyou'll
ant this page, in
ts full 71/4 x 9lendor, and
19 pages.peripherals,
oftware and bookshat willmake your
or VIComputer evenicer to live with.o, if we missed
sending you yourvery own copywithin the last few
weeks, call us at(800) 227-9998
(unless you live
in California, in
which case call(415) 965-1735.
From Skyles
Electric Works, theoldest and largest
professionalspecialists in the
business.
1
kyle s Ele ctric Wo rks231-E S. Whisman RoadMountain View, California 94041
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 22/100
More speed, more memoryworkspace from the peoplewho lifted the 641( limit.
In 1981, we introduced our famousSaturn RAM card to boost the Apple'smemory by 32K. Now, there are 64Kand 128Kversions for added power.
Increased RAM lets you run biggerprograms, and our VisiCalc®expansionsoftware provides a dramatic expansionofworkspace memory Also, the extra
memory can work as a pseudo disk forinstant access. (Nomore 20-secondsearches!) The Saturn RAM board is asuper aid for advanced word process-
ing, data base management, spreadsheet, and accounting applications.And perfect with PASCAL,CPIM® ,
and BASIC.
Use our easily installed cards incombination-and get a whopping220K ofVisiCalcworkspace on theApple lIe. Or sensational enhancements
on Apple II, II+ , Franklin, Basis andmost Apple compatibles. Weeven havesoftware that increases your Apple'smemory in BASICprogramming up to4 megabytes!
This kind of performance requiressophisticated bank switching and sup-porting software that we originated,
proved, and improved. Buy fromthe leader!
Let us help you expand your Apple'sproductivity. For information on our
RAMboards and other Titan microcom-
puter products, see your computerdealer or contact: Titan Technologies,Inc., PO Box 8050, Ann Arbor,MI48107; Telephone (313) 973-8422.
Sales and Marketingby The MARKET INGRESOURCE GROUP,CostaM esa , C A .
Apple is a r egi stered trademark of Apple Computer. Inc.
V is iCa1c i s a regi st er ed t radema rk ofVi siCorp, Inc .
CP1M is a registered trademark of Digital Research, Inc
20
. . . - - . . . . . - . . . . . . -. . . . . " , .'W' . - . . . _ - - - . . . . . . . . . . .
P E T
0 P O K E 5 3 , 8 : 0 P E N 5 , 5 : J = 2 0 4 8 :P R I N T " ~ R E A D Y T O R E C E I V E " r G O T O .3
1 G E T * 5 , A $ : I F S T < > O T H E N G O T O 52 J · J + l : P O K E J , A S C ( A $ ) : G O T O 13 G E T 4 t 5 , A $ :
I F S T ( ) O O R V A L ( A $ )= 0 T H E N G O T O 3
4 P R I N T " R E C E I V I N G " : G O T O 25 P O K E 5 3 , 1 2 8 : K = J : J = 2 0 4 8 : C L O S E 56 P R I N T " " ' 1 1 .. . ,7 J = J + l : B X = P E E K ( J ) : P R I N T C H R $ ( B X ) ; :
I F 8 7 . < > 1 3 A N D K ) J T H E N G O T O 78 P R I N T : P R I N T " K = " K " : J = " J " : G O T O 6 "9 P O K E 6 2 3 , 1 9 : P O K E 6 2 4 , 1 3 : P O K E 6 2 5 , 1 3 :
P O K E 6 2 6 , 1 3 : P O K E 1 5 8 , 4 : E N D
device number. Variable, is initializedto the 2K boundary. The screen iscleared and the message "READY TORECEIVE" is printed.
LINE 1: GETs a character from
the modem and tests the status variable
ST for an error. If an error occurs, it is
assumed to be a time-out error (ST=2),
and branches to the dynamic keyboard
section of the program, starting at LINE
5.
LINE 2: Increments variable, and
POKEs the PET-ASCII value of the
latest character received into memory
location [. Branches back to LINE 1 to
get another character.
LINE 3: Tests for receipt of firstnumeric character to suppress READY
and other non-BASIC lines.
LINE 4: PRINTs message
"RECEMNG", after the first numeric
character is received.
LINE 5: Restores the normal top
of BASIC memory. Defines variable K
as last value of" and redefines, as 2K.
CLOSEs file number 5.
LINE 6: Clear the screen.
LINE 7: PEEKs listing from
memory and PRINTs characters across
the screen. End of program line deter-mined by carriage return (= 13).
LINE 8 PRINTs dynamic
keyboard transfer line to the screen.
The transfer line carries over the values
of K and, and set the program to restart
at LINE 6.
LINE 9: Fills keyboard buffer
locations 623 to 626 with a 'home
cursor' and three 'carriage returns': the
POKE 158,4 sets a variable to tell the
PET that the keyboard buffer contains
four characters. After this, the routine
is formally instructed to END. In fact,
MICRO
the routine continues as the characters
in the keyboard buffer are executed,
simulating direct mode operation to
enter [append) the received programline printed to the screen and to
activate the transfer line.
Reliability
Even though this method for transfer-
ring programs does not use any error
detection, such as parity checking or
checksum, we found it to be very
reliable. Phone line glitches can cause
difficulties, but these were rare during
our development and testing of this
technique. On one occasion someone
dialed an extension telephone while aprogram was being transmitted. On
another, the phone line mysteriously
went dead for several seconds. Normal
phone line background noise and cross-
talk did not seem to cause any pro-
blems. In our "formal" testing of this
procedure, an 8K listing was com-
municated ten times over the period of
several days. Each time the program
was transferred successfully. Although
our experience was on a local call basis,
long distance telephone program
communication should be feasible.
If a problems occurs when a VIC orC64 is receiving a program. the routine
can be rerun to accept that portion of
the program listing which was not
received correctly. If a problem occurs
while a PET is receiving, the correction
procedure is more difficult. That por-
tion of the program received in good
condition can be saved and the routine
rerun to take in the listing of the re-
mainder. Afterwards, both parts can be
appended together. It is probably more
convenient to simply re-do the entire
procedure from the beginning.
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 23/100
FEATURING PROGRAMSFOR THE VIC·20 ANDTHE COMMODORE 64.
BOUNTY HUNTER $24.95*
An adventure in the Old West. Journey back with
us into the days of Jessie James and Billy the Kid
where the only form of justice was a loaded
revolver and a hangman's noose. In this full-length
text adventure, you play the role of Bounty Hunter,
battling against ruthless outlaws, hostile Indians,
wild animals and the elements of the wilderness
with only your wits and your six gun. Average
solving time: 20~30 hours. If you love adventures,
this one is a real treat.
Available for COMMODORE 64 and the VlC-20
(with 8K or 16K expander). Available on TAPE orDISK Played with JOYSTICK
KONGOKONG $24.95*
Climb ladders, avoid the barrels the crazy ape is
rolling at you, and rescue the damsel. Commodore
64 version features 4 different screens!
Available for COMMODORE 64 and VlC-20.
Available on TAPE or DISK Played with JOY-
STICK
GRAVE ROBBERS $19.95*
Introducing the first GRAPHIC ADVENTURE
ever available for the VIC-20 or COMMODORE 64!
With realistic audio-visual effects, you explore an
old deserted graveyard and actually see the perils
that lie beyond.
Available for COMMODORE 64 and VlC-20.
Available on TAPE or DISK Played with KEY-
BOARD.
$24.ANDon't let the bullies catch you as you gobble the
goodies! This program has 8 screens and still fits in
the standard memory.
Available for COMMODORE 64 and VlC-20.
Played with JOY-
VICTORYSOFTWARE
WOULD LIKETO WISH OUR CUSTOMERS
A'P'P'Y•H o LIDAYS
AND THANK THEM FOR THEIRPATRONAGE THROUGHOUT THE YEAR.
THE • EARTH • WARRIOR
METAMORPHOSIS
You stumbled into the nest of the Cyglorx and
find yourself fighting off robot tanks guarding
the Cyglorx eggs. You think you have everything
under control and then the eggs start hatching.
Available for COMMODORE 64 and VIC-20.
Available on TAPE or DISK Played with JOY-
STICK
REVENGE
The creator assembled a massive army of robots and insects to take
revenge on the earth. Destroy insects, get treasures, and get the neutron
bomb deactivator. Battle robots and destroy the neutron bomb before it
annihilates your city. Miss and you must face the mutants. Features 4
different screens.
Available for COMMODORE 64. Available on TAPE or DISK Played
with JOYSTICK
THE CREATOR $24.95
Journey into the most complex and dangerous
fortress ever built by the creator. You will en-
counter deadly robots, skulls, lakes, avalanches,
false creators, and a creature who roams 256
rooms relentlessly pursuing you.
Available for COMMODORE 64. Available on
TAPE or DISK Played with JOYSTICK
ILLUSTRATIONS: EUZABITH HAUCK
Check your LOCAL DEALER or order directly.
ORDERING: We accept personal checks, money orders, VISA. and MasterCard.
Charge orders please include number and expiration date.
OVERSEAS ORDER: Please use charge, or have check payable through a U.s.
bank.
CANADIAN CUSTOMERS: If you wish to write a check drawn through a
Canadian bank, please multiply the total order by 1.25 for proper conversion.
Add $1.50 postage and handling per order. PA residents please add 6% sales tax.
VICTORY SOFIWARE INC.7 Valley Brook Road
Paoli, Pennsylvania 19301
(215) 296-3787
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 24/100
22
Telecommuniwith a difference!
Unexcelled communications power andcompatibility, especially for professionals andserious computer users.look us over; Super'l'ermisn't just "another" terminal program. Uke ourfamous Terminal-40,It's the one others will bejudged by.
• EMULATION-Most popular terminal protocols:
cursor addressing, clear, home, etc.• EDITING Full-screenediting of ReceiveBuffer• UP/DOWNLOAD FORMATS-CBM,Xon-Xoff,ACK-NAK,CompuServe,etc.• FLEXIBILITYSelect baud, duplex,parity, stopbits,etc. Evenwork off-line,then upload to system!DISPLAYMODES-40 column;80/132 withside-scrolling
• FUNCTIONKEYS-8 standard, 52 user-defined• BUFFERS-Receive, Transmit,Program, and ScreenPRINTING-Continuous printingwith SmartASCIIinterface and parallelprinter; buffered printingotherwiseDISKSUPPORT-Directory, Copy, Rename,Scratch
Options are selected by menus and EXECfile.Software
on diskwith specialcartridge module.Compatible withCBMand HESAutomodems; select ORIG/ANSmode,manual or autodial.
Write for the full story on Super'Term; or, Ifyoualready want that difference, order todayl
Requires: Commodore 64 or VIC-20, disk drive or Datasette, and
compatible modem. VIC version requires 16Kmemory expansion. Please
specify VIC or 64 when ordering.
Smart ASCII Plus. . . S 5 9 ' ' l S
The only Interface which supports streaming -sending
characters simultaneously to the screen and printer - with
SuperTerm.
Also great for use with your own programs or mostapplication programs, i.e., word processors. Print modes:
CBM Graphics [w/rnany dot-addr printers), TRANSLATE,DaisyTRANSLATE,CBMjTrue ASCII, and PIPELINE.
Complete with printer cable and manual. On disk or cassette.
VIC 2l and Commodore 64 ar e t rademarks o f C omm od o re E le ct ro n ic s, lid.
MICRO
DOSPLUS
For C·64
By Michael Keryan
;~~S~I.US -- adds new utility
C!.i~n$to a Commodore 64... of the RESTORE key.
Tis article shows how to use the
~STORE key (which generates
a Non-Maskable Interrupti to ac-
cess up to 32 new utility routines.
Seven new functions are implemented,
including versatile printer support,
easy color changes, and a two-key
append function that will allow you tocombine two or more BASIC programs.
The framework is provided to allow 25
more functions to be added.
The Commodore 64 is definitely
one of the best values in home com-
puter hardware. It is roughly com-
parable to IBM's PCjr at about one-
fourth the cost. Why is it so inexpen-
sive? For one thing, Commodore de-
cided to use the same BASIC-in-ROM
interpreter that was used in the VIC-20
and older PET machines. The KERNAL
ROM was updated for the 64 but no
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 25/100
new BASIC commands were added to
support the 64's outstanding sound,
bit-mapped graphics, sprites, etc. To
use these features you are left with a
myriad of PEEKs and POKEs that in no
way can be described as user-friendly.
For example, to change the background
screen color to black, you must type:
POKE 53 281,0. To get a printed listing
of a program, you type: OPEN 4,4:
CMD 4: LIST, then afterwards: PRINT
#4: CLOSE 4. An almost unbelievably
complex series of POKES is necessary
to program sprites and music.
A number of third-party software
packages have attempted to solve some
of these problems by adding new com-
mands to BASIC, e.g. Ultra-BASIC 64.
However, there is always some
desirable function missing. For exam-
ple, Ultra-BASIC 64 provides graphic
screen dumps to the printer, but has no
normal [alphanumeric] printer dump.
Quite a few single-purpose machine
language routines have appeared in
magazines such as this recently which
provide desirable add-on features. In-
variably, these routines are placed
either in the cassette buffer or at
$COOO,and require the SYS function
to operate.
The most convenient way to access
handy functions involves assigning cer-
tain keys or sequence of keys to the
new functions. The DOS WEDGE [pro-
vided on the demo disk that comes
with Commodore's 1541 disk drive)uses this technique. For example, in-
stead of typing LOAD"$",8 then LIST,
you type only $ to get a directory
listing. In general, however, assign-
ment of special keys makes your pro-
grams run slower since the absence or
presence of these key sequences must
continually be checked.
The Powerful RESTOREKey
This article provides a framework to
add a series of extensions for the Com-
modore 64 using the RESTORE key,followed by another key to define the
function. Normally when you hit the
RESTORE key, you use it in conjunc-
tion with the RUN/STOP key, most
likely to regain control of your com-
puter when a program has gone into
never-never land. However, hitting
only RESTORE appears to have no ef-
fect - a virtually worthless key.
Actually, RESTORE is probably the
most powerful key on the keyboard,
and is ideally suited to controlling the
computer. It provides a Non-Maskable
No. 68 . January 1984
listing 1
C 9 0 0C 9 0 1C 9 0 2C 9 0 3C 9 0 4C 9 0 5C 9 0 7C 9 0 AC 9 0 0C 9 0 FC 9 1 2C 9 1 5C 9 1 7C 9 1 AC 9 1 0
C 9 2 0C 9 2 3C 9 2 6C 9 2 7C 9 2 AC 9 2 CC 9 2 EC 9 3 0C 9 3 1C 9 3 4C 9 3 7C 9 3 AC 9 3 DC 9 4 0C 9 4 1
C 9 4 2C 9 4 3C 9 4 4
C 9 4 7
4 88 A4 89 84 8A 9 7 F8 0 0 0 D OA C 0 0 D O3 0 3 52 0 B C F 62 0 E 1 F FD O O F2 0 1 5 F 02 0 A 3 F O2 0 1 8 E 5
2 0 4 7 C 96 C 0 2 A O5 82 0 E 4 FFC 9 0 0F O F 92 9 1 FA AB D C O C B8 0 3 E C 9B D E O C B8 0 3 F C 92 0 F F F F7 86 8
4 8A 84 C 7 2 F E
A 9 0 0
D O S P L U S B Y M . J . K E R Y A N
D U P L I C A T E S N M I R O U T I N E A T$ F E 4 3 I N R O M , C H E C K S F O RK E Y P R E S S A F T E R R E S T O R E K E Y
R O M
N I T 1I N I T 2I N I T 3S T P F LC O N T N MS T O PG E T I N
U T I L I T I E S ,
• $ E 5 1 8• $ F 0 1 5• $ F O A 3• $ F 6 B C• $ F E 7 2• $ F F E 1• $ F F E 4
;C I A I R Q • $ 0 0 0 0 , F O R R S / 2 3 2 C H E C KT A B L • $ C B C O ; L O W B Y T E P O I N T E RT A B H • $ C B E O j H I B Y T E P O I N T E R,O R I G I N • $ C 9 0 0. . • O R I G I N;
N E W N H I
S T O P K Y
N O T S T PK E Y L P
R S 2 3 2
P H AT X AP H AT Y AP H AL O A U 7 FS T A C I A I R QL O Y C I A I R QB H I R S 2 3 2J S R S T P F LJ S R S T O PB N E N O T S T PJ S R I N I T 2J S R I N I T 3J S R I N I T 1
J S R I N I T N M ; N E W I N I T I A LJ H P ( $ A 0 0 2 ) ; W A R M S T A R TC L I E N A B L E K E Y B DJ S R G E T I N G E T A K E YC M P . $ 0 0 W A I T / P R E S S E DB E Q K E Y L PA N D U 1 FT A XL O AS T AL O AS T AJ S RS E IP L A
P H AT A YJ H P C O N T N M
T A B L , Xt+ 1 0T A B H , Xt+5
H F F F
I S A V E R E G I S T E R S
I R Q F L A G F O RR S / 2 3 2
F L A G S E TS T O P K E Y ?N O , B R A N C HO L i P L I C A T E N M I
R O U T I N E S
M A S K F O R 3 2U N I Q U E K E Y SG E T L O B Y T ES E T U P J S R
H I B Y T E
M O D I F I E D A D D RI R Q D I S A B L E DG E T B A C K Y
;J I N I T I A L I Z A T I O N R O U T I N E F O R N M I
K E R N A L N M I V E CK E R N A L C H R O U T
j
N M I N V • _ 0 3 1 8' I B S O U T • $ 0 3 2 6B R D C L R • $ 0 0 2 0B C K C L 1 • $ 0 0 2 1C O L O R . . $ 0 2 8 6C O L C H = $ 0 0C O L B K = $ O C
C U R S O R C O L O RC H A R S • B L A C KB A C K G = G R E Y
;I N I T N M L O A t < N E W N M I ; R E S T O R E N M I
MICRO 23
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 26/100
C 9 4 9C 9 4 CC 9 4 EC951C 9 5 3C 9 5 6C 9 5 9C95BC 9 5 EC 9 6 0C 9 6 3C 9 6 5C 9 6 8C 9 6 9C 9 6 AC 9 6 BC 9 6 DC 9 7 0
C 9 7 1C 9 7 2C 9 7 5C 9 7 7C 9 7 9C 9 7 BC 9 7 DC 9 7 FC 9 8 0C 9 8 3C984C 9 8 5C 9 8 6C 9 8 7C 9 8 BC 9 8 AC 9 8 DC 9 9 0C 9 9 2C 9 9 5C 9 9 7C 9 9 AC 9 9 DC 9 9 FC 9 A lC 9 A 4C9A7C 9 A AC 9 A CC 9 A FC 9 B 2
8 0 18 0 3A 9 C 98 0 19 0 3A 9 O C8 0 2 0 D OS O 2 1 D OA 9 0 08 0 8 6 0 2A 9 7 18 D 2 6 0 3A 9 C 98 0 2 7 0 3E AE AE AA 9 0 08 0 B B C96 0
4 8A D B E C 9C 9 0 4D O 3 DA 5 B AC9 0 8F O 3 76 88 0 B A C 94 S8 A4 8984 SA 9 7 E2 0 C 3 F F2 0 C A C 9A 9 7 E2 0 B A F FA 9 0 02 0 B D F F2 0 C O F FB O O BA 2 7 E2 0 C 9 F FA D S A C 92 0 C A F lA 9 7 E2 0 C 3 F F2 0 C C F F6 8
S T AL O AS T AL O AS T AS T AL O AS T A
L O AS T AL O AS T AN O PN O PN O PL O AS T AR T S
N E W O U T P U T R O U T I N EV E C T O R S O U T P U T T O P R I N T E R I FP F L A G I S S E T I N A D D I T I O N T OC R T - - O I S K A C C E S S W I L L T U R N
O F F P R I N T E R A C C E S S
N H I N VI > N E W N H I ;N M I N V H ;I C O L B K8 R O C L RB C K C L lI C O L C HC O L O R . ; C H A R A C T E R S
I < N E W O U TI B S O U T* > N E W O U T ;I B S O U T " l ;
V E C T O R T ON E W R O U T I N E
; E D G E C O L O Ri B A C K G R O U N D
N E W O U T P U TV E C T O R
1 $ 0 0P F L A G
; F U T U R E; E X P A N S I O N; P R I N T E R O F F
24
C L R ' H N • $ F F C C ; K E R N A L R O U T I N E SO L O O U T = H l C AC L O S E = H F C 3S E r L F S • $ F F B AS E T N A H • $ F F B OO P E N = $ F F C OC H K O U T = $ F F C 9;V I C H C RF AP F I L E
= $ O O l S= $ B A= $ 7 E
; V I C H E M C T R L R E G; C U R R E N T D E V I C E .; L O G I C A L P T R F I L E
;N E W O U T P H A
L O A P F L A G , C H E C K F L A G T OC N P 1 $ 0 4 , S E E I F P T R I SB N E R T N P ; A C T I V EL O A F A ; I F D E V I C E I SC N P I . O S ; I S D I S K T H E NB E Q R T N P ; O I S A B L E P R I N T E RP L AS T A P T E M PP H A ; S A V E R E G I S T E R ST X AP H AT V AP H AL O A I P F I L EJ S R C L O S E ; F I R S T C L O S E F I L EJ S R P C A S E , S E T U / L C A S EL O A I P F I L EJ S R S E T L F SL O A 1 $ 0 0J S R S E T N A HJ S R O P E NB C S P C L O S E ; C L O S E O N E R R O RL O X t l P F I L EJ S R C H K O U TL O A P T E H PJ S R O L D O U T ; C H A R T O P R I N T E R
P C L O S E L O A t l P F I L EJ S R C L O S EJ S R C L R C H N ; R E S E T T O C R TP L A ; R E S T O R E R E G S
MICRO
Interrupt [NMIJ request to the com-
puter's cpu. No matter what the com-
puter is doing at the time, it will stop
and jump to a special machine language
program that determines why the inter-
rupt was requested, and takes ap-
propriate action.
The Commodore 64 NMI program
basically does two things:
1. It determines if the NMI requestcame from the RS1232 port or from
the RESTORE key. If the RS1232
port generated it, the data transfer
is handled.
2. If the RESTORE key generated the
interrupt, the NMI program checks
to see if the STOP key was also
pressed. If so, it jumps to initializa-tion routines and then to a BASIC
warmstart. If the STOP key wasn't
pressed, the program has no
noticeable effect.
So when you press the RESTOREkey alone, nothing appears to happen,
but actually the NMI program was ex-
ecuted. Commodore makes it very easy
to replace their NMI program with one
of your own, since the NMI routine
vectors through RAM locations
$0318-0319. Place the locations of your
new NMI program in $0318-0319 and
you've gained complete control of the
computer through the RESTORE key.
Using the Program
An assembler program [Listing 1Jil-lustrates how the RESTORE key can be
used to add 32 new functions to the
Commodore 64. To gain access to these
new routines, press the RESTORE key
followed by a second key that identifies
the function. Seven new routines are
provided in the Listing, twenty-five
more are possible. The seven functions
are as follows:
..
.Ato Append programs ...
B to change the Background color
C t o change the Character colorE....o .change the Edge color
DtoDump the current screen totheprinteJ
p.to tl.lm OiLthe Printer
oto tum O£hhe printer.
Any other key pressed will return the
computer to normal execution. Using
the RUN/STOP and RESTORE keys
together function as normally, except
vectors are restored to the new routines.
Since this interrupt technique in-
No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 27/100
volves no character checking during
normal program execution, it won't
slow down your programs. An unex-
pected benefit of using the RESTORE
key is that it also acts as a PAUSE or
NO-SCROLL key. When a program
listing or data is scrolling by too fast to
read, just hit RESTORE - this will
freeze everything until you hit another
key. To resume the scroll, press
RETURN. Also, the RESTORE func-
tions can be stacked. Suppose you just
stopped a scroll by using RESTORE,
and you would like a printout of the
current screen. Just hit RESTORE a
second time, followed by D to generate
the screen copy. Then hit RETURN to
continue scrolling. This is an obvious
advantage over using STOP, etc.
The series of machine language
routines reside in upper memory, pro-
tected from BASIC, Reset, etc., at loca-
tions $C800-CBFF. This is right next to
the DOSWEDGE 5.1 utility program
[$CCOO-CFFF). Therefore the new
routines (called DOSPLUS) can be
loaded and initialized along with the
WEDGE. Each routine is now described
briefly.
Non-Maskable Interrupt Routine
The new NMI routine duplicates
many of the functions of the original
NMI routine located in ROM at $FE43.
The CPU registers are saved and a
check is made for an RS1232 interrupt.If the NMI request came from the
RESTORE key, a check of the STOP
key is made. If STOP was pressed at the
same time, then three ROM initializa-
tion routines are run. Anew initializa-
tion routine, INITNM, is then run
[more on this later], followed by a
warm start to BASIC.
Assuming you had only pressed the
RESTORE key to access the new func-
tions, the initializations and warm
start are bypassed. The interrupt flag
is cleared to allow keyboard entry.
Then the program waits for a key to bepressed. The upper 3 bits of the ASCII
value of the key are masked to zeroes,
so only 32 unique keys are possible.
Based on the value obtained above,
pointers for the corresponding routines
are set up into a JSR statement, then
the JSR is taken, in which the new
function is executed. After the
subroutine is run, program flowreturns
to the old NMI routine in ROM which
restores the registers and executes an
RTI (return from interrupt) and normal
program execution resumes.
No. 68 - January 1984
C 9 B 3C 9 8 4C 9 8 5C 9 B 6C 9 B 7C 9 B AC 9 S 8
C 9 B CC 9 B EC 9 C OC 9 C 3C 9 C 4C 9 C 6C 9 C 9
C 9 C AC 9 C O
C 9 C FC 9 D lC 9 0 3C 9 0 5C 9 0 7C 9 0 9
C 9 0 A
C 9 D OC 9 0 FC 9 E 2C 9 E 4C 9 E 7C 9 E AC 9 E CC 9 E Et 9 F lC 9 F 3C 9 F 5C 9 F 7C 9 F 9C 9 F CC 9 F F
C A 0 2C A 0 4C A 0 7C A 0 9C A O CC A O FC A 1 2C A 1 4C A 1 6C A 1 8C A 1 AC A l CC A 1 EC A 2 ! )C A 2 2
A 86 8A A6 84 C C A F l0 00 0
A 9 0 48 5 B A8 0 B B C 96 0A 9 0 08 0 B B C 960
A O 1 8 0 02 9 0 2
F O 0 4A O 0 700 02A O 00A 2 04
6 0
2 0 C A C 9
A 9 7 020 B A FFA 9 0 02 0 B O FF2 0 C O FFB O 7 AA 2 7 02 0 C 9 FFA 9 00
8 5 F OA 9 04
8 5 F E20 8 9 C A2 0 7 E C A20 9 7 C A
A 2 1 920 E 1 FFF O 5 020 7 5 C A2 0 9 1 C A20 8 0 C AA O 00B 1 F OC 9 22D O 02A 9 2 7C 9 A 2D O 02A 9 A 78 0 B A C 9
T A YP L AT A X
R T N P P L AJ M P O L O O U T j R T S T H R U O L O O U T
P T E M P , B Y T E $ 0 0P F L A G , B Y T E $ 0 0j
T U R N P R I N T E R O N / O F Fj
P R N T O N L O A * $ 0 4 j A C T I V A T E B Y PS T A F AS T A P F L A GR T S
P R N T O F L O A *$00 j A C T I V A T E B Y 0S T A P F L A GR T S
j
j O E T E R M I N E I F S C R E E N I S U P P E R O Rj L O W E R C A S E - - S E T X A N O Y,,P C A S E
U P P E RP O E V
L O A V I C M C RA N O U 0 2
B E Q U P P E RL O Y U 0 7B N E P D E VL O Y U O OL O X *'04
R T S
j Y I S S E C A O O Rj X I S D E V I C E II
j
j O U M P S C R E E N T O P R I N T E R
MICRO
j
O P N T RR O W S. C O L M N SD P F I L E,,P D U M P
R O L O O P
C O L O O P
S H F T Q T
N O T Q T
= $ F O= $ 1 9= $ 2 8. . $ 70
j P O I N T E Rj 2 5 R O W S O N C R Tj 4 0 C O L U M N Sj L O G I C A L F I L E *
J S R P C A S E
L O A * O P F I L EJ S R S E T L F SL O A U O OJ S R S E T N A MJ S R O P E NB C S O P C L O S j C L O S E O N E R R O RL O X * O P F I L EJ S R C H K O U TL O A U O OS T A O P N T RL O A U 0 4S T A O P N T R + 1J S R P C R J C A R R E TJ S R L I N E j S Y M B O L L I N EJ S R L I N B L K j B L A N K L I N E
L O X * R O W SJ S R S T O P j I F S T O P K E Y ,S E Q O P C L O S j T H E N S T O P P R I N TJ S R S P C 1 6 j M A R G I NJ S R B O X S Y M j S Y M B O LJ S R P S P A C E j S P A C EL O Y *'00
L O A ( O P N T R ) , Y j G E T C R T C H A RC M P * ' 2 2 j I F Q U O T E ,B N E S H F T Q T j C H A N G E T OL O A * $ 2 7 j A P O S T R O P H EC M P U A 2 j I F S H I F T Q U O T E ,B N E N O T Q T j C H A N G E T OL O A * $ A 7 ; S H I F T A P O S T R O P H Es r A p r E M P
25
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 28/100
NMI Initialization Routine
Asmentioned above, a combination C A 2 5 29 8 0 A N D 1 1 $ 8 0 , I F R E V E R S E C H A RRUN/STOP and RESTORE restores the C A 2 ? e o A F C A S T A R E V F L G ; T H E N S E N D R E Vperipheral chips, colors, etc. back to C A 2 A F O 0 5 B E Q D E C O D E , C O D E T O P R I N T E Rtheir default values. This means we C A 2 C A 9 1 2 L O A 1 1 $ 1 2 ,would lose control of the NMI routine C A 2 E 20 C A F 1 J S R O L D O U T
because the KERNAL ROM addresses C A . 3 1 A D S A C 9 D E C O D E L O A P T E M P ; C H A N G E S C R E E N
are reinstated in the indirect vectors inC A 3 4 2 9 3 F A N D U 3 F , C O D E T O A S C I I
RAM. The new initialization routineC A 3 6 O E B A C 9 A S L P T E M P ; C O D E F O R
therefore places our addresses back intoC A 3 9 2 C B A C 9
B I T P T E M P , P R I N T E RC A 3 C 1 0 0 2 B P L * + 4the vectors for the NMI routine and the C A 3 E 0 9 8 0 O R A 1 1 $ 8 0OUTPUT routine (used in the printer C A 4 0 7 0 02 B V S * + 4utilities) . C A 4 2 0 9 4 0 O R A 4 1 $ 4 0
The initialization routine also C A 4 4 2 0 C A F 1 J S R O L D O U T J C H A R T O P R I N T E Rallows us to change the colors to new C A 4 7 A D A F C A L O A R E V F L G J I F R E V E R S E T U R Ndefault values, in this case to black C A 4 A F O 0 5 B E Q C H R S N T , O F F R E V M O D E
characters on a grey background. If you C A 4 C A O 9 2 L D A 4 1 $ 9 2
desire different default colors, change C A 4 E 20 C A F l J S R O L D O U T
them here.C A 5 1 c e C H R S N T I N Y , N E X T C O L U M N
Lastly, the printer flag is reset toC A 5 2 C O 2 8 C P Y l t C O L M N SC A 5 4 D O B E B N E C O L O O P
disable the printer, if it was on before C A 5 6 20 A S C A J S R L N E N D , E N D O F L I N Ethe intialization was run. C A 5 9 9 8 T V A
C A 5 A 1 8 C L CNew OUTPUT Routine C A 5 B 6 5 F D A D C D P N T R
C A 5 D 85 F D S T A D P N T RNEWOUT allows you to turn on the C A 5 F 9 0 0 2 B C C H 4
printer (device #4) so that all output to C A 6 1 E 6 F E I N C O P N T R + l , R E V I S E P O I N T E Rthe screen can go to both the screen and C A 6 3 C A D Othe printer. When this routine is ac- C A 6 4 C O 9 E B N E R O L O O P
tivated, to get a program listing, just C A 6 6 2 0 9 7 C A D P C L O S J S R L I N B L K , D O N E W I T H C R T
type LIST. C A 6 9 20 7 E C A J S R L I N E
The NEWOUT routine first checksC A 6 C 2 0 C C rr J S R C L R C H N , R E S E T T O C R T
to see if the printer flag is off. Then itC A 6 F A 9 7 0 L O A l t D P F I L EC A 7 1 2 0 C 3 F F J S R C L O S E
checks to see if the active device is #8. C A 7 4 6 0 R T S , D O N E W I T H D U M PDisk access is set up to kill the printer ;output to avoid possible contention prob- ; S U B R O U T I N E S T O S U P P O R T D U M Plems on the serial bus. ,
The program then checks to see if C A 7 S A O 1 0 S P C 1 6 L O Y 4 1 $ 1 0 , 1 6 B L A N K Sthe screen is in upper/graphics or C A n 2 0 8 0 C A S P 1 6 L P J S R P S P A C Elower/upper case. Afile is then opened C A 7 A 88 D E Y
to device #4 with a secondary address C A 7 B D O f A B N E S P 1 6 L P
of 0 or 7, depending on the case.C A 7 0 6 0 F < r S
;The character is sent to the printer, C A 7 E . 20 75 C A L I N E J S R S P C 1 6 , L I N E O F S Y M B O L S
the file is closed, then the character is C A S l A O 2C L D Y U2Csent to the screen. Note that the printer C A 8 3 2 0 9 1 C A L I N E L F ' J S R B O X S Y Mfile is opened and closed for each C A 8 6 8 8 D E Ycharacter. The printer output mode is C A S ? D O F A B N E L I N E L Pturned on by RESTORE, P, and turned C A e 9 A 9 0 0 P C R L O A U O D , C A R R R E T U R Noff by RESTORE, O. C A 8 B D O 0 6 B N E O U T C H R
C A 8 D A 9 2 0 P S P A C E L O A U 2 0 , S P A C E
Dump Screen to Printer C A 8 F D O 0 2 B N E O U T C H R
C A 9 1 A 9 2 E B O X S Y I 1 L O A U 2 E , P E R I O DIn addition to the printer on/off
C A 9 3 20 C A rl O U T C H R J S R D L D O U TC A 9 6 6 0 R T S
functions, a screen dump routine isI
provided. This is accessed by the C A 9 7 2 0 7 5 C A L I N B L K J S R S P C 1 6 ; B L A N K L I N ERESTORE key followed by aD. The en- C A 9 A 20 9 1 C A J S R B O X S Y Mtire 40 x 25 screen is copied character C A 9 D A O 2 9 L O Y 4 1 $ 2 9by character to the printer. The printed C A 9 F 20 S O C A L B L K L P J S R P S P A C Eoutput is indented to center the text on C A A 2 8 8 D E Ythe paper and a dotted outline is drawn C A A 3 D O F A B N E L B L K L P
around the 40 x 25 matrix. As before, C A A 5 20 a D C A L N E N D J S R P S P A C E
the printed output is made the same C A A 8 2 0 9 1 C A J S R B O X S Y MC A A B 2 0 8 9 C A J S R P C R
case as the screen. C A A E 60 R T SThe PDUMP routine opens and
26 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 29/100
C A A F
C A D OC A B 2C A B 4C A 8 6C A B 9C A B CC A B EC A G OC A C 2C A C 4C A C 6C A C 8C A C AC A C CC A C DC A C FC A D 2C A D 5C A D 8C A D SC A D CC A D EC A E lC A E 2
C A E 4C A E 7C A E 9C A E CC A E EC A F lC A F . 3C A F SC A F 6C A F 8C A F AC A F CC A F Ec a o oC 9 0 2C D 0 5C B 0 7C B O AC B O DC D 1 1C 8 1 5C 8 1 9C B 1 DC B 2 1C B 2 5C 8 2 9C B 2 AC B 2 D
0 0
A 2 0 0F O 0 2A 2 0 1F E 2 0 D O2 0 E 4 F FC 9 0 0F O F 9C 9 4 2F O F OC 9 4 5F O E 8C 9 4 3F O 0 16 0A 2 F A
F E F F 0 7F E F 9 D 8F E F 3 D 9F E E D D AC AD O F lE E 86 0 21 89 0 0 5
,,R E V F l G , B Y T E $ 0 0 ; Z E R O I F N O T R E Vj
; C H A N G E S C R E E N C O L O R Sj 3 E N T R Y P O I N T S F O R E D G E , B A C K G R O U N D ,; A N D C H A R A C T E R S - - A l l 3 C A N B Ej C H A N G E o W I T H O N E E N T R Yj
E D G E l D X 1 1 $ 0 0B E Q C H G C C l lB A C K G D l D X 1 1 $ 0 1C H G C O l I N C B R D C l R , XW A I T C l J S R G E T I N
C M P 1 1 $ 0 0B E Q W A I T C lC M F ' 1 1 $ 4 2B E Q B A C K G DC M P 1 1 $ 4 5B E Q E D G EC M P U 4 3B E Q C H A R A CR T S
C H A R A C l D X U F A
F I l l C H I N C $ D 7 F F , XI N C $ D 8 F 9 , XI N C $ D 9 F 3 , XI N C $ D A E D , XD E X
D N E F I l l C HI N C C O L O RC l CB C C W A I T C l
; E O G E E N T R Y
j B A C K G E N T R Yj C H A N G E C O L O R; G E T K E Y
j S K E Y
j E K E Y
; C K E Y
; A N O T H E R K E Y
j C H A N G E A l l; O F C O L O Rj M E M O R Y
j C U R S O R C O L O R
; C O N T I N U E;j A P P E N D P R O G R A MJ T O T A C K O N S U B R O U T I N E P R O G R A M S, T O O T H E R P R O G R A M S,,T X T T A BV A R T A B
IA P P E N DA P P D O N
4 C E 7 C AA 5 2 C8 0 3 F C DA 5 2 B8 0 4 0 C BA 5 2 E8 5 2 C. 3 8A 5 2 DE 9 0 28 5 2 8B O 0 2C 6 2 CA 9 2 A A P O N8 D E 5 C AA 9 C B8 D E 6 C A2 0 4 1 C BO D 4 C 4 F 4 14 4 2 0 5 0 4 74 D 3 2 2 C 2 04 8 4 9 5 4 2 05 2 4 5 5 3 5 44 F 5 2 4 5 2 C2 0 4 1 O D 0 06 0A D 3 F C B A P P D O F8 5 2 C
= $ 2 B. . $ 2 D
J M P A P P D O N j M O D I F I A B l El D A T X T T A B + lS T A A P H Il D A T X T T A BS T A A F ' l Ol D A V A R T A B + le TA T X T T A B + lS E Cl D A V A R T A BS B C 1 1 $ 0 2S T A T X T T A BB C S A F ' O ND E C T X T T A B + 1l D A I I ( A PP D O FS T A A P P E N D j 1l DA I I) AF 'F 'D OFS T A A P P E N D + 2J S R M E S S A G, B Y T E $ O D , $ 4 C , $ 4 F , $ 4 1, B Y T E $ 4 4 , $ 2 0 , $ 5 0 , $ 4 7, B Y T E $ 4 D , $ 3 2 , $ 2 C , $ 2 0, B Y T E $ 4 8 , $ 4 9 , $ 5 4 , $ 2 0. B Y T E $ 5 2 , $ 4 5 , $ 5 3 , $ 5 4, B Y T E $ 4 F , $ 5 2 , $ 4 5 , $ 2 C, B Y T E $ 2 0 , $ 4 1 , $ O D , $ 0 0R T Sl D A A P H IS T A T X T T A B + l
J M P
No. 68 - January 1984 MICRO
closes a file similarly to the OUTPUT
routine. Abig difference is the transfor-
mation from screen code toASCIIcode.
Commodore does some very strange
things to the printer and screen when a
reverse character follows a quotation
mark. It is very difficult to get an exact
screen dump when this occurs. A
quotation mark is replaced by an
apostrophe on printed output, to allowreverse characters to be printed [ifyour
printer or printer/interface will handle
them). Examples of screen dumps are
shown in Figure 1. In this case the
printer used [NEC 8023/Tymac Con-
nection Interface) does not provide
reverse alphanumerics; a Commodore
1525 printer would have printed the
directory header with reverse characters.
Change Screen Colors
Aroutine is provided to change the
screen colors. This routine has three
entry points. RESTORE, B changes the
background color, RESTORE, E
changes the edge color, and RESTORE,
C changes the character color. Note
that all characters on the screen will be
changed, not just the characters follow-
ing the cursor. When the colors are
changed, their code number is in-
cremented byone, from 0 to IS, back to
0, etc.
Once anyone colorhas been changed,
you can continue to step through the
colors by repetitively pressing the same
key [no need to hit RESTOREagain). In
addition, no matter which one you
started with [B, E, or C], you can
change the others by pressing the cor-
responding key. Any other key will get
you out of the color change mode.
Append
To append a program [normally
consisting of subroutines or DATA
statements) to another, first load the
main program in the usual manner:
LOAD"PRG1",8. Then pressRESTORE, AThis raises the bottom of
the BASIC program workspace to the
end of the first program. The computer
than prompts you to load the second
program, e.g. LOAD"PRG2",8 and
press RESTORE,Aagain. This time the
bottom of the BASIC workspace is
moved back down to the previous loca-
tion. Your two programs are now one,
which you should SAVE with a new
name. You can continue to append more
programs using the same technique. One
wordof caution - make sure that the ap-
27
:1'I
I
·1
I
I: II
II
III
I
I
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 30/100
pended programs have higher line
numbers than the main programs since
they are not merged - only appended.
A general purpose message printer
routine is used above. To use this
subroutine in your machine language
routines, do a JSR to MESSAG followed
by your message in ASCII characters.
End the message table with a zero.
After the message is printed, controlwill return to the next byte following
the zero. In addition to normal text,
cursor controls, color changes, etc. can be
intermixed with text for special effects.
Entering the Program
The DOSPLUS routines currently
start at $C800 and extend through
$CBFF. Space for more routines is
available from $C807-C8FF and from
$CB60-CBBE. Additional extensions
can be assembled below $C800. The
DOS WEDGE occupies $CCOO-CFFF,so it is advantageous to load and
initialize the DOS WEDGE and
DOSPLUS at the same time.
There are several ways to get the
program into your Commodore 64. Ifyou have an Assembler, type in the
Assembly code as shown in Listing 1. A
compact BASIC loader is also provided;
see Listing 2. Checksums are used to
catch your typing errors, which will
terminate the program. Note the
change to line #1260 required if you donot intend to run the BASIC loader
with DOS 5.1 in memory. A thirdmethod is to send the author $10 fUS)
for a disk containing the programs
shown in Figure 1. [For foreign re-
quests, please provide sufficient return
postage). If you load and run the first
program DOSPL US, both the DOS-
WEDGE and the RESTORE routines
will be loaded and initiated. Then type
NEW and you're ready to go.
Seven new functions were added,
but the tables will allow a total of 32.
Some possible additional functions in-
clude variable listing, single step, trace,
autoline, hex-decimal converter, save
& swap screens [for animation), etc.
Don't hesitate to write if you have a
useful addition. Or better yet, write it
up for all MICRO readers.
You may contact the author:
Michael J . Keryan713 Locust Drive
Tallmadge, Ohio 44278
28
C D 2 FC 8 3 2C 8 3 4C 8 3 6C D 3 9C B 3 BC B 3 EC B 3 F
C 8 4 0
C B 4 1C 8 4 2C B 4 4C 8 4 5C B 4 7C 8 4 9
C B 4 BC B 4 DC B 4 FC B 5 1C B 5 3C B 5 6C B S 7C B 5 9C S S BC B 5 CC S S EC B 5 F
e 8 0 0C 8 0 3C 8 0 6
C 8 8 F
c s c oC S C 4C B C 8C B C CC B O O
C B 0 4C B 0 8C B O C
C B E OC B E 4C B E 8C B E CC B F CC D F 4C B F 8C B F C
A L I 4 0 C B8 5 2 BA 9 E 78 0 E 5 C AA 9 C A8 0 E 6 C A60F F
F F
6 88 5 F B688 5 F CA 2 0 0E 6 F B
0 0 0 2E 6 F CA 1 F BF O 0 620 0 2 F F1 89 0 F OA 5 F C4 8A 5 F B4 86 0
2 0 4 7 C 920 0 0 C C6 0
6 0
L O A A P L OS T A T X T T A B
A P O F F L O A * < A P P D O NS T A A P P E N O + lL O A I > A P P O O NS T A A P P E N O + 2R T S
A P H I , B Y T E $ F F
A P L O , B Y T E HF;j M E S S A G E P R I N T E Rj J S R M E S S A G - - F O L L O W W I T H A S C I Ij M E S S A 8 E - - E N D W I T H Z E R O.C H R O U T = $ F F D 2P O I N M S . . $ F B,,M E S S A G
P O I N M Sj S A V E P O I N T E R S; F O R R E T U R N
P L AS T AP L AS T AL O XI N C
B N EI N CL O AS E QJ S RC L CB C CL O AP H AL O AP H AR T S
P O I N M S + 11 $ 0 0P O I N M S j P A R S E M E S S A G E
H4P O I N M S + 1 j B U M P P O I N T E R( P O I N M S , X ) j 8 E T C H A RM S S G B K i E N O O N Z E R OC H R O U T j P R I N T I T
M S S G L P j C O N T I N U EP O I N M S + 1
P O I N M S
M S S G L P
M S S G B K
j
* = $ C 8 0 0I N I D O S • $ C C O O
if J A S I N T J S R I N I T N M j I N I T N M I U T I L SJ S R I N I O O S j IN I T D O S W E D G ER T S
,,* • $ C B B FR E T R N , B Y T E $ 6 0
i
* • $ c e C OT A B L . .
S f E 4 B 4 C DO A B O B F B FB F S F S F B FB F B F B F C 4B C B F S F S F
B F B F S F B FS F B F B F S FB F B F B F B F
*, B Y T E $ B F , $ E 4 , $ B 4 , $ C O, B Y T E $ D A , $ B O , $ B F , $ B F, B Y T E $ D F , $ B F , $ B F , $ B F, B Y T E $ B F , $ B F , $ B F , $ C 4. B Y T E $ B C , $ B F , $ B F , $ B F
. B Y T E $ B F , $ B F , $ B F , $ B F, B Y T E $ B F , $ B F , $ B F , $ B F
. B Y T E $ B F , $ B F , $ B F , $ B Fj
* = $ C B E OT A B H . . *
C B C A C A C A , B Y T E $ C B , $ C A , $ C A , $ C AC 9 C A C B C B . B Y T E $ C 9 , $ C A , $ C B , $ C BC B C B C B C B , B Y T E $ C B , $ C B , $ C B , $ C BC B C B C B C 9 , B Y T E $ C B , $ C B , $ C B , $ C 9C 9 C B C B C S , B Y T E $ C 9 , $ C B , $ C B , $ C BC B C B C B C B , B Y T E $ C B , $ C B , $ C B , $ C BC B C B C B C B . B Y T E $ C B , $ C B , $ C B , $ C BC B C 8 C B C B . B Y T E $ C B , $ C B , $ C B , $ C B
. E N D
MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 31/100
Listing 2
1 P R I N T " [ C L R J D O S P L U S L O A D E R " : P R I N T " W A I T - - L O A D I N G "1 0 D I H N ( I 0 1 : 1 = 02 0 R E A D A $ : 1 = 1 + 1 : C S a O3 0 U = L E F H ( A $ , 2 1 : G O S U S 1 0 0 ; I F Z < I l ' H E N S Y S 5 1 2 0 0 : E N D4 0 B Y = Z : K S = Z : X $ = H I D $ ( A $ , 3 , 4 ) ; e O S U B 1 0 0 : L C " ' Z5 0 X $ = M I D $ ( A $ , 3 , 2 ) ; G O S U B I 0 0 : K S = K S t Z : U = I 1 I D $ ( A $ , 5 , 2 ) : G O S U B 1 0 0 : K S = ~ ~ S + Z6 0 F O R J - I T 0 8 V : Ua H I D $ ( A $ , S r J f 2 , 2 ) : P R I N T " , I I ;7 0 G O S U E i 1 0 0 : N ( J ) = Z ; C S = C S + Z : N E X T J8 0 X $ = H I D $ ( A $ , 7 r 8 Y t 2 , 4 ' : G O S U B 1 0 0 : I F Z ( ) C S + K S T H E N P R I N T " E R R O R L I N E * 1 1 ; 1 :S T O P90 F O R J = I T O B Y : P O K E L C + J - I , N ( J ) : N E X T J ; P R I N T " * I I ; G O T D 2 0
1 0 0 :1 1 0 R E M H E X T O D E C I M A L1 2 0 R E M X $ I S f l E X N U M B E R T O B E C O N V E R T E D1 3 0 R E M Z I S D E C I M A L N U M B E R C O N V E R T E D
1 4 0 Z = O1 5 0 L = L E N ( X $ ) : F O R K = I T O L1 6 0 Y = A S C ( M I D $ ( X $ , K , I ' )1 9 0 Z = Z * 1 6 + Y - 4 8 + 7 * ( Y ) 5 7 )2 0 0 N E X T k : : R E T U R N
1 0 0 0 D A T A " 1 8 C 9 0 0 4 8 8 A 4 8 9 8 4 8 A 9 7 F 8 D O D D D A C O D D D 3 0 3 5 2 0 B C F 6 2 0 E I F F D 0 0 F 2 0 0 C 4 6 "1 0 1 0 D A T A " 1 8 C 9 1 8 1 S F D 2 0 A 3 F D 2 0 1 8 E 5 2 0 4 7 C 9 6 C 0 2 A O S 8 2 0 E 4 F F C 9 0 0 F O F 9 2 9 1 F O C 7 B "1 0 2 0 D A T A " 1 8 C 9 3 0 A A B D C O C B 8 D 3 E C 9 B D E O C B 8 D 3 F C 9 2 0 F F F F 7 8 6 8 4 8 A 8 4 C 7 2 F E A 9 0 F E 7 "1 0 3 0 D A T A " 1 8 C 9 4 8 0 0 8 D 1 8 0 3 A 9 C 9 8 D 1 9 0 3 A 9 0 C 8 D 2 0 D 0 8 D 2 1 D O A 9 0 0 8 D 8 6 0 2 A 9 7 1 0 A 7 4 "1 0 4 0 D A T A ~ 1 8 C 9 6 0 8 D 2 6 0 3 A 9 C 9 8 D 2 7 0 3 E A E A E A A 9 0 0 8 D B B C 9 6 0 4 8 A D B B C 9 C 9 0 4 D O O E O E1 0 5 0 D A T A " 1 8 C 9 7 8 3 D A 5 B A C 9 0 8 F 0 3 7 6 8 8 D B A C 9 4 8 8 A 4 8 9 8 4 8 A 9 7 E 2 0 C 3 F F 2 O C A C 9 0 E I B1 0 6 0 D A T A " 1 8 C 9 9 0 A 9 7 E 2 0 B A F F A 9 0 0 2 0 B D F F 2 0 C O F F B O O B A 2 7 E 2 0 C 9 F F A D B A C 9 2 0 0 E E 81 0 7 0 D A f A " 1 8 C 9 A 8 C A F I A 9 7 E 2 0 C 3 F F 2 0 C C F F 6 8 A 8 6 8 A A 6 8 4 C C A F I O D O O A 9 0 4 8 S B A O E C 21 0 8 0 D A T A " 1 8 C 9 C 0 8 D B B C 9 6 0 A 9 0 0 8 D B B C 9 6 0 A D 1 8 D 0 2 9 0 2 F 0 0 4 A 0 0 7 D 0 0 2 A 0 0 0 A 2 0 C 9 B1 0 9 0 D A T A " 1 8 C 9 D 8 0 4 6 0 2 0 C A C 9 A 9 7 D 2 0 B A F F A 9 0 0 2 0 B D F F 2 0 C O F F B 0 7 A A 2 7 D 2 0 C 9 0 E 6 51 1 0 0 D A f A " 1 8 C 9 F O F F A 9 0 0 8 5 F D A 9 0 4 8 5 F E 2 0 8 9 C A 2 0 7 E C A 2 0 9 7 C A A 2 1 9 2 0 E I F F F O O F 3 21 1 1 0 D A T A " 1 8 C A 0 8 5 0 2 0 7 5 C A 2 0 9 1 C A 2 0 8 D C A A O O O B 1 F D C 9 2 2 D 0 0 2 A 9 2 7 C 9 A 2 D 0 0 2 0 C B O1 1 2 0 D A T A " I B C A 2 0 A 9 A 7 8 D B A C 9 2 9 B O B D A F C A F 0 0 5 A 9 1 2 2 0 C A F I A D B A C 9 2 9 3 F O E B A O D F C1 1 3 0 D A T A " 1 8 C A J 8 C 9 2 C B A C 9 1 0 0 2 0 9 8 0 7 0 0 2 0 9 4 0 2 0 C A F I A D A F C A F O O S A 9 9 2 2 0 C A O C 0 31 1 4 0 D A T A " 1 8 C A 5 0 F I C 8 C 0 2 8 D O B E 2 0 A 5 C A 9 8 1 8 6 5 F D 8 5 F D 9 0 0 2 E 6 F E C A D 0 9 E 2 0 9 7 0 F E 9I I S O D A T A " 1 8 C A 6 8 C A 2 0 7 E C A 2 0 C C F F A 9 7 D 2 0 C 3 F F 6 0 A O I 0 2 0 8 D C A 8 8 D O F A 6 0 2 0 7 5 0 E 3 D1 1 6 0 D A T A " 1 8 C A 8 0 C A A 0 2 C 2 0 9 I C A 8 8 D O F A A 9 0 D D 0 0 6 A 9 2 0 D 0 0 2 A 9 2 E 2 0 C A F 1 6 0 2 0 0 D 1 E1 1 7 0 D A T A " 1 8 C A 9 8 7 5 C A 2 0 9 1 C A A 0 2 9 2 0 8 D C A 8 8 D O F A 2 0 8 D C A 2 0 9 1 C A 2 0 8 9 C A 6 0 0 0 0 D 8 B1 1 8 0 O A T A " 1 8 C A B O A 2 0 0 F 0 0 2 A 2 0 I F E 2 0 D 0 2 0 E 4 F F C 9 0 0 F O F 9 C 9 4 2 F O F O C 9 4 5 F O E 8 1 0 3 D1 1 9 0 D A T A 1 8 C A C 8 C 9 4 3 F O O l 6 0 A 2 F A F E F F D 7 F E F 9 D 8 F E F 3 U 9 F E E D D A C A D O F 1 E E 8 6 1 4 0 41 2 0 0 D A T A 1 8 C A E 0 0 2 1 8 9 0 D 5 4 C E 7 C A A 5 2 C 8 D 3 F C B A 5 2 B 8 D 4 0 C B A 5 2 E 8 S 2 C 3 8 A 5 2 D O C 9 C1 2 1 0 D A T A 1 8 C A F 8 E 9 0 2 8 5 2 B B 0 0 2 C 6 2 C A 9 2 A 8 D E S C A A 9 C B 8 D E 6 C A 2 0 4 1 C B O D 4 C 4 F O D A D1 2 2 0 D A T A 1 8 C B 1 0 4 1 4 4 2 0 5 0 4 7 4 D 3 2 2 C 2 0 4 8 4 9 5 4 2 0 5 2 4 5 5 3 S 4 4 F 5 2 4 5 2 C 2 0 4 1 0 D 0 6 B D1 2 3 0 D A T A 1 8 C 8 2 8 0 0 6 0 A D 3 F C B 8 5 2 C A D 4 0 C 8 8 5 2 B A 9 E 7 8 D E S C A A 9 C A 8 D E 6 C A 6 0 F F O F 1 61 2 4 0 D A T A 1 8 C B 4 0 F F 6 8 8 5 F B 6 8 8 5 F C A 2 0 0 E 6 F B D 0 0 2 E 6 F C A I F B F 0 0 6 2 0 D 2 F F 1 8 9 0 1 0 5 51 2 5 0 D A T A 0 8 C B 5 8 F O A 5 F C 4 8 A 5 F B 4 8 6 0 0 6 4 C "1260 D A T A 0 7 C 8 0 0 2 0 4 7 C 9 6 0 2 0 0 0 C C 0 3 4 B "1 2 7 0 D A T A 1 8 C B 8 F 6 0 8 F E 4 B 4 C D D A B O B F B F B F B F B F B F B F B F B F C 4 B C B F B F B F B F B F B F 1 3 6 1 "1 ~ 8 0 D A T A 1 8 C D D 7 B F B F B F B F B F B F B F B F B F C B C A C A C A C 9 C A C B C B C B C B C B C B C B C B C B 1 4 5 0 "1 2 9 0 D A T A l I C B E F C 9 C 9 C B C B C B C 8 C B C B C 8 C B C B C B C B C B C B C B C 8 0 F 4 2 "1 3 0 0 O A 1 A " O O "1 5 0 0 :1 5 1 0 R E M I F D O S W E D G E W I L L N O T B E R U N W I T H T H I S P R O G R A M , R E P L A C E L I N E 1 2 6 0
W I T H :1 5 2 0 R E M 1 2 6 0 D A T A " 0 4 C 8 0 0 2 0 4 7 C 9 6 0 0 2 5 C "
No. 68 . January 1984 MICRO 29
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 32/100
SANYO MONITOR SALE!!
• 80 Columns x 24 lines
• Green text display
• East to read- no eye strai n
• Up front brightness control• High resolution graphics
• Quick start- no preheating
• Regulated power supply
• Attractive metal cabinet
• UL and FCC approved
$7900
9" Data Monitor
• 15 Day Free Tria/- 90 Day Immediate Replacement Warranty
9" Screen -Green Text Display $ 79.00
12" Screen -Green Text Display (anti-reflective screen) $ 99.00
12" Screen -Amber Text Display (anti-reflective screen) $119.00
14" Screen -Color Mon itor (national brand) $249.00
Display Monitors From Sanyo
With the need for computing power growing every day, Sanyo hasstepped in to meet the demand with a whole new line of low cost, highquality data monitors. Designed for commercial and personal corn-puter use. All models come with an array of features, including up·front brightness and contrast controls. The capacity 5 x 7 dotcharacters as the input is 24 lines of characters with up to80 characters per line.
Equally important, all are built with Sanyo's commitmentto technological excellence. In the world of AudioiVideo, Sanyo issynonymous with reliability and performance. And Sanyo quality isreflected in our reputation. Unlike some suppliers, Sanyo ceslqns,
manufactures and tests virtually all the parts that go into our products,from cameras to stereos. That's an assurance not everybody cangive you!
.SANVOOfficial Video Products
of the LD s Angeles 7 9 8 4 Olympics
('~, • .J.,_,_..- __
• LOWEST PRICES· 15 DAY FREE TRIAL· 90 DAY FREEREPLACEMENT WARRANTY
• BEST SERVICE IN U.S.A.• ONE DAY EXPRESS MAIL. OVER 500 PROGRAMS· FREECATALOGS
PRDTECTD~~;~~~;;~~~~~=~=:C~;~~=~~iIlease add 6% tax. Add $20.00 lor CANADA, PUERTO RICO, HAWAII •
Irders. WE DO NOT EXPORT TO OTH ER COUNTRIES. •
• Enclose Cashiers Check, Money Order or Personal Check. Allow 14•
• days lor delivery, 2 to 7 days lor phone orders, 1 day express mail! •
ICanadaorders must be in U.S.dollars. Visa· MasterCard· C.O.D. I
.------------------------_.
E N T E R P R I Z E S (WE LOVE OUR CUSTOMERS)
BOX 550, BARRINGTON, ILLINOIS 60010
Phone 3121382·5244 to order
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 33/100
FANTASTICPRINTERSALE
a slow
a s
• 15 Day Free Trial - 1 8 0 Day Immediate Replacement Warranty
80 COLUMN THERMAL PRINTER - 60 CPSBi-directional, dot matrix, prints 8'/," letter size paper, full 80 columns, highresolution graphics, dot bit addressable, special symbols and true decenders!
(Centronics parallel interface)
80 COLUMN TRACTOR·FRICTION PRINTER - 80 CPSBi-directional, dot matrix, impact, prints single sheets, continuous feed paper,
adjustable columns, 40 to 132 characters! Roll paper adapter $32.95. (Serial or
Centronics parallel interface)
PREMIUM QUALITY 10" CARRIAGE T/F PRINTER - 120 CPSBi-directional, impact, 9 x 9 dot matrix with double strike for 18 x 18 dot matrix.
High resolution bit image (120 x 144 dot matrix) underlining back spacing, left and
right margin settings, true lower decenders, with super and sub scripts. Prints
standard, italic, block graphics, special characters, plus 24 of user definable
characters and much more!! Prints single sheets, continuous feed and roll paper!
(Centronics parallel interface)
PREMIUM QUALITY 15%" CARRIAGE PRINTER - 120 CPSHas all the features of the Premium Quality 10" Carriage TIF Printer above plus a
15'12"carriage and more powerful electronic components to handle large business
forms! ( Centronics parallel interface)
HIGH SPEED PREMIUM QUALITY T/F
10" PRINTER - 160 CPSSave printing time with these plus features: 160 CPS speed, 100% duty cycle, 8K
buffer diverse character fonts special symbols and true decenders, vertical and
horizontal tabs. This is Red Hot Efficiency!!! (Serial or Centronics parallel interface)
HIGH SPEED PREMIUM QUALITY
T/F 15%" PRINTER - 160 CPS
Has all the features of the 10" Carriage high speed printer plus a 15%" carriage andmore powerful electronics to handle larger business forms! (Serial or Centronics
parallel interface)
PARALLEL PRINTER INTERFACES: (IN STOCK)• For VIC-20 and COMMODORE 64 $49.00
• For all APPLE COMPUTERS $69.00
• For ATARI 400 and 800 COMPUTERS $79.00
NOTE: Other printer interfaces are available at computer stores! •
LIST
$199
SALE
$149
$399 $209
$499 $289
$599 $379
$699 $499
$799 $599
•E DO NOT EXPORT TO OTHER COUNTRIES EXCEPT
CANADA.
Enclose Cashiers Check, Money Order or Personal Check. Allow14 days for delivery, 2 to 7 days lor phone orders, 1 day expressmart : Canada orders must be in U.S. dollars. We accept Visa
and MasterCard We ship C.O.D.
PROTECTOE N T E R P R I Z E S ,WE LOVe OUR CUSTOMERS)
BOX 550, BARRINGTON, ILLINOIS 60010Phone 3121382·5244 to order
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 34/100
FLOPPY DIS KS SALE *$1.19 ea.Economy Mode l o r Cad illac Quality
LORA :E~~~u~~S~tlWe have the low est prices! L O R A C E I/ li ft ED P E RSO NAL_ C OM PU TE R D IS K
*ECONOMY DISKSGood quality 51/4" single sided single density with hub rings.
Bulk Pac 1000ty. $1.1gea.
10 Oty. 1.39 ea.
Total Price
Total Price
$119.00
13.90
CADILLAC QUALITY• Each disk certified • Free replacement lifetime warranty • Automatic dust remover
For those who want cadillac quality we have the Loran Floppy Disk. Used b i~ij~ls because they can relyon Loran Disks to store important data and programs without fe~r.9Ji k is 100% certified (anexclusive process) plus each disk carries an exclusive.~.R~~ifl ARRANTY. With Lorandisks you can have the peace of mind withfrustrati ih()urs spent in programdevelopment.
100% CERTIFICATIOSome floppy disk manufact .certified. Each Loran disk islifetime!
FREE REPLACEMENT LWe are so sure of Loran Disksty materials or workmanship f
AUTOMATIC DUST REMOJust like a record needle, disk ddisks the Loran smooth surface fgrind your disk drive head like(dust & dirt) are being constantlyprobability rate of any other disk in
Loran is
Just to prove it even furtheList $4.99 ea. INTROD
other floppysurface willdisk-killers
the highestof the disk.
• 60% of all drive downtime is directly related to poorly maintained drives.
• Drives should be cleaned each week regardless of use.• Drives are sensitive to smoke, dust and all micro particles.
• Systematic operator performed maintenance is the best way of ensuring error free use of your computersystem.
The Cheetah disk drive cleaner can be used with single or double sided 5'/." disk drives. The Cheetah is an
easy to use fast method of maintaining efficient floppy diskette drive operation.
The Cheetah cleaner comes with 2 disks and is packed in a protective plastic folder to prevent contamination.
List $29.951 Sale $19.95
rA-;~;;-;;;r-:;;n;'--;:;:I~-:';-;=:::::--;;;I:';-;:;';;iIplease add 6% tax. Add $20.00 lor CANADA, PUERTO RICO, HAWAII IIorders. WE 00 NOT EXPORTTO OTHER COUNTRIES. I
IEnclose Cashiers Check. Money Order or Personal Check. Allow 14IIays for delivery. 2 to 7 days for phone orders, 1 day express mail! IICanada orders must be In U.S. dollars. Visa· MasterCard· C.O.D. I
.------------------------_.
PROTECTOENTER PRIZES ,"'"0"Ou"CU510 ..,",,
BOX 550, BARRINGTON, ILLINOIS 60010Phon. 3121382·5244 to ord.r
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 35/100
Sample Commodore Graphic Character Set for the FX80.
,t ij .~"u
' 1 . . • \ "I r ' U ' i i l ! [, ; n iil!~ Sf: [ a m i n 1 " 1 i i l i U C :d-iiji ;:~ o r :, . . . iiiiIi g ; ; ; . . 1 1 10 • . . . . . ~ ' f f
" " S
' ""~it d" > < (It ,Iii. i . . . . . . . :~ : i ' 1 ' 1 '~ lU I
I I l I i I il l r , p e I~:~ r';W
,~"'\ :~!i ;~:i~.L i . . . . . J . . - w · o ; i 1 1 • • &1
",
~ ill;U U: : ; : ; : I V i ft - ii IL , I t I I ! ~ i i i i : ! '
liiii i I f I I l 'I n i l l ! I l l o i ~ i l I i i ~m ti u
~t ~ii, :.:.:. :.:.:. K ' ". . . .
f' "D . T '1 m W" 0 ' m m ~J 1'1 ,,jj III III H - :
., iUlil aI~I II It
i i . l l i i r i l l iUij1 1 m : ~ . ! jilll Ul
IIlli ill III . . . . • n u . . mill , l U i . . jjj
l' r < i . . "p L " ., ,i" f" lu m F'j
G ~' 1 1 m
....~ ,nJ i" iii I nn n IL' ",
! I l l ~'ii J i i -' ' ' i t o , Hilil b", I f I I . i . L i U i l i i i i i u , ill ! Jf J n··~ u• • . ; iU - .: .1 « r
"1 • 'ijji', '0 '1 " a ~ ,JI . , i D r . J jJ jp " ~ : : ~ - r-t
m i ,"'!"
nJ i U i f i b ,' rY " • :; : 1 '1 : I l l i._.i u . . ' 1 . . b" l . . . . i_~ . l
~ i l iU l .:.:-: :::;:: ~r i H " iiiII..
"ii ~ H mII!m
a i r J i 1 I i ! i i :~ ~: : : : iIli ijljij ,B O N 9 ::I f! u . ; ; ~,jjjii'"
: . : . : . , iII i . . ,"
r "D . ·r' ,~ B lt i ~'!l11 ~!lll
,w U ill .II m1'1
ii,iTl . .. i;U!i
: n I ! l m ij I m l l ill : 1 1 j l !1 m ~.i ~ mI l l O iii . . .. i I I I I I i~
Normal Characters Reversed Characters
Generating Characters for theEPSON F X B O on a Commodore 64
by Ro be rt M . Trip p
The evolution of plain paper printers has been toward less
expensive units that domore. Those who have entered the
microcomputer revolution lately may not realize that it
was only five or six years ago that a used Teletype (tm) at
over $500 was a hot item. And all it could do was produce
numbers, punctuation and upper case alphabetics - at 10
character per second with a lot of noise and it was not very
transportable! Printers have come a long way since then
and are getting better all the time, One of the most useful
features to come along recently is the ability for the user to
define his own character set. Until this capability was
added, the user had three choices if he needed characters
that the printer did not support:
1, Find some way to live within the constraints of
the supported character set, such as using [CLIt]
to stand for the inverse heart shape that
Commodore computers use as the displayable
representation of the clear screen function,
2. Print the character information in a graphics
mode,
3. Purchase a custom printer with the appropriate
character set - normally limiting the user to the
printer manufactured by the microcomputer
company.
Eachalternatives has amajor drawback. The first requires
that special programs bewritten to dothe conversion from
the microcomputer display character code to thealphanumeric string that will represent it, and results in a
printout that does not represent the microcomputer
display very well. The second requires a program to con-
vert the character oriented information into a graphic
form, and due to the fact that information has to be
transmitted for every bit on the line, is quite slow. The
third is an added expense and may result in a printer with
limited capabilities and few, if any, of the more
sophisticated printer features.
Avery neat solution has been provided recently by the
general purpose printer manufacturers, Many now include
the ability for the user to define some or all of the
character set in the printer's RAM,While the number ofcharacters that may be so defined, the matrix for The FX80manual has a very good discussion of the details
generating the characters, and the exact protocol for defin- ofgenerating user defineable characters. This presentationNo, 68 . January 1984 MICRO 33
Basic Printing Concepts ing the characters varies from printer to printer, the basic
concepts are the same, MICRO, as amicrocomputer user,
probably has more need for the user defineable characters
than the average user since we deal so often with printed
material and we deal with such a variety of micro-
computers, We investigated the available printers and
selected the Epson FX80 since it has allows all 256
characters to be user defined. Many of the other printers
with UOCs currently available only permit a portion of
the character set to be redefined and some do not support
copying the existing ROM set into RAM to form the basis
for the UOC, These two factors may not be significant to
you, and other printers may be better for your particular
requirements, Most of the material in this article will be
applicable to printers in general.
Custom Character Sets
The GRAPIDCS issue of MICRO [#66, November 1983)
discussed character oriented graphic characters and
provided methods for generating character sets on the
Commodore 64, VIC 20 and Atari microcomputers. The
examples used in the articles were, for the most part,
generated on our FX80. Afew of the possible uses for the
UOC include:
1, Graphic characters that replicate those of the
micro's display,
2, Custom graphic characters such as those used for
line drawings, macro characters, special symbols,
and so forth.
3, Alphabets for foreign languages, computer
readable codes such as bar codes, optical scanner
characters, special fonts such as the magnetic ink
characters found on checks, etc.
4. Character segments that may be used to form
'super sized' printouts for displays such as
calendars, printed material for the visually
handicap ed, an so on.
Generation of User Defineable Characters
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 36/100
1 R E M " F X P C 6 G E N E R A T O R "1 0 P R I N T " ~ G E N E R A T I N G C H A R A C T E R S "1 5 C L R : 6 0 S U B 5 0 0 0 :
R E M G E N E R A T E C H A R A C T E R S2 0 G O S U S 5 1 0 0 : R E M D E F I N E E Q U A T E S3 0 G O S U S 4 0 0 0 : R E M S E T U P S C R E E N4 0 G O S U B 1 0 0 0 : 6 0 T O 2 0 0 0 : R E M E D I T
1 0 0 0 R E M F X C H A R A C T E R D I S P L A Y
1 0 1 0 B Y = F X + 1 3 * C H : P R I N T " S " ;1 0 2 0 F O R J = 7 T O 0 S T E P ~ 1 : K = 2 A J1 0 3 0 F O R L = l T O 1 1 S T E P 2 : I = B Y + L1 0 4 0 I F P E E K ( I ) A N D K T H E N 1 1 0 01 0 5 0 I F P E E K ( I - l ) A N D K T H E N 1 0 8 01 0 6 0 I F P E E K ( I + ! ) A N D K T H E N 1 1 1 01 0 7 0 P R I N T " . " ; : 6 0 T O 1 2 0 01 0 8 0 I F P E E K ( I + l ) A N D K T H E N 1 1 2 01 0 9 0 P R I N T C H R $ ( L H ) ; : G O T O 1 2 0 01 1 0 0 P R I N T C H R $ ( C U j : G O T O 1 2 0 01 1 1 0 P R I N T C H R $ ( R H ) ; : 6 0 T O 1 2 0 01 1 2 0 P R I N T C H R $ ( L R ) j1 2 0 0 N E X T1 2 1 0 P R I N T : N E X T
1 2 2 0 R E T U R N1 4 0 0 R E M O U T P U T F X C H A R A C T E R S T O M E M O R Y1 4 1 0 B Y = F X + l 3 f C H1 4 2 0 F O R L = O T O 1 2 : P O K E ( B Y + L ) , O : N E X T1 4 3 0 F O R L = l T O 1 1 S T E P 2 : I = B Y + L : A = 0 : B = 0 :
X X = I N T ( L / 2 )
1 4 4 0 F O R J = 7 T O 0 S T E P - 1 : K = 2 AJ1 4 5 0 X = P E E K ( O G + X X )1 4 6 0 I F X = C X T H E N A = A O R K1470 I F X = R X O R X = D X T H E N B = B O R K1 4 8 0 X X = X X + R W : N E X T1 4 9 0 P O K E ( ! ) , A : P O K E ( I + 1 ) , B : N E X T1 5 0 0 R E T U R N2 0 0 0 R E M E D I T
2 0 1 0 H = 0 : V = 0 : C P = 8 72 0 1 5 P R I N T " S ) ) ) ) ) ) ) ) C H A R l " j C H j " l I § ' _ " j2 0 2 0 P O = 0 G + v * R w + i E Y ; P E E K ( P 0 )2 0 2 2 Y = P E E K ( P O + 1 ) : B Y = F X + C H * 1 1 + V2 0 2 5 P O K E P O , C P2 0 3 0 G E T H: I F 1 $ = ' " ' T H E N 2 0 3 02 0 4 0 I F T $ = " £ " T H E N C P = 2 2 5 : 6 0 T O 2 0 2 52 0 5 0 I F T $ = " A " T H E N C P = 8 7 : G O T O 2 0 2 52 0 6 0 I F T $ = C L $ T H E N H = H + 1 : 6 0 T O 2 5 0 02 0 7 0 I F T $ = C R $ T H E N H = H - l : G O T O 2 5 0 02 0 8 0 I F T $ = C D $ T H E N V = V + l : G O T O 2 5 0 02 1 0 0 I F T $ = C U $ T H E N V = V - l : G O T O 2 5 0 02 1 1 0 I F T $ = R T $ T H E N H = O : V = V + l : G O T O 2 5 3 0
2 1 1 5 I F T $ = F l $ T H E N P O K E P O , X : G O T O 7 0 0 02 1 2 0 I F T $ = F 2 $ T H E N P O K E P O , X : G O T O 7 1 0 02 1 2 5 I F T $ = F 3 $ T H E N P O K E P O , X : G O T O 7 4 0 02 1 3 0 I F T $ = F 4 $ T H E N P O K E P O , X : 6 0 T O 7 3 0 02 1 3 5 I F T $ = F S $ T H E N P O K E P O , X : G O T O 6 2 0 02 1 4 0 I F T $ = F 6 $ T H E N P O K E P O , X : G O T O 6 0 0 02 1 4 5 I F T $ = F 7 $ T H E N P O K E P O , X : G O T O 2 6 0 02 1 5 0 I F T $ = H M $ T H E N P O K E P O , X : 6 0 T O 2 0 1 02 1 5 5 I F T$="+" T H E N 2 2 0 02 1 6 0 I F T $ = " - " T H E N 2 3 0 02 1 6 5 I F T $ ( > C S $ T H E N 2 0 3 0
2 1 7 0 F O R 1 = 0 T O 1 22 1 7 5 P O K E F X + 1 3 * C H + I , 0 : N E X T2 1 8 0 G O S U B 1 0 0 0 : G O T O 2 0 1 02 2 0 0 R E M + S E R V I C E2 2 0 5 I F C P = 2 2 5 T H E N 2 4 0 02 2 1 0 I F x = P D O R X = C X O R X = B X T H E N 2 2 8 02 2 2 0 I F X = L X O R X = D X T H E N 2 2 9 02 2 4 0 X = C X
2 2 6 0 I F Y = L X T H E N Y = B X : G O T O 2 2 9 02 2 7 0 I F Y = D X T H E N Y = R X : G O T O 2 2 9 02 2 7 5 G O T O 2 2 9 02 2 8 0 X = C X2 2 9 0 H = H + l : G O T O 2 5 0 02 3 0 0 R E M - S E R V I C E2 3 1 0 I F X = P D O R X = C X O R X = B X T H E N 2 3 5 02 3 2 0 I F X = L X T H E N 2 2 9 02 3 3 0 I F X = D X T H E N X = L X : G O T O 2 2 6 02 3 4 0 X = B X : G O T O 2 2 6 02 3 5 0 X = B X : G O T O 2 2 9 02 4 0 0 I F X = P D O R X = B X T H E N X = R X : G O T O 2 4 1 02 4 0 2 I F X = C X O R X = R X T H E N X = R X : G O T O 2 4 1 02 4 0 4 I F Y = P D O R Y = B X T H E N Y = L X2 4 0 6 I F Y = C X O R Y = L X T H E N Y = L X2 4 0 8 X = D X : G O T O 2 2 9 02 4 1 0 I F Y = L X O R Y = R X T H E N Y = D X2 4 1 5 I F Y = P D O R Y = B X T H E N Y = L X : G O T O 2 2 9 02 4 2 0 I F Y = C X O R Y = L X T H E N Y = L X : G O T O 2 2 9 02 4 5 0 I F Y = P D O R Y = B X T H E N Y = L X : G O T O 2 2 9 02 4 5 5 I F Y = L X O R Y = R X T H E N Y = D X2 4 9 9 G O T O 2 2 9 02 5 0 0 I F H ( O T H E N H = 1 0 : V = V - l2 5 1 0 I F H ) 5 T H E N H = O : V = V + l2 5 2 0 I F V < O T H E N V = 52 5 3 0 I F V > 7 T H E N V = O O2 5 4 0 P O K E P O , X : P O K E ( P O + 1 ) , Y
2 5 5 0 G OT O
2 0 2 02 6 0 0 R E M R E V E R S E - A S B E S T Y O U C A N !
2 6 1 0 X X = O G2 6 2 0 F O R 1 = 0 T O 72 6 3 0 F O R J = O T O S : X J = X X + J2 6 4 0 A = P E E K ( X J ) : I F A = P D T H E N A = 8 X2 6 5 0 I F A = B X T H E N A = C X : G O T O 2 7 0 02 6 6 0 I F A = C X O R A = D X T H E N A = B X : G O T O 2 7 0 02 6 7 0 I F A = R X T H E N 2 7 2 02 6 7 5 I F P R = 8 X T H E N A = C X : G O T O 2 7 0 02 6 8 0 I F P E E K ( X J + l ) = R X T H E N A = R X :
G O T O 2 7 0 02 6 9 0 A = B X2 7 0 0 P R = A : P O K E ( X J ) , A : N E X T
2 7 1 0 P R = O : X X = X X + R W : N E X T : G O T O 2 0 1 02 7 2 0 I F P R = D X O R P R = R X T H E N A = L X :G O T O 2 7 0 0
2 7 3 0 A = B X : G O T O 2 7 0 02 8 0 0 I F P R = D X O R P R = R X T H E N A = L X :
G O T O 2 7 0 03 0 0 0 P R I N T " S " j Q Q $ j L L $ j " ] " j : I N P U T C H3 0 1 0 C H = C H A N D 2 5 5 -3 0 2 0 P R I N T " S " j Q Q $ ; L L $ j S 9 $3 0 3 0 R E T U R N -4 0 0 0 P R I N T " ~ " j Q Q ' i
" + O N I - O F F I £ H A L F I A F U L L "
3 4 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 37/100
4 0 1 04 0 2 04 0 3 04 0 4 04 0 5 04 0 6 0
4 0 7 04 0 8 0
5 0 0 05 0 1 05 0 2 05 0 3 05 0 4 05 0 4 55 0 5 05 0 6 05 0 6 55 0 7 05 0 8 05 0 9 0
5 0 9 55 1 0 05 1 1 05 1 2 05 1 3 05 1 4 05 1 5 05 1 6 05 1 6 55 1 7 05 1 7 55 1 8 05 1 8 55 1 9 05 1 9 5
5 1 9 65 1 9 75 1 9 86 0 0 06 0 1 06 0 2 06 0 2 56 0 3 06 0 4 06 0 5 06 0 6 06 0 7 06 0 8 06 0 9 0
6 1 0 06 1 1 06 1 2 06 1 2 56 1 3 06 1 4 06 2 0 06 2 1 06 2 2 06 2 2 56 2 3 0
P R I N T " Q F l R E A D C H A R I "P R I N T " F 2 W R I T E C H A R I "P R I N T " F 3 R E A D N E X T "P R I N T " F 4 W R I T E C U R R E N T / R E A D N E X T "P R I N T " F 5 D I S K L O A D "P R I N T " F 6 D I S K S A V E "
P R I N T " F 7 R E V E R S E C H A R A C T E R "R E T U R N
P R I N T C H R $ ( 1 4 2 )P O K E 5 2 , 4 8 : P O K E 5 6 , 4 8P O K E 5 6 3 3 4 , P E E K ( 5 6 3 3 4 ) A N D 2 5 4P O K E l , P E E K ( 1 ) A N D 2 5 1F O R 1 = 1 ) T O 2 0 4 7P O K E 1 + - 1 2 2 8 8 , P E E K ( I + 5 3 2 4 8 ) : N E X TX X = 1 2 2 8 B + 9 1 * 8F O R 1 = 0 T O 3 9
R E A D A : P O K E ( x X + I ) , A : N E X TP O K E l , P E E K ( l l O R 4P O K E 5 6 3 3 4 , P E E K ( 5 6 3 3 4 ) O R 1
P O K E 5 3 2 7 2 , P E E K ( 5 3 2 7 2 ) A N D 2 4 0 . O R 1 2R E T U R NP O K E 6 5 0 , 1 2 8 : R T $ = C H R $ ( 1 3 )O G = 1 0 2 4 : R W = 4 0 : F X = 2 5 6 J 5 6
P O K E 5 3 2 8 1 , l : P O K E 5 3 2 8 0 , 2P D = A S C ( " . " ) : P R I N T " u l " jB L = 1 2 3 : C L = 1 2 4 : L H = 1 2 5 : L R = 1 2 6 : R H = 1 2 7B X = 9 ) : C X = 9 2 : L X = 9 3 : D X = 9 4 : R X = 9 5C H = I ) : F 1 $ = " i " : F 2 $ = " ~ " : F 3 $ = " ~ "F 4 $ = " 1 . : " : F 5 $ = " II" : F 6 $ = " ~ " : F 7 $ = " II"C L $ = " ] " : C R $ = " II": C U $ = " : : "C D $ = " if" : H M $ = u S " : C S $ = u u "Z U = R T $ + " : : ] ] ] f ] ] ] ] ] ] ] ] ] ] "Z S $ = " - - - - - - - - - - -
Z R $ = " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "E L $ = Z L $ + Z S $ + Z R $ : E U $ = C U $ + E L $
Q Q $ = " Q Q Q Q Q Q Q Q Q Q "L L $ = " ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] "
R E T U R NR E M S A V E T O D I S KP R I N T " S Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q " j
B $ = " " : P R I N T E L $ j : I N P U T " F I L E " ; B $I F B $ = " " T H E N P R I N T C U $ ; : G O T O 6 1 6 0C $ = " @ O : " + 8 $ + " , S , W "
O P E N 3 , 8 , 8 , C $
P R I N T E U $ ; : I N P U T " F R O M C H A R I " ; F C XP R I N T E U $ ; : I N P U T " T O C H A R I " ; T C XI F T C i . < F C i . T H E N 6 0 5 0P R I N T I 3 , F C i . ; R T $ j T C i . ; R T $ jF O R I = F C X T O T C X
P R I N T * 3 , 1 3 9 ; R T $ ; : R E M A T T R I B U T EI I = F X + l J 1 3F O R J = I I + 1 T O 1 1 + 1 1P R I N T l 3 , P E E K ( J ) ; R U j : N E X T JN E X T I : C L O S E 3P R I N T E U $ j B $ ; " S A V E D " ; : G O T O 2 0 1 0R E M L O A D F R O M D I S KP R I N T " S Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q " ;
B $ = " " : P R I N T E L $ ; : I N P U T " F I L E " j B $I F B $ = " " T H E N P R I N T C U $ ; : G O T O 6 3 2 0C $ = " @ O : " + B $ + " , S , R "
No. 68 - January 1984 MICRO
6 2 4 0 O P E N 3 , B , B , C $6 2 5 0 I N P U T I 3 , F C X , T C X6 2 6 0 F O R I = F C X T O T C X
6 2 7 0 I I = F X + I J 1 3 : I N P U T I 3 , C X : P O K E 1 1 , 1 )6 2 8 0 F O R J = l T O 1 1
6 2 8 5 I N P U U 3 , C % : P O K E ( I I + J ) , C i . : N E X T J
6 2 9 0 P O K E ( I I + 1 2 ) , O : N E X T I
6 2 9 5 C L O S E 3 : G O T O 2 0 1 0
6 3 0 0 P R I N T " : : " ; E L $ ; B $ ; " L O A D E D " ; : G O T O 2 0 1 C6 6 0 0 P R I N T R U j " : : ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] " ;
6 6 0 2 P R I N T " " ;
6 6 0 4 P R I N T " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 " ;6 6 1 1 ) R E T U R N
7 0 0 0 R E M R E A D S P E C I F I E D C H A R A C T E R7 0 1 0 P R I N T H M $ j : G O S U B 7 2 0 07 0 2 0 I F C C X < 2 5 6 T H E N C H = C C X7 0 3 0 C H = C C X : G O S U B 1 0 0 0 : G O T O 2 0 1 07 1 0 0 R E M W R I T E S P E C I F I E D C H A R A C T E R7 1 1 0 P R I N T H M $ ; C D $ ; : G O S U B 7 2 0 0
7 1 2 0 I F C C % < 2 5 6 T H E N C H = C C X7 1 3 0 G O S U B 1 4 0 0 : G O T O 2 0 1 0
7 2 0 0 P R I N T Q Q $ j " ~ " ;7 2 1 0 P R I N T R T $ ; "UllJJJ.lU1J.ElL" ;7 2 2 0 P R I N T C H ; " I I 1 1 1 1 1 1 1 1 1 1 1 1 1 1 " ;7 2 3 0 C C X = C H : I N P U T C C X7 2 3 5 I F C C X < O O R C C X ) 2 5 5 T H E N C C X = 2 5 67 2 4 0 R E T U R N7 3 0 0 R E M W R I T E C U R E N T / R E A D N E X T7 3 1 0 G O S U B 1 4 0 07 4 0 0 R E M R E A D N E X T7 4 1 0 C H = ( ( C H + l l A N D 2 5 5 )
7 4 2 0 G O S U B 1 0 0 0 : G O T O 2 0 1 0
9 0 0 0 D A T A 0 , 0 , 0 , 0 , 0 , 0 , 0 , 09 0 1 0 D A T A 0 , 6 0 , 1 2 6 , 1 2 6 , 1 2 6 , 1 2 6 , 6 0 , 09 0 2 0 D A f A 0 , 1 9 2 , 2 2 4 , 2 2 4 , 2 2 4 , 2 2 4 , 1 9 2 , 0
9 0 3 0 D A T A 0 , 1 9 5 , 2 3 1 , 2 3 1 , 2 3 1 , 2 3 1 , 1 9 5 , 09 0 4 0 D A T A 0 , 3 , 7 , 7 , 7 , 7 , 3 , 0
is designed to provide you enough information to under-
stand the operation of the FX80without the manual, and,
to provided actual programs that make the whole process
easier. The FX80 allows the user to define any number of
characters, up to 256 characters in the standard RAMarea,
more with additional RAM. First consider each character
in the FX80 tobedefined in amatrix that is eight dots high
by six dots wide. This is similar to the character definition
on the various microcomputers, although many of them
are defined as eight by eight. The capital letter Awould be
defined as:
•• •• ••••••• •• •• •The alphanumerics and punctuation will normally be a
five by seven character within the six by eight matrix,
providing at least one blank column and one blank row
between individual characters. Simple enough. But, the
FX80 people decided to get even better looking characters
35
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 38/100
by allowing dots to beplaced half way between the six col-
umns. This means that there are not six but eleven poss-
ible horizontal positions for dots. The capital letter A
could be defined as:
••• •• ••••••• •• •• •
Note that the dots in the top half of the letter A overlap
vertically. The dots on the top line and third line are offset
one-half space from the dots on the second and fourth
through seventh lines. This extra resolution in the
horizontal direction, eleven positions in the normal space
of six, provides very nice looking character, but does
severely complicate the character generation process.
There is an important restriction to be aware of. The dots
must not overlap. If there is a dot on one of the eleven
positions, then there may not be a dot on the next
position.
The FX80 manual discusses how to define your
character on graph paper, and then to manually convert
each of the eleven columns into an 8-bit byte. The top
most row is considered to have a value of 128 decimal or
80 hex. The next row is 64 decimal, 40 hex, and so forth.
The value of each dot that is to beprinted in any column is
summed with all other dot values in the column to pro-
duce the column value. There is one 8-bit value for each
column, and eleven columns. In addition to these eleven
bytes of information to define each character, you must
S O PH IS TIC AT ED T EL E-C O MM U N IC AT IO N IS H ER E
THE COMMUNICATORfor 4.0 Commodore Computers
JIM STRASMA'S REVIEW:
"THE BEST TERMINAL PACKAGE I'VE SEEN YET"
By April 1 (maybe sooner) It Will Be Even Better
SPEEDSUP TO 9600 BAUDXON-XOFF
TRUE CTAL KEY (we do our own keyboard scan)
THE HARDWARE- A printed circu~ board; easily installed in the CBM. It usesno CBM connectors; gives a serial pon wM lrue RS232Cstandard.
THE SOFTWARE -Emulates the ADDS Regent 100, ADM 31 andlor the
TeleVideo950.1Or choosethe VT100model for usewith DECand VAXcomputers.
Runs coresident with BASIC programs; lets BASICprograms and program on host computer communicate to develop real-ly sophisticated communication and control capabilities.
The prCJgram is on ROM at either address; no disk loadingrequined.Usesonly 512bytesof RAM;will relocate itself around any othe rmachine language program at top of memory.
Wil l upload and download and run BASIC programs. With BASICprogramwil uplOadand downloadstandard data fil.... 100page manualgives program listing for BASICprograms.
Excellent text editor designed to work with THE COMMUNICATOR
THE COMMUNICATOR $200
T ex t E ::d ito r $40
1200 baud modemsbeginning at low, low $385, and evenless when purchasedwith THE COMMUNICATOR
A MPU FY, IN C.2325 Macbride,lowa Clty,lowa 52240 319-337-83781 trademarks Adds Regent, Inc., Lear Liegler, Inc., Te!evideo Sy5tems, Inc.
36
provide an attribute byte. The attribute byte determines if
the character is to be shifted down one dot position to pro-
vide a lower case descender, which column the character
starts in and which column it ends in. This is provided to
permit proportional spacing. In this article, we assume
that all characters are full width and print in the upper
eight dot positions.
If you sit down and start plotting out characters on
graph paper, then assigning each dot its value, summing
the individual dot values, and so forth, that it is a
somewhat tedious, repetitive job. The type of job that
computers are supposed to be good at! So, why not have
the computer do the work! The FX80 GENERATOR is
given in Listing 1. It is based on the interactive Program-
mable Character Generator by Loren Wright that appeared
in the GRAPHICS issue. Several important additions have
been made byme. First, the program automatically defines
a few new characters for use on the Commodore 64. The
FX80 can printed dots between the main columns of each
character; the Commodore can not. To make a realistic
display of the character being generated, three new
characters are defined. They are the left half of a dot, the
right half of a dot, and the left and right halves joined
'back-to-back'. This permits a dot to be generated that
appears to be half way between the normal columns of the
Commodore display. Other enhancements include Save to
Disk, Loadfrom Disk, and Reverse Character.
The operation of the program is quite straight-forward.
After the three special half dots are generated, the display
is initialized. A character is generated in the upper left
corner of the display. The + key is used to write a dot; the- key to erase a dot. the up arrow to select the main
columns, and, the British pound sign to select the dots on
the intermediate columns. The HOME, CLR and the
cursor controls can be used for their normal functions.
Function Keys 1 through 7 each have a specific functionassociated with them. These functions are listed on the
display.
Fl READ CHAR # converts eleven bytes of data in
memory accessable by the character number into a dot
display in the upper left corner.
F2 WRITE CHAR # converts the dot pattern in the
working space into eleven bytes of data in memory
accessable by the character F3 READ NEXT reads
the next character without requiring a number to be
specified.
F4 WRITE CURRENTlREAD NEXT combines a
write with a read to make entering of a number of
consecutive characters more automatic.
F4 DISK LOAD loads a file specified by name from
the disk to make it available for editing.
F6 DISK SAVE saves the character information that
is in memory on the disk.
F7 REVERSECHARACTER changes the dots on the
main columns to blanks and the blanks to dots. Note that
this will only work well with patterns that have no dots
between the main columns. This is because the while the
FX80 can print half spaces, it can not print half dots.
Think about it. It is not as simple as it seems.
Program Description
MICRO
The subroutine at 5000 copies the standard ROM character
set into RAM. Five new characters are defined by reading
the DATA statements at 9000 and poking them into the
character RAM. These five characters are a blank, a solid
dot, the left half of a dot, the left and right halves of a dot
joined 'back-to-back', and the right half of a dot. They are
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 39/100
used to provided the intermediate dots for the even col-
umns in the working display. The Character Dot-Data
BaseAddress at 53272 is set to point at the RAM character
set.
The subroutine at 5100 defines a number of variables
and strings.
Subroutine 4000 displays the basic editing screen.
Subroutine 1000 examines the data in memory for a
specified FX80 character. Each character is represented by
13 consecutive memory locations. To make the testing
easier, the first and last location are always zero. The other
eleven locations contain the bit pattern for the FX80eight-
by-eleven dot matrix. Since the intermediate dots, those
on the even numbered columns, are generated by a com-
bination ofdisplay patterns - the specially defined patterns
generated above - the prior, current and next memory loca-
tions all must be tested to determine the correct pattern to
display.
Subroutine 1400 reverses the process and converts the
display pattern into the correct memory pattern.
The major editing service starts at 2000. Itdisplays the
current character number and sets the cursor shape. There
are two cursor shapes used in this program. The first is anopen circle that represents the odd columns. It is selected
by the Vertical Arrow located next to the RESTORE key.
When it is selected, you can write or erase in the six odd
columns. The second cursor is a half solid vertical bar that
represents the even columns. It is selected by the British
Pound Sign key, and when selected allows you to write or
erase in the five even columns. Cursor up, down, left and
right; carriage return, home and clear work area are sup-
ported. A dot is written by positioning the cursor in the
desired location, including selecting the correct full or half
cursor, and pressing the + key. Adot is erased by pressing
the - key.
The trickiest part of the program is probably in lines
2200 through 2550 that determine what characterjs]should bedisplayed as a function of the current mode - odd
or even column, the command to write or erase, and the
information that is currently in the work area. For exam-
ple, if you aregoing to write a dot in an even column, you
must actually write a right half dot in one character posi-
tion and a left half dot in the next. But what if the next
position, the odd column, already contains a full dot? Or,
even more difficult, what if it contains the right half for
the next even column? A number of tests are made to
determine how the display must be changed.
Lines 600 to 2800 are a limited REVERSEfunction. It is
easy to reverse a full dot bymaking it a space, or reverse a
space bymaking it a full dot. The problem comes in rever-
sing a half dot. While the FX80 can print a half space by
proper positioning of the printing mechanism, it can not
print a half dot! The print head is only capable of printing a
full dot. So, it is not possible to accurately reverse patterns
that contain any half dots. The routine does the best it
can. When done reversing, it accepts a new character
number.
The routine at 6000 to 6140 saves the FX80 character
information on disk. It is called by the F6key. It requests a
filename, the number of the first character to be saved and
the number of the last character to be saved. It outputs an
arbitrary attribute byte of 139 which defines each
character as the upper eight printing positions on-the FX80
with the full character width. The eleven bytes of data that
define the information for the eleven columns on the FX80
are then output.
The routine at 6200 to 6300 loads the FX80 character
information from the disk. It is called by the F5 key.Lines 7000 to 7420 support the other basic editing
functions that include: Read a specified character, Write a
specified character, Read the next character, and, Write
the current character number and Read the next.
Generating Data Statements
Now that a new character set for the FX80 has been
generated using the FX80 Character Generator, and is
saved on disk as a sequential disk file, the question arises:
How do I get it over to the FX80?The obvious answer is to
first convert the sequential file to BASIC DATA
statements and then add a driver program that would
output the character information, plus any specialcommand information required by the FX80. Step one,
generating the BASIC DATA statements from the
sequential file is simply handled by the FXPCG
DATAMAKER routine. Load and run the FXPCG
DATAMAKER. It will ask for the FIRSTBASICLINENO:.
Input a line number, say 10010. It will then ask for the
FILENAME:. Input the filename that you used to save the
character information. The file will be loaded from disk.
1 R E M F X P C G D A T A M A K E R - R , M , T R I P P 1 9 8 32 I N P U T " ~ F I R S T B A S I C L I N E N O : " ; L N
3 P O K E 5 2 , 4 8 : P O K E 5 6 , 4 8 : C = 2 5 6 * 5 6 : I N P U T " F I L E N A M E : " ; B $ : C $ = " @ O : " + B $ + " , S , R "4 O P E N 3 , 8 , 8 , C $ : P R I N T " L O A D I N G " : I N P U T # 3 , F X , T X : F O R 1 = 0 T O T X - F X : X = C t I * 1 25 F O R J = O T O 1 1 : I N P U T 4 I 3 , C % : P O K E ( X + J I , C X : N E X T J : N E X T I : E = X + 1 1 : C L O S E 36 P R I N T " ~ " ; M I D $ ( S T R $ ( L N I , 2 1 ; " D A T A " ; F X ; C H R $ ( 4 4 1 ; T Y . : L N = L N + 1 0 : K = 1 : G O T O 87 P R I N T " ~ " ; : K = O8 F O R I = K T O 6 : P R I N T M I D $ ( S T R $ ( L N I , 2 1 ; " D A T A " ; : F O R J = O T O 1 19 P R I N T H I D $ ( S T R $ ( P E E K ( C ) ) , 2 ) ; C H R $ ( 4 4 ) j : C = C + l : I F C ) E T H E N P R I N T 2 5 6 ; : I = 6 : J = 1 1
1 0 N E X T J : P R I N T C H R $ ( 2 0 ) : L N = L N + 1 01 1 N E X T I : P R I N T " L N = " ; L N ; " : C = " ; C ; " : E = " ; E1 2 I F C ) E T H E N P R I N T " Q Q S O T O 1 4 " : G O T O 1 61 3 P R I N T · " Q Q G O T O 7 " : G O T O 1 61 4 P R I N T " ~ " ; : F O R I = l T 0 8 : P R I N T I : N E X T : P R I N T " G O T O 1 5 " : G O T O 1 61 5 P R I N T " ~ " ; : F O R I ~ 9 T 0 1 6 : P R I N T I : N E X T1 6 P O K E 6 3 1 , 1 9 : F O R 1 = 1 T O 9 : P O K E 6 3 1 + I , 1 3 : N E X T : P O K E 1 9 8 , 1 0 : E N D
No. 68 - January 1984 MICRO 37
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 40/100
Youwill then seeDATAstatements appear on the display,
the display be cleared, and more DATA statements
appearing, until all of the characters have been converted
to DATA statements. Then the numbers 1 to 16 will
appear on the screen. At this point, the program is erasing
itself! You are left with a BASICprogram that is nothing
but DATA statement containing your character set.
Now all that is left is to add a short BASICprogram in
front of these DATA statements that will send
initialization information to the FX80. The Character Setfo r FX80 shows the additional DATAthat is needed to set
up a typical FX80 application. Lines 10001 to 10009 are
the sequences that must besent to the FX80 to perform the
specified operations. See the FX80 manual for additional
details.
All that you need to add is a driver program that will
open up your communication channel, read and output
the information contained in the DATA statements, and
you are on your way. The FX80 will now contain the
characters you defined.
Using the New Characters
You will need to write a short conversion program tooutput the correct codes to the FX80 to access the
characters you have generated. The SCREEN DUMP
program is an example that was used with my character
set. It can be appended to an existing screen editing
program by listing it on the display, loading you editor,
and then pressing returns on each line of the display. Then
add a command to your editor to go to the 30000
subroutine, and you can dump your screen directly to the
3 0 0 0 0 R E M S C R E E N D U M P3 0 0 0 1 O P E N 3 , 43 0 0 0 2 F O R Y = O T O 2 43 0 0 0 3 F O R X = O T O 3 93 0 0 0 4 A = P E E K ( 1 0 2 4 + Y * 4 0 + X )3 0 0 0 ~ I F A ( 3 2 T H E N A . A + 6 4 : G O T O 3 0 0 1 03 0 0 0 6 I F A ) 6 3 A N D A ( 1 2 8 T H E N A = A + 6 4 :
G O T O 3 0 0 1 0
3 0 0 0 7 I F A ) 1 2 7 A N D A ( 1 9 2 T H E N A = A - 1 2 8 :G O T O 3 0 0 1 0
3 0 0 1 0 P R I N T I 3 , C H A R $ ( A )3 0 0 1 1 N E X T : P R I N T I 3 , C H R $ ( 1 3 )3 0 0 1 2 N E X T : P R I N T I 3 , C H R $ ( 1 3 )3 0 0 1 3 C L O S E 3 : R E T U R N
FX80. Your conversions will vary as a function ofhow you
have defined the special characters on the FX80.
What's Next
A scheme to intercept the output of a BASIC LIST
command and convert it will bepresented next month. A
complete PARALLEL driver will bedescribed that includesthe cabling information and software to permit you to use
the FX80 with your Commodore without requiring a serial
interface! This can saveyou quite a bit ofmoney since the
serial interface on the FX80 is an option, the parallel
interface is standard. While it does take a bit ofeffort toget
the FX80 working with the special characters for your
computer, it does provide you with a virtually unlimited
printing capability. A \ ICAO "
How long can you endure? When will it end? .. We're not talking about a new shoot 'em up game for theCommodore 64, but Commodore's own disk operating system! Commodore made a great computer in
the 64 but left its disk operating system out in the cold. If you've been waiting for a true disk operatingsystem, here it is!. .. If you've been waiting for a great BASIC language enhancement that will let you
utilize the Commodore's many special features, here it is! What is it? It's grafDOS, the great new utilityfrom Xylex Software that allows the user to actually become friendly with the Commodore 64! grafDOS
includes commands like DELETE, RENAME, CATALOG, RUN, etc. The BASIC allows you to do highresolution and low resolution graphics, sound, sprite program, plus much, much more for a total of 40
commands! Plus included in every package is MINIMON, a powerful machine language monitor thatincludes another 20 commands for use in machine language. The disk also comes with sample pro-
grams and demos including a great music generator! And all this together is only $49.95! How couldyou have lasted this long without it?
DON'T WAIT ANY LONGER!
Make your programming easier! grafDOS is available now at your local dealer or:
d--;ERES1'ING SOFTWARE......, ~~1~1 S. Harvard Blvd.
Torrance, CA 90501
(213) 328-9422
38
Visa/MC/Check/Money Order
Add $2.00 shipping
CA residents add 6'/2# sales tax.
Dealer inquiries invited.
MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 41/100
I A l C A O ' ·Commodore Reviews
Product Name:
Equip. req'd:
Price:
Manufacturer:
Interpod
Commodore VIC or 64
$150.00
Oxford Computer Systems Ltd.
Hensington Road, Woodstock
Oxford OX7 1JREngland
U.S. Distributors:
SJBDistributors
10520 Plano Rd., #110
Dallas, TX 75238
(214) 343-1328
Limbic Systems1056 Elwell Ct.
Palo Alto, CA94303
(415) 964-8788
Description: This is an IEEE-488 and RS-232 interface for
the VIC-20 and C64. It is guaranteed compatible with all
programs. Though it lacks the BASIC 4 and monitor of
RTC's C64-LINK, INTERPOD is a most important new
product. Highly recommended.
Pluses: Unlike other IEEE interfaces we've tested, it con-
nects to the serial bus, like Commodore accessories. Thus,there is no need to relocate it and no problem with pro-
grams that use up internal memory. It easily links a
VIC-20 or C64 to a whole network of PET/CBM or other
IEEE-488devices plus an RS-232printer, and it works fine
with most DOS-protected programs. When the computer
addresses a device, INTERPOD sees if a device on the
serial bus answers. If not, the call is transferred to the IEEE
bus to see if any device answers there. If not, and the
device number is 4, it tries the RS-232 port. It ignores the
IEEE device when a serial device is on and can arrange
another address for the RS-232device.
Minuses: INTERPOD goes off and sulks if you turn the
computer off and on without also turning off INTERPOD.A multi-plug switch solves this. When rechecking IEEE
disk status, INTERPOD adds garbage after the valid infor-
mation; this hangs some data-handling programs. The
cure, says the fairly adequate manual, is to send a "clear"
command to INTERPOD's command channel before each
new access - easy in your own programs, but impossible
in protected commerical ones.
Skill level required: None to use the IEEEport. The usual
high skill is needed to set up the RS-232 port.
Reviewer: Jim Strasma
Product Name:
Equip. req'd:
DIARY 64
Commodore 64 Computer, 1541 Disk
drive or Dattasette, Printer Optional
$39.95
Computer Marketing Services
300 W. Marlton Pike
Cherry Hill, NJ 08002
[609) 795-9480
Price:
Manufacturer:
Description: DIARY 64 is a cartridge based file manage-
ment program. Files are set up in blocks which may con-
sist of up to 10 lines of 27 characters each. When the files
are printed out, only the first four lines of each block is
printed. This allows printing names and addresses or like
information. The files may besaved on either tape or disk.
Pluses: The program is quite easy to use. The manual ex-
plains the functions quite well. Files may beset up using a
date rather than a block number and the file information
can be accessed by data as you would use a diary. This
seems to be the origin of the program's name. Blocks may
be added, changed or deleted as necessary. There is a
search function allowing a particular record to befound by
block number, data, or "key" character.
Minuses: The blocks cannot be sorted nor can you set up
and print out all files at one time. Each filerecord requires
the user to press the I'up-arrow' and the return keys to ob-
tain a print out.
Documentation: The eight page manual contains all the
information needed to use the program effectively. It is
clearly written and easy to understand.
Skill level required: Beginning level user.
Reviewer: Richard E. Devore
MICRO 39o. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 42/100
cSma
1 0 R E M
2 0 R E I ' 130 R E M4 0 R E H5 0 R E M6 0 R E M7 0 R E I ' 18 0 R E M9 0 R E M
100 R E M11 0 R E M1 2 0 R E M130 R E M1 4 0 R E M150 R E M
1 5 5 R E M1 6 0 R E M1 7 0 R E M1 8 0 R E M1 9 0 R E M2 0 0 R E M2 0 5 R E M2 1 0 R E M2 1 5 R E I ' 12 2 0 R E M230 R E M240 R E M2 5 0 R E M
S I ' 1 A R T 3 0 0
W R I T T E N B Y J O H N R . K E L T YL I N C O L N , N E B R A S K A 6 8 5 0 5M O D I F I E D F O R C 6 4 B Y P H I L D A L E Y
U S E T H I S P R O G R A M T O C O N N E C TA N D P R O G R A M T H E H A Y E SS M A R T M O D E M T O T H EC O M M O D O R E - 6 4 C O M P U T E R .
T H E C O N N E C T O R C A B L E S H O U L DC O N N E C T T O T H E R S - 2 3 2 P O R TI N T H E F O L L O W I M G W A Y :P A Y E S P I N C - 6 4 P I N
A2 M
3 B ~ C5 K
6 L
7 N
8 H
20 E
22 F
T H E 3 0 0 B A U D H A Y E S M O D E MM A Y B E U S E D W I T H V I D E O T E XO R A N Y O T H E R T E R M I N A LP A C K A G E T H A T A L L O W S T H E
2 6 0 R E M H A Y E S T O R U N A T 300 B A U D .2 7 0 R E M280 R E M T H E H A Y E S W I L L O P E R A T E2 9 0 R E M L O C A L L Y A T H I G H E R R A T E S3 0 0 R E M B U T N O H I G H E R T H A N 3 0 03 1 0 R E M W H I L E O N L I N E .3 2 0 R E M3 3 0 R E M S E E Y O U R U S E R ' S M A N U A L
3 4 0 R E M F R O M H A Y E S F O R D E T A I L S .3 5 0 R E M
3 6 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *3 7 0 R E M3 8 0 R E M O P E N M O D E M L I N E F I R S T T H I N G3 9 0 O P E N 2 , 2 , 3 , C H R $ ( 6 )4 2 0 D I M 1 '1 $ ( 5 ), S N $ ( 9 )
4 3 0 R E H * * * * * * * * * * * * * * * * * * * * * * * * * * *5 1 0 P R I N T " ~ ~ * * * * * S H A R T M O D E M
* * * * * "5 2 0 P R I N T "5 3 0 P R I N T "
B Y : K E L T Y E N G I N E E R I N G "
4 0 MICRO
* * * * * * * * * * * * * * * * * * * * * * * "5 4 0 P R I N T :
P R I N T " C O N N E C T C A B L E S T O M O D E M , "5 4 5 P R I N T " C O H P U T E R A N D P H O N E
C O M P A N Y . "5 50 P RI NT : P RI NT :
P R I N T " ( B R E A K A N D L I S T T H I SP R O G R A M T O "
5 5 5 P R I N T " S E E C A B L E D E T A I L S ) . "5 60 P RI NT : P RI Nf :
I N P U T " P R E S S E N T E R W H E N R E A D Y " ; A $
5 7 0 P R I N I " u Q "5 8 0 P R I N T i 2 ; " A T Z " : ' C L E A R M O D E M
5 9 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *6 0 0 R E M M E N U
6 1 0 M $ ( l ) ~ " A U T O D I A L I N G "6 2 0 M $ ( 2 ) = " A U T O A N S W E R I N G "6 3 0 F O R S ~ l T O 26 40 P RI N T Sj M $ (S )6 5 0 N E X T S6 60 P RI N T :P RI NT :
P R I N T " S E L E C T O N E O F T H E A B O V E "6 7 0 G E T A $ : I F A $ = " " T H E N 6 7 06 8 0 O N V A L ( A $ ) G O S U B 7 0 0 , 1 3 1 06 9 0 G O T O 5 1 0
7 0 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *7 1 0 R E M A U T O D I A L I N G R O U T I N E
7 2 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *7 3 0 R E M
7 4 0 P R I N T " u Q " M $ l l )7 5 0 P RI NT : P RI NT :
P R I N T " l D I A L A S A V E D N U M B E R "7 6 0 P R I N T " 2 D I A L A N E W N U M B E R "7 7 0 G E T A $ : I F A $ = " " T H E N 7 7 07 8 0 O N V A L I A $ ) G O T 0 8 0 0 , 9 8 07 9 0 G O T 0 7 4 0
8 0 0 R E M * * * * * * * * * * * * * * * * * * * * * * *8 1 0 H H - 2 : ' H O W M A N Y N U M B E R S8 2 0 R E M T O C H A N G E T H I S L I S T ,
H A K E H M = H O W8 2 5 R E M M A N Y * Y O U W A N T T O L I S T ( M A X
O F 9 ) .
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 43/100
8 3 0 R E M T H E N I N S E R T L I N E S S I M I L A R T OT H O S E
8 3 5 R E M B E L O W W I T H Y O U R N U M B E R S A N DN A M E S .
8 4 0 P R I N T " ~ N U M B E R S Y O U C A N E A S I L YC A L L " : P R I N T
8 5 0 S N $ (1)= " 1 X X X - X X X X A F R I E N D
8 6 0 S N $ ( 2 )= " 2 X X X - X X X - X X X X A B B S
1 3 4 0 R E M1 3 5 0 P R I N T " ~ Q " M $ ( 2 )1 3 6 0 P R I N T -1 3 7 0 R E M M E N U1 3 8 0 A N $ ( l ) = " D O N O T A N S W E R "1 3 9 0 A N $ ( 2 ) = " A N S W E R I M M E D I A T E L Y "1 4 0 0 A N $ ( 3 ) · " A N S W E R A F T E R X X R I N G S "1 4 1 0 F O R S A = l T O 3
1 4 2 0 P R I N T S A ; A N $ ( S A )1 4 3 0 N E X T S A1 4 4 0 P R I N T : P R I N T :
P R I N T " S E L E C T O N E O F T H E A B O V E "1 4 5 0 G E T A $ : I F A $ = " " T H E N 1 4 5 01 4 6 0 P R I N T " ~ ~ " M $ ( 2 )1 4 7 0 O N V A L ( A $ ) G O S U B 1 4 9 0 , 1 5 6 0 , 1 7 2 01 4 8 0 G O T O 1 3 1 0
1 4 9 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * *1 5 0 0 R E M D O N O T A N S W E R1 5 1 0 P R I N T :
P R I N T " * * * " A N $ ( l ) " * * * "1 5 2 0 P R I N T :
P R I N T " T H E S M A R T M O D E M A N S W E R
F U N C T I O N "1 5 3 0 P R I N T " I S D I S A B L E D . "1 5 4 0 P R I N T * 2 , " A T S O = O "1 5 5 0 G O T O 2 0 4 0
1 5 6 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * *
1 5 7 0 R E M A N S W E R I M M E D I A T E L Y1 5 8 0 P R I N T " * * * " A N $ ( 2 ) " * * * "1 5 9 0 P R I N T " T H E S M A R T M O D E M W I L L
A N S W E R A L L "1 6 0 0 P R I N T " C A L L S I M M E D I A T E L Y . "1 6 1 0 P R I N T " U S E T H I S T O T R A N S F E R C A L L S
T H A T "1 6 2 0 P R I N T " A R E A L R E A D Y I N P R O G R E S S
S E T W E E N "1 6 3 0 P R I N T " T W O I N D I V I D U A L S T O
C O M M U N I C A T I O N "1 6 4 0 P R I N T " B E T W E E N T H E I R C O M P U T E R S . "1 6 5 0 G O S U B 1 8 7 01 6 6 0 P R I N T * 2 , " A T " D P $ " A "1 6 7 0 P R I N T " A T T H I S P O I N T Y O U N E E D T O
R U N "1 6 8 0 P R I N T " O R E X E C Y O U R O W N R E C E I V E R "1 6 9 0 P R I N T " P R O G R A M T O I N T E R P R E T T H E "1 7 0 0 P R I N T " I N C O M I N G C A L L . "1 7 1 0 G O T 0 2 0 4 0
1 72 0 R E M * ** * * * ** * * * * * * ** * * * *1 7 3 0 R E M A N S W E R A F T E R X X R I N G S
1 7 4 0 P R I N T : P R I N T " * * * " A N $ ( 3 ) " * * * "1 7 5 0 P R I N T :P R I N T " T H E S M A R T M O D E M W I L LA N S W E R A L L "
1 7 6 0 P R I N T " C A L L S A F T E R T H E N U M B E R O FR I N G S "
1 7 7 0 P R I N T " Y O U S E L E C T ( F R O M 1 T O 2 5 5R I N G S ) II
1 7 8 0 P R I N T1 7 9 0 I N P U T " H O W M A N Y R I N G S ( 1 T O 2 5 5 ) " ;
R G1 80 0 R G =I N T ( RG )1 8 1 0 I F R G ( l O R R G ) 2 5 5 T H E N 1 7 9 0
8 7 0 F O R K = l T O H M8 8 0 P R I N T S N $ ( K )8 9 0 N E X T9 0 0 P R I N T :
P R I N T " S E L E C T O N E O F T H E A B O V E "9 1 0 P R I N T " ( B R E A K A N D L I S T T O E D I T
T H E S E N U M B E R S ) . "9 2 0 G E T A $ : I F A $ · " " T H E N 9 2 093 0 N 8 = V A L ( A $ )9 4 0 I F ( N B ( l ) O R ( N B > H M ) T H E N 8 0 0
95 0 P $ = M I D $ ( S N $ ( N B ) , 5 , 1 6 )9 6 0 G O S U B I 0 9 09 7 0 R E T U R N
9 8 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * *9 9 0 P R I N T : P R I N T " D I A L I N G A N E W N U M B E R "
1 0 0 0 P R I N T :P R I N T " T Y P E I N T H E P H O N E N U M B E R
T H A T "1 0 0 5 P R I N T " Y O U W I S H T O C A L L . "1 0 1 0 P R I N T " E X A M P L E S : "1 0 2 0 P R I N T " 1 - 8 0 0 - X X X - X X X X L O N G
D I S T A N C E1 0 3 0 P R I N T " 1 1 2 - 8 0 0 - X X X - X X X X F R O M
L I N C O L N1 0 4 0 P R I N T " X X X - X X X X L O C A L
C A L L1 0 5 0 P R I N T1 0 6 0 I N P U T " T Y P E D E S I R E D N U M B E R " ; P $1 0 7 0 G O S U B 1 0 9 01 0 8 0 R E T U R N
1 0 9 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * *1 1 0 0 R E M N U M B E R K N O W N A T T H I S P O I N T1 1 1 0 R E M R E A D Y T O D I A L1 1 2 0 P R I N T * 2 , " A T F O D " P $
1 1 6 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * *1 1 7 0 R E M Y O U C A N R U N A N Y T E R M I N A L1 1 8 0 R E M P A C K A G E T H A T Y O U W I S H B Y
1 1 9 0 R E M E D I T I N G T H E N E X T L I N E S .1 20 0 R EM L OA D" M O D CO M M . PR G " , 81 2 2 0 R E M R U N1 2 3 0 P R I N T " ~ ~ Y O U N E E D T O U S E Y O U R
O W N "1 2 4 0 P R I N T " T E R M I N A L P A C K A G E A T T H I S
P O I N T "1 2 5 0 P R I N T " ( S U C H A S V I D E O T E X A N D
O T H E R S ) . "1 3 0 0 G O T O 2 0 4 0
1 31 0 R EM * ** ** * * * ** * * * ** * * * * *1 3 2 0 R E M A U T O A N S W E R R O U T I N E
1 3 3 0 R EM * ** ** * * * ** * * * ** * * * * *
No. 68 - January 1984 MICRO 41
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 44/100
1 8 2 0
1 8 3 01 8 4 01 8 5 01 8 6 01 8 7 01 8 8 0
1 8 9 0
1900
1 9 1 01 9 2 01930
1940
1 9 5 01 ~ 6 01 9 7 0
1 9 8 0
1 9 9 02 0 0 0
2010
2 0 2 02 0 3 02040
2 0 5 0
P R I N T :P R I N T " T H E P H O N E W I L L B EA N S W E R E D "P R I N T " A F T E R " R G " R I N G S . "G O S U B 1 8 7 0P R I N T I 2 , " A T " D P $ " S O · " R GP R I N T : G O T O 1 6 7 0
R E M * * * * * * * * * * * * * * * * * * * * * * * * *R E M F U L L O R H A L F D U P L E X
P R I N T :P R I N T " D O Y O U W A N T F U L L O R H A L FD U P L E X ? "P R I N T " ( I F Y O U D O N O T K N O W ,T R Y H A L F ) . "P R I N T : P R I N T " l F U L L D U P L E X "P R I N T " 2 H A L F D U P L E X "G E T A $ : I F A $ = ' " ' T H E N 1 9 3 0O N V A L ( A $ ) G O T O 1 9 5 0 , 1 9 9 0R E M F U L L D U P L E XD P $ - " F l "P R I N T :P R I N T " F U L L D U P L E X S E L E C T E D . "G O T O 2 0 2 0
R E M H A L F D U P L E XD P $ = " F O "
P R I N T :P R I N T " H A L F D U P L E X S E L E C T E D . "P R I N TR E T U R N
R E M * * * * * * * * * * * * * * * * * * * * * * * * *R E M E X I T R O U T I N E
2 0 8 0 P R I N T :P R I N T " T H I S P R O G R A M H A S E N D E D . "
3 0 0 0 R E M T H I S P R O G R A M S E N D S A N DR E C E I V E S
3 0 1 0 R E M T R U E A S C I I D A T A3 0 2 0 D I M F X ( 2 5 5 ) , T 7 . ( 2 5 5 )3 2 0 0 F O R J · 3 2 T 0 6 4 : T X ( J ) = J : N E X T3 2 1 0 T X ( 1 3 ) = 1 3 : T X ( 2 0 ) = 8 : R V = 1 8 : C T = 03 2 2 0 F O R J - 6 5 T 0 9 0 : k - J + 3 2 : T X ( J ) = K : N E X T
3 2 3 0 F O R J = 9 1 T 0 9 5 : T X ( J ) = J : N E X T3 2 4 0 F O R J = 1 9 3 T O 2 1 8 : K - J - 1 2 8 : T X ( J ) - K :
N E X T3 2 5 0 T X ( 1 4 6 ) = 1 6 : T X ( 1 3 3 ) = 1 63 2 6 0 F O R J = O T O 2 5 53 2 7 0 K - Y X ( J )3 2 8 0 I F K ( ) O T H E N F X ( K ) = J : F X ( K + 1 2 8 ) = J3 2 9 0 N E X T3 3 0 0 P R I N T " " C H R $ ( 1 4 7 )3 3 1 0 G E U 2 , A $3 3 2 0 I F A $ = " " O R S T ( ) O T H E N 3 3 6 03 3 3 0 P R I N T " " C H R $ ( 1 5 7 ) :
C H R $ ( F X ( A S C ( A $ ) ) ) j3 3 4 0 I F F X ( A S C ( A $ ) ) = 3 4 T H E N P O K E 2 1 2 , O3 3 5 0 G O T O 3 3 1 03 3 6 0 P R I N T C H R $ ( R V ) " " C H R $ ( 1 5 7 ) :
C H R $ ( 1 4 6 ) j : G E T A $3 3 7 0 I F A $ ( ) " " T H E N P R I N T I 2 ,
C H R $ ( T X ( A S C ( A $ ) ) ) j3 3 8 0 C T - C T + l3 3 9 0 I F C T = 8 T H E N C T = 0 : R V = 1 6 4 - R V3 4 0 0 G O T O 3 3 1 0 I\ICRO"
42 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 45/100
I A l C A O "Commodore Compass
by Loren Wright
High Resolution on the
Commodore 64
Mny C-64 users don't even know that their
machines have high-resolution graphics, let alone
know how to use them! There is no mention in
the User's Guide, and very little in the Programmer's
Reference Guide. In this column I'll explain a little about
these modes, and provide a couple machine-languageutilities to make high-resolution programming easier.
There are actually two bit-map modes. One is a two-
color mode (hereafter called hi-res bit-map mode) that pro-
vides resolution of 320 by 200 pixels. The other is a four-
color mode [hereafter called multicolor bit-map mode)
providing resolution of 160 by 200 pixels. Each mode uses
an 8K bit-map area and the lK color memory.
In hi-res bit-map mode, each bit in bit-map memory
corresponds to a pixel on the screen. If the bit is a 1, thenthe corresponding pixel appears in the foreground color; if
the bit is a 0, then the corresponding pixel appears in the
background color. Screen memory is used to select the
foreground and background colors for each 8-pixel by
8-pixel area [the area normally occupied by a character).Bit-map memory is arranged to take advantage of this
square-by-square color selection capability. The first eight
bytes in bit-map memory represent the pixels of an 8-by-8
square at the top left corner. The next eight bytes of repre-
sent the 8-by-8 square immediately to the right of that.
This arrangement makes it a little more difficult to
calculate a given bit, but the reward is being able to use
many more than two colors on a high-resolution screen.
In multicolor bit-map mode, the pixels are twice as
wide and it takes two bits to specify the source of the color
00 - background #0, 01 - high four bits of screen
memory location, 10 - low four bits of screen memory
location, 11 - color memory location. Each byte contains
four bit-pairs, each of which corresponds to a double-width pixel. The bytes are arranged in the same way as in
hi-res bit-map mode, and the little squares are the same
size (8 rows of 4 double-width pixels). Each little square
may have only four colors in it, but there may be many
more than four colors on the whole screen at once.
Listing 1 is a hi-res bit-map routine to calculate the
proper byte BY, byte contents BQ, and bit BI, as well as
the proper position PO for control of colors. X and Y are
the input and represent the x- and y-coordinates of the hi-
res pixel. 0,0 is the coordinate of the upper-left corner. BA
is the starting address of bit-map memory, and OG is the
screen memory start address. These vary with the memory
configuration you choose.
No. 68 . January 1984
Listing 2 is a similar routine, only for multicolor bit-
map mode. X and Y are the input. Remember X ranges
from 0 to 159 because of the double-width pixels. The out-
put is the byte BY, byte contents BQ, bit pair BP, and posi-
tion PO.
To use listing 1, perform the following set-up once at
the beginning of your program:
40 DIM P%(7),M %(7):FORI = OT07: P%(I) = 21\1:M% =255- P%(I): NEXTI
The following calling sequence may now be used:
110GOSUB 4000: REMX=O TO 319, Y=O TO 199
120POKE BY,BO AND M%(BI) OR P%(BI)
To use listing 2, perform the following set-up once at the
beginning of your program:
40 DIM P%(3),M %(3):FORI = OT03: P%(I) = 41\1:
M% = 255-P%(I):NEXTI
You may now use the following calling sequence:
110GOSUB 4000: REM X=O TO 159, Y=O TO 199
120POKE BY,BO AND M%(BP) OR P%(BP)
How to Set Up Bit Map Modes
The procedure shown in the Programmer's Reference
Guide uses bit-map memory at $2000 (8192). This is ade-
quate for experimenting with short programs, but the 6K
left for BASIC is not adequate for a program of any
significance. Listing 3 is a routine to set up bit-map
memory at $6000 (24576). This uses bank 1for the VIC II,
so the screen must be moved to $5COO(23552). The resultis over 20K for your BASIC program. Listing 4 is a routine
to restore the multicolor bit-map mode. Listing 5 is a rou-
tine to restore the normal screen. If you are using either
listing 3 or listing 4, the first lines of your program must be:
10 POKE 52,92: POKE 56,92: POKE 55,0: CLR
20 BA= 24576: OG = 23552: MY= 199: MX= 319:
REM MX= 159 for multicolor
Line 10 prevents the BASIC program from writing over
bit-map or screen memory. It must be the very first line in
your program. Because the CLR instruction clears the
stack, as well as the variables, this statement cannot be in-
MICRO 43
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 46/100
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 47/100
List 5: Restorenormal screen.
8100 REM RESTORE NORMAL SCREEN
8110 POKE 56578,PEEK(56578)OR3
8120 POKE 56576,PEEK(56576)AN02520R3
8130 POKE 53272,PEEK(53272)AN070R16
8140 POKE 53265,PEEK(53265)AN0223
8150 POKE 53270,PEEK(53270)AN0239
s16~:::1~ETUF.:t·~
List 6: Machlne·languageroutines, Installation and calling routines.
30 GOSU88500:POKE843,INT(8A/256):POKE842,INT(OG/256)
3100 POKE840,C:SYS898:RETURN:REM CLEAR COLOR 1
3200 POKE840,C:SYS915:RETURN:REM CLEAR COLOR 2
3300 POKE840,C:SYS883:RETURN:REM CLEAR COLOR 3
8500 REM REAO IN ML ROUTINE
::::51~:::1<:::':::::::84£1:=£1
8520 REAOYY:IFYY:::::-ITHEN8540
8530 POKEXX+I,YY:I=I+l:GOT08520
::::5412:1.:ETURt·~
190000ATA2,240,92,32,95,173,75,3,133,254,24,105,32,141,76,3,169,0,13319010 OATA253,173,72,3,160,0,145,253,200,208,251,165,254,24,105,1,
1:3:3r 254 .r 2~~5
19020 OATA76,3,208,236,96,169,216,133,254,169,0,133,253,169,220,141,
19030 DATA208,218,173,72,3,10,10,10,10,141,72,3,169,15,141,73,3,208,5
190400ATAI69,240,141,73,3,173,74,3,133,254,24,105,3,141,76,3,169,0,13~
190500ATA253,168,177,253,45,73,3,13,72,3,145,253,200,240,13,192,232,
20:3
190600ATA239,165,254,205,76,3,208,232,240,4,230,254,208,226,96,-1.
1dCRO ' "
FOR APPLE II PLUS, FRANKLIN, APPLE lie
Font Down LoaderExpand the capacity of your printer hundreds of times
Load custom fonts into your Apple" Matrix Printer, Prowriterrx8510A, OKJ®Microline 92, 93, 84 Step II, and Epsorr" FX and use
them with virtually every word processor to turn your printer into acustom typesetter. After the fonts are loaded, they will stay in yourprinter until it's turned off. A font editor is also provided to allow you to
create your own graphics, text, foreign language letters, math andelectronics symbols to load into your printer. On-Disk (Specify Printer)
.................................................... $3900
New improved versions with drivers for Grappler, Pkaso. Wizard and most other intelligent parallel boards.
$100 REWARD micra :"WllrE:"P.o. Box 113
Pompton Plains, N.J.
07444Dealer and Distributor Inquiries Invited CALL (201) 838-9027
Submit the best or most uniquefont using the above software and wewill make you $100 richer. Otherprizes for the first 25 runners up.
"There's got to be a better way 10 load fonls!"
No. 68 . January 1984 45ICRO
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 48/100
Atari ToSmartmodem
By Jo hn Ke lty
Adapted for Atari byPhU Daley
Tis is an adaptation of my pro-
gram for the Color Computer.
The hardware requirements are
the Hayes Smart Modem and the Atari
850 commmunications interface. This
program was specifically written with
the serial line connected to port 1of the
serial port (the standard port for com-
munications]. This fantastic modem
can be programmed from Atari BASIC.
The interface cable is a standard
Atari communications cable - 9-pin
D-connector to DB-25. If you want to
wire your own cable, here are the
connections:
Atari Connector DB-25
1 20
2 8
3 2
4 3
5 7
6 6
7 4
8 5
9 11
however, to have the Smartmodem
near your computer setup, then you
can hear the dialup and the send and
receive carrier tones when you begin
communicating. There are many pro-
gramming options you can choose with
the Hayes Smartmodem, and these are
extremely well documented in the ex-
cellent Owner's Manual. (In case you
have not guessed, I consider the Hayes
Smart modem my best computing pur-
chase to date!).
The BASIC program is menu driven
for ease of operation. If you BREAKand
then RUN the program again, the
Smartmodem functions are cleared
("AT ZIt is sent to the modem). To
write to the Hayes, you must access the
port in concurrent I/O mode (XIO 40)
and then use normal PRINT# com-
mands. Now you can talk to your
modem just like it was a printer with
PRINT#5, "your modem command".
To get back into the normal Atari mode
use CLOSE#5. It is important to read
back the information sent by the Hayes
modem or else the program will hang,
and pressing reset is the only way to
recover. Also, the only way to ter-
minate the program is by pressing reset.
Now you can use a communications
You need 9-conductor cable and I have
used as long as about 25 feet without
any problems. It is convenient
46 No. 68 . January 1984ICRO
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 49/100
package such as AMODEM or a similar
program to communicate with bulletin
boards or data bases. The program in-
cludes a short subroutine to emulate a
dumb terminal if you don't have a com-
munications package yet.
I know little to nothing of amateur
radio operations, but with a few lines of
BASIC and possibly some hardware,
the Hayes Smartmodem can be made to
send morse code. Auxiliary relay con-
tacts are provided in the modem to key
the transmitter automatically. It can-
not however, be made to directly
receive morse code. Diagrams describ-
ing the modem to radio interface are
found in the Smartmodem User
Manual Appendix H. Obviously some
nice commercial terminal packages
exist for the Atari, but this program has
made me happy for some time now.
With the Hayes Smartmodem and the
Atari Computer, I am sure you will also
enjoy computer communications.
Listing 1
5 G O T O 5 0 01 0 R E M S I M P L E T E R M I N A L P R O G R A M1 1 R E M T O G E T A N D P U T C H A R S1 2 R E M T O A N D F R O M M O D E M1 3 O P E N # l , 4 , O , " K : "1 5 O P E N # 3 , 8 , 0 , " E : "2 0 G O S U B 4 0 03 0 I F P E E K ( 7 6 4 1 = 2 5 5 T H E N 6 04 0 G E T # l , A : P U T #3,A5 0 P U T # 5 , A60 S T A T U S # 5 , X X7 0 I F P E E K ( 7 4 7 ) = 0 T H E N 3 08 0 G E T # 5 , A : I F A = O T H E N 30
9 0 P U T # 3 . A : G O T O 3 01 0 1 R E M S M A R T 3 0 01 0 2 R E M V E L T V E N G I N E E R I N G1 0 3 R E M W R I T T E N B Y J O H N R . K E L T Y1 0 4 R E M L I N C O L N , N E B R A S K A 6 8 5 0 5i 5 H E t i1 0 6 R E M U S E T H I S P R O G R A M T O C O N N E C T1 0 7 R E M A N D P R O G R A M T H E H A Y E S1 0 8 R E M S M A R T M O D E M T O T H E1 0 9 R E M A T A R I C O M P U T E R .i1 0 F \ E M1 1 1 R E ~ l T H E i ' 1 O D E M C A B L E S H O U L D120 R E M C O N N E C T T O T H E 8 5 01 3 0 R E M I N T E R F A C E M O D U L E .14 0 R E M P O R T # 1 .2 1 0 R E M2 2 0 R E M HIE 3 0 0 ~ A U D H A Y E S M O D E M2 3 0 R E M M A Y B E U S E D W I T H A H O D E M2 4 0 R E M O R A N Y O T H E R T E R M I N A L2 5 0 R E M P A C K A G E T H A T A L L O W S T H E2 6 0 R E M H A Y E S T O R U N A T 3 0 0 B A U D .270 PE i1
2 8 0 R E M T H E H A Y E S W I L L O P E R A T E2 9 0 R E M L O C A L L Y A T H I G H E R R A T E S3 0 0 R E M B U T N O H I G H E R T H A N 3 0 03 1 0 R E M W H I L E O N L I N E .3 2 0 R E M3 3 0 R E M S E [ Y O U R U S E R ' S M A N U A L3 4 0 R E M F R O M H A Y E S F O R D E T A I L S .3 5 0 R E M
3 6 0 R E M* * * * * * * * * * * * * * * * * * * * * * ' ~ * * *3 7 0 R E M
4 0 0 O P E t ~ # 5 , 1 3 , 0 , " R : "4 1 0 X I O 3 8 , # 5 , O , 3 2 , " R : "4 ? n X I O 4 0 , # 5 , O , 0 , " R : "4 3 0 R E T U R N4 5 0 G E T # 5 , X X : G E T # 5 , X X4 6 0 G E T # 5 , X X :
I F X X < > 1 0 T H E N P R I N T C H R I ( X X I ;4 7 0 I F XX<> lO T H E N 4 6 04 00 C L O S E # 5 : R E T U R N500 DIt1 A $ ( 3 0 ) , P $ ( 1 6 ) , D P $ ( 2 )5 1 0 P R I N T " } * * 1 * * S M A R T M O D E M
* * * * * "5 2 0 P R I N T " B Y :
K E L T Y E N G I N E E R I N G "5 3 0 F R I N T "
* * * * * * * ' * * * * * * * * * * * * * * * "5 4 0 P R I N T
P R I N T " C O N N E C T C A B L E S T O M O D E M ,
5 4 5 P R I N T " C O M P U T E R A N D P H O N EC O M P A N Y . "
5 6 0 P R I N T " P R E S S E N T E R W H E N R E A D Y " ; :
I N P U T A $5 7 0 P R I N T " } "5 8 0 G O S U B 4 0 0 : P R I N T # 5 , " A T Z":
G O S U B 4 5 0
5 9 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *
6 0 0 R E M M E N U6 1 0 P R I N T : P R I N T "I A U T O D I A L I N G "6 2 0 P R I N T " 2 A U T O A N S W E R I N G "6 6 0 P R I N T " S E L E C T O N E O F T H E A B O V E "6 7 0 I N P U T A S6 8 0 O N V A L l A S ) G O S U B 7 0 0 , 1 3 1 0690 G O T O 5 1 0
7 0 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *7 1 0 R E M A U T O D I A L I N G R O U T I N E
7 2 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *730 R E M7 4 0 P F : I N T " } A U T O D I A L I N G "7 5 0 P R I N T " 1 D I A L A S A V E D N U M B E R "7 6 0 P R I N T "2 D I A L A N E W N U M B E R "7 7 0 I N P U T A S7 8 0 O N V A L l A S ) G O T O 8 0 0 , 9 8 07 9 0 G O T O 7 4 0
8 0 0 R E M * * * * * * * * * * * * * * * * * * * * * * *8 1 0 H M = 2 : R E M H O W M A N Y N U M B E R S8 2 0 R E M T O C H A N G E T H I S L I S T .
M A K E H M = H O W .8 2 5 R E M M A N Y # Y O U W A N T T O L I S T { M A X
O F 9).
8 3 0 R E M T H E N I N S E R T L I N E S S I M I L A R T OT H O S E
8 3 5 R E M B E L O W W I T H Y O U R N U M B E R S A N DN A M E S .
8 4 0 P R I N T " } N U M B E R S Y O U C A N E A S I L YC A L L " : R E S T O R E
8 5 0 D A T A " 1 X X X - X X X XF R I E N D "
A
No. 68 - January 1984 MICRO
8 6 0 D A T A "2 XXX-XXX-XX iX A B B S
8 7 0 F O R K = 1 T O H M8 8 0 R E A D A $ : P R I N T A S890 N E X T K9 0 0 P R I N T " S E L E C T O N E O F T H E A B O V E "9 1 0 P R I N T " I B R E A K A N D L I S T T O E D I T
T H E S E N U t 1 B E R S ) "920 I N P U T A $ : R E S T O R E' 7 3 0 N B = V A L (A$)
9 4 0 I F N B ( l O R N B > H M T H E N 8 0 0' 7 5 0 F . OR K = 1 T O N B : R E A D A $ : ~ lE X T f
9 5 5 F l ' $ = A $ ( S , l . j )9 6 0 G O S U B i . O ' 7 ' O
47
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 50/100
H E T U R NH E M 1 1 1 1 1 ~ 1 1 ~ * I I * I I I . * * I * * * 1 1P R I N T " D I A L I N G A N E W N U M B R "P R I N T " T Y P E I N T H E P H O N E U M B E RT H A T "
1 0 0 5 P R I N T " Y O U W I S H T O C A L L . "1!) 1 I) P R I N T " E X A t 1 P L E S : H
1 0 2 0 P R I N T " i - 8 0 0 - X X X - X X X X L O N GD I S f A N C E "
1 0 3 0 P R I N T " 1 1 2 - 8 0 0 - X X X - X X X X F R O M
L I N C O L N ! !1 0 4 0 P R I N T " X X X - X X X X L O C A LC A L L "
1 0 6 0 P R I N T " T Y P E D E S I R E D N U M B E RI N P U T F t
1 0 7 0 G D S U B 1 0 ' 1 01 0 8 0 f ; : E T U F N
II I., .
1 6 0 0 F ' R I N T " C A L L : ; I m i E D I A T E L y . "1 6 1 0 P R I N T " U S E T H I S T O T R A N S F E R
C A L L S T H A 1 "1 6 2 0 P R I N T " A R E A L R E A D y I N P F O G F : E %
B E l W E E N "1 6 3 0 P R I N T " T W O I N D I V I D U A L S T O
C O r 1 l 1 U N I C A T I O Ni I
1 6 4 0 P R I N f " B E T W E E N T H E I RC I]t ' 1 F ' U T E R S. "
1 6 5 0 G O S U B 1 8 7 0
i 6 6 ( 1 G D :; U E : 4 00 :P RI NT # 5, " A T "; DP :t :; "A i I ~G O S U B 4 5 01 6 I U PF.:It~-f " A T T H I S Foun Y O U N E E D
T O F : U N "1 6 8 0 P R I N T " Y O U R O l · j N R E C E I V E R "1 6 9 0 P R I N T " P R O G R A M T O I N T E R P R E T
T H E "1 7 0 0 P R I N T " I N C O M I N G C A L L . "1 7 1 0 G O T O 2 0 4 01 7 2 0 R E M 1 * 11 ** ** *1 1* 1* 1 1 * ** *1 7 3 0 R E M A N S W E R A F T E R X X R I N G S1 7 4 0 P R I N T " * * I A N S W E R A F T E R X X
R I N G S * I I "i7 5 0 P R l t H :
P R I N T " T H E S H A R T M O D E M W I L L
A N S W E R A L L "1 7 6 0 P R I N T " C A L L S A F T E R T H E N U M B E RO F R I N G S "
1 77 0 F ' F: UH "Y 0 U S E L E e T ( F F:D t" 1 1 T 02 5 5 R I N G S ) ! I
1 7 8 0 P F : un1 7 9 0 PRINT "HOH t1ANY F : I N G S (1 TO 2 5 5 )
" ; : I N P U T Pc]
1 8 0 0 R i J = I tn \ F : G )1 8 1 0 I F R G { l O R R G : Z 5 5 T H E N 17901 8 2 0 P F : I N T :
P R I N T " T H E P H O N E W I L L B EA N S I ~E RE D "
1 8 3 0 P R I N T " A F T E F : " ; P G : " R I N G S . n
1 8 4 0 G O S U B 1 8 7 0 . .
i 8 5 0 G O S U B 4 0 0 :P R I N T # 5 , " A T " ; D P $ ; " S O = " ; F : G :G O S U B 4 5 0
1 8 6 0 P R I N T : G O T O 1 6 7 01 8 7 0 R E M * * * * 1 1 1 * * 1 1 1 1 * 1 * * 1 1 1 1 1 1 * 11 8 8 0 R E M F U L L O R H A L F D U P L E X1 8 9 0 P R I N T :
F R I N T " D O Y O U W A N T F U L L O R H A L FD U P L E X ' ) "
1 9 0 0 P R I N T " ( I F Y O U D O N O T K N O W ,T R ' ( H A L F i.I
1 9 1 0 P R I N T : P R I N T "I F U L L D U P L E X "1 9 2 0 P R I N T "2 H A L F D U P L E X "1 9 3 0 IP u - r A $1 9 4 0 O N \ J A L ( A $ ) G O ru 1 ) ' 5 0 , i 9 0
i 9 5 0 R E M F U L L D U P L E X1 96 0 D P: f: == "F ! "19"70 P R l w r :
1 0 9 0 R E M 1 1 1 * * 1 1 1 * * * 1 1 * 1 1 * 1 * 1 1 1 * * * *
1 1 0 0 R E M N U M B E R K N O W N A f T H I S P O I N T1 1 1 0 R E M R E A D y T D D I A L1 1 2 0 G D S U B 4 ( i i ) :
P R I N T # 5 , " A T F O T D " ; P f :G O S U 8 45'~i
1 1 3 0 R E M I F Y O U N E E D P U L S E D I A L I N GT H E N
1 1 4 0 R E M S U B S T I T U T E A ' P ' I N A B O V EL H J E1 1 6 0 R E M * * 1 1 1 * * 1 1 1 * * 1 1 1 1 * * 1 * * 1 * 1 * *1 1 7 0 R E M Y O U C A N L O A D A N Y T E R M I N A L1 1 8 0 F E M P A C K A G E T H A T Y O U W I S H B Y1 1 9 0 R E M E D I T I N G T H E N E X T L I N E S .1200 R E M R U N " D : A M O D E M "1 2 3 0 P R I N T " Y O U N E E D T O U S E Y O U R
O I · J ! ' ~ n
1 2 4 0 P R I N T " T E R M I N A L P A C K A G E A T T H I SP O I N T "
1 2 5 0 P R I N T " ( S U C H A S T E L E L I N V A N DO T H E R S ) . "
l ~ ;O O G O TO 20401 3 10 R E M 1 11 11 11 1* * 1 1 ** 11 11 11
1 3 2 0 R E M A u r o A N S W E R R O U T I N E1 33 0 R E M 1 11 11 1* 1* * * 1 11 11 11 1*1 34 0 f \ E t 11 3 5 , ) P ~ : I N T " } A U T I] A N S W E P I N G "
l -)60 PR I N T1 3 7 0 f::EI1 t ' 1 E H U
1~8v P R I N T "I D O N O T A N S W E R "i 3 ' 7 ' 0 P~!INT " 2 A N S I ' i E R I M ~ i E D I A T E L Y "1 4 0 0 P R I N T " 3 A N S W E R A F T E R X X R I N G S "1440 PRINT " S E L E C T O N E O F T H E A B O V E "1 4 5 U I N P U T A t1 4 6 0 P R I N T " } A U T O A N S W E R I N G "1 4 7 0 O N V A L (All G O : ; U B 1 4 9 0 , 1 5 6 0 , 1 7 2 01 4 8 0 13010 1-310
1 4 9 0 R E M 1 1 1 * 1 1 1 1 * 1 1 * 1 1 1 1 * * * * * * 1 * 11 5 0 0 R E M D O N O I A N S W E RiS1!) P F : I N T " f**DO N O T
A N S W E H H "1 5 2 0 P R I N T " T H E S M A R T M O D E M A N S W E R
F U N C T I O N "1 5 3 0 P R I N T "I S D I S A B L E D . "1 5 4 0 G O S U B 4 0 0 : P R I N T #5,"AT S O = O " :
GOSUB 45 0 -1550 Genu 204 i)
1 5 6 0 R E M * 1 * * * 1 * 1 1 * 1 * * * 1 * 1 1 1 * 1 * * 1 11 5 7 0 R E M A N S W E R I M M E D I A 1 E L Y1 5 8 0 P R I N T " * * * A N S W E R
H I t " l E D I A T E HfI"1 5 9 0 F ' R I N T " T H S M A R T 1 1 0 D U i i ~ I L L
A N S ~ i E F A L "
P F : I N T " F U L L D U P L E X S E L E C T E l ' . "1 9 8 0 G O T O 20iO1 9 ' 1 0 R E M H A L F D U P L E X2000 D P $ = " F O "2 0 1 0 P F : I N T :
P F : I N T " H A L F o u F ' L U S E L E e T E r. I20 P R I N T3 0 R E T U R N4 0 R E M 1 1 1 * 1 1 1 * 1 * 1 1 1 1 * * I * I * i l * 15 0 R E M E X I T R O U f l N7 0 P ~ I N T " T H I S P R O R A M H A S E N D E D . "E O G O T O 1 0
48 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 51/100
Atari Music Player
By Tom Marshall
PLAY WHEN READY SON~:YANKEE DOODLESPACE BAR TO PAUSE ~Rt::TURNTO END 50 ...A. F. OR K REST
Atari Player enables you to play music
on your Atari. It converts the Atari into
a simulated organ with the organ keys
being represented by the keys on the
Atari keyboard, as shown above. Eachnote you play can be heard over one of
the Atari voices. The keyboard spans
three complete octaves, beginning with
a low C and ending more than two
octaves higher with a B. Each note that
is played is stored in memory so that it
can be instantaneously replayed and
then saved on cassette tape or disk.
Later you can load your song in again
and replay it.
We have included a feature in Atari
Player that allows you to stop playing,
go back to correct mistakes, replay the
song from the beginning to the currentnote, and then continue playing addi-
tional notes. Absolute perfection is
possible using the editing option
[number 5), which allows you com-
plete control over every note that has
been played. You can change the tone,
octave, and/or duration of any of the
notes, or, if you wish, you can add
more notes or remove them altogether.
With the Atari Player installed in
your computer you can make your
Atari a musically instructive as well as
entertaining device.
No. 68 - January 1984
Operating Instructions for AtariPlayer Demonstration
The first time you use the Atari Player,
you should listen to the song already
provided on your cassette or disk to ap-
preciate how much can be accomplish-
ed. To do this, follow the simple steps
listed here.
1. Using standard Atari loading pro-
cedures, load Atari PLAYER. If you
are using a cassette, leave it in the
cassette unit; do not rewind it.
2. Type 'RUN' followed by the
'RETURN' key.
3. You will bepresented with the infor-
mation that appears on the display
screen below.
4. Press the 4 key to select the 'LOAD
SONG' 0t'tion.
5. The display will ask for the file
name under which the song is
stored.
6. If you are using a cassette, type 'C:'
followed by the 'RETURN' key. This
will cause the next file [aprerecord-
ed song) on the cassette to be loaded.
If you are using a disk, then type
'D:SONG' followed by the
'RETURN'. This will cause the song
MICRO
alread y provided in the fil e
'D:SONG' to be loaded into your
Atari.
7. When the song has been loaded,
Atari Player will tell you how many
notes have been loaded, wait a few
seconds, and then return to the
original menu.
8. Press the 2 key to select the
'REPLAYSONG' option.
9. You will now be treated to a rousing
song played automatically on your
Atari computer.
Using the Atari Player
After choosing the 'PLAY SONG' op-
tion from the menu, the program will
prompt you for the name of your song.
(This is not the same thing as the file
name that disk users have to supply
when performing a save or a load. The
name is saved with the song just for
convenience and has no bearing on the
song itself.) Then a representation of
the Atari keyboard is printed on the
screen in the format of a two-keyboard
organ. The bottom row of keys
represents the lowest notes, starting
with 'C' and ascending alphabetically.
The second row of keys represents the
sharps and flats (black keys) that cor-
respond to the first row. Note that
there are inbetween keys on the second
row of the Atari for every pair of first-
row notes. This is different than the
normal organ keyboard and means that
some of the second-row keys do notsound when pressed lA, F, and K).
These keys can be used to introduce
rests into your song.
The third row ofkeys represents the
second keyboard of the organ, starting
at middle 'F' and ascending to high 'B'.
The top row of keys represents the
sharps and flats corresponding to this
second keyboard. When you have
mastered the keyboard, you are well on
your way to composing your own
music. Read on.
At the beginning, the program waits
for you to start the song. This is one ofthe few times when a pause doesn't
count. Once you start playing, the
computer keeps track of every note and
its length exactly as you play it. Prac-
tice a bit to get the feel of the keyboard.
It is not as simple as a piano, especially
with the letters on the keys distracting
you from what the true note is. The
white keys on the display have the ac-
tual name of the note printed over the
keyboard name of the key to help keep
you oriented.
After you start a song, you may
49
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 52/100
discover that you didn't mean to playa
particular note. Fortunately there is a
mistake-recovery method. As soon as
you realize that you have made an error
(sometimes the first note is an error),
press the space bar to pause momen-
tarily. You will be presented with
several options.
1. CONTINUE allows you to start
playing the song at exactly the point
where you stopped. This is a usefultechnique for the times when you
become confused as to which note
you want to play next; press the
space bar to pause, regather your
wits, and press 'C' to continue from
where you stopped.
2. REPLAY will play the song up
through the current note so that you
can inspect your masterpiece as you
input and make corrections if
necessary. This option can bechosen
as many times as you need it.
3. BACKUP is the option for whichyou've been waiting. This allows
you to remove one note at a time
from the current song, all the way
back to the beginning if you want.
When you make a mistake and press
the space bar to pause, press the 'B'
option and the note you are erasing
will sound. Another 'B' will erase
the next note, and soon. Then press-
ing 'C' will allow you to continue
your song from the point to which
you have backed up.
If , no matter how hard you try, you
can't seem to get the song perfect, then
the next step is to use the editor (option
5), which will allow you to manipulate
the more obscure aspects of your song.
Using the Editor
The Editor option enables you to fix
any minor (or major) mistakes that
may creep into your performance. It
allows complete control over every
note in your song; the note, octave, and
duration can all be changed to your
specifications. And when using the in-sertion feature, you can start from
scratch and construct your own song
without ever playing a note on the
Player keyboard! The Editor option is
the perfect complement toAtari Player.
The first thing that the editor does
is to list the notes currently inmemory
in groups of 30. These are notes that
have been either entered from the
keyboard or loaded in from apreviously
saved song. The 'Next' and 'Previous'commands allow you to page forward
and backward through the note tables
50
Listing 1: Atari Player/Editor
~O REM ATARI PLAYER/EDITOR
30 OPEN U~,4,O."K :••:GOSUB ~ZOOO40 GOSUB ~OOOO50 GET U~,A:IF A<4' OR A>55 THEN 5
o60 A=A-46:GOSUB A*~OOO:GOTO 40
~OOO PRINT :PRINT "Inpu't: song naMe
..."; :INPUT B$: IF B$=···· THEN B
$="NONAME"
~O~O 11,1=0~oaO~5 G05UB ~4000~020 D=O
~030 D=D+~:A=PEEK~764~ :IF A=255 TH
EN ~030~040 POKE 764,255:G05UB '500:S0UND
0,0,0 ..0
~060 IF A=~2 THEN SOUND O..O..O..O:MA
H=V+~:H~V+~~=O:GOTO ~~20~070 IF A=33 THEN MAH=V+~:GOSUB 60
OO:GOTO ~0~5~060 IF'A>62 THEN A=3
~O'O TP=A:SOUND O,ASC~PITCH$~TP+~,TP+~~~,DS,L
~~OO V=V+~:IF V=LN THEN W~V~=O:GOT
o ~~20~~~O GOTO ~020~~20 POKE CF ..O:RETURN
·2000 ? ""PLAYING": V=~20~0 IF H~V~=0 THEN ? "?NO SONG IN
MEMORY": GOTO '000
2020 GOSUB 'ZOO:IF TP=O AND D=O TH
EN RETURN
2030 SOUND O,O ..O,O:GOSUB '600:11,1=11,
~:IF V>=MAK THEN SOUND 0,0,0,0
:V=IV=V-~: RETURN
2040 IF PEEK~764~<>255 THEN POKE 7
64,255:RETURN
Z050 GOTO 20Z0
3000 GOSUB '~OO:OPEN U2,6,0,F$:TRA
P 350030~0 PRINT UZ;B$
3020 FOR V=~ TO MAK:? U2;W~V~ :NEHT
V
3040 CLOSE UZ:? ··SAVED
OTES TO ";F$ :GOTO
3500 CLOSE UZ:? "FILE
OTO '~~O4000 GOSUB '~OO:OPEN U2,4,0,F$:TRA
P 3500
40~0 INPUT UZ,B$
4020 INPUT UZ;A:W~V~=A40~0 IF A>O THEN V=V+~:GOTO 40Z0
4040 MAH=V: CLOSE UZ:? "LOADED ••;MA
K-~;" NOTES FROM ";F$: GOTO '00
o5000 POKE ZO~,5:POKE CF,~:POKE 62.
o5020 11,1=0
5030 POKE CF..:POKE 703,24:PRINT
"CURRENT SONG: ";B$
503Z POSITION .,~:PRINT •••.:::~• II::.
";MAK-~;" N
'000I/O ERROR": G
o L "N 0 L"; :COLOR 2: PLOT ~6, 2 : DRAWTO ~6.~,
5048 FOR HK=Z TO 2Z STEP 20:FOR YY
=3 TO ~7:V=V+~5060 GOSUB 'ZOO:IF W~V~=O THEN MAK
=11,1POSITION KK, YY :PRINT "END":
GOTO 5~3e
MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 53/100
5062 NO=ASCCNTOCTSCTP+1,TP+1~~:O=INTCNO/13~ :Y=NO-INTCNO/13~*13:NS=NTSCY*2+1,Y*2+2~
5080 POSITION HHYY:PRNT UNS;••
..;0;.. ..; D
50~0 NEHT YY:NEHT HH5130 POSITION 0,20:POKE 703,4:POKE
CFO
5140 PRNT ··[:]EKT ~REUIOUS, [!iURAE
NT ORm··: AS=····:INPUT AS:PP=U:IF AS=···· THENAS=··Z··
5150 U=OIF ASCCAS~>=48 AHDA5CCAS
~<=57 THEN U=UALCAS~:PP=PP-305160 IF u=o THEN5430
5170 PRNT ··[!iHANGE [!lELETE OR[J
NSERT··
5180 G050UB5540: IF AS=··C·· THEN520
o51~0 GOTO54605200 GOSUB~2005240 IF WCU~=O THEN52705250 Y=ASCCNTOCTSCTP+1,TP+1~~:O=IN
TCY/13~:N=Y-INTCY/13~*135260 PRNT ··flliiNOTENUMBER: ••;U
5270 AS=····: PRNT ··NEWLENGTH··,: IN
PUT AS:IF AS=···· THEN5140
5280 IF AS<>••/ •• THEND=UALCAS~52~0 AS=····: PRNT ··NEWNOTE:··,: INPU
TAS:IF AS=···· THEN 53~05300 IF AS<>••/ •• THENNS=AS: IF I:FLENC
NS~>2 THEN 52~05302 IF LENCNS~=1 THENNSC2~=••••5310 FORN=OTO12:IF NTSCN*2+1,N*
2+2~<>NSTHENNEHTN:PRNT ··?NOTENOTFOUND··: GOTO52~0
5320 AS=····: PRNT ··NEWOCTAUE:··, :IN
PUT AS:IF AS=···· THEN 53~05325 IF UALCAS~>2 THENAS=··2··5330 IF AS<>••/ •• THENO=UALCAS~53~0 NT=N+O*12:FOR TP=OTO62:IF A
5oCCNTOCTSCTP+1,TP+1~~<>NT THEN
NEHT TP
53~2 G050UB~500:REM PACKIT INTO WCU~
5400 U=U+1:GOTO 5200
5415 IF U<OTHENu=o
5420 PRNT ··fIIii··: GOTO58385438 IF AS=··P·· THENU=PP-60: GOTO5
415
5440 IF AS<> · H · · THEN54585442 POKE703,24: PRNT ··fIIii··: IF PP+2
~>MAH THENPP=MAH-305443 IF PP<8 THENpp=o
5444 U=PP:GOTO 5030
5450 IF AS=··C·· THENU=PP-30: GOTO5
415
5458 RETURN
5460 IF AS=··D··
5480 FORI=MAH
=WCI~ :NEHT40
5510 FORI=U TOMAH:WCI~=WCI+1':NEHT I:MAH=MAH-1:GOTO 5140
5540 GET1:11,A:AS=CHRSCA~:IF AS=····THEN5540
RETURN
END
THEN5510
TOUSTEP -1:WCI+1~I:MAH=MAH+1:GOTO 51
5558
5~~~
6008
6010
:?. .
TEMPO
HEWTEMPO
•• ; '5
••; :IN
?
?
:?
PUT
6020 IF
50
50<1THEN6010
No. 68 . January 1984 MICRO
so that you can look for the note (or
notes) that you wish to change. The
'Current' command simply redisplays
the table starting at the same note.
This option is usually used after an in-
sert, delete, or change to see how the
song looks.
The' #' option allows you to change
the current notes in memory, one at a
time; Note that the editor does not
want the number sign itself; it is expec-ting a number. Also, it does not change
any notes on the tape or disk, so don't
worry about making a mistake. Experi-
ment with changing notes and then
play them together to see how they
sound.
Pressing the return at the 'NEW
LENGTH:' prompt will return you to
the main menu. Pressing return at any
other prompt will leave the rest of the
parts of the note unchanged and skip
ahead to the next note. This allows you
to change the lengths without re-
entering the remaining values that youdon't want to change.
Pressing the' /' and return at any
prompt preserves that one value and
jumps to the next prompt. For example,
if you don't want to change a value,
such as length, but do want to change
the note or octave, press' /' and it will
skip over the values you want to save
without your having to retype them.
The insert option moves all the
notes (including the onewhose number
you entered) forward one position and
then returns you to the 'Next,
Previous, Current, or #' prompt. Youmight want to use the 'Current' option
now to see how the song looks. Change
the note that was at the point of inser-
tion to whatever specifications you
want and you have just entered a note.
Delete moves all the notes follow-
ing the one you specified down one
position, effectively erasing that note.
As with the insert option, you will be
returned to the 'Next, Previous,
Current, or #' prompt. Again, you may
want to use the 'Current' option to see
how the song looks after the deletion.
When you are prompted for a new
note, the only notes that will be ac-
cepted are 'C', 'C#', etc., as listed in
the data statement (line 13010). A rest
is indicated by 'I ]'.The program looks
up your note in the note table and con-
verts it into the number that represents
that particular note. If it can't find that
note, it will giveyou the '?NOTE NOT
FOUND.' error and return to the 'NEW
NOTE' prompt to give you another
chance to change it.
51
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 54/100
Other Menu Options
There are five additional menu
options that allow you to hear your
song, load a song from or save a
song to the tape player, change the
tempo of the song, or quit.
Choosing option 2, 'REPLAY
SONG,' will play the song current-
ly in memory over the television
speaker. The routine uses the cur-
rent tempo for the speed at which
to play the song. If there are no
notes in the song, then the error
'?NO SONG IN MEMORY' is
printed and you are returned to the
menu.
'SAVE' and 'LOAD' options are
numbered 3 and 4, respectively. To
save the current song, choose op-
tion 3 and enter the file name of
the song to be stored. If you are
using a cassette you can specify on-
ly 'C:' as your file name. If you are
using a disk, the file name must bea standard disk file name. Note
that this file name and the name of
the song you specify when you
choose option 1 (PLAYSONG) are
not the same. The name refers to
the name that you wish the song to
be titled - for the sake of conve-
nience only. The file name ismere-
ly where you want the song to be
stored and applies only to disk
users. I f you are using a cassette-
based system you will beprompted
to press PLAYand RECORD on the
tape player. When the song is sav-ed, the number of notes and the file
in which they are saved are
displayed and you are returned to
the menu. I f you are using the tape
player, it will stop.
Option 4 is similar in operation
to option 3. Remember that when
you LOAD a new song, you will
erase any song currently in
memory; you must SAVE the cur-
rent song (ifyou want to keep it for
later use) before loading a new one.
The file name prompt will now
appear. ( I f you areusing a cassette,there are no file names that you
can specify. The tape will read
from where it was left last.] When
the song is loaded, as when saving,
the number of notes and the file
they were in are displayed and you
are returned to the menu. Again, if
applicable, the tape player will
stop.To change the current tempo
setting, choose option 5. The
minimum (fastest) setting allowed
is '1'. There is no restriction on the
52
6030 RETURN
7000 CLOSE "~:GRAPHICS O:END
6000 SOUND O~O~O~O:GOSUB ~200
60~0 ? ••" ••:POSITION 3,3
6020 ? ··CHOICES:··:? :?
6030 ? ··~ONTINUE··
6040 ? ··I::]EPLAY··
6050 ? ··mACK UP ~ NOTE··:?6060 ? ··WHICH? ••;
6070 G05UB 5540:REM GET ROUTINE
6060 IF AS=··C·· THEN GOSUB ~200: SOU
ND O,O~O~O:RETURN60~0 IF AS=··R·· THEN GOSUB 2000: GOT
o 60~0
IF AS<> ··B·· THEN 6070
IF U=O THEN 6070
GOSUB ~200:GOSUB ~600:U=U-~
SOUND O~O~O~O:GOTO 6070
FOR I=~ TO 300:NEHT I:RETURNPRINT :PRINT ••
6~00
6~~0
6~206~30
~OOO~~OO c: f'or casse"t:"t:e
D:f'ilenaMe f'or diSk
~~05 PRINT· •Ent:er e i1.naMe . . .•• ; :I N
PUT FS~~~O U=~: IF FS <> ··C :.. THEN RETURN
~~50 ? ··INSERT SONG TAPE AMD PRESS
I:H'II:I:I"
GET U~~A:? :POKE CF~O:RETURNTP=ZNTCWCU~~~OOO~
D=WCU~-TP*~OOO:RETURN
IF D>~~~ THEN D=~~~
WCV~=INTCTP*~OOO+D~:RETURN
SOU~D O~ASCCPITCHSCTP+~~TP+~~
~~60~200
~2~0
~500
~5~0
~600~,DS,L
~6~0 FOR I=~ TO S*D~6:NEKT I:RETUR
N
~OOOO GRAPHICS O:SOUND O~O,O~O:POK
E CF,~:SETCOLOR ~~O,O:SETCOLOR
Z~3~4:SETCOLOR 4~7~6
~Oe30 ? ••"......... ATARI PLAYER·· :? :? :V=O
~0040 ? ..
~0050~0060
~0070
~0075
~0060
~OO~O.J..8.1.0e POKE CF. 8 :? ..
? ••;: RETURN
~2000 S=~0:LN=500:DS=~0:L=6:CF=752
~20~0 DIM WCLN~,PITCHSC63~~NTSC26~
~FSC~4~~BSC20)~NSC3)~ASC3),NTOCTSC63)
~2020 RESTORE :BS=··NONAME··
~204Z READ PITCHS,NTS,NTOCT$
~2050 RETURN
~3000 DATA r~f' ••••• C.u~.-~~~.~~D.L~ ••U.Y.1.~~ ••e.H5.<Q£*.Y.2.
.! ••H•..::iI~30~0 DATA C CUD DUE F FUG GUA AUB
L1
~3020 DATA ........+- .... !.u+.~y.....,.~ I., . ... ~• .-+ .--.. . •. r"'_&''' ..,.. L . _ . . . . . . ..S"~ ••/~
~4eOO POKE 82 ~Z: POKE CF~~:? ••......PLA
Y WHEN READY SONG:··; BS: SETCO
LOR ~~O,O:SETCOLOR 2~~2~6~40~0 ? ··SPACE BAR TO PAUSE, RETUR
N TO END SONG··;
~4020 ? ··A, F, OR K
[] PLAY SONG··
~ REPLAY SONG··~ SAVE SONG··
In LOAD SONG··
~ EDIT SONG··
rn CHANGE TEMPO··
~
?? ••
? ..? ••
? ••? QUIT ...••
CHOOSE
REST··
MICRO No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 55/100
~4030 ? " " 32. ASCII Codes
Because computers cannot handle
J..4040 ? " " I --- -- - anything other than numbers, a._- I " " method for handling characters such as
.1.4050 ? ""I --- -- - punctuation marks, letters of the._- I"" alphabet, or any other character, is
.1.4060 ? ""I .... E::. ~ . . . . ~ needed. What has been devised is the
.1K !lI ~ I"" ASCII codes (American Standard Code.1.4078 ? ""I --- --
-for Information Interchange), which are._- I"" numerical represen tations of each
.1.4080 ?
""I I character for the computer to handleI I"" internall y. Most users never see these.1.40'0 ? ""I [ i l l rrli r . 1 1 m l [!II m l ( ] j l [ i l l numbers for they are converted back to
ffil r i l l rn I"" characters when displayed on the.1.4.1.80 ? " " I I
screen, but they are neccessary whenI I""
.1.4.1..1.0 ? ""I a l WI EI RI TI VI ul IIdealing with such specific statements
01 pi I " "as the Atari GET.
.1.4.1.28 ?
.1.4.1.38 ? " " .1. 2_
" "~4.1.40 ? " " -- ----
I"".1.4.1.50 ? " "
-- ----I"".1.4.1.68 ? "" ~~ ~m:.~
~ .. I " ".1.4.1.70 ? -- ---- I " "J..4.1.88 ? II I""
.1.4.1.'0 ? r!11 m l ( ] j l [ i l l rrli [ i l l m lr!11 m l ~ I""
.1.4280 ? " " I II I " "
.1.42.1.8 ? " " I z l HI el UI B I MI M I,I .I / I " "
.1.4228 ?
- - - - - - - - - - - - - - " " . :RETURM
maximum (slowest) setting, except
for the fairly large internal limits of
the Atari. However, even a setting
of just 100 will result in extremely
long notes.
When you are finished with
Atari Player and want to return to
BASIC, choose option 6. Always
remember to save any song that
you are currently working on
before choosing this option. If youforget this rule, typing 'GOT020'
might enable you to return to the
program without losing your song.
Programming Concepts
Using a Menu to Make a Choice
1. Input with a Single Keystroke
Normally input from devices is
done with the INPUT statement. The
only limitation of this statement is that
it requires the input data to be followed
by a carriage return. Thus, any input
from the keyboard using this method
would require at least two keystokes -
No. 68 - January 1984
one for the character being input and
one for the return key. The way around
this is illustrated in program lines 30
and 50.Line 30 opens the keyboard for in-
put. This means exactly what it seems:
you can now input from the keyboard.
The open statement is usually used for
access to files on cassette or disk, but it
can be used for any connected device,
such as the keyboard and even the
screen. The device specification for the
keyboard is 'K:', which is the open
statement's fourth parameter.
Because a single keystroke input is
preferred, the keyboard input for the
menu (line50) is donewith a GET. The
GET statement waits for one character
of data from the keyboard; i.e., the
single keystroke. Thus no carriage
return is required and an option may be
selected by striking a single key.
However, the data input is not a
character, or a letter, but rather a
number. This number is the numerical
representation of the typed letter and is
called an ASCII code.
MICRO
3. Using a Menu to Make a Choice:
Selection by Number
When you run Atari Player, the first
display that you see is a list (or menu)
that tells you what options areavailable. Each item on the menu is
selected by pressing the number
associated with it. The BASICprogram
steps required to evaluate your choice
are in lines 50 and 60.
IS. tiiET 111 ..A:zr A<4-' OR
A> 515 THIr: ••••• a:;A-"OltiiOSUIl
A*.1.•••• GOTO 48
Line 50 gets the ASCII code for the
keyboard character pressed and stores it
in variable A. The following IF...THEN
statement checks to seewhether or not
the character typed was a number.
Note that, as stated above, the GET
statement gets the internal code for the
character typed rather than the
character itself. This means that the
program has to check for the characters
1-9 rather than the numbers 1-9. If Ais
less than 49 [ASCII1)orgreater than 55
(ASCII 7), then the character typed is
ignored and the program returns to line
30 to get another choice from the
keyboard.
Line 60 does the actual branching to
the appropriate routine. Since the only
options available are listed 1 through 7,
and the program routines for each start
on the line numbers that are multiples
of a thousand [1000-7000), the bran-
ching to these routines can be done by
formulae. All that is needed to branch
to the appropriate routine is to multi-
ply the option number chosen by 1000
and then perform a GOSUB to that
result. Thus, 48 (ASCII0) is subtracted
from the code in A to convert it to one
of the numbers 1-7. Then a GOSUB to
the line number A • 1000 is performed.
53
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 56/100
This is a useful space conservation
technique. The only other way to do
this would be to have a fairly large
ON...GOSUB statement followed by
the starting line number of every
subroutine.
4. Selecting by First Letter
If the space bar is pressed during the
'PLAY SONG,' then another menu is
displayed.
The first character of each item isdisplayed in reverse video to indicate
which letter is to be pressed on the
keyboard to select that choice. The
routine that gets the characters from
the keyboard is at line 5540. Note that
this routine converts the number put in
variable A into a string (A$) via the
CHR$ command. This is done so that
the routine will return a string holding
the choice as opposed to returning the
ASCIIvalue of the choice. That is, this
routine returns a letter, which is then
serviced by its own IF...THEN-
statement.
tirely. For the beginner, using this loca-
tion is rather difficult as the codes
follow no obvious pattern. For in-
stance, a space is a 33, the letter A is
63, the B is 21, and so on. Therefore,
the user must know which keys to ex-
pect ahead of time. The following short
routine can be used to discover the
various key codes. After typing RUN,
simply hit a few keys; their correspon-
ding codes will come up on the screen.
10 PRINT PEEK(764):GOTO 10
Lines 1030, 1060, and 1070 show
how Atari Player uses this location.
Note that it is POKEdwith 255 after be-
ing read. This insures that the same
key can be hit twice and registered as
two keys. That is, because the location
holds the last key hit, if you were to
hit, say, the 'Z' key twice, and if the
location was not reset after each read, it
simply would not change from the first
'Z' to the next. This means that twonotes would be read as one fwith a
8078 G05UB 5540:REM GET88a8 X~ A$=C THEN G05UB
••8.8LO:RETURN88'8 IF A~=R THEN G05UD
88.1.8.1•• IP A$<>B THEN 8.7.
ROUTINE'Za.:50UND
Z.ee:fiiOTO
If there are only a few choices, as in
this example, then there is not a lot of
code. If there were many choices, then
the amount of code to service the
letters could be significant.
5. Accessing the Keyboard for Real-
Time Situations
The above method of selecting by
first letter using the GET statement is
fine for most situations involving input
with a single keystroke, but it is severe-
ly limited in real-time applications.
This is because the GET statement
actually waits for a key to be struck.
For instance, suppose you were writing
a game that needed to keep track of the
elapsed time between keystrokes. This
would be impossible with the GET
statement because the loop required tokeep track of the time could never be
executed. Such was the problem in
writing the PLAYSONG option, which
has to keep track of such things.
The Atari uses memory location
764 as the place to keep the last key hit.
That is, whenever a key is struck (no
matter what program is running) loca-
tion 764 is filled with a number that
represents the last key pressed. But this
number is not ASCII. This location
uses the actual hardwired codes for the
keyboard - a different set of codes en-
54
rather long duration). Resetting loca-
tion 764 also allows us to keep track of
the duration in the first place (line
1030). By checking for the 255, we
know that the key has not yet been hit
and that the duration should then be
incremented.
Space Saving with Arrays
Atari Player uses many arrays - for the
storage of its notes, keyboard entries,
and other such internal data. There are
many ways of storing this information
in the arrays. This section deals with
the most economical way possible for
storing the types of information
contained in Atari Player.
1. Numeric Arrays
Atari Player could have stored all of its
information in the form of numerical
arrays as all of its information is, in-
deed, numbers. But numbers are very
costly to store in BASIC arrays,
especially on the Atari. Atari BASIC
'eats' up 15bytes plus 6 bytes for every
cell in the array. This is not including
the space that is eaten up by the
variable name and the DIM statement
itself. For example, an array that was
dimensioned for 100 cells would eat up
15 plus 6 times 100 - or 615 bytes I
Therefore, the only array that we made
numerical was W, and it was dimen-
sioned for a whopping 501 cells. Over
3000 bytes is used to store it.However, things could be worse.
The Warray has a little more informa-
tion than normal crammed into it. In
fact, that one array is made up of both
the keystroke (for the note played) and
the length of time that it is played. It
was necessary to perform such a
numerical combination to keep from
wasting an exorbitant amount of
memory. But before we get into such a
space-saving trick, let's first examine
.how not to program the storage area.
As mentioned briefly before, each
note that you play involves two piecesof information that must be saved by
Atari Player: the number (keystroke) of
the note and the duration of the note.
We could define a two-dimensional
array that contains a number for both
parts of each note: e.g., DIM W(500,l)
would reserve space for 500 notes (the
zeroth element is not used) with two
numbers per note. How much memory
do you think this would take? It really
is deceiving. Since 500 times 2 is 1000,
is that the total number of bytes re-
quired? No! Each Atari BASIC array
number requires six bytes of memory.Therefore, it would take 6 • 1000, or
6000, bytes ofmemory! On a 16KAtari
(which, by the way, has only 13000
some bytes left after the operating
system has taken its share) that leaves
a little over 7K for the rest of the
program.
You have to get a bit tricky to
squeeze more out of the song space; but
there is nothing wrong with getting
tricky when writing programs. In fact,
that can be half the fun! To really
squeeze the memory in Atari Player,
we took advantage of the size of thenumber that the Atari arrays can hold.
The two values that we need tokeep for
each note played are the note number
(0 to 38) and the duration (which is
limited to 0 to 999 units). If only we
could pack both of these individual
values into a single number for storage
G05UB 'S•• :REM PACK XT XNTO WC:U,
MICRO 1984o. 68 - January
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 57/100
and then unpack them when we needed
to use them. Well, good news - we
can!
The technique to pack the numbers
is shown in line 5392.
This equation is not as difficult as it
may at first appear.
W (V)is the array of notes where V
is the number of the note in
the song
+TP 1000 multiplies the
keystroke number (0 to 63) by 1000
+D adds the duration value (0 to
999)
All we have done is multiply the
keystroke value that we need to saveby
enough tomake sure it does not overlap
with the duration value. This insures
that we will be able to unpack the
separate parts later. The unpacking is a
bit more difficult than the packing, but
conceptually it is simple. All we needto do is reverse the packing process.
This is accomplished in the following
lines:
elements are of equal size this is fairly
simple because the starting character
position of any of the elements can be
calculated using the index. Take for
example the following lines:
end of line 5062. Note that the
elements in this case must be two
characters long: a note, 'C' for
instance, followed byeither a space or a
sharp sign, '#'.
.1.0DIM NAMESC:30:J28 NAMES=··TOM DICK HARRYJIMBO
RALPHBILLY".1.00 INPUT INDEH: REM ---INDEH
'START'S AT 0---
.1..1.0RINT NAMESC:INDEH*5+.1.,INDEH*5+5:J
.1.20 GOTO .1.00
This routine simulates a string
array where the elements are first
names. In Atari BASIC, to get part of a
string, you specify the string name
followed by the starting and ending
character position of the substring you
want. Inline l IO,what is printed is the
substring that starts with character
position INDEX. 5 + 1 and ends with
INDEX-S + 5. Thus, because the
character position is calculated, everyelement must be the same length. Ifthey aren't, and this is usually the case,
then the smaller ones must be padded
~200 TP=INTC:WC:V:J~.1.080:J~2.1.0 D=WC:V:J-TP*.1.000:RETURN
Line 9200 restores the note number
by dividing by 1000.
Line 9210 restores the duration by
subtracting the note number
multiplied by 1000. This simply
returns the remainder that was shearedoff by the INT 1000.
The above lines of program take the
single integer value and convert it back
into two separate parts. This method
results in a SOO-note song requiring
only 501 array slots to store it, at six
bytes per number, for a total storage of
just over 3000 bytes - only half the
amount that would be needed if we
stored the two values separately!
2. Simulating String Arrays
NT$ is a string that holds all the possi-
ble note symbols. Normally these
symbols would be entered separately in
a string array, but the Atari does not
have this capability. (Itdoes dimension
strings, but this refers only to the
lengths of the strings and that doesn't
help us much. ) Instead, all string infor-
mation must be concatenated, or
'strung together, 'one after another in a
single string. This means that the only
way to access the different elements is
to access the different character loca-
tions within the string. As long as the
No. 68 . January 1984
with spaces. Every element must start
at every character position that is a
multiple of some number in order for
this particular technique to work.
The note symbols used by Atari
Player are stored the same way. Theyare stored initially in line 13010 and
then READ in as a single string (NT$)
in the initialization routine at lines
12000 through 12050. Assuming Y is
the note number (0-12), the following
routine will set N$ equal to the
corresponding note symbol:
10 N$=NT$(Y"2+1,Y"2+2)
In fact, this very routine is found at the
There is another way that strings
are used in Atari Player. It is a bit more
complex but basically entails the same
concepts. The difference lies in the fact
that this method is used to store a
series of numeric values such as would
normally be done with numeric arrays.
The savings are space and time and for
the following reasons.
Strings use up only one byte of
memory per character. A little more isused up in the variable name and such,
but that is essentially it. So, ifwewere
to somehow convert every number that
is in a numeric array (six bytes) to a
string character (one byte), we would
have a savings of five bytes per ele-
ment. Thus, a numeric array dimen-
sioned for 100 elements that would
normally eat up 600 bytes of storage
could be made to fit in merely 100
bytes.
Loading in the initial values in a
string is very fast, whereas loading in
the initial values in an array is tedious-ly slow. This is because string loading
can be done with a single statement
and all the elements can be loaded in at
once; the elements in an array must be
loaded in one after another in a loop.
For arrays of ten elements or less, con-
version to a string is hardly worth the
effort because the loading is so short
and, therefore, does not take up much
time anyway. But for larger arrays,
string conversion is definitely worth-
.1.2000 S=.1.0:LN=580:D'S=.1.0:L=8:CF=752
.1.20.1.0DIM WC:LN:J,PITCHSC:63:J,NTSC:26:J
,FSC:.1.4:J,BSC:20:J,NSC:3:J,ASC:3:J,NTO
CTSC:63:J
.1.2028 RESTORE :BS=··NONAME··
.1.2042 READ PITCHS,NTS,NTOCTS
.1.2050 RETURN
.1.3080 DATA r~~ ••••• c:.n~.-~~~.~mD.L~••U.~.1~~••e.HS.<Q£*.Y.2..!••U•.c;n
.1.30.1.0DATA C CUD DUE F FnG GnA AUB
L]
.1.3028 DATA .........- .... !.n<E-.~Y."""'.~I~ . _ I i :¥+.-.. .•. r . . . . . . ~ . . . . . - . . . . . . . ..S"~••/"MICRO 55
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 58/100
while because the loading time of even
several minutes can be cut down to
only a few seconds at most.
Lines 12042, 13000, and 13020
demonstrate how the strings are stored
and read in.
There are a couple of problems
when working with these strings. First,
when addressing the element you
must, in reality, address the individual
characters of the string. That is, the
index that you would normally use to
access any of the elements in the
numeric arrays is now the character
position in the string. But element
positions in arrays start at zero (0 )
while string positions start at one (1).
Therefore, when accessing the data in
strings, you must either ignore the
zeroth element entirely and start the
element numbers off at one, or add one
to the element number so that the ele-
ment that was previously numbered
zero will reside at string position one
(1). Line 9800 demonstrates how this
latter method is used in Atari Player.
number that could possibly bestored in
one is 11111111 binary (255 decimal).
Also, the number must be a non-
negative integer. To get the number in
the string as an element it must becon-
verted to a character via the CHR$
~800 SOUND O,ASCCPITCH$CTP+1,TP+1))DS~L
where TP is the index to the string
array PITCH$.
The second problem is a little
tougher for the beginner to under-
stand. Since each character in a string
is essentially one byte of storage inter-
nally, the size of the numbers you can
store are limited to what a .byte can
store. Because, as you may know, bytes
are only eight bits long, the largest
Atari Player Variable Usage
Constants
CF
DS
L
LN
NT$
NTOCT$
PITCH$
Variables
A
D
I
MAX
N
NT
oS
TPV
W ()
XXyy
A$
B$
F$
N$
POKE location for cursor inhibit
Sound distortion
Sound loudness
Last element available in Warray
String' array' of all note symbols
Note/ octave conversion from keystroke
number. String 'array' of sound pitches for
conversion from keystroke
ASCII value from keyboard
Duration for current note
Loop counter
Position of the zero element in the song
(end of song)
Note number (0-12)
Actual note (0-12) plus octave (0-2)
Note's octave
Tempo setting (speed of song)
Keystroke/note equivalentNote pointer for song
Array of notes and durations
X position of editor's output
Y position of editor's output
Input string from keyboard
Song name
File name
Note symbol
56 MICRO
function. This function will turn the
number specified into the character
whose ASCII value is that number so
that it may be stored in a string. When
accessing that element, to get the
number from the character, the ASC
function must be used. This function
converts the string specified
(presumably an element in the string]
to its ASCII equivalent. (See Program-
ming Concepts 2: ASCII Codes.)
S A F EW A R p M I n s u r a n ce p ro v i d e s f u l l
r e p l a ce m e n t o f h a rd w a re , m e d i a a n d
p u r c ha s e d s o f t w a re a f t e r a l o w $ 5 0 d e d u c t i b l e
A s l i t t l e a s $ 3 5 / y r c o v e r s :
• F i r e • T he f t • P o w e r S u r g e s
• E a r t h q u a ke • W a te r D a m a ge • A u t o A c c i d e n t
S elect th e coiera ge y ou w ant from th e ta ble.
Amount or Insurance Annual Premium
Up 1 0 $ 2.000 $ 35s 2.001-$ 5000 $ 60
s 5001 -$ 8 .000 $ 7 5
s 8.001-$11.000 $ 90
$11.001-$14.000 $]05
C a ll f o r h ig he r c o ve ra g e s.
~ o t a v a il 10 A K . DC H I K Y 1 - ' \ IE. ~ S . \ I V . S C . o r W Y .
Ca ll f or immed ia te p r ot ec ti on .
1-800-848-3469( In O h io ca ll 1-800-848-2112)
@ m t l l i t R E )C O LC MB IA :- < AT IO N A L G EN ER A .L A G E~ CY
No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 59/100
I A i C A O r uFrom Here to Atari by Paul s. Swanson
The number of new peripherals you can add to your Atari
computer has been steadily increasing. The ATRSOOOs a
device produced by SWPMicrocomputer Product, Inc. that
adds CP/M and a few other interesting capabilities.
Another addition is a modem, which opens up a new
direction to microcomputer users. In addition to the
modems which can be attached to the Atari computers
directly, any RS232C modem can be used either with the
S50 interface module or under CP/M with the ATRSOOO.
The ATR8000
This peripheral is actually a computer on its own and can
be used with or without an Atari computer attached. It
does have the standard Atari serial bus connectors, but it
can use any RS232C terminal instead of an Atari,
connected through its modem port.
I have had anATRSOOOnow for about a month and use
it to connect three Radio Shack disks to my Atari
computer. With such a setup, the drives can be used as
Atari drives when not in CP/M mode, or as dual density
CP/M drives in CP/M mode.
Using the ATRSOOOas a peripheral to the Atari
computer [i.e., not in CP/M mode) allows mixing the
drives so that drive 1may be connected to the disk port of
the ATRSOOOand may be a Radio Shack or other non-Atari
drive and drive 2 may be an Atari SlO or 1050 connected
along the serial I/O bus. In the CP/M mode, an Atari SlO
or 1050 disk drive may not be used.Two other devices that can bedirectly connected to the
ATRSOOOare parallel printers and RS232 devices, such as a
serial printer or a modem. When the ATRSOOOs not being
used for CP/ M, it will act as a printer buffer for the printer
connected to it. A 64K ATRSOOOprovides a 4SK printer
buffer. This buffer will work for any printer attached to the
parallel port on the ATRSOOO.t does not work for printers
that are connected using the Atari serial I/O bus or S50
interface module.
Amodem can also be connected to the ATRSOOOusing
its serial port. The modem must beRS232 compatible and
is controlled directly by the ATRSOOO.The modem
connected in this fashion is not available to the Atari
computer as device "R:", but may beused under CP/M. Amodem connected to the S50 interface may beused by the
Atari computer as device "R:" when not in CP/M mode.
There are several different configurations allowed with the
ATRSOOO,particularly if you also have an S50 interface.
There are also a few drawbacks to consider. The device
does generate a large amount of television interference,
particularly if you use a ribbon cable connector for the
printer. Itmay even display an interference pattern on the
television you use as a monitor for your Atari computer. A
ferric core is supplied with the ATRSOOOo suppress this
interference (by wrapping the cable from the Atari to the
television around it) on your monitor/television. Another
problem is that you have to build cables. The pinouts are
Telecommunicating with your Atari Computer
provided in the manual and the three ports on the
ATRSOOOare edge card connectors. The printer cable
required the most work to assemble. The disk cable was
relatively easy. The Radio Shack disk cables will work
with no problem, even when using disks which are not
Radio Shack disks. The only caution with using Radio
Shack disk cables is that the drive selection is done in the
cable, so you have to put the drives onto the cable in the
correct order and the select on the disk drive must agree
with the select on the cable connector.
The ATRSOOOmanual explains how to alter a Radio
Shack drive to use it on the ATRSOOO.I ran into a slight
problem .with that, however, because the Radio Shack
drives I have are not the same kind as the ones described. If
you try this and find you have the older Radio Shack
drives, all that is required is to sever the only jumper
across the connector inside the drive. When you open the
drive, which wire to cut will be obvious.
Since most ' 'bare" disk drives will work with the
ATRSOOO,including S" drives with an alteration, it is
tempting to get an ATRSOOOnd two drives from a surplus
electronics store instead of two Atari drives if you are
upgrading to a disk system. Careful shopping can result in
drives for less than $150 each. The ATRSOOOlists at
$349.95 (16K without CP/M) or $499.95 (64K with
CP/M), which adds up to $649.95 or $799.95 - less than
the cost of the two Atari disk drives. Youwill still need the
cable and a power supply for the disk drives, but if you do
this, you will also have the printer connection with the4SK buffer and a modem port, plus CP/M if you get the
64Kversion, not to mention the ability to add a third drive
for under $150 if the power supply is adequate for three
disks.
Using CP/M with an Atari does have one serious
problem associated with it, which is that CP/M requires
an SO-column screen and the Atari screen has only 40
columns. The software that accompanies the ATRSOOO
contains a program that turns the Atari into a terminal for
CP/ M use. The screen is sectioned and moves back and
forth to allow you to see the SOcolumns with a 40-column
window.
There is a better solution for more serious CP/M users.
Austin Franklin has provided the software on a cartridgefor the SOOto allow use of his SO-column board with
CP/M. The system runs on the Atari SOOcomputer. The
SO-column board and the software for using it for the
ATRSOOOis available from Austin Franklin Associates,
Inc., 43 Grove Street, Ayer, MA 01432, (617) 772-0352.
The SO-column board lists at $2S9.95 and the software
allowing its use with the ATRSOOOists at $29.95.
Modems create one of the more unusual ways to meet
people. All over the country there are free bulletin boards
for computers to call. If you have a modem on your Atari
No. 68 - January 1984 MICRO 57
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 60/100
WORD PROCESSINGTOTL.TEXT
MAILING LIST AND LABELSTOTL.LABEL
TIME MANAGEMENT
TOTL TIME MANAGER
KEYWORD CROSSREFERENCERESEARCH ASSISTANT
For Commodore 64™ and VIC 20™
Announcing the newest members of the family •••
BUSINESS ACCOUNTING $95TOTL.BUSINESS FOR ( R ~ 2 I L )
SPELLING CHECKER $35TOTL.SPELLER (64 only) FOR ( R ~ ~ ~ i L )
$50(SUG.)OR R E T A I LDATABASEMANAGEMENTTOTL.INFOBASE
,..~~ - - - - - - - - - - - - - - - . .';';~"-{frI· Ask you r dealer about TOTL Sof twa re II •V ... or send in the coupon for fur the r I
co ~ SOFTWARE, INC. details and ordering information.
I ~ quality you can affOl'd II II 1555 Third Avenue, Walnut Creek , CA 94596 II PLEASE SEND ME MORE INFORMATION ON TOTL SOFTWARE I
I Name: I
I Address: I
I ~ I
~ - - - - - - - - - - - - - - - - - - ~8 MICRO
computer, you were probably informed amply about major
national networks where you, for a fee, can tap in and take
advantage of various services. In addition, there are many
telephone numbers you can use to connect your computer
to services that are completely free.
These free bulletin board services, or BBS's, are run
mainly by private individuals on many different types of
microcomputers. They provide a public message base,
which usually have some interesting conversations that
you can jump into, as well as other features. Many havedownloading sections where you can obtain copies of
public domain programs for your Atari. Some have
"feature articles" which are the electronic equivalent of
magazine articles. Most have private mail capability to
allow you to communicate with specific other users if you
have something private to discuss.
There are also games available for you to play on many
of these BBS's while you are connected. Bulletin files may
be read, which tell you things about the computer you
have connected with or about some recent alterations in
the services provided. Almost all of them also have a help
file you can read, which tells you how to operate the BBS.
I am now involved with two of these BBS's. One I
mentioned in a previous column, which is the Atari Worldsection of the Outpost [617-259-0181). Another I have set
up on my Atari computer. This one, Nite Lite, is on line
from 6pm to 6am [eastern time) at 617-576-2426. Both
support message bases and have bulletins, help screens
and games. Both also answer at either 300 or 1200 baud
and have lists of other boards in this area. In the near
future, I will post a list of several boards in other areas of
the country, so you will be able to call the number for Nite
Lite [please take careful note of the hours) and get a list
containing numbers that may be closer to you.
In many ways, these BBS's resemble the CB radios,
which allowed communication between people who have
never met. Some of the informality and lack of self-
consciousness that CB radios created in conversations canbe seen on the BBS's. The main difference between CB
radio and the message bases of these BBS's is that the
messages have to be typed and can be reviewed. It seems to
result in more sophisticated conversation, almost always
interesting and well worth reading.
In addition to idle chatter, discussions concerning
national or local politics, critiques concerning news items
and other discourse, the message bases are also a very good
source of help for you concerning, among other things,
your computer. If you are having a problem and don't
know how to solve it, you are looking for some hardware
or just some advice on making a decision, all you have to
do is post a message on one of the local BBS's. You will
probably have several replies within a few days and if yourproblem is interesting, you may even see messages where
other people have started discussing it on their own.
The future of these free BBS's looks very promising. As
an example of what can happen, both Nite Lite and the
Outpost are members of BINEXNET, which is Boston
INformation EXchange NETwork. One of the planned
functions of this network is an exchange of mail Ithemessages) among the member BBS's. If this is
implemented successfully, this network will be looking to
tie into other networks around the country to exchange
mail. The result, if successful, will be the electronic
equivalent of letter mail, except there will probably be no
charge. j\JCA()"
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 61/100
- Afar;
J A I C A O ' " A tari Re views
Product Name:Equip. req'd:
VoiceBox nAtari 800 computer with 40KofRAM
BASICCartridge Disk Drive
$124.95
The ALIENGroup
27West 23rd St.
New York City, NY 10010
(212) 741-1770
Price:
Manufacturer:
Description: The VoiceBox IIis a voice synthesizer that
connects in daisy chain fashion to the computer just as the
disk drives, etc. do. It is provided with three disks. These
disks have the demo program plus programs and dic-
tionaries which allow the use of speech or singing in your
BASIC programs. There are also several games includedwhich take advantage of the speech abilities provided.
Pluses: The synthesizer may be used to include speech
and/ or music to any BASIC program. This can make
educational programs much more interesting to younger
children. You may also become a songwriter and producer
for the Atari. A talking, singing head is provided complete
with lip movement to match the sounds. There are two
versions, one is just the outline of a head with eyes,
mouth, etc. while the other is full featured including hair.
The latter was programmed by JerryWhite and is quite good.
Minuses: The use of the VoiceBox IIis not easy if you
want the sound to be realistic. The speech is reminiscent
of someone from a Spanish speaking country who is learn-
ing English. In order to play the work back, it is necessary
to have a VoiceBox IIconnected to the computer. Thus
anyone who wants to use your speaking or singing pro-
gram would also have to have the synthesizer.
Documentation: An eighteen page manual is supplied.
This is sufficient to use the program but it could bemore
informative. New computer owners would have a difficult
time at first.
Skill level required: Intermediate computer user.
Reviewer: Richard E. Devore
Product Name:
Equip. req'd:
Mail List
Atari 400/800!l200XL with 48KAtari
BASICdisk drive printer
$39.95
MMG Micro Software
·P.O. Box 131
Marlboro, N J 07746
Price:
Manufacturer:
Description: Mail List program. This program will handle
up to 600 names per disk. It uses one complete sector per
record and allows up to 125 characters per record. EachNo. 68 - January 1984 MICRO
record may contain separate entries for "First Name'{.,"Last Name", "Address I", "Address 2", "City",
"State", "Zip Code", "Reference I", and "Reference 2" .
Features a random access search which claims to find any
file on the disk in less than 1 second. Supports use of up to
4 disk drives and multiple files on the same or different
data disks.
Pluses: Menu driven and easy to use. Sorts on "Name 2",
"City", "State", "Zip Code", "Reference I" in ascending
or descending order. Prints labels with or without the two
reference fields.
Minuses: You MUST read the directions carefully and be
sure to use OPTION 7-END to end the session or your
records may be lost.
Documentation: Atwelve page booklet gives adequate in-
structions for the programs use.
Skill level required: Any computer owner with the prere-
quisite equipment.
Reviewer: Richard E. Devore
C64-FORTHfor the Commodore 64
FORTH SOFTWARE FOR THE COMMODORE 64C64-FORTH (TM)for the Commodore 64- $99.95• Fig Forth-79 implementation with extensions• Fullfeature screen editor and macro assembler• Trace feature for easy debugging• 320x200, 2 color bit mapped graphics• 16color sprite and character graphics• Compatible with VIC peripherals including disks, data set, modem,printer and cartridges
• Extensive 144 page manual with examples and application screens• "SAVETURNKEY"normally allows application program distribu tionwithout licensing or royalties
C64-XTEND (TM)FORTH Extension for C64-FORlH - $59.95(Requires original C64-FORTH copy)
• Fullycompatible floating point package including arithmetic,relational,logical and transcendental functions
• Floating point range of 1E+38to ZE-39• String extensions including LEFT$, RIGHT$, and MID$• BCD functions for 10 digit numbers including multiply, divide, andpercentage. BCD numbers may by used for DOLLAR.CENTScalculations without the round-off error inherent in BASIC realnumbers.
• Special words are provided for inputting and outputtingDOLLAR.CENTS values
• Detailed manual with examples and applications screens
(Commodore 64 isa trademark of Commodore)
TO ORDER - Specify disk or cassette version- Check, money order, bank card, COD's add $1.50- Add $4.00 postage and handling in USA and Canada- Mass. orders add 5%sales tax- Foreign orders add 20% shipping and handling- Dealer inquiries welcome
PERfORMANCE MICRO PRODUCTS770 Dedham Street. S-2 I . - . . ICanton, MA02021 r_(617) 828<i209
59
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 62/100
cscereSf l1 .dntCl~~mayJo taJ l !K . t~y
The Radio Shack Color Computer
is certainly my favorite person-
nel computer, but the RS-232
connections arenot exactly what I had
in mind when I read that it had a serial
interface [how many other RS-232 in-
terfaces do you know of that use the
data input line as the printer busy?). In
any case, there are ways around these
things, and to connect the Hayes Smart
Modem to the CoCo, I have written
this BASIC program (including a few
POKES) to change the RS-232 input/
status line response. With this change,
the many automatic features of this
fantastic modem can be programmed
from Color Computer BASIC.
I am presently using a "64K" CoCowith Extended Disk Color BASIC, two
disks, and the "Solution" [from Frank
Hogg Labs). Since the program is fairly
simple, I am sure it can bemodified for
whatever CoCo configuration you
have. Most of the lines that are op-
tional are listed as comments.
The interface cable is made with a
DIN plug at the CoCo end and a male
DB-25P connector at the Smartmodem
end. The pin connections are described
early in the program listing. You need
Listing 1H I ' S I I A l m , .2 8 ' K E L T Y E N 6 I N E E R I N 63 8 ' W R I T T E N B Y J O H N R . K E L T Y4 8 ' L I N C O L N , N E B R A S K A b 8 S 8 S5 8 'b 8 ' U S E T H I S P R O G R A M T O C O N N E C T7 ~ ' A N D P R O G R A I I T H E H A Y E S8 8 ' S I I A R T I I D D E I IT O T H E R A D I O9~ ' S H A C K C O L O R C O I I P U T E R .H I l i '
I l ~ ' T H E C O N N E C T O R C A B L E S H O U L D1 2 8 ' C O N N E C T T O T H E R S - 2 3 2 P O R T1 3 8 ' I N T H E F O L L O W I I I G W A Y :1 4 ' '1 5 8 ' C O L O R D I N H A Y E S C O N N E C T E RIb' '1 7 " 1 C A R R I E R D E T E C T 81 8 8 ' 2 R E C E I V E D D A T A 319" 3 S I 6 N A L S R O U N D 72 S " 4 T R A N S I I I T T E D D A T A 22U'2 2 . ' T H E 3 8 ' B A U D H A Y E S 1 I 0 D E I I2 3 . ' I I A Y B E U S E D W I T H V I D E O T E X2 4 8 ' O R A N Y O T H E R T E R I I I N A L2 5 8 ' P A C K A G E T H A T A L L O N S T H E2 b 8 ' H A Y E S T O R U N A T 3 " B A U D .2 7 . '2 S B ' T H E H A Y E S N I L L O P E R A T E2 9 ' ' L O C A L L Y A T H I 6 H E R R A T E S3 1 1 8 ' B U T N O H I G H E R T H A N 3 "3 1 . ' W H I L E O N L I N E .32. J
3 3 8 ' S E E Y O U R U S E R ' S I I A N U A L
4-conductor cable and I have used as
long as about 25 feet without any
problems. It is convenient however, to
have the Smartmodem near your com-
puter setup, then you can hear the
dialup and the send and receive carrier
tones when you begin communicating.
There are many programming options
you can choose with the Hayes Smart-
modem, and these are extremely well
documented in the excellent Owner's
Manual. (In case you have not guessed,
I consider the Hayes Smartmodem my
best computing purchase to date!).
The BASICprogram is menu driven
for easeofoperation. If you BREAKand
then RUN the program again, the
Smartmodem functions are cleared
I"AT Z" is sent to the modem). To
write to the Hayes simply make the
CoCo printer busy signal constantly
high. I do this with software (remember
that the modem is sending back infor-
mation on that line as the data to
CoCo) by programming the internal
6821 bit to be an output. Not to worry!
Remember somebody said that you
cannot type in anything into your Col-
or Computer that will damage it (See
some past Rainbow editorials). This
programming is accomplished with the
following:
A65314: BA1
POKE B,51: POKE A,1: POKE B,55:
POKE A,4
Now you can talk to your modem just
like it was a printer with PRINT-2,
"your modem command".
To get back into the CoCo original
RS-232mode, use the following:
(using same A and B as above)
POKE B,1: POKE A O: POKE B,55:
POKE A,S
Now you can use a communicationspackage such as the Radio Shack
Videotex or a similar program (see
MODCOMM elsewhere in the CoCo
section) to communicate (the Videotex
will set the data rate at 300 Baud as re-
quired by the Hayes 300 model).
I know little to nothing of amateur
radio operations, but with these
POKES, a few lines of BASIC, and
possibly some hardware, the Hayes
Smartmodem can be made to send
morse code. Auxiliary relay contacts
are provided in the modem to key the
transmitter automatically. It cannothowever, be made to directly receive
morse code. Diagrams describing the
modem to radio interface are found in
the Smartmodem User Manual Appen-
dix H. Obviously some nice commer-
cial terminal packages exist for the
CoCo, but this program has made me
happy for some time now. With the
Hayes Smartmodem and the Color
Computer, I am sure you will also en-
jo y computer communications.
/AJCAO'"
3 4 1 ' F R O I I H A Y E S F O R D E T A I L S .3 5 . '3 b . ' • • • • • • • • • • • • • • • • • • • • • • • • • • •
3 7 . '3 a . ' R E S E T P R I N T E R B U S Y T O W R I T E T O H A Y E S3 9 . '4 8 . A = b 5 3 1 4 : B = A + l : P O K E I 5 ' 1 8 .4 1 . P O K E B15 1 : P O K E A : l : P D K E B , 5 5 : P D K E A , 44 2 . D I l l 1 I , ( 5 ) , S N S ( Y )4 3 . ' • • • • • • • • • • • • • • • • • • • • • • • • • • •4 4 . ' F O R C A S S E T T E O P E R A T I O ~ L Y O U4 5 8 ' C A N D E L E T E T H E D I S K C H t C K ,4 b l ' B U T I T C O U L D B E L E F T I N .4 7 . ' W I T H O R W I T H O U T D I S K S • .4 9 8 ' • • • • • • • •• • • •• • • • • • • •• • • •• • •4 9 . D K = . : ' C A S S E T T E O P T I O N5 • • I F P E E K ( 4 9 1 5 2 ) = 6 a A N D P E E K ( 4 9 1 5 3 ) = 7 5 T H E N D K = 1S . 5 ' C H E C K F O R R S D I S K R O i l5 1 . C L S : P R I N T : P R I N T " • • • • • S I I A R T 1 I 0 D E I I • • • • • •5 2 . P R I N T " B Y : K E L T Y E N 6 I N E E R I N G ·5 3 . P R I N T " • • • • • • • • • • • • • • • • • • • • • • • •5 4 . P R I N T : P R I N T " C O N N E C T C A B L E S T O 1 I 0 D E I I , ·5 4 5 P R I N T · C O I I P U T E R A N D P H O N E C O / I P A N Y . ·5 5 . P R I N T : P R I N T : P R I H T " { B R E A K A N D L I S T T H I S P R O S R A I I T O "5 5 5 P R I N T " S E E C A B L E D E T A I L S ) . "5 6 1 P R I N T : P R I N T : I N P U T " P R E S S E N T E R W H E N R E A D Y · ; A S5 7 . C L S : P R I N T5 a , P R I N T I - 2 " A T Z " : ' C L E A R 1 I 0 D E I I5 9 . ' • • • • • • • , • • • • • • • • • • • • • • • • • • •6 " ' I I E N U6 1 . I I S ( I ) = " A U T O D I A L I N G "6 2 8 1 I $ ( 2 ) = " A U T D A N S W E R I N 6 "
6 3 ' F O R S = 1 T O 260 No. 68 - January 1984ICRO
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 63/100
6 4 j P R I N T S j I l S i S )6 5 0 N E I T Sbb ~ P R I N T : P R I N T : P R I N T ' S E L E C T O N E O F T H E A B O V E 'b 7 . A S = I N K E Y S : I F A S = · · T H E N b 7 .b 8 . O N V A L i A S ) 6 0 S U B 7 " , 1 3 1 .b 9 ' G O T O S I ' .7 " ' • • • • • • • • • • • • • • • • • • • • • • • • • • •7 1 0 ' A U T O D I A L I N 6 R O U T I N E7 2 . ' • • • • • • • • • • • • • • • • • • • • • • • • • • •7 3 . '7 4 . C L S : P R I N T : P R I N T I I S i l )
7 S . P R I N T : P R I N T : P R I N T ' I D I A l A S A V E D N U I I B E R '7 b ' P R I N T ' 2 D I A L A N E W N U I I B E R '7 7 . A S = I N K E Y S : I F A S = · · T H E N 7 7 17 8 . O N V A L ( A S ) 6 0 T 0 8 " , 9 8 .7 9 . 6 0 T 0 7 4 88•• '•••••••••••••••••••••••8 1 . H I I = 2 : ' H O N I I A N Y N U I l B E R S8 2 0 ' T O C H A N G E T H I S L I S T , I I A K E H I I = H O W I I A N Y I Y O U W A N T T O
L I S T i l l A I O F 9 ) ,8 3 . ' T H E N I N S E R T L I N E S S i l l I L A R T O T H O S E B E L O W W I T H Y O U R
N U I I B E R S A N D N A I I E S ,8 4 8 C L S : P R I N T " N L l I I B E R S Y O U C A N E A S I L Y C A L L ' : P R I N T8 S . S N S i l ) = · 1 X I I - X I I I A F R I E N D "8 b . S N S ( 2 ) = · 2 X I I - X X X - X X X X A B S S •8 7 0 F O R K = I T O H I IS S l i P R I N T S N S i K )89. N E X T
9 • • P R I N T : P R I N T · S E L E C T O N E O F T H E A B O V E I9 1 . P R I N T · ( B R E A K A N D L I S T T O E D I T T H E S E N U I I B E R S ) , "9 2 . A S = I N K E Y S : I F A S = · · T H E N 9 2 .9 3 . N B = V A L l A S )9 4 . I F N B ( I O R N B ) H I I T H E N 8 • •9 S . P S = I I I D S i S N S i N B ) , S , l b )9 b . G O S U B l i l 9 .9 7 . R E T U R N9 8 . ' • • • • • • • • • • • • • • • • • • • • • • • • • •9 9 . P R I N T : P R I N T · D I A L I N G A N E W N U I I B E R ·l . i I . P R I N T : P R I N T " T Y P E I N T H E P H O N E N U I I B E R T H A T ·I • • S P R I N T ' Y O U W I S H T O C A L L , ·1 . 1 . P R I N T · E X A I I P L E S : "1 ' 2 ~ P R I N T · I - 8 . ' - I X X - X X X X L O N G D I S T A N C E1 . 3 . P R I N T · 1 1 2 - S . ' - X X X - X X X X F R O I I L I N C O L N1 . 4 . P R I N T · X X X - X I X X L O C A L C A L LI . S . P R I N Tl . b 0 L I N E I N P U T · T Y P E D E S I R E D N U I I B E R · j P S1 8 7 . G O S U S 1 8 9 t 1I t l 8 . R E T U R NI t l 9 t 1 ' • • • • • • • • • • • • • • • • • • • • • • • • • •I I • • ' N U I I B E R K N O W N A T T H I S P O I N TI I I . ' R E A D Y T O D I A L1 1 2 . P R I N T I - 2 ' A T F t l D " P S1 1 3 . ' E N A B L E R S 2 3 2 R E C E I V E B I TI I U p m : E B , I : P O K E A , t I : p m : E B , S S : P O K E A , 51 1 4 5 S T O P1 1 5 t 1 I F D K = t I T H E N 1 2 3 .I l b t l ' • • • • • • • • • • • • • • • • • • • • • • • • • •1 1 7 t 1 ' Y O U C A N L O A D I I A N Y T E R I I I N A L1 1 8 t 1 ' P A C K A G E T H A T Y O U W I S H B Y1 1 9 . ' E D I T I N G T H E N E X T L I N E S ,1 2 0 0 L O A D " " I I O D C O " " ·
1 2 1 . F O R D = I T O 2 t 1• • : N E X T D : ' D I S K 1 I 0 T O R D E L A Y1 2 2 . ' E X E C1 2 3 t 1 C L S : P R I N T : P R I N T · Y O U N E E D T O U S E Y O U R O W N ·1 2 4 t 1 P R I N T " T E R I I I N A L P A C K A G E A T T H I S P O I N T ·1 2 5 0 P R I N T D i S U C H A S V I D E O T E X A N D O T H E R S ) , ·1 2 b . P R I N T " I F Y O U H A D P R E L O A D E D A T E R I I I N A L ·1 2 7 . P R I N T · P A C K A G E W R I T T E N I N I I A C H I N E "1 2 8 . P R I N T " L A N G U A G E l T H E N S H I P L Y T Y P E E X E C ·1 2 9 0 P R I N T · A N D P R E S ~ E N T E R , ·1 3 t 1 . 6 0 T O 2 . 4 .1 3 1 9 ' • • • • • • • • • • • • • • • • • • • •1 3 2 9 ' A U T O A N S W E R R O U T I N E1 3 3 . ' • • • • • • • • • • • • • • • • • • • •1 3 4 ~ ,1 3 5 0 C L S : P R I N T : P R I N T l l f ( 2 )1 3 b 0 P R I N T1 3 7 0 ' I I E N U
1 3 8 8 A N S { I ) = " D O N O T A N S W E R "1 3 9 . A N S ( 2 ) = " A N S W E R I I I I I E D I A T E L Y ·1 4 • • A N S ( 3 ) = " A N S W E R A F T E R X X R I N G S ·1 4 1 t 1 F O R S A = I T O 31 4 2 . P R I N T S A j A N S ( S A )1 4 3 . N E I T S A1 4 4 . P R I N T : P R I N T : P R I N T · S E L E C T O N E O F T H E A B O V E ·1 4 5 . A S = I N K E Y S : I F A S = · · T H E N 1 4 5 .1 4 b . C L S : P R I N T : P R I N T · · I I S ( 2 )1 4 7 . O N V A L i A S ) G O S U B 1 4 9 8 , 1 5 b . , 1 7 2 .1 4 8 t 1 G O T O 131.
1 4 9 . ' • • • • • • • • • • • • • • • • • • • • • • • • •1 5 ' . ' D O N O T A N S W E R1 5 1 . P R I N T : P R I N T · • • • · A N S i l ) · • • • •1 5 2 . P R I N T : P R I N T · T H E S I I A R T 1 I 0 D E I I A N S I I E R F U N C T I O N "1 5 3 1 P R I N T · I S D I S A B L E D , ·1 5 4 t 1 P R I N T I - 2 , ' A T S . = I ·1 5 5 8 G O T O 2 1 4 .
1 5 b . ' • • • • • • • • • • • • • • • • • • • • • • • • •1 5 7 8 ' A N S I I E R I I I I I E D I A T E L Y1 5 8 8 P R I N T ' • • • · A N S ( 2 ) · • • • •1 5 9 . P R I N T ' T H E S I I A R T 1 I 0 D E I IW I L L A N S W E R A L L 'I b . 8 P R I N T ' C A L L S I I I I I E D I A T E L Y , 'I b i S P R I N T ' U S E T H I S T O T R A N S F E R C A L L S T H A T "I b 2 . P R I N T ' A R E A L R E A D Y I N P R O G R E S S B E T I I E E N 'I b 3 . P R I N T B T I I O I N D I V I D U A L S T O C O I I I I U N I C A T I O N 'I b 4 . P R I N T ' B E T I I E E N T H E I R C O I I P U T E R S , 'I b 5 . G O S U B 1 8 7 .I b b . P R I N T I - 2 , ' A T ' D P S " A 'I b 7 . P R I N T · A T T H I S P O I N T Y O U N E E D T O R U N ·I b 8 . P R I N T · O R E X E C Y O U R O l i N R E C E I V E R ·1 6 9 8 P R I N T ' P R O G R A I I T O I N T E R P R E T T H E ·1 7 • • P R I N T · I N C O I I I N G C A L L , ·1 7 1 . 6 0 T 0 2 1 1 4 81 7 2 t 1 ' • • • • • • • • • • • • • • • • • • • •1 7 3 . ' A N S I I E R A F T E R X X R I N G S1 7 4 t 1 P R I N T : P R I N T · • • • · A N S I 3 1 · • • • •1 7 5 . P R I N T : P R I N T · T H E S I I A R T 1 1 0D E l i I I I L L A N S I I E R A L L ·1 7 b . P R I N T ' C A L L S A F T E R T H E N U I I B E R O f R I N G S ·1 7 7 . P R I N T · Y D U S E L E C T ( F R O I I I T O 2 5 5 R I N G S ) '1 7 8 . P R I N T1 7 9 . I N P U T " H O I I I I A N Y R I N G S i l T O 2 5 5 1 " ; R G1 8 . , R G = I N T I R 6 ) .1 8 1 t 1 I F R G { I O R R 6 ) 2 5 5 T H E N 1 7 9 .1 8 2 . P R I N T : P R I N T ' T H E P H O N E W I L L B E A N S I I E R E D ·1 8 3 . P R I N T · A F T E R " R G " R I N 6 S , "1 8 4 8 G O S U B 1 8 7 1 11 8 5 . P R I N T I - 2 L " A T · D P S · S . = · R G1 8 b . P R I N T : G O I O I b 7 .1 8 7 . ' • • • • • • • • • • • • • • • • • • • • • • • • •1 8 8 1 1 ' F U L L O R H A L F D U P L E X1 8 9 t 1 P R I N T : P R I N T ' D O Y O U I I A H T F U L L O R H A L F D U P L E X ? "1 9 • • P R I N T · I I F Y O U D O N O T K N O W , T R Y H A L F ) , ·1 9 1 ' P R I N T : P R I N T ' I F U L L D U P L E X ·1 9 2 1 1 P R I N T · 2 H A L F D U P L E X ·1 9 3 t 1 A $ = I N K E Y S : I F A S = " · T H E N I 9 3 .1 9 4 . O N V A L i A S ) G O T O 1 9 5 1 , 1 9 9 81 9 5 . ' F U L L D U P L E X1 9 b 1 D P S = · F I ·1 9 7 1 P R I N T : P R I N T " F U L L D U P L E X S E L E C T E D , ·1 9 8 . G O T O 2 1 1 2 .
1 9 9 1 ' H A L F D U P L E X2 ' " D P $ = ' F I I "2 ~ l t I P R I N T : P R I N T ' H A L F D U P L E X S E L E C T E D , ·2 . 2 . P R I N T2 . 3 . R E T U R N2 . 4 . ' • • • • • • • • • • • • • • • • • • • • • • • • •2 8 5 . ' E X I T R O U T I N E2 ' b . ' E N A B L E R S 2 3 2 R E C E I V E B I T2 . 7 . P O K E B , I : P O K E A , I : P O K E B , 5 5 : P O K E A , 52 1 1 8 . P R I N T : P R I N T " T H I S P R O G R A " H A S E N D E D , ·2 ' 9 t 1 E X E C2 1 • • ' T O U S E T H I S P R 0 6 R A I I I I I T H 1 I 0 D C O I I I I2 1 1 . ' Y O U I I U S T A D D A S I l I T C H T O T H E I I O D E I I2 1 2 t 1 ' C A B L E S O T H A T P I N I C A N B E C O N N E C T E D2 1 3 t 1 ' T O P I N 2 A F T E R D I A L I N G T H E N U I I B E R2 1 4 1 ' S E E I I O D C O I I " A R T I C L E F O R E X P L A I N A T I O N 1dCRO ' "2 1 5 . E N D
No. 68 - January 1984 61ICRO
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 64/100
MODCOMM
The Color Computer
and Modern to Modem
Communication
_, " : , , , .. '. ,.-",,.: -, -. -.:-,', "-','-:,',':
MODCOMM explains ·hq~.·t()bSeCtheq~lqrr~()~p"~~~.t()cornmunicate to largemaintramecompUt$fS ..The .program has the Co lorCoq' tp . ..~erem uJ,t lng.a
dumb terminal.' .
by Walter Charlton
odem to modem communica-
Mtion is often a necessary use of
the Color Computer. Radio
Shack has a ROM pack that will make
the Color Computer emulate a dumb
terminal; however, since the package is
in ROM, there is no way to add other
applications or features to the package.The purpose of this paper is to show
how simple it is to write your own ap-
plications. Additionally, there is a pro-
gram with this paper that will do most
things the Radio Shack package will.
The paper also shows the use and ad-
vantages of interrupts.
The program listed here is com-
pletely relocatable, so for those CoCo
owners that only have 4K of memory,
you can load the object code beginning
at any location and it will work. The
source code in the listing will take at
62
least 16K of memory, if you use an
assembler package.
The CoCo use the Peripheral Inter-
face Adapter (PIA) to communicate to
external devices. While the PIA is an
excellent' device, it was actually de-
signed for parallel communication.
When it is used for serial communica-tion (for instance with the RS-232C),
the information must be passed to the
adapter one bit at a time. Timing loops
must bedesigned to wait the proper bit
time for baud rate timing.
There is also a drawback in the soft-
ware. The processor must be totally
dedicated to input or output at the time
of communication, so a great deal of
processing time is wasted. For in-
stance, if the processor is bringing in
information from the RS-232C I/O
port, it cannot be interrupted for any
MICRO
reason or timing will bewrong and data
will probably be lost.
The hardware configuration of the
RS-232CI/O port is as follows:
Pin Purpose
1 Carrier detect -
CAl Interrupt of
PIAl
2 Data in - Bit 0 of
Address&HFF22
on PIAl
3 Ground
4 Data out - Bit 1 of
Address &HFF20
on PIAl
As the interrupt is currently wired
(pin I), it is useless for modem com-
munication. The carrier detect just
checks for carrier on the modem. I fcarrier exists, the interrupt is active
(carrier is the medium that actually
transmits the data over the phone
lines). This would mean that com-
munication must be totally software
controlled. Better use of this interrupt
would enhance the computers ability
to communicate to a mainframe.
An interrupt canbeused to force the
MPU to a service routine. For instance,
the computer can be busy doing
anything and still be programmmed so
that when an interrupt occurs, it will
drop what it is doing and go to a vectoraddress that will service the interrupt.
After servicing the interrupt, it can
then return to exactly what it was do-
ing before the interrupt. Since data
coming onto the computer will always
be at random intervals, I wanted to use
the interrupt line to bring in the data. I
did this simply by tieing the data in
line to the interrupt so that when a bit
enters the computer, it will force an in-
terrupt. This is a very simple technique.
I suggest that you first purchase a
new serial I/O cable fromRadio Shack.
This cable should be used only formodem to modem communication.
Select one end and lift a small tab out of
its slot which will allow you to pull
back the outer shield. The inner shield
can now be separated which will bare
the wires. Cut the wire to pin 1 (the
pins are numbered on the front) and
solder a small piece of wire from pin 1
to pin 2. After putting it all back
together, mark the modified end. This
end will be the one that plugs into the
CoCo. We arenow ready to start on the
software.
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 65/100
Software
Without the use of the interrupt,
the data in line would need continual
checking. The interrupt significantly
reduces the software needed for com-
munication. I will first discuss the out-
put routine and then the input. Most ofthe programming of the PIAis done on
power up of the computer so nothing
more is needed on that.
Lines 1700-1900 are the transmit
routine. All that is needed to transmit
is a store command to the address
&HFF20.The data is held in register A
of the MPU as shown in the DATAOT
subroutine. Bit 0 is then shifted into
the carry bit with the LSRAcommand.
This is followed by two rotate left com-
mands that position the bit into the
transmit location of the B register. The
B register is then stored into &HFF20
which transmits the data. After
transmitting the entire byte, two stop
bits are normally transmitted which
are logic ones. Often one of the stop
bits is not used. Also, some systems
use parity, so if the program listed here
does not work, check with your
systems people to get what is needed.
You should note the branch to the
subroutine WAITin DATAOT. This is
thebaud rate timer. This routine can be
used for both transmit and receive, and
is currently set for 300 baud. Forreasons I will explain later, it cannot be
set for a baud rate higher than 300 in
the program listed here.
The loop value for the baud rate
timer is found by the following steps.
First, find the cycle time of the CoCo
by dividing the clock time (.895 MHz)
into one. Second, find the baud rate
time by dividing the baud rate 1300
baud) into one. Third, divide the com-
puter cycle time into the baud rate time
to find the number of cycles for each bit
time. Finally, the wait loop takes ex-
actly 8 cycles, so after taking you the
overhead (about 10 cycles), divide the
above value by eight and the answer is
the time for one bit wait. This pro-
cedure works for any baud rate.
Before discussing the receive
technique, I will talk about how to set
up the interrupt routine. Lines 640-720
show the routine that prepares the
computer for interrupts. Bit 0 is forced
high in address &HFF21. This is the
control address for the A side of PIAl.
By forcing the bit zero high, the inter-
rupt is activated when CAl is
No. 68 - January 1984
forced low by the peripheral. The FIRQ
interrupt is tied to the PIAso the jump
vector address is in &HllO and
&Hlll. These addresses are loaded
with the start address of the subroutine
DATAIN which is the service routine
for the interrupt. The final job of the
initializing routine is to able the inter-
rupt in the condition code register sothat the interrupt will be recognized by
the MPU. When an interrupt occurs,
the MPU will go to addresses &HllO
and &Hll1 to get the service routine
address and will then execute it. After
executing the service routine, and RTI
command will return the processor to
the point before the interrupt.
Subroutine DATAIN (lines
1230-1610) works just the reverse of
subroutine DATAOT. The first thing
that needs to be done when entering
the subroutine is mask any interrupts.
If this is not done, the computer willstart interrupting interrupts as data
comes into the computer. Another
thing that needs to bedone upon enter-
ing the routine is to save the state of all
registers. The FIRQ interrupt will only
save the program count and condition
code register, so the rest of the registers
must be saved to assure that nothing
will be lost when returning.
The HBWAIT routine is a half bit
wait. It is necessary to center the recep-
tion so that slight errors in the timing
will not matter., Address &HFF22 is
the data address for receive. The data isin bit 0 and after a load of the data
register, two rotate commands are
needed to position the data in the A
register. The RORBmoves the data into
the carry bit and the second shifts the
data into the Aregister. Since the inter-
rupt is the CAl, it is necessary to read
the PIA data register A (&HFF20) to
clear then interrupt. This should be
done just before returning.
A further comment needs to be
made on interrupts if using a program
pack for assembly. The program pack
forces a continual interrupt that cannot
be cleared. If this is not disabled, the
program cannot be executed with the
pack installed because the interrupt
will always be active. The simplest
way to disable the interrupt is by put-
ting scotch-tape over pins 7 and 8 of the
program pack. These pins can be found
by viewing the pack from the top. Hold
it with the plug at the top and points 7
and 8 are the first ones on the top and
bottom with copper runs from the right
side. You can tell ifyou have the proper
end because just next to pin 7 is the 5
MICRO
volt pin which is slightly indented.
After installing the program pack, it
can be executed by typing EXEC49152.
The Program
The program has a few features that
have not yet been mentioned. It will
output nearly the full spectrum of con-
trol characters. The downward arrow
acts as the control key. It has a
backspace key that when used with the
shift key, will output the delete/rub
character. Both lower and upper case
characters are recognized, displayed
and output (lower case letters have a
dark background). By using the shift
and clear keys, the program will be
exited. Without the shift key, the clear
key outputs the escape character. The
break key will output the control C
character. Shift zero will set the
keyboard to lower case characters andoutput upper case only when the shift
key is used.
This program does have a few
weaknesses. The program cannot send
and receive data at the same time. This
would take a great deal of software and
has little value so I did not put it in. I
did, however, mask the interrupts go-
ing into the data out routine. This will
allow the operator to transmit data
even if a long receive message is com-
ing in. One or two characters may be
lost, however, on receive.
There will be some difficulty in in-creasing the baud rate on this program.
Screen control and scrolling are done
during the two stop bit times. Since
screen control takes a great deal of
time, any increase in the baud rate will
result in garbage on there screen during
scroll. As it was, I had to reduce the
half bit wait to get the screen control
in. If it is necessary to communicate at
a higher baud rate, the received infor-
mation will have to be buffered and
displayed when the processor has
more time.
The program, as listed here, is just
one use of the Color Computer's ability
to communicate to mainframe. Other
uses could be for preloaded programs
for later transmissions, downloading
from a computer oruse as an intelligent
terminal. Happy computing! IAICAO
Walter Charlton has his MBAfrom the
University of Nevada, LasVegas. He
teaches computer programming part time
and works as a Field Engineer for a major
computer manufacturing firm.
63
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 66/100
., .., .
. . . . . .0::
" '"" '"I:
0:: . . . ." '" -'"
a:IICI:
go. . . . 0::: : : a -. . . . .0::
. . . . .0...oo_ .
0::. . . . . .. . . .,.
_.:>_.
" '"OU
0...o. . . .,.o::z:
_.. . . . .EOUo::z:
G :o
,-..,-..-. g.
. ...I:
«UL&.<I: _"' __ o--LL.. ... _ ...
u_-.ouQ-.oLl.l-.o«~_LL.....guIn U . .. .. a :IIC DC l: CD Cl :l "')a: IIa: II-
.. ...DCl: U InCDCl:U ... ..... ...nC D
.........................CDCDCDCDCDO-O-O-CD CD CD CD CD CD CD CD CD CD CD CD CD CD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q~-...g-O __ ~_-O-O_LI.ILL..-O ... ~LL.._-'OQ~_Q_
CI: ..... C D . . .. .D . . . ..D . . . ..D . . .. .D . . . ..D a: I Ia : II C Da : II I" ' )C D . . .. .I: ..... C D . . .. .D
<l:LI.I_"' ... -.om<l:uLI.I_"' ... ~<l:QLL.."'~~~~QLL.._O-O-Cl:Cl:Cl:Cl:Cl:Cl:Cl:Cl:a:IIa:IIa:IIa:IIa:IIa:IIa:IIUUUUUUU"",CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
" ' ' ' ' N ' ' ' N ' ' ' N ' ' ' ' ' ' ' ' ' N " , , , , , , , , , , , , , , , , ' ' ' ' ' ' ' ' ' ' ' ' N ' ' ' ~ ~
. . . .",-...g+
:;ac"a-">-...-.,.- -
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 67/100
-N. . . . . . _ -. . . . . . . . . -cocoIlSlQOQQ-~-N.....-Ocz:Ncz:
~--~~~~,_CXIINCXIICZ::;CXII<I:
..._-OCOcz:U...II'lIlr.lanlr.lanlnll'll0"- g..0--0--0--g.. 0--NNNNNNN
...-00-MNM
Mn......NNN0-0-0-NNN
cz:::~~Q~~~O"-O"-~QanCZ:::~~CZ:::~QQUO"-_an~QOu~~ann~QO~nNQQQOQQQOQO-~
~~~~~~~~~~~~~~;~~~~~~~~~~~~~~~~~~~~~~~~~~~
-l:CZ:::QO~_~Q~~U~~_~_~~~_-_-N- __ N_QOIISII~_QOM~~
- ~ ~ Q -ONtD l tDN
Mr.llr-o--a::'I
""""""""""tD mtDCONNNNN
~~*~~~~~~~~~~~~~m~m~m~m~m~m~m~=~~~~~Q~_~~QOcz:::U~-N""'n~QOo--cz:::U~_N~~QO<l:U~_N~~QOCZ:::~~-
~~~~~*~~*~~~~~~~~~~~~~~~~~~~~~~~NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 68/100
z:. . . .z:
:z:
. . . . . .:z:co
-. .a::
«::r::<..'i
a::. . . .-. .«:a
>0-eD
<..'i<..'iu...
M. . . . .N.- _~NNN ~ _ _ m_ Q ~~~ _ m~mmm---~«_Q.. ..-..~_~-~~_ ..__mmmmmm_~Nmm m ~_m_~N~_
~ ~ ~ ~ ~- U - ~ Q _ ~ U ~ ~ - ~ ~ ~ - ~ - U ~ Q U ~ ~ ~ - ~~-~~-~mNMM«~~mN-Um~mNm«-M
~~N~~~~_M~~~Q~_N ..m~~_M~~~Q~~Q Q ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - - - - - - - - - - - - - -~~~~~~~~~~~~~««««««««««««««. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
""...:z:_ ..
"". . .. . . .u...:z:_ ..
:z:-. . .a:::z:-. . .a::co:z:
" "...:z:_ . .co:z:
a::co. . . . .CD. . . .a::
""z:. . . .
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 69/100
AVOXInput
For YourColor Computer
A discussion of subroutines thaf.afl()w'soundasa formof input.
All Sound Subroutines
require:
TRS-80 Color Computer withcassette. Some routinesrequire Extended BASIC.
By Sean Moyer
While waiting for a particularly
long program to cassette load
during one of my late night
programming sessions, I began to
ponder the possibility of voice control
for my Color Computer. Visions of ex-
ternal amplifiers and analog to digital
converters danced through my mind.
Next to dance through my mind were
visions of the price tags that accom-
panied these pieces ofequipment. I was
about to abandon this line of thought
when my attention was caught by thesteady hiss of the program loading in. It
dawned on me that I probably had
everything I needed right in front of
me. I realized that in order for a pro-
gram to load in from the cassette
player, the input from the player had to
affect any number ofmemory locations
in the area of memory devoted to II O.
All I needed was a source of sound for
the cassette player and a program to
look through the area of memory
devoted to IIO. I found the range of
memory addresses devoted to II 0 in
No. 68 - January 1984
the Color Computers Owner's Manual.
I developed the program in listing 1 to
look through each address, pausing
momentarily at each one.
For noise, I grabbed the nearest
music cassette I had on hand, put it in
the Color Computer's cassette recorder
and pressed play. I ran my program, sat
back and waited. My wait was a short
one. At memory location 65312, I
noticed the content display flickering
rapidly. I recorded the location, andletting the program run, I found several
more locations showing identical
behavior. The change on the display
was binary two for the low state, three
for the high.
All that remained now, was to
substitute my voice for the prerecorded
input. The procedure for accomplishing
this varies, depending on the type of
cassette you own. For the older black
model, with built in microphone,
simply remove the plug from the
"MIC" jack on the left side of the unit.
Next, open the cassette compartmentand remove the cassette. Now, care-
fully inspect the upper lefthand corner
of the compartment. There will be a
small stud there. Push the stud toward
the back of the unit. While holding it
down, press Record and Play.
The process is the same for the
more recent models with one excep-
tion. You must plug an external
microphone into the "MIC" jack. With
this accomplished, the recorder is
now sending your amplified voice to
the computer.
MICRO
To test the procedure, turn up the
volume on your monitor and type
AUDIO ON. If the procedure was com-
pleted correctly, you should hear your
amplified voice issuing from your
television speaker. With the
preliminary set up now complete, we
are ready to discuss three subroutines
that should get you sufficiently
familiar with the basics of sound input
to help you to develop your own sound
subroutines.The first subroutine is a voice ac-
tivated binary input. When the pro-
gram receives a sound, the routine is
turned "ON". When the next sound is
recognized, the routine is turned
"OFF", and will alternate "ON" and
"OFF" with each additional sound.
Specifically, the program will check
memory location 65312. If this loca-
tion contains a 2, the low state, it
returns and checks again. If the loca-
tion contains a 3, indicating the
presence of sound, the program im-
mediately prints ON. The next se-quence in the routine is a FOR/NEXT
loop. This delay loop debounces the
switch, which is to say it allows the
sound that activated the switch to end.
Without this delay the voicing of a
word such as ON or OFFwould be suf-
ficiently long as to turn the routine off
and on several times in succession. The
memory location is checked again in
the manner previosly mentioned, and
when a sound is recognized, the pro-
gram prints OFF and goes through a de-
bouncing loop. The program returns to
67
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 70/100
he beginning and repeates the cycle.
If the program fails to operate and
you determine it has been entered cor-
rectly, reset the computer. Under
special circumstances, such as the use
of the AUDIO ON or PLAYcommands,
the contents ofmemory location 65312
may be other than 2 or 3. If the program
gets number other than 2 or 3, it will
crash. Resetting the computer should
restore the program to operational order.
This is the least complex and least
useful of the three routines presented
here. It serves basically as a primer for
he next two programs. The next two
routines are more complex, and they
should prove more interesting and
useful as well.
The next routine we will discuss is
the voice operated dictation shown in
listing 3. This program is designed to
record whatever you say, deleting the
long periods of silence betweenphrases. To run this program, leave a
blank cassette in the recorder before
you press record and play.
The program begins by checking
memory location 65312. When a sound
is recognized, the recorder is activated
by the MOTOR ON command. The
delay loop that follows serves a
somewhat different purpose than that
in the VOX binary input. This loop
prevents the recorder from shutting
down during the short pauses between
words in a sentence, or even shortersilences in the words themselves. The
program begins the count from 1 to
300, and checks memory location
65312 inside the loop. If at any time a
sound is recognized, the program
begins the count again from 1. This
way, if the pause is short, the loop re-
initiates, leaving the motor on. If the
pause is long, the routine will complete
the loop, and the recorder will be shut
down using theMOTOR OFFcommand.
Finally, the program returns to the begin-
ning and waits for the next sound.
If this program is used for dictationa small preliminary sound, such as a
finger snap, might prove necessary for
total legibility. When the first sound is
sensed the motor is activated, but it
takes a fraction of a second for the
motor to reach proper recording speed.
This often causes the first word to be
lost. A finger snap would activate the
motor and allow it to reach recording
speed in time for the first word to be
recorded. A preliminary sound would
not beneeded if the program were used,
for instance, tomonitor an empty room
68
for activity.
The third and final program differs
from the first two in that instead of a
straight binary input, it uses a sampling
routine to approximate an analog in-
put. This program displays the analog
approximation in PMODE 4 graphics,
oscilliscope style. This is the only
routine that requires Extended BASIC.
In addition, because the program uses a
real time graphics display, I have in-
cluded the high speed poke [POKE
65495,0). If the high speed poke does
not work on your system simply
remove it from the program. This will
slow down the routine, though the
results should still be acceptable.
The routine begins with the high
speed poke and then prepares the
graphics screen. This is followed by at---------------- ...threesome ofnested FOR/NEXT loops.
The outer loop controls the initial ver-
tical placement of each trace line. Thenext loop in controls the rate at which
the trace sweeps horizontaly across the
screen. The innermost loop is the heart
of the program. This is the sampling
routine. For every point on the horizon-
tal sweep, memory location 65312 is
sampled six times.
The routine sums all six samples,
and stores the sum in variable T. It
then subtracts a constant (12 in this
case), so that six samples taken during
a period of total silence would giveT a
value of zero. T is then multiplied by a
constant (4) to give the graphic dis-play proper amplitude. The grahics dis- 1 -1
play comes directly after the sampl- Listing 4
ing routine. 1 0 R E M L I S T I N G 4
These routines will help you under- 2 0 R E M n S C I L L I S C D P Estand the workings of the cassette audio 30 R E M B Y S E A N M O Y E R
4 0 R E Minput port, and hopefully they will be 50 R E M H I G H S P E E D P O K E M A Y N O Tuseful to you in your program library. 6 0 R E M W O R K O N S O M E S Y S T E M S
70 R E M R E M O V E I F I N O P E R A B L E8 0 P O K E 6 5 4 9 5 . 09 0 R E M P R E P A R E G R A P H I C S S C R E E N1 0 0 P l 1 0 D E 4 . 111 0 S C R E E N 1.11 2 0 p e L S . '1 3 0 R E M V E R T I C A L P L A C E M E N T L O O P
1 4 0 F O R V = 2 6 T O 1 9 1 S T E P 2 51 5 0 R E M H O R I I O N T A L S W E E P1 6 0 F O R H = 4 T O 2 5 5 S T E P 41 7 0 R E M S A M P L I N G R O U T I N E18 0 1 = 01 9 0 F O R I = 1 T O 62 0 0 T = T t P E E K ( 6 5 3 1 2 )2 1 0 N E X T !2 2 0 R E M C O R R E C T I O N F O R2 3 0 R E M Z E R O I N G A N D A M P L I T U D E2 4 0 T = I T - 1 2 ) f 42 5 0 R E M G R A P H I C S D I S P L A Y2 6 0 L I N E [ H - 4 , V - T D ) - I H , \ } - T l , P S E T2 7 0 T D = T ' . .2 8 0 NEH H2 9 0 N E X T V
10 0 G O I O 5 0
Listing 2
1 0 R E M L I S T I N G 220 R E M V O X B I N A R Y I N P U T3 0 R E M B Y S E A N M O Y E R4 0 R E M5 0 R E ~ C H E C K S F O R S ! l U ~ j D60 I F P E E K ( 6 5 3 1 2 ) = 3 T H E N 70 E L S E 6 0
7 0 P R I N T ' m j '8 0 R E M D E L A Y L O O P9 0 R E M D E B O U N C E S S W I T C H1 0 0 F O R I = 1 T O 2 0 0 : N E X T I1 1 0 R E M C H E C K S F OR S OU N D1 2 0 I F P E E K ( 6 5 3 1 2 ) = 3 T H E N 1 3 0 E L S E 1 2 0130 P R I N T ' O F F '1 4 0 R E ~ D E B O U N C E S S W I T C H1 5 0 F O R I = 1 T O 2 0 0 : N E I T I160 G O T O 6 0
Listing 3
10 R E M L I S T I N G 3
2 0 R E M U ! l l D I C T A T I O N30 R E M B Y S E A N M O Y E R4 0 R E M5 0 R E M C H E C K S F O R S O U N D6 0 I F P E E K ( 6 5 3 1 2 ) = 3 T H E N 9 0 E L S E 6 070 R E M A C T I V A T E S R E C O R D E Re o " ' o T O R O N9 0 R E M D E L A Y L O O P / C O N T I N U I T Y10 0 F O R I = 1 T O 30 011 0 R E M I F D I C T A T I O N I N P R O C E S S1 2 0 R E M R E I N l T l A T E S D E L A Y L O ! l P1 3 0 I F P E E K 1 6 5 3 1 2 1 = 3 T H E N 1 0 01 4 0 ~ j E X T I
1 5 0 R E M D E A C T I V A T E S R E C O R D E R16 0 M O T O R O F F170 G O T O 5 0
You may contact Sean Moyer at, 1825South 17th Street, Fargo, ND5.l830.
Listing 1
1 1 ) R E M P R O G R A M 12 0 R E M M E M O R Y S E A R C H3 0 R E M B Y S E A N M O Y E R4 0 C L S5 0 R E M II S A D D R E S S R A N G E60 F O R I = 6 5 2 B O T D 655357 0 R E M J I S I O F 1 1 ~ E S E A C H8 0 R E I 1 A D D R E S S I S D I S P L A Y E D90 F ! l R J = 1 T O 751 0 0 R E M D I S P L A Y S A D D R E S S A N D1 1 0 R E M C O N T E N T C E N T E R S C R E E N1 2 0 P R I N T @ 2 2 4 , I , P E E K ( I )1 3 0 N E X T J ..
1 4 0 N E X T I
MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 71/100
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 72/100
you ask the computer to do at one time
is the available memory space.
The computer will share tasks in a
priority basis, and you may assign a
higher priority for jobs you want done
more quickly. OS-9 uses a hardware
clock to divide time into slices, and
allot more time slices to tasks that
have a higher priority. By the way,when you sign on to OS-9, you can
enter the time and date, and the time
will remain accurate, even with disk
I/O as the software does not allow in-
terruption of the time clock for disk
I/ O. You can use the clock in program
output for any purpose desired.
One ofthe major advantages ofOS-9
is its device independent I/O system.
Only one I/O routine is needed with
several drivers written to support the
devices being used. OS-9 normally
defaults to input from the keyboard and
output to the video display, however itis easy to redirect input and output as
required. Devices that are supported in
the CoCo implementation are:
Drives 0 to 3
Keyboard
Video display
Serial printer
RS-232 terminal
Joysticks
As an example, you might redirect in-
put from the keyboard to drive I, and
output from the display to the printer.
OS-9 is powerful, and complex, and
Ihave a big project to become proficient
in its use during the coldNorth Dakota
winter. This overview will hopefully
give you some idea of the new found
power in the Color Computer. You
don't have to hang your head anymore
when someone asks "Why did you buy
that "toy" computer.
Over the next few months we will
take other looks at OS-9 and its
features. Next month we will look at
BASIC09, and seewhat features and ad-
vantages you get for your hundred
dollars. Wewill also take a look at two
more CoCo word processors, Nelson's
VIPWriter, and Elite.Word. / I IJCAO
You may contact John at 508 FourthAve.,N.W., Riverside, NO 58078.
70 MICRO
SPECTRUM32K RAM Button ••••••••••••••••• $ 2.99NANOS Reference Card •••••••• $ 3.9964K RAM Button ••••••••••••••••• $ 4.99Coco Editor Assembler •••••••••• $ 6.95Coco Tech Manual •••••••••••••• $ 7.9516K RAM ChiPs •••••••••••••••••• 1 9.95Coco Secrets Revealed Book. 14.95
LED On/Off Indicator •••• ••••••• 14.95Coco Light Pen•••••••••••••••••• $ 19.95ATARI Joystick Interface ••••••• 119.95Video Interface Kit. ~............ 24.9516K-32K Upgrade Kit ••••••••••• 25.956883 SAM Chip •••••••••••••••••• $ 29.956809E CPU Chip •••••••••••••••• t 29.95Basic ROM 1.1 •••••••••••••••••• 36.0064K RAM Chips.................. 49.95MARK DATA Keyboard •••••••••• $ 69.95BOTEK Printer Interface •••••••• $ 69.95Extended Basic ROM ••••••••••• $ 84.00Disk Controller •••••••••••••••••••• $139.95COLOR COMPUTERS•••••••••••• $ CALL
Call or Write for FREECatalogSPECTRUM PROJECTS93-15 86th Dr Woodhaven.NewYork 11421
Add Sales Tax & $3.00 for StH
•• Dealer/Club Inquires Invited ••
212 441-2807
It pays to write for MICRO!
o Win the esteem of your colleagues·o Gain recognition as a computerist .
o See your programs and ideas in print·
o Feel satisfaction from helping others-
o Earn money for your work.
MICRO wants to continue to provide substantial
material for the Serious Computerist. This must come
from you - the readers of MICRO who are actively
invloved with understanding the inner workings of
microcomputers, who experiment to find better ways of
using microcomputers, who are developing new
techniques, who are programming in assembler,
FORTH, Pascal and other languages in addition toBASIC.
Writing for MICRO is easier than you think. If you can
provide the programs and the basic information about
how they work, our staff can help turn this 'rough'
material into a polished article. Remember, in this
business, everyone knows something of value, and
nobody knows everything.
Request the Writer's Guide which covers many of the
fundamentals of writing for MICRO.
No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 73/100
I A l C A O " TRS·80C Reviews
Product Name:
Equip. req'd:
Price:
Manufacturer:
Disk interface/ROM pack extender
TRS-80 Color Computer Disk system
$29.95 + $3.00 shipping
Spectrum Projects
93-15 86th Drive
Woodhaven, NY 11421
Description: The Spectrum Projects disk interface and ex-
tender cable can be a useful accessory for the Color Com-
puter. It allows the disk or program ROM pack to be
located up to three feet away from the side of the com-
puter. This high quality cable has a gold plated connector
on each end that mates with the connectors on the com-puter and ROM packs.
Pluses: Makes positioning of drives more convenient at
the desk, allows the computer to have only a ribbon cable
extending from the computer, rather than a largeROMpack.
Minuses: Unfortunately, it may not work with all drives.
MyMPI works correctly with the cable but my Tandy unit
has problems. If I put drive one as drive zero, then the
cable seems to work. It is possible that my drive needs ad-
justment for the longer length of cable.
Documentation: None needed or provided. The cable is
marked TOP on both sides, care must be taken that thecable is inserted correctly.
Skill level required: The cable is easy to install by even
a novice.
Reviewer: John Steiner
Product Name:
Equip. req'd:
Price:
The Stripper
TRS-80 Color Computer
$7.95
Manufacturer: Eigen Systems
P.O. Box 10234
Austin, TX 78766
Description: The Stripper is a programmers utility for the
Color Computer that will compress or "pack" a BASIC
program. Stripper has three options, remove remarks, pack
lines, and remove spaces. Anyone or all three options may
be exercised.
Pluses: The packed program will take up less memory, and
may operate slightly faster. The utility normally loads into
graphics memory, thus freeing all other memory for the
packing operation, and your BASICprogram. One of thelowest cost utilities I've seen, and well worth the money.
No. 68 - January 1984
Minuses: You cannot edit, or otherwise change a line
packed program. The program must be saved in an un-
packed format, should you decide to modify or edit it.
Documentation: Four pages of notes describe the opera-
tion of the program thoroughly.
Skill level required: No advanced skill level is required to
use the program.
Reviewer: John Steiner
Product Name:
Equip. req'd:
Price:
Manufacturer:
CCP-l Serial-Parallel Interface
TRS-80 Color Computer
$69.96 + shipping
Botek Instruments
4949 Hampshire
Utica, MI48087
Description: Botek Instruments serial-parallel interface
provides the TRS-80 Color Computer and TDP-100 with a
standard Centronics style parallel interface. The interface,
housed in a 3 in. by 6 in. mini-box, is easily connected to
the CoCo RS-232 port. A parallel cable is provided that
connects the interface to the printer. Athird cable leads to
a small AC power supply. Baud rates of 300 to 9600 baudare switch selectable on the front of the interface. POKE
150,1 will allow CoCo to access the printer at 9600 baud.
The unit can beconfigured toROM 1.0 or ROM 1.1 by just
changing a jumper.
Pluses: The interface is easily installed, and requires little
attention, except to change baud rates. If the printer you
have is capable of + 5 volts on pin 18of the printer connec-tor, you may remove the AC supply and power the inter-
face from your printer. This option is not available on my
Epson printer, so I could not test it.
Minuses: None noted.
Documentation: Asingle page instruction sheet describes
hook-up and operation of the unit. In addition, a separate
sheet contains a complete interface schematic.
Skill level required: The unit should be easy to install for
anyone familiar with computer and printer installations.
Reviewer: John Steiner
Product Name: BASIC Aid
Equip. req'd: TRS-80 Color Computer
Price: $34.95
MICRO 71
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 74/100
Manufacturer: Eigen Systems
P.O. Box 10234
Austin, TX 78766
Description: BASIC Aid is a ROM based programmers
utility for the Color Computer. Commands may be
entered using two keystrokes, and keys may be redefined
as required. Aplastic overlay is included to remind you of
the key codes. Automatic line numbering is supported,
and lines may be moved from one part of a program toanother. AMERGE utility allows two BASICprograms to
be combined.
Pluses: BASIC Aid works with all CoCos, 4Kon up. ROM
pack construction requires only 227 bytes of RAM to hold
the key define table. An auto space command prints a
space after the defined key for maximum readability. Auto
space can be shut off should you require memory conserva-
tion. Programs to be merged may be binary, and do not
have to be stored in ASCII format unlike many utilities.
BASIC Aid can be turned off and on from the keyboard
if desired.
Minuses: BASIC Aid automatically allocates the top 227
bytes of available RAM for its key define table, which is
not relocatable. As a result, you will have to relocate any
machine-language routines that must be used with your
program, assuming they are relocatable. In addition, all
CLEAR commands must be set to protect the top 227
bytes, or you may accidentally overwrite the table.
Documentation: The instruction book is excellent, easy to
understand, and well written. The only conflict I could
find was in the MOVE utility. The manual asks for line
numbers in the format 100, but on my machine, 100
turned into 10000 until I entered the numbers with leading
zeroes, as 00100.
Skill level required: The program is easy to use, and makes
programming a much easier task. No extra skills are re-
quired of the programmer.
Reviewer: John Steiner
Product Name: CCEAD Color Computer Editor/
Assembler/Debugger
TRS-80 Color Computer
$6.95 + $3.00 shipping
Eigen Systems
PO Box 10234
Austin, TX 78766
Equip. req'd:
Price:
Manufacturer:
Description: This is a BASIC program that provides theuser with a machine-language software development
system. You receive two versions: a 12K+ commented
source listing and a stripped 7600-byte running version. It
assembles and stores code in the unused CoCo graph-
ics pages.
(Continued on next page)
DERRYIERIPHERALS
oI
COMPLETE PRODUCT LINES FOR
D.C. Hayes • HDE • Microsoft • Nashua • Okidata
APPLE • FRANKLIN. IBM·PC/XTWe carry many products at competitive prices to expand these fine computers.Request Catalog No. AFP*
Dealer
Inquiries
Invited
HOE • AIM SYM • KIM•HDE hardware and software for ASK, OLC, OMN1-65systemsKIM replacement modules (1K - 4K) and keyboardsAIM-65 (1K - 4K) and accessories. Request Catalog No. TASK*
COMPUTER REPAIR SERVICEProfessional WorkmanshipGuaranteed RepairsQuick Turn-around
Ataripple
AIM
Franklin
•SYM KIM
•PET
•HOE
•
Perry Peripherals"Cataloqs
AFP $2.00 TASK $1.50
Catalog price refundedwith f irst order
72
Repair Center6 Brookhaven Drive
Rocky Point, NY 11778
OrdersP.O.Box 924Miller Place NY 11764
(516)744-64629AM-5PM Weekdays
MICRO No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 75/100
Documentation: A single page gives adequate instruc-
Reviewer: John Steiner tions, once started, all you need to know is how to stop -
simply type "shut up"!
Pluses: The program is inexpensive and easy to use. It
allows you to "get your feet wet" in machine-language
programming for little cost. The BASICprogram is easily
modified to the user's preference.
Minuses: The program is slow in assembly and allows
only five directives; ORC, RMB, FCB, FOB, and EQU. No
math is allowed in labels.
Documentation: A ten-page manual is provided to
demonstrate the operation and use of CCEAD. Two sam-
ple programs are provided that assist in learning to use
the software.
Skill level required: This program requires some
knowledge of machine-language programming.
Product Name:
Equip. req'd:
Price:
Manufacturer:
SHRINK
Color Computer with 16Kmemory
$15.00 tape or disk
Star Kits
P. O. Box 209-N
Mt. Kisco, NY 10549
Description: SHRINK is another implementation of Eliza,
the computerized psychologist. It is fun to use, but it is
rather easily "fooled" into making somewhat irrelevant
comments. It will run indefinitely and is a cute demo for
parties, etc.
Pluses: SHRINK is a change of pace: you can relax while
experimenting - an unusual use for a computer. Writtenin assembly language, it is somewhat faster than many
other similar programs.
Minuses: A serious experimenter might wish for a more
sophisticated implementation of this concept.
Skilllevel required: None.
Reviewer: Ralph Tenny
0W RRt RSSDC~RT tS, no.c :JUJ
Questionnaire Analysis Software
• M,c rocomputer based
Avoid the expen se o f con tr act servi ces . . do eve rything in-hou se on
your own Apple -11+microcomputer
• Easy dolo entry
Avoid time consuming keypunching . Uses respondent-marked cords
en tered wi th on Opt ical Ma rk Re ade r (keybo ard e nt ry ot so pos sibl e) .
• Comprehensive dato onolysi~
Sort on ony variable(s), tally all responses, conduct cross tcbs.
co(re lo~iom, Iineor reqre seton . {requency dis tr ibutiom., and more.
• Complete edi ti ng capab il it ies
Weig ht it ems , d erive compo sit es, o dd or d ele te items, a nd mor e
• Eow-to-use
Programs are user f ri endl y, menu dri ven, and interac ti ve . No special
computer exper ti se i s requi red.
Call or send for mare information today
SC~tr.H~f~C SDf H\IR Rt R SSDC~R TtS, LT D.
B O X 2 G J8 . I ' J R I J 5 R lJ . I ' J L S I, I , G J l ,
T E L EP H O I : i E : ( 7 l ,S ) B I ,S - 2 G Jb b
App le \1+ is 0 r egiste red t rademark of Apple Comput er , Inc .
No. 68 - January 1984 MICRO
NOW - FULL POWER ASSEMBLY LANGUAGE!!
GET THE VERSATILITY OF INDEPENDENTLY
ASSEMBLED RELOCATABLE SUBROUTINES WITH A
RELOCATING LINKING LOADER
• For use with APPLE DOSTOOLKIT ASSEMBLER REL f iles
• Relocate and link up to 255 REL files• Convenient speci fication of relocation parameters (output ti le,
star t address, REL file names, ... ) in text control file
• Comprehensive error reporting and recovery• Memory map has module and entry point addresses to aid
debugging• Complete with user manual and disk example
• FAST - ten 256 byte REL files done in 30 SECSRELOCATING LINKING LOADER W/MANUAL. . $49.95
MANUAL $ 4.50
Also - FAST·CRYPT - Available for APPLE and IBM
Encryptldecript any file with FAST·CRYPT
An eff ic ient assembly language implementat ion of the DES
(Data Encryption Standard) algorithmFAST.CRYPT W/MANUAL $34.95
KIWI SOFTWARE CO.
P. O. BOX 218 mPlainsboro, N.J. 08536
System requirements:
APPLE II, II +, l ie (or compatablej DOS 3.3 W/48K
IBM·PC, XT (or compatable) PC, MS·DOS W/64K
IBM tm IBM CORP, APPLE tm APPLE COMPUTER, INC.
MS·DOS tm MICROSOFT CORP.
KIWI SOFTWARE does.!lQ!_copy protect its products
send check or money order (N.J. residents add 6% sales tax)
73
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 76/100
This fantastic modem can be pro-
grammed from Applesoft BASIC.
The interface cable is a standard
communications cable - DB-25 to
DB-25, with pin-for-pin connections.
You need 12-conductor cable and Ihave
used as long as about 25 feet without
any problems. It is convenient
however, to have the Smartmodem
near your computer setup, then you
can hear the dialup and the send and
receive carrier tones when you begin
communicating. There are many pro-
gramming options you can choose with
the Hayes Smartmodem, and these are
extremely well documented in the ex-
cellent Owner's Manual. (In case you
have not guessed, I consider the Hayes
Smartmodem my best computing pur-
chase to date!).
The BASICprogram is menu driven
for ease of operation. If you BREAKand
then .RUN the program again, the
Smartmodem functions are cleared("AT Z" is sent to the modem). To
write to the Hayes, merely access the
slot (with PRH2), and PRINTyour com-
mands. Now you can talk to your
modem just like it was a printer with
This is an adaptation of my pro-
gram for the Color Computer.
The hardware requirements are
the Hayes Smart Modem and an RS-232
communications interface. This pro-
gram was specifically written with the
CPS Multifunction card in slot 1 withthe serial port assigned to slot 2 (the
standard slot for communications).
This program should be easily adapt-
able to other interfaces. Seeyour inter-
facemanual for any necessary changes.
Listing 1
1 0 0 R E M S K A R T 3 0 01 1 0 R E M K E L T Y E N G I N E E R I N G1 2 0 R E M W R I T T E N B Y J O H N R . K E L T Y1 3 0 R E M L I N C O L N , N E B R A S K A 6 8 5 0 51 4 0 R E M1 5 0 R E M U S E T H I S P R O G R A M T O C O N N E C T1 6 0 R E M A N D P R D C R A M T H E H A Y E S1 7 0 R E M S M A R T M O D E M T O T H E
1 8 0 R E M A P P L E C O M P U T E R .1 9 0 R E M2 0 0 R E M T H E C O N N E C T O R C A B L E S H O U L D2 1 0 R E M C O H H E C T T O T H E R S - 2 3 2 P O R T2 2 0 R E I ! I N T H E F I l . . L O W I M GW A Y :2 3 0 R E M P I N F O R P I N C O N N E C T I O N2 6 0 R E M2 7 0 R E M T H E 3 0 0 8 A U D H A Y E S K a D E l !2 8 0 R E M K A Y B E U S E D W I T H V I D E O T E X2 9 0 R E I ! O R A N Y O T H E R T E R I ! I N A L3 0 0 R E I ! P A C K A G E T H A T A L L O W S T H E3 1 0 R E M H A V E S T O R U N A T 3 0 0 B A U D .3 2 0 R E M3 3 0 R E M T H E H A Y E S W I L L O P E R A T E3 4 0 R E M L O C A L L Y A T H I G H E R R A T E S3 5 0 R E M B U T N O H I G H E R T H A N 3 0 03 6 0 R E M W H I L E O N L I N E .3 7 0 R E M3 8 0 R E M S E E Y O U R U S E R ' S M A ~ U A L3 9 0 R E M F R O M H A Y E S F O R D E T A I L S .4 0 0 R E I !4 1 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *4 2 0 D I l l K S ( : ; i > , S N S ( 9 ) : { I $ C H R S \l3i t C H R $
( 4i4 3 0 H O t I E : P R I N T : P R I N T " U U * S M A R T K
O D E K * U * * "4 4 0 P R I N T " B Y : K E L T Y E N G I N E E R I N G "4 5 0 P R I N T " U * U U * * * * * * * * U * * * U * "4 6 0 P R I N T : P R I N T " C O N N E C T C A B L E S T O K O D E K ,
"4 7 0 P R I N T " C O M P U T E R A N D P H O N E C O I I P A H Y . "4 8 0 F i d N T : P R I N T : P R I N T " ( B R E A K A N I I L I S 1
T H I S P R O G R A M T O "
4 9 0 P R I N T " S E E C A B l E D E T A I L S ) . "
PRINT "your modem command". To
get back into the normal Apple mode
use "PRHO".
Now you can use a communications
package such as DATACAPTURE or a
similar program to communicate with
bulletin boards or data bases. The pro-
gram includes a command to enable
terminal mode on the CPS card, which
will allow a dumb terminal com-
munications setup.
I know little to nothing of amateur
radio operations, but with a few lines of
BASIC and possibly some hardware,
the Hayes Smartmodem can bemade to
send morse code. Auxiliary relay con-
tacts are provided in the modem to key
the transmitter automatically. It can-
not however, be made to directly
receive morse code. Diagrams describ-
ing the modem to radio interface are
found in the Smartmodem User
Manual Appendix H. Obviously some
nice commercial terminal packagesexist for the Apple, but this program
has made me happy for some time now.
With the Hayes Smartmodem and the
Apple Computer, I am sure you will
also enjoy computer communications.
1 dCRO "
S O O P R I N T : P R I N T : I N P U T " P R E S S E N T E R W H E NR E A D Y ' " A S
5 1 0 H O l l E : P R I N T5 2 0 P R I N T D S " P R I I 2 " : P R I N T " A T I" : R E M C L E A
R M O D E M5 3 0 P R ! N T D S " P R I O "5 4 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *5 5 0 R E M M : N U
5 6 0 M S ( l ) = " A U T O D I A L I N G "5 7 0 I ! S ( 2 ) = " A U T O A N S I I E R I N G "5 8 0 F O R S = 1 T O 25 9 0 P R I N T S " " M $ ( S )6 0 0 " N E X T S6 1 0 P R I N T : P R I N T : P R I N T " S E L E C T O N E O F T H
E A B O V E "6 2 0 G E T A S6 3 0 O N V A L ( A S ) G O S U B 6 5 0 , 1 2 1 06 4 0 G O T O 4 3 0
6 5 0 R E I ! * * * * * * * * * * * * * * * * * * * * * * * * * * *6 6 0 R E M A U T O D I A L I N G R O U T I N E& 7 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * * *6 8 0 R E M6 9 0 H O l l E : P R I N T : P R I N T K S ( l i7 0 0 P R I N T : P R I N T : P R I N T " 1 D I A L A S A V E D N
l l I i B E R "
7 1 0 P R I N T " 2 D I A L A N E W H U M B E R "7 2 0 G E T A S7 3 0 O N V A L ( A S ) G O T O 7 5 0 , 9 5 07 4 0 G O T O 6 9 ( )7 5 0 R E M * * * * * * * * * * * * * * * * * * * * * * *7 6 0 H i ' ! = 2 : R E M H O I I I ! A N Y N U K B E R S7 7 0 R E M T O C H A N G E T H I S L I S T , I I A K E H M = H O W7 8 0 R E M K A N Y I Y O U W A N T T O L I S T ( K A X O F 9 ) .
7 9 0 R E M T H E N I N S E R T L I N E S S I M I L A R T O T H O S EB O O R E I I B E L O W W I T H " 0 U f : : N U I l I l E R SA N D H A M E S .8 1 0 H O M E : P R I N T " N U M B E R S Y O U C A N E A S I L Y C A
L L " : P R I N T8 2 0 S t l $ (1 ) = " 1 X X X - X X X X A F R I E N D
u
8 3 0 S N $ ( 2 ) = " 2 X X X - X X X - X X X X A B B S"
74 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 77/100
You'll
Receive:
.M IC RO C alc .. .a miniature sp~ad·sheet program that makes complex, repetitivecalculations a breeze•
• M ASTER •..a guessing game that teachesprogramming with random numbers and 'flags•
• V IC C lo ck •• •o teach you ON.•GOSUB functionand character graphics.
• BR E AK ·U P...apopular game that also teaches howanimation is achieved with PEEKSand POKESto screenmemory•
Use this coupon or the postage paid card in this issue to order.
MICRO Books P.o. Box 6502, Chelmsford, MA01824
o YES, please rush copies of MASTERINGYOURVIC-20 (w/cassette))
at only $19.95 per copy (plus $2.00 slh, MA res. add 5% sales tax).
My payment of $ is enclosed. I'm paying by 0 Check 0 MO
o VISA 0 MC
NAME __
ADDRESS _
CITY ---- STATE ZIP _
CREDITCARD# EXP.DATE _
Allow 6- 8 weeks for delivery.
• Pius .•• music programming,string manipulation, sorting
demonstrations, and more.
Each ProgramWorth the Priceof the Book!
O rder you r copy o f
M AS T ER I NG 'YOURV IC · 2 0
Today !
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 78/100
TERMINALS
910 $519.00
910 Plus $599.00
914 $569.00
924 $689.00
925 $739.00
950 $929.00
970 $1039.00
COMPUTERSTeleport Portable CALL
800A $1099.00802 $2699.00
803..... . $1949.00
802H $4695.00
806/20 54999.00
816/40 $9199.00
1602 $3399.00
1603 CALL
Spirit XL Portable $3999.00
IIE·I $1369.00
IIE·2 $1649.00
IIE·3 $2399.00
IIE·4 $3199.00
PC·E $1579.00
PC·l $2399.00
PC·2 $2799.00
PC·XL $3599.00
1620 $3599.00
1630 $5499.00
1640 $6499.00________________ .;;C,;,y;,;m;,;a;.,;Soitware...............• CALL
fBSANVOMBC·550 PC CALL
MBC·555 PC .................••. CALL
MBC 1100 $1599.00
MBC 1150 $2099.00
MBC 1200 $1999.00
MBC 1250 $2399.00
FDD 3200·320K Drive $399.00
FDD 6400·64K Drive $499.00
P;...R.;5.;5.;00.;..P;_ri;.;n;.;te;.;r...,;.....,;..,;;;,; ;,;...;$..;6.;9..;9...0;.;. M0OEMS-
ANCHOR
Mark I (RS·232) $79.00
Mark II (Atari) $79.00
Mark III (TI·99) $109.00
Mark IV (CBM/PET) $125.00
Mark V (Osborne) $95.00
Mark VI (IBM·PC) $169.00
MarkYlI (Auto Ans/Auto Dia l) $119.00
Mark XII (1200 Baud) $299.00
TRS·80 Color Computer $99.00
9 Volt Power Supply $9.00
HAYES
Smartmodem 300 $219.00Smartmodem 1200 $509.00
Smartmodem 1200B $459.00
Micromodem II $265.00
Micromodem II Plus $299.00
Micromodem liE $269.00
Micromodem 100 5299.00
Smart Com II $89.00
Chrono9raph $199.00
NOVATION
J·eat $99.99
SmartCat 103 $179.00
SmartCat 103/212 $399.00AutoCat $219.00
212 AutoCat $549.00
Apple Cat II $249.00
212 Apple Cat $569.00
Apple Cat 212 Up9rade $309.00
Cat $139.99
D·Cat $ f49.00
PC·Cat $339.00
ZENITH
ZT·l $369.00
APPLE INTERFACE
CARDS & SUFFERSChoose from PKASO, Orange Micro,
MPC. Mic roMax , Tymac , Quadram &
Practical Peripherals CALL
MONITORSAMOEK
300 GTeen $149.00
300 Amber $159.00
310 Amber 5169.00
Color 1 $279.00
Color 1 P lu •................. $299.00
Color 2 ....•................. $399.00
Color 2 Plus $419.00
Color 3 $349.00
Color 4 $699.00
BMC12" Green $79.99
12" Green HI·RES $119.99
9191·13" Color $249.99
GORILLA
12" Green $88.99
12" Amber $95.99
NEC
JB 1260Green $109.99
JB 1201 Green $149.99
JB 1205Amber $159.99
JC 1215 Color $299.99
JC 1216 RGB $429.99
OUAORAM
Quadchrome $499.99
TAXAN
12" Green $119.00
12" Amber $129.00
Taxan 1 RGB $279.00
USI
Pi 1, 9" Green $99.99
Pi 2, 12" Green $119.99
Pi 3,12" Amber $149.99
Pi 4, 9" Amber $139.991400 Color $269.99
ZENITH
ZVM 122 Amber $99.99ZVM 123 Green ..........•... $89.99
ZVM 135 Color/RGB $469.99
NEe 3550 •••...•••.• 1699.00
PERCOM/TANOON
DRIVES
5'/," 320K Floppy $249.00
5 Me9 Hard w/Control le r $1399 .00
10Me9 Hardw/Contro ller $1699.00
15Me9 Hardw/Contro ller $2095.00
20Me9 Hardw/Con trol le r $2399 .00
AMOEK
310A Amber Monitor $169.00
DXY 100 Plotter $599.00
Color II $399.00
AST RESEARCH, INC.
Six Pak Plu •... lrom " .$279.00
Combo Plus 1I Irom $279.00
Me9a Plus lrom $309.00
I/O Plus 1I..• Irom $139.00
OUAORAM
Quadlink $549.00
Quad board as low as S289.oo
Quad 512 Plus . .. as low as $249.00
Quadcolor as low as $21 9.00
Chrono9raph $89.00
Parallel Interface Board S89.00
64K RAM Chip. Kit $59.00
MICRO PRO
WordStar/Mail Merge $369.00
InioStar $299.00
SpeliStar $159.00
CalcStar $99.00MICROSTUF
Cros.talk '5105.00
MICROSOFT
Multiplan.... . $159.00
pfa
Write:
Graph:
Report:
File:
goruncne-: as law as
APPLE
79.00
79.00
79.00
79.00
16.00
IBM
89.00
89.00
79.00
89.00
16.00
-cau On Titles
IUS
EasyWriter II . ..5189.00
EasySpelier ... . ... $119.00
EasyFiler. .. $229.00
CONTNENTAL SOFTWARE
lstCassMal/Form Letter _,$79.00
The Home Accountant Plus . .. 588.00SYNAPSE
File Manager $89.00LOTUS
1·2·3. . $319.00PROFESSIONAL SOFTWARE
PC Plus /The Boss .. . . ..... $379.00
VISICORP
VisiCalc
VisiCalc 4
VisiCalc-Advanced
VisiWord/Spel1
Visitrend/Plot
VisiLink
VisiFile
VisiSchedule
Visidex
VisiPlot
VisiTerm
Desktop Plan
Bus. Forecast Model
Stretch Calc
VisiTutor Calc
VisiTutor·Advanced
VisiTutor Word
Vision Calc
Vision Graph
Vision Mouse
Vision Host
IBM APPLE
159.00
159.00
269.00
249.00
199.00 199.00
169.00
199.00 169.00
199.00 199.00
159.00
135.00
75.00
199.00 169.00
75.00 75.00
75.00 75.00
59.00 59.00
75.00 75.00
59.00 59.00
249.00
129.00
159.00
319.00
PRINTERSAXIOM
AT·l00 Atari Interlace $249.00
CD·l00 CBM 64/VIC 20 $249.00
GP·l00 Paralle l Inter lace .,. $199.00
BMC
401 Letter Quality $589.00
BX·80 Dot Matrix $269.00
CENTRONICS
122 Parallel $499.00
739·1 Parallel $399.00
739·3 Serial $449.00C.ITOH
Gorilla Banana $209.00
Prowriter 851 OP $379.00
Prowriter 1550P $679.00
Al0 (18 cps) 569.00
Fl0·40 $999.00
Fl0·55 $1499.00
COMRI:X
ComWriterll LetterQuality ... $549.00
DIABLO
620 Letter Quality $949.00
630 Letter Quality $1749.00
OAISYWRITER
2000 $999.00
2500 CALL
Tractor Feed $109.00
EPSON
MX·80FT, MX·l00, RX·80, RX·80FT,
FX·80, FX·l00 CALL
IDSPri sm BO For Configurations CALL
Pri sm 32 For Configurati ons CALLMANNESMAN TALLY
160L. $589.00
180L. $799.00
NEC
8023 Dot Matrix...... .. $379.00
8025 Dot Matrix.. .. $669.00
2050 Letter Quality.. . $999.00
3510 Serial/Letter Quality ..' $1449.00
3530 Parallel/Letter Quality $1499.00
3550 IBM/Lei ter Qua li ty $1699.00
7710/7730 Serial/Parallel. .. $1949.00
OKIOATA
82.83 ,84,92,93 ,2350,2410 .. CALL
SMITH CORONA
Tp·2 $449.00
Tractor Feed..... 5119.00
SILVER REED
500 Letter Quality 5469.00
550 Letter Quality.... . $699.00
STAR
Gemini 10X . $299.00
Gemini P15 .. $449.00
Delta 10....... ..$559.00
Serial Board $75.00
TOSHIBA CALL
TRANSTAR •......... CALL
PRINTER CABLES
Available for Atari, Commodore, IBM,
Apple, Epson, Kaypro, Tek!video, Frank-
lin, Ea9le, Sanyo, Osborne, NEC,
Zenith and many others. Wesupplyall
your computer needs!
PAPER SUPPLIES
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 79/100
ACE 1000 Color Computer CALL
ACE Family Pack System CALL
ACE PRO PLUS System CALL
ACE1200Off ice M9mt. System CALL
"NOT liE EXPENSIVE"
MICRO-SC
A2 .........................•. $219.00
A40 ........................•. $299 .00
A70 $319.00
C2 Controller $79.00
C47 Controller $89.00
RANA
Elite 1 $279.00
Elite 2 $389.00
Elite 3 $569.0C
APPLE lie STARTER PACK
64K Apple lie , Disk Drive & Controller.
80Column Card, Moni to r I I & DOS3.3
COMPLETE $1499.00
(:: commodore. CBM
CBM 4032 .
CBM 8096 ..
CBM 9000 . ..
. 5599.00
... 5869.00
.. . .. . 5999.00
B128·80... . 5769.00
CBM 64K Memory Board 5269.00
8032 to 9000 UP9rade 5269.00
2031 LP Disk Drive $299.00
8050 Disk Drive $949.00
8250 Disk Drive. . $1199.00
4023 Printer. . 5379.00
8023 Printer $569.00
6400 Printer . $1399.00
Z·RAM......... . 5499.00
Silicon Office. . 5699.00
The Manager 5199.00
Soft ROM . $125.00
VisiCalc 5159.00
PROFESSIONAL
SOFTWARE
Word Pro 2 Plus. . 5159.00
Word Pro 3 Pius $189.00
WordPro4 Pius/5Plus each $279.00
InloPro......... .. $179.00
Adm,n1strator '" S399.00
Power....... " $79.00
8032
$599CBM 64 $199
VIC20 •.......•.• CALL
C1541 Disk Drive $249.00
C1530 Datasette $69.00
C1520ColorPrinter/Plotter $169.00
C1525 Dot Matrix/ParalleL .. $219.00
C1526 Dot Matrix/Serial $279.00
C1702 Color Monitor $249.00
C1311 Joystick $4.99
C1312 Paddles $11.99
C1600 VIC Modem $89.00
C1650 Auto Modem $89.00
Logo 64.... . $49.00
Pilot 64 539,00
Simon's Basic 519.00
Word Pro 64 P lus 559.00
Parallel Printer Interface $69.00
Calc Resufl64 $129.00
Codewriter 64 575.00
Ouick Brown Fox $49.00Word Pro 64 Plus.. . 559.00
We stock a ful l inventory of software for Commodore, such as:
Artworx. Broderbund, Commerc ia l Dala, Creative Software,
Epyx, HES, MicroSpec, Nufekop, Romox, Sirius, Synapse,Thorn EMI, Tronix, UMI, Victory, Spinnaker, Rainbow & Timeworks!
CALL FOR DETAILS!
6 : : A [ h ; i D C D M ; ;~ SHARP
41CV $209
41CX ......•...• $259
HP 10C . . .. 551.99
HP 11C . 569.99
HP 12C 588.99
HP 15C . . 588.99
HP 16C . 588.99
HP 75C 5749.99
HPIL Module.. . 598.99
HPIL Cassoor Printer 5359.99
Card Re.der 5143.99
Ex tended Functi on Module $63.99
Time Module 563.99
NECPC-8201 Personal Computer 5599.00
PC·8221A Thermal Printer 5149.00
PC'8281A Data Recorder 599.00
PC·8201-o6 8KRAM Chips 5105.00
PC·8206A32K RAMCartridge S329.oo
PC-150DA ..• $165.99
PC-125DA ••.. $88.99
CE·125 Printer/Cassette .... 5128.99
CE-150Color Printer/Cassette•..$171.99
CE·155 8K RAM 593.99
CE 181 16K RAM 5134.99
CE 500 ROM Library 529.99
TIMEX/SINCLAIR1000
Timex/Sincl.ir 1000 535.99
16K Memory 529.99,
2040 Printer 599. 99
VuCalc $17.99
Mindware Printer $99.99
A \ . H O M E
A T A R I '
SDDXL.••••. $1S9
SDDXL•••••. $299
1010 Recorder $74.00
1020 Color Printer $249.00
1025 Dot Matrix Printer $449.00
1027 Letter Quality $299.00
1030 Direct Connect Modem ... CALL
1050 Disk Drive $379.00
CX30 Paddle $12.00
CX40 Joys tic k ......•... each $8.oo
CX77 Touch Tablet $64.00
CX80 Trak Ball ..............• $48.00
CX85 Keypad $105.00
4003 Assorted Education 547.00
4011 Star Raiders $33.00
4012 Missile Comm.nd $29.00
4013 Asteroids $29.00
5049 VisiCalc $159.00
7097 Logo $79.00
7101 Entert.iner $69.00
7102 Arcade Champ $75.00
S026 Dig Dug .•.............. 533.00
S030 E.T. Phone Home $33.oo
8031 Donkey Kong 539.00
S036 Atari Writer 579.00
S040 Donkey Kon9, Jr 539.00
S043 Ms. PacMan 539.00
S044 Joust 539.00
DISKETTESMAXELL
5'/.' MD-1 $29.00
5'/.' MD-2 539.00
8" FD-1 (55/00) 539.00
8" FD-2 (05/00) $49.00
VERBATIM
5'/," 55/00 ........•...•...... 526.99
5'/.' 05/00 536.99
ELEPHANT
5'/0" 55/50 518.49
5'1," 55/00 522.99
5'1," 05/00 .......•.........•• 528.99
HEAD
51/4' D isk Head Cleaner .. .• •. $14 .99
DISK HOLDERSINNDVATIVE CDNCEPTS
Fl ip-n·Fi le 10 ........••........ 53.99
Fllp-n-File 50 517.99
Flip-n-File(400/8OOROM)Holder.•517.99
WK ENTERPRISES
Alan Letter Per1ect·Disk(4O/80).. $79.99
Alan Letter Perlect-ROM(4OcoQ . . •579.99Alan Letter Per1ect-ROM(SOoI) •..$79.99
AIBriData Perlect-ROM(SOcol)••...$79.99
Ata ri Spe ll Per fect ·D ISK . .. .. $59.99
Atari Uti li ty/MaiIMerge ... .. .• $21.00
App le Let ter Per fect .• .. .. .. .. 599.00
App le Data Per fect . .. .• .. .. .. $75 .00
Apple LJK Util ity ..•.......••. $21.00
AppfeLowerC8seGenerato< .•.• 19.00
12DDXL .... CALL
14DDXL ...• CALL
[ ~ E f H J ( ) M lAT 88-51 .
AT 88-A2 $259.00
AT 88-52.. . 5529.00
AT 88-51 PD. . $429.00
AT 88-DDA 5119.00
RFD40·S1 $449.00
RFD 40-A1 $269.00
RFD 40-52 5699.00
RFD 44·51 5539.00
RFD 44-52 5869.00
TEXAS INSTRUMENTS
TX 99·51 $279.00
RANA
1000 .
TRAK
AT·D2 $389.00
MEMORY BOARDSAxlon 32K 559.00
Axlon 48K 599.00
Axlon 128K 5299.00
Intec 32K 559.00
Intec 4BK 585.00
Intec 64K $99.00
Intec Real Time Clock $29.00
ALIEN VOICE SOX
Atari 5119.00
Apple...... . 5149.00
KOALA PAO
At.ri.......... .575.00
Apple....... . 585.00
IBM . 595.00
CBM 64. . 575.00
CONTROLLERS &
.JOYSTICKS
WICO
Joystick................ ..521.99
34way Joystick.... . 522.99
Famous Red Ball 523.99
Power Grip............ . 521.99
BOSS Joystick 517.99
ATARI/VIC Trak Ball. 534.99
Apple Trak Bali.... . 554.99
Apple Adapter 515.99
Apple Analog 537.99
KRAFT
Joystick .
Atari S ingle Fire $12.99
Atari Switch Hitter S1S.99
Apple P.ddles.. .534.99
IBM Paddles 534.99
IBM Joystick.. . 546.99
AMIGA
3100 Single 513.993101 Pair... . 519.99
Joyboard 537.99
TG
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 80/100
8 4 0 F O R K = 1 T O H tI8 5 0 P R I N T S N $ ( K )8 6 0 N E X T8 7 0 P R I N T : P R I N T " S E L E C T 0 t I E O f T H E A B O V E "
a s e P R I N T " ( B R E A K A I D L I S T T O E D I T T H E S E " UM B E R S ) . "
8 9 0 G E T A S9 0 0 N B = V A l ( A S )9 1 0 I F N B ( 1 O R H i ) H tI T H E N 7 5 09 2 0 P $ = M I D $ ( S N $ ( N B ) , 5 , 1 6 )
9 3 0 G O S U B 1 0 7 l )9 4 0 R E T U R N9 5 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * *9 6 0 P R I N T : P R I N T " D I A l I N G A N E W N U M B E R "9 7 0 P R I N T : P R I N T " T Y P E I N T H E P H O N E N U M B E R
T H A T "9 8 0 P R I N T " Y O U W I S H T O C A L L . "9 9 0 P R I N T " E X A M P L E S : "1 0 0 0 P R I N T " 1 - 8 0 0 - X X X - X X X X L O M G . D I S T A N C E
1 0 1 0 P R I N T " 1 1 2 - 8 0 0 - X X X - X X X X F R O H L I N C O L N1 0 2 0 P R I N T " X X X - X X X X L O C A L C A L L1 0 3 0 P R I N T1 0 4 0 I N P U T " T Y P E D E S I R E D N U M B E R " j P $1 0 5 0 G O S U S 1 0 7 01 0 6 0 R E T U R N .1 0 7 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * * *
1 0 8 0 R E M N U H B E R K N O W N A T T H I S P O I N T1 0 9 0 R E M R E A D Y T O D I A L1 1 0 0 P R I N T D $ " P R t l 2 " : P R I N T " A T T F O D " P S1 1 0 1 R E M T O U C H T O N E , I F Y O U W A N T P U L S E , U
S E 'P ' .
1 1 0 5 R E K O H A H G E T H E ' 0 ' T O ' 1 ' F O R F U L L D UP L E X
1 1 1 0 P R I N T D $ " P R t I O "1 1 2 0 R E K * * * * * * * * * * * * * * * * * * * * * * * * * *1 1 3 0 R E M Y O U C A N R U N A N Y T ~ I N A L1 1 4 0 R E K P A C K A G E T H A T Y O U W I S H B Y1 1 5 0 R E K E D I T I N G T H E N E X T L I N E S ,1 1 6 0 R E K P R I N T D S " R l J N T E R M I N A L F ' R O G R A K "1 1 7 0 H O K E : P R I N T : P R I N T " Y O U N E E D T O U S E
Y O U R O W N "1 1 8 0 P R I N T " T E R K I N A L P A C K A G E A T T H I S P O I N T "
1 1 9 0 P R I N T " ( S U C H A S V I D E O T E X A M D O T H E R S ) , "1 2 0 0 G O T O 1 9 7 01 2 1 0 R E K * * * * * * * * * * * * * * * * * * * *1 2 2 0 R E M A U T O A N S W E R R O U T I N E1 2 3 0 R E M * * * * * * * * * * * * * * * * * * * *1 2 4 0 R E M1 2 5 0 H O M E : P R I N T : P R I N T M $ ( 2 )1 2 6 0 P R I N T .1 2 7 0 R E M K E H I J1 2 8 0 A H S ( l ) = " D O H O T A N S W E R "1 2 9 0 A N $ ( 2 ) = " A N S W E R I " " E D I A T E L Y "1 3 0 0 A N S ( 3 ) = " A N S W E R A F T E R X X R I N G S "1 3 1 0 F O R S A = 1 T O 31 3 2 0 P R I N T S A j A N $ ( S A )1 3 3 0 N E X T S A1 3 4 0 P R I N T : P R I N T : P R I N T " S E L E C T O " E O F T
H E A B O V E "1 3 5 0 G E T A S1 3 6 0 H O M E : P R I N T : P R I N T " " K S ( 2 )1 3 7 0 O N V A L ( A S ) G O S u e 1 3 9 0 , 1 4 7 0 . 1 6 4 01 3 8 0 C O T O 1 2 1 0 .1 3 9 0 R E H * * * * * * * * * * * * * * * * * * * * * * * * *1 4 ( ) O R E K D O " O T A N S W E R1 4 1 0 P R I N T : P R I N T " * * * " A N S ( l l " U * "1 4 2 0 P R I N T : P R I N T " T H E S M A R T K O D E M A N S W E R
F U N C T I O N "1 4 3 0 P R I N T " I S D I S A B L E D . "1 4 4 0 P R I N T D S " P R I I 2 " : P R I N T " A T S O = O "1 4 5 0 F ' R I N T D $ " P R I I O "1 4 6 0 G O T O 1 9 7 01 4 7 0 R E K * * * * * * * * * * * * * * * * * * * * * * * * *1 4 8 0 R E M A H S W E R I H H E D I A T E l Y
1 4 9 0 P R I N T " * * * H A N $ ( 2 ) " * * * "1 5 0 0 P R I N T " T H E S l t l l R T I l D E M W I L L A N S W E R A L L
"1 5 1 0 P R I N T ' ' C A L L S I K H E D I A T E L Y . ·1 5 2 0 P R I N T " U S E T H I S T O T R A N S F E R C A L L S T H A T
"1 5 3 0 P R I N T H A R E A l . . R E A D Y N P R O G R E S S B E T W E E N
"1 5 4 0 P R I N T " T W O I N D I V I D U A l S T O C O t I t U M l C A T I O
N "1 5 5 0 P R I N T " B E T W E E N T H E I R C O t t P U T E R S . ·
1 5 6 0 G O S U B 1 9 0 01 5 7 0 P R I N T ) ) $ " P R I 2 " : P R I N T " A T " D P $ " A "1 5 8 0 P R I N T ) ) $ " P R I O "1 5 9 0 P R I N T " A T T H I S P O I N T Y O U N E E D T O R U N "1 6 0 0 P R I N T " O R E X E C Y O U R O l I N R E C E I V E R "1 6 1 0 P R I N T " P R O G R N t T O I M T E R P R E T T H E "1 6 2 0 P R I N T " I N C O I U H G C A L L . "1 6 3 0 G O T O 1 9 7 01 6 4 0 R E M * * * * * * * * * * * * * * * * * * * *1 6 5 0 R E M A N S W E R A F T E R X X R I N G S1 6 6 0 P R I M T : P R I N T II * U " A N $ ( 3 1 " * * * "1 6 7 0 P R I M T : P R I N T " T H E S H A R T M O D E M W I L L A N
S W E R A I . . L "1 6 8 0 P R I N T " C A L L S A f T E R T H E K l I t t B E RO f R I N G S
"1 6 9 0 P R I N T " Y O U S E L E C T ( F R O M 1 T O 2 5 5 R I M e S
)1 1
1 7 0 0 P R I N T1 7 1 0 I N P U T " H O W I W I Y R I N G S ( 1 T O 2 5 5 ) U jR G1 7 2 0 R G = I N T ( R G I1 7 3 0 I f R G < 1 O R R G ) 2 5 5 T H E N 1 7 1 01 7 4 0 P R I N T : P R I N T " T H E P H O N E W I L L B E A K S W E
R E D -1 7 5 0 P R I N T " A F T E R " R G u R I N G S . "1 7 6 0 G O S U B 1 8 0 01 7 7 0 P R I N T D $ H P R I I 2 " : P R I N T " A T " D P $ " S O = " R G1 7 8 0 P R I N T ) ) $ U P R I I O "1 7 9 0 P R I N T : G O T O 1 5 9 01 8 0 0 R E M * * * * * * * . . * * * * * * * * * * * * * * * *l a l 0 R E M F U l l O R H A L F D U P L E X1 8 2 0 P R I N T : P R I N T u D O Y O U W A H T F U L L O R H A L
F D U P L E X ? "1 8 3 0 P R I l t T " < I F Y O U D O N O T K N O W , T R Y H A L F ) .
"
1 8 4 0 P R I N T : P R I N T " l F U l l D U P L E X "1 8 5 0 P R I N T " 2 H A l F D l F L E X "1 8 6 0 G E T A $1 8 7 0 O M V A L . ( A $ ) G O T O 1 8 8 0 , 1 9 2 01 8 9 0 R E M F U L L D U P L E Xl a 9 0 O P $ = "Ft"1 9 0 0 P R I N T : P R I N T " F U L L D U P L E X S E L E C T E D . "1 9 1 0 G O T O 1 9 5 01 9 2 0 R E M H A l F D U P l E X1 9 3 0 O P $ = " F O "1 9 4 0 P R I N T : P R I N T " H A l F D U P L E X s a E C T E D . "1 9 5 0 P R I N T1 9 6 0 R E T U R N1 9 7 0 R E M * * * * * * * * * * * * * * * * * * * * * * * * *1 9 8 0 R E M E X I T R O U T I N E1 9 9 0 P R I N T : P R I N T " T H I S P R O G R A M H A S E N D E D .
"
2 0 0 0 P R I N T " T H I S P R O G R A M W I L L G O I N T O "2 0 1 0 P R I N T " T E R M I N A L t i l DE I N 5 S E C O M D S "2 0 1 5 P R I N T , , - - - - - - - - - - - - - - - - - - - - - - - - "2 0 2 0 P R I N T " T Y P E ' C T R l - C ' F O O L O W E R C A S E "2 0 3 0 P R I N T " T Y P E ' C T R L - A ' F ~ S E N D I N G L I K E
F E E D S "2 0 4 0 P R I N T " T Y P E ' C T R L - R ' ' C T R L - X ' T O E X I T
T E R I U I W . . K O I I E "2 0 6 0 P R I N T " - - - - - - - - - - - - - - - - - - - - - - - - "2 0 6 5 F O R I = 1 T O 1 0 0 0 0 : N E X T2 0 7 0 P R I N T ) ) $ " P R I 2 " : P R I N T C H R $ ( 9 J U H "2 0 8 0 R E " T H I S P U T S " G U N T A I N C P S C A R D2 0 9 0 R E M I N T O H A L f D U P l E X T E R l t I M A l . O D E2 1 0 0 R E f t F O R F U L L D U P l E X S U B S T I T U T E2 1 1 0 R E M A N ' F ' F O R T H E ' H ' I N A B O V E L I N E2 1 2 0 P R I N T ) ) $ U p R I I O u : N D NC:ItO'"
78 MICRO No. 68 - January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 81/100
Speedload
Enhanced
Apple DOS
By Enrico C ol om b in i
ThiS article describes how to build
an enhanced version of Apple
DOS 3.3 which performs all
loading operations about four times
faster then original DOS. The modified
DOS is fully compatible with a 48K
slave DOS, including inner routines
and addresses, excepted that it cannot
format new diskettes for the first time.
Why Apple DOS Is So Slow
Since I started using Apple, I was
puzzled by the apparently strange
behaviour of the Disk Operating
System. Why the DOS itself is loaded
much faster than a binary file of equal
length? A slave DOS 3.3 is loaded in
less than 2 seconds. Afileof equal size
(9.25K) is loaded in about 11 seconds.
Even considering the time spent in
looking at index and other file informa-tions, there is still a great difference in
loading times. With an ear at the head
steppin-motor and a hand on the stop-
watch, I measured the average track-
loading time: about 3.70 seconds. Ifyou consider that the disk rotates at
five turns per second (a tum in 200
msec), you can see that the entire track
passes under the head 3.70 by 5, that is
over 18 times! Why is it not possible to
load the track in just one revolution of
the diskette? Where is the theoretical... limit? And the practical one? For the
MICROo. 68 . January 1984
answers, we must look at the Apple
hardware and at the inner structure
of DOS.
Apple does not have a specialized
disk controller chip asWestern Digital
1791 or similar device. It has instead a
little masterpiece of engineering: a
"state machine" based on a PROM and
a shift register. This circuit performsthe hardware encoding/decoding opera-
tions to and from the R/W electronics
of the disk drive. But that simplicity
has a cost: the encoding/ decoding pro-
cess is not complete. It just sends to or
receives from the disk drive a stream of
6-bit "nibbles". The remainder of the
process, that is the nibbles-bytes con-
version, has to be done by software.
Every track is organized as a stream
of 16 sectors, 256 bytes each. In
reading, the software conversion of a
sector (342 nibbles to 256 bytes) takes
about 10msec. In theory, it is thereforepossible to read the entire track (200
msec) and then decode it (10 msec by
16 = 160 msec) in only 360 msec. But
this implies a great waste of space for
the nibblized-track buffer: 342 by 16
= 5472 bytes of memory! It is not
acceptable.
Amore realistic approach is to read
and decode one sector at a time. That
is, read a sector and decode it, read the
next sector and decode it, and so on.
Ok, but what is the NEXT sector?
While the program decodes the first
79
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 82/100
Raise your Apple's IQ
e Tintes AYear!
AOne Year SubscriptionBrings You 12 Issues With:
Over $500 of Programs for your Home, Business, Education
and Entertainment. Complete Program Listings with
Instructions.
Comprehensive Articles that show what each program does,
how to use it and how to type it into your Apple, Franklin ACEor
other Applesoft-compatible computer.
Regular Features for the Beginner and Expert.
On The Scene
The Latest New Software/Hardware Releases.
Products! Inside and Out
Comprehensive Product Reviews.
Education Corner
Programs that help make Learning Fun.
Tips 'N Techniques
Little known programming Tricks you can Use.
Disassembly Lines
An Expert reveals the mysteries of Applesoft.
Utilities
Superchargers for Basic, DOS, Printing, and More.
Games
Arcade Fun you can Type and Run.
Noteo Domesti c U.S. Fir st Class subscri pti on rate is $51. 95
o Canada Air Mail subscripton rate is $59.95
o Outside Ihe U.S. and Canada Air Mail subscription rate is $89.95
All payments must be in U.S. funds drawn on a U.S. bank.
©1983 by MicroSPARC Inc . A ll Righ ts Rese rved .
Apple® i s a register ed trademark of Apple Comput er. Inc.
ACE" is a regi stered t rademar k of Frankl in Computer . Inc.
Try a NIBBLE!Here's what some of our Readers say:
o "Certainly the best magazine on theApple!"
o "Impressed with the quality and content. "
o "Programs remarkably easy to enter. "
o 'Ttl be a subscriber for life!"
o 'Your service isfantastic ... as a matter of fact, I'm
amazed!"
T ry a NIBBLE!
NIBBLE is focused completely on the Apple and
Applesoft-compatible computers.
Buy NIBBLEthrough your local Apple Dealer or subscribe now
with the Coupon or Order Card in this issue.
You'll want Back Issues Too!
Here are some examples of programs you can get:
The Investor-Stock Tracking, Reporting, and Graphing.
Recipe Box-Kitchen/Menu Management made Fun.
The Librarian-Auto Logging and Retrieval of your Disks.
DesignerfIllustrator-Art/Design Creation and
Composition with Graphics.
Machine Language Editor-Quick and Easy Aid for Typing
and Changing MIL Programs.
And Much ... Much More!NIBBLEwill become a permanent part of your Reference
Library. Discover why 95% of NIBBLE Readers save every issue
Join more than 120,000 Apple/Ace users who say:
"NIBBLE IS TERRIFIC!"
S U B S C R IB E N O W A N D S A V E $ 1 2 .0 0 O F F T H E C O V E R P R IC E
r - - - - - - - - - - . ,bb l· • Enl I We a=1 Master Charge & Visa II
Box 325, lincoln, MA 01773 (617) 259-9710 I1'lIlry nibble!
IE nc lo se d is m y $ 2 6.9 5 (lo r1 2 is su es )
I(O u ts id e U .S ., s ee s pe cia l n ote o n th is p ag e. )
I0 check 0 money order 0 bill me (U.S. only) IYour subscription will begin with the next issue published after r eceipt of your
Iheck/money order. ICard# Expires -----
PLEASE PAINT CLEAAL Y
ISiqnature IName _
IAddress IIC~ I
State Zip _
1 . - - - - - - - - - - . 1
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 83/100
Figure 1: Sector Interleaving
Access order by RIW head of disk drive"l
o 1 2 3 4 5 6 7 8 9 ABC D E F Physical sector order
o 7 E 6 D 5 C 4 B 3 A 2 9 18 F Logical sector order
The above procedure is repeated for
... every character requested by Basic.
~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -ector, the next physical sector (the
second) passes under the head and can-
not be read. Since the decoding time
(10 msec) is shorter than the sector
duration (12 msec approximately in-
cluding header), the program can safely
read the third sector. After that, it loses
the fourth, reads the fifth and so on.
It is so possible to read only 8 sec-
tors per disk revolution. Starting withthe disk head at the beginning of the
first sector, it takes two turns [400
msec) to read the entire track: reducing
the buffer from 5472 bytes to only 342,
we lost about 10% of speed. A very
good compromise. Considering a head
positioning and first sector finding time
of 150 msec (average), we can expect to
read a track in about 550 msec, or .55
seconds. The DOS track loading time is
near to this value, so we can consider
this time (550 msec) as the practical
speed limit.
Well, Apple can load a track in .55seconds. Yet we do not know why DOS
cannot. Wemust find the reason in the
deepest depths ofDOS itself.
The Cost of StructuredProgramming
I like structured programming. It
improves program development,
testing, debugging and reading. The
program occupies less memory and is
much more easy to modify, even by
another programmer. I make large use
of it in every language, including Basic,and I am greatly rewarded: my work is
much easier. All these advantages are
achieved at only one cost: the program
runs slower. How much slower it runs,
it depends on the level of structuring.
More deep the structure, more slow the
program. For some time-critical pro-
grams, structuring to the deepest level
can be a great disadvantage. For these
programs, the programmer must find
the better compromise, that is the level
where it must stop structuring and
start "spaghetti-programming".
No. 68 - January 1984
Apple DOS is a deeply structured
program. It is verywell written and can
be easily adapted to different diskette
organization, that is shorter sectors,
more tracks, etc. At the moment,
however, the 3.3 version is widely
accepted and the coming of another
version is very unlikely, unless the
DOS is wholly changed for new disk
drives. We can therefore see if theslowness depends on the DOS structure
and, if it is so, see if it is possible to
reduce the structure level and so speed
up the operations.
Apple DOS is made mainly of three
blocks, in order of depth:
- The external level, which is the in-
terface with Basic, monitor and user.
- The file manager, which performs
all operations on diskette files.
- The RWTS, which physically
reads/writes a single disk sector.
This is [roughly) the sequence ofopera-
tions when Basic inputs a string from a
sequential text file, already opened:
- Basic calls input routine for getting
the first character. Since READ com-
mand is in effect, DOS intercepts
the call.
- DOS external level calls file
manager asking for a single character
from active input file.
- File manager calls its internal
routine "read one byte" [RDIBYTJ.- RDIBYT calls a routine which, if a
byte is not already available, finds and
loads the next sector in the buffer
[using RWTS).
- RDIBYT gets the requested byte
from the buffer.
- RDIBYT calls a routine which in-
crements the pointer (offset) in currentrecord. In case of sequential files,
records are of course one byte long.
Since end of record is reached, the
record counter is incremented and the
offset is reset to zero.
MICRO
- RDIBYT calls another routine
which increments the POSITION file
pointer. After that, it returns with the
wanted byte to main file manager
routine.
- File manager returns to external
level.
- External level returns to Basic with
the first character.
Just a little confused by this
simplified explanation? Well, think
that all increments and calculations are
done in 16 bit arithmetic and you may
begin to understand why sequential
files reading is so slow. But, you will
ask, what has that to dowith loading of
Basic or binary files? It has since DOS,
as I said, is highly structured: it loads
these files using the same abovedescribed procedure, as if they would
be text files! So, Basic and binary
loading is very slow too.
The SPEEDLOAD Approach
How much is the wasted time, in
terms of disk sectors? When DOS is
loading a Basic or binary file, after call-
ing RWTS for reading a sector it waits
for a little less than 100msec 1 8 sectorsorhalf a track) beforecalling the RWTS
again for the next wanted sector.
I must now explain another featureof Apple DOS: sector interleaving.
Using RWTS driven by a fast routine,
as it happens when loading DOS, it is
possible to load a sector every two, ac-
cording with our former analysis. Max-
imum speed can be achieved only if
sectors are loaded in that order. InDOS
3.3, every track is initialized with sec-
tors in ascending order, that is starting
with sector $0 and ending with sector
$F (hex). But this is the physical sector
order. Using a table called "interleav-
ing table", DOS make use of the sec-
tors as if they were in another order,the "logical order".
Figure 1 shows the correspondence
between physical and logical sector
numbers. The upper line represents the
sector numbers in a track as they are
physically written on the diskette dur-
ing initialization process. The lower
line shows the sector numbers as they
are used by the DOS (the RWTS). DOS
stores sectors in descending logical
order, that is starting with sector $F
and proceeding towards sector $0.
Every sector is stored in the physical
81
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 84/100
sector located through the interleaving
table. For example, logical sector $F is
stored in physical sector $F, logical $E
in physical $2, $0 in $4 and so on, as
stated by the table in fig. 1. As DOS
always uses sectors in logical order,
you can forget the upper line and look
only at the lower line (logical order).
When loading DOS itself, after
reading sector $7 it must be decoded.
During this operation, sector $Epasses
under the head, unnoticed. When
RWTS is ready for reading sector $6, it
is just this sector which passes under
the head, with very little delay. The
loading time is thus optimized. The
situation is very different when loading
a Basic file [it is the same matter with a
binary file): the time needed by the file
manager for processing sector $7 is so
great that in the meanwhile sectors
$E,$6,$D,$5,$C,$4,$B and $3 pass
under the head. When at last DOS is
ready for reading sector $6, that one is
already passed by and it has to let sec-
tors $A,$2,$9,$I,$8,$F,$O,$7 and $E
pass under the R/W head before it can
at last read sector $6. 17 sectors to
wait: a very long time!
In the book Bag of tricks by Don
Worth and Peter Lechner (published by
Quality Software) you can find a
similar description of the problem. The
authors call the time wasted in waiting
the next sector to read "rotational
delay" and the time wasted in process-
ing a sector "file manager overhead".Searching for a solution, they discarded
(rightly) the idea of modifying the in-
terleaving table, because DOS and
diskettes thus created were incompat-
ible with standard ones. They suggest
to modify the physical sectors order, in
such a way that 8 sectors lay between
two logical consecutive sectors. It is a
good idea, but it has some disadvan-
tages. First, it requires to re-init the
diskette. Second, the majority of copy
programs, and the more reliable ones,
will destroy the work and restore the
standard sector order on the copy.Third, all that work can achieve only a
45% gain in loading speed, in the best
case. If we might read a sector every
two, as in the DOS loading, we can
achieve a much greater improvement.
But this implies rewriting part of file
manager. Well, if there is no other way,
we must follow this one.
There is a problem: after loading
and decoding a sector, there is no time
for copying it in memory at the right
place. It were therefore necessary to
read it directly in memory. But this is
82
Normal DOS
Figure 2: Approximate binary file loading times (In seconds)
File size
1K (1024 bytes)
2K (2048 bytes)
4K (4096 bytes)
8K (8192 bytes) .
16K (16384 bytes)32K (32768 bytes)
not ever possible, as some sectors are
only partially written and unwanted
bytes must not be placed in memory.
Looking closer at the file structure, it
can be seen that only the first and the
last sector does not contain only bytes
to be copied in memory. The first
because it begins with address/length
informations and the last if it is not ex-
actly filled (which is unlikely to hap-
pen). All the sectors in between can be
loaded directly in memory without any
problems.
That is the theory of SPEEDLOAD:
loading the first sector in the normal
way, loading all the subsequent ones
directly in memory, excepted the last,
if it is not wholly filled. Obviously,
there is no gain in loading a very short
file and in preliminary operations (in-
dex looking, etc.), but there is a great
speed improvment as the file size growsup, as you can view from figure 2. Since
SPEEDLOAD trick is in the DOS, it do
not requires any modifications on
diskette formatting and can read any
standard diskette. The modified DOS
can beput on the diskette and it will be
booted exactly as the standard DOS.
Let us go to the practical implementa-
tion of SPEEDLOAD.
Inside The File Manager
Since SPEEDLOAD must deal with
Basic and binary files, we need to lookclosely at the loading process. The in-
volved commands are LOAD, BLOAD,
RUN and BRUN. First, notice that
RUN and BRUNmake use respectively
of LOAD and BLOAD routines, so we
can look only at the latter ones. Let's
look at the DOS loading process:
- External level calls file manager for
reading file informations: loading ad-
dress and length for binary files, length
only for Basic files.
- External level calls file manager for
MICRO
Speedload DOS
3.1
4.2
6.5
9.8
17.632.3
2.5
2.7
3.7
3.9
5.78.3
reading a block of bytes of specified
length.
- External level sets required
parameters and, if needed, starts the
loaded program.
In all loading operations, file
manager make use of the formerly
outlined RDIBYT routine. But forloading a block RDIBYT is called
through a "read L bytes" IRDLBYT)
routine which sets L [the required
length) and jumps in a general purpose
routine [read/write a range of bytes). It
is therefore possible to alter this jump
and redirect it to a hi-speed block
loading routine.
Since the 48Kslave version of DOS
3.3 is universally accepted, I decided to
make SPEEDLOAD not relocatable,
thus keeping it smaller.
After a careful analysis (using
some DOS sources and the QualitySoftware's Beneath Apple DOS), I
determined the input parameters and
conditions of RDLBYTE. These are
outlined in figure 3. The new routine
must respect these conditions in order
to maintain compatibility with stan-
dard DOS.
The SPEEDLOAD routine
The SPEEDLOAD routine is very
little structured, because speed is
needed. There are only 2 msec lor little
more) available between RWTS calls.Figure 4 is the listing of
SPEEDLOAD routine, (in LISA2.5 for-
mat). Notice the assembly address: the
SPEEDLOAD routine take the place of
the DOS 3.3 FORMAT routine, that is
the routine which physically initializes
a new diskette, writing the address
marks on it (and empty data too). The
FORMAT routine is therefore no more
available, but this do not means that it
is impossible to INIT a diskette. Since
the INIT routine is not modified, it is
always possible to re-INIT a previously
No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 85/100
Figure 3: RDLBYT input variables (for 48K slave DOS).All 2'byte variables are in the L'H order.
Memory locations:
Loc. Name Contents andlor meaning
$8S88 FMOPC $03 s REAO (FMNGR opcode)$8SBC FMSUBC $02 = R/W RANGE (FMNGR
subcode)$8SBO FMPAR+O Record index. In pract ice, posi tion in
FMPAR+ 1 file ¢ 1; it is $01 if 8asic file, $03 ifbinary.
$BSBF FMPAR+2 8yte offset in the record; always o .FMPAR+3
$BSC1 FMPAR+4 No. of bytes to read (FILEN)FMPAR+S
$BSC3 FMPAR+6 Before jumping to SPEEOLOAO
FMPAR+ 7 routine, it will contain the loadingaddress (now in Y,X)
$BSCS FMPAR+8 FMNGR return code$BSC6 FMPAR+9 Not used$BSC7 FMPAR+ 10 Address of FMNGR work area buffer
+ 11
$8SC9 FMPAR+ 12 Address of TIS l ist buffer, which+13 contains the first TIS list sector
$BSC8 FMPAR+ 14 Address of sector buffer, which
+1S contains the first data sector
CPU registers:
A: don't care
V,X: loading address (H,L) to be stored In FMPAR + 6,+7
Zero page variables available:
$42,$43 only.
assembler to save the produced object
code under the name SPL.M.
used diskette (if it is not damaged). It is
not possible to INIT a new diskette forthe first time, because the routine
which writes the address marks is no
longer within DOS. A direct call to
RWTS Format returns with a "format
error" indication.
A diskette must be INITed for the
first time using a normal 3.3 DOS.
After that, it can be re-INITed with
SPEEDLOAD DOS, unless an un-
wanted exposition to a magnetic field
has destroyed the formatting. More in-
formation about INIT in the next
paragraph (installation).
The routine is 2S7 ($101) bytes
long. Amore detailed analysis of DOS
might have allowed to further reducing
the routine size, making use of some
DOS subroutines, but I preferred a self-
contained routine. The only external
call is for RWTS. You might be sur-
prised to see a single zero page pointer
(PTR in the listing) used alternately for
two purposes, but I chose to use only
locations used by the standard file
manager routine, thus insuring total
compatibility in any case.
The DCM directive instructs the
No. 68 . January 1984
Installing SPEEDLOAD
Once you have assembled the
SPEEDLOAD routine, you must build
a SPEEDLOAD DOS, following this
procedure:
- Boot a standard 3.3 DOS.
- Put in a new (blank) diskette.
- INIT the blank diskette.
- Insert the diskette with SPL.M
- BLOAD SPL.M, A$BEAF
- Remove the diskette with SPL.M- CALL-lSI (go to monitor)
- A477: 4C BABE (link SPLroutine)
- AE93: EA EA EA (unlink Format
routine)
- CTRL-C (return to Basic)
- Put in again the blank diskette.
- INIT the blank diskette again.
You now have a diskette with
SPEEDLOAD DOS on it. Transferring
SPEEDLOAD DOS to another diskette
can be achieved in two ways:
1.) INIT a new diskette with standard
MICRO
DOS, then boot SPEEDLOADDOS and
re-INIT the diskette.
2.) Transfer tracks 0-2 from
SPEEDLOAD diskette to normal
diskette, using some copy program.
The second way allows you to in-
stall SPEEDLOAD without erasing the
data on the diskette, if you have a track
copy program.
If you want to copy a SPEEDLOAD
diskette, you can do it with COPYA,
but the destination diskette must have
been previously INITed with normal
DOS, or you will get an 1/0 ERROR
message.
Conclusions-.
Although there are many speeded-
up DOS available on the market,
SPEEDLOAD DOS is the only one, for
that I know, which is fully compatible
with normal DOS in inner addresses,
POKEs, variable usage and so on.
SPEEDLOAD works only in loading
process, and that is its major limita-
tion, but that is a constraint if you
want to keep compatibility with DOS
3.3 (and, beside that, I do not wanted to
rewrite all the DOS). However, if you
have a big program, or you made use of
chaining or machine-language
routines, SPEEDLOAD can save you
lots of time, in program development
and usage.
I tested SPEEDLOADwith over 200programs and I do not found any in-
compatibility, even with programs
which make extensive use of the file
manager, as FlD or Microsoft's TASC
compiler. I confess that I removed the
protection system from many of my
game diskettes, only for installing
SPEEDLOAD and avoiding frustrating
delays. I hope we do not have to see
again the hateful "please wait while
loading ... If , now that SPEEDLOAD is
available. HdCRO ·
BiographyAfter working five years in designing
specialized circuits for FM.broadcasting,I founded a little finn which is nowgrowing in the European industrialmicro-board market. Since January 1983 Iwork as free-lance programmer andwriter (mainly for Jackson publishinggroup, based in Milan). My first interestin programming are high level multi-player games and didactical applications.I am responsible for small computers inABRS (a research association) andASTROFISMA (a didactical one for youngpeople). I work with an Apple IT, twodrives and silenrype.
83
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 86/100
. . .(1,1~.&Jz:G.I
'"'"orII
' ". . . ....J
'-o. . . . .
<:><:>cc.--.." "o
<:>u
IX"" C> <»C> C>MX
~~O::~ffl$
WU..O&r.l.:t i O X I( " " . .. U,.., ......J,...,N~,..,OI%aOUa:. U~r.J""'~U.."t.J~
" . . · o : : : . " . . . , ; : . U C C: : : .. . . . .. . . . . . . . . . .U - o L U ><:I<CCO<CCC<CL.J <Co:I<Co.:J,:x,<CCCCro
~
""M~IXJ~C~~<c<c<c<c<c<r:<C<CCC<r:<C<C<C<CCU""'''''.~o:I'''''''''ON.~~U" " _ ~ " " " " _ " " " " " " " " ~ " " " " " " " " " " " " " " " " " " " " " " " " U U W ~ U U Q ~ Q Q = Q~~m~~~ ""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E0 . . . . .'- :=.. . . . 0 : : < >
(J ;;0-0>+-' W
~ . . . . ,",X O"J '- . . . . ...... (1,1 . . . . . '11-
" ' ' ' ' 0:: => . . . . . . . . .'"
. . . . .""
,-.aro ' 1 l U .~ ..-I
U.c
'"(1,1- W 0""
" ' . . . . '- . . . . '" en 0:>.0 '1 ;1
0 >-C· "'-. . . . '- .£:I ..... z: '11 z:",c. s, . . . . : > : :
0 : :> '"0
.....0 G.I .......-, t-- '-0::: CI LI. . . .:::10100... . . . . . . . . ._ ,
0 '. . . < - 0:... : .. .-enG.l ,::: 0 11 f'_ c:: '11 _""< '" U1 1=-'-1 ~!!: 0;: +"
. . . . . - ::f ,_ I >-.....00'1;;l3
.....c~
.£:I ....,
...."0 . . . . . '"- - = " ! , : = " ' . . . . . . . . ",,=,0- 01 1 $-ro L' _...·...W 1'IIII:a::'" c·. .. . G .I :> - II 3UJ & ~ = : : : :n " ' " " >-~en.-.- . . . - _ ....- . -
~-:z =>...J- <::) 0:...
.- - - _ '•••••• ..(1
:c
...r'1;;l G.I0. 'IJ
"0
'"0:::~ro
0
'"
.:..: G.I . . . .U G.IG.I •..J '11 ", L . . . . . . . . ,
. . . . . - < - ,-1)10 :::IW . . . . . E:g~:;: ; >- 0 : : >
i§>....0 '-. . . . :::I tG "0 . . . .
'- . . . . . . . . . '". . . . "0_ .....0 . . . .
0 . . . . . .. .. G .I '11 .... I'I1II0 :=.-"'-r:f: O 'I < - . .. .G.I '-
fflG.l'-%
a : ~ ' ' ' ' ' oil ,-CG < + - ' - + = - <-"""' ............ G.lC . .. .. 0 '> G .I .;:.
'.1'141 41"":' . .& """ s:: 021 : :s<+- O·Q.I ro .... . . . . ...........-r;;t1l z: ..... O>.&J .... UE "' .... 0:::.;x ..... C. E :::I.... 0ro :::I :::I ..... 0 ..... en._' .... I.J !:- '" 0 "'-.: ......::::0_ ""'0 . . . . .tG ~ 0 til '" --... 0 ....'Q. :3'-<II ..... ~.c >._" , - , . . . . . , : > - oil
" '".... G.I '- ,-..,.:.- _..0 . . . . . ."'otn 00>00lI0 ....en.".; 0::: ""Q . . .30 ......... uO:::z:_enu ..... '" ..... z: z: o l I O
~c: : ;~~ G .I QI G.I..... < 0113· ... OGQ :> -CI::...J:a:: .......... t n . : > : : o : : : . ~ . . . . . CO. . . . . . . . _ . - .- . . . . . . . . . . . . . - . - . _ . -
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 87/100
"-0 < 1 1. . . . . . . . .u·....
"00::Go . .. .
'". . . . . . . . .GJCL.. . . . . '": . . : ", . . .- = = ~
. . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . .:=J . . . . . -" '" "" en en =n", en"" c . . . . . < 0
- Go_01 . . . . . . . . . . . .:+ = { ; . . . . . . . . . . . = ,. -- = . . . . . .... Cl. . . .
:2~ 0 = . . . . . Xen :::I....·rl . . . . !...... .
. . . . . .. . . . . <U
. . . . . . . . . .,:.~ 0
. . . . . . ...... 3:=> = U . . . . -0 "Os::. . . . . .. . r a~ . . 1'0 ...... - g
. . . . . .... en 0" 0 400. . . . . . . . . . . .:::Y- en ._oJ a.::CL.. ~.., ...-
-. . .o
~ tJ...... 40
i:::> "0en I"G ••
IX .. •• - S!~ - a.:: ~s I:i....J ._._ ._ .... _ • • _ ..... _ ._ ._ • •• ~
.a:;. . . -c;0
, . . . . = _:. . . <U. . . s:: 4040Go
" ". . . . . . . . . . --0>-
0 "0 " ' . . . . . U1 CU O ..a :: l •. . . . . . '" '" ~~ C- U1,-1_-0
0 40 '" 0
'""c:: 0:: Go ._oJ c- "a::: a.. Q,I
. : o c : . . . . . . II . . . .... ........:: > .....U -0 "0 rd::> Go o a.:: toto
. . . . . ="0 .... . a .:: <U ..
. . . :c ra ra
.. . .o c . . . . L&J ....... :)
. . . . :=J E "0 40 C : : < 1 I._oJ
~ ""ra " ,
.. ~~~-g. . . . 0 0 GJGJ. . . . . . ::> . . . . . . 0:: a.:: ................&J.- . . . ._ . . .-
~-0 . . . .0 C>U
. . . .. , .'1' ._oJ
'-'. . . . 0:::I 00 COIII
. . , .«
GJ
= s:. . . . . .. . . . ._oJ
:::I CL..0 en. . . . . . . . . ." "
::>« «0 en
~ "". . . . .I=>. . . . s:
CL... . . . . ,
%
en " ". . . . .
~. . . . .c . . : . _ . - . _
!£_ • . ...L.J
~ .......~«_ ........, ~""~OC ~....., ....""""NU.U.O.W .WU........,OO""
t...l~ o-~ t:Q ............ca.......",u.,.O"CDCO LnUJL&J ...... u..Ll...L&JC>u..L&J!CA!CAu..~OOU.,..,
~~~~g~g~~~~~~~~~~
GJc:: >.. . . . . . . . . . . ..... :a :c
.D.CJI ~
... .rd<U~! 50::
) ( _ . .. .. .. -4 . ,. .: z :a c::<U . ..D. . . U
- . . . . . . . . .;>-.S::otO W
~ :>. s"""Q,lr .n. . . . . .U · . . . . .. : ; : . . . . ~ . . . . . . . . . . '"40 o.. td~ c: ~C--~ .....<11-0 . : . . :E .: ct- loft::> ..... oo '-I 00'40 . . . . . . . . .! . . . . -8 ~:.!-:;;
........x: .. ....a-o 1!.~. . . u"~... i: ....~I ... 0:: ...... . . . .= . . . . . :z:
0-ftI C-.,:..
"'.... -0\II> ..... 0. . . . . . Cl. W .. ~o ...... :=>s:: . . . . . : : : : " ' : -
,....:c ._oJ II • ... "' ....-0. ,: .CQ ... .. . .....0" r a . .. ..
<U ! # . . . . . . z: :::;~.i:~'i U1U ,-I .....40 '".. . Q .I u . . . . . ~~~3 : :::I .... ->...... II ._oJ x.,:.~ 1 . 1 1 . . . . . . 0 ..... >- . . . . '".Q 0 . .. .. :z: . . . . . . (1100 ...... ..Q 0_1 . .. . CL. . W . . . . c = c = . .. .. .. . -c '" ""0 -0 .... <U c = . .. ....."':c ._oJ -0 ......" .. r ao :: > . . raX-o'" . .~&~ . . . . . . . . . . . ~~==~~:i .3 > -i.3 .3 :i! tG .8
......:;:. . . . . . . . . . . . . . . . . . ... . . . . . _ . - . . . .- . - . - . . . . . . . . .- . _ .. .. . . -
" "1
. . . . . .=. . . . . ~'" :=>
'" " "o
~", : Q. . . " '" 0
-0 - = . . . . . .'0 c::':"" . . . . . .
' ". . . . . . c::
,:: .: .. . . .01 X·..... . . . . .c: Q. I . . .. . . . . 'O~ .:..: 0'0 c: :=> 1..' . . . .ra . . . . . . "" ra U0 II ((.I '- Q. I._oJ >-..... . . . . . tI). . . . .
ONO __.....N........U N~Q""UNOO~.N_N ....~«. . . .. . O u . .. . . ,O . . .. . , .. . . ., . . .. . , .. . . ., Nu o u " " " - O , : Q u t . . . > ~ u u " " " u ~ w
o. . . . . . . . t LI-0"c-.. .4,....,- . , I (,..l C ' " - . . .:=tLJ. .u .. .. :::r4u<r 'u . .. . ....,..w . . . . , . .L&J
QL.l.lu.:::.&n.:&II'l .......Qa;;J......:= aCOCO-4:4: CO-4: D:I.::&:I CO..__,.CQcq
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 88/100
S O F T W A R E
A R T S C I List
M agicalc $149 .00
Magicwindow 99.00
Magicword 99.00
Spec ial, A ll 3 of above. .. 3 4 7.00
B R O D E R B U N D
Payro ll $ 395 .00
AcctlR ec. 3 95 .00
59.95
34 .95
29.95
24 .95
A rcade Mach ine .
C hop lifter .
Sea fox .
G alaxy Wars .
F R A N K L IN C O M P U T ER
W i th 4 8 K RAM , 1 D i s k D r iv e, D is k C o nt ro lle r C ar d,12 " A mb er M on ito r, A dd itio nal64 K R AM , M ag i-
c a lc , M a g icw or d , M a g icw in dow, Ma g ic s pel le r
Spec ial Price $194 9.95
" New " fr om P ro me th eu s P ro du ctsP roModem@ 1200 Bel l 2 1 2A 3 0 0/ 12 0 0B au d Modem
A . C an b e e x p an d ed in to a te le comm un ic at io ns y st em a s a s t and -a lo ne pa ck age .
B . R ea l tim e c lo ck a nd c ale nd arC . H elp C om m an dsD . B u il t- in d ia g no s ti cs
E . A uto d ialerF . P ro g rammab le I nt el li ge n t D i al in gG . R S 2 32 in terfa ceH . In ter na l P ow er S up ply
O P T I O N S
On l in e phone d ir ec to r yE xp an d ab le b u ff er f rom 1 6K t o 6 4K
SPECIAL $ 4 75 .00
B A S IS 1 0 8
128K c om pu ter SPEC IAL $915.00A ls o availab le with C PM 3 .0 o r D OS d ual d rivesm on ito r, p erfect s eries s oftw are o r M ag ic alc ,
M ag ic win d ow a nd M ag ic wo rd . C all.
P R O M E T H E U S P R O D U C T S16K Card $ 60.00
64K Expand-A -Ram $ 225.00128 K Expand -A -Ram $ 275.00
G raph it ti C a rd(Spec ify Prin ter) $ 8 9.00
P .S . 1 6K B uffe r C ar dExpandab le to 64K $ 105.00
Applesu rance Card $ 99 .00
V er sa C ar d F ou r c ar ds in o ne1. Serial 2 . Paralle l 3 . Real T ime c lock and
calendar 4 . BSR Port $ 159.95
With Graph ics '" $ 199 .95
PRT-1 Prin ter C ard $ 7 9.00
P R I N T E R SNEC 8 023 $ 395.00w it h i n te r fa cecard and cables $ 4 49 .00
OK I8 2A
8 0 co l.l120cps $ 4 3 9.00OK I8 3A
13 6 co l.l120 cps $ 695.00Brother
Letter Q uality $ 8 8 9.00T r an s ta r 3 1 5
Colo r Prin ter $ 469.95
A C C E S S O R I E ST.G . Joys tick $ 42 .95Select a Port $ 39 .95
System Saver Fan $ 69.9525 .95 Super Fan 11 $4 9.9542 .95 S lim line D isk D rives $ 225.00
3 2 .95 D isk Drives Fu ll HI. $ 195 .003 2 .95 F loppy Disc Box 10 $ 25 .004 2 .95 F loppy D isc w/order $ 19.90 The JrUliI order specialists
4 2.95 .. 3 42 Q u artz C ircle, L iverm ore, C A 9 45 50
SGC
S 9 9.00
65.95
60.95
219.95
$255.95
255.95
39 .95
24 .95
20.95
20.95
D A T A M O S T
Property M gr. . $295 .00 $194 .95
Rea l Es tate
Inves tment Package .
Tax Beater .
Zaxxon .
Cas ino .
C on q ue ri ng Wo r ld s
M atin g Z on e .....
Pand oras Bo x '"
Se r ie s Baseba ll
179.95
129.95
39 .95
39 .95
29.95
29.95
29.95
29.95
I N F O R O M
Zo rk 1,2 ,3 $ 3 9.95 $ 2 7 .95
Planet Fall .. 4 9.95 3 2 .95
S tarcross . . . . 3 9.95 27 .95
P E A C H T R E E
Peachcalc .. $150.00
PeachPak (G 1/A r/Ap /) 395.00
M ailing L is t M gr. 250.00
S E N S IB L E S O F T W A R E
$ 92 .95
226.95
151.95
M ed ical d ic tionary $ 99.95 $ 72 .95
DOS Plu s 25.00 18 .95
Legal D ic tionary. . . • . . . . 99.95 72 .95
S IR T E C H S O F TW A R E
Le ga cy o f L ly lg amyn $ 39 .95
W izard ry 4 9.96
Galac tic A ttack . . . . . 2 9.95
S I R I U SBandits .. . .... $ 34 .95
Epoch 34 .95
F ly W ars " ...... 2 9.95Beer Run 29.95
Ou tpost 29 .95
Snake Byte. . . . . . . . 29 .95
Sneakers 29 .95
Joy Port. . . . . . . . . . . . . . 4 9 .95
S T R A T IG I C S IM U L A T IO N S
$ 29 .95
34 .95
21.95
$ 2 4.95
24 .95
20.9520.95
20.95
20.95
20.95
37 .95
Germany .... , $ 59.95 $ 42 .95
N orth A tlan tic 1986 59.95 42 .95
Rap id Dep loymen t
F or ce ....
R oad to Gettysbu rg .
C om pu ter Baseball .
Compu te r Qua r te rback
Bomb A lley .
N apo leons C am paigns .
34 .95
59.95
39.95
39 .95
59.95
59.95
118.95
89 .95
27 .95
27 .95
20.95
20.95
20.95
20.95
S P E C IA L A N D N E W ... $ 7 95 .00
8 0 co lum n Card • Magicalc • M ag icwindow •
M agics peller. 16K C ard S pec ial .... $ 44 9.00
3 - C A R D S Y S T E M
c ol/16 K c ar d/Z -8 0 c ar d S pe cia l .... $ 3 19 .9 5
M O D E M S
Smartm odem 300 . $ 219.95
Smartm odem 1200 . $ 499.00
D -Cat M odem $164 .00
O N I T O R S
14 " Compos ite Colo r H igh Res $260.00
ber 12" $129 .95
RGB colo r . $ 395.00
L1S IH i/Res green. . . . . . . . . . . . . . $ 14 1.95
8 0 C O L U M N C A R D S
Smarterm 11 . $149 .95
V idex V ideo Term $215.00
U ltra Term . $289 .00
V iew Mas ter . .. $139 .00
App le lie 64K , 8 0 co l. ... $ 99 .00
Z -8 0 C A R D S
M ic ro so ft S oftc ard .
Z -8 0 Plu s .
Z -Card 11 .
E D U C A T IO N A L S O F T W A R E
. $ 2 2 9. 95
..... $ 12 5.00
. .. $ 13 1.9 5
Spelling /Read ing Prim er $ 29.95
Percep tion .. . . . . . . . . . . $ 20.95
Counting Bee " . . . . . . . . $ 2 3 .95W ord Scrambler . $ 15 .95
Frac tions . $ 36.95
Intro . A lgeb ra .. ..... $ 21.95
B U S IN E S S S O F T W A R EWords tar . $244 .95
Spells tar $159 .95
W S tar/MM erge . $3 95 .00
W S tar/SS tar $4 22 .00
Supercal $ 129.95
PSF F ile $ 8 8 .75
PSF G raph . $ 8 8 .75
PSF Repo rt . $ 8 8 .75
PSF 3PAK , $246.7 5
A l l e q u ipm e nt s h ip p ed l ac to r y f re s h. M a n u la c tu r er s w a rr a nt ie si n c luded . Ca l if o rn i a cus t omer s add 6 ' 1 2 % t ax . I nc lu d e p a ym e n t b y
p er so na l c he ck . m o ne y o rd er . o r c as hi er 's c he ck w it h o rd er a ndSGC w il l p a y s h i p pi ng c h ar g e. C a ll f or am o u nt o f S h ip p in g c h ar g ewh en p a yi ng b y c r ed it c a rd .
A ll item s are norm ally in s to ck
'"4%5)490-3420... A nd w e'll b e h e re to h elp a fte r y o u
r ec ei ve y o ur o r de r. F e el fr ee t o c al l t h e SGCTechni cal S taf f f o r a ss is t ance .
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 89/100
IAICAO'" Apple Reviews
Product Name:
Equip. req'd:
Price:
Manufacturer:
Printmate 150G Printer
Serial, Parallel or IEEE interface
?
Micro Periphals, Inc.
4426 Century Drive
Salt Lake City, UT 84107
Description: A high quality dot-matrix printer with bi-
directional printing, true descenders and one-pass
underlining capability, the 150G prints 100 CPS, 132
characters per line and has a lK (expandable to 8K) buffer.
While printing normally with a 5 x 9 dot matrix, a serif
font is included for letter quality type in a 11 x 9 matrix.
Dot addressable graphics are supported, and an Ap-pak is
available for Apple owners with full software support forscreen dumps including different sizes, alignment and
printing two pictures at once. Special fonts may be down
loaded into RAM or stored in ROM. An optional external
keypad is available for setting printer options and is
backed up with a battery for remembering the settings.
Pluses: Avery fast, very high quality printer which makes
the imported models pale in comparison. If you want a
better quality printer at a comensurate price, this is the
printer I recommend. I have used it for all my printing for 4
months and have not had a single problem.
Minuses: None.
Documentation: An 80+ page technical manual and a
50 + pageAp-pak reference manual are included. They areterse, well written manuals. If you like chattiness, buy
an import.
Skill level required: No prior knowledge necessary.
Reviewer: Phil Daley
Product Name:
Equip. req'd:
Price:
Manufacturer:
Money Tool
Apple II+ or IIe, disk drive, printer
$59.95
Howard W. Sams &. Co., Inc.
4300 W. 62nd St.
Indianapolis, IN 46268
Description: This product is an excellent checkbook/
budgeting program. It is set up to automatically categorize
expenses and apply them against deposits. Additionally,
features are provided to accommodate payroll deduction
storage for end-of-year tax accounting ..
Pluses: The program is incredibly fast for what it has to do.
Categorized summations are available for any desired time
period. Hard copy is neatly structured and easily interpreted.
No. 68 - January 1984
Minuses: The program is overpriced. I've seen similar
home finance utilities for half as much. Functionally, the
only feature I found offensive was the inability to display
on the screen all the reports that could be printed.
Documentation: The documentation is entirely adequate.
The tutorial is written clearly and is easily followed. Do-
ing so, one can learn everything in about two sittings.
Skill level required: A new Apple owner would have no
problem using the program.
Reviewer: Chris Williams
Product Name:
Equip. req'd:
Apple Record Manager
Apple II or II+ with one disk drive
and 48K
$40.00
Connecticut Info Systems
218 Huntington Road
Bridgeport, CT 06608
Price:
Manufacturer:
Description: Creates and saves text files, which you can
then edit, append, rename, or delete. This Menu-driven
program allows you to set up sequential data files of
variable length. You name the files and fields and can
quickly view/edit data prior to printing or saving.
Pluses: One-keystroke commands make operation smooth
and simple. Aquantity ofutilities perform all needed func-
tions from the menu.
Minuses: Error-handling is only marginal and might trip
up beginners. The screen often becomes cluttered as
RecordManager is a stripped-down package and skimps on
niceties, such as screen formatting.
Documentation: No written instructions are provided, but
upon booting the disk, on-screen instructions are
displayed, and they are satisfactory for acquainting the
user with information needed to operate the program.
Skill level required: Some knowledge of text files is useful
but not mandatory. After some stumbling around, a begin-
ner will get the hang of things.
Reviewer: Mike Cherry
Product Name:
Equip. req'd:
Micro Dlustrator
Apple II w/ 48K and Applesoft
Recommended: Koala Touch Tablet
$129.95 with Tabletrice:
(continued)
MICRO 87
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 90/100
Hewlett PackardWri te or c a ll fo rp r i c es .------------:----------------------------------------~-=---
S P EC IA L S o n IN T R EG A T E D C IR C U IT S6502 7.456520 P IA 5.156522 V IA 6.452 71 6 E PROM2 53 2 E PROM6 11 6 2KX 8 CMOS RAM4116 R AM~ 2 . . ~_ _ ~ _
A n c h o rA u t o m a t io nS ig n a lm a nM o d e m sF R E E S O UR C E M E M B ER S H IP W I T H S IG N A LM A NA l l S ig n alma n Mod em s a re D i re ct Con ne c~ a n d p r ov i de t hebest price-performance values.
D ule r a nd D EM inquiries invited
V olk smodem wllh c empuler cable 199) 68
M ark V I fo r I BM P ers on alC om p uler (2 79 ) 13 9M ark V II A u to D ia l/A u to Answer (159) 99M ark X II S m art M odel 1200/3 00 (3 99) 299
D c - i i - A v i s S i i i i r t m o d e i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - i i - gp .~ ~ _ ~ y _ :~ _ ~ ~ ~ ~ ~ :~ _ ~ _ ? Q ~ ! ~ ~ q _ ~ ~ ~
10/6.9510/4.9010/6.10
4.455.906.45
5 0/ 6 .5 5 1 00 / 6 .1 55 0/ 4.4 5 1 00 /4 .1 55 0/ 5. 75 1 00 /5 .4 55/4.20 10/3.955/ 5.75 10/ 5.455/6.20 10/5.95
8 lo r 14
. - - - - - - - - § , Q _ Q
[,tcarnrnadare
S e e u s f o r P e r s o n a l B u s ln ,s s , a n d E d le a U o n a l
re q u ire m e n t s . E d u c a tl , n l l D i s c o un ts l v a lla b l t
DISKSPECIALS II
P E T S C A N I $ 2 4 5 b a s e p r ic eA llo ws yo u to c on ne ct u p to 3 0 C BM /P ET C om pu ter s toshare d d i sk d r iv e s a nd p r in ter s .Comp le te ly t r a n sp a r en t to theuser . Pe rfe ct lo r s choo ls o r mu lt ip l e wo rd p r oc es si n g c on -f igur at ions . Ba se con figur at ion suppor t s 2 computer s . Add~
~~~~-~-'!~~-~~-~Q~~~:._-------------------
17 0
CIII
95
2912 9
2064567 2
40223244
C O M P A C I ( J S T C P $ 1 1 5I n te ll i g ,n t T ,m i n a l P ic ka g e f o r P E T . C B M . C 6 4
~:!~~~-~~~~~~~~:.~?!~~~~~~~~-----------S CR E E N M A K ER 8 0 C o lu m n A d a p te r f o r C 64 1 4 5
~~~~_~~~~ ' ! _~~~~~ !Y_ !? !_~~~~~_~E~~~~~G E N ES IS C o m p u te r C o r pVICOIlmll tr ( lo r C64 IIw eill 50c omb in e w i th BSR modu le s f o r home o r b us in e ss c o nt ro l
C OMS EN SE R em ole S ln sll.A dlp ler lo rC 64 0r VIC 3 5
COM VOICE SV II~lSlzer lor C 64 or V IC 139inc ludes software lo r t ex t t o s p ee ch , p i tc h, e tc .
~~_'!_C!~~~~]!~_~~~!~~!!~!.'!_~~l~~V IC 20 P re duc ts lid S olln re I I a le ck
1lnEMI Seltw lre UMI Seltw are
ABACUSSeltw lre HES Selhn re
~~~~~-~-~~-----~----~~!!~~-~~~-----------?-~V ICTORYSo ltw lr e l or V IC I n d C64
Metamorphosis 16 C r e a t o r ' s Revenge 16Labyrin th of C reator 16 G alac tic C onquest 16Kongo Kong 16 Ann ihila tor 16Champer Man 16 Grave Robbers 13
~ _I!!Y__~~~~! !~ ~ ~ ~ ~ ~ ! . ~ ~ _ ~ _ ~ _ : O : _ ~ _ ~ ~PAPER CLIP W erd PreceSlor 99
OR AC LE0111 Bile 1I1ImBIHeries In clud ed 109
Su,er BusClrd 111111aHeries Inc luded 159C ommod ore 6 4 Programmers R eferen ce G uid e 16
MlcmC~oSl lor C 64-8 I.. e ls 0 1 ,IIV 19exce l le n t g ra ph ic s a nd co lor
SPINNAKER So fh n re C64. A p p le , I BM.A l l riCompute!'s First Book of PET/CBM 11
C64 or V IC SW ITCH 129POWER ROM Utili t ies t O l " PET/CBM 78
WordPili 3+ /64 wH~ Spellmuler 85W ordPro 4+ - 8032, d isk , p rin ter 295
SPELLMASTERsp e ll il l c ll ec k er I lr Wo rd P il iV ISICALCfor PET,ATARI,or A pp le 189
PET·THAXPET I e E ,son G llIp~lca Softw are 40
SM·KIT enhlced PET/CBM ROM UtIIHles 40Programmers T oolk it - PET ROM Utilities 35EASYCALCforC64 65PET Spacemaker 1 / ROM Sw itch 36
COPYWRITERW ord P ruceuor lor C 64 692 Meter PET to IEEE or I EEE to IEEE Cable 40Dust Cover for PET, CBM,4040, or 8050 8
CmC I n ll rf lc es ( ADA1800. ADA1450. SAD I I n s tu ck i
Prellllllllllll~e PE T/C BM (C OII,ulell- R .W esl 20Compute! ' s Machine Language lo r Beginners 11
MULTIPLA lllor C64 79
HES MODEM wH~ Softw lre 65
H ES S of tw lre lid Hlr dw lre I I s la ck!~)_I~~cll ~~!~~ _
S c ot ch ( 3M) 5 " s s/ d dS c ot ch ( 3M) 5 " d s /d d
Scotch ( 3M)8" ss /sd
S c ot ch ( 3M) 8 " s s/ dd
10/2.20 50/2.00 100/ 1.9510/ 3.05 50/ 2.80 100/ 2.75
10/ 2.30 50/ 2.10 100/ 2.0610/ 2.85 50/ 2.70 100/ 2.65
_ . _ . - - - - _ ..- - - - -- - - - - - - - - - - - - - -- - - - - - - - - - - - - ------------------
P ROMQUEEN l or V I C
A p p le Emui ll or l or Commodo re 6 4
S TATS l Jl ls li cs P lc kl g. l or C 64
Solid Olk 2 L nel Slln d lor C64 or V ICC64N1C Swi tch ( network ing)
BACKUPV 1 .O I J pe c op ie r l or C 64 o r V I CCARDBOARD/6Mothe rboa rd - V ICCARDBOARD/5Mothe rboa rd - C64CARDPRINTG P ri n te r I n t w i th G r ap h ic s
CARD PRINTB Pr in te r I n te r fa c e-C64N ICCARDBOARD!3sMothe rboa rd - V ICCARDCOC64NIC Ca lcu lato r KeypadCARDRAM/16RAM Exp an s io n - V IC
Comp l el e CARDCOUne i n s la c kC I E a n d V I E I EEE .I n te rf a ce s i n s t oc k
MSD SuperOrI.e lor C64 or IEEE 365
MAE Assembler for C64 50K alil T ouch TI~leI-C64 or VIC 79
C BC 4 /1 2 1 2-b 1t A 1 0 0 BOIrd + Soltw lre 199
Multlp lln lor C64 79Dust Cov er l or C6 4 o f V I C 6
A P p I E = - F R l t n n : n r T i t M - SFRANKL IN - compl el e l in l I n s la ck
QUENTINDr l l es lo r App le/F ll Ink l il
SWlppe r S ioppe ra ut oma ti c sw it ch b etw ee n p a d d le s a n d j oy st ic k
KRAFTAp ple JovstlckK ra ft App le Pa dd le Pa ir
KOII ITouc~ TI~lel·Apple /FllInklin
SPINNAKERSe ftw lr e I n s lo ck
B l1 Id e n un d So ftw lr e i n s la ck1 6K RAMCar d f or A p p le
Mulliplan-MIeI1lIllI1
S olid Olk 2 L nel S iud lor A pp leS er ia l C a rd f or A p p le
MCP RAM/80 c ol um l urd l or l ie ( AP/ TXT JZ 80 soncard a nd CP /M (Mic rosof t)RANAEl i te I w i th Con t ro l le rPara lle l Printe r Inte rface /Cable
Mlcrelek IU MCP I nl er ll CI I i n s to ckG r ap p le r + I n te rf ac eK r af t P ro d uc ts f o rA p p le i n s to ck
DC Hay es Mi cr omodem "
PFS: F i le
PFS: RlportV i d ex8 0 Co lumnCa r d
A p p lo B lu l Book
21 9
26
4030
90
59
18 5
2989
13 923 538 969
F le x F i le f o r P E T /C B M / C 6 4 $ S ODa tab a se, Re port Wr i te rw i th c a lcu la t ions , Ma i li ngus ts .
Fti-RTH~rPET/C&4wiG;_odel=c~giiVR~y---$5ti
MelJeempHorlor F o RTH lo r in dep en den t objec t cod e 30
K M i i . - P A S C A i i i f i D r PETJc"ii/C&4---------gS
E A R L far PET/CIM Disk -based ASSEMBLER 65
Su;erGrlpbtca=--iA"SICLi"'iieEllllatlna---iS
~~S ! .~hi~~~~ .: ~~~~_ r: _~~. :s _~_~/C~~ _RAM/ROM tor PET /CBM 4K $75 8K $90
W e s to c k V E R B A T IM D IS KSW r it , f o r D e l le r a n d O E M p ric es .
Sen tin al5" ss/d d 10/1.90 50/1.85 100/1.80Sen tin al 5 " d s/d d 10/2.55 50/ 2.50 100/2.45
W e s to c k D y s a n d is k sWab ash 5 " s s / s d 10/ 1.60 50/ 1.55 100/ 1.45W abash 5" SS/dd 10/ 1.90 50/ 1.85 100/ 1.75Wa b as h 8 " s s / s d 1 0/2 .0 0 5 0/ 1 .9 5 1 00 /1 .8 5
W e s to c k M A X E l l D IS K SW r i te f o r d e a le r a n d D E M p ri c e s .
D isk S tora ge Pages 10 for $ 5 Hub R in gs 5 0 for $6Oisk Ubrary C ases 8"-3.00 5"-2.25
Head C lean in g K its 12AMARAY Disk S tor age Sy stems in s toc k .
~~~~ ' :_ :' :_~~_~~~_~_ l :! !' .~N~£ ~~~~ _~~_~ ! ~~ _
C A S SE T IE T AP ES -A G FA P E - 6 1 1 P R E M IU MC-10 10/ .61 50/ .58 100/ .50
C-30 10/ .85 50/ .82 1001.70
D A T A SH IE LD B A CK UP P OW E R S OU R C E $ 2 6 5Ba ttery b a c k up Un in te r rup tib lePowe rSupp lyw i th surg e a nd
~~~~~~~!_~~~~_~~_y_~!_~~~_p_r:_~~!:.~~_
MIIIIPlI"""":'IBMor App le 185Quadboa rd lo r IBMava i la b leKOALATouchTab let s -App le , A ta ri , IBM,CBM
PelC~eII 5000 Softw are P lcule 209
P FS S oltw lre lo r IBM u d A pp le I n s la ckVOTRAXPersonal Speech System 280
BMC 9191 Color MOlitor 229BMC 12A 12" Green Mon itor 79
Brelller HR-75 D llsy Whe.' P rln ler 769
Dyeu (Brel"~ DX-15 Dlisy W beel Prln ler 469Itoh Prow riter Para llel Prin ter 379
P ills oe ic 1 09 0 P rlllle r .lIb C om sp on den ce M od e 2 79Daisyw riter 2000 w ith 48K b uffer 1020
Sellll110X 299
EPSON.Ok l~I ILS ta r Mlc re n lc s p r ln l er s I n s loc kUSI CompuMOD 4 R F Modulator 29
We S io c k AMDEKMOA l tu rsAmdek DXY-100 Plotter 590A P Products 15% OFFCOMPUTERCOVERUPSIN STOCK
BROOKS6 Oillel Surao Sup preuor/N olse FHler 54Surge Supp ressor-6 outlet 29E lectrohome 1 302-2 13" Hi-res R GB M on itor 335Panason ic 12" Mon itor (20 MHz)w ith aud io 135
SYlertek SYM-I Mlcreca llpullr 189
A L L B O O K I n d S O FT W A R E P R IC E S D IS C O U N T E D
I IS I V i de oMo nilo r1 -G nen o r AM IE R 2 0 MHz b l - r e s .
---------~~-~!-!~-~~~-!!~)~~~--~!~~~-------
7'JII"* I datasystems
12 9
29 9
95
9520 9
19 to
ZVM-122A 109 ZVM-123G 95ZVM-131 300 ZVM-135 510HERO 1 R obot (factory assembled ) 2145Z 29 T erminal (DEC and ADM compatible) 680z r-10 In tel. Terminal w ith S erial P ort 340Z 100 16-bit/8-bit Systems CALLWe s to ck e n ti re Z e n it h l i n e.
A T A R I - W E S T O C K E N T IR E L IN ES PIN N AK ER an d Bro derb un d S oftware in S to ck
215-822-7727 W R IT E FOR CA TA LOG . Add $150 pe r o r d er f or U n it ed P ar ce l
252 B e t h l e h e m Pik A B C o m p u t e r s We pay b ala nc e o f U PS s u rf ac e s h ip pin g c ha rg es o n a ll p re pa id o rd er sColm r PA 18915 e (add extra for m all A PO fFPO air) Prices Inclu de cas h d is co unt
a , Reg u la r p ric es s lig ht ly h ig he r P ric es s ub je ct to c ha ng e
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 91/100
=AppleManufacturer: Koala Technologies
253 Martens Ave.
Mt. View, CA 94040
Author: Steven Dompier
Description: Agraphics illustrating program with various
brush sets, colors, and drawing modes. Points, lines, rec-
tangles and circles can be plotted on the high resolution
screen with different colors. Filling and erasing is ac-
complished easily. Creations can be saved to and loadedfrom disk. The program is a combination of BASIC and
machine-language on an unprotected disk.
Pluses: The program is menu driven and much easier to
use than most graphics programs. It includes many
sophisticated features such as magnification and fill. It is
very easy to create complicated and professional look-
ing drawings.
Minuses: The Koala Tablet is recommended for its
smoothness and preciseness. It is difficult to draw a
smooth line with a joystick.
Documentation: A very complete, clear and well written
booklet is included with the program.
Skill level required: No prior skill needed. Good for ages 5
and up.
Reviewer: Phil Daley
Product Name:
Equip. req'd:
Price:
Manufacturer:
Bugbyter
Apple II
$47.50
Computer-Advanced Ideas
1442AWalnut Street, Suite 341
Berkeley, CA94709
Tom Cohn, and Pete Rowuthor:
Description: Bugbytet is an interactive MIL debugging
tool which is relocatable to any unused location com-patable with your program including into a language card.
It has a screen-oriented display which has complete infor-
mation on the status of all the 6502's registers and stack. It
includes capabilities to turn off the display to avoid con-
flict with the program. and to set an area ofmemory (such
as DOS or the monitor) to beexecuted at real-time known
code. You can set breakpoints-hard or soft-and triggers to
count the break points. It assembles and disassembles
code similar to and uses instructions like the monitor. The
accompanying 40 page documentation is excellent.
Pluses: It is very easy to use and clearly shows everything
you need for debugging. No MIL programmer who writes
large programs should be without it.
Minuses: None.
Skill level required: Beginning to intermediate MIL
programmer.
Reviewer: Phil DaleyA \IC RO ..
SOfTWARE ENHANCEMENTSYSTEM. APB-I02. . . . . . . . . . . . .. 5189.00W/GPLE . APU-I , FMP . DISK .MANUAl. QUICK REFERENCE GUIDE
APU·2. 11I1I.IlY ROM"2 535.00WIRENUMBER, MERGE. HOLD, E rC .
ROM DEVElOPMENI nG. . ... 599.00W/DISK. INSRUCTIONS &EMUIJITlON ROM
AID. 12 BIT. 16 CHANNEL . 5299.00W/5 VOLTAGE RANGES.
25 11 SEC CONVERSIONPRO-I. XTRA·IARGE PROTOlYPEBOARD . . . . . . . .. . . . . . . . . . . . . . .. 529.95UP TO 52 ICs, NUMBERED &LErIERED PINS. HANDY POWERAND GROUND CONNECTIONS,NUMBERED 110 CONNECTIONS
48 UNE PARALLEl 1/0
BOARD . CPU·I . . . . . . . . . . . .... 5249.0025 BUFFERED UNES INWIFlLTERlNG. 23BUFFERED UNES OUT,INTERRUPT INPUT
#1 SE llER AT A P.P.LE .*
APB -I0 2 U ltr a-R om Board /Edi tor Includes:• Advanced G.P.LE.* (Global Program line Editor) in Fnmware-Wtth Insert, Delete, Rnd, Tab, Zap, Pack, Restore, End, Etc.
• F irm w are Management Program (FMP) Overlays 32K of ROM in 2K Space
-Allows jumps and calls between banks-searches for utilities by name
-Recognizes new ROMs and utilities automatically
• A PU -l with over 25 Language Extensions & Ampersand Utilities-IVIhenIBse, Print Using, Ultra Fast Search, Damaged Program Recovery
• Always in the Machine-No Searching for a Disk
• Never in the way-No Program RAM used-Connect with 4 Keystrokes / Disconnect with 2!
"If you program & hauen't used a l ine editor, get on e right away" -M IC RO M AG AZ IN E
"The most powerful program deuelopment tool I haLe" -R OBE RT W lL SO N, PR OG RA MM ER
"Excellent Product, flawless" -P HIl1P D AlE Y. PR OG RA MM ER
"Great product, exceeds my expectations" -DR S 1E V E C O O K
"An elegant solution . .. well thought out. .. worth it" -S OF TA LK R EV IE W, S EPT . 198 3
"The best thing for the Apple s ince the disk" - ED W A RD D E CK E R. P HA R M AC IS T IP RO G R AM M E R
Ho llyw ood Ha rdwa re (213) 989-1204
6842 VALJEAN AVENUE, VAN NUYS, CA 91406
• G.PLE' 1983 NEIL KONZEN. SOLD UNDER UCENSE FROM SYNERGISTIC SOFlWARE / APPLE IS A REGISTERED TRADEMARK OF APPLE COMPUTER INC.
A.P.P.LE. IS APPLE PUGETSOUND PROGRAM UBRARY EXCHANGE. THE WORlD'S lJIRGEST APPLE USERS' GROUP WITH 25,000 MEMBERS.
USE OUR 60 DAY UNCONDmONAl MONEY BACK TRIALIF Y OU CAN PART W IT H IT -W E 'll BUY IT BA CIC
A S K A BO lIT ' D E AI.E R lU S ER G R O U P D I SC O U N TS !
No. 68 - January 1984 M I CRO 89
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 92/100
SJB D ISTRIBUTORS .
ONE STOP SHOPPING FOR
COMMODORE SYSTEM S.mcornrnodore LANGUAGES 84 :: INTERFACES & ACCESSORIES
In sta sp eed B as ic C om p ile r (D ) ...... $ 99 Dota 20 8 0-Co l. Exp.............. $ 15 9NEW COMMODORE PRODUCTS Nevada Cobo l (D ) . .. .. .. .. .. .. .. . 55 Mr . Compu te r 80 -CoI . Exp. .. .. .. .. . 60Executive 64 .................... $ Call P i lo t (D) . . .. . .. . .. . .. . .. . .. . .. . 4 5 5-S lo t Exp . (64 ) ................. 65CBM B 128 -8 0 . .................. 8 25 logo (D ) . ...................... 4 5 V ic SW itc h (c on ne d 8 6 4's o r V ic 'sB S eries S oftware ................. Call Assem bler Developm ent (D ) ........ 25 to DO/Pr in ter ) . . .. . .. . .. . .. . .. . . 14 5
WORD PROCESSING 84 :: 64 Forth (R ) .......... " ........ 4 0 C ob le s 3 M , 6 M, 1 2M lo r a bo ve . ..... Col iN EW - M irage 8 0 col. . ............ $ 95 PRINTERS· DOT MATRIX Verex (Box 0 1 10) 51 ;4 D i s kenes . . .. . 26W o rd Pr o 3 + /S pellrigh t ............ 79 Epson R X80 (8 0 cps) ............. $ 299 Connect ion (Pe t / 64 g r aph ic s ,2K Bu ll er ) 99W ordPro 3 ' (WP) . ............... 59 MX 80 w /FT (8 0 cps) ............. 3 99 Cordco Print t G raph ics . . . . . . . . . . . 8 5Spel lr igh t (D ic t ionary) . . .. . .. . .. . .. 3 9 FX 80 (160 cps) ................. 54 9 Cordco Cordprin t . ................ 7 0Paper C lip ...................... 95 F)(l 0 0 (1 60 c ps ) 14 " w id th ........ 8 59 M W 302 Parallel. ................ 65
Easy Scrip t (D ) .................. 35 Ok idata 82A . . .. . .. . .. . .. . .. . .. . 4 29 PE T/IE EEC ob le (1m ) .............. 3 3Easy Spel l (D) . . .. . .. . .. . .. . .. . .. 19 Okidata 92 ..................... 54 9 IEEE /IEEECob le (1 m ) ............. 4 9SPEC IAL- Bus iwriter (C ,D ) ......... 3 9 NEC 8023A ..................... 4 29 In te rpOd ( In tel li gen t IEEE ,Cu ick Brown Fox (R ) ............. 49 S tp r Delta (160 cps)-N EWL ........ 54 9 RS232 , serial) . ................. 149
SPREADSHEETS 84 :: S ta r G em in i lO X (1 20 c ps ) ........ 3 09 ADA 1800 (IEEE /Parallel) . ......... 129C alc R esu lt - A dvanced (R ,D ) ....... $ 120 S tar G em in i 10/15 ............... Col i ADA 1450 (IEEE /RS232 (M /F» ..... 129Bus icalc II - M ore Power! (R ,D ) ..... 95 Trans tar 3 15 (H i Res ., Co lo r) ....... 57 5Mu l ti pl an 64 (D ) . .. .. .. .. .. .. .. .. 7 9 M i c ro EdgePr in terPape r ( 540 Shee ts ) .. 10 VISA/MASTERCARDCalc Resu lt - Easy (R ) ............. 70 ESSENTIALS MONEY ORDERSPractico lc 64 (D ) ................ 45 C ommodore 64 .................. $ Call BANK CHECKBus icalc I - SPEC IA l! ( C ,D ) . ........ 39 1541 D isk D rive . ................ 24 9 C .O .D . 's A c cep te d. ( Ad d $ 5 )
DATA BASES 84 :: 1525 Prin ter (8 0 co llOM ) ......... 225In s to ck ite ms s hip pe d w ith in 4 8 h ou rs .
M irage Data Base ( D ) . ............ $ 95 1530 Datasene .................. 65M 'F ile (m erges with W ordPro) (D ) ... 8 9 1520 Planer/Prin ter (4 Co lo r) ...... 16 9 F .O .B .Da ll as , Texas ( Texas Res ., Add 5% Tax ).
M icro S pec Data M anager (D ) ...... 60 1526 Prin ter. .................... Col i Produc tssh ipped wi th manu lac tu rer 's war ran ty .
C odew riter (develo ps p ro gram s)(D ) ... 9 5 1702 M onitor ................... 24 9 P ric es s u bj ec t t o c h an g e w it ho u t n o tic e.
PRODUCTS OF THE MONTH CBM $ 50 M in im u m O rd er.
TCS 64 /8 0 - N EW ! (D ) . ........... $ 13 9 8 03 2 (8 0 co lum n Pet) ............ $ 625'Defect ive un it s must have retum(WP/Data Base/Spread) SuperPet (5 languages !) ........... 104 9
Koa la Pad - NEW! . .. .. .. .. .. .. .. . 8 9 8 050 Dual D rive (1 mg.) .......... 99 5 a u th o riz at io n n umber a n d in c lu d e
Delta 10 (160 cps) - N EW ! ........ 54 9 8 250 Dual D rive (2 m g.) .......... 1295 copy 0 1 invoice.
UTILITIES 84 :: 9060 Hard D isk (5 mg.) .......... 1995V ic T ree ( 4 .0 Bas ic) (R ) ........... $ 75 2031, 170K S ing le D rive .......... 295
~
64 Super E xpander (R ) . ........... 25 64K Upgrade lo r 8 03 2 ............ 259S imon 's Bas ic (R ) . .. .. .. .. .. .. .. . 25 S u pe rP et u pg ra de lo r 8 0 32 . .. .. .. . 59 9Cardco P r in ter U t i l i ty (C ) ........... 15 4 02 3 Prin ter (8 0 cp s, 8 0 co l) ...... 3 95MS-Backup (Bock Up Data!) (D ) .... 15 8 0 23 P rin te r (1 50 c ps , g ra ph ic s) . .. . 54 5
ACCOUNTING 84 :: 6400 Prin ter (4 0 cps , lC ) ......... 14 50H om e A ccou ntan t (C ontinen tal) ..... $ 7 5 LEnER QUALITY PRINTERSTax Advantage (merge w/home D iab lo 620, 25 cps ... . . . . .. . . . . . . $ 949a cc o un ta nt ) - NEW ! . .. .. .. .. .. .. 4 5 T ran star 13 0, 16 cps - 13 2 co t. . . .. . 769
SJB DISTRIBUTORS INC.eneral ledger, A IR , A /P, P/R , Inv. Trans tar 120, 14 cps - 8 0 co l. . ..... 50 0(In fo D eS ign 's O rig in al) (D ) ....... ea.7 9 MONITORS 1 05 20 P la no R oa d, S u ite 2 06
Nume ric Ke yp ad ( Ha rdWa re ) . .. .. .. 65 Panason ic C T 160 (co lo r) .......... $ 27 9 Dallas , Texas 7523 8Nume ric Ke yp ad ( Ca rd c o) . .. .. .. .. 3 5 Pana so n ic TR120 (w/ sp k r, gr ee n ) . .. . 15 5
TELECOMPUTING 84 :: Sany o/ Amdek-G reen , No Aud io , 1 2 " . .. 12 5TO ORDERic 1650 (A uto A ns /D ial) M Odem ... $ 95 BM C/S anyo-G reen, N o A ud io , 9" .... 95
V ic 1600 Modem . .. .. .. .. .. .. .. . 59 C o b le (F o r Ab o ve ) AN . .. .. .. .. .. . 15 CALL TOLL FREEH es M od em (D ow nlo ad in g S oftw are ) 65 VIC ACCESSORIES 800-527-4893Super Te rm (Downlo a d/ 8 0- 12 8 Fo rm ) . 95 8K RAM Expand. Cort.............. $ 4 0M ic ro T erm 6 4 (D ow nlo ad P /D ) ..... 3 9 16K RAM Expand. Cort............. 7 0 800-422-1048
EDUCATION 84:: 24K RAM Expand . Co r t. .. .. .. .. .. .. 10 5 (W ith in Texas )
Spelling I (Koala) (D ) ............. $ 29 2 7K R AM (E xpands V ic to lu ll 3 2K ) . ... 119Geomet ric (Ko a la ) (D ) . .. .. .. .. .. . 20 3 Slo t Expander . . .. . .. . .. . .. . .. . .. 3 0I .C . Baseball (D) . . .. . .. . .. . .. . .. . 25 6 S lo t E xpander .................. 7 0 CATALOG
Bib le Baseball (D) . . .. . .. . .. . .. . .. 25 Joys t ick (Wico-Red) . . .. . .. . .. . .. . 25 S en d P os tc ar d w it h N ame & Ad dr es s t o
Happ y Tu to r ( Ty pin g ) ( D) . .. .. .. .. . 15 Joys t ic k B las te r ( ADR Rap id - F ir e ) . . . . 10 speed p r oces si ng .
NOTE: SJB HAS A FULL LINE OF COMPUTER MEDIA IN STOCK, CALL OR WRITE FOR MORE INFORMATION.
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 93/100
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 94/100
Introducing ournew home computer game •Cavern Creatures" Where one false move, onemistaken twitch of the Joystick can do terriblethings to an Apple. Like shut parts down.Who knows which ones? Making it act ....
awful funny and then ... KA-BOOM! ...
Gee whiz. Look what you've done.Your big shiny Apple, destroyed.
And you thought you were just havinga little fun?
BlowupThe game's finished. And maybe, so is
your Apple. Oh, but don't worry.Cavern Creatures is just a game. Full of action.
Fun. Suspense. Just like our other games.Whether they're blowing up your Apple.Or totally blowing your mind.
How M uch M ore Ca n O ne Joy st ick Jockey T ake?We've exceeded our past reputation for
bringing you some of the most super snazzy,ultra -intense, graphically involving games around.We've gone totally out of our minds with every
game from shoot 'em up, blast 'em out of the skystrategies to mind game graphics guaranteed toprovoke a mental meltdown.Are you ready?
Cav e rn C r ea t u re s"You can squirm. Beg. Plead.
And moan. Nothing will saveyou, or your Apple, from beingblown sky-high by this game.Don't worry. The effect's not per-manent. YourApple will recover.But will you?
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 95/100
S p a ce A rk™Skin -hunters, poachers and
mechanicals-enemy robots whoaren't exactly the warm andfriendly types-await you. Oblite-rate the bad guys. Save the goodguys. Youmight survive this.
Ard y T he Aa rdva rk™Here's a tongue that's as long
~~ •• and skilled as you are. Think youcan lick stinging ants and taran-tulas? Use Ardy's tongue as you
make it through this maze!
Roundabout™Sharpens your target skills
with 24, count 'em, 24 differentseries of targets. How's yourhand to eye coordination, pal?
ArgosTM
And if you like to push peoplearound, layoff your little brotherand take on these aliens instead.Save the Domed City fromdoomsville.
S up er B un ny "No, S up er B un ny is not
referring to all those Playboysstashed under the bed. It's astrategy /action game that justmight turn your brains into car-rot puree. Cover your burrow!
Con que ri ng U0 rld sT II
So you fancy yourself a die-hard strategist? Try conqueringthis. Maybe you'll rule the uni-verse if mom will let you off
restriction.
Bilestoad™Avoid violence, but be prepared.
Incredible graphics make thisrated R! But if you're a wimp, passthis game up. It's not for babies.
~
. . .
o ~ · ~ ~ ~ ~ g l ~ ; ~ ~ l :m ! 'r J m ' i u ,
mOATAMOSTThe most out of our minds:
M
TY! isa registered trademark of Daramosr. Inc. 8943 Fullbright Ave.. Chatsworth. CA91311(213)709-1202•Apple isa trademark of Apple Computers. © Datamost 1983
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 96/100
ple processors for the purpose ofreliabil-
ity (redundant design). Instead, Iwill give
some points to consider and hints on
how to proceed with designing a system
of multiple processors which share the
system resources but each "does its own
thing". One example is a commercially
available dedicated word processor. In
this particular system, a 6800handles all
the word processing while a 6502 runsthe keyboard, screen display and the disk
drives. This particular machine can
receive serial data at 1200baud, storing
the incoming data on the disk and
displaying it at the same time. Themajor
system requirement formulti-processing
is to partition all the jobs, defining very
carefully the responsibility of each pro-
cessor. In fact, it is like designing two
separate systems and then designing an
interface between the systems! Once all
the system jobs have been passed out,
you need to define the interface and
decide how the information interchange
will be handled.
Some microprocessors have been
designed specifically for multi-
processing, such as the 6801 and 6809.
Figure 1 shows just the interconnection
of two 6801 uPs. The eight lines of Port
P3 and the two SC lines combine to
make a parallel link which transfers one
byte at a time between the two devices.
The SC lines form a handshake setup
which informs the "slave" processor that
data is ready. Note that "slave" and
"master" status is defined by which is
programmed to send and which is pro-
grammed to receive. The 6809 has a
special pin called DMA/BREQ which
allows other processors or special pur-
pose hardware to request control of the
data and address bus lines for fast data
transfer or other purposes. The Radio
Shack Color Computer uses the 6809E,
which does not allow normal DMA or
other types of bus access, since this
would disturb the special relationship
between the uP and the SAM [Syn-
chronous AddressMultiplier).
Another way to interface betweenprocessors is to define special areas of
memory which can contain anything
from a single bit or byte towhole pages
of data. One processor must leave the
data for the other, and set a flag which
indicates the data is ready. The second
processor will then pick up the data and
cancel the flag. Inpractice, the memory
bus must be segmented so that each
processor has enough "private"
memory for its own tasks, and the data
buffer must be in address space which
each processor can use. At the same
94
PD~ l ] - 6 I! D LINE S
DS i r - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~HAN[O~:HAkE LI IjE~'I S31----------------------------------------1, D:,:;
Figure 1: Some microprocessors, such as the Motorola
6802 shown here, have bul lt·in provisions for communica·
tion between processors.
fLAt; 1
UP1
UP 1UP 2 UP:;:
Figure 2: Two processors sharing some common memory
area can use Interlocked latches to prevent bus conflict
(see text).
'~.5 '.'DL:,1001
1000
0111
A/[I 0110
0101~DUN1S
0100
0011
0010
0001
0000I) VDL1S
Figure 3: A Digital·to-Analog converter cannot make accurate
measurements without adequate resolution (see text).
MICRO No. 68 . January 1984
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 97/100
time, there needs to be either interlock
circuitry which prevents both pro-
cessors from trying to access the area
simultaneously, or the programming
for both processors must enforce a
similar protocol. This type of design
almost always involves a dedicated pair
of latches, and each latch will have a
unique address controlled by one pro-
cessor. This is illustrated in Figure 2;
when uP#1 is using the data buffer, it
sets latch Ll to the "off" state (Q = 0)
by pulsing the CLEAR input. Ll's Qoutput holds L2 in PRESET(Q high) as
long as uP#1 is accessing the buffer. At
the same time, Ll's IQ output is high,
serving as a BUSYflag for uP#2. When
uP#1 releases the buffer, it pulses the
clock line of Ll, which sets Ll to the
"on" state, clears the busy flag and
releases L2. Similar action by uP#2
controls L2 and warns uP#1 that the
buffer is busy. Itmay also be important
that the two processors have syn-
chronized clock inputs.
If two separate computers involved
in a project must work together, one
computer can be designated as the
master, and it will send commands to
the other computer over their link,
which can be a high speed RS-232 line.
The master must be programmed to
pass the required commands to the
slave computer, besides keeping its
own business straight. It is likely that
the slave will be assigned some kind of
monitoring tasks, and the incoming
commands will trigger interrupts on
the slave. Then, depending upon the
type of command, the slave may make
a different measurement or report the
previously collected data. Whatever the
assigned tasks, part of the program-
ming for both computers will involve
specially coded commands to define
precisely the nature of the task to
be performed.
That's enough on computer com-
munications for now! I have promised
to introduce some of the real-world
hardware such as analog to digital
(AID) and digital to analog (DIA) con-
verters. Very few processes and
parameters we might be interested in
are digital. We normally want to know
how heavy, how strong, how loud, etc.
something is. Natural processes come
in all sizes, shapes and colors, and a
precise measurement will usually in-
volve values which do not change in
discrete digital steps.
Natural processes vary widely be-
AIM + PDWERfrom CDMPUTECH
Ail prices
Postpaid
(Continental
U.S. -
otherwise
$2 credit)
Check the
outstanding
documentation
supplied with
AIM65
Top quality power supply designed to Rockwell's specs for f.ullypopulated AIM 65 - includes overvoltage protection, transientsuppression, metal case and power cable:
PSSBC-A(5V2A Reg; 24V .5A Avg, 2.5A Peak, Unreg) ...$64.95
Same but an extra AMP at 5 volts to drive your extra boards:PSSBC-3 (5V3A Reg; 24V .5A Avg, 2.5A Peak, unreg) ...$74.95
The professional's choice in microcomputers:
AIM65/1 K RAM $429.95 BASIC (2 ROMS) $59.95AIM65/4K RAM $464.95 ASSEMBLER (1ROM) .. $32.95
FORTH (2 ROMS) $59.95.
SAVE EVEN MORE ON COMBINATIONS
AIM65/1K + PSSBC-A .$479.95 AIM65/4K + PSSBC-3 .$524.95We gladly quote on all AIM65/40 and AM65 items as wel l.
ORDERS: (714) 369·1084
P.O. Box 20054 • Riverside, CA 92516California residents add 6% sales tax •
No. 68 - January 1984 MICRO
tween two limits in such a way that a
digital quantity will not be exactly cor-
rect as shown in Figure4. This diagram
assumes an AID converter with a full
scale input of 16 volts and having a
resolution of four bits (2--4, or one
part in 16). In other words, each step of
the converter represents a one volt
change. If we assume the voltage to bemeasured is 9,5 volts, we find that step
1001 (binary) is too low and step 1010
is too high. Note that even if the 4 bit
converter is 100% accurate, the best
answer it can give for this measure-
ment is incorrect by .519 or 5.5%. Ifwe
can increase the converter's resolution
to 8 bits (2.. 8, or 1 part in 256), 9.5
volts happens to be exactly 152 steps
out of the 256 possible; the new con-
verter has steps of 62.5 millivolts. At
present, about the best resolution
economically possible with an AID
converter is 16bits (onepart in 65536),
or 244 microvolts if the full scale range
were 16 volts as in our examples. Ac-
tually, typical AID converter ranges
are 0 - 5 volts, 0 - 10volts, or -5 to + 5volts. If we don't have another reader
question next month, we will get into
types of AID converters and do some
experiments.
You may contact Mr. Tenny atP.O. Box
545, Richardson, TX 75080.
95
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 98/100
LO O K TO
MACMILLANFOR COMPUTER SCIENC E
THIS IS VIC·20 BASICROBERTFSUTHERLANDand RICHARD M. GILMAN
Emphasizing good programming practices, the au-thors show how to take advantage of the VIC-20'sspecial capabilities such as creation of shapes andpictures in color, and production of music andsound effects.1984 Paperback 420 pp.(approx.) ISBN: 0-02-418380-6 $16.95
AN INTRODUCTION TOSTRUCTURED BASIC
FOR THE CROMEMCO C·10WAYNE T . WATSON
The only book available in its area, this book as-sumes no prior programming experience andstresses interaction with the microcomputer. Thefirst ten chapters provide a foundation to the mostcommonly used concepts in BASIC, and the lastfour chapters offer more advanced material on filesand programming structures.1984 Paperback 276 pp.(approx.) ISBN: 0-02-424580-1 $16.95
BASIC·80 AND CP/MJACK JAYPURDUM
The key features of BASIC-80© are related to themost popular microprocessor operating system,CP/M.'· Coverage includes sequential, random,and skip-sequential file structures and many use-ful subroutines for applied programs (binarysearches; Shell and Bubble sort; range checks;direct cursor control for many popular CRT's; anderror messages under direct cursor control).1984 Paperback 220 pp. ISBN: 0-02-397020-0 $16.95
IBM·PC:8088 MACRO ASSEMBLER
PROGRAMMINGDAN ROLLINS, Independent Consultant
Intended specifically for the increasingly popularIBM-PC, this book incorporates up-to-date sec-tions on IBM-PC color graphics and includes many
sample programs.March, 1984Paperback 300 pp. ISBN: 0-02-403210-7$13.95-lenlalive
Pricessubject to changewithoutnotice.
AVAILABLE AT YOUR LOCALBOOKSTORE
FOR MORE INFORMATION CALL TOLL-FREE1-800-223-3215. OR WRITE:
College Division· 866 Third Avenue· New York, NY 10022
96 MICRO
Advertiser Index
A B Computers 88
Amplify.... .. 36
Atari Program Exchange 6
Compu'Tech 94
Computer Mail Order 76,77
Datamost, Inc 92,93Eastern House Software .. 13
Hollywood Hardware 89
Incomm .
Interesting Software
Kiwi Software
Leading Edge .
MacMillan Publishing Co
42
38
73
Back Cover
96
75, 80
9
45
22
Micro.
Micro Spec ..
Micro Ware ,.,'
Midwest Micro Inc ,,'
Percom Data ,., .. ".".,"
Performance Micro Products 59
Perry Peripherals " .. ,,',", ' , , , , , , , , , " 72
Protecto Enterprizes 30, 31, 32RH Electronics, Inc """""" 91
Richvale Telecommunications Inside Front
S GC 86
S J B Distributors " 90
Safeware 56
Scientific Software , , , , , , , , , . 73
Skyles Electric Works 19
Spectrum Projects """" 70
Star Micronics Inside Back Cover
Strom Systems Inc 2
Titan Technogies, Inc 20
Tot! Software .. ' 58
Victory Software 21
Winders &Geist, Inc '" 1
National AdvertisingRepresentatives
Horne Office:Cindy Kocher, Advertising ManagerP.O. Box 6502Chelmsford, MA 01824 (617)256-3649
Mid-West Territory:Thomas Knorr & AssociatesThomas H. Knorr, Jr.
333 N. Michigan Avenue, Suite 401Chicago, Ill inois 60601 (312) 726-2633
serving: Ohio, Oklahoma, Arkansas, Texas, North Dakota, SouthDakota, Nebraska, Kansas, Missouri, Indiana, illinois, Jowa,
Michigan, Wisconsin, and Minnesota,
West Coast:The R.W. Walker Co., Inc.Gordon Carnie2716 Ocean Park Boulevard, Suite 1010,Santa Monica, California 90405 (213) 450-9001
serving: Washington, Oregon, Idaho, Montana, Wyoming, Colorado,New Mexico, Arizona, Utah, Nevada, California, Alaska, and Hawaii
(also British Columbia and Alberta, Canada)
No. 68 - January 1984
3
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 99/100
T h e e c o n o m i c a l d u a l - s p e e d
W ith a fas t an d fu rio us w ork p ace, a h ig hlyflexib le p rin ter is cru cial. T hat p rin ter is th e n ew
R ad ix -15. W atch it tak e yo ur w ork an d ru n w ith it.
It's dual speed! A t 200 cps R adix firesou t a s uperb ly refined dot m atrix prin tou t. A t 50c ps it p rin ts p ro fes sio nal n ear- letter q u ality. S o n ow
you can go from spreads heets to m em os at the nipof a s witch or at you r com pu ter's comm and.
It's m ulti-fu nctio nal! In eith er m od e R ad ix-15 q u ic kly ad ap ts to yo ur n eed s. T here's s erial an dp arallel in terfac e. Memo ry s to rag e w ith a 16K
b uffer. R es po ns ive th ro ug hp ut to h elp yo u u se
'.' ""' . . . . . . . . . ............... .~
'. , - - . ~ , £ _. . _ - ' ., . . . . . .", . . . . ...._.._._ .... , -
,~' .. --....._--. _ . " . . . . .
. . . . . ." ". . . • . . ,.~•.~::
. , . , - - . - . . . - - ..... -.
8/3/2019 Micro 6502 Journal January 1984
http://slidepdf.com/reader/full/micro-6502-journal-january-1984 100/100