Misleading title! There is no color on a ZX81, except for black, white and grey… More on this in the next post.
Our first ZX81 program will draw a black square at the top left of the screen. Open your editor, and create a new file – call it zx81001.asm. Now type the following lines:
ld HL, (D_FILE) ld a, 128 inc HL ld (HL), a RET
Save your file, and compile it with pasmo:
pasmo -v zx81001.asm zx81001.p
The -v option stands for verbose and will give you additional information when things go wrong.
Now, execute your program with the emulator:
If all goes well, you should see a black square at the top left of your screen!