I uploaded the ud6502 (urbite disassembler for 6502) disassembler control file and resulting assembly listing file generated using the latest control file. In addition to defining symbols, ud6502 allows both line and block comments to be defined. The idea is that the control file is iteratively refined until the resulting disassembly morphs into a fully readable source with comments and directives that can then be reassembled. With that said, Iām not 100% certain that my 6502 source format is correct.
This 1990 vintage project was never completely finished, so the control file syntax is a bit rough and the output format is non-standard. In spite of that it is quite useful as an iterative tool. The labels in the control file have the following characteristics.
- Any label that is not defined in the control file (automatically generated) has a trailing underscore
- Automatically generated labels are prefixed with a single letter specifying the type of access (absolute, relative, zero page, subroutine, etc). This gives some insight into how the particular location is referenced.
- Labels defined in the control file currently need to have an access type definition that matches code usage or they wonāt be found - the same label must be defined for each type of access. As a result, duplicate labels will be included in the listing once for each definition. A good example of this is the RESET_ENT label, which is accessed as absolute data in the reset vector location but as an absolute jump address in the code. This needs to be fixed.
I will add some usage info to the beginning of control file when I get a chance. This has always been used only by me, so the instructions were in my head or the source code.
ud6502 is written in C and I had to make some mods so it would compile to run under Win 7. In doing so I was reminded how ugly the code is. Rewriting it will be my first real python project. Iāll upload the executable if you think it will be a useful for this project. But youād disown me if I released the hacky ugliness that is 26 year old C code