Hi,
CPPOS wrote:
Can anyone make and share a very simple OS in C++ only including VBE driver (Setmode, Putpixel, Getpixel, etc...) and an example?
It's not possible. The calling conventions that the BIOS (and VBE) use are different, so you need to use assembly and therefore it can't be done with C++ only. I'm also not aware of any C++ compiler that's capable of generating code that works in real mode (excluding ancient/obsolete compilers from last century, but even those probably require DOS).
Also note that for higher resolution/SVGA modes you typically want to use a linear frame buffer so you can access all of the pixels without messy and slow bank switching, and this can't be done in real mode (the address of the linear frame buffer is always too high to reach with real mode addressing). For acceptable performance you'd also want a buffer in RAM (which will cost more memory than you can access in real mode for all but saddest video modes).
Note: It is possible to switch between (e.g.) real mode and protected mode; where almost all of your code runs in 32-bit protected mode (and you only switch back to real mode to use the BIOS). This solves most of the problems with limited addressing/memory while also making it so you can use modern compilers, but means you're not using real mode.Finally, "Getpixel" should never be used for anything ever (reading from display memory is very slow), and "Putpixel" should probably also never be used (it's far faster to use higher level primitives like "PutCharacter", "PutLine", "Put Rectangle", etc).
Cheers,
Brendan