Hello World

Here is a standard Z80 Hello World, there are actually many, many ways you can pull this stunt off, but this one appears to be the most concise and least labour intensive. It basically utilises the routines already in the ROM rather than you have to develop your own Z80 print routines (these are the CALL statements)

 

org $8000
call 3435
ld a,2
call 5633
LD HL, String
LD B, 14
Loop: LD A, (HL)
INC HL
RST 16
DJNZ Loop
RET
String: db 16,3,'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd','!'

posted on Oct 20, 2018


Copyright 2018. All rights reserved.

Posted October 20, 2018 by sal in category "Z80