-
Notifications
You must be signed in to change notification settings - Fork 75
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
Nameless temporary lables should be banned from s2disasm #32
Comments
The only time I can see a nameless temporary label being useful at all, is for only for |
Another problem is that if for some reason you want to port code over to ASM68K, it'll be more troublesome than just replacing periods with at signs. For my purposes, I'd rather give everything a name, especially when the point of these projects is to document pre-existing code. If someone has trouble coming up with a name, someone else can take up the task. |
Agreed. I think that on a first pass, getting rid of all ---, --, ++, and +++ labels would already be a large improvement. For reference:
|
And in actuality, ASM68K already supports dots as the local label symbol (which, IMO, should be what we're using for disassemblies anyway, but that's a whole other topic) Also I agree with what Flamewing says |
Working towards [sonicretro#32](sonicretro#32); thankfully, it's close enough to Sonic 1's code that I can take names from the S1 disassembly. Some comments have been changed accordingly. I also fixed a few typos and inconsistent tab character uses, as well as converted all uses of "branch" to "jump" to better reflect Z80 assembly nomenclature.
As a proof-of-concept of sorts, I took the liberty of removing every nameless temporary label from the sound driver, which you can see here. I'm thinking of just putting this in a pull request alongside the rest of the game, but I wonder if this sort of thing would be a pain for you all to look over. |
Making a separate pull request for the sound driver would already be a huge help, especially with regards to reviewing it.. |
I guess I'll do something like that... I got ahead of myself. |
Working towards [#32](#32); thankfully, it's close enough to Sonic 1's code that I can take names from the S1 disassembly. Some comments have been changed accordingly. I also fixed a few typos and inconsistent tab character uses, as well as converted all uses of "branch" to "jump" to better reflect Z80 assembly nomenclature.
I am going to make the claim that nameless temporary labels are harmful for every single usage this disassembly may have. These are the +, - and / labels, that are littered around the disassembly, and make reading and maintaining code a horrible experience. Why?
I knew I went on lengths about my severe gripes about the nameless temporaries and my problem with them, but having been tasked to maintain code littered with these devils has truly made me hate their use. Although we can't stop people from actually using it, packaging it in as the de-facto style to do temporary labels within disassemblies is absolutely unreasonable and I really think they should be outright banned from s2disasm and any other Sonic Retro disassemblies. I would even be happier with nonsense like .a, .b, .1, .derp, .asdasdsaasd, because it still retains many of the real world usage benefits mentioned above. Nameless temporary labels fail at every level to make any sense for anything but laziness of the user, and I don't think that should be the direction the disassemblies should take for sheer convenience for the submitter. Please discuss below
The text was updated successfully, but these errors were encountered: