Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
archive.go
archive_test.go
constant.go
debug.go
doc.go
file.go
read.go
reference.go
symbol.go
write.go

README.md

DCPU Archive

This package defines the archive file format.

An archive contains all compiled binary code for a given package, along with debug symbols and source context.

These files are generated by the assembler and used by the linker to construct the final binary program which can be run on a DCPU emulator.

Additional uses for these archives cover profiling and debugging and auto-completion in code editors. Along with source file context for each instruction (filename, line- and column numbers), it can define debugger break-points and other instruciton annotations.

Exported symbols are stored in a symbol table. These cover functions, global labels and constants.

Encoding

  • An archive file is gzip compressed.
  • All multi-byte data is encoded as Little Endian.
  • Strings are UTF-8 encoded, written out as raw bytes. They are preceeded by a 16-bit unsigned integer, defining the string length.