Sharp MZ-700 Series Owner's Manual page 95

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.8.3 PEEK
Format
Function
Example
PEEK
(ad)
PEEK@ (ad)
ad
Address in decimal or hexadecimal notation (0 to 65535 or $0000 to
$ F F F F )
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
($D000).
The following program displays data stored in the area from 40960 ($A000) to
40975 ($A00F).
1 0
F O R
A D =
4 0 9 6 0
T O
4 0 9 7 5
2 0
9
P E E K
( A D )
3 0
N E X T
A D
2 . 8 . 4
U S R
(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 R E T ^ c c ) .
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-

Advertisement

Table of Contents
loading

Table of Contents