No assembler required

By | May 2, 2016

skool2bin2snaSkoolKit 5.2 has been released. In keeping with the principle of least surprise, copies of 5.2 are available from the download page , the Python Package Index, and the Ubuntu PPA.

So, as the poet once asked, what is new in 5.2? Well, there is the bin2sna.py command, which converts a binary file into a Z80 snapshot. This, coupled with skool2bin.py‘s new ability to write to standard output, could lead to some streamlining of some workflows in one’s day-to-day reverse engineering. For example, let’s say (you think) you’ve fixed a bug in a game, and you’ve added the corresponding @bfix directives to your skool file. In days gone by, you might have done something like this to test your fix:

$ skool2asm.py -f 2 game.skool > game.asm
$ pasmo game.asm game.bin
$ bin2tap.py game.bin
$ fuse game.tap

But now, in SkoolKit 5.2, you have the option of doing something like this:

$ skool2bin.py -b game.skool - | bin2sna.py - game.z80
$ fuse game.z80

I know which approach I prefer. And, by the way, bin2tap.py can now read a binary file from standard input as well, so if you’d rather still load a TAP file than a Z80 snapshot into your emulator in the last step, you also have that choice.

That pretty much covers the main new features. But there is also the #N macro, which is useful for rendering numbers in either decimal or hexadecimal format depending on whether the --hex option is used with skool2asm.py or skool2html.py. And there is also the @rfix directive (non-block version), which rounds out the family of mode-related ASM directives.

Details of the other changes not significant enough to merit a mention in this article can be found, as always, in the changelog. When you’re finished there, consider taking the SkoolKit 5.2 challenge: throw away your assembler for a bit and see if you can live with just skool2bin.py and bin2sna.py!

Leave a Reply

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