5.8.44. INCBIN directive

The INCBIN directive includes a file within the file being assembled. The file is included as it is, without being assembled.

Syntax

The syntax of INCBIN is:

INCBIN filename

where:

filename

is the name of the file to be included in the assembly.The assembler accepts pathnames in either UNIX or MS-DOS format.

Usage

You can use INCBIN to include executable files, literals, or any arbitrary data. The contents of the file are added to the current AOF area, byte for byte, without being interpreted in any way. Assembly continues at the line following the INCBIN directive.

By default the assembler searches the current place for included files. See GET or INCLUDE directive for information on the current place. Use the -i assembler command-line option to add directories to the search path. File names and directory names must not contain spaces.

Example

		AREA 		Example, CODE, READONLY
		INCBIN 		file1.dat						; includes file1 if it
										; exists in the 
										; current place.
		INCBIN 		c:\project\file2.txt						; includes file2
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential