Skip to content

title: "toPointer" description: TRSE built-in method (from IDE help)


toPointer

Systems: PX86, M1ARM
Parameters: i,i


pointer = ToPointer( [ hi byte ], [ lo byte ] );

  • [ hi byte ] - high byte of address. Example: "$04" is the high byte of the screen address $0400.
  • [ lo byte ] - low byte of address. Example: "$00" is the low byte of the screen address $0400.

Description

Creates a pointer of two bytes.

Example

var bankAdd:byte=$40; zp: pointer; begin // zp points to some bank 0 screen position zp:=$0440; // zp points to the same screen position in bank 1 zp:=ToPointer( hi(zp) + bankAdd, lo(zp) ); end;