Subversion Repositories Kolibri OS

Rev

Rev 341 | Rev 448 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 341 Rev 346
Line 1... Line 1...
1
SYSTEM FUNCTIONS of OS Kolibri 0.6.4.0
1
SYSTEM FUNCTIONS of OS Kolibri 0.6.5.0
Line 2... Line 2...
2
 
2
 
3
Number of the function is located in the register eax.
3
Number of the function is located in the register eax.
4
The call of the system function is executed by "int 0x40" command.
4
The call of the system function is executed by "int 0x40" command.
5
All registers except explicitly declared in the returned value,
5
All registers except explicitly declared in the returned value,
Line 674... Line 674...
674
  * ecx = pointer to the full path to file
674
  * ecx = pointer to the full path to file
675
    (for example, "/hd0/1/kolibri/kolibri.img")
675
    (for example, "/hd0/1/kolibri/kolibri.img")
676
Returned value:
676
Returned value:
677
  * eax = 0 - success
677
  * eax = 0 - success
678
  * else eax = error code of the file system
678
  * else eax = error code of the file system
679
Remarks:
679
Çàìå÷àíèÿ:
680
  * All folders in the given path must exist, otherwise function
680
  * All folders in the given path must exist, otherwise function
681
    returns value 5, "file not found".
681
    returns value 5, "file not found".
Line 682... Line 682...
682
 
682
 
683
======================================================================
683
======================================================================
Line 841... Line 841...
841
  * function does not return value
841
  * function does not return value
842
Structure of the buffer:
842
Structure of the buffer:
843
db a,b,c,d for version a.b.c.d
843
db a,b,c,d for version a.b.c.d
844
db UID_xxx: one of UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2
844
db UID_xxx: one of UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2
845
db 'name',0 - ASCIIZ-string with the name
845
db 'name',0 - ASCIIZ-string with the name
846
For Kolibri 0.6.4.0 kernel:
846
For Kolibri 0.6.5.0 kernel:
847
db 0,6,4,0
847
db 0,6,5,0
848
db 2
848
db 2
849
db 'Kolibri',0
849
db 'Kolibri',0
Line 850... Line 850...
850
 
850
 
851
======================================================================
851
======================================================================
Line 1110... Line 1110...
1110
 
1110
 
1111
======================================================================
1111
======================================================================
1112
============== Function 21, subfunction 7 - set HD base. =============
1112
============== Function 21, subfunction 7 - set HD base. =============
1113
======================================================================
1113
======================================================================
1114
The HD base defines hard disk to write with usage of obsolete
1114
The HD base defines hard disk to write with usage of obsolete
1115
file system functions and functions implicitly using the hard disk
-
 
1116
(such as subfunction 6 of function 18);
-
 
1117
at usage of function 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1115
syntax /HD in obsolete function 58; at usage of modern syntax
1118
these function set base themselves.
1116
/HD0,/HD1,/HD2,/HD3 base is set automatically.
1119
Parameters:
1117
Parameters:
1120
  * eax = 21 - function number
1118
  * eax = 21 - function number
1121
  * ebx = 7 - subfunction number
1119
  * ebx = 7 - subfunction number
1122
  * ecx = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3
1120
  * ecx = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3
Line 1132... Line 1130...
1132
 
1130
 
1133
======================================================================
1131
======================================================================
1134
========= Function 21, subfunction 8 - set used HD partition. ========
1132
========= Function 21, subfunction 8 - set used HD partition. ========
1135
======================================================================
1133
======================================================================
1136
The HD partition defines partition of the hard disk to write with
1134
The HD partition defines partition of the hard disk to write with
1137
usage of obsolete file system functions and functions implicitly
-
 
1138
using the hard disk (such as subfunction 6 of function 18);
1135
usage of obsolete syntax /HD and obsolete function 58;
1139
at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1136
at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1140
these functions set base and partition themselves.
1137
base and partition are set automatically.
1141
Parameters:
1138
Parameters:
1142
  * eax = 21 - function number
1139
  * eax = 21 - function number
1143
  * ebx = 8 - subfunction number
1140
  * ebx = 8 - subfunction number
1144
  * ecx = HD partition (beginning from 1)
1141
  * ecx = HD partition (beginning from 1)
Line 1530... Line 1527...
1530
 
1527
 
1531
======================================================================
1528
======================================================================
1532
============== Function 26, subfunction 7 - get HD base. =============
1529
============== Function 26, subfunction 7 - get HD base. =============
1533
======================================================================
1530
======================================================================
1534
The HD base defines hard disk to write with usage of obsolete
1531
The HD base defines hard disk to write with usage of obsolete
1535
file system functions and functions implicitly using the hard disk
-
 
1536
(such as subfunction 6 of function 18);
-
 
1537
at usage of function 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1532
syntax /HD in obsolete function 58; at usage of modern syntax
1538
these function set base themselves.
1533
/HD0,/HD1,/HD2,/HD3 base is set automatically.
1539
Parameters:
1534
Parameters:
1540
  * eax = 26 - function number
1535
  * eax = 26 - function number
1541
  * ebx = 7 - subfunction number
1536
  * ebx = 7 - subfunction number
1542
Returned value:
1537
Returned value:
Line 1548... Line 1543...
1548
 
1543
 
1549
======================================================================
1544
======================================================================
1550
========= Function 26, subfunction 8 - get used HD partition. ========
1545
========= Function 26, subfunction 8 - get used HD partition. ========
1551
======================================================================
1546
======================================================================
1552
The HD partition defines partition of the hard disk to write with
1547
The HD partition defines partition of the hard disk to write with
1553
usage of obsolete file system functions and functions implicitly
-
 
1554
using the hard disk (such as subfunction 6 of function 18);
1548
usage of obsolete syntax /HD in obsolete function 58;
1555
at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1549
at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3
1556
these functions set base and partition themselves.
1550
base and partition are set automatically.
1557
Parameters:
1551
Parameters:
1558
  * eax = 26 - function number
1552
  * eax = 26 - function number
1559
  * ebx = 8 - subfunction number
1553
  * ebx = 8 - subfunction number
1560
Returned value:
1554
Returned value:
Line 2694... Line 2688...
2694
Returned value:
2688
Returned value:
2695
  * al = -1 - a network driver is not loaded or
2689
  * al = -1 - a network driver is not loaded or
2696
              does not support this function
2690
              does not support this function
2697
  * al = 0 - Ethernet cable is unplugged
2691
  * al = 0 - Ethernet cable is unplugged
2698
  * al = 1 - Ethernet cable is plugged
2692
  * al = 1 - Ethernet cable is plugged
-
 
2693
  * ebx destroyed
2699
Remarks:
2694
Remarks:
2700
  * The current kernel implementation supports this function
2695
  * The current kernel implementation supports this function
2701
    only for RTL8139 network cards.
2696
    only for RTL8139 network cards.
Line 2702... Line 2697...
2702
 
2697
 
2703
======================================================================
2698
======================================================================
2704
===== Function 53, subfunction 10 - read data from stack.        =====
2699
======= Function 53, subfunction 11 - read network stack data. =======
2705
======================================================================
2700
======================================================================
2706
Parameters:
2701
Paramters:
2707
  * eax = 53
2702
  * eax = 53 - function number
2708
  * ebx = 11
2703
  * ebx = 11 - subfunction number
2709
  * ecx = socket number
2704
  * ecx = socket handle
2710
  * edx = pointer to where data must be written
2705
  * edx = pointer to buffer
-
 
2706
  * esi = number of bytes to read;
2711
  * esi = buffer size (max bytes of data to copy)
2707
  * esi = 0 - read all data (maximum 4096 bytes)
2712
Returned value: 
2708
Returned value:
-
 
2709
  * eax = number of bytes read
2713
  * eax = number of bytes copied
2710
  * ebx destroyed
2714
Remarks:
2711
Remakrs:
2715
  * if buffer size is zero, all data will be copied 
-
 
Line 2716... Line 2712...
2716
    (this will be max 4096 bytes)
2712
  * There is no check on handle correctness.
2717
 
2713
 
2718
======================================================================
2714
======================================================================
2719
= Function 53, subfunction 255 - debug information of network driver. 
2715
= Function 53, subfunction 255 - debug information of network driver. 
Line 3660... Line 3656...
3660
  * If the driver was not loaded yet, it is loaded;
3656
  * If the driver was not loaded yet, it is loaded;
3661
    if the driver was loaded yet, nothing happens.
3657
    if the driver was loaded yet, nothing happens.
3662
  * Driver name is case-sensitive.
3658
  * Driver name is case-sensitive.
3663
    Maximum length of the name is 16 characters, including
3659
    Maximum length of the name is 16 characters, including
3664
    terminating null character, the rest is ignored.
3660
    terminating null character, the rest is ignored.
3665
  * The function can load only drivers which are registered in the
-
 
3666
    system; the current implementation contains
-
 
3667
    exactly 2 such drivers:
-
 
3668
    * name SOUND, file /rd/1/drivers/unisound.obj
3661
  * Driver ABC is loaded from file /rd/1/drivers/ABC.obj.
3669
    * name INFINITY, file /rd/1/drivers/infinity.obj
-
 
Line 3670... Line 3662...
3670
 
3662
 
3671
======================================================================
3663
======================================================================
3672
============ Function 68, subfunction 17 - driver control. ===========
3664
============ Function 68, subfunction 17 - driver control. ===========
3673
======================================================================
3665
======================================================================