LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-05-2003, 06:30 PM   #1
BaudRacer
LQ Newbie
 
Registered: Aug 2003
Posts: 12

Rep: Reputation: 0
learning risc assembler


I'm interested in learning about risc processors and as always the best way to learn about something is to use it. So I want to learn risc assembler. However, I don't have a risc cpu and don't have much money. I'm sure I could get an old one cheap, but was hoping to find some input on an emulator for my x86 based system and a book or website about assembler on risc. I have been unable to find any books about risc assembler at webshops, but am sure there are some out there.
 
Old 12-06-2003, 04:06 AM   #2
iTux
Member
 
Registered: Dec 2003
Posts: 33

Rep: Reputation: 15
It's more fun if you have an actual CPU because emulators tend to be quite limited. It should be relatively easy to find MIPS and PowerPC software emulators.

Spim, a MIPS emulator: http://www.cs.wisc.edu/~larus/spim.html

If you can get your end on a real RISC CPU it is more fun. You can use gcc/gdb and other tools, have access to library functions etc.

The cheapest hardware with a RISC CPUs are low-end Mac hardware (PowerPC). If you are lucky it is possible to buy Sparc hardware second hand cheap when companies upgrades.

iTux
 
Old 12-06-2003, 03:39 PM   #3
BaudRacer
LQ Newbie
 
Registered: Aug 2003
Posts: 12

Original Poster
Rep: Reputation: 0
hmmm...haven't heard of mips or sparc. I was hoping to get an actual cpu eventually, but thought it might be easier with an emulator. I know nothing about mac hardware, and have been hardpressed to find any sites that sell just hardware components. I'll have to look into mips and sparc. thanks.
 
Old 12-06-2003, 03:41 PM   #4
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
I used to write assembler for the ARM risc machine. It was beautiful. Go for it!
 
Old 12-06-2003, 03:43 PM   #5
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
Sparcs are machines made by Sun Microsystems, they tend to run Solaris (Sun's Unix) and have DEC Alpha processors.
 
Old 12-06-2003, 04:41 PM   #6
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 435

Rep: Reputation: 30
I studied RISC architecture in school. We used this book

It was a good book and focused on the MIPS Processor using MIPS Assembly. It's a bit pricy but you might want to check it out.
 
Old 12-07-2003, 02:16 AM   #7
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
I second the ARM recommendation. www.gbadev.org
 
Old 12-07-2003, 02:16 PM   #8
BaudRacer
LQ Newbie
 
Registered: Aug 2003
Posts: 12

Original Poster
Rep: Reputation: 0
thanks guys...I really didn't expect to get much response about this assembly isn't very popular, and I didn't think risc would be at all since linux was developed for the x86, although in my reasearch I have found that is has been ported for powerpcs. I'll check out all your recommendations.
 
Old 12-07-2003, 02:33 PM   #9
BaudRacer
LQ Newbie
 
Registered: Aug 2003
Posts: 12

Original Poster
Rep: Reputation: 0
Are there major differences between architectures, or will learning one allow me to adapt fairly easily to the others?
 
Old 12-07-2003, 04:40 PM   #10
iTux
Member
 
Registered: Dec 2003
Posts: 33

Rep: Reputation: 15
Between intel (a CISC) and a RISC architecture, lots of difference.

Between RISC architectures themselves, similar.

In all cases, the concepts are more the less the same. You have memory, instructions, stack etc.


iTux
 
Old 12-07-2003, 04:49 PM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
Quote:
Originally posted by iTux

Spim, a MIPS emulator: http://www.cs.wisc.edu/~larus/spim.html
An emulator is a good idea, especially for the beginning (when you don't have a processor). But spim crashes all the time, it's very frustrating.
I've seen a virtual machinefor running sparc code, but haven't tried it.
 
Old 12-07-2003, 10:55 PM   #12
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
Quote:
Originally posted by iTux
Between intel (a CISC) and a RISC architecture, lots of difference.

Between RISC architectures themselves, similar.

In all cases, the concepts are more the less the same. You have memory, instructions, stack etc.


iTux
RISC architectures don't have a stack.
 
Old 12-08-2003, 07:14 AM   #13
memory_leak
LQ Newbie
 
Registered: Dec 2003
Posts: 24

Rep: Reputation: 15
[QUOTE}
Sparcs are machines made by Sun Microsystems, they tend to run Solaris (Sun's Unix) and have DEC Alpha processors.
[/QUOTE]

sorry man but sparc is processor (actually processor specifikation) but also physical processor; those used in sun machines are also manufactured by sun; but there are many other who manufacture processor after sparc specifications

DEC alphas are also risc processors but are different than sparcs architecture

why would you learn assembly for risc if you don't use one???

I have programmed both mips and sparc in assembly but only when neccessary;
it's common rule - you don't programm in asseymbly if you don't have too (I did an interrypt rutine for an old mips; and one backend for a compiler for a sun ray & solaris 8) - and there is certainly no point of learning assemby for knowing assembly per see; you do that when you have a need

it's better to invest your time in learning assembly of that machine you have, coz' you can probably use that knowledge

but if you really feel to learn "risc" assembly then spim is probably best thing to go after

btw: you can't get an "risc" cpu; you must get entier machine (at least cpu and motherboard that will support it), and like someonve told you above an old powerpc is pretty good idea
 
Old 12-08-2003, 09:31 AM   #14
BaudRacer
LQ Newbie
 
Registered: Aug 2003
Posts: 12

Original Poster
Rep: Reputation: 0
I realize I would need at least a mb and cpu. I was hoping to find a place I could buy just those components since I could easily scrounge up other parts I need. I'm not really interested in learning assembly for assembly sake. I want to learn about risc architectures and thought the best way to do that would be to learn its language . I have a friend with an old sparc machine I can buy off him pretty cheap so I think I'm gonna use that to learn simply for availability reasons. Thanks again.
 
Old 12-08-2003, 11:43 AM   #15
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Quote:
Originally posted by ugenn
RISC architectures don't have a stack.
really?? so how do return instructions work? Or do they not exist either? In that case, are there no interrupts either?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any other HP PA-RISC Debian users out there? PaganHippie Debian 4 07-21-2011 04:38 PM
porting linux onto RISC processor ?? speed84 Linux - General 7 08-22-2006 04:27 PM
openbsd 3.5 on pa-risc kpachopoulos *BSD 0 01-26-2005 01:53 PM
Risc Os??? hubergeek General 2 11-06-2002 01:02 AM
new machine:IBM RISC 6000 3CT bdp Linux - Hardware 1 06-29-2002 09:18 PM


All times are GMT -5. The time now is 11:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration