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
On Tue, 21 Apr 2015 01:05:19 -0000, "Chaturvedi, Akash" said:
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).
On Mon, Apr 20, 2015 at 09:52:26PM -0400, Valdis.Kletnieks@vt.edu wrote:
On Tue, 21 Apr 2015 01:05:19 -0000, "Chaturvedi, Akash" said:
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.
participants (3)
-
Chaturvedi, Akash -
John de la Garza -
Valdis.Kletnieks@vt.edu