Firstly, thanks for all the replies so far! Some really good guides so I don't get out of my depth
Originally Posted by denman
You'll need knowledge in C/C++ and the assembly language for the system you are programming for (x68, XOR, HLA, etc).
Thanks, I'll throw it in my to read pile and pick at it when I have spare time!
Seems like everytime I try to read something on wikipedia or elsewhere I end up having to look up every second word to get a definitive definition. I guess that's what I get for trying to dip my foot into a subject I've never studied properly. ^_^
I should probably make it clear that I wasn't intending or expecting to write my own OS. To be honest... the final straw that made me post was that I watched an episode of Revolution where a woman supposedly built a computer in a world where all electricity has been ruined and it got me thinking about how clueless I was about how we got from silicon and metals and ceramics to killing zombies and stressing over courseworks.
Originally Posted by deepor
The code in the ROM for the computer that managed the Apollo space craft that visited the moon was done by hand: http://en.wikipedia.org/wiki/Core_rope_memory
Nowadays, your PC has a ROM chip. The ROM chip is wired on the motherboard to show up inside the memory address space at exactly the position the CPU will start reading from when it's powered on. The ROM chip's contents will be flashed on another computer. You can't do that by hand anymore like they did with the Apollo guidance computer. There's too much code for that.
At university studying computer science, there's usually a short seminar where you design and build the circuitry of an 8 bit processor and do something very simple with it that only needs a few hundred bytes of code. The 8 bit processor circuitry is flashed onto an FPGA, which is a slow chip that behaves as if its circuitry can be deleted and rearranged. Your code is flashed onto a ROM chip. That kind of seminar is the closest you can get to experiencing everything from the most basic level by yourself, so you could try to find course material of one such seminar if you are interested.
This is kind of what I was getting at as your literally writing/programming (?) the ROM physically in order to form a basis for your further coding. You say you can't do it by hand because there is too much code but could you not make it simpler (or on a larger scale) ? Or is it that the physical hardware is too complex and therefore requires the more complex base code (assembly language?) and shortening it would render certain components and functionality unusable?
I'll take your advice and ask one of my friends who did computer science whether they studied this sort of thing then I can try and sneak into a course at the start of the new year after I graduate.
Originally Posted by jvjessen
All CPUs basically start up the same way.
Once powered up and the clock frequency has stabilized there will be an instruction pointer set to a predefined start position, e.g. address 0. The CPU then executes the instruction that the instruction pointer is pointing to. That address will usually be located in an eeprom (persistent memory that can re-written) containing a bios or some kind of boot sequence.
The CPU auto increments the instruction pointer each time it has executed an instruction (on branch instructions it will jump to start execution in some other area). Some CPUs will execute 1 instruction per clock, others require multiple clock ticks per instruction all depending on architecture.
The instructions being executed are assembly language instructions. But assembly language is not the lowest level. Assembly instructions are build using microcode in the hardware itself and the microcode is build using logical instructions (AND, OR, NAND, NOR etc.) and registers, these logical instructions are then finally implemented using transistors.
Somewhat simplified, but I hope it makes sense
Thanks for breaking down the levels clearly all the way down to the transistors. The explanation of the CPU increments and instructions is obviously why the CPU frequencies are so insanely high otherwise things wouldn't run nearly as well. It also presents the argument for overclocking more simply. It seems that coders and programmers must be very patient and methodical people to have created the systems that work so well.
Thanks again to everyone thus far.