Achieve multi-threading in MIPS assembly
Greetings All,
I am writing MIPS assembly code for a 'Word guessing game'. I want to play a background music in the game at the time user plays. I am using MARS emulator for running and testing my code.
As I need to do two task at the same time (game instructions and play music). Can someone please help me in achieving multi-threading using MIPS instructions (Like pthread_create in C). Or if there another way I can do two task simultaneously in MIPS assembly.
Thanks,
Akash
UT Dallas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150421/31d801ca/attachment.html
Quoted 1 line · Akash
I am writing MIPS assembly code for a 'Word guessing game'.
Why?
gcc -O2 will almost certainly generate faster code than you can (unless you're
*really* good at MIPS assembler, in which case you wouldn't have posted).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150420/820d3946/attachment.bin
Quoted 8 lines · Valdis.Kletnieks at vt.edu
Quoted 1 line · Akash
I am writing MIPS assembly code for a 'Word guessing game'.
Why?
gcc -O2 will almost certainly generate faster code than you can (unless you're *really* good at MIPS assembler, in which case you wouldn't have posted).
This is a common response to questions like this (questions asking about assembly language). Learning assembly can be fun. When I read this question, my first thought was 'cool, someone is learning assembly language'. Then I wondered how this is related to the topic of this list.
I see two camps. One says don't bother to learn assembly because a compiler is usually better. The other says, learning assembly language will help you be a better programming in general.
I have always been curious about assembly language. Taking a few months and writing a bunch of programs in assembly then seeing how others did it was really an overall good thing.
Assembly language seemed like magic to me for many years.