z80asm File formats (v01)

This document describes the object and libary formats used by z80asm up to version 1.2.10.

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] 'Z80RMF01' (file signature and version)
8 word ORG Address
10 long File pointer to Module Name, always the last section
14 long File pointer to Expressions, may be -1
18 long File pointer to Module Names, may be -1
22 long File pointer to External Names, may be -1
26 long File pointer to Machine Code, may be -1
30 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
...