RosettaCodeData/Task/Terminal-control-Cursor-positioning/Z80-Assembly/terminal-control-cursor-positioning.z80

19 lines
401 B
Z80 Assembly
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
ld hl,&0603 ;6 = ROW, 3 = COLUMN
call &BB75 ;set text cursor according to HL
ld hl,Message
call PrintString
ret ;return to basic
Message:
byte "Hello",0
PrintString:
ld a,(hl) ;read a byte from the string
or a ;check equality to zero
ret z ;if equal to zero, we're done
call &BB5A ;print accumulator as an ascii char to screen
inc hl ;next char
jr PrintString