Z80 Assembly 74: Displaying a Full Screen Image (Loading Graphics Data)

The Full Screen Data Load To display a custom image on the Spectrum (e.g., a title screen or game level background), you must copy two large blocks of data from your program’s memory into the Spectrum’s Display File RAM. The Two Blocks: Pixel Data: 6144 bytes of raw $256 \times 192$ pixel information (starts at `4000H′). Attribute Data: 768 bytes of color and flash information (starts at `5800H′). Routine 1: Loading the Pixel Data The Pixel Data is 6144 bytes long. Since the data layout is non-linear (Part 73), you generally copy the data block-by-block. However, if your source data is already arranged in the Spectrum’s non-linear format, you can use the fastest method: `LDIR′. ...

September 28, 2025

Z80 Assembly 21: Setting Up for a Target System (Screen and Memory)

The Shift to System Programming Up until now, our code has been generic. System programming requires us to stop using symbolic addresses (like PRINT_STRING_ADDR) and start using absolute hardware addresses specific to our target machine. Key System-Specific Areas We Must Identify: Program Load Address (ORG): Where our code starts. Screen Memory: The RAM address where display data is stored. I/O Ports: The addresses for keyboard, sound, and display chips. Setting the Origin (ORG) and Stack (SP) Before execution begins, the assembler must know where in memory the program will be placed. ...

September 27, 2025