- Name:
-
table
- Syntax:
-
TABLE {location},(data,data...)
Location - is an optional constant which specifies where to begin storing the data in the program memory table. If no location is specified, storage continues from where it last left off. If no location was initially specified, storage begins at 0.
Data - are byte constants (0-255) which will be stored in the table.
- Description:
-
Specify values to be loaded to the internal lookup table when the program is downloaded.
M2 parts have 512 locations (0-511). Other parts have 256 (0-255).
This is not an instruction, but a method of pre-loading the microcontroller's program memory lookup table. The data can then be read via the readtable command (the data is fixed, cannot be altered apart from at program download). The tablecopy command may be used to copy the table data to RAM in sections.
18M2 Firmware
Please note the 'table' command is only supported for 18M2 firmware D.x (PICAXE chips labelled 18M2+) and is not available for use with 18M2 firmware 2.x (PICAXE chips labelled 18M2).
The PICAXE compiler will syntax check code for an 18M2 as correct when using the 'table' command but will generate an error when an attempt is made to download into an 18M2 with firmware 2.x.