 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed Jun 08, 2005 3:04 pm Post subject: Articles for beginners explaining computer architecture |
|
|
This article was linked from a recent Slashdot posting explaining concepts of computer architecture. Since it is oriented towards the MIPS architecture, I figured it should be of interest to many folx who are new to:
1. Programming Sony consoles.
2. Programming on something where understanding how the CPU works actually matters.
3. Programming in general.
http://www.aselabs.com/articles.php?id=167 [main article]
http://en.wikipedia.org/wiki/MIPS_architecture [another good backgrounder]
http://hardware.slashdot.org/article.pl?sid=05/06/08/0033219&tid=137 [Referenced from this Slashdot]
EDIT: Some slashdot posts raised issues that the original article seems to be avoiding crediting other original authors to the point where it could be plagiarism. Given that this material is so short, if you are interested to learn more, please by all means look for more authoritative sources. |
|
| Back to top |
|
 |
qleyo
Joined: 06 May 2005 Posts: 21 Location: Nottingham, UK
|
Posted: Wed Jun 08, 2005 5:11 pm Post subject: |
|
|
EDIT: Another useful link > How do I get started in PSP programming?
Out of curiousity is the sony firmware written in mainly C or assembly? or both?
Last edited by qleyo on Thu Jul 21, 2005 6:51 pm; edited 4 times in total |
|
| Back to top |
|
 |
Raoul
Joined: 10 May 2005 Posts: 8
|
Posted: Wed Jun 08, 2005 5:37 pm Post subject: |
|
|
| Most probably both |
|
| Back to top |
|
 |
agentbob
Joined: 10 May 2005 Posts: 8
|
Posted: Thu Jun 09, 2005 12:23 am Post subject: |
|
|
| qleyo wrote: | | Out of curiousity is the sony firmware written in C or assembly? or both? |
Ah, the language question. I'm guessing you might know this already, but since this is a newbie thread, let me ask "who cares"?
Language choice is often a matter of preference. You see, the only instructions the CPU is going to understand is machine langauage, or plain old 1's and 0's. The first computers had to be programmed this way, 10101100, etc... You can can imagine how difficult it would be to do that for even a simple program. So, programmers made abstractions to simplify the process. Instead of writing 10 to tell the computer to add something, they wrote ADD and ran that through another program that turned ADD back into 10. This is basic fuction of an assembler. The assembly language can be futher abstracted to make even higher level languages like C, which use compilers to write assembly langauge. (Actually, most compilers today are smart enough to go straight from C to machine language)
So what does this all mean with reguard to your question? It doesn't matter what language Sony used. They could've used ada or Fortran or COBOL for that matter. It all gets compiled down to the same machine language. That said, I agree with Raoul.... they probably use a little of both C and asm for the PSP firmware. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jun 09, 2005 1:24 am Post subject: |
|
|
Even for small embedded systems, most kernels are still written in C. Small parts of the code for system bootstrap (startup, from power-on/reset for example) would normally still be done in hand-coded assembly. Occasionally parts of device drivers will be in hand-coded assembly as needed.
But nowadays, just about any embedded OS is still too large to do even small portions in assembly. It will be done in C almost without exception. Larger OS's include more and more C++, but its hard to think of anything other language that might be used.*
* OpenBoot (bios kinda thing) and some other small embedded stuff are often done in Forth. So, for example, that Sun workstation, or even Apple Macintosh, are controlled at power-on by a boot firmware written in Forth. But this firmware's primary job is to find a real OS someplace such as on disk, dvd, or network, and to take over further booting of the system. |
|
| Back to top |
|
 |
razorrifh
Joined: 04 Jun 2005 Posts: 23 Location: Penn State
|
|
| Back to top |
|
 |
qleyo
Joined: 06 May 2005 Posts: 21 Location: Nottingham, UK
|
Posted: Mon Jul 18, 2005 9:22 pm Post subject: |
|
|
| agentbob wrote: |
Ah, the language question. I'm guessing you might know this already, but since this is a newbie thread, let me ask "who cares"?
Language choice is often a matter of preference.
|
I strongly disagree, theres alot of factors that come into place in the "real world" of course i'm not going to go into this as its of no use to you.
Lets say the business guys up there like to hear anyway of saving, and assembly programmers cost more money (well here they do). Right now i'm converting an alarm system firmware for a PIC from assembly to C for an alarm company solely because of these factors.
| agentbob wrote: | | You see, the only instructions the CPU is going to understand is machine langauage, or plain old 1's and 0's. |
I program in 6 languages (C, assembly, VHDL being amongs these) and about to start a PhD, researching FPGAs and pipelines.
I fully understand the microprocessor architecture, probably more than you can even comprehend. This little tutorial of yours is pretty unecessary and insulting. perhaps useful to others...
I'm a sony dev newbie. Not a programming newbie.
| agentbob wrote: |
So what does this all mean with reguard to your question? |
Not very useful and verbose. "C, assembly or both" is what I expected
| agentbob wrote: |
It doesn't matter what language Sony used. They could've used ada or Fortran or COBOL for that matter.. |
It does, depending on what angle you are looking at it form. They would be silly to use a strict language as Ada (I use VHDL too which is pretty similar). Someone I know who works for a company that makes US army equipment was telling me how they plan to drop Ada and use C and C++ instead.
Compilers have come a long way. And for easier maintanance C and C++ win hands down.
I was just being curious.
Last edited by qleyo on Mon Jul 18, 2005 10:31 pm; edited 3 times in total |
|
| Back to top |
|
 |
qleyo
Joined: 06 May 2005 Posts: 21 Location: Nottingham, UK
|
Posted: Mon Jul 18, 2005 9:27 pm Post subject: |
|
|
| Raoul wrote: | | Most probably both |
Thanks, thats what I presumed. |
|
| Back to top |
|
 |
agentbob
Joined: 10 May 2005 Posts: 8
|
Posted: Mon Jul 25, 2005 4:02 pm Post subject: |
|
|
| qleyo wrote: |
I strongly disagree, theres alot of factors that come into place in the "real world" ... assembly programmers cost more money
|
A wholy valid point I would consider beyond the scope of a "beginner" thread.
| qleyo wrote: |
I program in 6 languages (C, assembly, VHDL being amongs these) and about to start a PhD, researching FPGAs and pipelines.
I fully understand the microprocessor architecture, probably more than you can even comprehend.
|
Congratulations on starting your PhD. You must truely value the learning process and understand the significance of trying to educate others.
| qleyo wrote: |
This little tutorial of yours is pretty unecessary and insulting.
|
Please, forgive me. I never meant to insult anyone. You see, it's just that this is a beginner thread about computer hardware, so I figured most of the people reading it would be beginners. How could I have possibly known that someone posting a question in this beginner thread would be working on a PhD in computer science and know far more than anyone else here could possibly comprehend? I don't know, maybe I thought I had premptively avoided this confrontation by saying in the very first sentence of my post, "I'm guessing you might know this already"... which obviously you do.
| qleyo wrote: |
Not very useful and verbose. "C, assembly or both" is what I expected
|
If you already knew the answer, then why fucking ask the question? If you're so goddamned educated you should've been able to figure that one out on your own, PSP newbie or otherwise. What'd you expect someone to say, Forth?
| qleyo wrote: |
It does, depending on what angle you are looking at it form.
|
Yes, of course for logistical reasons, it matters.
| qleyo wrote: |
I was just being curious.
|
Of course you were. |
|
| Back to top |
|
 |
qleyo
Joined: 06 May 2005 Posts: 21 Location: Nottingham, UK
|
Posted: Mon Jul 25, 2005 5:08 pm Post subject: |
|
|
| Quote: | | If you already knew the answer, then why fucking ask the question? If you're so goddamned educated you should've been able to figure that one out on your own, PSP newbie or otherwise. What'd you expect someone to say, Forth? |
No I did not say I knew the answer, I said I was expecting more of "assembly" or "C" or "both" as an answer not a tutorial on how programs and computers work and its an Electronics Engineering research program not computer science. And considering I'm english I might as well correct what you "call" english, Assembly OR C means I expect one OR the other, forth?
It was a simple question, infuture do not start a "debate" or "tutorial" if you like on a something like this. Its like me asking you does the car use petrol on diesel and you start going about something the way cars work. You do not impose your opinion on others. And every sentence in your post should honestly start with "IMO" not just straight sentences
edit: Mods are you trying to tell me there is no prune feature that common a swear word? There was a 13 year on here the other day. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Tue Jul 26, 2005 12:00 am Post subject: |
|
|
Quit your bitching, asshat. We're not here to host your hissyfits or police what you deem as bad for children.
Locked due to a lack of development content. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|