Reliable technical documentation for how these instructions are decoded is a
little thin on the ground online, so some of this implementation is still
speculative.
This solves the --no-collapse problem by letting you force
Absolute mode on an instruction by instruction bases, which is
usually going to be what you want anyway.
This introduces a new IR node for mutable-during-assembly ranges.
In the common case, where offset and range are hardcoded or missing,
it continues with the older, more efficient behavior.
Needed a little work to merge cleanly, but no real surprises.
This isn't a complete solution yet, but it will work for the
basic case. It should allow expressions and gracefully handle
non-hardcoded cases (while still efficiently handling hardcoded
ones).
An .outfile directive lets sources suggest default filenames.
Also, .include, .require, .incbin, and .charmapbin are relative
to their _source file_ as opposed the _directory you called Ophis
from_, like it really should have always been.
Full PEP8 compliance. Also, booleans have been inserted where
they make sense (introduced in 2.3!) and I haven't knowingly
added anything that will break 2.3 compatibility.
At this point the code really doesn't look like it was written
ten years ago. Hooray!
As long as we're not gratuitously breaking compatibility, this
cleanup isn't available in 2.3 and it's not like ophis runs long
enough for this to be an issue anyway.
Ophis was originally written for Python 2.1, and it kind of shows.
Python 2.3 introduced booleans and optparse, so there's no reason
to not use new-style classes.
This is a full optparse-based parser for all the options we want
to have in Ophis 2.0, but the pass-disablers aren't working yet.
This also doesn't handle positional arguments the way we hope
to eventually; that will come later.
optparse is deprecated in 2.7, but its replacement isn't available
in any previous version of Python, so we avoid it so as to not
gratuitously break compatibility on older machines.
It would be nice to at least stay usable on stock Leopard Macs (2.5).
Includes the py2exe script, the version of the MSVC++ runtime Python 2.7
needs, and an NSIS script to assemble the installables out of the checkout
tree.
NB: Even though MakeNSIS is multiplatform, it should only be run on
Windows, since otherwise the linebreaks in the README won't be
Notepad-friendly.