From | To | Information |
0 | 16383 #3FFF | ROM - all the code and info needed to edit and run Sinclair Basic |
16384 #4000 | 22527 # | Screen pixel data, each row of 32 bytes decides whether each pixel on a screen line is INK or PAPER (foreground or background colour). The sequence is a bit fiddly for the human brain, the first 32 bytes represents the top line from left to right, the next 32 bytes represents the 8th line from the top, then the 16th, 24th, 32nd, 40th, 48th, 56th and then .... the 2nd line from the top, 9th, 17th .... told you it was fiddly. Then when it's completed the top 64 rows (a 3rd of the screen), it starts again with the 65th row and fills the 2nd third of the screen, then it does the erm.... third third. No really, that's how it is. There's an animation below showing screen data being slowly loaded from tape that might make it a bit clearer: Or not |
22528 # | 23295 # | Screen colour (Attribute) data - each byte decides the INK colour, PAPER colour, BRIGHTNESS and FLASH setting for an 8 x 8 pixel square, alternatively a character cell. The first 32 bytes set the colour for the top row, the next 32 for the 2nd row and so on in a nice ordely fashion for all 24 rows. |
#5B00 | #5BFF | From
here to available memory you have the area used by the ROM to manage
your Basic environment. You write your own data here, but only if you
are willing to go "offroad" - run machine code, switch off standard
interrupts and you have no plans to use the ROM without restarting your
computer. Printer buffer, used to send data to (by design) the ZX Printer. Other printers were available. |
#5C00 | #5CBF | System variables, used by the ROM to keep track of what's going on with your Basic program, the screen settings and oher things. Set the wrong value here from Basic and you can get some interesting crashes. |
#5CC0 | #5CCA | A little bit more reserved space |
#5CCB | 32767 #7FFF | Free space on your 16K machine. Actually that's not entirely true, 7F58 upwards (or the last 167 bytes) would be the small space reserved called RAMTOP, which can be moved to say 30000 by using the command CLEAR 30000. |
32768 #8000 | 65536 #FFFF | The additional 32K free on a 48K machine, again by default the last few bytes reserved for RAMTOP by default but can be moved using the CLEAR command |
![]() | This is loading byte by byte through the screen memory, first row 0, then row 8, then rows 16, 24 ,32 40, 48, 56 then it moves on to row 1, 9, 17 until the first 3rd of the screen is filled. Then the next two thirds, then the colour info. If you're using Basic Print, or someone else's code to move things around screen, this screen layout is just an SEP (Somebody Else's Problem), but if you want to write machine code to move something pixel by pixel then you'll need to get to grips with it. So it helps to see exactly how the screen loads, byte by byte, through the 6k of pixel data then the 768 bytes of ATTR (colour) data. Under the assembly tips we can include some of the many different approaches to updating the screen. |