; Get the length of the string pointed to by HL in BC
.global strlen
strlen:
ld bc, 0
strlen_loop:
ld a, (hl)
cp 0
ret z
inc bc
inc hl
jp strlen_loop
; Copies the string in HL to DE
.global strcpy
strcpy:
push hl
call strlen
pop hl
ldir
ret