I've been reading this forum for some time and found many interesting things. I'm one of those guys who wants to understand computing in it's lowest levels, so I plan to develop a small operating system with some basic file system and usual drivers. I'm not in the rush...so it should keep me writing it next 2-3 years.
For the start...I have couple of questions concerning the CPU registers which I can't find the solution to...
So, every process is segmented in memory (.code, .data, .stack and .heap)...question is, do the segment registers like CS, DS, SS...select these segments in memory or did I confused it with something else...What is the relation between these segments and the segments registers?
Another question is concerning the I/O sys. How does one device know to which memory location it should right some data, and from which memory location it should take instructions. Does it use some kind of standard, or does the BIOS make all the necessary mapping?
Is this simplified "drawing" correct?
If it is....how does the device know when it has received data or instruction?
My guess is using interrupts....
Code: Select all
SYS.MEM DEVICE
READ DATA Dev.mem. buffer
0x00A0 |__________|---------01011------------------>|__________|
0x00A1 |__________|<--------10110-------------------|__________|
0x00A2 |__________| WRITE DATA
CPU 0x00A3 |__________|
0x00A4 |__________|
0x00A5 |__________|---------0001------------------->|__________|
0x00A6 |__________| INSTRUCTIONS DEVICE REGISTERS
Thank you for your time and sorry for my bad English.