( (
''J
i
1
i (
the user group neujsletter for uclobor 'I ^^^-i^y-i'.; ■ ■ . -'.'i''l"''-i'l!ir^;->:..
I : . :
: ■ ; : ^ i'
:t " " if
■iM.
I : I .- i
i ; .' : I ; , * ' I ■ f ! ' 1 :
I i I .- ; i ) I >. I ^ : ; ( ; .
.-I:
:! ! i .
*" R KS. 1^
Printed in U.S.A. M27-1079
C@flSCl€E6/ the user group neujsletter for October 1979
APPLE cor^apyriEH
GHAPHICS TABLET
The Graphics Tablet allows the
user to convert graphic data into
digital information that may be
processed by the Apple computer
system. Shapes traced or drawn
freehand on the tablet surface are
instantly displayed on the system
monitor. Once created, an image
may be stored on the system disk
for later retrieval and modification.
Block diagrams, architectural
renderings, logic diagrams,
schematics, mechanical shapes and
fine art are a few of the applications
of the Graphics Tablet.
The Tablet system consists of
15-1/2 inch by 15-1/2 inch tablet
(11 inch by 11 inch active surface
area), a mylar overlay stylus,
diskette software interface and
documentation. Unlike other tablet
systems, the electronics and power
supply for the Apple Graphics
Tablet are integrated with the Apple
computer. This results in a low pro-
file tablet, fewer boxes to contend
with, easier hook up, and higher
reliability.
The software support package is
composed of a small assembly
language fast draw routine and the
master control software written in
Applesoft BASIC. The fast draw
routine is normally transparent to
the user. It is activated by a call
from the basic program and places
the x-y coordinate pairs received
from the interface into the data
array specified by the calling
program. Because this routine is
written in assembly language, the
system can process up to 120
coordinate pairs per second. This
means that unlike other systems,
the Apple Graphics Tablet will keep
up with the fastest hand motion.
The primary user interface is
provided by the Applesoft BASIC
utility program. Macro functions.
selected by pressing the pen on the
designated square on the tablet
overlay, provide the user with a
variety of utilities designed to
decrease the amount of time
required to complete the job.
Apple recognizes that these
standard routines may not be
optimum for every application.
Since the standard software is
written in BASIC the user may
easily replace these functions with
those written specifically for the
intended application. The standard
software package serves as an
example of the way to expand or
change the menu available on the
tablet surface. A new mylar overlay
is easily integrated into the tablet
system using the menu alignment
routine supplied with the system.
The interface provides the first
level of support for the tablet. It
relieves the user of many of the
mundane calculations often
necessary with less sophisticated
systems. Cursor following (marking
the position of the pen when it is
proximate to the tablet surface with
a cross hair cursor on the display),
0,0 coordinate origin positioning
and scaling are all done with single
commands to the interface. Only
when the interface signals pen
down is any action required of the
host software.
Specifications
Digitizing area
— 11x11 inches (280 mm x
280 mm)
Overall size
— 15.5 X 15.5 X 1 inches
(395 mm x 395 mm x 25 mm)
Controller card size
— 7x2. 75x .5 inches
(178 mm x 70 mm x 13 mm)
Pen size
— 6 inches (152 mm) with 6 ft
cable (1.8m)
Data rate
— up to 120 coordinate pairs per
second
Coordinate system
— - absolute cartesian with
selectable origin
Output format
— sixteen-bit binary coordinate
pairs
Interface levels
- TTL— provided by Apple
interface
Scaling
- user selectable
Operating Modes —
Selectable from tablet menu:
Tablet modes
- RESET
- CLEAR
- WINDOW
- BG COLOR
- DELTA
- SOFT RESET
- VIEWPORT
- CALIBRATE
- REDUCER
Pen modes
- PEN COLOR
- DRAW
- LINES
- DOTS
- FRAME
- BOX
Command functions
- CATALOG
- LOAD
- SAVE
- SEPARATE
- SLIDE
- AREA
- DISTANCE
Power requirements (supplied from
Apple power supply)
- 230 mA -t-5 VDC
- 40 mA -t- 12 VDC
- 20 mA - 5 VDC
- 40 mA - 12 VDC
Software/firmware
- Control program in Applesoft
BASIC
- Quick draw routine in assembly
language
- Interface firmware in ROM
Minimum hardware requirements
- A2S1048 48K Apple II Plus or
A2S0048 Apple II with
A2B0009 Applesoft II firmware
card
- A2M0004 disc drive with
controller
- Black and white or color
monitor order information
- A2M0029 from your local
dealer
(More new items from Apple on page 7.)
H
^^^^^^^^^^^^^^^^^
m
^^^^^^^^^^^^^
FOR llilij)lU(Ci^'UV(j):!;in . . .
The big news this issue is the
establishment of the Apple Educa-
tion Foundation, a not-for-profit
corporation established by Apple
Computer Inc. to further the
development of education through
microcomputer technology. The
foundation has just reviewed the
first group of applications for special
project grants, and will be announc-
ing the awards shortly.
The next deadline for submitting
applications is December 10th.
Projects that emphasize the
development of new instructional
(This column is written as a service to Apple
customers, and contains information on products
that we feel to be of interest to the user com-
munity. Apple Computer does not in any way
recommend these products or warrant their
suitability for use with Apple II or Apple II Plus
Computers.)
It MEGABYTES FOH
YOUM APPLE
Remember when you got your
disk? Finally, no more stacks of
cassette tapes everywhere, no more
waiting and waiting for tapes to
load. But, since you have a disk
you've thought of a dozen new
uses for your Apple, so now you
have stacks of little disks
everywhere.
Well, there is a solution to your
storage problem. No, it is not a disk
filing system, although that might
help. Corvus Systems has a 10
Megabyte fixed disk for the Apple.
The system is compact, and you
can attach four of them to your
system.
By Roger Cutler
Education Specialist
computing materials will receive
priority consideration. Further
details on the funding procedures
may be obtained from:
Carolyn Stauffer, Administrator
Apple Education Foundation
20605 Lazaneo Drive
Cupertino, CA 95014
EPIC, the Education Program
Information Center, is a special
department of the Foundation that
reviews and disseminates programs
for the education community.
Details can be obtained by writing
Dr. Richard Ballard, EPIC Director,
at the Foundation's address above.
The price is $5390 for one, and
$3390 for an add-on disk.
Corvus Systems, Inc.
900 S. Winchester Blvd.
San Jose, CA 95128
(408) 725-0920
SUPEMTALKEM
SuperTalker is a peripheral
system for the APPLE II that allows
you to digitize speech, then output
high quality speech through a loud-
speaker under program control.
SuperTalker consists of three
major components: the SuperTalker
peripheral card, a microphone, and
a loudspeaker.
Price is $279, assembled and
tested, FOB, Santa Cruz, CA.
For more information, please
write or call:
Mountain Hardware, Inc.
300 Harvey West Blvd.
Santa Cruz, CA 95060
(408) 429-8600
HOME CONTROL
A new foreground/background
system for home control called
Apple Butler gives the APPLE II
the capability of running two pro-
grams concurrently; one for the
monitor and control of systems In
your home, and one for any other
task you care to do.
The Butler provides up to 16
analog inputs for temperature, light,
moisture, or any other input data.
Up to 32 switch inputs are provided
for security or fire sensors, push
buttons, magnetic reed switches, or
on/off inputs or status indicators
from controlled devices. Up to 32
output latches are available for con-
trol of output devices.
Several control modules will be
available for the Apple Butler
system. The first will be a system to
control a solar water heater, a
solar-assisted home heating system,
a water-heating fireplace, or a com-
bination of the three. Other systems
are planned for control of automatic
swimming pool equipment,
sprinkler systems, home or com-
mercial greenhouses.
The Apple Butler costs $595
from your local APPLE dealer
or from Home Computer Center,
Inc. , 2927 Virginia Beach,
Virginia Beach, VA 23452,
(804) 340-1977.
WKAPPLE YOOB APPLE
Protect your APPLE from dust,
coffee spills and idle fingers with a
WRAPPLE; a heavy duty, beige
colored, vinyl dust cover. Or get
the WRAPPLE II, a dust cover that
will cover both the computer and
one or two disk drives set on top of
the computer. The WRAPPLE Is
$8.95 and the WRAPPLE II is
$9.95.
To order, send check or money
order to:
Henwood Enterprises, Inc.
1833 E. Crabtree Dr.
Arlington Heights, IL 60004
Or call toll-free (800) 323-7360 and
use your Master Charge, VISA or
American Express credit card.
OUTSII>€ THi
oncmm
ifs/ the user group neuusletter for October 1979
APPLE-8i
Dann McCreary has announced
APPLE-80, an 8080 simulator and
debug package for the APPLE II.
Now any 16K or larger APPLE II
can run programs written for the
8080.
APPLE-80 executes all valid
8080 opcodes and provides single-
step, trace and run modes. All
8080 registers are displayed on the
APPLE screen and can easily be
modified. 8080 I/O port addresses
are arranged in a table for ease of
modification. Up to eight break-
points may be set to facilitate
program debugging. 6502
subroutines may be called directly
from 8080 programs and 6502
routines may be embedded in 6502
programs. Vectored interrupts are
also simulated.
The complete APPLE-80
package includes APPLE-80,
APPLE-80 Manual, an 8080 demo
program, and an APPLE-80
Reference Card. Priced at
$20.00 + $1.50 shipping and hand-
ling, APPLE-80 may be ordered
from:
Dann McCreary
Box 16435 - WA
San Diego, CA 92116
California residents add 6% sales
tax.
SUPEMCHIP
SUPERCHIP is a firmware ROM
that plugs directly into socket DO on
your APPLE II to provide enhanced
I/O.
With Superchip, your APPLE
can display:
— Graphics and text freely
mixed anywhere on the
screen
— Full ASCII character set
including lower-case letters
— 31 additional non-ASCII
characters
— Reversed video on both input
and output
— Rotated characters for vertical
and upside-down printing
— Any character you can create
in an 8 X 7 dot grid
When entering program state-
ments or data, Superchip adds
single keystroke editing capabilities
to the APPLE:
— Move cursor up or down
— Clear the screen and home
the cursor
— And more!
Superchip requires a minimum of
16K RAM (32K if you plan to also
use Disk II) and supports the
following functions:
— Integer BASIC
— Applesoft ROM card (RAM
Applesoft is not supported)
— Printing through either the
Serial or Parallel Interface
Card
— A Character Editor, Disk II
Interface and Text Editor are
also available.
Prices are:
Superchip $99.95
Character Edit Cassette $19.95
Disk Interface Cassette $19.95
Word Processor Cassette $19.95
Shipping Charge (each) $ .75
From:
Eclectic Corp.
2830 Walnut Hill Lane
Dallas, TX 75229
CAHD BEADEM
Now, all you need is a standard
*2 pencil, a card, and the new
MR-500 mark sense card reader to
quickly and easily enter data into
your APPLE.
Here's all you have to do.
One— program the card by marking
with the pencil. Two— feed the card
into the reader slot. Three— the
reader automatically turns on, the
card is fed through, and data is
entered into memory.
The MR-500 is lightweight,
compact, and plugs right in to your
APPLE.
Price is $750. For details, write
or phone:
Chatsworth Data Corp.
20710 Lassen Street
Chatsworth, CA 91311
(213) 341-9200
EDITOH / ASSEMBLEH
Software Concepts has
announced an Editor/ Assembler for
the APPLE II.
The editor can create and modify
integer BASIC, APPLESOFT, and
assembler programs. Edit features
include string search replacement,
tabbing, block line moves, simple
macros, and search windows.
The two-pass assembler can
assemble up to ten disk-based
source files and create a program
listing and standard APPLE DISK II
binary files. It uses eight character
symbols, all standard 6502 opcode
mnemonics, and has six additional
pseudo opcodes. Operands may
contain numeric parameters, sym-
bols, and arithmetic expressions.
The price is $55.00 from your
local dealer or:
Software Concepts
P.O. Box 1112
Cupertino, CA 95015
LOWEE-CASE FOH
YOOK APPLE
Both Integer BASIC and
Applesoft II can manipulate the
ASCII codes for lower-case letters
in string variables, but until now
there has been no efficient way to
display the results on the screen.
The Lower Case Adapter (LCA)
solves this problem. Its features
include:
— Plugs in with no modifications
to the APPLE. Easily removed
if warranty service is needed for
either the APPLE or the LCA
— Displays lower-case letters with
descenders
— Sample software included for
use with either BASIC
— No memory overhead as with
firmware and software methods
that utilize APPLE'S HI-RES
graphics
— Fully compatible with Disk-II
DOS
— Compatible with text editors
from Applecations Unlimited
and Programme
— Compatible with most printers
that have lower-case
|appte*»m^tef inc.
The Lower Case Adapter does
not interfere with any existing
features of the APPLE or any of
the standard software or firmware.
Price is $49.95. For more
information, or to order write:
Dan Paymar
P.O. Box A-133
S.C. 6800
Costa Mesa, CA 92627
or phone (714) 645-1411 after
6:30 p.m.
DISKETTE STOHAGE
The SRW library cases provide
minidiskette users with convenient
and efficient access to floppies in
envelopes. It is an excellent archival
storage system with optimum pro-
tection against environmental
conditions such as temperature,
excessive humidity, moisture
condensation and contaminants.
The library case is an excellent
safeguard for recorded information
during shipping and storage.
For more information, see your
local APPLE dealer or contact:
SRW Computer Components
Company
18009-D ky Park Blvd.
Irvine, CA 92714
(714) 557-7060
SELECTMIC INTEBFACE
Looking for high-quality printing
for your Apple? Then the Escon In-
terface System may be just what
you need. By choosing one of the
four available models, you can in-
terface any Selectric to any micro
or minicomputer.
There are no permanent
modifications to make to your
Selectric and it can still be used as a
typewriter.
Prices are:
SlOO
Parallel
RS232
IEEE-488
$496.00
$525.00
$549.00
$560.00
For more information, call or
write:
Escon Products, Inc.
171 Mayhew Way, Suite 204
Pleasant Hill, CA 94523
(415) 935-4590
Electronic Messages
It seems that the age of
telephone communications has
reached microcomputers. ABBS
(Apple Bulletin Board Systems) are
springing up all over. If your Apple
has communication capability (a
modem, etc.) then give one of
these numbers a yell. If you have
an ABBS, or know of one not
listed here, drop us a note so that
we can list it.
A.E.C.S.
Ft, Lauderdale, FL
(305) 566-0805
AKRON DIGITAL GROUP
Akron, OH
(216) 745-7855
COMPUTER COMPONENTS, INC.
Lawndale, CA
(213) 370-3160
COMPUTER COMPONENTS. INC.
Westminster, CA
(714) 989-1984
COMPUTER MERCHANT
San Diego, CA
(714) 582-9557
COMPUTER MART
Springfield, MO
(417) 862-7852
FORT WALTON BEACH
Destin, FL
(904) 243-1257
HAWTHORNE
Hawthorne, CA
(213) 675-8803
HOUSTON
Houston, TX
(713) 977-7019
KORSMEYER ELECTRONICS
Huntington Beach, CA
(714) 964-4346
MARINA DEL REV
Marina Del Rey, CA
(213) 821-7369
MIAMI
Miami, FL
(305) 821-7369
NEW YORK
Long Island, NY
(212) 448-6576
PEOPLES' MESSAGE SYSTEM
Santee, CA
(714) 449-5689
PERIPHERALS UNLIMITED, INC.
Signal Hill, CA
(213) 424-3506
PERSONAL COMPUTERS OF
CHICAGO
Chicago, IL
(312) 337-6631
SAN ANTONIO
San Antonio, TX
(512) 657-0779
SAN FERNANDO VALLEY
Canoga Park, CA
(213) 340-0135
SAN FRANCISCO
San Francisco, CA
(415) 668-4246
I.' 1/, ir. 1
r
INVISIBLE WRITING
Some programs using HIRES
graphics require the ability to plot
on one page of graphics while
displaying the other. This really isn't
hard, in fact just a POKE will do it
for you. (Note that before this will
work you must use a HGR or an
HGR2 command to initialize
HIRES.)
To change the page HPLOTted
to, POKE 230,32 for page 1, and
POKE 230,64 for page 2. This has
no effect on which page is
displayed, but changing that is just
as simple. POKE - 16300,0 to
display page 1, or POKE
- 16299,0 to display page 2.
€&m€l6/ the user group nei
ujsletter for October 1979
DOS Update for Dual
Drive Users
DOS 3.2 has been shipping for
some time now and, we are happy
to report, has been remarkably bug-
free. However, DOS users with two
DISK II's on a single controller have
reported problems. These problems
usually manifested themselves as
seemingly random "DISK I/O
ERRORS." Often the copy program
would fail outright or create a
diskette that was unreadable. Since
this was a sporadic problem, it was
very difficult to track down.
What was found was that the
read/ write head was not always
where DOS thought it was.
Although DOS deselects a drive
before seeking on the other drive,
and the deselect is supposed to
shut down the drive electronics, a
filter capacitor on the drive has the
effect of keeping the drive enabled
for about 100 milliseconds after
deselect. Thus, when reading and
writing alternately to both drives,
the head of the previously accessed
drive can sometimes step itself as
much as half a track off, while the
other drive is stepping normally.
When the drive is reselected to
operate on the same track, DOS
still trusts the head to be where it
was, and this leads to the I/O er-
rors. The solution we implemented
was to wait 100 milliseconds before
seeking, when the drive is powered
up. Since powerup and seek time is
substantial compared to the 100
millisecond delay, there is no loss in
performance. Additionally, the copy
program has been changed to verify
that each track is properly
duplicated (this makes it slower but
more reliable) .
Congratulations to the lab
engineers who found this elusive
problem. Now comes the most
important part, getting this correc-
tion out to you.
To do this, we have created a
revision of DOS 3.2 entitled,
appropriately enough, DOS 3.2.1.
Your local Apple Level 1 Service
Center now has a copy of this new
release which works with both the
Standard (Integer) and Plus
(Applesoft) versions. It contains
revised versions of the following:
1. DOS 3.2.1
2. Update 3.2.1
3. Copy
We suggest that Apple users
operating two disks on the same
controller obtain this version. For
users with one disk, or with disks
on separate controllers, there is no
problem, and therefore, no need to
get the change.
To get your current DOS 3.2
Diskette updated to 3.2.1, simply
bring it to your local Level 1
Service Center (Note: you must
bring the original master diskette,
the one with the Apple DOS Label
on it.) The Dealer will process your
diskette, updating it with the
versions listed above, and return it
to you. Every effort will be made to
do this within 24 hours of the time
you bring it in. That's all there is to
it. In the event that there is no con-
venient way for you to get your
diskette to your Dealer's Service
Center, you may mail it (be sure to
pack it securely) to our Cupertino
Service Facility. The address is:
Apple Computer Service,
20605 Lazaneo Drive,
Cupertino, California 95014,
Attention: DOS Update.
The updated disk will be mailed
back as soon as possible.
Note: Nothing in this revision
changes the documentation in the
DOS 3.2 — Do's and Don'ts of
DOS manual (A2L0012). It's still
current and will remain current for
any 3.2 series DOS release.
EHHATA
In CONTACT 4 we gave you an
incorrect telephone number for
Interactive Structures, Inc., the peo-
ple who make an analog input card
for the APPLE II. The correct
number is (215) 382-8296.
A couple of the Local User
Groups listed in CONTACT 5 were
wrong. They should be:
MARYLAND APPLE II USERS
GROUP
Computer Unlimited, Inc.
907 York Road
Towson, MD 21204
Kevin Parks
(301) 321-1553
WISCONSIN APPLE USERS
c/ o Cybernetic Mechanism
P.O. Box 11463
Milwaukee, WI 53211
Ken Blochowiak
(414) 964-6645
('^;fi'i',C'_')iiiJff'S-;
Here is the new list of latest
APPLE II User Groups. If we still
don't have your group in our
files, write or call us.
BRITISH COLUMBIA
APPLE BRITISH COLUMBIA
Ralph Dawson
2922 East 25 Ave.
Vancouver, B.C.
CALIFORNIA
APPLE USERS GROUP
c/ o Computerland
1815 Ygnacio Valley Rd.
Walnut Creek, CA 94596
BYTE SHOP
4 West Mission St.
Santa Barbara, CA 93101
(805) 966-2638
6
CAROLINA
CAROLINA APPLE CORE
Wilbur Andrews
5212 Inglewood Ln.
Raleigh, NC 27609
(919) 787-3509
CONNECTICUT
APPLELIST
55 Pardee Place
New Haven, CN 06515
Marc Goldfarb
(203) 562-4907 (work)
(203) 397-1407 (home)
FLORIDA
MIAMI APPLE USERS GROUP
c/o David Hall, Sec.
2300 N.W. 135th St.
Miami, FL 33167
THE APPLE COMPUTER
ENJOYMENT SOCIETY
671 NE 56th Street
Fort Lauderdale, FL 33334
(305) 772-4768
KANSAS
APPLEBUTTER
10049 Santa Fe Dr.
Overland Park, KS 66212
(Last Wed. each month)
LOUISIANA
TheB.R.A.N.C.H.
(BATON ROUGE APPLE NETWORK
OF COMPUTER HOBBYISTS)
4661 Tupello St.
Baton Rouge, LA 70808
(504) 924-0636
Allen Simpson
MICHIGAN
THE MICHIGAN APPLE
Computer Club
32905 W. 12 Mile Rd. Suite 320
Farmington Hills, MI 48018
(313) 979-5298
MISSOURI
APPLE JACKS
c/o Odel Small
P.O. 24202
St. Louis, MO 63130
MICRO & PERSONAL COMPUTER
CLUB OF ST. LOUIS
Futureworld, Inc.
12304 Manchester Rd.
St. Louis, MO 63131
(314) 965-4540
NEW YORK
THE MID HUDSON APPLE CORE
ASD Office Systems
Rt. 55 — Vanwyck Plaza
Poughkeepsie, NY 12603
APPLE BYTER'S CORP.
Buffalo Saving Bank
Sheridan-Harlem Branch,
Community Room
3980 Sheridan Dr.
Amherst, NY 14226
(3rd Fri. each month)
NEW JERSEY
APPLE USERS GROUP
c/o Computer Encounter
2 Nassau St.
Princeton, NJ 08540
(609) 924-8757
OHIO
DAYTON AREA APPLE USERS GROUP
c/o Computer Solutions
1932 Brown Street
Dayton, OH 45409
PENNSYLVANIA
THE COMPUTER HOUSE
1000 Greentree Rd.
Pittsburgh, PA 15220
(412) 921-1333
VIRGINIA
S.E. VIRGINIA APPLE ORCHARD
George Guild Jr.
117 Cardinal Drive
Hampton, VA 23664
(804) 850-0626 (home)
(804) 764-7081 (work)
WISCONSIN
ADAM & EVE, APPLE II USERS' GROUP
lis. Handcock St.
Madison, WI 53703
(608) 256-5306
WHATS NEW, APPLE?
(cont'd)
APPLE WRITER: A New
Way to Write from Apple
Computer Inc.
Discover Apple Computer's new
way to be more creative and effi-
cient at practically anything you
write. The Apple Writer uses all the
advantages of the Apple computer
and that saves you time. This new
product accomplishes typographical
error correction, file editing and
document revisions quickly with
minimal effort. That's important to
any creative thinker.
By entering text on the keyboard
of the Apple Computer, you see it
displayed on the monitor. Easy
retrieval of your files from the
diskettes, allows for effortless text
corrections or revisions.
Features
Character-oriented rather than
line-oriented text editing permits
easier editing.
Editing feature permits three
methods of deletion of text (char-
acter, word and paragraph) and
two methods of insertion of text
(character and file) . Cursor Control
Mode allows easy movement
throughout the text. Moves blocks
of text within a document, two easy
ways.
Stores documents easily on
floppy disks with up to 95 pages of
text per diskette. Any length docu-
ment can be printed using the load
and continue printing feature.
Allows partial documents to be
saved to separate disk files, and
recalled later for insertion into other
documents.
Printer Commands include: left
or right justify, fill-justify or center-
ing. Also sets left, right, top and
bottom margins; line length of
page, line spacing, page numbering
and page heading. Many of these
commands may be embedded on
your text allowing dynamic format-
ting.
Recovers automatically from
system errors to protect documents.
Permits check of length of
unused working file space (docu-
ment in memory) .
Permits use of DOS commands
from editor, allowing you to catalog
or delete files stored on diskette.
Has Global search and replace,
allowing replacement of any
characters or words throughout a
document.
Displays up to 24 lines of 40
characters of text, with upper case
shown as inverse characters.
Minimum Hardware
Requirements
Apple II or Apple II Plus with 48K
RAM
One Disk II required (second drive
optional)
Monitor or TV Screen
Apple Writer has too many
features to explain here. Ask your
dealer for a demonstration. Sug-
gested Retail Price is $75.00.
1
€@fiIl€E6/ the user group neiusletter for October 1979
Dollars and Cents
This program (and the subroutine at lines 2000
through 2060) will format your numeric output into a
"Dollars and Cents" format. It's simple and fairly fast.
An advantage to using this subroutine is that it does
very little string manipulation. This means that the
dreaded "garbage collection" will occur less often than
with other methods!
3LIST
100
110
120
130
140
150
1 6>0
170
REM
REM
REM
REM
REM
REM
REM
REM
PRINT USING
SIMULATOR
AUG 79
J. CROSSLEY
i 80
190
200
210
220
230
240
250
260
270
280
290
300
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
2000
N =
REM
5: REM
2000
LET
REM
LET S
REM
HOME
FOR X
PRINT
GOSUB
PRINT
NEXT X
PRINT
PRINT "UNFORMATTED
TTED"
END
REM
REM
REM
REM
REM
REM
REM
REM
REM
REM
REM
X$ =
10
SET NUMBER
OF DECIMALS
SET FIELD
WIDTH
TO 5 STEP . 501
THIS IS THE
SUBROUTINE.
IS 'X 'N'/ AND
X
N
FORMA
FORMATTING
THE INPUT
'S '
TO
IS THE NUMBER TO BE
BE PRINTED
IS THE NUMBER OF
DIGITS RIGHT OF '. '
IS THE WIDTH OF THE
RIGHT JUSTIFIED
PRINTING FIELD
N +
+ STR*
. 5) )
< INT (X •»
2010 Q LEN (X*) - ( VAL (X*) <
0)
2020 PRINT SPC ( S - Q * (Q > N -
1 ) -- ( N + 2 ) ■» ( Q < - N + 1
) );
2030 PRINT MID* < X*; 1 + ( VAL (
X*) < 0); (Q <: ■■■■ N) + (0 - N
) * ( Q > N ) > i
2040 PRINT MID* ( "0. 00", 1 + < <N
+ 1 ) < Q), 1 +• (N - Q + 2) *
(Q < N + 2) );
2050 PRINT RIGHT* ( X*, N * (Q >
N ) + ( Q - 1 ) •» ( Q < N ) ) ;
2060 RETURN
Literal Input
Here is another GC (garbage collection) forestaller
with some nice additional benefits. It allows you to
enter commas, quotes and colons into Applesoft
without getting an "EXTRA IGNORED" error for your
efforts and works just as well for either keyboard or
disk input. Here's what it does.
— Line 100 defines a string variable at a known
memory location. (This name can be anything you
wish. We just happened to use IN$.)
— Lines 220-290 poke a short machine language
routine into page 3 of your Apple's memory. This
routine changes the pointer to the string in memory to
point at the Input Buffer ($200) .
— Line 350 calls the new input routine and the MID$
function moves a copy of the new string into main
memory so that it isn't overwritten by the next input.
Here's a cute trick for using this routine with random
access disk files. Say your program is reading a file for
the third field in each record. Using this routine, the
syntax for that would be:
CALL 768: CALL 768: CALL 768: IN$ = MID$(IN$,1)
The first two calls are dummy INPUTs but, unlike
the normal DOS "INPUT IN$" command, perform no
string operations.
Try it. You'll like it.
3LIST
100
1 10
120
130
140
LET IN* ==•■ "X"
TEXT : HOME
REM
REM THE FIRST VARIABLE
REM DEFINED MUST BE A STRING
150 REM
160 REM
170 REM
THIS STRING WILL REG
INPUT FROM THE CALL
VE
8
180 REM THIS POKES THE INPUT
190 REM SIMULATOR ROUTINE
200 REM INTO MEMORY. . ,
210 REM
220 FOR J - 768 TO 788
230 READ I
240 POKE v). I
250 NEXT v;
260 DATA 162, 0, 32, 117, 253, 160, 2
270 DATA 138, 145, 105, 200, 169,
280 DATA 145, 105, 200, 169, 2, 145
290 DATA 105, 96
300 REM
310 REM NOW TO USE IT !
320 REM
330 PRINT "TYPE IN ANY CHARACTER
S YOU WISH: "
340 PRINT
350 CALL 768. IN* = MID* ( IN*, 1 >
360 REM
370 REM THIS IS AN " INPUT IN*"
380 REM BUT IGNORES "," St ":"
390 REM
400 PRINT
410 PRINT "AND HERE'S WHAT YOU T
YPED IN; "
420 PRINT : PRINT IN*
430 PRINT
440 PRINT "NOTE THAT EVEN QUOTES
, COMMAS AND"
450 PRINT "COLONS GET THROUGH UN
SCATHED. "
460 PRINT : PRINT "NOW LET 'S WR I
TE IT TO THE DISK. "
470 PRINT CHR* (4) "OPEN TEMP"
480 PRINT CHR* <4) "WRITE TEMP"
490 PRINT IN*
500 PRINT CHR* (4) "CLOSE"
510 PRINT : PRINT "AND READ IT B
ACK IN. . . "
520 LET IN* = " "
530 PRINT CHR* (4) "OPEN TEMP "
540 PRINT CHR* (4) "READ TEMP"
550 CALL 768: IN* = MID* ( IN*, 1 )
560 PRINT CHR* < 4) "CLOSE"
570 PRINT : PRINT IN*
580 PRINT : PRINT "TA~DAA! ! ": END
1
Restore to Line Number
We've had some questions from people asking how
to do a RESTORE statement to a particular line
number. It's really not too difficult. The next program is
a quick demonstration of how to do this.
3LIST
DATA ZERO
1 DATA ONE
2 DATA TWO
3 DATA THREE
4 DATA FOUR
5 DATA FIVE
6 DATA SIX
7 DATA SEVEN
8 DATA EIGHT
9 DATA NINE
10 REM
11 REM THESE ARE THE DATA LINES
12 REM
1000 REM THESE POKES ENTER THE
1010 REM RESTORE PROGRAM INTO
1020 REM MEMORY
1025 REM
1030 POKE 768, 201: POKE 769, 82: POKE
770,208: POKE 771,38: POKE 7
72, 32: POKE 773, 177: POKE 77
4,0: POKE 775, 32: POKE 776, 1
03:
1040 POKE 777, 221: POKE 778, 32; POKE
779,82; POKE 780, 231: POKE 7
81, 32; POKE 782, 26: POKE 783
, 214: POKE 784, 144: POKE 785
.> 8:
1050 POKE 786, 160; POKE 787, 4; POKE
788, 177: POKE 789, 155: POKE
790, 201 : POKE 791, 131 : POKE
792, 240; POKE 793, 3; POKE 79
4, 76:
1060 POKE 795, 124: POKE 796, 217:
POKE 797, 165: POKE 798, 155;
POKE 799, 164: POKE 800, 156:
POKE 801, 56: POKE 802, 233; POKE
803, 1;
1070 POKE 804, 32; POKE 805, 80; POKE
806, 216; POKE 807, 76: POKE S
08, 166; POKE 809, 217; POKE 8
10, 96
1075 REM
1076 REM THESE POKES SET TO
1077 REM JUMP TO THE RESTORE
1078 REM PROGRAM
1079 REM
lOSO POKE 1013, 76; POKE 1014, 0; POKE
1015, 3
1084 REM
1085 REM THESE POKES ENTER THE
1086 REM OWERR FIX FROM PAGE 82
1087 REM INTO MEMORY
1088 REM
1090 POKE 810, 104: POKE 811, 168:
POKE 812, 104; POKE 813, 166;
POKE 814, 223: POKE 815, 154;
POKE 816, 72; POKE 817, 72: POKE
9
ceimcc ^ / the user group neuusletter for October 1979 [ '■;::';";"<"(■ :o !ii^i|,':'J- lif'V'^iv [\ip:„
818, 152: POKE 819, 72: POKE 8
20. 96
2000 REM
2010 REM SET UP QNERR AND START
2020 REM THE MAIN PROGRAM
2030 REM
2040 ONERR GOTO 3030
2050 LIST - 9
2060 INPUT "WHICH LINE DO YOU WA
NT ?"; LN
2070 RLN
2080 REM
2090 REM LINE 1 1 30 IS DOES A
2100 REM 'RESTORE TO LINE LN '
2110 REM
2120 READ A*
2130 PRINT
2140 PRINT "AND THE DATA IS. . . "
; A*
2150 PRINT
2160 GOTO 2050: REM DO IT AGAIN
3000 REM
3010 REM ERROR HANDLER
301 1 REM
3012 REM ALONE EXECUTES THE
3013 REM ONERR FIX
3020 REM
3030 IF PEEK < 222 > = 90 THEN PRINT
: PRINT "THAT 'S NOT A DATA L
INE! "; CHR* (7) : Z>. : GOTO 20
50
3040 REM
3050 REM THIS IS FOR
3060 REM UNDEFINED STATEMENT
3070 REM
3080 IF PEEK (222) = 254 THEN PRINT
: PRINT "TRY TYPING A NUMBER
! "i CHR$ (7) : ?y. : GOTO 2050
3090 REM
3100 REM THIS IS FOR
3110 REM BAD RESPONSE TO INPUT
3120 REM
3130 REM IF NOT ONE OF THE
3140 REM ABOVE ERRORS THEN END
3150 END
3
What's In This System,
Anyway?
This last program (CONFIG) , does a quick look at
the machine language code, if any, located in your
Apple's I/O slots. Since this code is different for each
peripheral, it's possible to tell just what interface card is
in a particular slot.
The bytes being read are $Cn05 and $Cn07, where
n is the slot number. For instance, these bytes both
contain $48 (72 decimal) for an Apple Parallel Printer
Interface.
3LIST
100 REM THIS PROGRAM FIGURES
110 REM OUT WHAT CARDS YOUR
120 REM APPLE HAS IN WHICH
130 REM PERPHERIAL SLOT.
140 REM
150 REM THIS IS DONE BY THE
160 REM PROGRAM LOOKING AT
170 REM THE CODE IN AN ON-
180 REM BOARD ROM AND DOING
190 REM A QUICK CHECK ON A
200 REM FEW BYTES
210 REM
220 TEXT : HOME : PRINT : PRINT
SYSTEM CONFIGURATION (
CONFIG)": PRINT
230 DIM S5<4) ; S7(4) : DISK 1: COM
= 2: SERIAL = 3: PTR = 4
240 DATA 3. 60, 24, 56, 56, 24, 72, 72
250 FOR I = DISK TO PTR: READ S5
( I ), S7< I ) : NEXT
260 DIM NA* < 4 )
270 LET NA*<DISK) - "DISK CONTRO
LLER "
280 LET NA*(COM) = "COMMUNICATIONS"
290 LET NA*( SERIAL) = "H. S. SER
lAL"
300 LET NA*(PTR ) = "PARALLEL PRI
NTER "
310 DIM CS(2)
320 LET ClOO = 49408
330 LET C700 = 50944
340 FOR S - ClOO TO C700 STEP 256
350 FOR K ~ TO 2
360 LET CS(K> -
370 FOR I " TO 255 STEP 8
380 LET CS(K) = CS(K) + PEEK (S
+ I >
390 NEXT : NEXT
400 IF CS(0) < > CS(1 ) OR CSd )
•C > CS(2) OR CS(2) <: 256 OR
CS(0) < 256 OR CSd ) < 256 THEN
470
410 PRINT "SLOT NO. "<S - 49152)
/ 256" HAS A";
420 FOR I " DISK TO PTR
430 IF PEEK <S + 5) = 85(1) AND
PEEK (S + 7) = S7( I ) THEN PRINT
" "NA*( I ) i : I 99
440 NEXT I
450 IF I = 5 THEN PRINT "N UNKN
OWN";
460 PRINT " CARD" : GOTO 480
470 PRINT "SLOT NO. " (S - 49152)
/ 256" IS EMPTY"
480 NEXT : END
3
10