Skip to content
/ o65 Public

Reference documentation for the o65 file format

Notifications You must be signed in to change notification settings

fachat/o65

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

o65 file format

This is the reference documentation for the o65 file format.

The o65 fileformat provides portable way for using relocatable 6502 binaries. It can hold object files or executables, and features segments for uninitialized data, initialized data and text, as well as (uninitialized) zeropage. Block loading can be used and when there is no late-binding (which is possible) no side-storage is needed.

Example code

In the file libloader.a65 is a sample loader for the o65 file format in 6502 assembler. It is taken from the OS/A65 lib6502 code. It does not use the simple file format (as described by mode.11), but computes the relocation differences for each segment separately. What it does, however, is late binding of the OSA2KERNEL and lib6502 variables, as well as looking for the main exported label to start the program.

A simpler version (without undefined references and without late binding) comes with the xa assembler and you can find it in loader.a65. It also has a sample C64 binding.

The code is not cleared from debug statements and lacks comments. Wear your hard hat.

Distribution

The file format extension o65 for a 6502 relocatable file format is copyrighted by me. It may be used by systems and applications without restriction, as long as the files named with this extension obey the definitions stated in this document.

Changes

Changes in v1.3.1 are clarifications in the description of the relocation table.

Proposed Changes

Proposed version 1.4

These are the changes that I propse for 1.4. The goal is to keep compatibilty of older files with newer loaders, but not necessarily vice versa.

  • add support for the MEGA65 / C64 CPU 4510, if it is not already covered by the 65ce02.
    Discuss issue on github

  • add support for 32 bit relocation table entries.
    Discuss issue on github

  • add support for 2s-complement undefined relocation entries
    Discuss issue on github

  • add support to note for direct stack access (like LDA $0100,X)
    Discuss issue on github

Proposed version "NG"

Due to some requests to support other CPUs and "larger" systems, I have made an attempt to define a new, "v2" version of the o65 file format. It is far from complete, and open for discussion.

Historic versions

version 1.2

The change is that the undefined reference relocation entry for high-byte relocation has changed.

version 1.1

The change is that the undefined reference relocation entry for high-byte relocation has changed.

Motivation for git

I’ve moved to the git repo for maintaining the o65 file format, so that changes to the format can be more easily identified (using git diff) and discussions can be had in the git issues.

About

Reference documentation for the o65 file format

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages