Instruction manual

Direct Computer
to
Computer Communication
A discovery
by
Dr.
Bohannan:
If
your
tape
recorder has a
monitor
hookup,
through
which you can listen to
whatever
is
being recorded, you can
hook
up
the APPLE
directly
to
the
SYM
and reduce the error rate astronomical-
ly! On
our
SYM (whose tape interface is
modified
as per MICRO's instructions),
we
have
about
a 70% chance
of
a suc·
cessful load
of
our
1500 byte program
with
our
tape recorder, a Sony. The level
and
tone
control
settings
are extremely
critical
as well. When
the
machines are
hooked up
directly
through the
monitor
jack
of
our tape recorder, we have suc·
cess
every
time
and the level and tone
settings
are
unimportant.
I've also found
that
several
of
my tape recorders work
very well
this
way and have the
monitor
feature
through
the
earphone jack even
though
it
is
not
marked.
Ending Address
($11
DO-E),
Tape
1.0.
Number ($11DF), and the MODE
(11
EO)
and
start
the program at SYMOUT:
($1080). Record the program, play
it
into
your
SYM, and there you have
it'
JKIK
OR
HS?
J---AND
WE'RE
ALL
DONE
OUTPUTS
TH!
NEXT
KDl
LOCATl
ON
J---YINo
THE
NEXT
BYTE
CHKL
OUTBTX
CHKH
OUTBTX
Using the Program
It
is a good idea to make a SYNC
tape first. The APPLE
output
level is
about
%
of
the SYM's
output
level
which
may require changing
the
volume on
playback
from the usual value. Also, the
APPLE does
not
have a high-frequency
roll-off
capacitor
which the SYM uses,
and as a result, the tone
controls
may
need
adjustment.
The SYNC
tape
enables you
to
set the
controls
properly
on
your
tape
recorder (as
outlined
in the
SYM manual, Appendix
F).
To make a
SYNC tape, load the SYMOUT program
into
your
APPLE, set the mode by
setting
the parameter, MODE (location
$11
EO),
to
$80 for SYM format
or
to
$00
for KIM
format
and begin the program
at
SYNC:
($1000).
This
is
an
endless loop, so
record a few minutes
of
the
output
before you hit RESET and use the result·
ant
tape
to
set the level and tone on the
tape recorder when reading
it
into
the
SYM
(see Appendix F in SYM manual).
Once you have the proper level and
tone
settings, down-loading your program is
fairly easy. First, load the SYMOUT pro-
gram. Then, load your executable pro-
gram
into
RAM. Next, put in the
parameters: Starting Address
($11
DB-C),
J---
WRITE STARTING
ADORESS
I
liM
ADDiil
I 1.oA SAl.
IIIIAD'
21
3811
,iSR
OUTBCX
IIIIB.
AD·DCII
1.oA
SAM
IIIIB3
211I
3811
JSR
OUTBCX
I1B6
2C
Elllli
BIT
KODE
IIIIB9
II
IC
BP1.
oUMPT2
J---
WRITE
ENDING
ADDRESS
+1
IIiBB
AD
DOli
LOA
EA1.
IIBE
21
3811
JSR
OUTBCX
llCI
AD
DEli
1.DA
EAH
l1C4
21
3811
JSR
OUTBCX
J---
START
0.
MEMORY
DUMP
•••
J---
YlRST
CHECK
If
THIS
IS'
'THE
LAST
BYTE
OUT
IlIC1
AS
Er
OUMPT21
1.oA
BUfAD1.
J---LOAD
ADDRESS
0.
CURRENT
BYTE
l11C9
CO
oDII.
CMP
EAt.
IICC
01
29
BNE
DUMPT4
;---CONPARE
TO
ENDING
ADDRESS
IIiCE
AS
E8
1.DA
BUfADH
1101
CD
DEli
CMP
EAR
1103
011
22
BNE
DUMPT4
J---BRAUCH
I.
WE
HAVE
MORE
TO
OUTPUT
J---
YUP,
1.AST
BYTE
•••
WRITE
"IN
liDS
A9
2.
LOA'
'/'
1l107
21
lI711
JSB
OOfCTX
J---
VRITE
CHECKSUM
110A
AD
En
I 1.oA
111I0021
3BII
JSR
lfilEI
AD
£211
UiA
IIE3
28
3BII
JSR
J---VRITE
TVO
EDT'S
I.E6
A9
'4
1.OAI
EOT
I.E8
21
3BII
JSR
OUTSTX
18ES
A9
14
1.oA'
EOT
liED
21
3BII
JSR
OursTX
J--O",
NOV
VE'RE
DONE,
SO
CLEAN
UP
& EXIT
III
••
18
-C1.C
;---INDICATE
SUCESS
J---
SKIPPED 1.0TS
0.
STU
••
,
MOST1.Y
SYH
SPECI.IC
1
••
1
AI
"1
1.DX'
SII
J---SHUT
0
••
TAPE
RECORDER
l1Y3
8E
S8C.
STX
TAP£OY
IIY6
61
RTS
J---
~EXT
IS
THE
CODE
WHICH
IlIIn
M
II
0UMP1'41
1.oY,
$I
un
BI
£7
1.oA'Y
BUYAo1.
llFa
2.
3811
JSR
OUTBCX
JWRITE IT &
UPDATE
CHECKSUM
lin:
E6
E7
INC
BUYADL
JBUIlP BUrFER
ADDS
II11
DB
CS
8ME
oUMPT2
11.2
E6
£8
INC
BU'ADH
JCARRY
11.4
4C C711 JMP
DUMPT2
J---eo
BACK
& SEE
1.
WE'RE
DONE
;ng to
my
boss, Dr. Bruce Bohannan. The
APPLE has
almost
all
of
the features
of
the typical
Microprocessor
Development
System, except perhaps, a means
of
communicating
with
the SSC in ques-
tion.
How
can
an
APPLE talk
to
a SYM?
Fortunately, both
computers
use
the
6502 micro-processor chip, so
programs
assembled
for
the APPLE have
little
or
no
trouble
running on the SYM
or
KIM.
Also fortunately, all
of
these
machines
have a means
of
reading and
writing
pro-
grams
on
audio
cassettes.
It
goes
without
saying,
of
course,
that
the
tape
formats
of
these machines are
totally
in-
compatable.
So we had
to
do
some
translating;
either
convince the SYM
to
speak APPLE, or convince the APPLE
to
speak SYM. Since
it's
easier
to
develop
programs
on the APPLE
[that's
why I
did
all this in the
first
place), I decided
to
teach
my
APPLE
to
speak SYM.
It
turns
out
that
there is
another
good
reason
to
teach
the
APPLE
SYMese. The SYNERTEK people,
who
make the SYM, have been
so
kind as
to
publish
listings
of
·the
SYM
monitor
in
the back
of
their
manual.
This
monitor
listing
has
routines
in
it
which
produce
SYM
or
KIM
cassette
tapes. The result is
that
the program
is
very easily
modified
to run on the APPLE. No
timers
are used
(the APPLE has none), and the serial
data
is sent
out
through
a
single
bit
of
a
6522
output
port.
Although
the
APPLE
doesn't
have any 6522s, it does have
several
single
bit
outputs,
and
in par-
ticUlar,
it
has a
single
bit
output
with
the
level
adjusted
to
be used as a
cassette
recorder interface. Even
though
this
is
not a 6522 output, under certain condi-
tions
it can be
thought
of
as one. The
way
that
the APPLE works, any
time
the
address
of
the
cassette
output
port
ap-
pears
on
the address bus, the
cassette
output
flip-flop
changes state.
On
the
other
hand, in the SYM, we send a par-
ticular
bit
pattern
to
an
address and
these
bits
appear on the
output
latch.
Basically,
what
this
means, is
that
we
can
pretend
that
the APPLE
cassette
is
the SYM
cassette
output
if
we
write
only
to
this
output
when we
want
to
change
the level
of
the
cassette
port. With the
APPLE,
it
should be noted, there is no
control
over
the
phase
of
the
output
signal,
but
all
of
the cassette-read
routines in
question
are
not
sensitive
to
phase. Fortunately,
through
good luck or
the good planning
of
the programmers
at
SYNERTEK,
90
%
of
the
cassette
out-
put code
was
written
in
just
this
way.
This feature makes
the
program
a snap
to
adapt
to
the APPLE. Once I had pick-
ed
out
the
proper
pieces
of
the
SYNERTEK code and figured
out
what
they had done, I had
only
to change a
few lines
to
obtain
the
results
listed
here. Since I did not
write
the program, I
won't
explain how
it
works,
but
I have
heavily commented the
listing
for
those
readers
who
are interested.
19:52
MICRO
--
The 6502
Journal
December, 1979