Function 61 - get parameters for the direct graphics access.
The data of the graphics screen (the memory area which displays
screen contents) are accessible to a program directly, without
any system calls, through the selector gs:
mov eax, [gs:0]
places in eax the first dword of the buffer, which contains
information on color of the left upper point (and, possibly, colors
of several following).
mov [gs:0], eax
by work in VESA modes with LFB sets color of the left upper point
(and, possibly, colors of several following).
To interpret the data of graphics screen program needs to know
some parameters, returning by this function.
Remarks:
- Graphics parameters changes very seldom at work,
namely, only in cases, when user works with the application VRR.
- At videomode change the system redraws all windows (event
with code 1) and redraws the background (event 5).
Same events occur in other cases too, which meet much more often,
than videomode change.
- By operation in videomodes with LFB the selector gs points to
LFB itself, so reading/writing on gs result directly in
change of screen contents. By operation in videomodes without
LFB gs points to some data area in the kernel, and all functions
of screen output fulfil honesty double operation on writing
directly to the screen and writing to this buffer. In result
at reading contents of this buffer the results correspond to
screen contents (with, generally speaking, large color
resolution), and writing is ignored.
One exception is the mode 320*200, for which main loop of the
system thread updates the screen according to mouse movements.
Screen resolution
Parameters:
- eax = 61 - function number
- ebx = 1 - subfunction number
Returned value:
- eax = [resolution on x axis]*65536 + [resolution on y axis]
Remarks:
- One can use function 14 paying attention that
it returns sizes on 1 pixel less. It is fully equivalent way.
Number of bits per pixel
Parameters:
- eax = 61 - function number
- ebx = 2 - subfunction number
Returned value:
- eax = number of bits per pixel (24 or 32)
Number of bytes per scanline
Parameters:
- eax = 61 - function number
- ebx = 3 - subfunction number
Returned value:
- eax = number of bytes occupied by one scanline
(horizontal line on the screen)