Mark & Recall Template + A Test
Only non-coders can try to answer this (please). What is exactly happening in this template:
j $XXXXXXXX
lui t0 $XXXX
lw t0 $XXXX(t0)
addiu t1 zero $XXXX
addiu t2 zero $XXXX
bne t0 t1 $XXXXXXXX
nop
lui t0 $XXXX
lw t1 $XXXX(t0)
lw t2 $XXXX(t0)
lw t3 $XXXX(t0)
lui t4 $XXXX
sw t1 $XXXX(t4)
sw t2 $XXXX(t4)
sw t3 $XXXX(t4)
bne t0 t2 $XXXXXXXX
nop
lui t0 $XXXX
lw t1 $XXXX(t0)
lw t2 $XXXX(t0)
lw t3 $XXXX(t0)
lui t4 $XXXX
sw t1 $XXXX(t4)
sw t2 $XXXX(t4)
sw t3 $XXXX(t4)
jr ra
I highly dout that any non-coder will get this exaclty right lol.
Re: Mark & Recall Template + A Test
its a template for a joker?
Re: Mark & Recall Template + A Test
yupp joker templete
one like this is already posted
boy your tricky
you think your pretty cool w/ 1337 name
Re: Mark & Recall Template + A Test
Quote:
Originally Posted by
raumulin
yupp joker templete
one like this is already posted
boy your tricky
you think your pretty cool w/ 1337 name
No, I don't. Just a name. So far no one has "passed" my test. BTW Ill do the "Thank" thing to who ever "passes" my test. And raumulin saying it's a joker template dosn't tell me anything on how it works (if that was your "try")
Quote:
Originally Posted by
mexjoker95
its a template for a joker?
Yes, I say it's a Mark & Recall template, but what I'm looking for is a book explanation on each line.
-FBD
Re: Mark & Recall Template + A Test
j $XXXXXXXX ;Jumps to the first address of the routine
lui t0 $XXXX ;Loads first 16 bits of controller address
lw t0 $XXXX(t0) ;Loads last 16 bits of controller address
addiu t1 zero $XXXX ;Loads Mark button value into t1
addiu t2 zero $XXXX ;Loads Recall button value into t2
bne t0 t1 $XXXXXXXX ;Branches to the bne t0 t2, if t0 does not equal t1 (meaning if the desired mark button is not being pressed)
nop ;No Function, if the button is being pressed it allows the following to process.
lui t0 $XXXX ;Loads the first 16 bits of the Coordinates address' into t0
lw t1 $XXXX(t0) ;Loads the value of the first coords usually the x-axis coords into t1, the last 16 bits of the x-axis address
lw t2 $XXXX(t0) ;Loads the value of the second coords usually y-axis coords into t2, the last 16 bits of the y-axis address
lw t3 $XXXX(t0) ;Loads the value of the third coords usually z-axis coords into t3, the last 16 bits of the z-axis address
lui t4 $XXXX ;Loads first 16 bits of the address that will hold the coords values into t4
sw t1 $XXXX(t4) ;Saves the value of x-axis from t1 into the address that will hold the x-axis value.
sw t2 $XXXX(t4) ;Saves the value of y-axis from t2 into the address that will hold the y-axis value.
sw t3 $XXXX(t4) ;Saves the value of z-axis from t3 into the address that will hold the z-axis value.
bne t0 t2 $XXXXXXXX ;Branches to jr ra if Recall button is not being pressed
nop ;The following is just a reverse of the above.
lui t0 $XXXX
lw t1 $XXXX(t0)
lw t2 $XXXX(t0)
lw t3 $XXXX(t0)
lui t4 $XXXX
sw t1 $XXXX(t4)
sw t2 $XXXX(t4)
sw t3 $XXXX(t4)
jr ra
It could be shorter if you load the first 16 bits of the Coords address and Holding address before you branch.
MIP's is pointless........
Re: Mark & Recall Template + A Test
Quote:
Originally Posted by
hell
j $XXXXXXXX ;Jumps to the first address of the routine
lui t0 $XXXX ;Loads first 16 bits of controller address
lw t0 $XXXX(t0) ;Loads last 16 bits of controller address
addiu t1 zero $XXXX ;Loads Mark button value into t1
addiu t2 zero $XXXX ;Loads Recall button value into t2
bne t0 t1 $XXXXXXXX ;Branches to the bne t0 t2, if t0 does not equal t1 (meaning if the desired mark button is not being pressed)
nop ;No Function, if the button is being pressed it allows the following to process.
lui t0 $XXXX ;Loads the first 16 bits of the Coordinates address' into t0
lw t1 $XXXX(t0) ;Loads the value of the first coords usually the x-axis coords into t1, the last 16 bits of the x-axis address
lw t2 $XXXX(t0) ;Loads the value of the second coords usually y-axis coords into t2, the last 16 bits of the y-axis address
lw t3 $XXXX(t0) ;Loads the value of the third coords usually z-axis coords into t3, the last 16 bits of the z-axis address
lui t4 $XXXX ;Loads first 16 bits of the address that will hold the coords values into t4
sw t1 $XXXX(t4) ;Saves the value of x-axis from t1 into the address that will hold the x-axis value.
sw t2 $XXXX(t4) ;Saves the value of y-axis from t2 into the address that will hold the y-axis value.
sw t3 $XXXX(t4) ;Saves the value of z-axis from t3 into the address that will hold the z-axis value.
bne t0 t2 $XXXXXXXX ;Branches to jr ra if Recall button is not being pressed
nop ;The following is just a reverse of the above.
lui t0 $XXXX
lw t1 $XXXX(t0)
lw t2 $XXXX(t0)
lw t3 $XXXX(t0)
lui t4 $XXXX
sw t1 $XXXX(t4)
sw t2 $XXXX(t4)
sw t3 $XXXX(t4)
jr ra
It could be shorter if you load the first 16 bits of the Coords address and Holding address before you branch.
MIP's is pointless........
Yes, good job.
Re: Mark & Recall Template + A Test
I already know this but Nice template man ;)