GNU Info

Info Node: (nasm.info)Section 6.1

(nasm.info)Section 6.1


Next: Section 6.1.1 Prev: Chapter 6 Up: Chapter 6
Enter node , (file) or (file)node

6.1. `bin': Flat-Form Binary Output
===================================

   The `bin' format does not produce object files: it generates nothing
in the output file except the code you wrote. Such `pure binary' files
are used by MS-DOS: `.COM' executables and `.SYS' device drivers are
pure binary files. Pure binary output is also useful for operating
system and boot loader development.

   The `bin' format supports multiple section names. For details of how
nasm handles sections in the `bin' format, see *Note Section 6.1.3::.

   Using the `bin' format puts NASM by default into 16-bit mode (see
*Note Section 5.1::). In order to use `bin' to write 32-bit code such as
an OS kernel, you need to explicitly issue the `BITS 32' directive.

   `bin' has no default output file name extension: instead, it leaves
your file name as it is once the original extension has been removed.
Thus, the default is for NASM to assemble `binprog.asm' into a binary
file called `binprog'.

Section 6.1.1
`ORG': Binary File Program Origin
Section 6.1.2
`bin' Extensions to the `SECTION' Directive
Section 6.1.3
`Multisection' support for the BIN format.
Section 6.1.4
Map files

automatically generated by info2www version 1.2.2.9