(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
09-27-24 09:20 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Don't know how many are familiar with MIPS, but I'd thought I'd give it a shot...
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
neotransotaku
Posts: 1692/1860
It could go either way. How you organize the processor lends itself how the assembly language is going to look like. Likewise, how you define the requirements of the assembly language is going to dictate how the processor is going to be designed. To be specific, when someone wants to design an assembly language or a processor, they are really designing an ISA -- instruction set architecture.
MathOnNapkins
Posts: 800/1106
Wait... they build the language first? I just figured processors were designed first, then the mnemonics / language were constructed.
neotransotaku
Posts: 1690/1860
I go to U.C. Berkeley and I'm a Computer Science major. The class I typically TA deals with how to facilitate communication between software and hardware. In other words, that class answers the question of "how do we design an assembly language and build the hardware to run that language?".
Black Lord +
Posts: 188/273
Yeah, I'm sure they're are better ways of doing it, but given the limited number of instructions we've gone over this one made the most sense to me to do. At least it makes sense of me, the rest of the class can't even wrap their heads around the sll and srl commands. Out of curiousity neo, where do you go to school?
neotransotaku
Posts: 1682/1860
With my TA reputation on the line, I'd say that is 100% correct.

Recursion in MIPS is not that much different from recursion in any other language. The fundamental thing behind recursion is you need to finish another task first before you can complete your currenter iteration. Perhaps this lecture might shed light on recursion?
HyperHacker
Posts: 3345/5072
That looks like it's correct, but there's a better way to mask off the high bits. I don't think I can very well tell you how to do your homework though.
Black Lord +
Posts: 187/273
So... I've got a little question...

I've got a 32-bit register, say $t3, and I want to store, bits 17 through 5 in the least significant bits of another 32 bit register, in MIPS. Also, only using two instructions to performe this task (yes this is my homework).

What I'm thinking I can do is the following.

sll $t0, $t3, 15 #ridding myself of the bits in front of bit 17
srl $t0, $t0, 19 #moving over the 15 i shifted before
# and then 4 more to move bit 5 to the least significant bit

I think this is correct, but I'm not for sure. I just started taking this class and it's really giving me a run for my money (the recursive algorthms really kicked my ass)
Acmlm's Board - I3 Archive - Programming - Don't know how many are familiar with MIPS, but I'd thought I'd give it a shot...


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.004 seconds; used 350.59 kB (max 392.95 kB)