title: "Peek" description: TRSE built-in method (from IDE help)
Peek
Systems: MOS6502, Z80, Z180, M6809
Parameters: a,b
Peek( [address], [byte] );
- [address] -
- [byte] -
Description
Peeks the specified address in parameter 1 + parameter 2 and returns the value.
Example 1
border := peek(^$D020, 0); // Red border color<
Example 2
some_val := peek(my_array, 3); // Set 3rd element of array to 10.
// Same as:
some_val := my_array[3];
Example 3
for i:=0 to b do
screenmemory[i] := peek(my_data, i);