z80asm File formats (v08)

This document describes the object and libary formats used by z80asm versions 2.6.x.

The version changed to 08 to include a user defined ORG address per section.

The object and library files are stored in binary form as a set of contiguous objects, i.e. each section follows the previous one without any end-markers.

The files start with a signature that includes a version number and is verified by the assembler before trying to parse the file.

A set of file pointers at the start of the object file point to the start of each section existing the in the file, or contain 0xFFFFFFFF (-1) if that section does not exist.

The following object types exist in the file:

Object file format

The format of the object file is as follows:

Addr Type Object
0 char[8] 'Z80RMF04' (file signature and version)
8 long File pointer to Module Name, always the last section
12 long File pointer to Expressions, may be -1
16 long File pointer to Module Names, may be -1
20 long File pointer to External Names, may be -1
24 long File pointer to Machine Code, may be -1
28 Expressions
...
Module Names
...
External Names
...
Module Name
Machine Code

Library file format

The library file format is a sequense of object files with additional structures.

Addr Type Object
0 char[8] 'Z80LMF01' (file signature and version)
8 word Object File Block
...