Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
main:
|
||||
la $a0,String1
|
||||
la $a1,UserRam
|
||||
|
||||
jal strcpy
|
||||
nop
|
||||
|
||||
la $a0,String2
|
||||
jal strcpy
|
||||
nop
|
||||
|
||||
la $a0,UserRam
|
||||
jal PrintString
|
||||
nop
|
||||
|
||||
shutdown:
|
||||
nop ;normally not needed, but Project 64 will throw an exception if I don't have a nop here.
|
||||
b shutdown ;loop forever
|
||||
nop
|
||||
strcpy:
|
||||
LBU t0,(a0)
|
||||
nop
|
||||
beqz t0,strcpy_done
|
||||
SB t0,(a1) ;branch delay slot - this is actually executed BEFORE the beqz!
|
||||
addiu a0,a0,1
|
||||
b strcpy
|
||||
addiu a1,a1,1 ;branch delay slot
|
||||
strcpy_done:
|
||||
jr ra
|
||||
nop
|
||||
|
||||
String1:
|
||||
.ascii "abcdefghijk"
|
||||
.byte 0
|
||||
.align 4
|
||||
String2:
|
||||
.ascii "lmnopqrstuvwxyz"
|
||||
.byte 0
|
||||
.align 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue