Giter Club home page Giter Club logo

merlin-utils's Introduction

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, ENT

  • VER: only allows OMF version 2.
  • 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).

merlin-utils's People

Contributors

ksherlock avatar

Stargazers

 avatar

Watchers

 avatar  avatar

merlin-utils's Issues

lkv 0 and multiple saves

there is a comment in there merlin manual that the absolute linker will resolve references across files (overlays, etc). this is not currently supported (one pass vs two pass)

DDB support

generate 2 relocation records to byte swap value.

ORG and ERR

Need to verify Merlin's behavior is matched. (Currently ERR not supported).

General rules:

  • ERR \ and DS \ processed in the order they appear in the relocation table.
  • Default ORG is $0
  • ORG reset to $0 after SAV
  • For LKV 1,2,3, ORG value is placed in the OMF header.

  • LKV 0: constraint checking always in effect.
  • LKV 1: constraint checking only occurs if ORG explicitly set (even if set to $0)
  • LKV 2: no constraint checking.
  • LKV 3: no constraint checking

EXD support

check if external label is constant <= 255

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.