Surviving the round trip

By | October 13, 2018

ctl-invariance ftwSkoolKit 7.0 has been released. I invite you to visit the download page, the Python Package Index, the Ubuntu PPA, or the Fedora copr repo if you would like to collect a copy.

As you might expect with the initial release in a new series, there are some changes that break compatibility with previous versions. The two main ones are that the ability to generate a control file has moved from sna2skool.py to the new sna2ctl.py command, and that skool2html.py now expects a skool file as its first positional argument, and treats any remaining positional arguments as extra ref files. For details on the other ways that SkoolKit 7 might break your disassembly, and how to fix it, see the migration guide.

But enough of that. What new features does this release bring? Well, again, as with the compatibility-breaking changes, there are two main ones, and they both serve a purpose that has long been dear to my heart: preservability in a control file. It has always irked me that some parts of some skool files are not amenable to such preservation, but with the advent of 7.0 those parts (and those skool files) are thankfully smaller in number.

First of all, the @isub, @ssub, @rsub, @ofix, @bfix and @rfix directives have gained some key new abilities. They can now specify a replacement comment over multiple lines, replace labels, and insert, overwrite and remove instructions. Previously, each of these operations would have required the use of a block directive (e.g. @ssub-begin@ssub-end), which cannot be preserved in a control file.

Second of all, non-entry blocks (i.e. blocks that do not match the format of an entry, such as a header comment) are now preserved verbatim by skool2ctl.py, and are reproduced verbatim (minus any ASM directives) by skool2asm.py. This means that comment blocks appearing between entries in a skool file will now survive a round trip through skool2ctl.py and sna2skool.py, even if they contain ASM block directives.

Third of all, although I said there were only two main new features, there is one more that is relevant to the central theme of preservability in a control file, and so deserves a mention here. Inverted characters – meaning character codes with bit 7 set to indicate the end of a string – can now be stored in and restored from a control file. So, for example, the "o"+$80 in DEFM "Hell","o"+$80 will survive the round trip, instead of degrading to $EF.

And that is it, as far as preservability in a control file is concerned. For details on all the other much less important features – which, I warn you, may have nothing to do with either preservability or control files – take a look at the changelog. Happy migrating!

Leave a Reply

Your email address will not be published. Required fields are marked *