Howdy, fellers! Anyone want to go one an intellectual adventure with a bro?
Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already. The base address of arrays A and B are in registers $s4 and $s5, respectively.
1) f = k – A[4];
2) B[8] = A[i - j];
3) f = A[B[i]] + 3;
Thanks. Here's a handsome lady for your time! :)
>>53910288
sounds like someone's homework
you'll have more luck on stack overflow
>>53910288
Do your own homework.
>>53910332
>>53910363
I'm honestly not looking for answers. Assistance would be neat. If I post what I have so far, would it be swell if I was told I was on the right track or not?
Hell, I'll even take some sort of guide or something that explains this shit more clear than my professor. I really want to learn this myself. I can't find anything that does, so far.
Just compile to MIPS assembly.
>>53910288
this should help :^)fug:
sll $t8, $ra, 2
jalr $t8
b fug
>use gcc cross compiler for mips
>gcc -S
I'm trying to avoid using anything to do it for me. Here's what I have, so far.
1)
lw $t0, 16($s4)
sub $s3, $s2, $t0
2)
sub $t0, $s0, $s1
sll $t0, $t0, 2
add $t0, $s4, $t0
lw $t1, 32($s5)
add $t1, $zero, $t0
3)
add $t0, $s0, $s5
sll $t0, $t0, 2
add $t1, $t0, $s4
sll $t1, $t1, 2
addi $s3, $t1, 3
>>53911000
I've made it quite clear that I am not looking for someone to do it for me. Just wanting to see if I'm on the right track.
>>53910288
>handsome lady
>ratchet with tattoo
Someone has to have some kind of input.
What a disgusting thread.
5 seconds into mips-pro, and disasm
>>53910288
she is adorable ^^
>>53911264
pleb
>>53911264
tats are ok dipshit
>>53910640
>using the smiley with a carat nose
>>53916058
>carat
You sure are dumb :^)