I've added quite a lot of improvements and bug fixes in the latest version:
- Uses 'return_1', 'return_2' etc as label names for jumps / branches to an RTS instruction. (Also for 8080)
- Comments can be 'aligned' ie. specified to output before or after a label, before or after a line of output, or inline.
- Adds "; ALWAYS branch" comment on a branch instruction (if the flag state is known to be correct with no labels between the flag state being set and the branch instruction).
- Constants can now have their own comment (with Align.BEFORE_LINE, INLINE, AFTER_LINE).
- Constants can have a format: Format.HEX, DECIMAL, BINARY, PICTURE_BINARY, CHAR, STRING, or DEFAULT.
So e.g. "last_letter = 'Z'" is now possible. - When registers are altered in a known way, e.g. LDY#0 followed by other instructions then INY, we comment the INY with "; Y=1" where known (i.e. no labels in between).
- Added stats, e.g.
Code:
; Stats:; Total size (Code + Data) = 16384 bytes; Code = 9990 bytes (61%); Data = 6394 bytes (39%);; Number of instructions = 4981; Number of data bytes = 5093 bytes; Number of data words = 60 bytes; Number of string bytes = 1241 bytes; Number of strings = 170
- Tables of byte or word data values are now better aligned, with each column finding its own ideal width.
- Support for string expressions added. e.g. to produce 'EQUS STR$~(page)'
- Better error reporting when a byte is reclassified.
- Better sorting of constants (tab stops fixed; uses a case insensitive natural sort).
- code_ptr() now has an optional label name.
- A new label maker hook function, now with a single argument which is an object that both stores all the data and provides helper functions for common operations. The old style signature is still supported but considered deprecated.
- Added labels for Acorn's memory mapped hardware addresses.
- Bytes/words/immediate mode expressions can be signed integers (e.g. for ENVELOPE parameters) using sint().
- Command line option added '--output <filename>' to output the result to a file rather than stdout.
- Don't bother to output the simplest case of 'constant==value' asserts, to avoid the excess clutter.
Fixes: - Fix for outputting multiple identical comments at the same address.
- Fixes for outputting references (some were missing).
- Fix for cycle counting output (for one particular type of instruction).
- Better text classification (doesn't split unnecessarily at an expression).
- Fixes for the state tracking code, so we track better the values of flags and registers.
- Fixes for string literals and character literals.
- OSWRSC is now correctly defined as only available on the B+ and Master, not the regular BBC Micro.
- The 'pydis_start' label now always appears first even when there are multiple labels at that address.
Testing: - More test examples added, including a skeleton MOS disassembly, Plan B game, Starship Command game, and Lisp ROM.
- Updated testing process.
Statistics: Posted by TobyLobster — Sat Mar 22, 2025 1:49 pm