CALL PEEKS
This page was last modified 10:30, 18 May 2020 by Mars2000you. Based on work by Gdx.

Contents

Effect

Reads several consecutive bytes in the RAM or VRAM, converts each byte to a half-width character and stores all the characters in a string variable.

Syntax

CALL PEEKS ([@]<Address>,<Length>,<StringVariable>)

Parameters

@ needs to be put before <address> to specify VRAM instead of RAM. Without this parameter, the value will be read from main RAM if the address is lower than 8000h.

<Address> is the address to start the reading. To avoid error messages, decimal numbers need to be used for addresses higher than FFFFh (65535).

If <Address> is negative the binary complement is used. This means CALL PEEKS(-1)=CALL PEEKS(65536-1)=CALL PEEKS(65535).

If you specify a RAM address higher than 65534, specifications of the mapped RAM are used.

65535 + (number of available segments) × 16384 is the upper limit. If you specify a value exceeding this value, you get an "Out of memory" error.

<Length> is the number of bytes to read. It can vary between 0 and 255. If you get a error message 'Out of string space' , think to reserve more space for the strings with the CLEAR instruction!

<StringVariable> is the variable in which you want to put the characters corresponding to the concerned bytes.

Examples

CALL PEEKS (&HC000,12,A$): PRINT A$
CALL PEEKS (@&H7EFD,9,A$): PRINT A$

Related to

CALL BLOCK, CALL PEEK, CALL PEEKW, CALL POKE, CALL POKES, CALL POKEW

Compatibility

DM-System2 BASIC