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

9 lines
263 B
Z80 Assembly

ld hl,MyString
ld (PointerVariable),hl
MyString: ;assembler equates this label to a memory location at compile time
byte "Hello",0
PointerVariable:
word 0 ;placeholder for the address of the above string, gets written to by the code above.