RosettaCodeData/Task/Deepcopy/Z80-Assembly/deepcopy-2.z80
2023-07-01 13:44:08 -04:00

10 lines
271 B
Z80 Assembly

LD HL,MyString
LD DE,UserRam
LD BC,MyString_End-MyString ;the difference between these two addresses is the byte count.
LDIR ;essentially C's memcpy()
MyString:
byte "Hello, world!",0
UserRam:
ds 32,0 ;32 bytes of memory initialized to zero.