Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid use of label for constants #25

Open
Wawavoun opened this issue Oct 22, 2023 · 1 comment
Open

Avoid use of label for constants #25

Wawavoun opened this issue Oct 22, 2023 · 1 comment

Comments

@Wawavoun
Copy link

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
Copy link

btb commented Sep 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants