You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
548 B
54 lines
548 B
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
|
|
|