indigodarkwolf / box16

A fork of the official X16 emulator, converted to C++20 and with a bunch of features tweaked and added.
MIT License
42 stars 19 forks source link

Labels with bank notion #69

Open FlightControl-User opened 1 year ago

FlightControl-User commented 1 year ago

Would it be possible to have the symbols file recognize also the "bank" as an indicator of the label?

In my case, i'm having several routines that start at address A000, but in different banks. It would be great if the symbols table could have an indication of the bank attached to the label.

Kickc and Kick assembler generate a symbols file that contains C:ADDR al statements.

image

It would be great if box16 would recognize the C: syntax, but also an extension, which could be optionally given:

image

The 03 would indicate that the stage_logic routine is located in bank 3, and the label would only chosen if bank 3 is the current bank.

makes sense?

Sven

indigodarkwolf commented 1 year ago

Since those are VICE label format entries, I'd say that if you wanted to place the bank before the colon, we'd need to use a character like 'B' to denote that it's a bank instead of a device ID (VICE emulates attached disk drives, which can be assigned IDs 8, 9, 10, or 11).

I'd suggest, instead, just expanding the address side of the colon to 24 bits when you want to specify a specific bank.