fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

AitchMerge pull request #243 from NickCondron/remove-asmf9241ee

master
772 B38 linesraw
1    # To be inserted at 0x80005530
2    .include "../../Globals.s"
3    .include "../../m-ex/Header.s"
4
5    #############################################
6    .set ID, 31
7    .set LoopCount, 30
8    .set Name, 29
9
10    backup
11
12    # Get ID
13    mr ID, r3
14    # Get Names
15    mr Name, r4
16    # Init Loop Count
17    li LoopCount, 0
18
19SearchStringTable_Loop:
20    # Check if we are up to the correct name
21    cmpw ID, LoopCount
22    beq SearchStringTable_Exit
23    # Get string length
24    mr r3, Name
25    branchl r12, strlen
26    # Add to current name pointer
27    add Name, Name, r3
28    addi Name, Name, 1
29    # Inc Loop Count
30    addi LoopCount, LoopCount, 1
31    b SearchStringTable_Loop
32
33SearchStringTable_Exit:
34    mr r3, Name
35    restore
36    blr
37
38###################################