Hi,
I know i have little chance to get free help in here you all gold diggers but it's worth a try.
So I need some help in assembly coding for MIPS-32.
I need to write 2 "programs":
One that exchanges the values from s0 and s1, for example if s0=4 and s1=3 then the "program" should exchange them so the result would be s0=3 ans s1=4.
This is my try but i think it's to easy to be true.(apparently i needed to use $zero. somwhere)
lw $t0, $s1
lw $t1, $s2
sw $t0, $s2
sw $t1, $s1
The other "program" need to take the absolute value from t0 to put it in t1, so t1 should be a positive umber or zero equal to t0 norm.(apparently i need to use something like bltz reg, addr commands)
It's probably not the best description of what i need to do but i needed to translate it and it wasn't the easiest part, let me know if you can help me please!👍
I know i have little chance to get free help in here you all gold diggers but it's worth a try.
So I need some help in assembly coding for MIPS-32.
I need to write 2 "programs":
One that exchanges the values from s0 and s1, for example if s0=4 and s1=3 then the "program" should exchange them so the result would be s0=3 ans s1=4.
This is my try but i think it's to easy to be true.(apparently i needed to use $zero. somwhere)
lw $t0, $s1
lw $t1, $s2
sw $t0, $s2
sw $t1, $s1
The other "program" need to take the absolute value from t0 to put it in t1, so t1 should be a positive umber or zero equal to t0 norm.(apparently i need to use something like bltz reg, addr commands)
It's probably not the best description of what i need to do but i needed to translate it and it wasn't the easiest part, let me know if you can help me please!👍

