Wednesday, 28 January 2009

Setting up the Development Environment on a Windows PC

When I develop Machine Code games for the Sinclair ZX Spectrum, I use the following Development Tools:

Installing “Spectaculator”

Download and Install “Spectaculator” 30 Day Trial. I cannot recommend this emulator more highly, it is awesome

Installing “Context” Editor

The Editor allows me to write the code with Syntax Highlighting, as well as define events for key presses that assist me in running and testing my programs.

Download the editor (1.6 MB) from andfollow the installation instructions:

Step 1:


Step 2:


And follow the wizard until it has installed

Install “Pasmo” Assembler

Next, download the Assembler from

I use the 0.5.3 version, downloadable as a ZIP from

Once downloaded, Unzip and extract.


Install in a directory of your choice


Configure Context

  1. From the menu choose “Options -> Environment”. A dialog box will appear.
  2. Click the “Execute Keys” tab.
  3. Click the “Add” button, and add an entry for files with a “asm” extension.


Set up the “F9” Functionality.

This will allow the file to be compiled, and a “TAP” file which includes a BASIC loader will be created.


  • Execute: Browse To and Select the Pasmo executable.
  • Start in: %p (File path)
  • Parameters: --tapbas %n %F.tap
    • This will create a ZX Spectrum TAP file with BASIC loader, output to same filename with “TAP” extension.
  • Use short DOS names for Pasmo.
  • Output to compiler window.
  • Scroll to last line for verbose output.

Set up the “F10” functionality

This will execute “Spectaculator” and pass in the compiled filename.


  • Execute: Points to the Spectaculator executable.
  • Start in: %p (File path)
  • Parameters: %p\%F.tap
    • This means Path, and Filename (tap)
  • Use short DOS names for Emulator

Testing the Development Environment

Create the following test program in Context, and save to your project folder as “text.asm”.

org 08000h

ld hl,04000h

ld (hl),%10101010

ld de,04001h

ld bc,17FFh



end 08000h

Press “F9” and the program should assemble.


Press “F10” to execute “Spectaculator” and you should get the following results:


Congratulations! You are now ready to develop Machine Code on your Windows PC!


  1. Nice work. I also find the asm editor in TommyGun is excellent too, and is also easy to point to Pasmo and Spin, not to mention the excellent gfx/tiles/map editor too. :)

    Very Good Post, :D

  2. A fantastic post! I am waiting for more material of this blog.

    Thanks for the efford to communicate the way to create spectrum games on Assembly.


  3. Excellent blog post - very helpful. Also works with ZX32, which is a good free emulator. Might step up to Spectaculator if I get into this some more.

  4. Just found this blog, it looks very promising, keep on the good work!

  5. Great post - really useful. I have a collection of old Input magazines and I've been wanting to try some of the machine code listings in them. This will make it a lot easier and less painful.

    Thank you!

  6. Great post! you have some brilliant contents!POP Displays

  7. Nice and simple introduction!

    I have been coding z80 for CPC but then I decided today to try something on Spectrum.

    I must seek for the tutorials now, or specifics of spectrum gfx coding.

  8. Just wanted to say a massive thank you for this page. Had been using Spin and ran into the inevitable error messages, when using it with Windows 7

    Saw your article and switched over to your editor and PASMO, and it's all working really well.

    Question: Regarding the editor and the way it colours your code, has anyone created a profile called Z80, instead of X86 Assembler eg. so labels etc are colour coded properly ?


  9. Pasmo's new website:

  10. Wow that was super easy to get going cheers!

  11. This got me up and running easier than any other guide I found - thanks!

  12. This comment has been removed by the author.

  13. Useful article, thanks. I was working on to make setup work with ZX Spin, so for those interested in that setup, for me solution was to uncheck "use short DOS names" and use parameters: %p%F.tap . But it might just be me on Windows 10, I wonder if the above setup will still work for ZX Spin

  14. Thanks for this - a nice starter program. I ended up using SublimeText and RealSpectrum but with your code and following the same principles.

  15. Hello Rob, I find your blog very interesting. I found it searching for zx spectrum tutorials, I wanted to contact you directly but I don't find any contact form or email, I love the spectrum demo scene and games and I'm working in a online tv project in which I would love to broadcast content like this. If you would like to create a tutorial in a multimedia format (with voice and video explanations) please contact me.

  16. I have this all up and running but when I run any other small demo code I just get a Bytes: (then the tap name)


    code like this in Jonathan Cauldwells book ...

    ld a,2 ; upper screen
    call 5633 ; open channel
    loop ld de,string ; address of string
    ld bc,eostr-string ; length of string to print
    call 8252 ; print our string
    jp loop ; repeat until screen is full

    string defb '(your name) is cool'
    eostr equ $

    please help!

    1. Did you find a solution to this as I am getting the same

  17. This comment has been removed by the author.

  18. You need to add

    org 08000h

    at the beginning and

    end 08000h

    at the end