mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-21 06:58:45 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
36
home/copy_name.asm
Normal file
36
home/copy_name.asm
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
CopyName1::
|
||||
; Copies the name from de to wStringBuffer2
|
||||
ld hl, wStringBuffer2
|
||||
|
||||
CopyName2::
|
||||
; Copies the name from de to hl
|
||||
.loop
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
cp "@"
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
CopyStringWithTerminator::
|
||||
; in: hl = source, de = destination, c = length (non-zero)
|
||||
; out: clobbers all but b
|
||||
dec c
|
||||
.copy_loop
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
cp "@"
|
||||
jr z, .clear_loop
|
||||
dec c
|
||||
jr nz, .copy_loop
|
||||
ld a, "@"
|
||||
ld [de], a
|
||||
ret
|
||||
|
||||
.clear_loop
|
||||
ld [de], a
|
||||
inc de
|
||||
dec c
|
||||
jr nz, .clear_loop
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue