Unless they state, teach and demonstrate otherwise, bare bones tutorials are monolithic by default because they contain it all in a single compiled unit, with no external libraries or stuff to load.Chpetrou wrote:Hello
I finished the Bare Bones, and played with the kernel appearance and messages a bit. I mostly understood how the kernel works until now.
First, is this kernel a Microkernel, a Monolithic, or a Hybrid ? Also the mode of the processor and the memory management etc. are implemented in the GRUB boot-loader?
Second, i am trying as a starting point to make the OS work as a simple calculator, but how can i use the keyboard as an input, like in C++ "cin and cout", or C "scanf and printf" ?
Also how can i interact with hardware directly without any libraries or some kind of "help", for example you don't have some variables which count something that is happening in hardware to do something. How do you create drivers for a discontinued product?
Lastly, how can i implement something like a file manager and something like bash, and make a CLI OS like early BSD or early UNIX, and then make something like windows 1.0 which had the DoS behind and something like an early "GUI" which in fact was a graphical shell on top of DOS, or something like Mac OS System 1, or at least just a color window that each box is a program and the user can choose what program he wants? (I know that a GUI OS needs many things like display server, Desktop Environment and things like these)
Thanks in advance
To use the keyboard, you need to make a PS/2 or USB keyboard driver that properly retrieves the bytes of the scancodes when you press, repeat, release and use modifiers like LEDs and Ctrl/Alt/Shift, etc... It will need concentration to write it unless you get to find a low level keyboard driver library.
If you want to make drivers for DOS or Windows, you need to learn about making DOS device drivers and TSRs. Normally you will need professional-grade specific drivers for those peripherals to initialize them (you might learn to use the most classic hardware devices, but beyond that there are so many that it's more practical to just learn to natively load the drivers they are shipped with in a CD from your OS). If you want to use new hardware under, say Windows 98 or Millenium, you need to develop VxDs, and make a VxD that allows you to use drivers from newer OSes like Windows XP 32-bit drivers. You'll need books and a lot of information and study to do it. It's possible but you need to get on par of the people who wrote things like KernelEx, ReactOS (open-source Windows XP clone) and Wine.
To make a file manager, you need at least to have FreeDOS as a base, you need the "DOSLFN" drivers to use Long File Names under DOS as if you were under a Windows command shell. You need to learn about how to make GUIs with tree controls and scroll bars, even if you plan to implement them in DOS mode.
You can use MS-DOS/FreeDOS as the base, as a shell and boot loader that can take you to a native GUI or to your own OS. From there you will have many examples on how to do all sort of things, but centering in keyboard/mouse input, FAT/exFAT/NTFS file systems and a UI (preferably graphical) to implement a good file manager with massive file management functions for DOS (and preferably being a 32-bit program) is the most useful start for an OS that starts implemented as a competent file manager and viewer.
You can implement more and more DOS, DPMI and WinAPI library functions on your own under DOS and link your program or programs against them, and you will already be doing a good amount of OS development work.