Skip to content

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


CreateAddressTable

Systems: X16,C64, MEGA65, PLUS4,C128, VIC20, PET, NES, OK64, ATARI2600, APPLEII, SNES, ORIC, BBCM, ACORN, ATARI800
Parameters: a,n,b,b


CreateAddressTable( [address], [number], [byte], [byte] );

  • [address] - Memory address or integer array where to store address table
  • [number] - The starting value
  • [byte] - Increment value
  • [byte] - Total number of entries in address table

Description

Creates an address table in memory or in an integer array. Typically used to create a screen or color address table. Can be used with AddressTable or data read directly from memory or array.

Example

program MyProgram; var addr: array[25] of integer; // will store the address table in this array i: byte; @define scrn $0400 begin definescreen(); clearscreen(32, ^@scrn); CreateAddressTable( addr, @scrn, 40, 25 ); // create an table of starting 25 row addresses on the screen screenmemory := AddressTable( addr, 39, 24 ); // use the table to find the 24th row (starts at 0) and 39th column screenmemory[0] := 0; // draw an @ character at this screen address loop(); end.