Skip to content

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


ToPointer

Systems: MOS6502
Parameters: b,b


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;