utilities for the Merlin 8/16+ assembler
Go to file
2020-06-03 10:57:05 -04:00
afp@b440a35d29 WIP 2019-12-09 13:02:15 -05:00
.gitignore ignore 2019-12-08 13:55:49 -05:00
.gitmodules WIP 2019-12-09 13:02:15 -05:00
.travis.yml support for Merlin command files. 2019-12-14 19:01:12 -05:00
link.cpp use ENT opcode to print symbol table. 2020-06-03 10:57:05 -04:00
link.h EXD warning support. 2020-06-02 23:33:34 -04:00
main.cpp support for Merlin command files. 2019-12-14 19:01:12 -05:00
Makefile support for Merlin command files. 2019-12-14 19:01:12 -05:00
mapped_file.cpp initial WIP 2019-12-08 13:55:33 -05:00
mapped_file.h initial WIP 2019-12-08 13:55:33 -05:00
omf.cpp support for linker 3, generate OMF object files. 2020-05-17 17:01:03 -04:00
omf.h ALI and DS support 2019-12-15 13:03:43 -05:00
ops.h support for Merlin command files. 2019-12-14 19:01:12 -05:00
README.md update readme 2019-12-22 15:00:22 -05:00
rel.h initial WIP 2019-12-08 13:55:33 -05:00
script.h support for Merlin command files. 2019-12-14 19:01:12 -05:00
script.re2c * is only a comment character if first character. 2019-12-16 23:12:53 -05:00
set_file_type.cpp it compiles... 2019-12-09 19:45:45 -05:00
unique_resource.h initial WIP 2019-12-08 13:55:33 -05:00

merlin-utils

utilities for the Merlin 8/16+ assembler

An OMF linker for Merlin 8/16+ REL files. Why? ummm....

merlin-link [-D key=value] [-X] [-C] [-o outfile] files....

  • -X: inhibit expressload segment
  • -C: inhibit super relocation records
  • -D: define an absolute label. value can use $, 0x, or % prefix.
  • -S: treat input file as a linker command file
  • -o: specify output file. default is omf.out
  • -v: be verbose

If there is one input file and it ends with .S (case insensitive), it is treated as a linker command file.

Linker Command File

The following opcodes are supported:

END,DAT, PFX, TYP, ADR, ORG, KND, ALI, DS, LKV, VER, LNK, IMP, SAV, KBD, POS, LEN, EQ, EQU, =, GEQ, EXT, DO, ELS, FIN

  • VER: only allows OMF version 2.
  • LKV: 0 (binary), 1 (single segment OMF), 2 (multi segment OMF)
  • IMP: (qasm) - import a binary file. Entry name is the file name with non alphanumerics converted to _
  • KBD: won't prompt if label was previously defined (via -D for example)

No operand math is allowed at this time.

Current Status

Usable, if you can find a use for it. Linking Marinetti (after assembling with Merlin 16+) generates an equivalent OMF file. The file is not identical due to differences in relocation records but OMF Analyzer COMPARE considers them identical.

Building

git submodule init
git submodule update
make

Requires a c++17 compiler. (ie, ubuntu bionic or OS X 10.13). Also assumes a little-endian environment :/