Viper 2.08 User's Guide Page 37

  • Download
  • Add to my manuals
  • Print
  • Page
    / 53
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 36
VIP
TINY
BASIC
MACHI$TE
LANGUAGE
SUBROUTINE
by
Andrew
A.
Modla
SeveraL vlP
computer
hobbyists have
expressed
a desj,re
to
call
nachine language
prograns
from
TINY
BASIC.
Although
hooks to
machi.ne
language
programs
were not desigred
into
TINY
BASIC due
to
space
limitationsr
there
is
a
way to
execute machine
language
prograns.
The
technique
fakes
a
new statement
tree and
when
executed by BASIC,
call-s
the machine
language
program.
Statements
have
the
following
internal
formatr
Binary
line
No.
i
!
a
a
Length
of
Statement
!
Statement
;
i
type
code
!
D
End
of
Statement
2
The
machine language
program
resides in the source
statement area.
To
eonstruct
a machine language
progratn,
do the
following steps:
f
)
Clear
the
statement
area
by tlrying
NEW.
Z)
Enter
the
following
two BASIC
statements:
1
G0r010
2
REM
3)
Holding down
Key E
enter
the VIP
operating
system
by
turning
on
the RUN
switch.
You will
be
modifying
memory
as
follows:
S
S
ourc
e
i
tatement
!
ADDRESS
ffi
L2T3
L2T4
LZI|
to
1232
1233
L234
1zFF
DATA
1300
fhis is
the
new
free
memory
address
ED
l,ine
2
statement
length
Cll
Machine language
statement
tlpe
4E
PrintabLe
Character E
(fiffer)
0E
Causes
inner
interpreter
to
enter
machine
language
Your
machine
language
program
starts
here
0D End of statement
code
The
machine
language
program
must end with DO 03 08
99
which
cannot
extend. beyond.
location 12FE.
This
means
you
have
L99
decinal bytes
available for
your
machine
language
subroutine.
00
and 0D
cannot
be
used
in
your
ML
program.
To
load
00
into
D
use
9t
(cnr
1).
ll)
Holding down the
baekspace key
on
your
ASCII
keyboard,
turn
on
the
run
switch.
This
proeedure
prevents
the
loss
of
your
BASIC
prograrn.
Add
the
following
line
r
3
REltrRN
Your
BASIC
program
begins with
line
10.
You
call the
machine
language
program
with
a
GOSUB 2.
2
,
OB/O9 ,'3'?
Page view 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 52 53

Comments to this Manuals

No comments