fadden / 6502bench

A workbench for developing 6502 code
https://6502bench.com
Apache License 2.0
166 stars 33 forks source link

Offset support to Format Address Table #143

Closed grue74 closed 1 year ago

grue74 commented 1 year ago

I have an address table that is offset to a fixed address.

image

It would be beneficial to have the option to add an address to those offsets shown in the screenshot.

In this case, the offset is $9200, and the first entry should become 9200+174 = $9374

I went through this by making labels for offset addresses, assigning them in Edit Data Operand, and using the label as Symbolic Reference. Lots of manual work could be avoided with modification in the Format Address Table tool.

fadden commented 1 year ago

That should be straightforward.

You may be able to work around this with a bit of trickery:

  1. Select the region that is the target of the table and define a new address region, with a starting address of zero. This aligns the addresses with the table offsets.
  2. Format the address table.
  3. Delete the address region.

The Txxx labels are symbolic references, so they'll get adjusted when the addresses change.

This may be awkward to do if the target region overlaps with other parts of the code.

fadden commented 1 year ago

Implementation notes:

fadden commented 1 year ago

Moved to TO DO wiki.