[HN Gopher] Efficient Basic Coding for the ZX Spectrum
       ___________________________________________________________________
        
       Efficient Basic Coding for the ZX Spectrum
        
       Author : rcarmo
       Score  : 33 points
       Date   : 2025-12-14 12:04 UTC (7 hours ago)
        
 (HTM) web link (blog.jafma.net)
 (TXT) w3m dump (blog.jafma.net)
        
       | ZeroConcerns wrote:
       | 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 wrote:
         | "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...
        
       | notorandit wrote:
       | HN effect:
       | 
       | Error establishing a database connection
        
         | onraglanroad wrote:
         | Rewind the tape, give the head adjustment screw a tiny turn
         | anticlockwise, and hit play again. It'll load fine this time.
        
           | ErroneousBosh wrote:
           | Also maybe sit the database server on something hard like a
           | book or a tray, to allow better airflow underneath it.
        
             | jrmg wrote:
             | Just don't jostle it when it's powered on.
        
       | rwmj wrote:
       | This video about how to program the ZX81 efficiently is also fun:
       | https://www.youtube.com/watch?v=WqVfyyZbIvo
        
       ___________________________________________________________________
       (page generated 2025-12-14 20:00 UTC)