Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
data [2019/05/07 08:05] – created neilsdata [2019/05/07 08:05] neils
Line 3: Line 3:
 Syntax: Syntax:
  
- data varname[] = <value1>, <value2>, <value3>, ...+    data varname[] = <value1>, <value2>, <value3>, ...
  
 Or in combination with the [[INCBIN|INCBIN]] directive: Or in combination with the [[INCBIN|INCBIN]] directive:
  
-    data varname[] = incbin "path/to/binary_file"+    data varname![] = incbin "path/to/binary_file"
  
 The ''DATA'' directive allocates a one-dimensional static array in memory filled with pre-initialized data //in compile time//. The array can be used as a regular array in runtime. Example: The ''DATA'' directive allocates a one-dimensional static array in memory filled with pre-initialized data //in compile time//. The array can be used as a regular array in runtime. Example: