kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Achieve multi-threading in MIPS assembly
@ 2015-04-21  1:05 Chaturvedi, Akash
  2015-04-21  1:52 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 3+ messages in thread
From: Chaturvedi, Akash @ 2015-04-21  1:05 UTC (permalink / raw)
  To: kernelnewbies

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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Achieve multi-threading in MIPS assembly
  2015-04-21  1:05 Achieve multi-threading in MIPS assembly Chaturvedi, Akash
@ 2015-04-21  1:52 ` Valdis.Kletnieks at vt.edu
  2015-04-21 17:02   ` John de la Garza
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2015-04-21  1:52 UTC (permalink / raw)
  To: kernelnewbies

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).
-------------- 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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Achieve multi-threading in MIPS assembly
  2015-04-21  1:52 ` Valdis.Kletnieks at vt.edu
@ 2015-04-21 17:02   ` John de la Garza
  0 siblings, 0 replies; 3+ messages in thread
From: John de la Garza @ 2015-04-21 17:02 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 20, 2015 at 09:52:26PM -0400, Valdis.Kletnieks at 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-21 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21  1:05 Achieve multi-threading in MIPS assembly Chaturvedi, Akash
2015-04-21  1:52 ` Valdis.Kletnieks at vt.edu
2015-04-21 17:02   ` John de la Garza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).