Back to main

 

Function 26 and its subfunctions (1, 2, 5, 9-12)

 

Subfunction 1 - get the base port MPU MIDI

Options:

  * eax = 26 - function number

  * ebx = 1 - number of subfunction

Return value:

  * eax = port number

 

Remarks:

  You can set the base port by calling subfunction 1 of function 21.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_MPU_MIDI_BASE (1)

 

Subfunction 2 - get keyboard layout

The keyboard layout is used to convert scancodes coming from the keyboard into ASCII codes readable by function 2.

Options:

  * eax = 26 - function number

  * ebx = 2 - subfunction number

  * ecx = which layout to get:

    * 1 = normal

    * 2 = layout when Shift is pressed

    * 3 = Layout while pressing Alt

  * edx = pointer to the 128-byte buffer where the layout will be copied

Return value:

  * function does not return value

Or:

  * eax = 26 - function number

  * ebx = 2 - subfunction number

  * ecx = 9

Return value:

  * eax = country identifier (1 = eng, 2 = fi, 3 = ger, 4 = rus)

 

Remarks:

  If Alt is pressed, the layout with Alt is used;

  if Alt is not pressed, but Shift is pressed, then the layout with Shift is used;

  if Alt and Shift are not pressed, but Ctrl is pressed, then the normal layout is used, after which 0x60 is subtracted from the code;

  if none of the control keys are pressed, then the normal layout is used.

  You can set the layouts and country ID using sub-function 2 of function 21.

  The country identifier is a global system variable that is not used by the kernel itself; however, the @taskbar application displays an icon corresponding to the current country (using the described function).

  The @taskbar application switches layouts on user request.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_KEYBOARD_LAYOUT (2)

 

Subfunction 5 - get system language

Options:

  * eax = 26 - function number

  * ebx = 5 - subfunction number

Return value:

  * eax = system language (1 = eng, 2 = fi, 3 = ger, 4 = rus)

 

Remarks:

  The system language is a global system variable not used by the kernel itself, however, the @taskbar application draws the corresponding icon (using the described function).

  You can set the system language by calling subfunction 5 of function 21.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_SYS_LANG (5)

 

Subfunction 9 - get the value of the time counter

Options:

  * eax = 26 - function number

  * ebx = 9 - subfunction number

Return value:

  * eax = number of hundredths of a second since

    system startup

 

Remarks:

  The counter is taken modulo 2 ^ 32, which corresponds to a little more than 497 days.

  System time can be obtained by function 3.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_TIME_COUNT (9)

 

Subfunction 10 - Get the value of a high-precision time counter

 Options:

  * eax = 26 - function number

  * ebx = 10 - subfunction number

Returned value:

  * edx: eax = number of nanoseconds since the kernel was loaded

  * eax = low double word

  * edx = senior double word

 

Remarks:

  The function uses an HPET counter, if HPET is not available, a PIT counter is used. In this case, the accuracy will be reduced to 10,000,000 nanoseconds.

                               

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_TIME_COUNT_PRO (10)

 

Subfunction 11 - Find out if low-level access to HD is allowed

Options:

  * eax = 26 - function number

  * ebx = 11 - number of subfunction

Return value:

  * eax = 0/1 - disabled / enabled

 

Remarks:

  Used in LBA reading (subfunction 8 of function 58). You can set the current state by calling subfunction 11 of function 21.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_ACCESS_HD_LBA (11)

 

Subfunction 12 - Check if low-level access to PCI is allowed

Options:

  * eax = 26 - function number

  * ebx = 12 - subfunction number

Return value:

  * eax = 0/1 - disabled / enabled

 

Remarks:

  Used when working with the PCI bus (function 62).

  The current implementation uses only the low bit ecx.

  You can set the current state by calling subfunction 12 of function 21.

 

Constants for registers:

  eax - SF_SYSTEM_GET (26)

  ebx - SSF_ACCESS_PCI (12)