RosettaCodeData/Task/Copy-a-string/Z80-Assembly/copy-a-string-4.z80

16 lines
175 B
Z80 Assembly

ld hl,myString
ld c,(hl)
ld b,0
inc c
ld de,buffer
ldir ;copies from (HL) to (DE), BC times.
ret
myString:
byte 5 ;len("Hello")
byte "Hello"
buffer:
byte 0
byte 0,0,0,0,0