summaryrefslogtreecommitdiff
path: root/home/names.asm
blob: 7ce57675b03bd0210f6d0535cee5b8101e534aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
INCLUDE "constants.asm"

if DEBUG
SECTION "GetNthString", ROM0[$3732]
else
SECTION "GetNthString", ROM0[$36F6]
endc

GetNthString::
; Return the address of the ath string starting from hl.
	and a
	ret z
	push bc
	ld b, a
	ld c, "@"
.readChar:
	ld a, [hli]
	cp c
	jr nz, .readChar
	dec b
	jr nz, .readChar
	pop bc
	ret