[A83] Re: General programming questions


[Prev][Next][Index][Thread]

[A83] Re: General programming questions




At 20:19 2001-09-27, you wrote:
>If I understand it right, assembly programming is processor-specific, that
>is, every processor has got it's own set of instructions.
>I can see how this relates to what we are doing, but how does this work on
>PC's, since there are obviously a lot of different processors??

They all use more or less the same intel instructionset as explained in 
other mails
they are compatible.

>A while ago there was this subject on this list about the z80, and how it is
>used in different computers, and I remember that someone said that the
>GameBoy missed the index register's and other things.
>Was this because this was a RISC processor, or does that relate to other
>things??

No. the z80 is a cisc processor. the z80 in the gameboy was just a custom 
z80, but still a risc.
The name "risc" (reduced instruction set ...) doesn't mean that you have 
removed instructions really, it is a much deeper meaning, and is about the 
design on a deep level, and a try to make a more effective processor based 
on certain fetures they have measured in the avarage program. (like 90% of 
the instructions run is short simple instructions, and that most functions 
has only up to 6 parameters, that nesting mostly isn't very deep and stuff 
like that)
Affects a lot more then just the number of instructions available

>The original gameboy had a clockspeed of 1 MHz and the colour version 2Mhz
>(I think...) , but seemed to be relativly fast, and this is a characteristic
>of a RISC processor, right, having a relativly low clock speed but being
>very fast because it has fewer instructions?

Reason its like that is because you have only a few instructions but the 
ones available are fast, often taking only one clock cycle to complete.
The reson a Gameboy is quite fast even though it has a slow (main) 
processor is because it has _a_lot_ of extra hardware to help with things 
like putting out sprites, playing sound, general effects and such, so the 
processor has to spend very little time doing these things.
On a calc you have no hardware like this and has to do everything yourself 
in the processor.

///Olle





Follow-Ups: References: