Adventures with assemblers

By | October 18, 2010

pasmo is grateSince SkoolKit 1.0 was released, I have touted it as a tool for creating ASM versions of the Skool Disassemblies, but have neglected to mention which assemblers (if any) will work with the ASM files that SkoolKit generates. Until now, that is. No longer do you have to stumble around the internet looking for assemblers that will give you a working version of Skool Daze from skool_daze.asm (or, indeed, a working version of Back to Skool from back_to_skool.asm). I’ve done that for you, you lazy basts.

For the impatient, the short answer is: use pasmo. It’s what I’ve always used, it’s simple to use, and it just works.

If pasmo is not your bag, however, then SjASMPlus works wells too. The only slightly awkward thing about SjASMPlus is that it doesn’t seem possible to feed it a plain ASM file and get a binary file out the other end. Instead you have to create a separate source file that INCLUDEs skool_daze.asm or back_to_skool.asm, and contains a SAVEBIN directive to save a binary file.

The third and final option is z80asm, the assembler that comes with z88dk. The two slightly awkward things about using z80asm are that (a) the plain versions of skool_daze.asm and back_to_skool.asm must be modified slightly first, and (b) the ORG address must be explicitly given on the z80asm command line (the ORG directive in the ASM file seems to be ignored).

For further details of these three assemblers and example usages, see the new documentation on supported assemblers. Also, don’t forget to grab the latest version (1.3.1) of SkoolKit.

In case you were wondering, I didn’t stop at these three assemblers, but they were the only three I found that worked with an acceptable minimum level of effort. I also looked at crasm and tpasm, but they seem unable to cope with DEF{B,M,S,W} directives, which rules them out. z80asm (not the one that comes with z88dk) doesn’t seem to like label arithmetic (such as DEFB LABEL%256). And sjasm gives a cryptic C++ error message every time I run it (on Debian squeeze).

So there it is. If you have been successfully using SkoolKit with an assembler other than pasmo, SjASMPlus, or z80asm (of z88dk), let me know, and I’ll mention it in the documentation.

4 thoughts on “Adventures with assemblers

  1. ChromaBurst

    Pyskool is still going strong, great effort! A couple of questions regarding the reverse engineering of Skool Daze. 1) Did you ever worry that Microsphere would contact you with a desist order 2) Have you spoken with David Reidy or Keith Warrington concerning the code(!) 3) Have you had any experiences with IDA Pro (


  2. admin Post author

    1) The thought that Microsphere might notice and want me to stop publishing the Skool Disassemblies has crossed my mind, but I think the chances of either happening are slim, so I can’t say I’ve really worried about it.

    2) I haven’t spoken with David Reidy or Keith Warrington, no. I don’t have any contact details for them – if I did I’d tell them about Pyskool and the disassemblies, and see if they could clear up some of the questions raised in the trivia sections!

    3) No, this is the first I’ve heard of IDA Pro.

    4) Yes, I know you didn’t have a fourth question, but I was just wondering if you ever got started on the Stonkers disassembly? 🙂

  3. ChromaBurst

    4) Yes, I did – thanks to your helpful insights! I’ve found IDA Pro invaluable with its graphing/mapping capability (WinGraph32) – my Z80 assembly is rusty so this got me back in the swing! The Stonkers disassembly is currently work in progress. I’d like to use Skoolkit (if possible) when the diss is more complete. In the meantime I’d love to know if anyone has examples of setting conditional breakpoints in ZX Spin – the WOS posts are so cryptic…

  4. admin Post author

    Good to hear that the Stonkers disassembly is in progress! If you’d like to use SkoolKit eventually, I’d say the sooner you start using it, the better, because getting all the annotations into a ‘skool’ file later on will be harder and more time-consuming. In fact, I’d recommend using SkoolKit to create ‘stonkers.skool’ as soon as you’ve identified the boundaries between routines and data blocks. Then ‘stonkers.skool’ can be the definitive ‘source code’ for the disassembly as it evolves.

    If that makes no sense, I can go into more detail about how the Skool Disassemblies evolved (with SkoolKit in the background).

Comments are closed.