Arakula / f9dasm

6800/6801/6809/6309 Disassembler
GNU General Public License v2.0
64 stars 29 forks source link

Avoid use of label for constants #25

Open Wawavoun opened 11 months ago

Wawavoun commented 11 months ago

Hi,

I try to disassemble some 6809 code with f9dasm.

Actually when I have for exemple "LDA #0000" (in fact in opcode of course) f9dasm disassemble this as "LDA M0000" and create a line "M000 EQU $0000". This works but create a lot of labels which are, for me, very disturbing.

I found that put a CONST instruction in the info file at the address of the operand #0000 solve the problem... for this specific instruction ! I have to do that each time #0000 is used in the code... And same for all the others constant values used everywhere...

Is there a better approach to do that and avoid these kind of labels ?

Thanks and regards. Philippe

btb commented 1 week ago

I think this is pretty much the normal expected usage. Instead of using 'const' everywhere you can also customize the label so that frequently-used constants have a friendly name, for example 'label 0000 NULL' and then only use 'const' when that label still doesn't make sense.