Customize your cookie preferences

We respect your right to privacy. You can choose not to allow some types of cookies. Your cookie preferences will apply across our website.

We use cookies on our site to enhance your user experience, provide personalized content, and analyze our traffic.

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

Howdy, fellers! Anyone want to go one an intellectual adventure with a bro?Convert


Thread replies: 18
Thread images: 2

File: 1458701797460.jpg (382KB, 960x1280px) Image search: [Google] [Yandex] [Bing]
1458701797460.jpg
382KB, 960x1280px
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.
>>
File: 1457963812344.jpg (93KB, 806x813px) Image search: [Google] [Yandex] [Bing]
1457963812344.jpg
93KB, 806x813px
>>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 :^)
Thread replies: 18
Thread images: 2
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at imagescucc@gmail.com with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK