Remix.run Logo
Efficient Basic Coding for the ZX Spectrum (2020)(blog.jafma.net)
47 points by rcarmo 12 hours ago | 11 comments
ZeroConcerns 8 hours ago | parent | next [-]

I'm not exactly sure what's going on with this article and whether it's just the language barrier or something else, but... it doesn't make an awful lot of sense?

'Tricks' like 'not including too many comments' were already well-known from day one of the ZX line (which started around 1980) because, well, you had 1K, 16K or 48K or RAM to work with, so every character counted!

Also, you were painfully aware of the performance of inner/outer loops, because, absolutely, a sub-3 MHz clock speed doesn't leave many other options. Other than to migrate to assembly coding, which was where most serious Sinclair coding took place.

The article is right about one thing, though: the Sinclair BASIC interpreter was a work of minimalist art, as was the hardware. "Sure, let's multiplex the audio-in line with the video sync signal, so we can save a pin on the ULA" is not something that gets a lot of consideration these days...

egypturnash 7 hours ago | parent | next [-]

"You can poke new values into the start-of-program pointer to speed up jumps to the end of the program, and speed up loop execution" is pretty tricky. So's "you can poke new values into another pointer to jump to arbitrary statements within a multi-statement line, and here[1] is a 3d maze program that abuses the heck out of this to become a one-liner".

1: https://spectrumcomputing.co.uk/entry/21001/ZX-Spectrum/1_Li...

Zardoz84 3 hours ago | parent | prev [-]

> 'Tricks' like 'not including too many comments' were already well-known from day one of the ZX line (which started around 1980) because, well, you had 1K, 16K or 48K or RAM to work with, so every character counted!

But that GO TO/GO SUB target position in the code list matters, because does a linear search (so the no use comments, isn't only about wasting RAM), was new for me. And I toyed with a ZX Spectrum as child.

rwmj 7 hours ago | parent | prev | next [-]

This video about how to program the ZX81 efficiently is also fun: https://www.youtube.com/watch?v=WqVfyyZbIvo

notorandit 8 hours ago | parent | prev [-]

HN effect:

Error establishing a database connection

onraglanroad 7 hours ago | parent | next [-]

Rewind the tape, give the head adjustment screw a tiny turn anticlockwise, and hit play again. It'll load fine this time.

anthk an hour ago | parent | next [-]

Or load it over gopher:// with a Spectranet or similar:

https://www.youtube.com/watch?v=TTvrIPzGAFQ

gopher://gopherddit.com

pjmlp 3 hours ago | parent | prev | next [-]

Great point!

ErroneousBosh 6 hours ago | parent | prev [-]

Also maybe sit the database server on something hard like a book or a tray, to allow better airflow underneath it.

jrmg 4 hours ago | parent [-]

Just don’t jostle it when it’s powered on.

Zardoz84 3 hours ago | parent | prev [-]

RESTORE