Specifications

4-26 Programmer’s Guide Sega
Psy-Q Development System
INCBIN
Description Informs the Assembler to draw in and process binary data held in another source file,
before resuming the processing of the current file.
Syntax symbol INCBIN filename[,start,length]
filename is the name of the source file to be processed, including drive and path
identifiers - see Note
1
. Optionally, the filename may be surrounded by quotes,
which will be ignored;
start, length are optional values, allowing selected portions of the specified file to
be included - see Note
2
.
See Also INCLUDE, HEX
Remarks
This directive allows quantities of binary data to be maintained in a separate file
and pulled into the main program at assembly time; typically, such data might be
character movement strings, or location co-ordinates. The Assembler is passed no
information concerning the type and layout of the incoming data. Therefore,
labelling and modifying the INCBINed data are the responsibility by the
programmer.
The /j switch can be used to specify a search path for INCLUDEd files - see
Assembler Options, chapter 3.
Examples Charmove incbin "d:\source\charmov.bin"
Note
1
Since a path name contains backslashes, the text in the operand of an INCBIN
statement may be confused with the usage of text previously defined by an EQUS
directive. To avoid this, a second backslash may be used, or the backslash may be
replaced by a forward slash (solidus).
Thus,
include d:\source\charmov.bin
may be re-written as
include d:\\source\\charmov.bin
or
include d:/source/charmov.bin