Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
41
Task/String-matching/MIPS-Assembly/string-matching-2.mips
Normal file
41
Task/String-matching/MIPS-Assembly/string-matching-2.mips
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
main:
|
||||
la $a0,MyString
|
||||
la $a1,Test1 ;this code was recompiled 5 times, testing a different string each time.
|
||||
jal InString
|
||||
nop
|
||||
|
||||
jal Monitor
|
||||
nop
|
||||
|
||||
|
||||
shutdown:
|
||||
nop ;Project 64 will detect an infinite loop and close the ROM if I don't have this nop here.
|
||||
b shutdown
|
||||
nop
|
||||
|
||||
|
||||
MyString: ;this was loaded into $a0
|
||||
.ascii "abcdefghijklmnopqrstuvwxyz"
|
||||
.byte 0
|
||||
.align 4
|
||||
;each of these was loaded into $a1 individually for testing
|
||||
Test1:
|
||||
.ascii "abc" ;InString returned 0
|
||||
.byte 0
|
||||
.align 4
|
||||
Test2:
|
||||
.ascii "xyz" ;InString returned 0x17 (decimal 23)
|
||||
.byte 0
|
||||
.align 4
|
||||
Test3:
|
||||
.ascii "def" ;InString returned 3
|
||||
.byte 0
|
||||
.align 4
|
||||
Test4:
|
||||
.ascii "z",0 ;InString returned 0x19 (decimal 25)
|
||||
.byte 0
|
||||
.align 4
|
||||
Test5:
|
||||
.ascii "1",0 ;InString returned 0x1A (decimal 26)
|
||||
.byte 0
|
||||
.align 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue