Subversion Repositories Kolibri OS

Rev

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

Rev 7644 Rev 7722
Line 69... Line 69...
69
 
69
 
70
    Further let us designate xpos,ypos,xsize,ysize - values passed
70
    Further let us designate xpos,ypos,xsize,ysize - values passed
71
    in ebx,ecx. The coordinates are resulted concerning
71
    in ebx,ecx. The coordinates are resulted concerning
72
    the left upper corner of the window, which, thus, is set as (0,0),
72
    the left upper corner of the window, which, thus, is set as (0,0),
73
    coordinates of the right lower corner essence (xsize,ysize).
73
    coordinates of the right lower corner essence (xsize,ysize).
74
  * The sizes of the window are understood in sence of coordinates
74
  * The sizes of the window are understood in sense of coordinates
75
    of the right lower corner. This concerns all other functions too.
75
    of the right lower corner. This concerns all other functions too.
76
    It means, that the real sizes are on 1 pixel more.
76
    It means, that the real sizes are on 1 pixel more.
77
  * The window of style Y=1 looks as follows:
77
  * The window of style Y=1 looks as follows:
78
    * completely defined by the application
78
    * completely defined by the application
Line 1016... Line 1016...
1016
============= Terminate process/thread by the identifier. ============
1016
============= Terminate process/thread by the identifier. ============
1017
======================================================================
1017
======================================================================
1018
Parameters:
1018
Parameters:
1019
  * eax = 18 - function number
1019
  * eax = 18 - function number
1020
  * ebx = 18 - subfunction number
1020
  * ebx = 18 - subfunction number
1021
  * ecx = identifer of process/thread (PID/TID)
1021
  * ecx = identifier of process/thread (PID/TID)
1022
Returned value:
1022
Returned value:
1023
  * eax = 0 - success
1023
  * eax = 0 - success
1024
  * eax = -1 - error (process is not found or is system)
1024
  * eax = -1 - error (process is not found or is system)
1025
Remarks:
1025
Remarks:
1026
  * It is impossible to terminate system thread OS/IDLE (identifier
1026
  * It is impossible to terminate system thread OS/IDLE (identifier
Line 1129... Line 1129...
1129
  * eax = 18 - function number
1129
  * eax = 18 - function number
1130
  * ebx = 20 - subfunction number
1130
  * ebx = 20 - subfunction number
1131
  * ecx = pointer to the buffer for information (36 bytes)
1131
  * ecx = pointer to the buffer for information (36 bytes)
1132
Returned value:
1132
Returned value:
1133
  * eax = total size of existing RAM in pages
1133
  * eax = total size of existing RAM in pages
1134
    or -1 if error has occured
1134
    or -1 if error has occurred
1135
  * buffer pointed to by ecx contains the following information:
1135
  * buffer pointed to by ecx contains the following information:
1136
    * +0:  dword: total size of existing RAM in pages
1136
    * +0:  dword: total size of existing RAM in pages
1137
    * +4:  dword: size of free RAM in pages
1137
    * +4:  dword: size of free RAM in pages
1138
    * +8:  dword: number of page faults (exceptions #PF)
1138
    * +8:  dword: number of page faults (exceptions #PF)
1139
                 in applications
1139
                 in applications
Line 1154... Line 1154...
1154
======== Get slot number of process/thread by the identifier. ========
1154
======== Get slot number of process/thread by the identifier. ========
1155
======================================================================
1155
======================================================================
1156
Parameters:
1156
Parameters:
1157
  * eax = 18 - function number
1157
  * eax = 18 - function number
1158
  * ebx = 21 - subfunction number
1158
  * ebx = 21 - subfunction number
1159
  * ecx = identifer of process/thread (PID/TID)
1159
  * ecx = identifier of process/thread (PID/TID)
1160
Returned value:
1160
Returned value:
1161
  * eax = 0 - error (invalid identifier)
1161
  * eax = 0 - error (invalid identifier)
1162
  * otherwise eax = slot number
1162
  * otherwise eax = slot number
Line 1163... Line 1163...
1163
 
1163
 
Line 1501... Line 1501...
1501
  eax - SF_CD (24)
1501
  eax - SF_CD (24)
1502
  ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
1502
  ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
1503
======================================================================
1503
======================================================================
1504
======= Function 25 - put image area on the background layer. ========
1504
======= Function 25 - put image area on the background layer. ========
1505
======================================================================
1505
======================================================================
1506
Paramters:
1506
Parameters:
1507
  * eax = 25 - function number
1507
  * eax = 25 - function number
1508
  * ebx = pointer to the previously allocated memory area,
1508
  * ebx = pointer to the previously allocated memory area,
1509
        where placed the source images in a format BBGGRRTTBBGGRRTT...
1509
        where placed the source images in a format BBGGRRTTBBGGRRTT...
1510
  * ecx = [size on axis x]*65536 + [size on axis y]
1510
  * ecx = [size on axis x]*65536 + [size on axis y]
1511
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
1511
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
Line 1857... Line 1857...
1857
 
1857
 
1858
  * bit 16 is set = left button is released
1858
  * bit 16 is set = left button is released
1859
  * bit 17 is set = right button is released
1859
  * bit 17 is set = right button is released
Line 1860... Line 1860...
1860
  * bit 18 is set = middle button is released
1860
  * bit 18 is set = middle button is released
Line 1861... Line 1861...
1861
 
1861
 
Line 1862... Line 1862...
1862
  * bit 23 is set = horisontal scroll is used
1862
  * bit 23 is set = horizontal scroll is used
1863
 
1863
 
Line 2025... Line 2025...
2025
    bit 30 = 1 - the window does not receive mouse events if cursor
2025
    bit 30 = 1 - the window does not receive mouse events if cursor
2026
                 outside window
2026
                 outside window
2027
Returned value:
2027
Returned value:
2028
  * eax = previous value of mask
2028
  * eax = previous value of mask
2029
Remarks:
2029
Remarks:
2030
  * Default mask (7=111b) enables nofices about redraw,
2030
  * Default mask (7=111b) enables notices about redraw,
2031
    keys and buttons. This is enough for many applications.
2031
    keys and buttons. This is enough for many applications.
2032
  * Events prohibited in the mask are saved anyway, when come;
2032
  * Events prohibited in the mask are saved anyway, when come;
2033
    they are simply not informed with event functions.
2033
    they are simply not informed with event functions.
2034
  * Event functions take into account the mask on moment of
2034
  * Event functions take into account the mask on moment of
2035
    function call, not on moment of event arrival.
2035
    function call, not on moment of event arrival.
Line 2234... Line 2234...
2234
    it is possible to write:
2234
    it is possible to write:
2235
        sc      system_colors           ; variable declaration
2235
        sc      system_colors           ; variable declaration
2236
        ...                             ; somewhere one must call
2236
        ...                             ; somewhere one must call
2237
                                        ; this function with ecx=sc
2237
                                        ; this function with ecx=sc
2238
        mov     ecx, [sc.work_button_text]      ; read text color on
2238
        mov     ecx, [sc.work_button_text]      ; read text color on
2239
                                        ; buttin in working area
2239
                                        ; button in working area
2240
  * A program itself desides to use or not to use color table.
2240
  * A program itself decides to use or not to use color table.
2241
    For usage program must simply at calls to drawing functions select
2241
    For usage program must simply at calls to drawing functions select
2242
    color taken from the table.
2242
    color taken from the table.
2243
  * At change of the table of standard colors (by subfunction 2 with
2243
  * At change of the table of standard colors (by subfunction 2 with
2244
    the subsequent application of changes by subfunction 0 or
2244
    the subsequent application of changes by subfunction 0 or
2245
    at skin set by subfunction 8) the system sends to all windows
2245
    at skin set by subfunction 8) the system sends to all windows
Line 2395... Line 2395...
2395
======================================================================
2395
======================================================================
2396
============ Function 48, subfunction 11 - get font size. ============
2396
============ Function 48, subfunction 11 - get font size. ============
2397
======================================================================
2397
======================================================================
2398
Parameters:
2398
Parameters:
2399
  * eax = 48 - function number
2399
  * eax = 48 - function number
2400
  * ebx = 9 - subfunction number
2400
  * ebx = 11 - subfunction number
2401
Returned value:
2401
Returned value:
2402
  * eax = current font height in pixels
2402
  * eax = current font height in pixels
Line 2403... Line 2403...
2403
 
2403
 
2404
---------------------- Constants for registers: ----------------------
2404
---------------------- Constants for registers: ----------------------
Line 2407... Line 2407...
2407
======================================================================
2407
======================================================================
2408
============ Function 48, subfunction 12 - set font size. ============
2408
============ Function 48, subfunction 12 - set font size. ============
2409
======================================================================
2409
======================================================================
2410
Parameters:
2410
Parameters:
2411
  * eax = 48 - function number
2411
  * eax = 48 - function number
2412
  * ebx = 10 - subfunction number
2412
  * ebx = 12 - subfunction number
2413
  * cl  = new font height in pixels
2413
  * cl  = new font height in pixels
Line 2414... Line 2414...
2414
 
2414
 
2415
---------------------- Constants for registers: ----------------------
2415
---------------------- Constants for registers: ----------------------
2416
  eax - SF_STYLE_SETTINGS (48)
2416
  eax - SF_STYLE_SETTINGS (48)
Line 2875... Line 2875...
2875
  * bh = number of PCI-bus
2875
  * bh = number of PCI-bus
2876
  * ch = dddddfff, where ddddd = number of the device on the bus,
2876
  * ch = dddddfff, where ddddd = number of the device on the bus,
2877
    fff = function number of device
2877
    fff = function number of device
2878
  * cl = number of register (must be even for bl=9,
2878
  * cl = number of register (must be even for bl=9,
2879
    divisible by 4 for bl=10)
2879
    divisible by 4 for bl=10)
2880
  * dl/dx/edx (depending on requested size) contatins
2880
  * dl/dx/edx (depending on requested size) contains
2881
    the data to write
2881
    the data to write
2882
Returned value:
2882
Returned value:
2883
  * eax = -1 - error (access to PCI is disabled or parameters
2883
  * eax = -1 - error (access to PCI is disabled or parameters
2884
    are not supported)
2884
    are not supported)
2885
  * eax = 0 - success
2885
  * eax = 0 - success
Line 3074... Line 3074...
3074
      * 4 = must be pressed RShift, but not LShift
3074
      * 4 = must be pressed RShift, but not LShift
3075
    * Y - similar for LCtrl and RCtrl;
3075
    * Y - similar for LCtrl and RCtrl;
3076
    * X - similar for LAlt and RAlt
3076
    * X - similar for LAlt and RAlt
3077
Returned value:
3077
Returned value:
3078
  * eax=0 - success
3078
  * eax=0 - success
3079
  * eax=1 - too mant hotkeys (maximum 256 are allowed)
3079
  * eax=1 - too many hotkeys (maximum 256 are allowed)
3080
Remarks:
3080
Remarks:
3081
  * Hotkey can work either at pressing or at release. Release
3081
  * Hotkey can work either at pressing or at release. Release
3082
    scancode of a key is more on 128 than pressing scancode
3082
    scancode of a key is more on 128 than pressing scancode
3083
    (i.e. high bit is set).
3083
    (i.e. high bit is set).
3084
  * Several applications can set the same combination;
3084
  * Several applications can set the same combination;
Line 3469... Line 3469...
3469
                          with such name already exists, the function
3469
                          with such name already exists, the function
3470
                          will return error code 10.
3470
                          will return error code 10.
3471
    * SHM_READ        = 0x00 - only read access
3471
    * SHM_READ        = 0x00 - only read access
3472
    * SHM_WRITE       = 0x01 - read and write access
3472
    * SHM_WRITE       = 0x01 - read and write access
3473
Returned value:
3473
Returned value:
3474
  * eax = pointer to memory area, 0 if error has occured
3474
  * eax = pointer to memory area, 0 if error has occurred
3475
  * if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS):
3475
  * if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS):
3476
    edx = 0 - success, otherwise - error code
3476
    edx = 0 - success, otherwise - error code
3477
  * if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS):
3477
  * if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS):
3478
    edx = error code (if eax=0) or area size in bytes
3478
    edx = error code (if eax=0) or area size in bytes
3479
Error codes:
3479
Error codes:
Line 3555... Line 3555...
3555
  * edx = value of activity (0/1)
3555
  * edx = value of activity (0/1)
3556
Returned value:
3556
Returned value:
3557
  * eax = -1 - invalid signal number
3557
  * eax = -1 - invalid signal number
3558
  * otherwise eax = old value of activity for this signal (0/1)
3558
  * otherwise eax = old value of activity for this signal (0/1)
3559
Remarks:
3559
Remarks:
3560
  * In current implementation only mask for user excepton handler,
3560
  * In current implementation only mask for user exception handler,
3561
    which has been previously set by subfunction 24,
3561
    which has been previously set by subfunction 24,
3562
    is changed. Signal number corresponds to exception number.
3562
    is changed. Signal number corresponds to exception number.
Line 3563... Line 3563...
3563
 
3563
 
3564
---------------------- Constants for registers: ----------------------
3564
---------------------- Constants for registers: ----------------------
Line 3617... Line 3617...
3617
====================== Function 69 - debugging. ======================
3617
====================== Function 69 - debugging. ======================
3618
======================================================================
3618
======================================================================
3619
A process can load other process as debugged by set of corresponding
3619
A process can load other process as debugged by set of corresponding
3620
bit by call to subfunction 7 of function 70.
3620
bit by call to subfunction 7 of function 70.
3621
A process can have only one debugger; one process can debug some
3621
A process can have only one debugger; one process can debug some
3622
others. The system notifies debugger on events occuring with
3622
others. The system notifies debugger on events occurring with
3623
debugged process. Messages are written to the buffer defined by
3623
debugged process. Messages are written to the buffer defined by
3624
subfunction 0.
3624
subfunction 0.
3625
Format of a message:
3625
Format of a message:
3626
  * +0: dword: message code
3626
  * +0: dword: message code
3627
  * +4: dword: PID of debugged process
3627
  * +4: dword: PID of debugged process
Line 3635... Line 3635...
3635
      and at "murder" by any other process (including debugger itself)
3635
      and at "murder" by any other process (including debugger itself)
3636
  * 3 = debug exception int 1 = #DB
3636
  * 3 = debug exception int 1 = #DB
3637
    * in addition dword-image of the register DR6 is given:
3637
    * in addition dword-image of the register DR6 is given:
3638
      * bits 0-3: condition of the corresponding breakpoint (set by
3638
      * bits 0-3: condition of the corresponding breakpoint (set by
3639
        subfunction 9) is satisfied
3639
        subfunction 9) is satisfied
3640
      * bit 14: exception has occured because of the trace mode
3640
      * bit 14: exception has occurred because of the trace mode
3641
        (flag TF is set TF)
3641
        (flag TF is set TF)
3642
    * process is suspended
3642
    * process is suspended
3643
When debugger terminates, all debugged processes are killed.
3643
When debugger terminates, all debugged processes are killed.
3644
If debugger does not want this, it must previously detach by
3644
If debugger does not want this, it must previously detach by
3645
subfunction 3.
3645
subfunction 3.
Line 4236... Line 4236...
4236
  * +12 = +0xC: dword: 0 (reserved)
4236
  * +12 = +0xC: dword: 0 (reserved)
4237
  * +16 = +0x10: dword: 0 (reserved)
4237
  * +16 = +0x10: dword: 0 (reserved)
4238
  * +20 = +0x14: path, general rules of names forming
4238
  * +20 = +0x14: path, general rules of names forming
4239
Returned value:
4239
Returned value:
4240
  * eax > 0 - program is loaded, eax contains PID
4240
  * eax > 0 - program is loaded, eax contains PID
4241
  * eax < 0 - an error has occured, -eax contains
4241
  * eax < 0 - an error has occurred, -eax contains
4242
    file system error code
4242
    file system error code
4243
  * ebx destroyed
4243
  * ebx destroyed
4244
Remarks:
4244
Remarks:
4245
  * Command line must be terminated by the character with the code 0
4245
  * Command line must be terminated by the character with the code 0
4246
    (ASCIIZ-string); function takes into account either all characters
4246
    (ASCIIZ-string); function takes into account either all characters
Line 4476... Line 4476...
4476
Returned value:
4476
Returned value:
4477
  * eax = device pointer, -1 on error
4477
  * eax = device pointer, -1 on error
Line 4478... Line 4478...
4478
 
4478
 
4479
---------------------- Constants for registers: ----------------------
4479
---------------------- Constants for registers: ----------------------
4480
  eax - SF_NETWORK_GET (74)
4480
  eax - SF_NETWORK_GET (74)
4481
   bl - SSF_DEVICE_POINER (4)
4481
   bl - SSF_DEVICE_POINTER (4)
4482
======================================================================
4482
======================================================================
4483
========= Function 74, Subfunction 6, Get packet TX counter. =========
4483
========= Function 74, Subfunction 6, Get packet TX counter. =========
4484
======================================================================
4484
======================================================================
4485
Parameters:
4485
Parameters: