skoolkid / skoolkit

A suite of tools for creating disassemblies of ZX Spectrum games.

Home Page:https://skoolkit.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore a branch/subroutine

ZXGuesser opened this issue · comments

Is there a way to indicate in a control file that a jump/call should be ignored entirely? That is, not go down that branch at all when generating the skool file.
The code in question is part of a relocated routine which pages out the ROM I'm disassembling and calls into the system ROM. Skoolkit creates confusing labels and references at those locations in the ROM code.

If you want to prevent the operand of a JP/CALL instruction from being converted to a label or being hyperlinked in the HTML output, you can use the @keep directive. Have you tried that?

yeah @keep prevents it from being hyperlinked at the call end of things, what I want is to prevent it adding references at the other end. I can suppress the generation of a label with a blank @Label but it still generates a "Used by the routine at" which I don't want to disable globally. I just wondered if there was a clean way to not generate any of it.

Well this is embarassing, I've migrated to skoolkit 7.0 today which makes the references disappear entirely when doing a blank label. The old @nolabel left them behind

Ah, yes, in 7.0 a blank @label will remove an entry point marker, and sna2skool.py processes @label directives while reading a control file. Glad to hear it paid to upgrade!

I've just generated my disassembly in version 8.1 and I have a similar issue again. It's adding a "used by the routines at" message to my first system variable because two routines copy a stub of code to that location (the printer buffer) and jump to it. Is there some way to suppress that?

Does @label= no longer work as it did before, or do you want a label defined now while also suppressing the "used by" comment?

In any case, defining a description for the system variable (with a D directive) will suppress the "used by" comment (so long as you're not forcing "used by" comments with ListRefs=2).

Yeah to have a label but not the used by in this case. Having looked I am forcing ListRefs=2 in my ini file, doh. I can't now remember why I needed to do that!

I might look into enhancing the @refs directive (which will be new in 8.2) so that it can specify referrers to remove as well as add. That would enable you to suppress the "used by" comments even with ListRefs=2.

Made the enhancement to the @refs directive in 212af0e. It will be in 8.2 (due for release some time this month).