abryant24 wrote
What all needs to be added hardware and software wise to make a usable general purpose computer?
To make it a more conventional computer, I'd first go for the
Von Neumann architecture. This will make it possible to load different programs instead of having one program in ROM.
I'd also add some sort of storage device, so that my programs and data don't get lost. Beyond that one can expand the instruction set, extend the addressable memory, have a better graphics (including double buffering), add mouse and network support, etc.
abryant24 wrote
I'm also curious about the process how we could write an assembler in machine code so that it could assemble itself.
This comes out often. You can read
this thread or search the forum for more.
abryant24 wrote
I'm curious how we get I/O processing from a keyboard and screen to write the assembler.
It would be nice if there was another section in the book explaining all theses missing parts because I think this chapter is the biggest confusion point from me at the moment about how we go from hardware to software, and how we use software to control hardware.
Assemblers aren't really relevant here. This is a question about computer architecture instead.
Real world computers use specialized controllers to communicate with the hardware. They generate video signals from memory values, read tapes and disks in memory, handle keyboard input, etc. They also need to communicate with the CPU and often to directly access the RAM. The CPU may have specific pins and instructions for that, or it may just use the normal "memory" address and data buses.
Practically all CPUs also support interrupts. These are pins, which when set high (or low) tell the CPU that something requires its attention. The CPU would normally save its current state and just on specific address to execute code for handling this. This can be used for example by the keyboard controller to indicate that a key is pressed or released.
There is also DMA or direct memory access, which enables a controller to read or write to specific parts of the RAM without going through the CPU. This is much faster and also enables the CPU to do other things at the same time.
So suppose you're writing a OS routine to read a specific sector from the disk and store it at a given address in RAM. The program can set the sector address, the ram address and the operation (e.g. read or write) in some pre agreed places in memory, which are handled by the controller. The controller would then read the data from the disk and, using the DMA, write it directly in the specified memory location. When it's finished, it would send and interrupt to the CPU, to indicate that it's done.
Note, that this is a very high-level overview and I'm glossing over a lot of important details. Also, I'm a developer and my OS tinkering was mainly in the Apple 2 and early MS-DOS days. So, hopefully the expert will chime in and correct me if I totally misled you. :)