Hmm... considering the amount of worries you have, i suggest you get a
good tutorial about 320x200 VGA mode and the
VBE documentation. thinks will start being *very* clearer from there.
NewOS wrote:
Because bios int are not available under pmode.
You'll need the BIOS to set up the video mode. That's almost impossible to avoid unless you have a product-dedicated driver for each video card. And even if you cannot access BIOS ints in pmode, you can
* set up wished mode while still in real mode
* use VBE3 protected-mode interface to access mode-setup API
* use a V86 monitor to call the BIOS interrupt from your 32 bits kernel.
And what we see on the screen, is it a 1024x768 bmp somewhere in memory that be refresh every second ? or if what we see it organized another way ?
more or less, the video card maps its internal data on some physical memory (usually at the high end of memory) and mode info/mode setup should tell you where exactly it is. The exact structure of that memory area (the VideoRAM) depends on the colour depth. 32K colors modes use two consecutive bytes for each pixel, encoding the color something like '-RRRRRGGGGGBBBBB' while 32 bits (16M colors plus 8 bits for alpha channel which isn't used by the video hardware) has one byte for each colour component.
And how the gui is working ? how to put a little bmp 8x8 for the mouse cursor and attach it to the mouse moves ? And how to make event like when the user click a specific region on the screen, like clicking X button to close the window ?
basically, the GUI receives interrupts from hardware devices such as mouse and keyboards, update it's internal state accordingly and then will lookup complex datastructure to tell which 'widget' is pointed and therefore should receive the 'MOUSE_CLICK' event.
No need to say that you'll have *long* code to write before being able to handle such things ...
And if is right what we see on the screen is somewhere in the memory, what is the address ? is it a standard and the same thing on every pc under windows or any OS ?
Be more specific. If you want to see a jpeg picture or an hex dump of some memory location, things you'll have to do will *not* be the same. Once in gfx mode, all the hardware can do is plotting pixels. If you want characters to display, you need software to define which pixels should be switched on to render a 'A' ...