So, I want to learn the layers, workings, etc. |
So basically just general knowledge? Have you checked Wikipedia?
https://en.wikipedia.org/wiki/OSI_model
Also, I am interested in learning how various protocols work. (HTTP, Telnet, FTP, etc etc) |
What do you mean how they "work"? A protocol doesn't do anything, it's an agreement between two parties on how to conduct a transaction.
If you want to learn the protocols themselves, read the RFCs. It's really not an interesting read unless you want to implement a client or a server, though.
HTTP:
https://tools.ietf.org/html/rfc1945 (1.0)
https://tools.ietf.org/html/rfc2616 (1.1)
https://tools.ietf.org/html/rfc7540 (2.0)
Telnet:
https://tools.ietf.org/html/rfc15
https://tools.ietf.org/html/rfc855
FTP:
https://tools.ietf.org/html/rfc959
Sorry, yes, microprocessor. |
Well, the processor is what executes your program, so anytime your program is running you're in direct control of the processor. So I don't know what you might mean by "interact with the processor". It's not a device that you can send commands to.
I have read in K&R's C programming language that by default C doesn't have any input/output functions. So, I was curious what is the general idea to read from keyboard or display it in the monitor when you don't have the io header. |
K&R wrote that book in the 70s when they were designing C and UNIX for the PDP-11, a 16-bit minicomputer (i.e. roughly the size of a refrigerator). It's not intended to describe how computers will work from then until the end of time.
It's true, as
languages C and C++ don't have any way to do I/O. That functionality is provided as
libraries, i.e. collections of functions. Simply put, the OS exposes functions which the program can use to interact with the system at various levels. For example, in UNIX open() can be user to create a file in the current directory, or to open the disk itself (the OS exposes it as a file in /dev). In Windows, CreateFile() fullfills a similar function. Interestingly, these functions can also be used for things that are obviously not storage, such as pipes (inter-process communication objects) and network connections.
Maybe, I would want to start by understanding how to write a function that interacts with the keyboard and the monitor at first. I have read a bit about pointers and I understood that through it I can get "memory locations" (guessing) but how to interact with keyboard or the desktop. |
Simple console I/O can be performed with the functions in <iostream> in C++ and in <stdio.h> in C. Modern computers are not the Commodore 64. You will get nowhere trying to write bytes to random memory addresses, you'll just crash your program.