This chapter describes the simple binary output module which can be selected with the -Fbin option.

Legal
=====

This module is written in 2002-2023 by Volker Barthelmann and Frank Wille and is covered by the vasm copyright without modifications.

Additional options for this module
==================================

-apple-bin
     Writes an Apple DOS 3.3 binary file header preceding the output file, which consists of a 16-bit start/load address and a 16-bit file length in little-endian order.

-atari-com
     Writes an Atari DOS COM header preceding the output file. It has a standard header (0xFFFF), which is followed by any number of sections. Each section starts with two little-endian words defining the address of the first and last byte in memory.

-cbm-prg
     Writes a Commodore PRG header preceding the output file, which consists of two bytes in little-endian order, defining the load address of the program.

-coco-ml
     Writes a Tandy Color Computer machine language file, which has a header with load address and length for each section and is terminated by a trailer with the execution address.

-dragon-bin
     Writes a Dragon DOS header preceding the output file, where the file type is set to $02 for binary. The load address is taken from the first section's start address. This will also be the execute-address, when not specified otherwise. Refer to option -exec.

-exec=<symbol>
     Use the given symbol <symbol> as entry point of the program, for those output format headers which support it. Otherwise this option will be silently ignored. Omitting this option will usually define the execution address to be the same as the load address.

-foenix-pgx
     Writes a simple, single-segment format for the 65816-based Foenix computers. The header defines the program's load address, which is also the start address.

-foenix-pgz
     Write a multi-segment format for the 65816-based Foenix computers. The format is derived from binary format used by Western Design Center's C compiler. Every segment is stored with load address and size, and there is also a start address defined.

-oric-mc
     Writes a machine code file header for Oric-1, Oric-Atmos and compatible systems. It includes the file type and name, as well as the first and last address of the program to load. Note, that the name defaults to the output file name, limited to 15 characters. A ".tap" extension will be removed automatically.

-oric-mcx
     Same as -oric-mc, but sets the auto-execute flag in the header.

General
=======

This output module outputs the contents of all sections as simple binary data, by default without any header or additional information. When there are multiple sections, they must not overlap. Gaps between sections are filled with zero bytes, when not using a special header format, like Atari COM. Undefined  symbols are not allowed.

Known Problems
==============

Some known problems of this module at the moment:

  - None.

Error Messages
==============

This module has the following error messages:

  - 3001: sections must not overlap

  - 3007: undefined symbol <%s>

  - 3010: section <%s>: alignment padding (%lu) not a multiple of %lu at 0x%llx