Operating instructions

MEMORY
SIZE
32K
48K
SAVE ADDRESS
$7FOO
$BFOO
Table I
HIMEM
32512
-16640
Applesoft
A =
16
•
RND(1)
In
Integer either
"#"
or
''9'
can be
used
to
mean not equal, in Applesoft on-
ly
"(y'
can be used.
Example:
Integer
IF A
# B THEN
10
The first version used the tape write
routine at $FECD, which writes a
10
se-
cond header; therefore, the write
took
about
11
seconds,
10
for the header and
1 for the data. However, I noticed that at
$FECD the instruction is
LOA
#$40
followed by JSR HEADR. Therefore
when I want to write a record
to
tape, I
load the accumulator with
$20
and enter
the
monitor
at $FECF. This causes the
Apple
to
write a 5 second header, which
means each record takes 6 seconds.
To use:
Load the routines
into
memory
Enter Integer Basic
Type "HIMEM:16128"
Press "RETURN"
Load the Program
Type in the following line:
o
POKE
33,33:CALL 769:L1ST:END
Type
"RUN"
Set the recorder in record mode
Press "RETURN"
The program will now list to tape
and the
TV.
When this has finished, the
prompt
(»
will reappear.
Now enter Applesoft
Rewind the Tape
Warning: Since the headers are only 5
seconds long, you must set the tape as
close to the beginning
of
the first one as
you can.
Type "HIMEM:16128"
Press "RETURN"
Type
"CALL
772"
Start the recorder
in
play mode
Press "RETURN"
The program will come into Ap-
plesoft as
if
you had typed it in. When
the Applesoft prompt
Ol
appears with
just the cursor behind it, control is
back
at the keyboard.
Now what you have to do is change
the
things
which are different between
Applesoft and Integer. This wilt have to
be
done whether you use the disk
or
tape.
All
"TAB"
statements have to
be
chang-
ed
to
'HTAB"
All computed "GOTO" and 'GOSUB"
have
to
be
changed
to
"ON"
"GOTO" or
"ON"
"GOSUB".
Example:
Where N can vary from 1 to 4
Integer
GOTO
400
+ N •
100
Applesoft
ON
N
GOTO
500,600,700,800
All multi statement "1F"s will have to
be
broken into two lines because
of
dif-
ference in the way Integer and Applesoft
handle ifs.
Example:
100
IF
A=B
THEN
A=A+1:C=C+1
In Integer C always has one added
to
it, whether or not A equals
B.
This
same line in Applesoft will cause C to
have 1 added
to
it only
if
A equals
B.
So
for the program to work like the Integer
program, the line will have to
be
broken
into
two
lines.
100
IF
A=B
THEN
A=A+1
101
C=C+1
The random number functions are
different between Integer and Applesoft.
Example:
Integer
A =
RND(16)
Applesoft
IF
A(>B
THEN
10
There is no
"MOD"
operation in
Ap-
plesoft,
so
you have
to
calculate the
modulus.
Example:
Integer
B = A MOD C
Applesoft
B =
A-
INT(A/C) • C
Variable names may have to
be
changed.
In
Integer all letters are signifi-
cant; in Applesoft only the first 2 letters
are significant. To Integer
PAY1
and
PA
Y2
are different;
to
Applesoft they are
the same variable.
Example:
Integer
PAY1
= PAY2 + PAY3
Applesoft
P1
=
P2
+
P3
Another difference is the way str-
ings are handled. In Integer "DIM A$(20)"
means set
up
1 string which can be up to
20
characters long. To Applesoft, it
means set up
20
strings each
of
which
can be
up
to
255
characters long. So all
string
dims
should be removed from the
program.
Also
to
get specific characters out
of
a string, you have
to
use the MID$
function in Applesoft.
Example:
Integer
B$
=
A$(2,5)
Applesoft
B$
= MID$(A$,2,3)
MEMORY
SIZE
32K
48K
$30C
$7F
$BF
$322
$7E
$BE
$340
$7F
$BF
$369
$7E
$BE
HIMEM
32512
-16640
The last difference that I have found
is that all variables should be converted
to
Applesoft integer variables. This is
not always needed, a lot
of
programs
will run without this being done.
Example:
20:6
Table
/I
MICRO
--
The
6502
Journal
Integer
A = B
App/esoft
A% = B%
January,
1980