section "home/copy.asm", rom0 memcpy:: inc b inc c jr .check .loop ld a, [hli] ld [de], a inc de .check dec c jr nz, .loop dec b jr nz, .loop ret memcpy_double:: call swap_hl_de inc b inc c jr .check .loop ld a, [de] inc de ld [hli], a ld [hli], a .check dec c jr nz, .loop dec b jr nz, .loop jp swap_hl_de memset:: inc b inc c jr .check .loop ld [hli], a .check dec c jr nz, .loop dec b jr nz, .loop ret