Last Modified: 12/31/2020

Inserts data into your ROM that can be read using the Read, ReadInt, and ReadLong commands, as well as the Read(), ReadInt(), and ReadLong&() functions.


Filename String Yes The path to data file.
FileType System Value No Tells the IDE what kind of file is being added. The values are Bin and Txt. If omitted, the system defaults to Bin.


Syntax: DataFile <Filename>, [<FileType>]
    DataFile "\gfx\character1.bnx", Bin


In SecondBASIC v2, the default FileType was Txt. This has been changed since the most common usage for DataFile is to add graphic or other binary data to your project.

If the path to the file is omitted, the path will then become the project's home folder. If you're in Single Document Mode, an unsaved new document will have SecondBASIC Studios installation folder as the project's home folder.

See Also

$IncAsm, $Include, Read, ReadInt, ReadLong, Read(), ReadInt(), ReadLong&()