Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lhu a3,0x0(s4) #Load current char
- lui s6,0x894 #Load data location
- ori s6,s6,0xBEC0 #Two instruction because MIPS
- nop #No special reason why this is here
- move v1,s6 #Not sure why we're doing this also
- addiu v1,v1,0x10 #Again not sure
- pos_0894BE78: #This is the main loop
- lhu v0,0x0(v1) #Load char from data table
- beq v0,zero,pos_0894BE98 #If at end of data table, jump to end
- nop #Need nop for beq instruction
- bnel v0,a3,pos_0894BE78 #Go back if no match (after doing next instruction)
- addiu v1,v1,0x4 #Increment addr
- lbu v0,0x3(v1) #(with a match) Load spacing value
- mtc1 v0,f21 #Copy spacing value to coprocessor
- cvt.s.w f21,f21 #Convert spacing value to single-precision floating point
- pos_0894BE98: #These are the ending steps
- add.s f25,f25,f21 #Increment x offset (using spacing value)
- li v0,0x0 #Reset registers
- li v1,0x0
- li a3,0x0
- li s6,0x0
- j pos_08833A88 #Jump back into game program
- addiu s4,s4,0x2 #Move pointer to next character (MIPS executes the next instruction after jumps unless a bnel branch is taken)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement