LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   learning risc assembler (https://www.linuxquestions.org/questions/programming-9/learning-risc-assembler-123071/)

BaudRacer 12-05-2003 05:30 PM

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.

iTux 12-06-2003 03:06 AM

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

BaudRacer 12-06-2003 02:39 PM

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.

vasudevadas 12-06-2003 02:41 PM

I used to write assembler for the ARM risc machine. It was beautiful. Go for it!

vasudevadas 12-06-2003 02:43 PM

Sparcs are machines made by Sun Microsystems, they tend to run Solaris (Sun's Unix) and have DEC Alpha processors.

oulevon 12-06-2003 03:41 PM

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.

ugenn 12-07-2003 01:16 AM

I second the ARM recommendation. www.gbadev.org

BaudRacer 12-07-2003 01:16 PM

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.

BaudRacer 12-07-2003 01:33 PM

Are there major differences between architectures, or will learning one allow me to adapt fairly easily to the others?

iTux 12-07-2003 03:40 PM

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

Mara 12-07-2003 03:49 PM

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.

ugenn 12-07-2003 09:55 PM

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.

memory_leak 12-08-2003 06:14 AM

[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

BaudRacer 12-08-2003 08:31 AM

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.

nowonmai 12-08-2003 10:43 AM

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?


All times are GMT -5. The time now is 08:09 PM.