summaryrefslogtreecommitdiff
path: root/home/names.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/names.asm')
-rw-r--r--home/names.asm19
1 files changed, 19 insertions, 0 deletions
diff --git a/home/names.asm b/home/names.asm
new file mode 100644
index 0000000..366d795
--- /dev/null
+++ b/home/names.asm
@@ -0,0 +1,19 @@
+INCLUDE "constants.asm"
+
+SECTION "GetNthString", ROM0[$3732]
+
+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