17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

PEEK Function<br />

Purpose:<br />

To read from a specified memory location.<br />

Syntax:<br />

PEEK(a)<br />

Comments:<br />

Returns the byte (decimal integer within the range of 0 to 255) read from the specified memory<br />

location a. a must be within the range of 0 to 65535.<br />

The DEF SEG statement last executed determines the absolute address that will be peeked into.<br />

PEEK is the complementary function to the POKE statement.<br />

Examples:<br />

10 A=PEEK(&H5A00)<br />

The value of the byte, stored in user-assigned hex offset memory location 5A00 (23040 decimal),<br />

will be stored in the variable A.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/PEEK.html28/03/2004 21.29.22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!