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

16 lines
175 B
Z80 Assembly
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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