1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-09-13 02:24:34 +00:00
Files
Andy McFadden ec50f48f95 Disregard operand address, part 1
SourceGen puts a lot of effort into connecting address operands to
internal offsets and external symbols.  Sometimes this is undesirable.
For example, a BIT or conditional branch instruction is sometimes used
as a dummy when there are multiple entry points that vary only in a
status flag or register value.  The address in the BIT or branch is
either irrelevant or never actually referenced, so auto-generating a
label for it is annoying.

Having a way to tell the disassembler to disregard an address operand,
so that it won't generate an auto-label or be included in the list of
cross-references, provides a simple solution to this.

The operand's file offset is determined during the code analysis
pass.  Setting it to -1 makes the operand look like an external address.
If we disable the project/platform symbol lookup for that instruction
as well, we can avoid label generation and cross-references.

We also need to prevent the 65816 data bank fixup code from restoring
it, and the relocation data code from doing its thing.

The flag is implemented as a new "misc flags" table, which holds a
set of bit flags for every file offset.  The "disregard operand address"
flag is set on the opcode byte of instructions.  The flags are expected
to be used infrequently, so they're currently output as a list of
(offset, integer) pairs.

The flag is set in the Edit Instruction Operand dialog, which has a
new checkbox.  The checkbox is disabled for immediate operands.

(issue #174)
2025-07-30 09:16:32 -07:00
..
2025-07-30 09:16:32 -07:00
2021-09-30 21:11:26 -07:00
2021-09-30 21:11:26 -07:00