Download Print this page

Motorola EXORdisk II User Manual page 279

Advertisement

INPUT/OUTPUT FUNCTIONS
25.2 -- Device Dependent I/O Functions
25.2.3.1 Example of console I/O
The following example illustrates the use of the
.KEVIN
and
. DSPLY system functions.
The example initially displays
a message on the console to
p~ompt
the
operator
ro~
input.
The
entered string is then displayed back on the console, but
all characters have been reversed (the last
character
input
is
the
first
chsT'scter
output,
etc. >.
If
only
a
carriage
retu~n
is entered,
MDOS
is
given
control
via
the
system
function
.MDENT.
The
system function .ADBX is used to add
the contents
of
the B accumulator to- the X register.
Both of
these
functions
are
described
in
Chapter
27.
A maximum
st,..ing length of
ten
is
allowed.
The
exam-p
Ie
has
been
assembled with the MDOS equate file.
It
is
assumed
in
this
example
that
the program is
origined above location
$lFFF
since
it
is using
the
~esloent
MDOS
functions.
The
program can either be loaded with the
LOAD
co~mand
or invoked from
the
MOOS
command
interp~eter
directly.
At
the
time
the
program
is
loaded, the stack
pointer
is
automatically
initialized
to
the
last-loaded
program
location.
In this example}
this location is used as
the top of the stack.
I
. /
Page
25-06

Advertisement

loading

This manual is also suitable for:

Exordisk iii