diff options
| author | Rangi <remy.oukaour+rangi@gmail.com> | 2018-06-01 01:08:22 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi@gmail.com> | 2018-06-01 01:08:22 -0400 |
| commit | 26646f96eafb177b81c2d80311e5d21508eef008 (patch) | |
| tree | 93c0585b5188a26e9ec642d8d89737cd6b5767a8 /home | |
| parent | 1f764d96c4ee5f09ac784d506f1b53e315dccdf5 (diff) | |
Some landmark name routines
Diffstat (limited to 'home')
| -rw-r--r-- | home/names.asm | 19 |
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 |
