EasyManua.ls Logo

Alpha VS 100 - Page 20

Alpha VS 100
40 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
METHOD
2:
USR call
You
can
use
the
VS
text to
speech
program
directly
from
BASIC
via a
USR
call.
From
DOS
type
VS48
for
a 48K
system
(and
press
ENTER)
or
VS32
for
a
32K
system
This
loads
the
text
to
speech
program
in
high
memory
it
protects
xtself
CEDOOH
to
FFFFH
for 48K,
ADOOH to
BFFFH
for 32K,
6D00H
to
7FFFH
for
16K
tape
systems).
You
don't need
any
pokes
as
with
PRINT*.
Instead
a
DEFUSR
is
required:
DEFUSR0=&HED00
or
DEFUSRO=
-4864
for
a
48K
system
DEFUSR0=&HAD00
or
DEFUSR0=-21248
for
a 32K
system
NOTE: It
doesn't
have
to
be
USRO .
In the
examples
below,
"USR" is
used
instead
of
"USRO*',
as
they are
identical.
Tape
systems:
Nondisk
BASIC
(Level II)
has
no
DEFUSR
command,
instead
the
following
line
must
be
executed:
10 POKE
16526,0
:
POKE
16527,109
Note:
The
POKES
don't
have
to
be
line
10,
they
just
have
to
be
executed
before
the
first
USR
call
.
Once
the
USR is
defined
as
above,
a
simple
USR
call,
such
as
B£-USR("any
string")
will
produce
speech.
Here is
an
example:
10
DEFUSR0=&HED00
'for
48K.
Use
DEFUSR=&HAD00
for
32K.
'
for
Level II
16K
use
POKE
16526,0
:
POKE
16527,109
20 CLS:
CLEAR
500 'clear
some
space
for
input
string
30
LINE
INPUT"Type
something
!";
AS
40
B£=USR<A£)
'
speaks
it
50
GOTO
30
When
line
50 is
executed,
the
content
of A3
is
spoken; A3
remains
unchanged.
(BS
contains
the
list
of
the
phoneme
codes
just
spoken.
Each
byte
is the
ASCII
character
for
the
phoneme
codes 64
to
127) .
In
the
direct
mode,
a
speech
command
could be
:
BS=USR("Good
morning")
Page
19