I'm working my way through 'How to Write ZX Spectrum Games' by Jonathan Cauldwell, and I have tried this snippet of code in Spin 0.7S and 0.7Q with the same results. The code assembles fine, then when I try and run with a Randomize USR 24576 it I get a BASIC error 'Integer Out of Range'. It assembles fine with Pasmo, and I can run the .tap file created by Pasmo without problem.

Even though its very old in the tooth now, I like the integrated nature of Spin (and I'm secretly hoping @ZXDunny might update it one day) I'm using Windows 10.

I can't help you with this one but I would have an general advice. Remember that Spin is unfortunately a bit buggy It's really a pity as it without bugs it would be really, really great and now it's just good

This is where I get confused because Jonathan's documentation (and AGD) say X when they mean Y (the vertical axis) and Y when they mean X (the horizontal axis). Both ways work as long as the vertical axis is RSTd first followed the horizontal axis. I think that's why Jonathan uses them that was round, because we say X,Y and the ROM print uses the vertical cord first.

So as long as you mean Y when you say X, and X when you say Y, or whichever way you want X to be, Y can be X or X can be Y.

I don’t think it’s the most logical approach in the long run, though. Restart at $10 is just a special case, and I don’t think it’s beneficial for a novice to think of the print coordinates as X and Y. Ideally, you should reserve these to refer to actual pixel coordinates, and stick to thinking “column, row” for anything print-related.

In my simplest (and fastest) printout routines, I don’t even bother with columns and rows—just use the attribute area of the display file directly. (Although, converting back and forth is trivial.)

And yes, each assembler has its own set of quirks. Some are quirkier than others.

0 x

Every man should plant a tree, build a house, and write a ZX Spectrum game.

Both ways work as long as the vertical axis is RSTd first followed the horizontal axis. I think that's why Jonathan uses them that was round, because we say X,Y and the ROM print uses the vertical cord first.

That's fine!

Oh and it's probably best to use brackets when seeing things like this:
ld hl,21+15*256

I don’t think it’s the most logical approach in the long run, though. Restart at $10 is just a special case

I've often wondered* how feasible it would be for a complete beginner's guide to asm to not use ROM routines at all. It's easy enough to draw a char, but moving it around becomes tricky as you'd need a yx2cell routine that brings forth the intimidating display file layout far too early. Perhaps it could just be included with a note 'just CALL this routine to do this, don't worry about understanding it yet'. Then you could move onto sprites more fluidly. In fact I would have understood that more than I did the magic RST 16 at the time! (Not saying this applies to you Peter).