Viper 2.08 User's Guide Page 39

  • Download
  • Add to my manuals
  • Print
  • Page
    / 53
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 38
But
what
lf
you
don't have
the BASIC board?
In
that case
you
will
nscd
to
progran
in
either 1802
machine
language
or
CIIIP-8
probably.
In
fact'
that
brlnge
ne
to the
point
I would
llke
to
make. There
arc
tont
of BASIC
programs
out
"there"
and only a
few klLos
of
CHIP-8
prograns
(we're
doing
our best
to
change
that).
.Because
BASIC
ls fairly easy
to
read
and.
understand,
even if
you
don't
have
the board,
you
should try
to
pick
apart
a
few
BASIC
programs.
One thlng that
may
surprise
you
is how easily
a
BASIC
listing
tranel,ates
into
CHIP-8|
At
first
this
may
seem to be awkward,
eepecially
if
CHfp-8
j.s
new
to
your
Here
are
a
few
suggestions
to
help.
BASIC
-
PRINT
CHIP-8-
Printing
numbers
is not
difficult but
words
are
another thing.
Those of
you
with PIPS FOR VIPS
Vol-
I
can use
Messager
to translate
PRINT
statements
to
CHIP-8.
Otherrlrrise
just
leave
the
PRINT lines
out
or
simplify them
graphically
using DXYIII instructj-ons.
BASIC
-
Less
apd
greater
thal
cHrP-B-
VF:-:-33"tli'iil:*i::J:
;::';u:tt";
Ti.rTnSl
J33l*r""
(x:Y).
BASIC
-
Subscripted
variables
(e.g.
A(N))
CHIP-8-
Define
a
memory.area.to
hold
the aruay
of
nr:mbers
ti:ii:ll:i:
$i'I,ffi}'
"#
3?l:ixii*H?i;?ii:,
instruction
which
sets
Yi
=
A(N)
Insert
Y/
=
VX into
A(N)
*tiil-toSS
instruction,
BASIC
-
MuLtiply and divide
CHIP-8-
\rlpite-
sirbroutines
in CHIP-8
or
machine
language
for
these
functions.
l^lith
these
four suggestions
and
your
VIP
manual,
you
should be
able
to convert
PRIME
IIME to CHIP-8. One
problem
still
remains,
however'
When
you
PRINT
something
in BASIC, everything
else
scrol-ls
gP
to
naEe room for the
new line.
That
is not.so
easy
to
simulate
in CHIP-8,
so
next
month I suppose I
have
my work
cut-
out
for
me!
Good
luckl
PROJECfS
r
1) Convert
PRIIUE
IIME to
CHIP-8.
il
Speed
up
the
BASIC
LISTING
by
using TVON, TVOFF
instructions.
After
all
primes
have been calculated,
print
out
a
neatly formatted
list
from
the
amay
(A(N)
instead
of one
at
a time.
z,08/09
,
39
Page view 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 52 53

Comments to this Manuals

No comments