RosettaCodeData/Task/Deepcopy/Z80-Assembly/deepcopy-2.z80

11 lines
271 B
Z80 Assembly
Raw Permalink Normal View History

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