EasyManua.ls Logo

Sharp MZ-700 - Page 95

Sharp MZ-700
213 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...
2.8.3 PEEK
I Format I
Function
Example
PEEK (ad)
PEEK@ (ad)
ad
.....
Address in decimal
or
hexadecimal
notation
(0
to
65535
or
$0000
to
$FFFF)
This function returns the
contents
of
the specified address
as
a decimal number from
0 to 255. Use
the
PEEK@ format to PEEK a user RAM area following 53248
($DOOO).
The following program displays data stored in
the
area from
40960
($AOOO)
to
40975 ($AOOF).
10
FOR
AD=
40960
TO
40975
20
9
PEEK
CAD)
30
NEXT
AD
2.8.4
USR
..................................................................
~
..........
(Abbreviated format:
U.)
Format
Function
USR (ad)
USR (ad, x$)
ad
.....
Address (decimal
or
4-digit hexadecimal)
x$
....
. String data
This
is
a special function which transfers control
to
a machine language program
which starts
at
the specified address.
As
with CALL ad, so control
is
returned
to
the
statement
following the USR function
if
the machine language program includes a
return instruction
(RET
or
RET '-' cc).
When x$ is specified, the starting address
of
the memory area containing x$
is
loaded
into
the DE register, then the length
of
x$ is loaded
into
the B register before
the
machine language program
is
called. This makes it possible for a BASIC program
to pass string data to a machine language program.
--------------------
----
-----------------------------------------------93

Other manuals for Sharp MZ-700

Related product manuals