Back to main

 

Function 21 and its subfunctions (1,2,5,11,12)

 

Subfunction 1 - set the base port MPU MIDI

 

Options:

  * eax = 21 - function number

  * ebx = 1 - number of subfunction

  * ecx = base port number

Return value:

  * eax = 0 - successful

  * eax = -1 - wrong port number

Remarks:

 The port number must satisfy the conditions 0x100 <= ecx <= 0xFFFF.

 Base installation is necessary for the operation of function 20.

 You can get the installed base port by calling subfunctions 1 functions 26.

 

Constants for registers:

  eax - SF_SYSTEM_SET (21)

  ebx - SSF_MPU_MIDI_BASE (1)

 

Subfunction 2 - set keyboard layout

 

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

Options:

  * eax = 21 - function number

  * ebx = 2 - subfunction number

  * ecx = which layout to install:

    * 1 = normal

    * 2 = layout when Shift is pressed

    * 3 = Layout while pressing Alt

  * edx = pointer to layout - 128 bytes table

Or:

  * ecx = 9

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

Return value:

  * eax = 0 - successful

  * eax = 1 - the parameter is set incorrectly

Remarks:

  * If Alt is pressed, then the Alt; 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 get layouts and country identifiers using subfunction 2 of function 26.

  * Country Identifier - a global system variable that is not used by the kernel itself; however, the @taskbar application displays an icon corresponding to the current country.

  * The @taskbar application switches layouts on user request.

 

Constants for registers:

  eax - SF_SYSTEM_SET (21)

  ebx - SSF_KEYBOARD_LAYOUT (2)

 

Subfunction 5 - set the system language

 

Options:

  * eax = 21 - function number

  * ebx = 5 - subfunction number

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

Return value:

  * eax = 0

Remarks:

  The system language is a global system variable that is not used by the kernel itself, however, the @taskbar application draws the corresponding icon.

Checks for correctness are not done, because the kernel does not use this variable.

You can get the system language by calling subfunction 5 of function 26.

 

Constants for registers:

  eax - SF_SYSTEM_SET (21)

  ebx - SSF_SYS_LANG (5)

 

Subfunction 11 - Allow / block low-level access to HD

 

Options:

  * eax = 21 - function number

  * ebx = 11 - number of subfunction

  * ecx = 0/1 - disable / allow

Return value:

  * eax = 0

Remarks:

 Used in LBA reading (subfunction 8 of function 58).

 The current implementation uses only the low bit ecx.

 You can get the current status by calling subfunction 11 of function 26.

 

Constants for registers:

  eax - SF_SYSTEM_SET (21)

  ebx - SSF_ACCESS_HD_LBA (11)

 

Subfunction 12 - Allow / block low-level access to PCI

 

Options:

   * eax = 21 - function number

   * ebx = 12 - subfunction number

   * ecx = 0/1 - disable / allow

Return value:

   * eax = 0

 

Remarks:

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

   The current implementation uses only the low bit ecx.

   You can get the current status by calling subfunction 12 of function 26.

 

Constants for registers:

   eax - SF_SYSTEM_SET (21)

   ebx - SSF_ACCESS_PCI (12)