The GPC data section
Store compact read-only byte data and retrieve it with the official dbyte, dchar, and dword accessors.
Overview
The data section holds static byte values at the beginning of virtual address space. Its contents cannot be changed while the script runs.
dbyte reads one unsigned byte, dchar interprets a byte as signed, and dword reads a multi-byte word from a zero-based data index.
Key facts
- Data is declared before runtime blocks.
- Data entries are byte-oriented and read-only at runtime.
- Index calculations should be bounded before retrieval.
GPC syntax examples
Examples are intentionally small. Replace identifiers only with values documented for your target.
data (20, 42, 35, 255)
int value;
main {
value = dbyte(3);
}Functions, commands, and terms
Names below are catalog entries, not guessed signatures. Open the official sources for current parameter and return-value details.
datadeclarationDeclares a parenthesized sequence of static byte values.
dbytefunctionReturns an unsigned 8-bit value from a zero-based data index.
dcharfunctionReturns a data byte interpreted as a signed 8-bit value.
dwordfunctionReturns a word assembled from data starting at the selected index.
Common mistakes
Writing to data at runtime.
Reading past the declared data.
Assuming data values behave like signed runtime variables.
Official GPC sources
Use these first-party references to confirm exact syntax and runtime behavior for your installed firmware and Studio version.
Related GPC references
Understand signed 16-bit runtime values, global storage, local scope, initialization, and safe array indexing.
LanguageGPC script structure and syntaxHow a Cronus Zen .gpc file is organized, from compile-time declarations through init, main, combos, and functions.
ToolingCompiler errors and GPC debuggingDiagnose placement, identifier, type-range, combo-timing, and target-version problems systematically in Zen Studio.