Open utterances-bot opened 4 months ago
This Hello World is not quite complete if you want it to be bulletproof. First you need to initialise channel 2 for output, which is the screen channel. The simplest way to do this is to CALL CLS (clear screen) in the ROM, where CLS EQU $0DAF. Additionally, the z80 Return instructions can be conditional, so you can simply write RET Z on line 7 instead of JR Z, END_PROGRAM
@Tertullian85 Thank you for that optimization 🙂
TIL: ‘Hello, world’ in Z80 assembly language on the ZX Spectrum - jamieonkeys
I finally had a go at creating a machine code program and running it on a Speccy.
https://www.jamieonkeys.dev/posts/til-z80-asm-hello-world/