Subversion Repositories Kolibri OS

Rev

Rev 5867 | Rev 5926 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5867 Rev 5871
Line 2036... Line 2036...
2036
  * +36 = +0x24: dword: work_graph - color of graphics in working area
2036
  * +36 = +0x24: dword: work_graph - color of graphics in working area
2037
Remarks:
2037
Remarks:
2038
  * Structure of the color table is described in the standard
2038
  * Structure of the color table is described in the standard
2039
    include file 'macros.inc' as 'system_colors'; for example,
2039
    include file 'macros.inc' as 'system_colors'; for example,
2040
    it is possible to write:
2040
    it is possible to write:
2041
    	sc	system_colors		; variable declaration
2041
        sc      system_colors           ; variable declaration
2042
    	...				; somewhere one must call
2042
        ...                             ; somewhere one must call
2043
    					; this function with ecx=sc
2043
                                        ; this function with ecx=sc
2044
    	mov	ecx, [sc.work_button_text]	; read text color on
2044
        mov     ecx, [sc.work_button_text]      ; read text color on
2045
    					; buttin in working area
2045
                                        ; buttin in working area
2046
  * A program itself desides to use or not to use color table.
2046
  * A program itself desides to use or not to use color table.
2047
    For usage program must simply at calls to drawing functions select
2047
    For usage program must simply at calls to drawing functions select
2048
    color taken from the table.
2048
    color taken from the table.
2049
  * At change of the table of standard colors (by subfunction 2 with
2049
  * At change of the table of standard colors (by subfunction 2 with
2050
    the subsequent application of changes by subfunction 0 or
2050
    the subsequent application of changes by subfunction 0 or
Line 2440... Line 2440...
2440
==== Function 61 - get parameters for the direct graphics access. ====
2440
==== Function 61 - get parameters for the direct graphics access. ====
2441
======================================================================
2441
======================================================================
2442
The data of the graphics screen (the memory area which displays
2442
The data of the graphics screen (the memory area which displays
2443
screen contents) are accessible to a program directly, without
2443
screen contents) are accessible to a program directly, without
2444
any system calls, through the selector gs:
2444
any system calls, through the selector gs:
2445
	mov	eax, [gs:0]
2445
        mov     eax, [gs:0]
2446
places in eax the first dword of the buffer, which contains
2446
places in eax the first dword of the buffer, which contains
2447
information on color of the left upper point (and, possibly, colors
2447
information on color of the left upper point (and, possibly, colors
2448
of several following).
2448
of several following).
2449
	mov	[gs:0], eax
2449
        mov     [gs:0], eax
2450
by work in VESA modes with LFB sets color of the left upper point
2450
by work in VESA modes with LFB sets color of the left upper point
2451
(and, possibly, colors of several following).
2451
(and, possibly, colors of several following).
2452
To interpret the data of graphics screen program needs to know
2452
To interpret the data of graphics screen program needs to know
2453
some parameters, returning by this function.
2453
some parameters, returning by this function.
2454
Remarks:
2454
Remarks:
Line 3277... Line 3277...
3277
Remarks:
3277
Remarks:
3278
  * If the size field is negative, the buffer is considered locked
3278
  * If the size field is negative, the buffer is considered locked
3279
    and at arrival of new message the system will wait.
3279
    and at arrival of new message the system will wait.
3280
    For synchronization frame all work with the buffer by operations
3280
    For synchronization frame all work with the buffer by operations
3281
    lock/unlock
3281
    lock/unlock
3282
    	neg	[bufsize]
3282
        neg     [bufsize]
3283
  * Data in the buffer are considered as array of items with variable
3283
  * Data in the buffer are considered as array of items with variable
3284
    length - messages. Format of a message is explained in
3284
    length - messages. Format of a message is explained in
3285
    general description.
3285
    general description.
Line 3286... Line 3286...
3286
 
3286
 
Line 3950... Line 3950...
3950
 
3950
 
3951
Returned value:
3951
Returned value:
Line 3952... Line 3952...
3952
  * function does not return value
3952
  * function does not return value
3953
 
3953
 
3954
======================================================================
3954
======================================================================
3955
= Function 74, Subfunction -1, Get number of active network devices. =
3955
= Function 74, Subfunction 255, Get number of active network devices. =
3956
======================================================================
3956
======================================================================
3957
Parameters:
3957
Parameters:
3958
  * eax = 74 - function number
3958
  * eax = 74 - function number
3959
  * bl = -1 - subfunction number
3959
  * bl = 255 - subfunction number
Line 3960... Line 3960...
3960
Returned value:
3960
Returned value:
3961
  * eax = number of active network devices
3961
  * eax = number of active network devices
Line 3966... Line 3966...
3966
Parameters:
3966
Parameters:
3967
  * eax = 74 - function number
3967
  * eax = 74 - function number
3968
  * bl = 0 - subfunction number
3968
  * bl = 0 - subfunction number
3969
  * bh = device number
3969
  * bh = device number
3970
Returned value:
3970
Returned value:
3971
  * eax = device type
3971
  * eax = device type number
Line 3972... Line 3972...
3972
 
3972
 
3973
======================================================================
3973
======================================================================
3974
======== Function 74, Subfunction 1, Get network device name. ========
3974
======== Function 74, Subfunction 1, Get network device name. ========
3975
======================================================================
3975
======================================================================
Line 3999... Line 3999...
3999
  * eax = 74 - function number
3999
  * eax = 74 - function number
4000
  * bl = 3 - subfunction number
4000
  * bl = 3 - subfunction number
4001
  * bh = device number
4001
  * bh = device number
4002
Returned value:
4002
Returned value:
4003
  * eax = -1 on error
4003
  * eax = -1 on error
-
 
4004
  
-
 
4005
======================================================================
-
 
4006
=========== Function 74, Subfunction 4, Get device pointer. ==========
-
 
4007
======================================================================
-
 
4008
Parameters:
-
 
4009
  * eax = 74 - function number
-
 
4010
  * bl = 4 - subfunction number
-
 
4011
  * bh = device number
-
 
4012
Returned value:
-
 
4013
  * eax = device pointer, -1 on error  
-
 
4014
  
-
 
4015
======================================================================
-
 
4016
========= Function 74, Subfunction 6, Get packet TX counter. =========
-
 
4017
======================================================================
-
 
4018
Parameters:
-
 
4019
  * eax = 74 - function number
-
 
4020
  * bl = 6 - subfunction number
-
 
4021
  * bh = device number
-
 
4022
Returned value:
-
 
4023
  * eax = Number of packets sent since device start, -1 on error
-
 
4024
  
-
 
4025
======================================================================
-
 
4026
========= Function 74, Subfunction 7, Get packet RX counter. =========
-
 
4027
======================================================================
-
 
4028
Parameters:
-
 
4029
  * eax = 74 - function number
-
 
4030
  * bl = 7 - subfunction number
-
 
4031
  * bh = device number
-
 
4032
Returned value:
-
 
4033
  * eax = Number of packets received since device start, -1 on error
-
 
4034
  
-
 
4035
======================================================================
-
 
4036
========== Function 74, Subfunction 8, Get TX byte counter. ==========
-
 
4037
======================================================================
-
 
4038
Parameters:
-
 
4039
  * eax = 74 - function number
-
 
4040
  * bl = 8 - subfunction number
-
 
4041
  * bh = device number
-
 
4042
Returned value:
-
 
4043
  * eax = Number of bytes sent since device start (lower dword)
-
 
4044
                  -1 on error
-
 
4045
  * ebx = Number of bytes sent since device start (higher dword)
Line 4004... Line 4046...
4004
 
4046
 
-
 
4047
======================================================================
-
 
4048
========== Function 74, Subfunction 9, Get RX byte counter. ==========
-
 
4049
======================================================================
-
 
4050
Parameters:
-
 
4051
  * eax = 74 - function number
-
 
4052
  * bl = 9 - subfunction number
-
 
4053
  * bh = device number
-
 
4054
Returned value:
-
 
4055
  * eax = Number of bytes received since device start (lower dword)
-
 
4056
                  -1 on error
-
 
4057
  * ebx = Number of bytes received since device start (higher dword)
-
 
4058
  
-
 
4059
======================================================================
-
 
4060
========== Function 74, Subfunction 10, Get link status. =============
-
 
4061
======================================================================
-
 
4062
Parameters:
-
 
4063
  * eax = 74 - function number
-
 
4064
  * bl = 10 - subfunction number
-
 
4065
  * bh = device number
-
 
4066
Returned value:
-
 
4067
  * eax = link status, -1 on error
-
 
4068
  
-
 
4069
  Link status:
-
 
4070
    ETH_LINK_DOWN   =    0b         ; Link is down
-
 
4071
    ETH_LINK_UNKNOWN=    1b         ; There could be an active link
-
 
4072
    ETH_LINK_FD     =   10b         ; full duplex flag
-
 
4073
    ETH_LINK_10M    =  100b         ; 10 mbit
-
 
4074
    ETH_LINK_100M   = 1000b         ; 100 mbit
-
 
4075
    ETH_LINK_1G     = 1100b         ; gigabit   
-
 
4076
  
4005
======================================================================
4077
======================================================================
4006
============== Function 75, Subfunction 0, Open socket. ==============
4078
============== Function 75, Subfunction 0, Open socket. ==============
4007
======================================================================
4079
======================================================================
4008
Parameters:
4080
Parameters:
4009
  * eax = 75 - function number
4081
  * eax = 75 - function number
Line 4116... Line 4188...
4116
Returned value:
4188
Returned value:
4117
  * eax = -1 on error
4189
  * eax = -1 on error
4118
  * ebx = errorcode
4190
  * ebx = errorcode
4119
Remarks:
4191
Remarks:
Line 4120... Line 4192...
4120
 
4192
 
-
 
4193
  Optstruct: 
4121
  Optstruct: dd level
4194
    dd level
4122
             dd optionname
4195
    dd optionname
4123
             dd optlength
4196
    dd optlength
Line 4124... Line 4197...
4124
             db options...
4197
    db options...
4125
 
4198
 
4126
======================================================================
4199
======================================================================
4127
=========== Function 75, Subfunction 9, Get socket options. ==========
4200
=========== Function 75, Subfunction 9, Get socket options. ==========
Line 4134... Line 4207...
4134
Returned value:
4207
Returned value:
4135
  * eax = -1 on error
4208
  * eax = -1 on error
4136
  * ebx = errorcode
4209
  * ebx = errorcode
4137
Remarks:
4210
Remarks:
Line 4138... Line 4211...
4138
 
4211
 
-
 
4212
  Optstruct: 
4139
  Optstruct: dd level
4213
    dd level
4140
             dd optionname
4214
    dd optionname
4141
             dd optlength
4215
    dd optlength
Line 4142... Line 4216...
4142
             db options...
4216
    db options...
4143
 
4217
 
4144
======================================================================
4218
======================================================================
4145
============ Function 75, Subfunction 10, Get socketpair. ===========
4219
============ Function 75, Subfunction 10, Get socketpair. ===========
4146
======================================================================
4220
======================================================================
4147
Parameters:
4221
Parameters:
4148
  * eax = 75 - function number
4222
  * eax = 75 - function number
4149
  * bl = 10 - subfunction number
4223
  * bl = 10 - subfunction number
4150
Returned value:
4224
Returned value:
-
 
4225
  * eax = socketnum1, -1 on error
-
 
4226
  * ebx = socketnum2, errorcode on error
-
 
4227
  
-
 
4228
======================================================================
-
 
4229
============ Function 76, Network options and statistics. ============
-
 
4230
======================================================================
-
 
4231
Parameters:
-
 
4232
  * eax = 76 - function number
-
 
4233
  * high half of ebx = protocol number
-
 
4234
  * bh = device number
-
 
4235
  * bl = subfunction number
-
 
4236
 
-
 
4237
Ethernet (0)
-
 
4238
        0 - Read MAC
-
 
4239
        
-
 
4240
IPv4 (1)
-
 
4241
        0 - Read # IP packets send
-
 
4242
        1 - Read # IP packets received
-
 
4243
        2 - Read IP
-
 
4244
        3 - Write IP
-
 
4245
        4 - Read DNS
-
 
4246
        5 - Write DNS
-
 
4247
        6 - Read subnet
-
 
4248
        7 - Write subnet
-
 
4249
        8 - Read gateway
-
 
4250
        9 - Write gateway
-
 
4251
        
-
 
4252
ICMP (2)
-
 
4253
        0 - Read # ICMP packets send
-
 
4254
        1 - Read # ICMP packets received
-
 
4255
        3 - enable/disable ICMP echo reply
-
 
4256
 
-
 
4257
UDP (3)
-
 
4258
        0 - Read # UDP packets send
-
 
4259
        1 - Read # UDP packets received
-
 
4260
 
-
 
4261
TCP (4)
-
 
4262
        0 - Read # TCP packets send
-
 
4263
        1 - Read # TCP packets received 
-
 
4264
        
-
 
4265
ARP (5)
-
 
4266
        0 - Read # ARP packets send
-
 
4267
        1 - Read # ARP packets received
-
 
4268
        2 - Read # ARP entry's
-
 
4269
        3 - Read ARP entry
-
 
4270
        4 - Add static ARP entry
-
 
4271
        5 - Remove ARP entry (-1 = remove all)
Line 4151... Line 4272...
4151
  * eax = socketnum1, -1 on error
4272
        6 - Send ARP announce on specified interface
4152
  * ebx = socketnum2, errorcode on error
4273
        7 - Read # ARP conflicts (IP address conflicts) 
4153
 
4274
 
4154
======================================================================
4275
======================================================================