Atari 400 Basic Reference Manual page 73

Vintage computer
Hide thumbs Also See for 400:
Table of Contents

Advertisement

2.
Now add the BASIC language part of your program starting at line 1080 in-
cluding the USR function that calls the machine language subroutine. (See
example below.)
3. Count the total number of hex codes to be entered and enter this number on
line 1000 when requested. If
another
number is already entered,
simply
replace it.
4
.
Run the program and enter the hexadecimal
codes
of the machine level
subroutine
pressing
1Di1J
after each
entry.
After
the last
entry, type
DONE and press
IDiiJ.
5. Now the DATA line (1500) displays
on
the screen.
It
will
not be entered into
the program until the
cursor
is moved to the DATA line and
fiiiim
is
pressed.
6.
Add
a program line 5 GOTO 1000 to bypass the hexcode loader
(or
delete the
hexcode loader through line
260).
Now save
the completed
program by
using CSA
VE
or
SAVE.
It
is important to do this before executing the part
of
the program containing the
USR calL
A mistake in
a
machine language
routine may cause
the
system to crash.
If the
system
does
hang
up,
press
(ftii@l;li!+ii
.
If the system doesn 't respond, turn power off and on again,
reload
the
program, and correct
it.
Note:
This method
only
works
with
relocatable machine language routines.
The following two sample programs can each be entered
into
the
Hexcode
Loader program. The
first
program prints
NOTHING IS
MOVING while the
machine program changes the
colors.
The second
sample
program displays a
BASIC
graphics
design, then
changes
colors.
1980 GRAPHICS 1+16
1090 FOR I=1 TO 6
1100 PRIHT
#6j
11
t10t.hir.s is
t"II0
1
v
1
in::t!
11
1110
PF~INT
#6;
11
t~OTHH~
IS
t10UH~G!
II
1120 PRIHT #6.:
11
not.hins
ls mo
1 ...
•ins!
11
1130 PRIHT #6.:
11
NOTHit·~
IS
t101...!H~G!
II
1140 NE:)::T I
1150 Q=USR( ADR<
E$
)+
1 )
1160 FOR I=1 TO 25:
E =<T
I
=
GOTO 1150
After entering this program, check that line 1000 reads:
1000 CLR:BYTES
=
21
Type RUN
liimmJ.
Advanced Programming
Techniques
65

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

800

Table of Contents