Rev 6168 | Rev 6235 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6168 | Rev 6171 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | 7 | ||
8 | SYSTEM FUNCTIONS of OS Kolibri 0.7.7.0 |
8 | SYSTEM FUNCTIONS of OS Kolibri 0.7.7.0 |
9 | 9 | ||
10 | Number of the function is located in the register eax. |
10 | Number of the function is located in the register eax. |
11 | The call of the system function is executed by "int 0x40" command. |
11 | The call of the system function is executed by "int 0x40" command. |
12 | All registers except explicitly declared in the returned value, |
12 | All registers except explicitly declared in the returned value, |
13 | including eflags, are preserved. |
13 | including eflags, are preserved. |
14 | 14 | ||
15 | 15 | ||
16 | ====================================================================== |
16 | ====================================================================== |
17 | ============== Function 0 - define and draw the window. ============== |
17 | ============== Function 0 - define and draw the window. ============== |
18 | ====================================================================== |
18 | ====================================================================== |
19 | Defines an application window. Draws a frame of the window, header and |
19 | Defines an application window. Draws a frame of the window, header and |
20 | working area. For skinned windows defines standard close and minimize |
20 | working area. For skinned windows defines standard close and minimize |
21 | buttons. |
21 | buttons. |
22 | Parameters: |
22 | Parameters: |
23 | * eax = 0 - function number |
23 | * eax = 0 - function number |
24 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
24 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
25 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
25 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
26 | * edx = 0xXYRRGGBB, where: |
26 | * edx = 0xXYRRGGBB, where: |
27 | * Y = style of the window: |
27 | * Y = style of the window: |
28 | * Y=1 - only define window area, draw nothing |
28 | * Y=1 - only define window area, draw nothing |
29 | * Y=3 - skinned window |
29 | * Y=3 - skinned window |
30 | * Y=4 - skinned fixed-size window |
30 | * Y=4 - skinned fixed-size window |
- | 31 | * Y=0,2 window types are outdated and should not be used anymore, |
|
- | 32 | they are retained for compatibility with old programs. |
|
31 | * other possible values (0, 2, from 5 to 15) are reserved |
33 | * other possible values (from 5 to 15) are reserved, |
- | 34 | function call with such Y is ignored |
|
32 | * RR, GG, BB = accordingly red, green, blue components of a color |
35 | * RR, GG, BB = accordingly red, green, blue components of a color |
33 | of the working area of the window (are ignored for style Y=1) |
36 | of the working area of the window (are ignored for style Y=1) |
34 | * X = DCBA (bits) |
37 | * X = DCBA (bits) |
35 | * A = 1 - window has caption |
38 | * A = 1 - window has caption |
36 | * B = 1 - coordinates of all graphics primitives are relative to |
39 | * B = 1 - coordinates of all graphics primitives are relative to |
37 | window client area |
40 | window client area |
38 | * C = 1 - don't fill working area on window draw |
41 | * C = 1 - don't fill working area on window draw |
39 | * D = 0 - normal filling of the working area, 1 - gradient |
42 | * D = 0 - normal filling of the working area, 1 - gradient |
40 | The following parameters are intended for windows |
43 | The following parameters are intended for windows |
41 | of a type I and II, and ignored for styles Y=1,3: |
44 | of a type I and II, and ignored for styles Y=1,3: |
42 | * esi = 0xXYRRGGBB - color of the header |
45 | * esi = 0xXYRRGGBB - color of the header |
43 | * RR, GG, BB define color |
46 | * RR, GG, BB define color |
44 | * Y=0 - usual window, Y=1 - unmovable window (works for all window styles) |
47 | * Y=0 - usual window, Y=1 - unmovable window (works for all window styles) |
45 | * X not used, other values of Y are reserved |
48 | * X not used, other values of Y are reserved |
46 | * edi = caption string for styles Y=3,4 (also can be set by func 71.1) |
49 | * edi = caption string for styles Y=3,4 (also can be set by func 71.1) |
47 | Returned value: |
50 | Returned value: |
48 | * function does not return value |
51 | * function does not return value |
49 | Remarks: |
52 | Remarks: |
50 | * Position and sizes of the window are installed by the first |
53 | * Position and sizes of the window are installed by the first |
51 | call of this function and are ignored at subsequent; to change |
54 | call of this function and are ignored at subsequent; to change |
52 | position and/or sizes of already created window use function 67. |
55 | position and/or sizes of already created window use function 67. |
53 | * For windows with styles Y=3,4 and caption (A=1) caption string |
56 | * For windows with styles Y=3,4 and caption (A=1) caption string |
54 | is set by the first call of this function and is ignored |
57 | is set by the first call of this function and is ignored |
55 | at subsequent (strictly speaking, is ignored after a call to |
58 | at subsequent (strictly speaking, is ignored after a call to |
56 | subfunction 2 of function 12 - end redraw); to change caption of |
59 | subfunction 2 of function 12 - end redraw); to change caption of |
57 | already created window use subfunction 1 of function 71. |
60 | already created window use subfunction 1 of function 71. |
58 | * If the window has appropriate styles, position and/or sizes can be |
61 | * If the window has appropriate styles, position and/or sizes can be |
59 | changed by user. Current position and sizes can be obtained |
62 | changed by user. Current position and sizes can be obtained |
60 | by function 9. |
63 | by function 9. |
61 | * The window must fit on the screen. If the transferred |
64 | * The window must fit on the screen. If the transferred |
62 | coordinates and sizes do not satisfy to this condition, |
65 | coordinates and sizes do not satisfy to this condition, |
63 | appropriate coordinate (or, probably, both) is considered as zero, |
66 | appropriate coordinate (or, probably, both) is considered as zero, |
64 | and if it does not help too, the appropriate size |
67 | and if it does not help too, the appropriate size |
65 | (or, probably, both) is installed in a size of the screen. |
68 | (or, probably, both) is installed in a size of the screen. |
66 | 69 | ||
67 | Further let us designate xpos,ypos,xsize,ysize - values passed |
70 | Further let us designate xpos,ypos,xsize,ysize - values passed |
68 | in ebx,ecx. The coordinates are resulted concerning |
71 | in ebx,ecx. The coordinates are resulted concerning |
69 | 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), |
70 | coordinates of the right lower corner essence (xsize,ysize). |
73 | coordinates of the right lower corner essence (xsize,ysize). |
71 | * The sizes of the window are understood in sence of coordinates |
74 | * The sizes of the window are understood in sence of coordinates |
72 | of the right lower corner. This concerns all other functions too. |
75 | of the right lower corner. This concerns all other functions too. |
73 | It means, that the real sizes are on 1 pixel more. |
76 | It means, that the real sizes are on 1 pixel more. |
74 | * The window of style Y=1 looks as follows: |
77 | * The window of style Y=1 looks as follows: |
75 | * completely defined by the application |
78 | * completely defined by the application |
76 | * The skinned window Y=3,4 looks as follows: |
79 | * The skinned window Y=3,4 looks as follows: |
77 | * draw external frame of width 1 pixel |
80 | * draw external frame of width 1 pixel |
78 | with color 'outer' from the skin |
81 | with color 'outer' from the skin |
79 | * draw intermediate frame of width 3 pixel |
82 | * draw intermediate frame of width 3 pixel |
80 | with color 'frame' from the skin |
83 | with color 'frame' from the skin |
81 | * draw internal frame of width 1 pixel |
84 | * draw internal frame of width 1 pixel |
82 | with color 'inner' from the skin |
85 | with color 'inner' from the skin |
83 | * draw header (on bitmaps from the skin) in a rectangle |
86 | * draw header (on bitmaps from the skin) in a rectangle |
84 | (0,0) - (xsize,_skinh-1) |
87 | (0,0) - (xsize,_skinh-1) |
85 | * if ysize>=26, fill the working area of the window - |
88 | * if ysize>=26, fill the working area of the window - |
86 | rectangle with the left upper corner (5,_skinh) and right lower |
89 | rectangle with the left upper corner (5,_skinh) and right lower |
87 | (xsize-5,ysize-5) with color indicated in edx |
90 | (xsize-5,ysize-5) with color indicated in edx |
88 | (taking a gradient into account) |
91 | (taking a gradient into account) |
89 | * define two standard buttons: close and minimize |
92 | * define two standard buttons: close and minimize |
90 | (see function 8) |
93 | (see function 8) |
91 | * if A=1 and edi contains (nonzero) pointer to caption string, |
94 | * if A=1 and edi contains (nonzero) pointer to caption string, |
92 | it is drawn in place in header defined in the skin |
95 | it is drawn in place in header defined in the skin |
93 | * value _skinh is accessible as the result of call |
96 | * value _skinh is accessible as the result of call |
94 | subfunction 4 of function 48 |
97 | subfunction 4 of function 48 |
95 | 98 | ||
96 | ---------------------- Constants for registers: ---------------------- |
99 | ---------------------- Constants for registers: ---------------------- |
97 | eax - SF_CREATE_WINDOW (0) |
100 | eax - SF_CREATE_WINDOW (0) |
98 | ====================================================================== |
101 | ====================================================================== |
99 | ================ Function 1 - put pixel in the window. =============== |
102 | ================ Function 1 - put pixel in the window. =============== |
100 | ====================================================================== |
103 | ====================================================================== |
101 | Parameters: |
104 | Parameters: |
102 | * eax = 1 - function number |
105 | * eax = 1 - function number |
103 | * ebx = x-coordinate (relative to the window) |
106 | * ebx = x-coordinate (relative to the window) |
104 | * ecx = y-coordinate (relative to the window) |
107 | * ecx = y-coordinate (relative to the window) |
105 | * edx = 0x00RRGGBB - color of a pixel |
108 | * edx = 0x00RRGGBB - color of a pixel |
106 | edx = 0x01xxxxxx - invert color of a pixel |
109 | edx = 0x01xxxxxx - invert color of a pixel |
107 | (low 24 bits are ignored) |
110 | (low 24 bits are ignored) |
108 | Returned value: |
111 | Returned value: |
109 | * function does not return value |
112 | * function does not return value |
110 | 113 | ||
111 | ---------------------- Constants for registers: ---------------------- |
114 | ---------------------- Constants for registers: ---------------------- |
112 | eax - SF_PUT_PIXEL (1) |
115 | eax - SF_PUT_PIXEL (1) |
113 | ====================================================================== |
116 | ====================================================================== |
114 | ============ Function 2 - get the code of the pressed key. =========== |
117 | ============ Function 2 - get the code of the pressed key. =========== |
115 | ====================================================================== |
118 | ====================================================================== |
116 | Takes away the code of the pressed key from the buffer. |
119 | Takes away the code of the pressed key from the buffer. |
117 | Parameters: |
120 | Parameters: |
118 | * eax = 2 - function number |
121 | * eax = 2 - function number |
119 | Returned value: |
122 | Returned value: |
120 | * if the buffer is empty, function returns eax=1 |
123 | * if the buffer is empty, function returns eax=1 |
121 | * if the buffer is not empty, function returns al=0, |
124 | * if the buffer is not empty, function returns al=0, |
122 | ah=code of the pressed key, |
125 | ah=code of the pressed key, |
123 | bits 16-23 = contain scancode for pressed key in ASCII mode, |
126 | bits 16-23 = contain scancode for pressed key in ASCII mode, |
124 | in the scancodes mode this bits cleared. |
127 | in the scancodes mode this bits cleared. |
125 | bits 23-31 = zero |
128 | bits 23-31 = zero |
126 | * if there is "hotkey", function returns al=2, |
129 | * if there is "hotkey", function returns al=2, |
127 | ah=scancode of the pressed key (0 for control keys), |
130 | ah=scancode of the pressed key (0 for control keys), |
128 | high word of eax contains a status of control keys at the moment |
131 | high word of eax contains a status of control keys at the moment |
129 | of pressing a hotkey |
132 | of pressing a hotkey |
130 | Remarks: |
133 | Remarks: |
131 | * There is a common system buffer of the pressed keys |
134 | * There is a common system buffer of the pressed keys |
132 | by a size of 120 bytes, organized as queue. |
135 | by a size of 120 bytes, organized as queue. |
133 | * There is one more common system buffer on 120 "hotkeys". |
136 | * There is one more common system buffer on 120 "hotkeys". |
134 | * If the application with the inactive window calls this function, |
137 | * If the application with the inactive window calls this function, |
135 | the buffer of the pressed keys is considered to be empty. |
138 | the buffer of the pressed keys is considered to be empty. |
136 | * By default this function returns ASCII-codes; to switch |
139 | * By default this function returns ASCII-codes; to switch |
137 | to the scancodes mode (and back) use function 66. |
140 | to the scancodes mode (and back) use function 66. |
138 | However, hotkeys are always notificated as scancodes. |
141 | However, hotkeys are always notificated as scancodes. |
139 | * To find out, what keys correspond to what codes, start |
142 | * To find out, what keys correspond to what codes, start |
140 | the application keyascii and scancode. |
143 | the application keyascii and scancode. |
141 | * Scancodes come directly from keyboard and are fixed; |
144 | * Scancodes come directly from keyboard and are fixed; |
142 | ASCII-codes turn out with usage of the conversion tables, |
145 | ASCII-codes turn out with usage of the conversion tables, |
143 | which can be set by subfunction 2 of function 21 |
146 | which can be set by subfunction 2 of function 21 |
144 | and get by subfunction 2 of function 26. |
147 | and get by subfunction 2 of function 26. |
145 | * As a consequence, ASCII-codes take into account current |
148 | * As a consequence, ASCII-codes take into account current |
146 | keyboard layout (rus/en) as opposed to scancodes. |
149 | keyboard layout (rus/en) as opposed to scancodes. |
147 | * This function notifies only about those hotkeys, which were |
150 | * This function notifies only about those hotkeys, which were |
148 | defined by this thread by subfunction 4 of function 66. |
151 | defined by this thread by subfunction 4 of function 66. |
149 | 152 | ||
150 | ---------------------- Constants for registers: ---------------------- |
153 | ---------------------- Constants for registers: ---------------------- |
151 | eax - SF_GET_KEY (2) |
154 | eax - SF_GET_KEY (2) |
152 | ====================================================================== |
155 | ====================================================================== |
153 | ==================== Function 3 - get system time. =================== |
156 | ==================== Function 3 - get system time. =================== |
154 | ====================================================================== |
157 | ====================================================================== |
155 | Parameters: |
158 | Parameters: |
156 | * eax = 3 - function number |
159 | * eax = 3 - function number |
157 | Returned value: |
160 | Returned value: |
158 | * eax = 0x00SSMMHH, where HH:MM:SS = Hours:Minutes:Seconds |
161 | * eax = 0x00SSMMHH, where HH:MM:SS = Hours:Minutes:Seconds |
159 | * each item is BCD-number, for example, |
162 | * each item is BCD-number, for example, |
160 | for time 23:59:59 function returns 0x00595923 |
163 | for time 23:59:59 function returns 0x00595923 |
161 | Remarks: |
164 | Remarks: |
162 | * See also subfunction 9 of function 26 - get time from |
165 | * See also subfunction 9 of function 26 - get time from |
163 | the moment of start of the system; it is more convenient, because |
166 | the moment of start of the system; it is more convenient, because |
164 | returns simply DWORD-value of the time counter. |
167 | returns simply DWORD-value of the time counter. |
165 | * System time can be set by function 22. |
168 | * System time can be set by function 22. |
166 | 169 | ||
167 | ---------------------- Constants for registers: ---------------------- |
170 | ---------------------- Constants for registers: ---------------------- |
168 | eax - SF_GET_SYS_TIME (3) |
171 | eax - SF_GET_SYS_TIME (3) |
169 | ====================================================================== |
172 | ====================================================================== |
170 | =================== Function 4 - draw text string. =================== |
173 | =================== Function 4 - draw text string. =================== |
171 | ====================================================================== |
174 | ====================================================================== |
172 | Parameters: |
175 | Parameters: |
173 | * eax = 4 - function number |
176 | * eax = 4 - function number |
174 | * ebx = X*65536+Y, coordinates in the window or buffer |
177 | * ebx = X*65536+Y, coordinates in the window or buffer |
175 | * ecx = 0xXXRRGGBB, where |
178 | * ecx = 0xXXRRGGBB, where |
176 | * RR, GG, BB specify text color |
179 | * RR, GG, BB specify text color |
177 | * XX = ABFFCSSS (bits): |
180 | * XX = ABFFCSSS (bits): |
178 | * A=1 - output zero terminated string |
181 | * A=1 - output zero terminated string |
179 | * B=1 - fill background (color = edi) |
182 | * B=1 - fill background (color = edi) |
180 | * FF specifies the font and encoding: |
183 | * FF specifies the font and encoding: |
181 | 0 = 6x9 cp866 |
184 | 0 = 6x9 cp866 |
182 | 1 = 8x16 cp866 |
185 | 1 = 8x16 cp866 |
183 | 2 = 8x16 UTF-16LE |
186 | 2 = 8x16 UTF-16LE |
184 | 3 = 8x16 UTF-8 |
187 | 3 = 8x16 UTF-8 |
185 | * C=0 - draw to the window, |
188 | * C=0 - draw to the window, |
186 | C=1 - draw to the user buffer (edi) |
189 | C=1 - draw to the user buffer (edi) |
187 | * SSS = (size multiplier)-1, so 0 = x1, 7 = x8 |
190 | * SSS = (size multiplier)-1, so 0 = x1, 7 = x8 |
188 | * edx = pointer to the beginning of the string |
191 | * edx = pointer to the beginning of the string |
189 | * esi = for A=0 length of the string, for A=1 is ignored |
192 | * esi = for A=0 length of the string, for A=1 is ignored |
190 | * edi = for B=1 color to fill background, |
193 | * edi = for B=1 color to fill background, |
191 | for C=1 pointer to user buffer |
194 | for C=1 pointer to user buffer |
192 | 195 | ||
193 | Returned value: |
196 | Returned value: |
194 | * function does not return value |
197 | * function does not return value |
195 | Remarks: |
198 | Remarks: |
196 | * You can not use B=1 and C=1 at the same time, since both use edi. |
199 | * You can not use B=1 and C=1 at the same time, since both use edi. |
197 | * When SSS=0, font may be smoothed, depending on system setting. |
200 | * When SSS=0, font may be smoothed, depending on system setting. |
198 | * User buffer structure: |
201 | * User buffer structure: |
199 | Xsize dd |
202 | Xsize dd |
200 | Ysize dd |
203 | Ysize dd |
201 | picture rb Xsize*Ysize*4 ; 32 bpp |
204 | picture rb Xsize*Ysize*4 ; 32 bpp |
202 | 205 | ||
203 | ---------------------- Constants for registers: ---------------------- |
206 | ---------------------- Constants for registers: ---------------------- |
204 | eax - SF_DRAW_TEXT (4) |
207 | eax - SF_DRAW_TEXT (4) |
205 | ====================================================================== |
208 | ====================================================================== |
206 | ========================= Function 5 - delay. ======================== |
209 | ========================= Function 5 - delay. ======================== |
207 | ====================================================================== |
210 | ====================================================================== |
208 | Delays execution of the program on the given time. |
211 | Delays execution of the program on the given time. |
209 | Parameters: |
212 | Parameters: |
210 | * eax = 5 - function number |
213 | * eax = 5 - function number |
211 | * ebx = time in the 1/100 of second |
214 | * ebx = time in the 1/100 of second |
212 | Returned value: |
215 | Returned value: |
213 | * function does not return value |
216 | * function does not return value |
214 | Remarks: |
217 | Remarks: |
215 | * Passing ebx=0 does not transfer control to the next process |
218 | * Passing ebx=0 does not transfer control to the next process |
216 | and does not make any operations at all. If it is really required |
219 | and does not make any operations at all. If it is really required |
217 | to transfer control to the next process (to complete a current |
220 | to transfer control to the next process (to complete a current |
218 | time slice), use subfunction 1 of function 68. |
221 | time slice), use subfunction 1 of function 68. |
219 | 222 | ||
220 | ---------------------- Constants for registers: ---------------------- |
223 | ---------------------- Constants for registers: ---------------------- |
221 | eax - SF_SLEEP (5) |
224 | eax - SF_SLEEP (5) |
222 | ====================================================================== |
225 | ====================================================================== |
223 | =============== Function 7 - draw image in the window. =============== |
226 | =============== Function 7 - draw image in the window. =============== |
224 | ====================================================================== |
227 | ====================================================================== |
225 | Paramters: |
228 | Paramters: |
226 | * eax = 7 - function number |
229 | * eax = 7 - function number |
227 | * ebx = pointer to the image in the format BBGGRRBBGGRR... |
230 | * ebx = pointer to the image in the format BBGGRRBBGGRR... |
228 | * ecx = [size on axis x]*65536 + [size on axis y] |
231 | * ecx = [size on axis x]*65536 + [size on axis y] |
229 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
232 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
230 | Returned value: |
233 | Returned value: |
231 | * function does not return value |
234 | * function does not return value |
232 | Remarks: |
235 | Remarks: |
233 | * Coordinates of the image are coordinates of the upper left corner |
236 | * Coordinates of the image are coordinates of the upper left corner |
234 | of the image relative to the window. |
237 | of the image relative to the window. |
235 | * Size of the image in bytes is 3*xsize*ysize. |
238 | * Size of the image in bytes is 3*xsize*ysize. |
236 | 239 | ||
237 | ---------------------- Constants for registers: ---------------------- |
240 | ---------------------- Constants for registers: ---------------------- |
238 | eax - SF_PUT_IMAGE (7) |
241 | eax - SF_PUT_IMAGE (7) |
239 | ====================================================================== |
242 | ====================================================================== |
240 | =============== Function 8 - define/delete the button. =============== |
243 | =============== Function 8 - define/delete the button. =============== |
241 | ====================================================================== |
244 | ====================================================================== |
242 | Parameters for button definition: |
245 | Parameters for button definition: |
243 | * eax = 8 - function number |
246 | * eax = 8 - function number |
244 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
247 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
245 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
248 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
246 | * edx = 0xXYnnnnnn, where: |
249 | * edx = 0xXYnnnnnn, where: |
247 | * nnnnnn = identifier of the button |
250 | * nnnnnn = identifier of the button |
248 | * high (31st) bit of edx is cleared |
251 | * high (31st) bit of edx is cleared |
249 | * if 30th bit of edx is set - do not draw the button |
252 | * if 30th bit of edx is set - do not draw the button |
250 | * if 29th bit of edx is set - do not draw a frame |
253 | * if 29th bit of edx is set - do not draw a frame |
251 | at pressing the button |
254 | at pressing the button |
252 | * esi = 0x00RRGGBB - color of the button |
255 | * esi = 0x00RRGGBB - color of the button |
253 | Parameters for button deleting: |
256 | Parameters for button deleting: |
254 | * eax = 8 - function number |
257 | * eax = 8 - function number |
255 | * edx = 0x80nnnnnn, where nnnnnn - identifier of the button |
258 | * edx = 0x80nnnnnn, where nnnnnn - identifier of the button |
256 | Returned value: |
259 | Returned value: |
257 | * function does not return value |
260 | * function does not return value |
258 | Remarks: |
261 | Remarks: |
259 | * Sizes of the button must be more than 0 and less than 0x8000. |
262 | * Sizes of the button must be more than 0 and less than 0x8000. |
260 | * For skinned windows definition of the window |
263 | * For skinned windows definition of the window |
261 | (call of 0th function) creates two standard buttons - |
264 | (call of 0th function) creates two standard buttons - |
262 | for close of the window with identifier 1 and |
265 | for close of the window with identifier 1 and |
263 | for minimize of the window with identifier 0xffff. |
266 | for minimize of the window with identifier 0xffff. |
264 | * The creation of two buttons with same identifiers is admitted. |
267 | * The creation of two buttons with same identifiers is admitted. |
265 | * The button with the identifier 0xffff at pressing is interpreted |
268 | * The button with the identifier 0xffff at pressing is interpreted |
266 | by the system as the button of minimization, the system handles |
269 | by the system as the button of minimization, the system handles |
267 | such pressing independently, not accessing to the application. |
270 | such pressing independently, not accessing to the application. |
268 | In rest it is usual button. |
271 | In rest it is usual button. |
269 | * Total number of buttons for all applications is limited to 4095. |
272 | * Total number of buttons for all applications is limited to 4095. |
270 | 273 | ||
271 | ---------------------- Constants for registers: ---------------------- |
274 | ---------------------- Constants for registers: ---------------------- |
272 | eax - SF_DEFINE_BUTTON (8) |
275 | eax - SF_DEFINE_BUTTON (8) |
273 | ====================================================================== |
276 | ====================================================================== |
274 | ============ Function 9 - information on execution thread. =========== |
277 | ============ Function 9 - information on execution thread. =========== |
275 | ====================================================================== |
278 | ====================================================================== |
276 | Parameters: |
279 | Parameters: |
277 | * eax = 9 - function number |
280 | * eax = 9 - function number |
278 | * ebx = pointer to 1-Kb buffer |
281 | * ebx = pointer to 1-Kb buffer |
279 | * ecx = number of the slot of the thread |
282 | * ecx = number of the slot of the thread |
280 | ecx = -1 - get information on the current thread |
283 | ecx = -1 - get information on the current thread |
281 | Returned value: |
284 | Returned value: |
282 | * eax = maximum number of the slot of a thread |
285 | * eax = maximum number of the slot of a thread |
283 | * buffer pointed to by ebx contains the following information: |
286 | * buffer pointed to by ebx contains the following information: |
284 | * +0: dword: usage of the processor (how many time units |
287 | * +0: dword: usage of the processor (how many time units |
285 | per second leaves on execution of this thread) |
288 | per second leaves on execution of this thread) |
286 | * +4: word: position of the window of thread in the window stack |
289 | * +4: word: position of the window of thread in the window stack |
287 | * +6: word: (has no relation to the specified thread) |
290 | * +6: word: (has no relation to the specified thread) |
288 | number of the thread slot, which window has in the window stack |
291 | number of the thread slot, which window has in the window stack |
289 | position ecx |
292 | position ecx |
290 | * +8: word: reserved |
293 | * +8: word: reserved |
291 | * +10 = +0xA: 11 bytes: name of the process |
294 | * +10 = +0xA: 11 bytes: name of the process |
292 | (name of the started file - executable file without extension) |
295 | (name of the started file - executable file without extension) |
293 | * +21 = +0x15: byte: reserved, this byte is not changed |
296 | * +21 = +0x15: byte: reserved, this byte is not changed |
294 | * +22 = +0x16: dword: address of the process in memory |
297 | * +22 = +0x16: dword: address of the process in memory |
295 | * +26 = +0x1A: dword: size of used memory - 1 |
298 | * +26 = +0x1A: dword: size of used memory - 1 |
296 | * +30 = +0x1E: dword: identifier (PID/TID) |
299 | * +30 = +0x1E: dword: identifier (PID/TID) |
297 | * +34 = +0x22: dword: coordinate of the thread window on axis x |
300 | * +34 = +0x22: dword: coordinate of the thread window on axis x |
298 | * +38 = +0x26: dword: coordinate of the thread window on axis y |
301 | * +38 = +0x26: dword: coordinate of the thread window on axis y |
299 | * +42 = +0x2A: dword: size of the thread window on axis x |
302 | * +42 = +0x2A: dword: size of the thread window on axis x |
300 | * +46 = +0x2E: dword: size of the thread window on axis y |
303 | * +46 = +0x2E: dword: size of the thread window on axis y |
301 | * +50 = +0x32: word: status of the thread slot: |
304 | * +50 = +0x32: word: status of the thread slot: |
302 | * 0 = thread is running |
305 | * 0 = thread is running |
303 | * 1 = thread is suspended |
306 | * 1 = thread is suspended |
304 | * 2 = thread is suspended while waiting for event |
307 | * 2 = thread is suspended while waiting for event |
305 | * 3 = thread is terminating as a result of call to function -1 |
308 | * 3 = thread is terminating as a result of call to function -1 |
306 | or under duress as a result of call to subfunction 2 |
309 | or under duress as a result of call to subfunction 2 |
307 | of function 18 or termination of the system |
310 | of function 18 or termination of the system |
308 | * 4 = thread is terminating as a result of exception |
311 | * 4 = thread is terminating as a result of exception |
309 | * 5 = thread waits for event |
312 | * 5 = thread waits for event |
310 | * 9 = requested slot is free, all other information on the slot |
313 | * 9 = requested slot is free, all other information on the slot |
311 | is not meaningful |
314 | is not meaningful |
312 | * +52 = +0x34: word: reserved, this word is not changed |
315 | * +52 = +0x34: word: reserved, this word is not changed |
313 | * +54 = +0x36: dword: coordinate of the client area on axis x |
316 | * +54 = +0x36: dword: coordinate of the client area on axis x |
314 | * +58 = +0x3A: dword: coordinate of the client area on axis y |
317 | * +58 = +0x3A: dword: coordinate of the client area on axis y |
315 | * +62 = +0x3E: dword: width of the client area |
318 | * +62 = +0x3E: dword: width of the client area |
316 | * +66 = +0x42: dword: height of the client area |
319 | * +66 = +0x42: dword: height of the client area |
317 | * +70 = +0x46: byte: state of the window - bitfield |
320 | * +70 = +0x46: byte: state of the window - bitfield |
318 | * bit 0 (mask 1): window is maximized |
321 | * bit 0 (mask 1): window is maximized |
319 | * bit 1 (mask 2): window is minimized to panel |
322 | * bit 1 (mask 2): window is minimized to panel |
320 | * bit 2 (mask 4): window is rolled up |
323 | * bit 2 (mask 4): window is rolled up |
321 | * +71 = +0x47: dword: event mask |
324 | * +71 = +0x47: dword: event mask |
322 | * +75 = +0x4B: byte: keyboard mode(ASCII = 0; SCAN = 1) |
325 | * +75 = +0x4B: byte: keyboard mode(ASCII = 0; SCAN = 1) |
323 | Remarks: |
326 | Remarks: |
324 | * Slots are numbered starting from 1. |
327 | * Slots are numbered starting from 1. |
325 | * Returned value is not a total number of threads, because there |
328 | * Returned value is not a total number of threads, because there |
326 | can be free slots. |
329 | can be free slots. |
327 | * When process is starting, system automatically creates |
330 | * When process is starting, system automatically creates |
328 | execution thread. |
331 | execution thread. |
329 | * Function gives information on the thread. Each process has |
332 | * Function gives information on the thread. Each process has |
330 | at least one thread. One process can create many threads, |
333 | at least one thread. One process can create many threads, |
331 | in this case each thread has its own slot and the fields |
334 | in this case each thread has its own slot and the fields |
332 | +10, +22, +26 in these slots coincide. |
335 | +10, +22, +26 in these slots coincide. |
333 | Applications have no common way to define whether two threads |
336 | Applications have no common way to define whether two threads |
334 | belong to one process. |
337 | belong to one process. |
335 | * The active window - window on top of the window stack - |
338 | * The active window - window on top of the window stack - |
336 | receives the messages on a keyboard input. For such window |
339 | receives the messages on a keyboard input. For such window |
337 | the position in the window stack coincides with returned value. |
340 | the position in the window stack coincides with returned value. |
338 | * Slot 1 corresponds to special system thread, for which: |
341 | * Slot 1 corresponds to special system thread, for which: |
339 | * the window is in the bottom of the window stack, the fields |
342 | * the window is in the bottom of the window stack, the fields |
340 | +4 and +6 contain value 1 |
343 | +4 and +6 contain value 1 |
341 | * name of the process - "OS/IDLE" (supplemented by spaces) |
344 | * name of the process - "OS/IDLE" (supplemented by spaces) |
342 | * address of the process in memory is 0, size of used memory is |
345 | * address of the process in memory is 0, size of used memory is |
343 | 16 Mb (0x1000000) |
346 | 16 Mb (0x1000000) |
344 | * PID=1 |
347 | * PID=1 |
345 | * coordinates and sizes of the window and the client area are by |
348 | * coordinates and sizes of the window and the client area are by |
346 | convention set to 0 |
349 | convention set to 0 |
347 | * status of the slot is always 0 (running) |
350 | * status of the slot is always 0 (running) |
348 | * the execution time adds of time leaving on operations itself |
351 | * the execution time adds of time leaving on operations itself |
349 | and idle time in waiting for interrupt (which can be got by call |
352 | and idle time in waiting for interrupt (which can be got by call |
350 | to subfunction 4 of function 18). |
353 | to subfunction 4 of function 18). |
351 | * Beginning from slot 2, the normal applications are placed. |
354 | * Beginning from slot 2, the normal applications are placed. |
352 | * The normal applications are placed in memory at the address |
355 | * The normal applications are placed in memory at the address |
353 | 0 (kernel constant 'std_application_base_address'). |
356 | 0 (kernel constant 'std_application_base_address'). |
354 | There is no intersection, as each process has its own page table. |
357 | There is no intersection, as each process has its own page table. |
355 | * At creation of the thread it is assigned the slot |
358 | * At creation of the thread it is assigned the slot |
356 | in the system table and identifier (Process/Thread IDentifier = |
359 | in the system table and identifier (Process/Thread IDentifier = |
357 | PID/TID), which do not vary with time for given thread. |
360 | PID/TID), which do not vary with time for given thread. |
358 | After completion of the thread its slot can be anew used |
361 | After completion of the thread its slot can be anew used |
359 | for another thread. The thread identifier can not be assigned |
362 | for another thread. The thread identifier can not be assigned |
360 | to other thread even after completion of this thread. |
363 | to other thread even after completion of this thread. |
361 | Identifiers, assigned to new threads, grow monotonously. |
364 | Identifiers, assigned to new threads, grow monotonously. |
362 | * If the thread has not yet defined the window by call to |
365 | * If the thread has not yet defined the window by call to |
363 | function 0, the position and the sizes |
366 | function 0, the position and the sizes |
364 | of its window are considered to be zero. |
367 | of its window are considered to be zero. |
365 | * Coordinates of the client area are relative to the window. |
368 | * Coordinates of the client area are relative to the window. |
366 | * At the moment only the part of the buffer by a size |
369 | * At the moment only the part of the buffer by a size |
367 | 76 = 0x4C bytes is used. Nevertheless it is recommended to use |
370 | 76 = 0x4C bytes is used. Nevertheless it is recommended to use |
368 | 1-Kb buffer for the future compatibility, in the future |
371 | 1-Kb buffer for the future compatibility, in the future |
369 | some fields can be added. |
372 | some fields can be added. |
370 | 373 | ||
371 | ---------------------- Constants for registers: ---------------------- |
374 | ---------------------- Constants for registers: ---------------------- |
372 | eax - SF_THREAD_INFO (9) |
375 | eax - SF_THREAD_INFO (9) |
373 | ====================================================================== |
376 | ====================================================================== |
374 | ==================== Function 10 - wait for event. =================== |
377 | ==================== Function 10 - wait for event. =================== |
375 | ====================================================================== |
378 | ====================================================================== |
376 | If the message queue is empty, waits for appearance of the message |
379 | If the message queue is empty, waits for appearance of the message |
377 | in queue. In this state thread does not consume CPU time. |
380 | in queue. In this state thread does not consume CPU time. |
378 | Then reads out the message from queue. |
381 | Then reads out the message from queue. |
379 | 382 | ||
380 | Parameters: |
383 | Parameters: |
381 | * eax = 10 - function number |
384 | * eax = 10 - function number |
382 | Returned value: |
385 | Returned value: |
383 | * eax = event (see the list of events) |
386 | * eax = event (see the list of events) |
384 | Remarks: |
387 | Remarks: |
385 | * Those events are taken into account only which enter into |
388 | * Those events are taken into account only which enter into |
386 | a mask set by function 40. By default it is |
389 | a mask set by function 40. By default it is |
387 | redraw, key and button events. |
390 | redraw, key and button events. |
388 | * To check, whether there is a message in queue, use function 11. |
391 | * To check, whether there is a message in queue, use function 11. |
389 | To wait for no more than given time, use function 23. |
392 | To wait for no more than given time, use function 23. |
390 | 393 | ||
391 | ---------------------- Constants for registers: ---------------------- |
394 | ---------------------- Constants for registers: ---------------------- |
392 | eax - SF_WAIT_EVENT (10) |
395 | eax - SF_WAIT_EVENT (10) |
393 | ====================================================================== |
396 | ====================================================================== |
394 | =============== Function 11 - check for event, no wait. ============== |
397 | =============== Function 11 - check for event, no wait. ============== |
395 | ====================================================================== |
398 | ====================================================================== |
396 | If the message queue contains event, function reads out |
399 | If the message queue contains event, function reads out |
397 | and return it. If the queue is empty, function returns 0. |
400 | and return it. If the queue is empty, function returns 0. |
398 | Parameters: |
401 | Parameters: |
399 | * eax = 11 - function number |
402 | * eax = 11 - function number |
400 | Returned value: |
403 | Returned value: |
401 | * eax = 0 - message queue is empty |
404 | * eax = 0 - message queue is empty |
402 | * else eax = event (see the list of events) |
405 | * else eax = event (see the list of events) |
403 | Remarks: |
406 | Remarks: |
404 | * Those events are taken into account only, which enter into |
407 | * Those events are taken into account only, which enter into |
405 | a mask set by function 40. By default it is |
408 | a mask set by function 40. By default it is |
406 | redraw, key and button events. |
409 | redraw, key and button events. |
407 | * To wait for event, use function 10. |
410 | * To wait for event, use function 10. |
408 | To wait for no more than given time, use function 23. |
411 | To wait for no more than given time, use function 23. |
409 | 412 | ||
410 | ---------------------- Constants for registers: ---------------------- |
413 | ---------------------- Constants for registers: ---------------------- |
411 | eax - SF_CHECK_EVENT (11) |
414 | eax - SF_CHECK_EVENT (11) |
412 | ====================================================================== |
415 | ====================================================================== |
413 | =============== Function 12 - begin/end window redraw. =============== |
416 | =============== Function 12 - begin/end window redraw. =============== |
414 | ====================================================================== |
417 | ====================================================================== |
415 | 418 | ||
416 | ---------------- Subfunction 1 - begin window redraw. ---------------- |
419 | ---------------- Subfunction 1 - begin window redraw. ---------------- |
417 | Parameters: |
420 | Parameters: |
418 | * eax = 12 - function number |
421 | * eax = 12 - function number |
419 | * ebx = 1 - subfunction number |
422 | * ebx = 1 - subfunction number |
420 | Returned value: |
423 | Returned value: |
421 | * function does not return value |
424 | * function does not return value |
422 | 425 | ||
423 | ----------------- Subfunction 2 - end window redraw. ----------------- |
426 | ----------------- Subfunction 2 - end window redraw. ----------------- |
424 | Parameters: |
427 | Parameters: |
425 | * eax = 12 - function number |
428 | * eax = 12 - function number |
426 | * ebx = 2 - subfunction number |
429 | * ebx = 2 - subfunction number |
427 | Returned value: |
430 | Returned value: |
428 | * function does not return value |
431 | * function does not return value |
429 | Remarks: |
432 | Remarks: |
430 | * Subfunction 1 deletes all buttons defined with |
433 | * Subfunction 1 deletes all buttons defined with |
431 | function 8, they must be defined again. |
434 | function 8, they must be defined again. |
432 | 435 | ||
433 | ---------------------- Constants for registers: ---------------------- |
436 | ---------------------- Constants for registers: ---------------------- |
434 | eax - SF_REDRAW (12) |
437 | eax - SF_REDRAW (12) |
435 | ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2) |
438 | ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2) |
436 | ====================================================================== |
439 | ====================================================================== |
437 | ============ Function 13 - draw a rectangle in the window. =========== |
440 | ============ Function 13 - draw a rectangle in the window. =========== |
438 | ====================================================================== |
441 | ====================================================================== |
439 | Parameters: |
442 | Parameters: |
440 | * eax = 13 - function number |
443 | * eax = 13 - function number |
441 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
444 | * ebx = [coordinate on axis x]*65536 + [size on axis x] |
442 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
445 | * ecx = [coordinate on axis y]*65536 + [size on axis y] |
443 | * edx = color 0xRRGGBB or 0x80RRGGBB for gradient fill |
446 | * edx = color 0xRRGGBB or 0x80RRGGBB for gradient fill |
444 | Returned value: |
447 | Returned value: |
445 | * function does not return value |
448 | * function does not return value |
446 | Remarks: |
449 | Remarks: |
447 | * Coordinates are understood as coordinates of the left upper corner |
450 | * Coordinates are understood as coordinates of the left upper corner |
448 | of a rectangle relative to the window. |
451 | of a rectangle relative to the window. |
449 | 452 | ||
450 | ---------------------- Constants for registers: ---------------------- |
453 | ---------------------- Constants for registers: ---------------------- |
451 | eax - SF_DRAW_RECT (13) |
454 | eax - SF_DRAW_RECT (13) |
452 | ====================================================================== |
455 | ====================================================================== |
453 | =================== Function 14 - get screen size. =================== |
456 | =================== Function 14 - get screen size. =================== |
454 | ====================================================================== |
457 | ====================================================================== |
455 | Parameters: |
458 | Parameters: |
456 | * eax = 14 - function number |
459 | * eax = 14 - function number |
457 | Returned value: |
460 | Returned value: |
458 | * eax = [xsize]*65536 + [ysize], where |
461 | * eax = [xsize]*65536 + [ysize], where |
459 | * xsize = x-coordinate of the right lower corner of the screen = |
462 | * xsize = x-coordinate of the right lower corner of the screen = |
460 | horizontal size - 1 |
463 | horizontal size - 1 |
461 | * ysize = y-coordinate of the right lower corner of the screen = |
464 | * ysize = y-coordinate of the right lower corner of the screen = |
462 | vertical size - 1 |
465 | vertical size - 1 |
463 | Remarks: |
466 | Remarks: |
464 | * See also subfunction 5 of function 48 - get sizes of |
467 | * See also subfunction 5 of function 48 - get sizes of |
465 | working area of the screen. |
468 | working area of the screen. |
466 | 469 | ||
467 | ---------------------- Constants for registers: ---------------------- |
470 | ---------------------- Constants for registers: ---------------------- |
468 | eax - SF_GET_SCREEN_SIZE (14) |
471 | eax - SF_GET_SCREEN_SIZE (14) |
469 | ====================================================================== |
472 | ====================================================================== |
470 | == Function 15, subfunction 1 - set a size of the background image. == |
473 | == Function 15, subfunction 1 - set a size of the background image. == |
471 | ====================================================================== |
474 | ====================================================================== |
472 | Parameters: |
475 | Parameters: |
473 | * eax = 15 - function number |
476 | * eax = 15 - function number |
474 | * ebx = 1 - subfunction number |
477 | * ebx = 1 - subfunction number |
475 | * ecx = width of the image |
478 | * ecx = width of the image |
476 | * edx = height of the image |
479 | * edx = height of the image |
477 | Returned value: |
480 | Returned value: |
478 | * function does not return value |
481 | * function does not return value |
479 | Remarks: |
482 | Remarks: |
480 | * Before calling subfunctions 2 and 5 you should call this function |
483 | * Before calling subfunctions 2 and 5 you should call this function |
481 | to set image size! |
484 | to set image size! |
482 | * For update of the screen (after completion of a series of commands |
485 | * For update of the screen (after completion of a series of commands |
483 | working with a background) call subfunction 3. |
486 | working with a background) call subfunction 3. |
484 | * There is a pair function for get size of the background image - |
487 | * There is a pair function for get size of the background image - |
485 | subfunction 1 of function 39. |
488 | subfunction 1 of function 39. |
486 | 489 | ||
487 | ---------------------- Constants for registers: ---------------------- |
490 | ---------------------- Constants for registers: ---------------------- |
488 | eax - SF_BACKGROUND_SET (15) |
491 | eax - SF_BACKGROUND_SET (15) |
489 | ebx - SSF_SIZE_BG (1) |
492 | ebx - SSF_SIZE_BG (1) |
490 | ====================================================================== |
493 | ====================================================================== |
491 | === Function 15, subfunction 2 - put pixel on the background image. == |
494 | === Function 15, subfunction 2 - put pixel on the background image. == |
492 | ====================================================================== |
495 | ====================================================================== |
493 | Parameters: |
496 | Parameters: |
494 | * eax = 15 - function number |
497 | * eax = 15 - function number |
495 | * ebx = 2 - subfunction number |
498 | * ebx = 2 - subfunction number |
496 | * ecx = offset |
499 | * ecx = offset |
497 | * edx = color of a pixel 0xRRGGBB |
500 | * edx = color of a pixel 0xRRGGBB |
498 | Returned value: |
501 | Returned value: |
499 | * function does not return value |
502 | * function does not return value |
500 | Remarks: |
503 | Remarks: |
501 | * Offset for a pixel with coordinates (x,y) is calculated as |
504 | * Offset for a pixel with coordinates (x,y) is calculated as |
502 | (x+y*xsize)*3. |
505 | (x+y*xsize)*3. |
503 | * If the given offset exceeds size set by subfunction 1, |
506 | * If the given offset exceeds size set by subfunction 1, |
504 | the call is ignored. |
507 | the call is ignored. |
505 | * For update of the screen (after completion of a series of commands |
508 | * For update of the screen (after completion of a series of commands |
506 | working with a background) call subfunction 3. |
509 | working with a background) call subfunction 3. |
507 | * There is a pair function for get pixel on the background image - |
510 | * There is a pair function for get pixel on the background image - |
508 | subfunction 2 of function 39. |
511 | subfunction 2 of function 39. |
509 | 512 | ||
510 | ---------------------- Constants for registers: ---------------------- |
513 | ---------------------- Constants for registers: ---------------------- |
511 | eax - SF_BACKGROUND_SET (15) |
514 | eax - SF_BACKGROUND_SET (15) |
512 | ebx - SSF_PIXEL_BG (2) |
515 | ebx - SSF_PIXEL_BG (2) |
513 | ====================================================================== |
516 | ====================================================================== |
514 | =========== Function 15, subfunction 3 - redraw background. ========== |
517 | =========== Function 15, subfunction 3 - redraw background. ========== |
515 | ====================================================================== |
518 | ====================================================================== |
516 | Parameters: |
519 | Parameters: |
517 | * eax = 15 - function number |
520 | * eax = 15 - function number |
518 | * ebx = 3 - subfunction number |
521 | * ebx = 3 - subfunction number |
519 | Returned value: |
522 | Returned value: |
520 | * function does not return value |
523 | * function does not return value |
521 | 524 | ||
522 | ---------------------- Constants for registers: ---------------------- |
525 | ---------------------- Constants for registers: ---------------------- |
523 | eax - SF_BACKGROUND_SET (15) |
526 | eax - SF_BACKGROUND_SET (15) |
524 | ebx - SSF_REDRAW_BG (3) |
527 | ebx - SSF_REDRAW_BG (3) |
525 | ====================================================================== |
528 | ====================================================================== |
526 | == Function 15, subfunction 4 - set drawing mode for the background. = |
529 | == Function 15, subfunction 4 - set drawing mode for the background. = |
527 | ====================================================================== |
530 | ====================================================================== |
528 | Parameters: |
531 | Parameters: |
529 | * eax = 15 - function number |
532 | * eax = 15 - function number |
530 | * ebx = 4 - subfunction number |
533 | * ebx = 4 - subfunction number |
531 | * ecx = drawing mode: |
534 | * ecx = drawing mode: |
532 | * 1 = tile |
535 | * 1 = tile |
533 | * 2 = stretch |
536 | * 2 = stretch |
534 | Returned value: |
537 | Returned value: |
535 | * function does not return value |
538 | * function does not return value |
536 | Remarks: |
539 | Remarks: |
537 | * For update of the screen (after completion of a series of commands |
540 | * For update of the screen (after completion of a series of commands |
538 | working with a background) call subfunction 3. |
541 | working with a background) call subfunction 3. |
539 | * There is a pair function for get drawing mode of the background - |
542 | * There is a pair function for get drawing mode of the background - |
540 | subfunction 4 of function 39. |
543 | subfunction 4 of function 39. |
541 | 544 | ||
542 | ---------------------- Constants for registers: ---------------------- |
545 | ---------------------- Constants for registers: ---------------------- |
543 | eax - SF_BACKGROUND_SET (15) |
546 | eax - SF_BACKGROUND_SET (15) |
544 | ebx - SSF_MODE_BG (4) |
547 | ebx - SSF_MODE_BG (4) |
545 | ====================================================================== |
548 | ====================================================================== |
546 | ===================== Function 15, subfunction 5 ===================== |
549 | ===================== Function 15, subfunction 5 ===================== |
547 | ============ Put block of pixels on the background image. ============ |
550 | ============ Put block of pixels on the background image. ============ |
548 | ====================================================================== |
551 | ====================================================================== |
549 | Parameters: |
552 | Parameters: |
550 | * eax = 15 - function number |
553 | * eax = 15 - function number |
551 | * ebx = 5 - subfunction number |
554 | * ebx = 5 - subfunction number |
552 | * ecx = pointer to the data in the format BBGGRRBBGGRR... |
555 | * ecx = pointer to the data in the format BBGGRRBBGGRR... |
553 | * edx = offset in data of the background image |
556 | * edx = offset in data of the background image |
554 | * esi = size of data in bytes = 3 * number of pixels |
557 | * esi = size of data in bytes = 3 * number of pixels |
555 | Returned value: |
558 | Returned value: |
556 | * function does not return value |
559 | * function does not return value |
557 | Remarks: |
560 | Remarks: |
558 | * Offset and size are not checked for correctness. |
561 | * Offset and size are not checked for correctness. |
559 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
562 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
560 | * Pixels of the background image are written sequentially |
563 | * Pixels of the background image are written sequentially |
561 | from left to right, from up to down. |
564 | from left to right, from up to down. |
562 | * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. |
565 | * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. |
563 | * For update of the screen (after completion of a series of commands |
566 | * For update of the screen (after completion of a series of commands |
564 | working with a background) call subfunction 3. |
567 | working with a background) call subfunction 3. |
565 | 568 | ||
566 | ---------------------- Constants for registers: ---------------------- |
569 | ---------------------- Constants for registers: ---------------------- |
567 | eax - SF_BACKGROUND_SET (15) |
570 | eax - SF_BACKGROUND_SET (15) |
568 | ebx - SSF_IMAGE_BG (5) |
571 | ebx - SSF_IMAGE_BG (5) |
569 | ====================================================================== |
572 | ====================================================================== |
570 | ===================== Function 15, subfunction 6 ===================== |
573 | ===================== Function 15, subfunction 6 ===================== |
571 | ======== Map background data to the address space of process. ======== |
574 | ======== Map background data to the address space of process. ======== |
572 | ====================================================================== |
575 | ====================================================================== |
573 | Parameters: |
576 | Parameters: |
574 | * eax = 15 - function number |
577 | * eax = 15 - function number |
575 | * ebx = 6 - subfunction number |
578 | * ebx = 6 - subfunction number |
576 | Returned value: |
579 | Returned value: |
577 | * eax = pointer to background data, 0 if error |
580 | * eax = pointer to background data, 0 if error |
578 | Remarks: |
581 | Remarks: |
579 | * Mapped data are available for read and write. |
582 | * Mapped data are available for read and write. |
580 | * Size of background data is 3*xsize*ysize. The system blocks |
583 | * Size of background data is 3*xsize*ysize. The system blocks |
581 | changes of background sizes while process works with mapped data. |
584 | changes of background sizes while process works with mapped data. |
582 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
585 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
583 | * Pixels of the background image are written sequentially |
586 | * Pixels of the background image are written sequentially |
584 | from left to right, from up to down. |
587 | from left to right, from up to down. |
585 | 588 | ||
586 | ---------------------- Constants for registers: ---------------------- |
589 | ---------------------- Constants for registers: ---------------------- |
587 | eax - SF_BACKGROUND_SET (15) |
590 | eax - SF_BACKGROUND_SET (15) |
588 | ebx - SSF_MAP_BG (6) |
591 | ebx - SSF_MAP_BG (6) |
589 | ====================================================================== |
592 | ====================================================================== |
590 | ===== Function 15, subfunction 7 - close mapped background data. ===== |
593 | ===== Function 15, subfunction 7 - close mapped background data. ===== |
591 | ====================================================================== |
594 | ====================================================================== |
592 | Parameters: |
595 | Parameters: |
593 | * eax = 15 - function number |
596 | * eax = 15 - function number |
594 | * ebx = 7 - subfunction number |
597 | * ebx = 7 - subfunction number |
595 | * ecx = pointer to mapped data |
598 | * ecx = pointer to mapped data |
596 | Returned value: |
599 | Returned value: |
597 | * eax = 1 - success, 0 - error |
600 | * eax = 1 - success, 0 - error |
598 | 601 | ||
599 | ---------------------- Constants for registers: ---------------------- |
602 | ---------------------- Constants for registers: ---------------------- |
600 | eax - SF_BACKGROUND_SET (15) |
603 | eax - SF_BACKGROUND_SET (15) |
601 | ebx - SSF_UNMAP_BG (7) |
604 | ebx - SSF_UNMAP_BG (7) |
602 | ====================================================================== |
605 | ====================================================================== |
603 | ===================== Function 15, subfunction 8 ===================== |
606 | ===================== Function 15, subfunction 8 ===================== |
604 | ============= Get coordinates of last draw the background ============ |
607 | ============= Get coordinates of last draw the background ============ |
605 | ====================================================================== |
608 | ====================================================================== |
606 | Parameters: |
609 | Parameters: |
607 | * eax = 15 - function number |
610 | * eax = 15 - function number |
608 | * ebx = 8 - subfunction number |
611 | * ebx = 8 - subfunction number |
609 | Returned value: |
612 | Returned value: |
610 | * eax = [left]*65536 + [right] |
613 | * eax = [left]*65536 + [right] |
611 | * ebx = [top]*65536 + [bottom] |
614 | * ebx = [top]*65536 + [bottom] |
612 | Remarks: |
615 | Remarks: |
613 | * (left,top) are coordinates of the left upper corner, |
616 | * (left,top) are coordinates of the left upper corner, |
614 | (right,bottom) are coordinates of the right lower one. |
617 | (right,bottom) are coordinates of the right lower one. |
615 | * For receiving more reliable information, call the function |
618 | * For receiving more reliable information, call the function |
616 | immediately after the event: |
619 | immediately after the event: |
617 | 5 = kernel finished redrawing of the desktop background |
620 | 5 = kernel finished redrawing of the desktop background |
618 | 621 | ||
619 | ---------------------- Constants for registers: ---------------------- |
622 | ---------------------- Constants for registers: ---------------------- |
620 | eax - SF_BACKGROUND_SET (15) |
623 | eax - SF_BACKGROUND_SET (15) |
621 | ebx - SSF_LAST_DRAW (8) |
624 | ebx - SSF_LAST_DRAW (8) |
622 | ====================================================================== |
625 | ====================================================================== |
623 | ===================== Function 15, subfunction 9 ===================== |
626 | ===================== Function 15, subfunction 9 ===================== |
624 | ============= Redraws a rectangular part of the background =========== |
627 | ============= Redraws a rectangular part of the background =========== |
625 | ====================================================================== |
628 | ====================================================================== |
626 | Parameters: |
629 | Parameters: |
627 | * eax = 15 - function number |
630 | * eax = 15 - function number |
628 | * ebx = 9 - subfunction number |
631 | * ebx = 9 - subfunction number |
629 | * ecx = [left]*65536 + [right] |
632 | * ecx = [left]*65536 + [right] |
630 | * edx = [top]*65536 + [bottom] |
633 | * edx = [top]*65536 + [bottom] |
631 | Returned value: |
634 | Returned value: |
632 | * function does not return value |
635 | * function does not return value |
633 | Remarks: |
636 | Remarks: |
634 | * (left,top) are coordinates of the left upper corner, |
637 | * (left,top) are coordinates of the left upper corner, |
635 | (right,bottom) are coordinates of the right lower one. |
638 | (right,bottom) are coordinates of the right lower one. |
636 | * If parameters are set incorrectly then background is not redrawn. |
639 | * If parameters are set incorrectly then background is not redrawn. |
637 | 640 | ||
638 | ---------------------- Constants for registers: ---------------------- |
641 | ---------------------- Constants for registers: ---------------------- |
639 | eax - SF_BACKGROUND_SET (15) |
642 | eax - SF_BACKGROUND_SET (15) |
640 | ebx - SSF_REDRAW_RECT (9) |
643 | ebx - SSF_REDRAW_RECT (9) |
641 | ====================================================================== |
644 | ====================================================================== |
642 | =============== Function 16 - save ramdisk on a floppy. ============== |
645 | =============== Function 16 - save ramdisk on a floppy. ============== |
643 | ====================================================================== |
646 | ====================================================================== |
644 | Parameters: |
647 | Parameters: |
645 | * eax = 16 - function number |
648 | * eax = 16 - function number |
646 | * ebx = 1 or ebx = 2 - on which floppy save |
649 | * ebx = 1 or ebx = 2 - on which floppy save |
647 | Returned value: |
650 | Returned value: |
648 | * eax = 0 - success |
651 | * eax = 0 - success |
649 | * eax = 1 - error |
652 | * eax = 1 - error |
650 | 653 | ||
651 | ---------------------- Constants for registers: ---------------------- |
654 | ---------------------- Constants for registers: ---------------------- |
652 | eax - SF_RD_TO_FLOPPY (16) |
655 | eax - SF_RD_TO_FLOPPY (16) |
653 | ====================================================================== |
656 | ====================================================================== |
654 | ======= Function 17 - get the identifier of the pressed button. ====== |
657 | ======= Function 17 - get the identifier of the pressed button. ====== |
655 | ====================================================================== |
658 | ====================================================================== |
656 | Takes away the code of the pressed button from the buffer. |
659 | Takes away the code of the pressed button from the buffer. |
657 | Parameters: |
660 | Parameters: |
658 | * eax = 17 - function number |
661 | * eax = 17 - function number |
659 | Returned value: |
662 | Returned value: |
660 | * if the buffer is empty, function returns eax=1 |
663 | * if the buffer is empty, function returns eax=1 |
661 | * if the buffer is not empty: |
664 | * if the buffer is not empty: |
662 | * high 24 bits of eax contain button identifier (in particular, |
665 | * high 24 bits of eax contain button identifier (in particular, |
663 | ah contains low byte of the identifier; if all buttons have |
666 | ah contains low byte of the identifier; if all buttons have |
664 | the identifier less than 256, ah is enough to distinguish) |
667 | the identifier less than 256, ah is enough to distinguish) |
665 | * al = 0 - the button was pressed with left mouse button |
668 | * al = 0 - the button was pressed with left mouse button |
666 | * al = bit corresponding to used mouse button otherwise |
669 | * al = bit corresponding to used mouse button otherwise |
667 | Remarks: |
670 | Remarks: |
668 | * "Buffer" keeps only one button, at pressing the new button the |
671 | * "Buffer" keeps only one button, at pressing the new button the |
669 | information about old is lost. |
672 | information about old is lost. |
670 | * The call of this function by an application with inactive window |
673 | * The call of this function by an application with inactive window |
671 | will return answer "buffer is empty". |
674 | will return answer "buffer is empty". |
672 | * Returned value for al corresponds to the state of mouse buttons |
675 | * Returned value for al corresponds to the state of mouse buttons |
673 | as in subfunction 2 of function 37 at the beginning |
676 | as in subfunction 2 of function 37 at the beginning |
674 | of button press, excluding lower bit, which is cleared. |
677 | of button press, excluding lower bit, which is cleared. |
675 | 678 | ||
676 | ---------------------- Constants for registers: ---------------------- |
679 | ---------------------- Constants for registers: ---------------------- |
677 | eax - SF_GET_BUTTON (17) |
680 | eax - SF_GET_BUTTON (17) |
678 | ====================================================================== |
681 | ====================================================================== |
679 | ===================== Function 18, subfunction 1 ===================== |
682 | ===================== Function 18, subfunction 1 ===================== |
680 | ============= Make deactive the window of the given thread. ========== |
683 | ============= Make deactive the window of the given thread. ========== |
681 | ====================================================================== |
684 | ====================================================================== |
682 | Parameters: |
685 | Parameters: |
683 | * eax = 18 - function number |
686 | * eax = 18 - function number |
684 | * ebx = 1 - subfunction number |
687 | * ebx = 1 - subfunction number |
685 | * ecx = number of the thread slot |
688 | * ecx = number of the thread slot |
686 | Returned value: |
689 | Returned value: |
687 | * function does not return value |
690 | * function does not return value |
688 | 691 | ||
689 | ---------------------- Constants for registers: ---------------------- |
692 | ---------------------- Constants for registers: ---------------------- |
690 | eax - SF_SYSTEM (18) |
693 | eax - SF_SYSTEM (18) |
691 | ebx - SSF_UNFOCUS_WINDOW (1) |
694 | ebx - SSF_UNFOCUS_WINDOW (1) |
692 | ====================================================================== |
695 | ====================================================================== |
693 | = Function 18, subfunction 2 - terminate process/thread by the slot. = |
696 | = Function 18, subfunction 2 - terminate process/thread by the slot. = |
694 | ====================================================================== |
697 | ====================================================================== |
695 | Parameters: |
698 | Parameters: |
696 | * eax = 18 - function number |
699 | * eax = 18 - function number |
697 | * ebx = 2 - subfunction number |
700 | * ebx = 2 - subfunction number |
698 | * ecx = number of the slot of process/thread |
701 | * ecx = number of the slot of process/thread |
699 | Returned value: |
702 | Returned value: |
700 | * function does not return value |
703 | * function does not return value |
701 | Remarks: |
704 | Remarks: |
702 | * It is impossible to terminate system thread OS/IDLE (with |
705 | * It is impossible to terminate system thread OS/IDLE (with |
703 | number of the slot 1), |
706 | number of the slot 1), |
704 | it is possible to terminate any normal process/thread. |
707 | it is possible to terminate any normal process/thread. |
705 | * See also subfunction 18 - terminate |
708 | * See also subfunction 18 - terminate |
706 | process/thread by the identifier. |
709 | process/thread by the identifier. |
707 | 710 | ||
708 | ---------------------- Constants for registers: ---------------------- |
711 | ---------------------- Constants for registers: ---------------------- |
709 | eax - SF_SYSTEM (18) |
712 | eax - SF_SYSTEM (18) |
710 | ebx - SSF_TERMINATE_THREAD (2) |
713 | ebx - SSF_TERMINATE_THREAD (2) |
711 | ====================================================================== |
714 | ====================================================================== |
712 | ===================== Function 18, subfunction 3 ===================== |
715 | ===================== Function 18, subfunction 3 ===================== |
713 | ============= Make active the window of the given thread. ============ |
716 | ============= Make active the window of the given thread. ============ |
714 | ====================================================================== |
717 | ====================================================================== |
715 | Parameters: |
718 | Parameters: |
716 | * eax = 18 - function number |
719 | * eax = 18 - function number |
717 | * ebx = 3 - subfunction number |
720 | * ebx = 3 - subfunction number |
718 | * ecx = number of the thread slot |
721 | * ecx = number of the thread slot |
719 | Returned value: |
722 | Returned value: |
720 | * function does not return value |
723 | * function does not return value |
721 | Remarks: |
724 | Remarks: |
722 | * If correct, but nonexistent slot is given, |
725 | * If correct, but nonexistent slot is given, |
723 | some window is made active. |
726 | some window is made active. |
724 | * To find out, which window is active, use subfunction 7. |
727 | * To find out, which window is active, use subfunction 7. |
725 | 728 | ||
726 | ---------------------- Constants for registers: ---------------------- |
729 | ---------------------- Constants for registers: ---------------------- |
727 | eax - SF_SYSTEM (18) |
730 | eax - SF_SYSTEM (18) |
728 | ebx - SSF_FOCUS_WINDOW (3) |
731 | ebx - SSF_FOCUS_WINDOW (3) |
729 | ====================================================================== |
732 | ====================================================================== |
730 | ===================== Function 18, subfunction 4 ===================== |
733 | ===================== Function 18, subfunction 4 ===================== |
731 | =========== Get counter of idle time units per one second. =========== |
734 | =========== Get counter of idle time units per one second. =========== |
732 | ====================================================================== |
735 | ====================================================================== |
733 | Idle time units are units, in which the processor stands idle |
736 | Idle time units are units, in which the processor stands idle |
734 | in waiting for interrupt (in the command 'hlt'). |
737 | in waiting for interrupt (in the command 'hlt'). |
735 | 738 | ||
736 | Parameters: |
739 | Parameters: |
737 | * eax = 18 - function number |
740 | * eax = 18 - function number |
738 | * ebx = 4 - subfunction number |
741 | * ebx = 4 - subfunction number |
739 | Returned value: |
742 | Returned value: |
740 | * eax = value of the counter of idle time units per one second |
743 | * eax = value of the counter of idle time units per one second |
741 | 744 | ||
742 | ---------------------- Constants for registers: ---------------------- |
745 | ---------------------- Constants for registers: ---------------------- |
743 | eax - SF_SYSTEM (18) |
746 | eax - SF_SYSTEM (18) |
744 | ebx - SSF_GET_IDLE_COUNT (4) |
747 | ebx - SSF_GET_IDLE_COUNT (4) |
745 | ====================================================================== |
748 | ====================================================================== |
746 | ========== Function 18, subfunction 5 - get CPU clock rate. ========== |
749 | ========== Function 18, subfunction 5 - get CPU clock rate. ========== |
747 | ====================================================================== |
750 | ====================================================================== |
748 | Parameters: |
751 | Parameters: |
749 | * eax = 18 - function number |
752 | * eax = 18 - function number |
750 | * ebx = 5 - subfunction number |
753 | * ebx = 5 - subfunction number |
751 | Returned value: |
754 | Returned value: |
752 | * eax = clock rate (modulo 2^32 clock ticks = 4GHz) |
755 | * eax = clock rate (modulo 2^32 clock ticks = 4GHz) |
753 | 756 | ||
754 | ---------------------- Constants for registers: ---------------------- |
757 | ---------------------- Constants for registers: ---------------------- |
755 | eax - SF_SYSTEM (18) |
758 | eax - SF_SYSTEM (18) |
756 | ebx - SSF_GET_CPU_REQUENCY (5) |
759 | ebx - SSF_GET_CPU_REQUENCY (5) |
757 | ====================================================================== |
760 | ====================================================================== |
758 | Function 18, subfunction 6 - save ramdisk to the file on hard drive. |
761 | Function 18, subfunction 6 - save ramdisk to the file on hard drive. |
759 | ====================================================================== |
762 | ====================================================================== |
760 | Parameters: |
763 | Parameters: |
761 | * eax = 18 - function number |
764 | * eax = 18 - function number |
762 | * ebx = 6 - subfunction number |
765 | * ebx = 6 - subfunction number |
763 | * ecx = pointer to the full path to file |
766 | * ecx = pointer to the full path to file |
764 | (for example, "/hd0/1/kolibri/kolibri.img") |
767 | (for example, "/hd0/1/kolibri/kolibri.img") |
765 | Returned value: |
768 | Returned value: |
766 | * eax = 0 - success |
769 | * eax = 0 - success |
767 | * else eax = error code of the file system |
770 | * else eax = error code of the file system |
768 | Remarks: |
771 | Remarks: |
769 | * All folders in the given path must exist, otherwise function |
772 | * All folders in the given path must exist, otherwise function |
770 | returns value 5, "file not found". |
773 | returns value 5, "file not found". |
771 | 774 | ||
772 | ---------------------- Constants for registers: ---------------------- |
775 | ---------------------- Constants for registers: ---------------------- |
773 | eax - SF_SYSTEM (18) |
776 | eax - SF_SYSTEM (18) |
774 | ebx - SSF_RD_TO_HDD (6) |
777 | ebx - SSF_RD_TO_HDD (6) |
775 | ====================================================================== |
778 | ====================================================================== |
776 | =========== Function 18, subfunction 7 - get active window. ========== |
779 | =========== Function 18, subfunction 7 - get active window. ========== |
777 | ====================================================================== |
780 | ====================================================================== |
778 | Parameters: |
781 | Parameters: |
779 | * eax = 18 - function number |
782 | * eax = 18 - function number |
780 | * ebx = 7 - subfunction number |
783 | * ebx = 7 - subfunction number |
781 | Returned value: |
784 | Returned value: |
782 | * eax = number of the active window |
785 | * eax = number of the active window |
783 | (number of the slot of the thread with active window) |
786 | (number of the slot of the thread with active window) |
784 | Remarks: |
787 | Remarks: |
785 | * Active window is at the top of the window stack and receives |
788 | * Active window is at the top of the window stack and receives |
786 | messages on all keyboard input. |
789 | messages on all keyboard input. |
787 | * To make a window active, use subfunction 3. |
790 | * To make a window active, use subfunction 3. |
788 | 791 | ||
789 | ---------------------- Constants for registers: ---------------------- |
792 | ---------------------- Constants for registers: ---------------------- |
790 | eax - SF_SYSTEM (18) |
793 | eax - SF_SYSTEM (18) |
791 | ebx - SSF_GET_ACTIVE_WINDOW (7) |
794 | ebx - SSF_GET_ACTIVE_WINDOW (7) |
792 | ====================================================================== |
795 | ====================================================================== |
793 | == Function 18, subfunction 8 - disable/enable the internal speaker. = |
796 | == Function 18, subfunction 8 - disable/enable the internal speaker. = |
794 | ====================================================================== |
797 | ====================================================================== |
795 | If speaker sound is disabled, all calls to subfunction 55 of |
798 | If speaker sound is disabled, all calls to subfunction 55 of |
796 | function 55 are ignored. If speaker sound is enabled, |
799 | function 55 are ignored. If speaker sound is enabled, |
797 | they are routed on builtin speaker. |
800 | they are routed on builtin speaker. |
798 | 801 | ||
799 | ------------------- Subsubfunction 1 - get status. ------------------- |
802 | ------------------- Subsubfunction 1 - get status. ------------------- |
800 | Parameters: |
803 | Parameters: |
801 | * eax = 18 - function number |
804 | * eax = 18 - function number |
802 | * ebx = 8 - subfunction number |
805 | * ebx = 8 - subfunction number |
803 | * ecx = 1 - number of the subsubfunction |
806 | * ecx = 1 - number of the subsubfunction |
804 | Returned value: |
807 | Returned value: |
805 | * eax = 0 - speaker sound is enabled; 1 - disabled |
808 | * eax = 0 - speaker sound is enabled; 1 - disabled |
806 | 809 | ||
807 | ----------------- Subsubfunction 2 - toggle status. ------------------ |
810 | ----------------- Subsubfunction 2 - toggle status. ------------------ |
808 | Toggles states of disable/enable. |
811 | Toggles states of disable/enable. |
809 | Parameters: |
812 | Parameters: |
810 | * eax = 18 - function number |
813 | * eax = 18 - function number |
811 | * ebx = 8 - subfunction number |
814 | * ebx = 8 - subfunction number |
812 | * ecx = 2 - number of the subsubfunction |
815 | * ecx = 2 - number of the subsubfunction |
813 | Returned value: |
816 | Returned value: |
814 | * function does not return value |
817 | * function does not return value |
815 | 818 | ||
816 | ---------------------- Constants for registers: ---------------------- |
819 | ---------------------- Constants for registers: ---------------------- |
817 | eax - SF_SYSTEM (18) |
820 | eax - SF_SYSTEM (18) |
818 | ebx - SSF_SPEAKER (8) |
821 | ebx - SSF_SPEAKER (8) |
819 | ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2) |
822 | ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2) |
820 | ====================================================================== |
823 | ====================================================================== |
821 | == Function 18, subfunction 9 - system shutdown with the parameter. == |
824 | == Function 18, subfunction 9 - system shutdown with the parameter. == |
822 | ====================================================================== |
825 | ====================================================================== |
823 | Parameters: |
826 | Parameters: |
824 | * eax = 18 - function number |
827 | * eax = 18 - function number |
825 | * ebx = 9 - subfunction number |
828 | * ebx = 9 - subfunction number |
826 | * ecx = parameter: |
829 | * ecx = parameter: |
827 | * 2 = turn off computer |
830 | * 2 = turn off computer |
828 | * 3 = reboot computer |
831 | * 3 = reboot computer |
829 | * 4 = restart the kernel from the file 'kernel.mnt' on ramdisk |
832 | * 4 = restart the kernel from the file 'kernel.mnt' on ramdisk |
830 | Returned value: |
833 | Returned value: |
831 | * at incorrect ecx the registers do not change (i.e. eax=18) |
834 | * at incorrect ecx the registers do not change (i.e. eax=18) |
832 | * by correct call function always returns eax=0 |
835 | * by correct call function always returns eax=0 |
833 | as the tag of success |
836 | as the tag of success |
834 | Remarks: |
837 | Remarks: |
835 | * Do not rely on returned value by incorrect call, it can be |
838 | * Do not rely on returned value by incorrect call, it can be |
836 | changed in future versions of the kernel. |
839 | changed in future versions of the kernel. |
837 | 840 | ||
838 | ---------------------- Constants for registers: ---------------------- |
841 | ---------------------- Constants for registers: ---------------------- |
839 | eax - SF_SYSTEM (18) |
842 | eax - SF_SYSTEM (18) |
840 | ebx - SSF_SHUTDOWN (9) |
843 | ebx - SSF_SHUTDOWN (9) |
841 | ====================================================================== |
844 | ====================================================================== |
842 | ======= Function 18, subfunction 10 - minimize topmost window. ======= |
845 | ======= Function 18, subfunction 10 - minimize topmost window. ======= |
843 | ====================================================================== |
846 | ====================================================================== |
844 | Minimizes the topmost (active) window. |
847 | Minimizes the topmost (active) window. |
845 | Parameters: |
848 | Parameters: |
846 | * eax = 18 - function number |
849 | * eax = 18 - function number |
847 | * ebx = 10 - subfunction number |
850 | * ebx = 10 - subfunction number |
848 | Returned value: |
851 | Returned value: |
849 | * function does not return value |
852 | * function does not return value |
850 | Remarks: |
853 | Remarks: |
851 | * The minimized window from the point of view of function 9 |
854 | * The minimized window from the point of view of function 9 |
852 | keeps position and sizes. |
855 | keeps position and sizes. |
853 | * Restoring of an application window occurs at its activation by |
856 | * Restoring of an application window occurs at its activation by |
854 | subfunction 3. |
857 | subfunction 3. |
855 | * Usually there is no necessity to minimize/restore a window |
858 | * Usually there is no necessity to minimize/restore a window |
856 | explicitly: minimization of a window is carried out by the system |
859 | explicitly: minimization of a window is carried out by the system |
857 | at pressing the minimization button (for skinned windows |
860 | at pressing the minimization button (for skinned windows |
858 | it is defined automatically by function 0, |
861 | it is defined automatically by function 0, |
859 | for other windows it can be defined manually by function 8), |
862 | for other windows it can be defined manually by function 8), |
860 | restore of a window is done by the application '@taskbar'. |
863 | restore of a window is done by the application '@taskbar'. |
861 | 864 | ||
862 | ---------------------- Constants for registers: ---------------------- |
865 | ---------------------- Constants for registers: ---------------------- |
863 | eax - SF_SYSTEM (18) |
866 | eax - SF_SYSTEM (18) |
864 | ebx - SSF_MINIMIZE_WINDOW (10) |
867 | ebx - SSF_MINIMIZE_WINDOW (10) |
865 | ====================================================================== |
868 | ====================================================================== |
866 | Function 18, subfunction 11 - get information on the disk subsystem. |
869 | Function 18, subfunction 11 - get information on the disk subsystem. |
867 | ====================================================================== |
870 | ====================================================================== |
868 | Parameters: |
871 | Parameters: |
869 | * eax = 18 - function number |
872 | * eax = 18 - function number |
870 | * ebx = 11 - subfunction number |
873 | * ebx = 11 - subfunction number |
871 | * ecx = type of the table: |
874 | * ecx = type of the table: |
872 | * 1 = short version, 16 bytes |
875 | * 1 = short version, 16 bytes |
873 | * edx = pointer to the buffer (in the application) for the table |
876 | * edx = pointer to the buffer (in the application) for the table |
874 | Returned value: |
877 | Returned value: |
875 | * function does not return value |
878 | * function does not return value |
876 | Format of the table: short version: |
879 | Format of the table: short version: |
877 | * +0: byte: information about FDD's (drives for floppies), |
880 | * +0: byte: information about FDD's (drives for floppies), |
878 | AAAABBBB, where AAAA gives type of the first drive, BBBB - |
881 | AAAABBBB, where AAAA gives type of the first drive, BBBB - |
879 | of the second regarding to the following list: |
882 | of the second regarding to the following list: |
880 | * 0 = there is no drive |
883 | * 0 = there is no drive |
881 | * 1 = 360Kb, 5.25'' |
884 | * 1 = 360Kb, 5.25'' |
882 | * 2 = 1.2Mb, 5.25'' |
885 | * 2 = 1.2Mb, 5.25'' |
883 | * 3 = 720Kb, 3.5'' |
886 | * 3 = 720Kb, 3.5'' |
884 | * 4 = 1.44Mb, 3.5'' |
887 | * 4 = 1.44Mb, 3.5'' |
885 | * 5 = 2.88Mb, 3.5'' (such drives are not used anymore) |
888 | * 5 = 2.88Mb, 3.5'' (such drives are not used anymore) |
886 | For example, for the standard configuration from one 1.44-drive |
889 | For example, for the standard configuration from one 1.44-drive |
887 | here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: |
890 | here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: |
888 | the value is 24h. |
891 | the value is 24h. |
889 | 892 | ||
890 | First IDE controller: |
893 | First IDE controller: |
891 | * +1: byte: information about hard disks and CD-drives, AABBCCDD, |
894 | * +1: byte: information about hard disks and CD-drives, AABBCCDD, |
892 | where AA corresponds to the controller IDE0, ..., DD - IDE3: |
895 | where AA corresponds to the controller IDE0, ..., DD - IDE3: |
893 | * 0 = device not found |
896 | * 0 = device not found |
894 | * 1 = hard drive |
897 | * 1 = hard drive |
895 | * 2 = CD-drive |
898 | * 2 = CD-drive |
896 | For example, in the case HD on IDE0 and CD on IDE2 |
899 | For example, in the case HD on IDE0 and CD on IDE2 |
897 | this field contains 48h. |
900 | this field contains 48h. |
898 | * +2: 4 db: number of the retrieved partitions on hard disks |
901 | * +2: 4 db: number of the retrieved partitions on hard disks |
899 | at accordingly IDE0,...,IDE3. |
902 | at accordingly IDE0,...,IDE3. |
900 | 903 | ||
901 | Second IDE controller: |
904 | Second IDE controller: |
902 | * +6: byte: information about hard disks and CD-drives, AABBCCDD, |
905 | * +6: byte: information about hard disks and CD-drives, AABBCCDD, |
903 | where AA corresponds to the controller IDE4, ..., DD - IDE7: |
906 | where AA corresponds to the controller IDE4, ..., DD - IDE7: |
904 | * 0 = device not found |
907 | * 0 = device not found |
905 | * 1 = hard drive |
908 | * 1 = hard drive |
906 | * 2 = CD-drive |
909 | * 2 = CD-drive |
907 | For example, in the case HD on IDE4 and CD on IDE6 |
910 | For example, in the case HD on IDE4 and CD on IDE6 |
908 | this field contains 48h. |
911 | this field contains 48h. |
909 | * +7: 4 db: number of the retrieved partitions on hard disks |
912 | * +7: 4 db: number of the retrieved partitions on hard disks |
910 | at accordingly IDE4,...,IDE7. |
913 | at accordingly IDE4,...,IDE7. |
911 | 914 | ||
912 | Third IDE controller: |
915 | Third IDE controller: |
913 | * +11: byte: information about hard disks and CD-drives, AABBCCDD, |
916 | * +11: byte: information about hard disks and CD-drives, AABBCCDD, |
914 | where AA corresponds to the controller IDE8, ..., DD - IDE11: |
917 | where AA corresponds to the controller IDE8, ..., DD - IDE11: |
915 | * 0 = device not found |
918 | * 0 = device not found |
916 | * 1 = hard drive |
919 | * 1 = hard drive |
917 | * 2 = CD-drive |
920 | * 2 = CD-drive |
918 | For example, in the case HD on IDE8 and CD on IDE10 |
921 | For example, in the case HD on IDE8 and CD on IDE10 |
919 | this field contains 48h. |
922 | this field contains 48h. |
920 | * +12: 4 db: number of the retrieved partitions on hard disks |
923 | * +12: 4 db: number of the retrieved partitions on hard disks |
921 | at accordingly IDE8,...,IDE11. |
924 | at accordingly IDE8,...,IDE11. |
922 | 925 | ||
923 | If the hard disk on IDEx is absent, appropriate byte is zero, |
926 | If the hard disk on IDEx is absent, appropriate byte is zero, |
924 | otherwise it shows number of the recognized partitions, which |
927 | otherwise it shows number of the recognized partitions, which |
925 | can be not presented (if the drive is not formatted or if |
928 | can be not presented (if the drive is not formatted or if |
926 | the file system is not supported). Current version of the kernel |
929 | the file system is not supported). Current version of the kernel |
927 | supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks. |
930 | supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks. |
928 | 931 | ||
929 | Remarks: |
932 | Remarks: |
930 | * The table can be used for obtaining the information about |
933 | * The table can be used for obtaining the information about |
931 | available devices. |
934 | available devices. |
932 | 935 | ||
933 | ---------------------- Constants for registers: ---------------------- |
936 | ---------------------- Constants for registers: ---------------------- |
934 | eax - SF_SYSTEM (18) |
937 | eax - SF_SYSTEM (18) |
935 | ebx - SSF_INFO_DISC_SYS (11) |
938 | ebx - SSF_INFO_DISC_SYS (11) |
936 | ====================================================================== |
939 | ====================================================================== |
937 | ========== Function 18, subfunction 13 - get kernel version. ========= |
940 | ========== Function 18, subfunction 13 - get kernel version. ========= |
938 | ====================================================================== |
941 | ====================================================================== |
939 | Parameters: |
942 | Parameters: |
940 | * eax = 18 - function number |
943 | * eax = 18 - function number |
941 | * ebx = 13 - subfunction number |
944 | * ebx = 13 - subfunction number |
942 | * ecx = pointer to the buffer (not less than 16 bytes), where |
945 | * ecx = pointer to the buffer (not less than 16 bytes), where |
943 | the information will be placed |
946 | the information will be placed |
944 | Returned value: |
947 | Returned value: |
945 | * function does not return value |
948 | * function does not return value |
946 | Structure of the buffer: |
949 | Structure of the buffer: |
947 | db a,b,c,d for version a.b.c.d |
950 | db a,b,c,d for version a.b.c.d |
948 | db 0: reserved |
951 | db 0: reserved |
949 | dd REV - kernel SVN revision number |
952 | dd REV - kernel SVN revision number |
950 | For Kolibri 0.7.7.0+ kernel: |
953 | For Kolibri 0.7.7.0+ kernel: |
951 | db 0,7,7,0 |
954 | db 0,7,7,0 |
952 | db 0 |
955 | db 0 |
953 | dd 1675 |
956 | dd 1675 |
954 | 957 | ||
955 | ---------------------- Constants for registers: ---------------------- |
958 | ---------------------- Constants for registers: ---------------------- |
956 | eax - SF_SYSTEM (18) |
959 | eax - SF_SYSTEM (18) |
957 | ebx - SSF_KERNEL_VERSION (13) |
960 | ebx - SSF_KERNEL_VERSION (13) |
958 | ====================================================================== |
961 | ====================================================================== |
959 | ======= Function 18, subfunction 14 - wait for screen retrace. ======= |
962 | ======= Function 18, subfunction 14 - wait for screen retrace. ======= |
960 | ====================================================================== |
963 | ====================================================================== |
961 | Waits for the beginning of retrace of the scanning ray of the screen |
964 | Waits for the beginning of retrace of the scanning ray of the screen |
962 | monitor. |
965 | monitor. |
963 | Parameters: |
966 | Parameters: |
964 | * eax = 18 - function number |
967 | * eax = 18 - function number |
965 | * ebx = 14 - subfunction number |
968 | * ebx = 14 - subfunction number |
966 | Returned value: |
969 | Returned value: |
967 | * eax = 0 as the tag of success |
970 | * eax = 0 as the tag of success |
968 | Remarks: |
971 | Remarks: |
969 | * Function is intended only for active high-efficiency graphics |
972 | * Function is intended only for active high-efficiency graphics |
970 | applications; is used for smooth output of a graphics. |
973 | applications; is used for smooth output of a graphics. |
971 | 974 | ||
972 | ---------------------- Constants for registers: ---------------------- |
975 | ---------------------- Constants for registers: ---------------------- |
973 | eax - SF_SYSTEM (18) |
976 | eax - SF_SYSTEM (18) |
974 | ebx - SSF_WAIT_RETRACE (14) |
977 | ebx - SSF_WAIT_RETRACE (14) |
975 | ====================================================================== |
978 | ====================================================================== |
976 | == Function 18, subfunction 15 - center mouse cursor on the screen. == |
979 | == Function 18, subfunction 15 - center mouse cursor on the screen. == |
977 | ====================================================================== |
980 | ====================================================================== |
978 | Parameters: |
981 | Parameters: |
979 | * eax = 18 - function number |
982 | * eax = 18 - function number |
980 | * ebx = 15 - subfunction number |
983 | * ebx = 15 - subfunction number |
981 | Returned value: |
984 | Returned value: |
982 | * eax = 0 as the tag of success |
985 | * eax = 0 as the tag of success |
983 | 986 | ||
984 | ---------------------- Constants for registers: ---------------------- |
987 | ---------------------- Constants for registers: ---------------------- |
985 | eax - SF_SYSTEM (18) |
988 | eax - SF_SYSTEM (18) |
986 | ebx - SSF_CURSOR_CENTER (15) |
989 | ebx - SSF_CURSOR_CENTER (15) |
987 | ====================================================================== |
990 | ====================================================================== |
988 | ========= Function 18, subfunction 16 - get size of free RAM. ======== |
991 | ========= Function 18, subfunction 16 - get size of free RAM. ======== |
989 | ====================================================================== |
992 | ====================================================================== |
990 | Parameters: |
993 | Parameters: |
991 | * eax = 18 - function number |
994 | * eax = 18 - function number |
992 | * ebx = 16 - subfunction number |
995 | * ebx = 16 - subfunction number |
993 | Returned value: |
996 | Returned value: |
994 | * eax = size of free memory in kilobytes |
997 | * eax = size of free memory in kilobytes |
995 | 998 | ||
996 | ---------------------- Constants for registers: ---------------------- |
999 | ---------------------- Constants for registers: ---------------------- |
997 | eax - SF_SYSTEM (18) |
1000 | eax - SF_SYSTEM (18) |
998 | ebx - SSF_GET_FREE_RAM (16) |
1001 | ebx - SSF_GET_FREE_RAM (16) |
999 | ====================================================================== |
1002 | ====================================================================== |
1000 | ======== Function 18, subfunction 17 - get full amount of RAM. ======= |
1003 | ======== Function 18, subfunction 17 - get full amount of RAM. ======= |
1001 | ====================================================================== |
1004 | ====================================================================== |
1002 | Parameters: |
1005 | Parameters: |
1003 | * eax = 18 - function number |
1006 | * eax = 18 - function number |
1004 | * ebx = 17 - subfunction number |
1007 | * ebx = 17 - subfunction number |
1005 | Returned value: |
1008 | Returned value: |
1006 | * eax = total size of existing memory in kilobytes |
1009 | * eax = total size of existing memory in kilobytes |
1007 | 1010 | ||
1008 | ---------------------- Constants for registers: ---------------------- |
1011 | ---------------------- Constants for registers: ---------------------- |
1009 | eax - SF_SYSTEM (18) |
1012 | eax - SF_SYSTEM (18) |
1010 | ebx - SSF_GET_TOTAL_RAM (17) |
1013 | ebx - SSF_GET_TOTAL_RAM (17) |
1011 | ====================================================================== |
1014 | ====================================================================== |
1012 | ===================== Function 18, subfunction 18 ==================== |
1015 | ===================== Function 18, subfunction 18 ==================== |
1013 | ============= Terminate process/thread by the identifier. ============ |
1016 | ============= Terminate process/thread by the identifier. ============ |
1014 | ====================================================================== |
1017 | ====================================================================== |
1015 | Parameters: |
1018 | Parameters: |
1016 | * eax = 18 - function number |
1019 | * eax = 18 - function number |
1017 | * ebx = 18 - subfunction number |
1020 | * ebx = 18 - subfunction number |
1018 | * ecx = identifer of process/thread (PID/TID) |
1021 | * ecx = identifer of process/thread (PID/TID) |
1019 | Returned value: |
1022 | Returned value: |
1020 | * eax = 0 - success |
1023 | * eax = 0 - success |
1021 | * eax = -1 - error (process is not found or is system) |
1024 | * eax = -1 - error (process is not found or is system) |
1022 | Remarks: |
1025 | Remarks: |
1023 | * It is impossible to terminate system thread OS/IDLE (identifier |
1026 | * It is impossible to terminate system thread OS/IDLE (identifier |
1024 | 1), it is possible to terminate any normal process/thread. |
1027 | 1), it is possible to terminate any normal process/thread. |
1025 | * See also subfunction 2 - terminate |
1028 | * See also subfunction 2 - terminate |
1026 | process/thread by given slot. |
1029 | process/thread by given slot. |
1027 | 1030 | ||
1028 | ---------------------- Constants for registers: ---------------------- |
1031 | ---------------------- Constants for registers: ---------------------- |
1029 | eax - SF_SYSTEM (18) |
1032 | eax - SF_SYSTEM (18) |
1030 | ebx - SSF_TERMINATE_THREAD_ID (18) |
1033 | ebx - SSF_TERMINATE_THREAD_ID (18) |
1031 | ====================================================================== |
1034 | ====================================================================== |
1032 | ======== Function 18, subfunction 19 - get/set mouse features. ======= |
1035 | ======== Function 18, subfunction 19 - get/set mouse features. ======= |
1033 | ====================================================================== |
1036 | ====================================================================== |
1034 | 1037 | ||
1035 | ---------------- Subsubfunction 0 - get mouse speed. ----------------- |
1038 | ---------------- Subsubfunction 0 - get mouse speed. ----------------- |
1036 | Parameters: |
1039 | Parameters: |
1037 | * eax = 18 - function number |
1040 | * eax = 18 - function number |
1038 | * ebx = 19 - subfunction number |
1041 | * ebx = 19 - subfunction number |
1039 | * ecx = 0 - subsubfunction number |
1042 | * ecx = 0 - subsubfunction number |
1040 | Returned value: |
1043 | Returned value: |
1041 | * eax = current mouse speed |
1044 | * eax = current mouse speed |
1042 | 1045 | ||
1043 | ---------------- Subsubfunction 1 - set mouse speed. ----------------- |
1046 | ---------------- Subsubfunction 1 - set mouse speed. ----------------- |
1044 | Parameters: |
1047 | Parameters: |
1045 | * eax = 18 - function number |
1048 | * eax = 18 - function number |
1046 | * ebx = 19 - subfunction number |
1049 | * ebx = 19 - subfunction number |
1047 | * ecx = 1 - subsubfunction number |
1050 | * ecx = 1 - subsubfunction number |
1048 | * edx = new value for speed |
1051 | * edx = new value for speed |
1049 | Returned value: |
1052 | Returned value: |
1050 | * function does not return value |
1053 | * function does not return value |
1051 | 1054 | ||
1052 | Remark: recommended speed = 1, 0 = lock the cursor. |
1055 | Remark: recommended speed = 1, 0 = lock the cursor. |
1053 | 1056 | ||
1054 | ------------- Subsubfunction 2 - get mouse acceleration. ------------- |
1057 | ------------- Subsubfunction 2 - get mouse acceleration. ------------- |
1055 | Parameters: |
1058 | Parameters: |
1056 | * eax = 18 - function number |
1059 | * eax = 18 - function number |
1057 | * ebx = 19 - subfunction number |
1060 | * ebx = 19 - subfunction number |
1058 | * ecx = 2 - subsubfunction number |
1061 | * ecx = 2 - subsubfunction number |
1059 | Returned value: |
1062 | Returned value: |
1060 | * eax = 0 - off, 1 - slight, 2 - medium, 3 - intense |
1063 | * eax = 0 - off, 1 - slight, 2 - medium, 3 - intense |
1061 | 1064 | ||
1062 | ------------- Subsubfunction 3 - set mouse acceleration. ------------- |
1065 | ------------- Subsubfunction 3 - set mouse acceleration. ------------- |
1063 | Parameters: |
1066 | Parameters: |
1064 | * eax = 18 - function number |
1067 | * eax = 18 - function number |
1065 | * ebx = 19 - subfunction number |
1068 | * ebx = 19 - subfunction number |
1066 | * ecx = 3 - subsubfunction number |
1069 | * ecx = 3 - subsubfunction number |
1067 | * edx = 0 - off, 1 - slight, 2 - medium, 3 - intense |
1070 | * edx = 0 - off, 1 - slight, 2 - medium, 3 - intense |
1068 | Returned value: |
1071 | Returned value: |
1069 | * function does not return value |
1072 | * function does not return value |
1070 | 1073 | ||
1071 | ----------- Subsubfunction 4 - set mouse pointer position. ----------- |
1074 | ----------- Subsubfunction 4 - set mouse pointer position. ----------- |
1072 | Parameters: |
1075 | Parameters: |
1073 | * eax = 18 - function number |
1076 | * eax = 18 - function number |
1074 | * ebx = 19 - subfunction number |
1077 | * ebx = 19 - subfunction number |
1075 | * ecx = 4 - subsubfunction number |
1078 | * ecx = 4 - subsubfunction number |
1076 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1079 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1077 | Returned value: |
1080 | Returned value: |
1078 | * function does not return value |
1081 | * function does not return value |
1079 | 1082 | ||
1080 | -------- Subsubfunction 5 - simulate state of mouse buttons. --------- |
1083 | -------- Subsubfunction 5 - simulate state of mouse buttons. --------- |
1081 | Parameters: |
1084 | Parameters: |
1082 | * eax = 18 - function number |
1085 | * eax = 18 - function number |
1083 | * ebx = 19 - subfunction number |
1086 | * ebx = 19 - subfunction number |
1084 | * ecx = 5 - subsubfunction number |
1087 | * ecx = 5 - subsubfunction number |
1085 | * edx = information about emulated state of mouse buttons: |
1088 | * edx = information about emulated state of mouse buttons: |
1086 | (same as return value in subfunction 2 of function 37) |
1089 | (same as return value in subfunction 2 of function 37) |
1087 | * bit 0 is set = left button is pressed |
1090 | * bit 0 is set = left button is pressed |
1088 | * bit 1 is set = right button is pressed |
1091 | * bit 1 is set = right button is pressed |
1089 | * bit 2 is set = middle button is pressed |
1092 | * bit 2 is set = middle button is pressed |
1090 | * bit 3 is set = 4th button is pressed |
1093 | * bit 3 is set = 4th button is pressed |
1091 | * bit 4 is set = 5th button is pressed |
1094 | * bit 4 is set = 5th button is pressed |
1092 | Returned value: |
1095 | Returned value: |
1093 | * function does not return value |
1096 | * function does not return value |
1094 | 1097 | ||
1095 | -------------- Subsubfunction 6 - get doubleclick delay. ------------- |
1098 | -------------- Subsubfunction 6 - get doubleclick delay. ------------- |
1096 | Parameters: |
1099 | Parameters: |
1097 | * eax = 18 - function number |
1100 | * eax = 18 - function number |
1098 | * ebx = 19 - subfunction number |
1101 | * ebx = 19 - subfunction number |
1099 | * ecx = 6 - subsubfunction number |
1102 | * ecx = 6 - subsubfunction number |
1100 | Returned value: |
1103 | Returned value: |
1101 | * eax = current doubleclick delay (100 = 1 second) |
1104 | * eax = current doubleclick delay (100 = 1 second) |
1102 | 1105 | ||
1103 | -------------- Subsubfunction 7 - set doubleclick delay. ------------- |
1106 | -------------- Subsubfunction 7 - set doubleclick delay. ------------- |
1104 | Parameters: |
1107 | Parameters: |
1105 | * eax = 18 - function number |
1108 | * eax = 18 - function number |
1106 | * ebx = 19 - subfunction number |
1109 | * ebx = 19 - subfunction number |
1107 | * ecx = 7 - subsubfunction number |
1110 | * ecx = 7 - subsubfunction number |
1108 | * dl = new value for doubleclick delay (100 = 1 second) |
1111 | * dl = new value for doubleclick delay (100 = 1 second) |
1109 | Returned value: |
1112 | Returned value: |
1110 | * function does not return value |
1113 | * function does not return value |
1111 | 1114 | ||
1112 | Remark: mouse settings can be modified in the application mouse_cfg. |
1115 | Remark: mouse settings can be modified in the application mouse_cfg. |
1113 | 1116 | ||
1114 | ---------------------- Constants for registers: ---------------------- |
1117 | ---------------------- Constants for registers: ---------------------- |
1115 | eax - SF_SYSTEM (18) |
1118 | eax - SF_SYSTEM (18) |
1116 | ebx - SSF_MOUSE_SETTINGS (19) |
1119 | ebx - SSF_MOUSE_SETTINGS (19) |
1117 | ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2), |
1120 | ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2), |
1118 | SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5), |
1121 | SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5), |
1119 | SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7) |
1122 | SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7) |
1120 | ====================================================================== |
1123 | ====================================================================== |
1121 | ======== Function 18, subfunction 20 - get information on RAM. ======= |
1124 | ======== Function 18, subfunction 20 - get information on RAM. ======= |
1122 | ====================================================================== |
1125 | ====================================================================== |
1123 | Parameters: |
1126 | Parameters: |
1124 | * eax = 18 - function number |
1127 | * eax = 18 - function number |
1125 | * ebx = 20 - subfunction number |
1128 | * ebx = 20 - subfunction number |
1126 | * ecx = pointer to the buffer for information (36 bytes) |
1129 | * ecx = pointer to the buffer for information (36 bytes) |
1127 | Returned value: |
1130 | Returned value: |
1128 | * eax = total size of existing RAM in pages |
1131 | * eax = total size of existing RAM in pages |
1129 | or -1 if error has occured |
1132 | or -1 if error has occured |
1130 | * buffer pointed to by ecx contains the following information: |
1133 | * buffer pointed to by ecx contains the following information: |
1131 | * +0: dword: total size of existing RAM in pages |
1134 | * +0: dword: total size of existing RAM in pages |
1132 | * +4: dword: size of free RAM in pages |
1135 | * +4: dword: size of free RAM in pages |
1133 | * +8: dword: number of page faults (exceptions #PF) |
1136 | * +8: dword: number of page faults (exceptions #PF) |
1134 | in applications |
1137 | in applications |
1135 | * +12: dword: size of kernel heap in bytes |
1138 | * +12: dword: size of kernel heap in bytes |
1136 | * +16: dword: free in kernel heap in bytes |
1139 | * +16: dword: free in kernel heap in bytes |
1137 | * +20: dword: total number of memory blocks in kernel heap |
1140 | * +20: dword: total number of memory blocks in kernel heap |
1138 | * +24: dword: number of free memory blocks in kernel heap |
1141 | * +24: dword: number of free memory blocks in kernel heap |
1139 | * +28: dword: size of maximum free block in kernel heap |
1142 | * +28: dword: size of maximum free block in kernel heap |
1140 | (reserved) |
1143 | (reserved) |
1141 | * +32: dword: size of maximum allocated block in kernel heap |
1144 | * +32: dword: size of maximum allocated block in kernel heap |
1142 | (reserved) |
1145 | (reserved) |
1143 | 1146 | ||
1144 | ---------------------- Constants for registers: ---------------------- |
1147 | ---------------------- Constants for registers: ---------------------- |
1145 | eax - SF_SYSTEM (18) |
1148 | eax - SF_SYSTEM (18) |
1146 | ebx - SSF_GET_RAM_INFO (20) |
1149 | ebx - SSF_GET_RAM_INFO (20) |
1147 | ====================================================================== |
1150 | ====================================================================== |
1148 | ===================== Function 18, subfunction 21 ==================== |
1151 | ===================== Function 18, subfunction 21 ==================== |
1149 | ======== Get slot number of process/thread by the identifier. ======== |
1152 | ======== Get slot number of process/thread by the identifier. ======== |
1150 | ====================================================================== |
1153 | ====================================================================== |
1151 | Parameters: |
1154 | Parameters: |
1152 | * eax = 18 - function number |
1155 | * eax = 18 - function number |
1153 | * ebx = 21 - subfunction number |
1156 | * ebx = 21 - subfunction number |
1154 | * ecx = identifer of process/thread (PID/TID) |
1157 | * ecx = identifer of process/thread (PID/TID) |
1155 | Returned value: |
1158 | Returned value: |
1156 | * eax = 0 - error (invalid identifier) |
1159 | * eax = 0 - error (invalid identifier) |
1157 | * otherwise eax = slot number |
1160 | * otherwise eax = slot number |
1158 | 1161 | ||
1159 | ---------------------- Constants for registers: ---------------------- |
1162 | ---------------------- Constants for registers: ---------------------- |
1160 | eax - SF_SYSTEM (18) |
1163 | eax - SF_SYSTEM (18) |
1161 | ebx - SSF_GET_THREAD_SLOT (21) |
1164 | ebx - SSF_GET_THREAD_SLOT (21) |
1162 | ====================================================================== |
1165 | ====================================================================== |
1163 | ===================== Function 18, subfunction 22 ==================== |
1166 | ===================== Function 18, subfunction 22 ==================== |
1164 | ============== Operations with window of another thread. ============= |
1167 | ============== Operations with window of another thread. ============= |
1165 | ====================================================================== |
1168 | ====================================================================== |
1166 | Parameters: |
1169 | Parameters: |
1167 | * eax = 18 - function number |
1170 | * eax = 18 - function number |
1168 | * ebx = 22 - subfunction number |
1171 | * ebx = 22 - subfunction number |
1169 | * ecx = operation type: |
1172 | * ecx = operation type: |
1170 | * 0 = minimize window of the thread with given slot number |
1173 | * 0 = minimize window of the thread with given slot number |
1171 | * 1 = minimize window of the thread with given identifier |
1174 | * 1 = minimize window of the thread with given identifier |
1172 | * 2 = restore window of the thread with given slot number |
1175 | * 2 = restore window of the thread with given slot number |
1173 | * 3 = restore window of the thread with given identifier |
1176 | * 3 = restore window of the thread with given identifier |
1174 | * edx = parameter (slot number or PID/TID) |
1177 | * edx = parameter (slot number or PID/TID) |
1175 | Returned value: |
1178 | Returned value: |
1176 | * eax = 0 - success |
1179 | * eax = 0 - success |
1177 | * eax = -1 - error (invalid identifier) |
1180 | * eax = -1 - error (invalid identifier) |
1178 | Remarks: |
1181 | Remarks: |
1179 | * The thread can minimize its window with subfunction 10. |
1182 | * The thread can minimize its window with subfunction 10. |
1180 | * One can restore and activate window simultaneously with |
1183 | * One can restore and activate window simultaneously with |
1181 | subfunction 3 (which requires slot number). |
1184 | subfunction 3 (which requires slot number). |
1182 | 1185 | ||
1183 | ---------------------- Constants for registers: ---------------------- |
1186 | ---------------------- Constants for registers: ---------------------- |
1184 | eax - SF_SYSTEM (18) |
1187 | eax - SF_SYSTEM (18) |
1185 | ebx - SSF_FOREIGN_WINDOW (22) |
1188 | ebx - SSF_FOREIGN_WINDOW (22) |
1186 | ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2), |
1189 | ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2), |
1187 | SSSF_RESTORE_ID (3) |
1190 | SSSF_RESTORE_ID (3) |
1188 | ====================================================================== |
1191 | ====================================================================== |
1189 | ======== Function 18, subfunction 23 - minimize all windows. ========== |
1192 | ======== Function 18, subfunction 23 - minimize all windows. ========== |
1190 | ====================================================================== |
1193 | ====================================================================== |
1191 | Parameters: |
1194 | Parameters: |
1192 | * eax = 18 - function number |
1195 | * eax = 18 - function number |
1193 | * ebx = 23 - subfunction number |
1196 | * ebx = 23 - subfunction number |
1194 | Returned value: |
1197 | Returned value: |
1195 | * eax = 0 - all windows have been minimized before a function call |
1198 | * eax = 0 - all windows have been minimized before a function call |
1196 | * eax = N - number of windows minimized from function |
1199 | * eax = N - number of windows minimized from function |
1197 | Remarks: |
1200 | Remarks: |
1198 | * Window of special thread (name begin to symbol @) is not minimize. |
1201 | * Window of special thread (name begin to symbol @) is not minimize. |
1199 | 1202 | ||
1200 | ---------------------- Constants for registers: ---------------------- |
1203 | ---------------------- Constants for registers: ---------------------- |
1201 | eax - SF_SYSTEM (18) |
1204 | eax - SF_SYSTEM (18) |
1202 | ebx - SSF_MINIMIZE_ALL (23) |
1205 | ebx - SSF_MINIMIZE_ALL (23) |
1203 | ====================================================================== |
1206 | ====================================================================== |
1204 | ======= Function 18, subfunction 24 - set limits of screen. ========== |
1207 | ======= Function 18, subfunction 24 - set limits of screen. ========== |
1205 | ====================================================================== |
1208 | ====================================================================== |
1206 | Parameters: |
1209 | Parameters: |
1207 | * eax = 18 - function number |
1210 | * eax = 18 - function number |
1208 | * ebx = 24 - subfunction number |
1211 | * ebx = 24 - subfunction number |
1209 | * ecx = new X size |
1212 | * ecx = new X size |
1210 | * edx = new Y size |
1213 | * edx = new Y size |
1211 | Returned value: |
1214 | Returned value: |
1212 | * function does not return value |
1215 | * function does not return value |
1213 | Remarks: |
1216 | Remarks: |
1214 | * The function does not change the physical size of the video mode. |
1217 | * The function does not change the physical size of the video mode. |
1215 | It is designed for non-standard displays which display the image |
1218 | It is designed for non-standard displays which display the image |
1216 | partially. |
1219 | partially. |
1217 | * The sizes specified in the function should not exceed the sizes |
1220 | * The sizes specified in the function should not exceed the sizes |
1218 | of the current video mode, otherwise the function will not change |
1221 | of the current video mode, otherwise the function will not change |
1219 | anything. |
1222 | anything. |
1220 | 1223 | ||
1221 | ---------------------- Constants for registers: ---------------------- |
1224 | ---------------------- Constants for registers: ---------------------- |
1222 | eax - SF_SYSTEM (18) |
1225 | eax - SF_SYSTEM (18) |
1223 | ebx - SSF_SET_SCREEN_LIMITS (24) |
1226 | ebx - SSF_SET_SCREEN_LIMITS (24) |
1224 | ====================================================================== |
1227 | ====================================================================== |
1225 | ===================== Function 18, subfunction 25 ==================== |
1228 | ===================== Function 18, subfunction 25 ==================== |
1226 | ===== Control position of the window relative to other windows. ====== |
1229 | ===== Control position of the window relative to other windows. ====== |
1227 | ====================================================================== |
1230 | ====================================================================== |
1228 | 1231 | ||
1229 | ------------- Subsubfunction 1 - get position ----------------------- |
1232 | ------------- Subsubfunction 1 - get position ----------------------- |
1230 | Parameters: |
1233 | Parameters: |
1231 | * eax = 18 - function number |
1234 | * eax = 18 - function number |
1232 | * ebx = 25 - subfunction number |
1235 | * ebx = 25 - subfunction number |
1233 | * ecx = 1 - subsubfunction number |
1236 | * ecx = 1 - subsubfunction number |
1234 | * edx = -1(for current window) or PID application |
1237 | * edx = -1(for current window) or PID application |
1235 | Returned value: |
1238 | Returned value: |
1236 | * eax = one of the constants window position |
1239 | * eax = one of the constants window position |
1237 | 1240 | ||
1238 | ------------- Subsubfunction 2 - set position ----------------------- |
1241 | ------------- Subsubfunction 2 - set position ----------------------- |
1239 | Parameters: |
1242 | Parameters: |
1240 | * eax = 18 - function number |
1243 | * eax = 18 - function number |
1241 | * ebx = 25 - subfunction number |
1244 | * ebx = 25 - subfunction number |
1242 | * ecx = 2 - subsubfunction number |
1245 | * ecx = 2 - subsubfunction number |
1243 | * edx = -1(for current window) or PID application |
1246 | * edx = -1(for current window) or PID application |
1244 | * esi = new window position (one of the constants below) |
1247 | * esi = new window position (one of the constants below) |
1245 | Returned value: |
1248 | Returned value: |
1246 | * eax = 0 - error |
1249 | * eax = 0 - error |
1247 | * eax = 1 - success |
1250 | * eax = 1 - success |
1248 | 1251 | ||
1249 | Constant position of the window relative to other windows: |
1252 | Constant position of the window relative to other windows: |
1250 | ZPOS_DESKTOP = -2 - on the background |
1253 | ZPOS_DESKTOP = -2 - on the background |
1251 | ZPOS_ALWAYS_BACK = -1 - behind all the windows |
1254 | ZPOS_ALWAYS_BACK = -1 - behind all the windows |
1252 | ZPOS_NORMAL = 0 - normal |
1255 | ZPOS_NORMAL = 0 - normal |
1253 | ZPOS_ALWAYS_TOP = 1 - on top of all windows |
1256 | ZPOS_ALWAYS_TOP = 1 - on top of all windows |
1254 | 1257 | ||
1255 | ---------------------- Constants for registers: ---------------------- |
1258 | ---------------------- Constants for registers: ---------------------- |
1256 | eax - SF_SYSTEM (18) |
1259 | eax - SF_SYSTEM (18) |
1257 | ebx - SSF_WINDOW_BEHAVIOR (25) |
1260 | ebx - SSF_WINDOW_BEHAVIOR (25) |
1258 | ecx - SSSF_GET_WB (1), SSSF_SET_WB (2) |
1261 | ecx - SSSF_GET_WB (1), SSSF_SET_WB (2) |
1259 | ====================================================================== |
1262 | ====================================================================== |
1260 | ==================== Function 20 - MIDI interface. =================== |
1263 | ==================== Function 20 - MIDI interface. =================== |
1261 | ====================================================================== |
1264 | ====================================================================== |
1262 | 1265 | ||
1263 | ----------------------- Subfunction 1 - reset ------------------------ |
1266 | ----------------------- Subfunction 1 - reset ------------------------ |
1264 | Parameters: |
1267 | Parameters: |
1265 | * eax = 20 - function number |
1268 | * eax = 20 - function number |
1266 | * ebx = 1 - subfunction number |
1269 | * ebx = 1 - subfunction number |
1267 | 1270 | ||
1268 | -------------------- Subfunction 2 - output byte --------------------- |
1271 | -------------------- Subfunction 2 - output byte --------------------- |
1269 | Parameters: |
1272 | Parameters: |
1270 | * eax = 20 - function number |
1273 | * eax = 20 - function number |
1271 | * ebx = 2 - subfunction number |
1274 | * ebx = 2 - subfunction number |
1272 | * cl = byte for output |
1275 | * cl = byte for output |
1273 | Returned value (is the same for both subfunctions): |
1276 | Returned value (is the same for both subfunctions): |
1274 | * eax = 0 - success |
1277 | * eax = 0 - success |
1275 | * eax = 1 - base port is not defined |
1278 | * eax = 1 - base port is not defined |
1276 | Remarks: |
1279 | Remarks: |
1277 | * Previously the base port must be defined by |
1280 | * Previously the base port must be defined by |
1278 | subfunction 1 of function 21. |
1281 | subfunction 1 of function 21. |
1279 | 1282 | ||
1280 | ---------------------- Constants for registers: ---------------------- |
1283 | ---------------------- Constants for registers: ---------------------- |
1281 | eax - SF_MIDI (20) |
1284 | eax - SF_MIDI (20) |
1282 | ebx - SSF_RESET (1), SSF_OUTPUT (2) |
1285 | ebx - SSF_RESET (1), SSF_OUTPUT (2) |
1283 | ====================================================================== |
1286 | ====================================================================== |
1284 | ======== Function 21, subfunction 1 - set MPU MIDI base port. ======== |
1287 | ======== Function 21, subfunction 1 - set MPU MIDI base port. ======== |
1285 | ====================================================================== |
1288 | ====================================================================== |
1286 | Parameters: |
1289 | Parameters: |
1287 | * eax = 21 - function number |
1290 | * eax = 21 - function number |
1288 | * ebx = 1 - subfunction number |
1291 | * ebx = 1 - subfunction number |
1289 | * ecx = number of base port |
1292 | * ecx = number of base port |
1290 | Returned value |
1293 | Returned value |
1291 | * eax = 0 - success |
1294 | * eax = 0 - success |
1292 | * eax = -1 - erratic number of a port |
1295 | * eax = -1 - erratic number of a port |
1293 | Remarks: |
1296 | Remarks: |
1294 | * Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF. |
1297 | * Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF. |
1295 | * The installation of base is necessary for function 20. |
1298 | * The installation of base is necessary for function 20. |
1296 | * To get base port use subfunction 1 of function 26. |
1299 | * To get base port use subfunction 1 of function 26. |
1297 | 1300 | ||
1298 | ---------------------- Constants for registers: ---------------------- |
1301 | ---------------------- Constants for registers: ---------------------- |
1299 | eax - SF_SYSTEM_SET (21) |
1302 | eax - SF_SYSTEM_SET (21) |
1300 | ebx - SSF_MPU_MIDI_BASE (1) |
1303 | ebx - SSF_MPU_MIDI_BASE (1) |
1301 | ====================================================================== |
1304 | ====================================================================== |
1302 | ========== Function 21, subfunction 2 - set keyboard layout. ========= |
1305 | ========== Function 21, subfunction 2 - set keyboard layout. ========= |
1303 | ====================================================================== |
1306 | ====================================================================== |
1304 | Keyboard layout is used to convert keyboard scancodes to ASCII-codes, |
1307 | Keyboard layout is used to convert keyboard scancodes to ASCII-codes, |
1305 | which will be read by function 2. |
1308 | which will be read by function 2. |
1306 | Parameters: |
1309 | Parameters: |
1307 | * eax = 21 - function number |
1310 | * eax = 21 - function number |
1308 | * ebx = 2 - subfunction number |
1311 | * ebx = 2 - subfunction number |
1309 | * ecx = which layout to set: |
1312 | * ecx = which layout to set: |
1310 | * 1 = normal layout |
1313 | * 1 = normal layout |
1311 | * 2 = layout at pressed Shift |
1314 | * 2 = layout at pressed Shift |
1312 | * 3 = layout at pressed Alt |
1315 | * 3 = layout at pressed Alt |
1313 | * edx = pointer to layout - table of length 128 bytes |
1316 | * edx = pointer to layout - table of length 128 bytes |
1314 | Or: |
1317 | Or: |
1315 | * ecx = 9 |
1318 | * ecx = 9 |
1316 | * dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
1319 | * dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
1317 | Returned value: |
1320 | Returned value: |
1318 | * eax = 0 - success |
1321 | * eax = 0 - success |
1319 | * eax = 1 - incorrect parameter |
1322 | * eax = 1 - incorrect parameter |
1320 | Remarks: |
1323 | Remarks: |
1321 | * If Alt is pressed, the layout with Alt is used; |
1324 | * If Alt is pressed, the layout with Alt is used; |
1322 | if Alt is not pressed, but Shift is pressed, |
1325 | if Alt is not pressed, but Shift is pressed, |
1323 | the layout with Shift is used; |
1326 | the layout with Shift is used; |
1324 | if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
1327 | if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
1325 | layout is used and then from the code is subtracted 0x60; |
1328 | layout is used and then from the code is subtracted 0x60; |
1326 | if no control key is pressed, the normal layout is used. |
1329 | if no control key is pressed, the normal layout is used. |
1327 | * To get layout and country identifier use |
1330 | * To get layout and country identifier use |
1328 | subfunction 2 of function 26. |
1331 | subfunction 2 of function 26. |
1329 | * Country identifier is global system variable, which is not used |
1332 | * Country identifier is global system variable, which is not used |
1330 | by the kernel itself; however the application '@taskbar' displays |
1333 | by the kernel itself; however the application '@taskbar' displays |
1331 | the corresponding icon. |
1334 | the corresponding icon. |
1332 | * The application @taskbar switches layouts on user request. |
1335 | * The application @taskbar switches layouts on user request. |
1333 | 1336 | ||
1334 | ---------------------- Constants for registers: ---------------------- |
1337 | ---------------------- Constants for registers: ---------------------- |
1335 | eax - SF_SYSTEM_SET (21) |
1338 | eax - SF_SYSTEM_SET (21) |
1336 | ebx - SSF_KEYBOARD_LAYOUT (2) |
1339 | ebx - SSF_KEYBOARD_LAYOUT (2) |
1337 | ====================================================================== |
1340 | ====================================================================== |
1338 | ========== Function 21, subfunction 5 - set system language. ========= |
1341 | ========== Function 21, subfunction 5 - set system language. ========= |
1339 | ====================================================================== |
1342 | ====================================================================== |
1340 | Parameters: |
1343 | Parameters: |
1341 | * eax = 21 - function number |
1344 | * eax = 21 - function number |
1342 | * ebx = 5 - subfunction number |
1345 | * ebx = 5 - subfunction number |
1343 | * ecx = system language (1=eng, 2=fi, 3=ger, 4=rus) |
1346 | * ecx = system language (1=eng, 2=fi, 3=ger, 4=rus) |
1344 | Returned value: |
1347 | Returned value: |
1345 | * eax = 0 |
1348 | * eax = 0 |
1346 | Remarks: |
1349 | Remarks: |
1347 | * System language is global system variable and is not used |
1350 | * System language is global system variable and is not used |
1348 | by the kernel itself, however application @taskbar draws the |
1351 | by the kernel itself, however application @taskbar draws the |
1349 | appropriate icon. |
1352 | appropriate icon. |
1350 | * Function does not check for correctness, as the kernel does not |
1353 | * Function does not check for correctness, as the kernel does not |
1351 | use this variable. |
1354 | use this variable. |
1352 | * To get system language use subfunction 5 of function 26. |
1355 | * To get system language use subfunction 5 of function 26. |
1353 | 1356 | ||
1354 | ---------------------- Constants for registers: ---------------------- |
1357 | ---------------------- Constants for registers: ---------------------- |
1355 | eax - SF_SYSTEM_SET (21) |
1358 | eax - SF_SYSTEM_SET (21) |
1356 | ebx - SSF_SYS_LANG (5) |
1359 | ebx - SSF_SYS_LANG (5) |
1357 | ====================================================================== |
1360 | ====================================================================== |
1358 | Function 21, subfunction 11 - enable/disable low-level access to HD. |
1361 | Function 21, subfunction 11 - enable/disable low-level access to HD. |
1359 | ====================================================================== |
1362 | ====================================================================== |
1360 | Parameters: |
1363 | Parameters: |
1361 | * eax = 21 - function number |
1364 | * eax = 21 - function number |
1362 | * ebx = 11 - subfunction number |
1365 | * ebx = 11 - subfunction number |
1363 | * ecx = 0/1 - disable/enable |
1366 | * ecx = 0/1 - disable/enable |
1364 | Returned value: |
1367 | Returned value: |
1365 | * eax = 0 |
1368 | * eax = 0 |
1366 | Remarks: |
1369 | Remarks: |
1367 | * Is used in LBA-read (subfunction 8 of function 58). |
1370 | * Is used in LBA-read (subfunction 8 of function 58). |
1368 | * The current implementation uses only low bit of ecx. |
1371 | * The current implementation uses only low bit of ecx. |
1369 | * To get current status use subfunction 11 of function 26. |
1372 | * To get current status use subfunction 11 of function 26. |
1370 | 1373 | ||
1371 | ---------------------- Constants for registers: ---------------------- |
1374 | ---------------------- Constants for registers: ---------------------- |
1372 | eax - SF_SYSTEM_SET (21) |
1375 | eax - SF_SYSTEM_SET (21) |
1373 | ebx - SSF_ACCESS_HD_LBA (11) |
1376 | ebx - SSF_ACCESS_HD_LBA (11) |
1374 | ====================================================================== |
1377 | ====================================================================== |
1375 | Function 21, subfunction 12 - enable/disable low-level access to PCI. |
1378 | Function 21, subfunction 12 - enable/disable low-level access to PCI. |
1376 | ====================================================================== |
1379 | ====================================================================== |
1377 | Parameters: |
1380 | Parameters: |
1378 | * eax = 21 - function number |
1381 | * eax = 21 - function number |
1379 | * ebx = 12 - subfunction number |
1382 | * ebx = 12 - subfunction number |
1380 | * ecx = 0/1 - disable/enable |
1383 | * ecx = 0/1 - disable/enable |
1381 | Returned value: |
1384 | Returned value: |
1382 | * eax = 0 |
1385 | * eax = 0 |
1383 | Remarks: |
1386 | Remarks: |
1384 | * Is used in operations with PCI bus (function 62). |
1387 | * Is used in operations with PCI bus (function 62). |
1385 | * The current implementation uses only low bit of ecx. |
1388 | * The current implementation uses only low bit of ecx. |
1386 | * To get current status use subfunction 12 of function 26. |
1389 | * To get current status use subfunction 12 of function 26. |
1387 | 1390 | ||
1388 | ---------------------- Constants for registers: ---------------------- |
1391 | ---------------------- Constants for registers: ---------------------- |
1389 | eax - SF_SYSTEM_SET (21) |
1392 | eax - SF_SYSTEM_SET (21) |
1390 | ebx - SSF_ACCESS_PCI (12) |
1393 | ebx - SSF_ACCESS_PCI (12) |
1391 | ====================================================================== |
1394 | ====================================================================== |
1392 | ================= Function 22 - set system date/time. ================ |
1395 | ================= Function 22 - set system date/time. ================ |
1393 | ====================================================================== |
1396 | ====================================================================== |
1394 | Parameters: |
1397 | Parameters: |
1395 | * eax = 22 - function number |
1398 | * eax = 22 - function number |
1396 | * ebx = 0 - set time |
1399 | * ebx = 0 - set time |
1397 | * ecx = 0x00SSMMHH - time in the binary-decimal code (BCD): |
1400 | * ecx = 0x00SSMMHH - time in the binary-decimal code (BCD): |
1398 | * HH=hour 00..23 |
1401 | * HH=hour 00..23 |
1399 | * MM=minute 00..59 |
1402 | * MM=minute 00..59 |
1400 | * SS=second 00..59 |
1403 | * SS=second 00..59 |
1401 | * ebx = 1 - set date |
1404 | * ebx = 1 - set date |
1402 | * ecx = 0x00DDMMYY - date in the binary-decimal code (BCD): |
1405 | * ecx = 0x00DDMMYY - date in the binary-decimal code (BCD): |
1403 | * DD=day 01..31 |
1406 | * DD=day 01..31 |
1404 | * MM=month 01..12 |
1407 | * MM=month 01..12 |
1405 | * YY=year 00..99 |
1408 | * YY=year 00..99 |
1406 | * ebx = 2 - set day of week |
1409 | * ebx = 2 - set day of week |
1407 | * ecx = 1 for Sunday, ..., 7 for Saturday |
1410 | * ecx = 1 for Sunday, ..., 7 for Saturday |
1408 | * ebx = 3 - set alarm clock |
1411 | * ebx = 3 - set alarm clock |
1409 | * ecx = 0x00SSMMHH |
1412 | * ecx = 0x00SSMMHH |
1410 | Returned value: |
1413 | Returned value: |
1411 | * eax = 0 - success |
1414 | * eax = 0 - success |
1412 | * eax = 1 - incorrect parameter |
1415 | * eax = 1 - incorrect parameter |
1413 | * eax = 2 - CMOS-battery was unloaded |
1416 | * eax = 2 - CMOS-battery was unloaded |
1414 | Remarks: |
1417 | Remarks: |
1415 | * Value of installation of day of week seems to be doubtful, |
1418 | * Value of installation of day of week seems to be doubtful, |
1416 | as it a little where is used |
1419 | as it a little where is used |
1417 | (day of week can be calculated by date). |
1420 | (day of week can be calculated by date). |
1418 | * Alarm clock can be set on operation in the given time every day. |
1421 | * Alarm clock can be set on operation in the given time every day. |
1419 | But there is no existing system function to disable it. |
1422 | But there is no existing system function to disable it. |
1420 | * Operation of alarm clock consists in generation IRQ8. |
1423 | * Operation of alarm clock consists in generation IRQ8. |
1421 | * Generally CMOS supports for alarm clock set of value 0xFF |
1424 | * Generally CMOS supports for alarm clock set of value 0xFF |
1422 | as one of parameters and it means that the appropriate parameter |
1425 | as one of parameters and it means that the appropriate parameter |
1423 | is ignored. But current implementation does not allow this |
1426 | is ignored. But current implementation does not allow this |
1424 | (will return 1). |
1427 | (will return 1). |
1425 | * Alarm clock is a global system resource; the set of |
1428 | * Alarm clock is a global system resource; the set of |
1426 | an alarm clock cancels automatically the previous set. |
1429 | an alarm clock cancels automatically the previous set. |
1427 | However, at moment no program uses it. |
1430 | However, at moment no program uses it. |
1428 | 1431 | ||
1429 | ---------------------- Constants for registers: ---------------------- |
1432 | ---------------------- Constants for registers: ---------------------- |
1430 | eax - SF_SET_TIME_DATE (22) |
1433 | eax - SF_SET_TIME_DATE (22) |
1431 | ====================================================================== |
1434 | ====================================================================== |
1432 | ============= Function 23 - wait for event with timeout. ============= |
1435 | ============= Function 23 - wait for event with timeout. ============= |
1433 | ====================================================================== |
1436 | ====================================================================== |
1434 | If the message queue is empty, waits for new message in the queue, |
1437 | If the message queue is empty, waits for new message in the queue, |
1435 | but no more than given time. Then reads out a message from the queue. |
1438 | but no more than given time. Then reads out a message from the queue. |
1436 | 1439 | ||
1437 | Parameters: |
1440 | Parameters: |
1438 | * eax = 23 - function number |
1441 | * eax = 23 - function number |
1439 | * ebx = timeout (in 1/100 of second) |
1442 | * ebx = timeout (in 1/100 of second) |
1440 | Returned value: |
1443 | Returned value: |
1441 | * eax = 0 - the message queue is empty |
1444 | * eax = 0 - the message queue is empty |
1442 | * otherwise eax = event (see the list of events) |
1445 | * otherwise eax = event (see the list of events) |
1443 | Remarks: |
1446 | Remarks: |
1444 | * Only those events are taken into account, which enter into |
1447 | * Only those events are taken into account, which enter into |
1445 | the mask set by function 40. By default it is |
1448 | the mask set by function 40. By default it is |
1446 | redraw, key and button events. |
1449 | redraw, key and button events. |
1447 | * To check for presence of a message in the queue use function 11. |
1450 | * To check for presence of a message in the queue use function 11. |
1448 | To wait without timeout use function 10. |
1451 | To wait without timeout use function 10. |
1449 | * Transmission ebx=0 results in immediate returning eax=0. |
1452 | * Transmission ebx=0 results in immediate returning eax=0. |
1450 | * Current implementation returns immediately with eax=0, |
1453 | * Current implementation returns immediately with eax=0, |
1451 | if the addition of ebx with the current value of time counter |
1454 | if the addition of ebx with the current value of time counter |
1452 | makes 32-bit overflow. |
1455 | makes 32-bit overflow. |
1453 | 1456 | ||
1454 | ---------------------- Constants for registers: ---------------------- |
1457 | ---------------------- Constants for registers: ---------------------- |
1455 | eax - SF_WAIT_EVENT_TIMEOUT (23) |
1458 | eax - SF_WAIT_EVENT_TIMEOUT (23) |
1456 | ====================================================================== |
1459 | ====================================================================== |
1457 | ======= Function 24, subfunction 4 - eject tray of disk drive. ======= |
1460 | ======= Function 24, subfunction 4 - eject tray of disk drive. ======= |
1458 | ====================================================================== |
1461 | ====================================================================== |
1459 | Parameters: |
1462 | Parameters: |
1460 | * eax = 24 - function number |
1463 | * eax = 24 - function number |
1461 | * ebx = 4 - subfunction number |
1464 | * ebx = 4 - subfunction number |
1462 | * ecx = position of CD/DVD-drive |
1465 | * ecx = position of CD/DVD-drive |
1463 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
1466 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
1464 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
1467 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
1465 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
1468 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
1466 | Returned value: |
1469 | Returned value: |
1467 | * function does not return value |
1470 | * function does not return value |
1468 | Remarks: |
1471 | Remarks: |
1469 | * The function is supported only for ATAPI devices (CD and DVD). |
1472 | * The function is supported only for ATAPI devices (CD and DVD). |
1470 | * When the tray is being ejected, |
1473 | * When the tray is being ejected, |
1471 | manual control of tray is unlocked. |
1474 | manual control of tray is unlocked. |
1472 | * When the tray is being ejected, the code clears the cache for |
1475 | * When the tray is being ejected, the code clears the cache for |
1473 | corresponding device. |
1476 | corresponding device. |
1474 | * An example of usage of the function is the application CD_tray. |
1477 | * An example of usage of the function is the application CD_tray. |
1475 | 1478 | ||
1476 | ---------------------- Constants for registers: ---------------------- |
1479 | ---------------------- Constants for registers: ---------------------- |
1477 | eax - SF_CD (24) |
1480 | eax - SF_CD (24) |
1478 | ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
1481 | ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
1479 | ====================================================================== |
1482 | ====================================================================== |
1480 | ======== Function 24, subfunction 5 - load tray of disk drive. ======= |
1483 | ======== Function 24, subfunction 5 - load tray of disk drive. ======= |
1481 | ====================================================================== |
1484 | ====================================================================== |
1482 | Parameters: |
1485 | Parameters: |
1483 | * eax = 24 - function number |
1486 | * eax = 24 - function number |
1484 | * ebx = 5 - subfunction number |
1487 | * ebx = 5 - subfunction number |
1485 | * ecx = position of CD/DVD-drive |
1488 | * ecx = position of CD/DVD-drive |
1486 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
1489 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
1487 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
1490 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
1488 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
1491 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
1489 | Returned value: |
1492 | Returned value: |
1490 | * function does not return value |
1493 | * function does not return value |
1491 | Remarks: |
1494 | Remarks: |
1492 | * The function is supported only for ATAPI devices (CD and DVD). |
1495 | * The function is supported only for ATAPI devices (CD and DVD). |
1493 | * An example of usage of the function is the application CD_tray. |
1496 | * An example of usage of the function is the application CD_tray. |
1494 | 1497 | ||
1495 | ---------------------- Constants for registers: ---------------------- |
1498 | ---------------------- Constants for registers: ---------------------- |
1496 | eax - SF_CD (24) |
1499 | eax - SF_CD (24) |
1497 | ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
1500 | ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
1498 | ====================================================================== |
1501 | ====================================================================== |
1499 | ======= Function 25 - put image area on the background layer. ======== |
1502 | ======= Function 25 - put image area on the background layer. ======== |
1500 | ====================================================================== |
1503 | ====================================================================== |
1501 | Paramters: |
1504 | Paramters: |
1502 | * eax = 25 - function number |
1505 | * eax = 25 - function number |
1503 | * ebx = pointer to the previously allocated memory area, |
1506 | * ebx = pointer to the previously allocated memory area, |
1504 | where placed the source images in a format BBGGRRTTBBGGRRTT... |
1507 | where placed the source images in a format BBGGRRTTBBGGRRTT... |
1505 | * ecx = [size on axis x]*65536 + [size on axis y] |
1508 | * ecx = [size on axis x]*65536 + [size on axis y] |
1506 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1509 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1507 | Returned value: |
1510 | Returned value: |
1508 | * function does not return value |
1511 | * function does not return value |
1509 | Remarks: |
1512 | Remarks: |
1510 | * Coordinates of the image are coordinates of the upper left corner |
1513 | * Coordinates of the image are coordinates of the upper left corner |
1511 | of the image relative to the screen. |
1514 | of the image relative to the screen. |
1512 | * Size of the image in bytes is 4*xsize*ysize |
1515 | * Size of the image in bytes is 4*xsize*ysize |
1513 | * TT - byte pointer of transparency, at current version: |
1516 | * TT - byte pointer of transparency, at current version: |
1514 | 1 to FF - opaque, 0 - transparent. |
1517 | 1 to FF - opaque, 0 - transparent. |
1515 | * The function places the image directly to LFB. It is not for |
1518 | * The function places the image directly to LFB. It is not for |
1516 | background image f.15. Options f.15 to f.25 does not make sense. |
1519 | background image f.15. Options f.15 to f.25 does not make sense. |
1517 | 1520 | ||
1518 | ---------------------- Constants for registers: ---------------------- |
1521 | ---------------------- Constants for registers: ---------------------- |
1519 | eax - SF_SCREEN_PUT_IMAGE (25) |
1522 | eax - SF_SCREEN_PUT_IMAGE (25) |
1520 | ====================================================================== |
1523 | ====================================================================== |
1521 | ======== Function 26, subfunction 1 - get MPU MIDI base port. ======== |
1524 | ======== Function 26, subfunction 1 - get MPU MIDI base port. ======== |
1522 | ====================================================================== |
1525 | ====================================================================== |
1523 | Parameters: |
1526 | Parameters: |
1524 | * eax = 26 - function number |
1527 | * eax = 26 - function number |
1525 | * ebx = 1 - subfunction number |
1528 | * ebx = 1 - subfunction number |
1526 | Returned value: |
1529 | Returned value: |
1527 | * eax = port number |
1530 | * eax = port number |
1528 | Parameters: |
1531 | Parameters: |
1529 | * To set base port use subfunction 1 of function 21. |
1532 | * To set base port use subfunction 1 of function 21. |
1530 | 1533 | ||
1531 | ---------------------- Constants for registers: ---------------------- |
1534 | ---------------------- Constants for registers: ---------------------- |
1532 | eax - SF_SYSTEM_GET (26) |
1535 | eax - SF_SYSTEM_GET (26) |
1533 | ebx - SSF_MPU_MIDI_BASE (1) |
1536 | ebx - SSF_MPU_MIDI_BASE (1) |
1534 | ====================================================================== |
1537 | ====================================================================== |
1535 | ========== Function 26, subfunction 2 - get keyboard layout. ========= |
1538 | ========== Function 26, subfunction 2 - get keyboard layout. ========= |
1536 | ====================================================================== |
1539 | ====================================================================== |
1537 | The keyboard layout is used to convert keyboard scancodes to |
1540 | The keyboard layout is used to convert keyboard scancodes to |
1538 | ASCII-codes for function 2. |
1541 | ASCII-codes for function 2. |
1539 | Parameters: |
1542 | Parameters: |
1540 | * eax = 26 - function number |
1543 | * eax = 26 - function number |
1541 | * ebx = 2 - subfunction number |
1544 | * ebx = 2 - subfunction number |
1542 | * ecx = what layout to get: |
1545 | * ecx = what layout to get: |
1543 | * 1 = normal layout |
1546 | * 1 = normal layout |
1544 | * 2 = layout with pressed Shift |
1547 | * 2 = layout with pressed Shift |
1545 | * 3 = layout with pressed Alt |
1548 | * 3 = layout with pressed Alt |
1546 | * edx = pointer to the 128-bytes buffer, where the layout will be |
1549 | * edx = pointer to the 128-bytes buffer, where the layout will be |
1547 | copied |
1550 | copied |
1548 | Returned value: |
1551 | Returned value: |
1549 | * function does not return value |
1552 | * function does not return value |
1550 | Or: |
1553 | Or: |
1551 | * eax = 26 - function number |
1554 | * eax = 26 - function number |
1552 | * ebx = 2 - subfunction number |
1555 | * ebx = 2 - subfunction number |
1553 | * ecx = 9 |
1556 | * ecx = 9 |
1554 | Returned value: |
1557 | Returned value: |
1555 | * eax = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
1558 | * eax = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
1556 | Remarks: |
1559 | Remarks: |
1557 | * If Alt is pressed, the layout with Alt is used; |
1560 | * If Alt is pressed, the layout with Alt is used; |
1558 | if Alt is not pressed, but Shift is pressed, |
1561 | if Alt is not pressed, but Shift is pressed, |
1559 | the layout with Shift is used; |
1562 | the layout with Shift is used; |
1560 | if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
1563 | if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
1561 | layout is used and then from the code is subtracted 0x60; |
1564 | layout is used and then from the code is subtracted 0x60; |
1562 | if no control key is pressed, the normal layout is used. |
1565 | if no control key is pressed, the normal layout is used. |
1563 | * To set layout and country identifier use |
1566 | * To set layout and country identifier use |
1564 | subfunction 2 of function 21. |
1567 | subfunction 2 of function 21. |
1565 | * Country identifier is global system variable, which is not used |
1568 | * Country identifier is global system variable, which is not used |
1566 | by the kernel itself; however the application '@taskbar' displays |
1569 | by the kernel itself; however the application '@taskbar' displays |
1567 | the corresponding icon (using this function). |
1570 | the corresponding icon (using this function). |
1568 | * The application @taskbar switches layouts on user request. |
1571 | * The application @taskbar switches layouts on user request. |
1569 | 1572 | ||
1570 | ---------------------- Constants for registers: ---------------------- |
1573 | ---------------------- Constants for registers: ---------------------- |
1571 | eax - SF_SYSTEM_GET (26) |
1574 | eax - SF_SYSTEM_GET (26) |
1572 | ebx - SSF_KEYBOARD_LAYOUT (2) |
1575 | ebx - SSF_KEYBOARD_LAYOUT (2) |
1573 | ====================================================================== |
1576 | ====================================================================== |
1574 | ========== Function 26, subfunction 5 - get system language. ========= |
1577 | ========== Function 26, subfunction 5 - get system language. ========= |
1575 | ====================================================================== |
1578 | ====================================================================== |
1576 | Parameters: |
1579 | Parameters: |
1577 | * eax = 26 - function number |
1580 | * eax = 26 - function number |
1578 | * ebx = 5 - subfunction number |
1581 | * ebx = 5 - subfunction number |
1579 | Returned value: |
1582 | Returned value: |
1580 | * eax = system language (1=eng, 2=fi, 3=ger, 4=rus) |
1583 | * eax = system language (1=eng, 2=fi, 3=ger, 4=rus) |
1581 | Remarks: |
1584 | Remarks: |
1582 | * System language is global system variable and is not used |
1585 | * System language is global system variable and is not used |
1583 | by the kernel itself, however application @taskbar draws the |
1586 | by the kernel itself, however application @taskbar draws the |
1584 | appropriate icon (using this function). |
1587 | appropriate icon (using this function). |
1585 | * To set system language use subfunction 5 of function 21. |
1588 | * To set system language use subfunction 5 of function 21. |
1586 | 1589 | ||
1587 | ---------------------- Constants for registers: ---------------------- |
1590 | ---------------------- Constants for registers: ---------------------- |
1588 | eax - SF_SYSTEM_GET (26) |
1591 | eax - SF_SYSTEM_GET (26) |
1589 | ebx - SSF_SYS_LANG (5) |
1592 | ebx - SSF_SYS_LANG (5) |
1590 | ====================================================================== |
1593 | ====================================================================== |
1591 | === Function 26, subfunction 9 - get the value of the time counter. == |
1594 | === Function 26, subfunction 9 - get the value of the time counter. == |
1592 | ====================================================================== |
1595 | ====================================================================== |
1593 | Parameters: |
1596 | Parameters: |
1594 | * eax = 26 - function number |
1597 | * eax = 26 - function number |
1595 | * ebx = 9 - subfunction number |
1598 | * ebx = 9 - subfunction number |
1596 | Returned value: |
1599 | Returned value: |
1597 | * eax = number of 1/100s of second, past from the system boot time |
1600 | * eax = number of 1/100s of second, past from the system boot time |
1598 | Remarks: |
1601 | Remarks: |
1599 | * Counter takes modulo 2^32, that correspond to a little more |
1602 | * Counter takes modulo 2^32, that correspond to a little more |
1600 | than 497 days. |
1603 | than 497 days. |
1601 | * To get system time use function 3. |
1604 | * To get system time use function 3. |
1602 | 1605 | ||
1603 | ---------------------- Constants for registers: ---------------------- |
1606 | ---------------------- Constants for registers: ---------------------- |
1604 | eax - SF_SYSTEM_GET (26) |
1607 | eax - SF_SYSTEM_GET (26) |
1605 | ebx - SSF_TIME_COUNT (9) |
1608 | ebx - SSF_TIME_COUNT (9) |
1606 | ====================================================================== |
1609 | ====================================================================== |
1607 | ===================== Function 26, subfunction 10 ==================== |
1610 | ===================== Function 26, subfunction 10 ==================== |
1608 | ========== Get the value of the high precision time counter. ========= |
1611 | ========== Get the value of the high precision time counter. ========= |
1609 | ====================================================================== |
1612 | ====================================================================== |
1610 | Parameters: |
1613 | Parameters: |
1611 | * eax = 26 - function number |
1614 | * eax = 26 - function number |
1612 | * ebx = 10 - subfunction number |
1615 | * ebx = 10 - subfunction number |
1613 | Returned value: |
1616 | Returned value: |
1614 | * eax = number of nanoseconds since system boot time (lower DWORD) |
1617 | * eax = number of nanoseconds since system boot time (lower DWORD) |
1615 | * edx = number of nanoseconds since system boot time (high DWORD) |
1618 | * edx = number of nanoseconds since system boot time (high DWORD) |
1616 | Remarks: |
1619 | Remarks: |
1617 | * The counter is based on HPET, if HPET is not available, resolution |
1620 | * The counter is based on HPET, if HPET is not available, resolution |
1618 | will be reduced to 10 000 000 nanoseconds. |
1621 | will be reduced to 10 000 000 nanoseconds. |
1619 | 1622 | ||
1620 | ---------------------- Constants for registers: ---------------------- |
1623 | ---------------------- Constants for registers: ---------------------- |
1621 | eax - SF_SYSTEM_GET (26) |
1624 | eax - SF_SYSTEM_GET (26) |
1622 | ebx - SSF_TIME_COUNT_PRO (10) |
1625 | ebx - SSF_TIME_COUNT_PRO (10) |
1623 | ====================================================================== |
1626 | ====================================================================== |
1624 | ===================== Function 26, subfunction 11 ==================== |
1627 | ===================== Function 26, subfunction 11 ==================== |
1625 | ========== Find out whether low-level HD access is enabled. ========== |
1628 | ========== Find out whether low-level HD access is enabled. ========== |
1626 | ====================================================================== |
1629 | ====================================================================== |
1627 | Parameters: |
1630 | Parameters: |
1628 | * eax = 26 - function number |
1631 | * eax = 26 - function number |
1629 | * ebx = 11 - subfunction number |
1632 | * ebx = 11 - subfunction number |
1630 | Returned value: |
1633 | Returned value: |
1631 | * eax = 0/1 - disabled/enabled |
1634 | * eax = 0/1 - disabled/enabled |
1632 | Remarks: |
1635 | Remarks: |
1633 | * Is used in LBA read (subfunction 8 of function 58). |
1636 | * Is used in LBA read (subfunction 8 of function 58). |
1634 | * To set current state use subfunction 11 of function 21. |
1637 | * To set current state use subfunction 11 of function 21. |
1635 | 1638 | ||
1636 | ---------------------- Constants for registers: ---------------------- |
1639 | ---------------------- Constants for registers: ---------------------- |
1637 | eax - SF_SYSTEM_GET (26) |
1640 | eax - SF_SYSTEM_GET (26) |
1638 | ebx - SSF_ACCESS_HD_LBA (11) |
1641 | ebx - SSF_ACCESS_HD_LBA (11) |
1639 | ====================================================================== |
1642 | ====================================================================== |
1640 | ===================== Function 26, subfunction 12 ==================== |
1643 | ===================== Function 26, subfunction 12 ==================== |
1641 | ========== Find out whether low-level PCI access is enabled. ========= |
1644 | ========== Find out whether low-level PCI access is enabled. ========= |
1642 | ====================================================================== |
1645 | ====================================================================== |
1643 | Parameters: |
1646 | Parameters: |
1644 | * eax = 26 - function number |
1647 | * eax = 26 - function number |
1645 | * ebx = 12 - subfunction number |
1648 | * ebx = 12 - subfunction number |
1646 | Returned value: |
1649 | Returned value: |
1647 | * eax = 0/1 - disabled/enabled |
1650 | * eax = 0/1 - disabled/enabled |
1648 | Remarks: |
1651 | Remarks: |
1649 | * Is used by operations with PCI bus (function 62). |
1652 | * Is used by operations with PCI bus (function 62). |
1650 | * The current implementation uses only low bit of ecx. |
1653 | * The current implementation uses only low bit of ecx. |
1651 | * To set the current state use subfunction 12 of function 21. |
1654 | * To set the current state use subfunction 12 of function 21. |
1652 | 1655 | ||
1653 | ---------------------- Constants for registers: ---------------------- |
1656 | ---------------------- Constants for registers: ---------------------- |
1654 | eax - SF_SYSTEM_GET (26) |
1657 | eax - SF_SYSTEM_GET (26) |
1655 | ebx - SSF_ACCESS_PCI (12) |
1658 | ebx - SSF_ACCESS_PCI (12) |
1656 | ====================================================================== |
1659 | ====================================================================== |
1657 | =================== Function 29 - get system date. =================== |
1660 | =================== Function 29 - get system date. =================== |
1658 | ====================================================================== |
1661 | ====================================================================== |
1659 | Parameters: |
1662 | Parameters: |
1660 | * eax = 29 - function number |
1663 | * eax = 29 - function number |
1661 | Returned value: |
1664 | Returned value: |
1662 | * eax = 0x00DDMMYY, where |
1665 | * eax = 0x00DDMMYY, where |
1663 | (binary-decimal coding, BCD, is used) |
1666 | (binary-decimal coding, BCD, is used) |
1664 | * YY = two low digits of year (00..99) |
1667 | * YY = two low digits of year (00..99) |
1665 | * MM = month (01..12) |
1668 | * MM = month (01..12) |
1666 | * DD = day (01..31) |
1669 | * DD = day (01..31) |
1667 | Remarks: |
1670 | Remarks: |
1668 | * To set system date use function 22. |
1671 | * To set system date use function 22. |
1669 | 1672 | ||
1670 | ---------------------- Constants for registers: ---------------------- |
1673 | ---------------------- Constants for registers: ---------------------- |
1671 | eax - SF_GET_SYS_DATE (29) |
1674 | eax - SF_GET_SYS_DATE (29) |
1672 | ====================================================================== |
1675 | ====================================================================== |
1673 | ============= Function 30 - work with the current folder. ============ |
1676 | ============= Function 30 - work with the current folder. ============ |
1674 | ====================================================================== |
1677 | ====================================================================== |
1675 | 1678 | ||
1676 | --------- Subfunction 1 - set current folder for the thread. --------- |
1679 | --------- Subfunction 1 - set current folder for the thread. --------- |
1677 | Parameters: |
1680 | Parameters: |
1678 | * eax = 30 - function number |
1681 | * eax = 30 - function number |
1679 | * ebx = 1 - subfunction number |
1682 | * ebx = 1 - subfunction number |
1680 | * ecx = pointer to ASCIIZ-string with the path to new current folder |
1683 | * ecx = pointer to ASCIIZ-string with the path to new current folder |
1681 | Returned value: |
1684 | Returned value: |
1682 | * function does not return value |
1685 | * function does not return value |
1683 | 1686 | ||
1684 | --------- Subfunction 2 - get current folder for the thread. --------- |
1687 | --------- Subfunction 2 - get current folder for the thread. --------- |
1685 | Parameters: |
1688 | Parameters: |
1686 | * eax = 30 - function number |
1689 | * eax = 30 - function number |
1687 | * ebx = 2 - subfunction number |
1690 | * ebx = 2 - subfunction number |
1688 | * ecx = pointer to buffer |
1691 | * ecx = pointer to buffer |
1689 | * edx = size of buffer |
1692 | * edx = size of buffer |
1690 | Returned value: |
1693 | Returned value: |
1691 | * eax = size of the current folder's name (including terminating 0) |
1694 | * eax = size of the current folder's name (including terminating 0) |
1692 | Remarks: |
1695 | Remarks: |
1693 | * If the buffer is too small to hold all data, only first (edx-1) |
1696 | * If the buffer is too small to hold all data, only first (edx-1) |
1694 | bytes are copied and than terminating 0 is inserted. |
1697 | bytes are copied and than terminating 0 is inserted. |
1695 | * By default, current folder for the thread is "/rd/1". |
1698 | * By default, current folder for the thread is "/rd/1". |
1696 | * At process/thread creation the current folder will be inherited |
1699 | * At process/thread creation the current folder will be inherited |
1697 | from the parent. |
1700 | from the parent. |
1698 | 1701 | ||
1699 | --- Subfunction 3 - install the add.system directory for the kernel -- |
1702 | --- Subfunction 3 - install the add.system directory for the kernel -- |
1700 | Parameters: |
1703 | Parameters: |
1701 | * eax = 30 - function number |
1704 | * eax = 30 - function number |
1702 | * ebx = 3 - subfunction number |
1705 | * ebx = 3 - subfunction number |
1703 | * ecx = pointer to a block of data: |
1706 | * ecx = pointer to a block of data: |
1704 | sysdir_name rb 64 |
1707 | sysdir_name rb 64 |
1705 | sysdir_path rb 64 |
1708 | sysdir_path rb 64 |
1706 | For example: |
1709 | For example: |
1707 | dir_name1 db 'KolibriOS',0 |
1710 | dir_name1 db 'KolibriOS',0 |
1708 | rb 64-10 |
1711 | rb 64-10 |
1709 | dir_path1 db 'HD0/1',0 |
1712 | dir_path1 db 'HD0/1',0 |
1710 | rb 64-6 |
1713 | rb 64-6 |
1711 | Returned value: |
1714 | Returned value: |
1712 | * function does not return value |
1715 | * function does not return value |
1713 | Remarks: |
1716 | Remarks: |
1714 | * The function can be called only 1 time for 1 session of the OS. |
1717 | * The function can be called only 1 time for 1 session of the OS. |
1715 | 1718 | ||
1716 | ---------------------- Constants for registers: ---------------------- |
1719 | ---------------------- Constants for registers: ---------------------- |
1717 | eax - SF_CURRENT_FOLDER (30) |
1720 | eax - SF_CURRENT_FOLDER (30) |
1718 | ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3) |
1721 | ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3) |
1719 | ====================================================================== |
1722 | ====================================================================== |
1720 | ========= Function 34 - who owner the pixel on the screen. =========== |
1723 | ========= Function 34 - who owner the pixel on the screen. =========== |
1721 | ====================================================================== |
1724 | ====================================================================== |
1722 | Parameters: |
1725 | Parameters: |
1723 | * eax = 34 - function number |
1726 | * eax = 34 - function number |
1724 | * ebx = x-coordinate (relative to the display) |
1727 | * ebx = x-coordinate (relative to the display) |
1725 | * ecx = y-coordinate (relative to the display) |
1728 | * ecx = y-coordinate (relative to the display) |
1726 | 1729 | ||
1727 | Returned value: |
1730 | Returned value: |
1728 | * eax = 0x000000XX - owner of pixel the slot window N |
1731 | * eax = 0x000000XX - owner of pixel the slot window N |
1729 | If incorrect values ebx and ecx then function returns 0 |
1732 | If incorrect values ebx and ecx then function returns 0 |
1730 | * The function takes the value from the area [_WinMapAddress] |
1733 | * The function takes the value from the area [_WinMapAddress] |
1731 | 1734 | ||
1732 | ---------------------- Constants for registers: ---------------------- |
1735 | ---------------------- Constants for registers: ---------------------- |
1733 | eax - SF_GET_PIXEL_OWNER (34) |
1736 | eax - SF_GET_PIXEL_OWNER (34) |
1734 | ====================================================================== |
1737 | ====================================================================== |
1735 | ======= Function 35 - read the color of a pixel on the screen. ======= |
1738 | ======= Function 35 - read the color of a pixel on the screen. ======= |
1736 | ====================================================================== |
1739 | ====================================================================== |
1737 | Parameters: |
1740 | Parameters: |
1738 | * eax = 35 |
1741 | * eax = 35 |
1739 | * ebx = y*xsize+x, where |
1742 | * ebx = y*xsize+x, where |
1740 | * (x,y) = coordinates of a pixel (beginning from 0) |
1743 | * (x,y) = coordinates of a pixel (beginning from 0) |
1741 | * xsize = horizontal screen size |
1744 | * xsize = horizontal screen size |
1742 | Returned value: |
1745 | Returned value: |
1743 | * eax = color 0x00RRGGBB |
1746 | * eax = color 0x00RRGGBB |
1744 | Remarks: |
1747 | Remarks: |
1745 | * To get screen sizes use function 14. Pay attention, |
1748 | * To get screen sizes use function 14. Pay attention, |
1746 | that it subtracts 1 from both sizes. |
1749 | that it subtracts 1 from both sizes. |
1747 | * There is also direct access (without any system calls) |
1750 | * There is also direct access (without any system calls) |
1748 | to videomemory through the selector gs. To get parameters of |
1751 | to videomemory through the selector gs. To get parameters of |
1749 | the current videomode, use function 61. |
1752 | the current videomode, use function 61. |
1750 | 1753 | ||
1751 | ---------------------- Constants for registers: ---------------------- |
1754 | ---------------------- Constants for registers: ---------------------- |
1752 | eax - SF_GET_PIXEL (35) |
1755 | eax - SF_GET_PIXEL (35) |
1753 | ====================================================================== |
1756 | ====================================================================== |
1754 | =================== Function 36 - read screen area. ================== |
1757 | =================== Function 36 - read screen area. ================== |
1755 | ====================================================================== |
1758 | ====================================================================== |
1756 | Paramters: |
1759 | Paramters: |
1757 | * eax = 36 - function number |
1760 | * eax = 36 - function number |
1758 | * ebx = pointer to the previously allocated memory area, |
1761 | * ebx = pointer to the previously allocated memory area, |
1759 | where will be placed the image in the format BBGGRRBBGGRR... |
1762 | where will be placed the image in the format BBGGRRBBGGRR... |
1760 | * ecx = [size on axis x]*65536 + [size on axis y] |
1763 | * ecx = [size on axis x]*65536 + [size on axis y] |
1761 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1764 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
1762 | Returned value: |
1765 | Returned value: |
1763 | * function does not return value |
1766 | * function does not return value |
1764 | Remarks: |
1767 | Remarks: |
1765 | * Coordinates of the image are coordinates of the upper left corner |
1768 | * Coordinates of the image are coordinates of the upper left corner |
1766 | of the image relative to the screen. |
1769 | of the image relative to the screen. |
1767 | * Size of the image in bytes is 3*xsize*ysize. |
1770 | * Size of the image in bytes is 3*xsize*ysize. |
1768 | 1771 | ||
1769 | ---------------------- Constants for registers: ---------------------- |
1772 | ---------------------- Constants for registers: ---------------------- |
1770 | eax - SF_GET_IMAGE (36) |
1773 | eax - SF_GET_IMAGE (36) |
1771 | ====================================================================== |
1774 | ====================================================================== |
1772 | =================== Function 37 - work with mouse. =================== |
1775 | =================== Function 37 - work with mouse. =================== |
1773 | ====================================================================== |
1776 | ====================================================================== |
1774 | 1777 | ||
1775 | ---------- Subfunction 0 - screen coordinates of the mouse ----------- |
1778 | ---------- Subfunction 0 - screen coordinates of the mouse ----------- |
1776 | Parameters: |
1779 | Parameters: |
1777 | * eax = 37 - function number |
1780 | * eax = 37 - function number |
1778 | * ebx = 0 - subfunction number |
1781 | * ebx = 0 - subfunction number |
1779 | Returned value: |
1782 | Returned value: |
1780 | * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
1783 | * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
1781 | (beginning from 0) |
1784 | (beginning from 0) |
1782 | 1785 | ||
1783 | -- Subfunction 1 - coordinates of the mouse relative to the window --- |
1786 | -- Subfunction 1 - coordinates of the mouse relative to the window --- |
1784 | Parameters: |
1787 | Parameters: |
1785 | * eax = 37 - function number |
1788 | * eax = 37 - function number |
1786 | * ebx = 1 - subfunction number |
1789 | * ebx = 1 - subfunction number |
1787 | Returned value: |
1790 | Returned value: |
1788 | * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
1791 | * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
1789 | relative to the application window (beginning from 0) |
1792 | relative to the application window (beginning from 0) |
1790 | Remarks: |
1793 | Remarks: |
1791 | * The value is calculated by formula (x-xwnd)*65536 + (y-ywnd). |
1794 | * The value is calculated by formula (x-xwnd)*65536 + (y-ywnd). |
1792 | If y>=ywnd, the low word is non-negative and contains |
1795 | If y>=ywnd, the low word is non-negative and contains |
1793 | relative y-coordinate, and the high word - relative x-coordinate |
1796 | relative y-coordinate, and the high word - relative x-coordinate |
1794 | (with correct sign). Otherwise the low word is negative and still |
1797 | (with correct sign). Otherwise the low word is negative and still |
1795 | contains relative y-coordinate, and to the high word |
1798 | contains relative y-coordinate, and to the high word |
1796 | 1 should be added. |
1799 | 1 should be added. |
1797 | 1800 | ||
1798 | ------------- Subfunction 2 - states of the mouse buttons ------------ |
1801 | ------------- Subfunction 2 - states of the mouse buttons ------------ |
1799 | Parameters: |
1802 | Parameters: |
1800 | * eax = 37 - function number |
1803 | * eax = 37 - function number |
1801 | * ebx = 2 - subfunction number |
1804 | * ebx = 2 - subfunction number |
1802 | Returned value: |
1805 | Returned value: |
1803 | * eax = bits 0-4 equal to subfunction 3 |
1806 | * eax = bits 0-4 equal to subfunction 3 |
1804 | 1807 | ||
1805 | ------- Subfunction 3 - states and events of the mouse buttons ------- |
1808 | ------- Subfunction 3 - states and events of the mouse buttons ------- |
1806 | Parameters: |
1809 | Parameters: |
1807 | * eax = 37 - function number |
1810 | * eax = 37 - function number |
1808 | * ebx = 3 - subfunction number |
1811 | * ebx = 3 - subfunction number |
1809 | Returned value: |
1812 | Returned value: |
1810 | * eax contains next information: |
1813 | * eax contains next information: |
1811 | 1814 | ||
1812 | states: |
1815 | states: |
1813 | * bit 0 is set = left button is held |
1816 | * bit 0 is set = left button is held |
1814 | * bit 1 is set = right button is held |
1817 | * bit 1 is set = right button is held |
1815 | * bit 2 is set = middle button is held |
1818 | * bit 2 is set = middle button is held |
1816 | * bit 3 is set = 4th button is held |
1819 | * bit 3 is set = 4th button is held |
1817 | * bit 4 is set = 5th button is held |
1820 | * bit 4 is set = 5th button is held |
1818 | 1821 | ||
1819 | events: |
1822 | events: |
1820 | * bit 8 is set = left button is pressed |
1823 | * bit 8 is set = left button is pressed |
1821 | * bit 9 is set = right button is pressed |
1824 | * bit 9 is set = right button is pressed |
1822 | * bit 10 is set = middle button is pressed |
1825 | * bit 10 is set = middle button is pressed |
1823 | 1826 | ||
1824 | * bit 15 is set = vertical scroll is used |
1827 | * bit 15 is set = vertical scroll is used |
1825 | 1828 | ||
1826 | * bit 16 is set = left button is released |
1829 | * bit 16 is set = left button is released |
1827 | * bit 17 is set = right button is released |
1830 | * bit 17 is set = right button is released |
1828 | * bit 18 is set = middle button is released |
1831 | * bit 18 is set = middle button is released |
1829 | 1832 | ||
1830 | * bit 23 is set = horisontal scroll is used |
1833 | * bit 23 is set = horisontal scroll is used |
1831 | 1834 | ||
1832 | * bit 24 is set = doubleclick by left button |
1835 | * bit 24 is set = doubleclick by left button |
1833 | 1836 | ||
1834 | -------------------- Subfunction 4 - load cursor --------------------- |
1837 | -------------------- Subfunction 4 - load cursor --------------------- |
1835 | Parameters: |
1838 | Parameters: |
1836 | * eax = 37 - function number |
1839 | * eax = 37 - function number |
1837 | * ebx = 4 - subfunction number |
1840 | * ebx = 4 - subfunction number |
1838 | * dx = data source: |
1841 | * dx = data source: |
1839 | * dx = LOAD_FROM_FILE = 0 - data in a file |
1842 | * dx = LOAD_FROM_FILE = 0 - data in a file |
1840 | * ecx = pointer to full path to the cursor file |
1843 | * ecx = pointer to full path to the cursor file |
1841 | * the file must be in the format .cur, which is standard for |
1844 | * the file must be in the format .cur, which is standard for |
1842 | MS Windows, at that of the size 32*32 pixels |
1845 | MS Windows, at that of the size 32*32 pixels |
1843 | * dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory |
1846 | * dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory |
1844 | * ecx = pointer to data of the cursor file |
1847 | * ecx = pointer to data of the cursor file |
1845 | * the data format is the same as in the previous case |
1848 | * the data format is the same as in the previous case |
1846 | * dx = LOAD_INDIRECT = 2 - data in memory |
1849 | * dx = LOAD_INDIRECT = 2 - data in memory |
1847 | * ecx = pointer to cursor image in the format ARGB 32*32 pixels |
1850 | * ecx = pointer to cursor image in the format ARGB 32*32 pixels |
1848 | * edx = 0xXXYY0002, where |
1851 | * edx = 0xXXYY0002, where |
1849 | * XX = x-coordinate of cursor hotspot |
1852 | * XX = x-coordinate of cursor hotspot |
1850 | * YY = y-coordinate |
1853 | * YY = y-coordinate |
1851 | * 0 <= XX, YY <= 31 |
1854 | * 0 <= XX, YY <= 31 |
1852 | Returned value: |
1855 | Returned value: |
1853 | * eax = 0 - failed |
1856 | * eax = 0 - failed |
1854 | * otherwise eax = cursor handle |
1857 | * otherwise eax = cursor handle |
1855 | 1858 | ||
1856 | --------------------- Subfunction 5 - set cursor --------------------- |
1859 | --------------------- Subfunction 5 - set cursor --------------------- |
1857 | Sets new cursor for the window of the current thread. |
1860 | Sets new cursor for the window of the current thread. |
1858 | Parameters: |
1861 | Parameters: |
1859 | * eax = 37 - function number |
1862 | * eax = 37 - function number |
1860 | * ebx = 5 - subfunction number |
1863 | * ebx = 5 - subfunction number |
1861 | * ecx = cursor handle |
1864 | * ecx = cursor handle |
1862 | Returned value: |
1865 | Returned value: |
1863 | * eax = handle of previous cursor |
1866 | * eax = handle of previous cursor |
1864 | Remarks: |
1867 | Remarks: |
1865 | * If the handle is incorrect, the function restores the default |
1868 | * If the handle is incorrect, the function restores the default |
1866 | cursor (standard arrow). In particular, ecx=0 restores it. |
1869 | cursor (standard arrow). In particular, ecx=0 restores it. |
1867 | 1870 | ||
1868 | ------------------- Subfunction 6 - delete cursor -------------------- |
1871 | ------------------- Subfunction 6 - delete cursor -------------------- |
1869 | Parameters: |
1872 | Parameters: |
1870 | * eax = 37 - function number |
1873 | * eax = 37 - function number |
1871 | * ebx = 6 - subfunction number |
1874 | * ebx = 6 - subfunction number |
1872 | * ecx = cursor handle |
1875 | * ecx = cursor handle |
1873 | Returned value: |
1876 | Returned value: |
1874 | * eax destroyed |
1877 | * eax destroyed |
1875 | Remarks: |
1878 | Remarks: |
1876 | * The cursor must be loaded previously by the current thread |
1879 | * The cursor must be loaded previously by the current thread |
1877 | (with the call to subfunction 4). The function does not delete |
1880 | (with the call to subfunction 4). The function does not delete |
1878 | system cursors and cursors, loaded by another applications. |
1881 | system cursors and cursors, loaded by another applications. |
1879 | * If the active cursor (set by subfunction 5) is deleted, |
1882 | * If the active cursor (set by subfunction 5) is deleted, |
1880 | the system restores the default cursor (standard arrow). |
1883 | the system restores the default cursor (standard arrow). |
1881 | 1884 | ||
1882 | ------------------ Subfunction 7 - get scroll data ------------------- |
1885 | ------------------ Subfunction 7 - get scroll data ------------------- |
1883 | Parameters: |
1886 | Parameters: |
1884 | * eax = 37 - function number |
1887 | * eax = 37 - function number |
1885 | * ebx = 7 - subfunction number |
1888 | * ebx = 7 - subfunction number |
1886 | Returned value: |
1889 | Returned value: |
1887 | * eax = [horizontal offset]*65536 + [vertical offset] |
1890 | * eax = [horizontal offset]*65536 + [vertical offset] |
1888 | Remarks: |
1891 | Remarks: |
1889 | * Scroll data is available for active window only. |
1892 | * Scroll data is available for active window only. |
1890 | * Values are zeroed after reading. |
1893 | * Values are zeroed after reading. |
1891 | * Values are signed. |
1894 | * Values are signed. |
1892 | 1895 | ||
1893 | ---------------------- Constants for registers: ---------------------- |
1896 | ---------------------- Constants for registers: ---------------------- |
1894 | eax - SF_MOUSE_GET (37) |
1897 | eax - SF_MOUSE_GET (37) |
1895 | ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1), |
1898 | ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1), |
1896 | SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4), |
1899 | SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4), |
1897 | SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7) |
1900 | SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7) |
1898 | ====================================================================== |
1901 | ====================================================================== |
1899 | ====================== Function 38 - draw line. ====================== |
1902 | ====================== Function 38 - draw line. ====================== |
1900 | ====================================================================== |
1903 | ====================================================================== |
1901 | Parameters: |
1904 | Parameters: |
1902 | * eax = 38 - function number |
1905 | * eax = 38 - function number |
1903 | * ebx = [start coordinate on axis x]*65536 + |
1906 | * ebx = [start coordinate on axis x]*65536 + |
1904 | [end coordinate on axis x] |
1907 | [end coordinate on axis x] |
1905 | * ecx = [start coordinate on axis y]*65536 + |
1908 | * ecx = [start coordinate on axis y]*65536 + |
1906 | [end coordinate on axis y] |
1909 | [end coordinate on axis y] |
1907 | * edx = 0x00RRGGBB - color |
1910 | * edx = 0x00RRGGBB - color |
1908 | edx = 0x01xxxxxx - draw inversed line |
1911 | edx = 0x01xxxxxx - draw inversed line |
1909 | (low 24 bits are ignored) |
1912 | (low 24 bits are ignored) |
1910 | Returned value: |
1913 | Returned value: |
1911 | * function does not return value |
1914 | * function does not return value |
1912 | Remarks: |
1915 | Remarks: |
1913 | * Coordinates are relative to the window. |
1916 | * Coordinates are relative to the window. |
1914 | * End point is also drawn. |
1917 | * End point is also drawn. |
1915 | 1918 | ||
1916 | ---------------------- Constants for registers: ---------------------- |
1919 | ---------------------- Constants for registers: ---------------------- |
1917 | eax - SF_DRAW_LINE (38) |
1920 | eax - SF_DRAW_LINE (38) |
1918 | ====================================================================== |
1921 | ====================================================================== |
1919 | == Function 39, subfunction 1 - get a size of the background image. == |
1922 | == Function 39, subfunction 1 - get a size of the background image. == |
1920 | ====================================================================== |
1923 | ====================================================================== |
1921 | Parameters: |
1924 | Parameters: |
1922 | * eax = 39 - function number |
1925 | * eax = 39 - function number |
1923 | * ebx = 1 - subfunction number |
1926 | * ebx = 1 - subfunction number |
1924 | Returned value: |
1927 | Returned value: |
1925 | * eax = [width]*65536 + [height] |
1928 | * eax = [width]*65536 + [height] |
1926 | Remarks: |
1929 | Remarks: |
1927 | * There is a pair function to set sizes of background image - |
1930 | * There is a pair function to set sizes of background image - |
1928 | subfunction 1 of function 15. After which it is necessary, |
1931 | subfunction 1 of function 15. After which it is necessary, |
1929 | of course, anew to define image. |
1932 | of course, anew to define image. |
1930 | 1933 | ||
1931 | ---------------------- Constants for registers: ---------------------- |
1934 | ---------------------- Constants for registers: ---------------------- |
1932 | eax - SF_BACKGROUND_GET (39) |
1935 | eax - SF_BACKGROUND_GET (39) |
1933 | ====================================================================== |
1936 | ====================================================================== |
1934 | == Function 39, subfunction 2 - get pixel from the background image. = |
1937 | == Function 39, subfunction 2 - get pixel from the background image. = |
1935 | ====================================================================== |
1938 | ====================================================================== |
1936 | Parameters: |
1939 | Parameters: |
1937 | * eax = 39 - function number |
1940 | * eax = 39 - function number |
1938 | * ebx = 2 - subfunction number |
1941 | * ebx = 2 - subfunction number |
1939 | * ecx = offset |
1942 | * ecx = offset |
1940 | Returned value: |
1943 | Returned value: |
1941 | * eax = 0x00RRGGBB - pixel color, if offset is valid |
1944 | * eax = 0x00RRGGBB - pixel color, if offset is valid |
1942 | (less than 0x160000-16) |
1945 | (less than 0x160000-16) |
1943 | * eax = 2 otherwise |
1946 | * eax = 2 otherwise |
1944 | Remarks: |
1947 | Remarks: |
1945 | * Do not rely on returned value for invalid offsets, it may be |
1948 | * Do not rely on returned value for invalid offsets, it may be |
1946 | changed in future kernel versions. |
1949 | changed in future kernel versions. |
1947 | * Offset for pixel with coordinates (x,y) |
1950 | * Offset for pixel with coordinates (x,y) |
1948 | is calculated as (x+y*xsize)*3. |
1951 | is calculated as (x+y*xsize)*3. |
1949 | * There is a pair function to set pixel on the background image - |
1952 | * There is a pair function to set pixel on the background image - |
1950 | subfunction 2 of function 15. |
1953 | subfunction 2 of function 15. |
1951 | 1954 | ||
1952 | ---------------------- Constants for registers: ---------------------- |
1955 | ---------------------- Constants for registers: ---------------------- |
1953 | eax - SF_BACKGROUND_GET (39) |
1956 | eax - SF_BACKGROUND_GET (39) |
1954 | ====================================================================== |
1957 | ====================================================================== |
1955 | == Function 39, subfunction 4 - get drawing mode for the background. = |
1958 | == Function 39, subfunction 4 - get drawing mode for the background. = |
1956 | ====================================================================== |
1959 | ====================================================================== |
1957 | Parameters: |
1960 | Parameters: |
1958 | * eax = 39 - function number |
1961 | * eax = 39 - function number |
1959 | * ebx = 4 - subfunction number |
1962 | * ebx = 4 - subfunction number |
1960 | Returned value: |
1963 | Returned value: |
1961 | * eax = 1 - tile |
1964 | * eax = 1 - tile |
1962 | * eax = 2 - stretch |
1965 | * eax = 2 - stretch |
1963 | Remarks: |
1966 | Remarks: |
1964 | * There is a pair function to set drawing mode - |
1967 | * There is a pair function to set drawing mode - |
1965 | subfunction 4 of function 15. |
1968 | subfunction 4 of function 15. |
1966 | 1969 | ||
1967 | ---------------------- Constants for registers: ---------------------- |
1970 | ---------------------- Constants for registers: ---------------------- |
1968 | eax - SF_BACKGROUND_GET (39) |
1971 | eax - SF_BACKGROUND_GET (39) |
1969 | ====================================================================== |
1972 | ====================================================================== |
1970 | =========== Function 40 - set the mask for expected events. ========== |
1973 | =========== Function 40 - set the mask for expected events. ========== |
1971 | ====================================================================== |
1974 | ====================================================================== |
1972 | The mask for expected events affects function working with events |
1975 | The mask for expected events affects function working with events |
1973 | 10, 11, 23 - they notify only about events allowed by this mask. |
1976 | 10, 11, 23 - they notify only about events allowed by this mask. |
1974 | Parameters: |
1977 | Parameters: |
1975 | * eax = 40 - function number |
1978 | * eax = 40 - function number |
1976 | * ebx = mask: bit i corresponds to event i+1 (see list of events) |
1979 | * ebx = mask: bit i corresponds to event i+1 (see list of events) |
1977 | (set bit permits notice on event) |
1980 | (set bit permits notice on event) |
1978 | bit 31: mouse active/inactive filter |
1981 | bit 31: mouse active/inactive filter |
1979 | bit 31 = 0 - inactive window receive mouse events |
1982 | bit 31 = 0 - inactive window receive mouse events |
1980 | bit 31 = 1 - inactive window does not receive mouse events |
1983 | bit 31 = 1 - inactive window does not receive mouse events |
1981 | bit 30: cursor position filter |
1984 | bit 30: cursor position filter |
1982 | bit 30 = 0 = the window receive mouse events if cursor |
1985 | bit 30 = 0 = the window receive mouse events if cursor |
1983 | outside window |
1986 | outside window |
1984 | bit 30 = 1 - the window does not receive mouse events if cursor |
1987 | bit 30 = 1 - the window does not receive mouse events if cursor |
1985 | outside window |
1988 | outside window |
1986 | Returned value: |
1989 | Returned value: |
1987 | * eax = previous value of mask |
1990 | * eax = previous value of mask |
1988 | Remarks: |
1991 | Remarks: |
1989 | * Default mask (7=111b) enables nofices about redraw, |
1992 | * Default mask (7=111b) enables nofices about redraw, |
1990 | keys and buttons. This is enough for many applications. |
1993 | keys and buttons. This is enough for many applications. |
1991 | * Events prohibited in the mask are saved anyway, when come; |
1994 | * Events prohibited in the mask are saved anyway, when come; |
1992 | they are simply not informed with event functions. |
1995 | they are simply not informed with event functions. |
1993 | * Event functions take into account the mask on moment of |
1996 | * Event functions take into account the mask on moment of |
1994 | function call, not on moment of event arrival. |
1997 | function call, not on moment of event arrival. |
1995 | 1998 | ||
1996 | ---------------------- Constants for registers: ---------------------- |
1999 | ---------------------- Constants for registers: ---------------------- |
1997 | eax - SF_SET_EVENTS_MASK (40) |
2000 | eax - SF_SET_EVENTS_MASK (40) |
1998 | ====================================================================== |
2001 | ====================================================================== |
1999 | ================ Function 43 - input/output to a port. =============== |
2002 | ================ Function 43 - input/output to a port. =============== |
2000 | ====================================================================== |
2003 | ====================================================================== |
2001 | 2004 | ||
2002 | ------------------------ Output data to port ------------------------- |
2005 | ------------------------ Output data to port ------------------------- |
2003 | Parameters: |
2006 | Parameters: |
2004 | * eax = 43 - function number |
2007 | * eax = 43 - function number |
2005 | * bl = byte for output |
2008 | * bl = byte for output |
2006 | * ecx = port number 0xnnnn (from 0 to 0xFFFF) |
2009 | * ecx = port number 0xnnnn (from 0 to 0xFFFF) |
2007 | Returned value: |
2010 | Returned value: |
2008 | * eax = 0 - success |
2011 | * eax = 0 - success |
2009 | * eax = 1 - the thread has not reserved the selected port |
2012 | * eax = 1 - the thread has not reserved the selected port |
2010 | 2013 | ||
2011 | ------------------------ Input data from port ------------------------ |
2014 | ------------------------ Input data from port ------------------------ |
2012 | Parameters: |
2015 | Parameters: |
2013 | * eax = 43 - function number |
2016 | * eax = 43 - function number |
2014 | * ebx is ignored |
2017 | * ebx is ignored |
2015 | * ecx = 0x8000nnnn, where nnnn = port number (from 0 to 0xFFFF) |
2018 | * ecx = 0x8000nnnn, where nnnn = port number (from 0 to 0xFFFF) |
2016 | Returned value: |
2019 | Returned value: |
2017 | * eax = 0 - success, thus ebx = entered byte |
2020 | * eax = 0 - success, thus ebx = entered byte |
2018 | * eax = 1 - the thread has not reserved the selected port |
2021 | * eax = 1 - the thread has not reserved the selected port |
2019 | Remarks: |
2022 | Remarks: |
2020 | * Previously the thread must reserve the selected port |
2023 | * Previously the thread must reserve the selected port |
2021 | for itself by function 46. |
2024 | for itself by function 46. |
2022 | * Instead of call to this function it is better to use |
2025 | * Instead of call to this function it is better to use |
2023 | processor instructions in/out - this is much |
2026 | processor instructions in/out - this is much |
2024 | faster and a bit shorter and easier. |
2027 | faster and a bit shorter and easier. |
2025 | 2028 | ||
2026 | ---------------------- Constants for registers: ---------------------- |
2029 | ---------------------- Constants for registers: ---------------------- |
2027 | eax - SF_PORT_IN_OUT (43) |
2030 | eax - SF_PORT_IN_OUT (43) |
2028 | ====================================================================== |
2031 | ====================================================================== |
2029 | ====== Function 46 - reserve/free a group of input/output ports. ===== |
2032 | ====== Function 46 - reserve/free a group of input/output ports. ===== |
2030 | ====================================================================== |
2033 | ====================================================================== |
2031 | To work with reserved ports an application can access directly by |
2034 | To work with reserved ports an application can access directly by |
2032 | commands in/out (recommended way) and can use function 43 |
2035 | commands in/out (recommended way) and can use function 43 |
2033 | (not recommended way). |
2036 | (not recommended way). |
2034 | Parameters: |
2037 | Parameters: |
2035 | * eax = 46 - function number |
2038 | * eax = 46 - function number |
2036 | * ebx = 0 - reserve, 1 - free |
2039 | * ebx = 0 - reserve, 1 - free |
2037 | * ecx = start port number |
2040 | * ecx = start port number |
2038 | * edx = end port number (inclusive) |
2041 | * edx = end port number (inclusive) |
2039 | Returned value: |
2042 | Returned value: |
2040 | * eax = 0 - success |
2043 | * eax = 0 - success |
2041 | * eax = 1 - error |
2044 | * eax = 1 - error |
2042 | Remarks: |
2045 | Remarks: |
2043 | * For ports reservation: an error occurs if and only if |
2046 | * For ports reservation: an error occurs if and only if |
2044 | one from the following condition satisfies: |
2047 | one from the following condition satisfies: |
2045 | * start port is more than end port; |
2048 | * start port is more than end port; |
2046 | * the selected range contains incorrect port number |
2049 | * the selected range contains incorrect port number |
2047 | (correct are from 0 to 0xFFFF); |
2050 | (correct are from 0 to 0xFFFF); |
2048 | * limit for the total number of reserved areas is exceeded |
2051 | * limit for the total number of reserved areas is exceeded |
2049 | (maximum 255 are allowed); |
2052 | (maximum 255 are allowed); |
2050 | * the selected range intersects with any of earlier reserved |
2053 | * the selected range intersects with any of earlier reserved |
2051 | * For ports free: an error is an attempt to free range, |
2054 | * For ports free: an error is an attempt to free range, |
2052 | that was not earlier reserved by this function |
2055 | that was not earlier reserved by this function |
2053 | (with same ecx,edx). |
2056 | (with same ecx,edx). |
2054 | * If an error occurs (for both cases) function performs no action. |
2057 | * If an error occurs (for both cases) function performs no action. |
2055 | * At booting the system reserves for itself ports |
2058 | * At booting the system reserves for itself ports |
2056 | 0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively). |
2059 | 0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively). |
2057 | * When a thread terminates, all reserved by it ports |
2060 | * When a thread terminates, all reserved by it ports |
2058 | are freed automatically. |
2061 | are freed automatically. |
2059 | 2062 | ||
2060 | ---------------------- Constants for registers: ---------------------- |
2063 | ---------------------- Constants for registers: ---------------------- |
2061 | eax - SF_SET_PORTS (46) |
2064 | eax - SF_SET_PORTS (46) |
2062 | ====================================================================== |
2065 | ====================================================================== |
2063 | ============= Function 47 - draw a number in the window. ============= |
2066 | ============= Function 47 - draw a number in the window. ============= |
2064 | ====================================================================== |
2067 | ====================================================================== |
2065 | Parameters: |
2068 | Parameters: |
2066 | * eax = 47 - function number |
2069 | * eax = 47 - function number |
2067 | * ebx = parameters of conversion number to text: |
2070 | * ebx = parameters of conversion number to text: |
2068 | * bl = 0 - ecx contains number |
2071 | * bl = 0 - ecx contains number |
2069 | * bl = 1 - ecx contains pointer to dword/qword-number |
2072 | * bl = 1 - ecx contains pointer to dword/qword-number |
2070 | * bh = 0 - display in decimal number system |
2073 | * bh = 0 - display in decimal number system |
2071 | * bh = 1 - display in hexadecimal system |
2074 | * bh = 1 - display in hexadecimal system |
2072 | * bh = 2 - display in binary system |
2075 | * bh = 2 - display in binary system |
2073 | * bits 16-21 = how many digits to display |
2076 | * bits 16-21 = how many digits to display |
2074 | * bits 22-29 reserved and must be set to 0 |
2077 | * bits 22-29 reserved and must be set to 0 |
2075 | * bit 30 set = display qword (64-bit) number (must be bl=1) |
2078 | * bit 30 set = display qword (64-bit) number (must be bl=1) |
2076 | * bit 31 set = do not display leading zeroes of the number |
2079 | * bit 31 set = do not display leading zeroes of the number |
2077 | * ecx = number (if bl=0) or pointer (if bl=1) |
2080 | * ecx = number (if bl=0) or pointer (if bl=1) |
2078 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2081 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2079 | * esi = 0xX0RRGGBB: |
2082 | * esi = 0xX0RRGGBB: |
2080 | * RR, GG, BB specify the color |
2083 | * RR, GG, BB specify the color |
2081 | * X = ABnn (bits) |
2084 | * X = ABnn (bits) |
2082 | * nn = font (0/1) |
2085 | * nn = font (0/1) |
2083 | * A is ignored |
2086 | * A is ignored |
2084 | * B=1 - fill background with the color edi |
2087 | * B=1 - fill background with the color edi |
2085 | Returned value: |
2088 | Returned value: |
2086 | * function does not return value |
2089 | * function does not return value |
2087 | Remarks: |
2090 | Remarks: |
2088 | * The given length must not exceed 60. |
2091 | * The given length must not exceed 60. |
2089 | * The exactly given amount of digits is output. If number is small |
2092 | * The exactly given amount of digits is output. If number is small |
2090 | and can be written by smaller amount of digits, it is supplemented |
2093 | and can be written by smaller amount of digits, it is supplemented |
2091 | by leading zeroes; if the number is big and can not be written by |
2094 | by leading zeroes; if the number is big and can not be written by |
2092 | given amount of digits, extra digits are not drawn. |
2095 | given amount of digits, extra digits are not drawn. |
2093 | * Parameters of fonts are shown in the description of function 4 |
2096 | * Parameters of fonts are shown in the description of function 4 |
2094 | (text output). |
2097 | (text output). |
2095 | 2098 | ||
2096 | ---------------------- Constants for registers: ---------------------- |
2099 | ---------------------- Constants for registers: ---------------------- |
2097 | eax - SF_DRAW_NUMBER (47) |
2100 | eax - SF_DRAW_NUMBER (47) |
2098 | ====================================================================== |
2101 | ====================================================================== |
2099 | ========= Function 48, subfunction 0 - apply screen settings. ======== |
2102 | ========= Function 48, subfunction 0 - apply screen settings. ======== |
2100 | ====================================================================== |
2103 | ====================================================================== |
2101 | Parameters: |
2104 | Parameters: |
2102 | * eax = 48 - function number |
2105 | * eax = 48 - function number |
2103 | * ebx = 0 - subfunction number |
2106 | * ebx = 0 - subfunction number |
2104 | * ecx = 0 - reserved |
2107 | * ecx = 0 - reserved |
2105 | Returned value: |
2108 | Returned value: |
2106 | * function does not return value |
2109 | * function does not return value |
2107 | Remarks: |
2110 | Remarks: |
2108 | * Function redraws the screen after parameters change by |
2111 | * Function redraws the screen after parameters change by |
2109 | subfunctions 1 and 2. |
2112 | subfunctions 1 and 2. |
2110 | * Function call without prior call to one of indicated subfunctions |
2113 | * Function call without prior call to one of indicated subfunctions |
2111 | is ignored. |
2114 | is ignored. |
2112 | * Function call with nonzero ecx is ignored. |
2115 | * Function call with nonzero ecx is ignored. |
2113 | 2116 | ||
2114 | ---------------------- Constants for registers: ---------------------- |
2117 | ---------------------- Constants for registers: ---------------------- |
2115 | eax - SF_STYLE_SETTINGS (48) |
2118 | eax - SF_STYLE_SETTINGS (48) |
2116 | ebx - SSF_APPLY (0) |
2119 | ebx - SSF_APPLY (0) |
2117 | ====================================================================== |
2120 | ====================================================================== |
2118 | =========== Function 48, subfunction 1 - set button style. =========== |
2121 | =========== Function 48, subfunction 1 - set button style. =========== |
2119 | ====================================================================== |
2122 | ====================================================================== |
2120 | Parameters: |
2123 | Parameters: |
2121 | * eax = 48 - function number |
2124 | * eax = 48 - function number |
2122 | * ebx = 1 - subfunction number |
2125 | * ebx = 1 - subfunction number |
2123 | * ecx = button style: |
2126 | * ecx = button style: |
2124 | * 0 = flat |
2127 | * 0 = flat |
2125 | * 1 = 3d |
2128 | * 1 = 3d |
2126 | Returned value: |
2129 | Returned value: |
2127 | * function does not return value |
2130 | * function does not return value |
2128 | Remarks: |
2131 | Remarks: |
2129 | * After call to this function one should redraw the screen by |
2132 | * After call to this function one should redraw the screen by |
2130 | subfunction 0. |
2133 | subfunction 0. |
2131 | * Button style influences only to their draw of function 8. |
2134 | * Button style influences only to their draw of function 8. |
2132 | 2135 | ||
2133 | ---------------------- Constants for registers: ---------------------- |
2136 | ---------------------- Constants for registers: ---------------------- |
2134 | eax - SF_STYLE_SETTINGS (48) |
2137 | eax - SF_STYLE_SETTINGS (48) |
2135 | ebx - SSF_SET_BUTTON_STYLE (1) |
2138 | ebx - SSF_SET_BUTTON_STYLE (1) |
2136 | ====================================================================== |
2139 | ====================================================================== |
2137 | ====== Function 48, subfunction 2 - set standard window colors. ====== |
2140 | ====== Function 48, subfunction 2 - set standard window colors. ====== |
2138 | ====================================================================== |
2141 | ====================================================================== |
2139 | Parameters: |
2142 | Parameters: |
2140 | * eax = 48 - function number |
2143 | * eax = 48 - function number |
2141 | * ebx = 2 - subfunction number |
2144 | * ebx = 2 - subfunction number |
2142 | * ecx = pointer to the color table |
2145 | * ecx = pointer to the color table |
2143 | * edx = size of the color table |
2146 | * edx = size of the color table |
2144 | (must be 40 bytes for future compatibility) |
2147 | (must be 40 bytes for future compatibility) |
2145 | Format of the color table is shown in description of subfunction 3. |
2148 | Format of the color table is shown in description of subfunction 3. |
2146 | Returned value: |
2149 | Returned value: |
2147 | * function does not return value |
2150 | * function does not return value |
2148 | Remarks: |
2151 | Remarks: |
2149 | * After call to this function one should redraw the screen by |
2152 | * After call to this function one should redraw the screen by |
2150 | subfunction 0. |
2153 | subfunction 0. |
2151 | * Table of standard colors influences only to applications, |
2154 | * Table of standard colors influences only to applications, |
2152 | which receive this table obviously (by subfunction 3) |
2155 | which receive this table obviously (by subfunction 3) |
2153 | and use it (specifying colors from it to drawing functions). |
2156 | and use it (specifying colors from it to drawing functions). |
2154 | * Table of standard colors is included in skin and is installed |
2157 | * Table of standard colors is included in skin and is installed |
2155 | anew with skin installation (by subfunction 8). |
2158 | anew with skin installation (by subfunction 8). |
2156 | * Color table can be viewed/changed interactively with |
2159 | * Color table can be viewed/changed interactively with |
2157 | the application 'desktop'. |
2160 | the application 'desktop'. |
2158 | 2161 | ||
2159 | ---------------------- Constants for registers: ---------------------- |
2162 | ---------------------- Constants for registers: ---------------------- |
2160 | eax - SF_STYLE_SETTINGS (48) |
2163 | eax - SF_STYLE_SETTINGS (48) |
2161 | ebx - SSF_SET_COLORS (2) |
2164 | ebx - SSF_SET_COLORS (2) |
2162 | ====================================================================== |
2165 | ====================================================================== |
2163 | ====== Function 48, subfunction 3 - get standard window colors. ====== |
2166 | ====== Function 48, subfunction 3 - get standard window colors. ====== |
2164 | ====================================================================== |
2167 | ====================================================================== |
2165 | Parameters: |
2168 | Parameters: |
2166 | * eax = 48 - function number |
2169 | * eax = 48 - function number |
2167 | * ebx = 3 - subfunction number |
2170 | * ebx = 3 - subfunction number |
2168 | * ecx = pointer to the buffer with size edx bytes, |
2171 | * ecx = pointer to the buffer with size edx bytes, |
2169 | where table will be written |
2172 | where table will be written |
2170 | * edx = size of color table |
2173 | * edx = size of color table |
2171 | (must be 40 bytes for future compatibility) |
2174 | (must be 40 bytes for future compatibility) |
2172 | Returned value: |
2175 | Returned value: |
2173 | * function does not return value |
2176 | * function does not return value |
2174 | Format of the color table: |
2177 | Format of the color table: |
2175 | each item is dword-value for color 0x00RRGGBB |
2178 | each item is dword-value for color 0x00RRGGBB |
2176 | * +0: dword: frames - color of frame |
2179 | * +0: dword: frames - color of frame |
2177 | * +4: dword: grab - color of header |
2180 | * +4: dword: grab - color of header |
2178 | * +8: dword: grab_button - color of button on header bar |
2181 | * +8: dword: grab_button - color of button on header bar |
2179 | * +12 = +0xC: dword: grab_button_text - color of text on button |
2182 | * +12 = +0xC: dword: grab_button_text - color of text on button |
2180 | on header bar |
2183 | on header bar |
2181 | * +16 = +0x10: dword: grab_text - color of text on header |
2184 | * +16 = +0x10: dword: grab_text - color of text on header |
2182 | * +20 = +0x14: dword: work - color of working area |
2185 | * +20 = +0x14: dword: work - color of working area |
2183 | * +24 = +0x18: dword: work_button - color of button in working area |
2186 | * +24 = +0x18: dword: work_button - color of button in working area |
2184 | * +28 = +0x1C: dword: work_button_text - color of text on button |
2187 | * +28 = +0x1C: dword: work_button_text - color of text on button |
2185 | in working area |
2188 | in working area |
2186 | * +32 = +0x20: dword: work_text - color of text in working area |
2189 | * +32 = +0x20: dword: work_text - color of text in working area |
2187 | * +36 = +0x24: dword: work_graph - color of graphics in working area |
2190 | * +36 = +0x24: dword: work_graph - color of graphics in working area |
2188 | Remarks: |
2191 | Remarks: |
2189 | * Structure of the color table is described in the standard |
2192 | * Structure of the color table is described in the standard |
2190 | include file 'macros.inc' as 'system_colors'; for example, |
2193 | include file 'macros.inc' as 'system_colors'; for example, |
2191 | it is possible to write: |
2194 | it is possible to write: |
2192 | sc system_colors ; variable declaration |
2195 | sc system_colors ; variable declaration |
2193 | ... ; somewhere one must call |
2196 | ... ; somewhere one must call |
2194 | ; this function with ecx=sc |
2197 | ; this function with ecx=sc |
2195 | mov ecx, [sc.work_button_text] ; read text color on |
2198 | mov ecx, [sc.work_button_text] ; read text color on |
2196 | ; buttin in working area |
2199 | ; buttin in working area |
2197 | * A program itself desides to use or not to use color table. |
2200 | * A program itself desides to use or not to use color table. |
2198 | For usage program must simply at calls to drawing functions select |
2201 | For usage program must simply at calls to drawing functions select |
2199 | color taken from the table. |
2202 | color taken from the table. |
2200 | * At change of the table of standard colors (by subfunction 2 with |
2203 | * At change of the table of standard colors (by subfunction 2 with |
2201 | the subsequent application of changes by subfunction 0 or |
2204 | the subsequent application of changes by subfunction 0 or |
2202 | at skin set by subfunction 8) the system sends to all windows |
2205 | at skin set by subfunction 8) the system sends to all windows |
2203 | redraw message (the event with code 1). |
2206 | redraw message (the event with code 1). |
2204 | * Color table can be viewed/changed interactively with |
2207 | * Color table can be viewed/changed interactively with |
2205 | the application 'desktop'. |
2208 | the application 'desktop'. |
2206 | 2209 | ||
2207 | ---------------------- Constants for registers: ---------------------- |
2210 | ---------------------- Constants for registers: ---------------------- |
2208 | eax - SF_STYLE_SETTINGS (48) |
2211 | eax - SF_STYLE_SETTINGS (48) |
2209 | ebx - SSF_GET_COLORS (3) |
2212 | ebx - SSF_GET_COLORS (3) |
2210 | ====================================================================== |
2213 | ====================================================================== |
2211 | ============ Function 48, subfunction 4 - get skin height. =========== |
2214 | ============ Function 48, subfunction 4 - get skin height. =========== |
2212 | ====================================================================== |
2215 | ====================================================================== |
2213 | Parameters: |
2216 | Parameters: |
2214 | * eax = 48 - function number |
2217 | * eax = 48 - function number |
2215 | * ebx = 4 - subfunction number |
2218 | * ebx = 4 - subfunction number |
2216 | Returned value: |
2219 | Returned value: |
2217 | * eax = skin height |
2220 | * eax = skin height |
2218 | Remarks: |
2221 | Remarks: |
2219 | * Skin height is defined as the height of a header |
2222 | * Skin height is defined as the height of a header |
2220 | of skinned windows. |
2223 | of skinned windows. |
2221 | * See also general structure of window in the description |
2224 | * See also general structure of window in the description |
2222 | of function 0. |
2225 | of function 0. |
2223 | 2226 | ||
2224 | ---------------------- Constants for registers: ---------------------- |
2227 | ---------------------- Constants for registers: ---------------------- |
2225 | eax - SF_STYLE_SETTINGS (48) |
2228 | eax - SF_STYLE_SETTINGS (48) |
2226 | ebx - SSF_GET_SKIN_HEIGHT (4) |
2229 | ebx - SSF_GET_SKIN_HEIGHT (4) |
2227 | ====================================================================== |
2230 | ====================================================================== |
2228 | ======== Function 48, subfunction 5 - get screen working area. ======= |
2231 | ======== Function 48, subfunction 5 - get screen working area. ======= |
2229 | ====================================================================== |
2232 | ====================================================================== |
2230 | Parameters: |
2233 | Parameters: |
2231 | * eax = 48 - function number |
2234 | * eax = 48 - function number |
2232 | * ebx = 5 - subfunction number |
2235 | * ebx = 5 - subfunction number |
2233 | Returned value: |
2236 | Returned value: |
2234 | * eax = [left]*65536 + [right] |
2237 | * eax = [left]*65536 + [right] |
2235 | * ebx = [top]*65536 + [bottom] |
2238 | * ebx = [top]*65536 + [bottom] |
2236 | Remarks: |
2239 | Remarks: |
2237 | * The screen working area defines position and coordinates of |
2240 | * The screen working area defines position and coordinates of |
2238 | a maximized window. |
2241 | a maximized window. |
2239 | * The screen working area in view of normal work is all screen |
2242 | * The screen working area in view of normal work is all screen |
2240 | without taskbar ('@taskbar' application). |
2243 | without taskbar ('@taskbar' application). |
2241 | * (left,top) are coordinates of the left upper corner, |
2244 | * (left,top) are coordinates of the left upper corner, |
2242 | (right,bottom) are coordinates of the right lower one. |
2245 | (right,bottom) are coordinates of the right lower one. |
2243 | Thus the size of working area on x axis can be calculated by |
2246 | Thus the size of working area on x axis can be calculated by |
2244 | formula right-left+1, on y axis - by formula bottom-right+1. |
2247 | formula right-left+1, on y axis - by formula bottom-right+1. |
2245 | * See also function 14, |
2248 | * See also function 14, |
2246 | to get sizes of all screen. |
2249 | to get sizes of all screen. |
2247 | * There is a pair function to set working area - subfunction 6. |
2250 | * There is a pair function to set working area - subfunction 6. |
2248 | 2251 | ||
2249 | ---------------------- Constants for registers: ---------------------- |
2252 | ---------------------- Constants for registers: ---------------------- |
2250 | eax - SF_STYLE_SETTINGS (48) |
2253 | eax - SF_STYLE_SETTINGS (48) |
2251 | ebx - SSF_GET_SCREEN_AREA (5) |
2254 | ebx - SSF_GET_SCREEN_AREA (5) |
2252 | ====================================================================== |
2255 | ====================================================================== |
2253 | ======== Function 48, subfunction 6 - set screen working area. ======= |
2256 | ======== Function 48, subfunction 6 - set screen working area. ======= |
2254 | ====================================================================== |
2257 | ====================================================================== |
2255 | Parameters: |
2258 | Parameters: |
2256 | * eax = 48 - function number |
2259 | * eax = 48 - function number |
2257 | * ebx = 6 - subfunction number |
2260 | * ebx = 6 - subfunction number |
2258 | * ecx = [left]*65536 + [right] |
2261 | * ecx = [left]*65536 + [right] |
2259 | * edx = [top]*65536 + [bottom] |
2262 | * edx = [top]*65536 + [bottom] |
2260 | Returned value: |
2263 | Returned value: |
2261 | * function does not return value |
2264 | * function does not return value |
2262 | Remarks: |
2265 | Remarks: |
2263 | * The screen working area defines position and coordinates of |
2266 | * The screen working area defines position and coordinates of |
2264 | a maximized window. |
2267 | a maximized window. |
2265 | * This function is used only by the application '@taskbar', |
2268 | * This function is used only by the application '@taskbar', |
2266 | which set working area to all screen without taskbar. |
2269 | which set working area to all screen without taskbar. |
2267 | * (left,top) are coordinates of the left upper corner, |
2270 | * (left,top) are coordinates of the left upper corner, |
2268 | (right,bottom) are coordinates of the right lower one. |
2271 | (right,bottom) are coordinates of the right lower one. |
2269 | Thus the size of working area on x axis can be calculated by |
2272 | Thus the size of working area on x axis can be calculated by |
2270 | formula right-left+1, on y axis - by formula bottom-right+1. |
2273 | formula right-left+1, on y axis - by formula bottom-right+1. |
2271 | * If 'left'>='right', x-coordinate of working area is not changed. |
2274 | * If 'left'>='right', x-coordinate of working area is not changed. |
2272 | If 'left'<0, 'left' will not be set. If 'right' is greater than or |
2275 | If 'left'<0, 'left' will not be set. If 'right' is greater than or |
2273 | equal to screen width, 'right' will not be set. |
2276 | equal to screen width, 'right' will not be set. |
2274 | Similarly on y axis. |
2277 | Similarly on y axis. |
2275 | * See also function 14, |
2278 | * See also function 14, |
2276 | to get sizes of all screen. |
2279 | to get sizes of all screen. |
2277 | * There is a pair function to get working area - subfunction 5. |
2280 | * There is a pair function to get working area - subfunction 5. |
2278 | * This function redraws the screen automatically, |
2281 | * This function redraws the screen automatically, |
2279 | updating coordinates and sizes of maximized windows. |
2282 | updating coordinates and sizes of maximized windows. |
2280 | The system sends to all windows redraw message (the event 1). |
2283 | The system sends to all windows redraw message (the event 1). |
2281 | 2284 | ||
2282 | ---------------------- Constants for registers: ---------------------- |
2285 | ---------------------- Constants for registers: ---------------------- |
2283 | eax - SF_STYLE_SETTINGS (48) |
2286 | eax - SF_STYLE_SETTINGS (48) |
2284 | ebx - SSF_SET_SCREEN_AREA (6) |
2287 | ebx - SSF_SET_SCREEN_AREA (6) |
2285 | ====================================================================== |
2288 | ====================================================================== |
2286 | =========== Function 48, subfunction 7 - get skin margins. =========== |
2289 | =========== Function 48, subfunction 7 - get skin margins. =========== |
2287 | ====================================================================== |
2290 | ====================================================================== |
2288 | Returns the area of a header of a skinned window, intended for |
2291 | Returns the area of a header of a skinned window, intended for |
2289 | a text of a header. |
2292 | a text of a header. |
2290 | Parameters: |
2293 | Parameters: |
2291 | * eax = 48 - function number |
2294 | * eax = 48 - function number |
2292 | * ebx = 7 - subfunction number |
2295 | * ebx = 7 - subfunction number |
2293 | Returned value: |
2296 | Returned value: |
2294 | * eax = [left]*65536 + [right] |
2297 | * eax = [left]*65536 + [right] |
2295 | * ebx = [top]*65536 + [bottom] |
2298 | * ebx = [top]*65536 + [bottom] |
2296 | Remarks: |
2299 | Remarks: |
2297 | * An application decides itself to use or not to use this function. |
2300 | * An application decides itself to use or not to use this function. |
2298 | * It is recommended to take into account returned value |
2301 | * It is recommended to take into account returned value |
2299 | of this function for choice of a place for drawing header text |
2302 | of this function for choice of a place for drawing header text |
2300 | (by function 4) or a substitute of header text |
2303 | (by function 4) or a substitute of header text |
2301 | (at the discretion of an application). |
2304 | (at the discretion of an application). |
2302 | 2305 | ||
2303 | ---------------------- Constants for registers: ---------------------- |
2306 | ---------------------- Constants for registers: ---------------------- |
2304 | eax - SF_STYLE_SETTINGS (48) |
2307 | eax - SF_STYLE_SETTINGS (48) |
2305 | ebx - SSF_GET_SKIN_MARGINS (7) |
2308 | ebx - SSF_GET_SKIN_MARGINS (7) |
2306 | ====================================================================== |
2309 | ====================================================================== |
2307 | ============= Function 48, subfunction 8 - set used skin. ============ |
2310 | ============= Function 48, subfunction 8 - set used skin. ============ |
2308 | ====================================================================== |
2311 | ====================================================================== |
2309 | Parameters: |
2312 | Parameters: |
2310 | * eax = 48 - function number |
2313 | * eax = 48 - function number |
2311 | * ebx = 8 - subfunction number |
2314 | * ebx = 8 - subfunction number |
2312 | * ecx = pointer to filename of the skin |
2315 | * ecx = pointer to filename of the skin |
2313 | Returned value: |
2316 | Returned value: |
2314 | * eax = 0 - success |
2317 | * eax = 0 - success |
2315 | * otherwise eax = file system error code; if file does not |
2318 | * otherwise eax = file system error code; if file does not |
2316 | contain valid skin, function returns error 3 |
2319 | contain valid skin, function returns error 3 |
2317 | (unknown file system). |
2320 | (unknown file system). |
2318 | Remarks: |
2321 | Remarks: |
2319 | * After successful skin loading the system sends to all windows |
2322 | * After successful skin loading the system sends to all windows |
2320 | redraw message (the event 1). |
2323 | redraw message (the event 1). |
2321 | * At booting the system reads skin from file 'default.skn' |
2324 | * At booting the system reads skin from file 'default.skn' |
2322 | on ramdisk. |
2325 | on ramdisk. |
2323 | * User can change the skin statically by creating hisself |
2326 | * User can change the skin statically by creating hisself |
2324 | 'default.skn' or dynamically with the application 'desktop'. |
2327 | 'default.skn' or dynamically with the application 'desktop'. |
2325 | 2328 | ||
2326 | ---------------------- Constants for registers: ---------------------- |
2329 | ---------------------- Constants for registers: ---------------------- |
2327 | eax - SF_STYLE_SETTINGS (48) |
2330 | eax - SF_STYLE_SETTINGS (48) |
2328 | ebx - SSF_SET_SKIN (8) |
2331 | ebx - SSF_SET_SKIN (8) |
2329 | ====================================================================== |
2332 | ====================================================================== |
2330 | ====== Function 48, subfunction 9 - get font smoothing setting. ====== |
2333 | ====== Function 48, subfunction 9 - get font smoothing setting. ====== |
2331 | ====================================================================== |
2334 | ====================================================================== |
2332 | Parameters: |
2335 | Parameters: |
2333 | * eax = 48 - function number |
2336 | * eax = 48 - function number |
2334 | * ebx = 9 - subfunction number |
2337 | * ebx = 9 - subfunction number |
2335 | Returned value: |
2338 | Returned value: |
2336 | * eax = 2 - subpixel, 1 - anti-aliasing, 0 - off |
2339 | * eax = 2 - subpixel, 1 - anti-aliasing, 0 - off |
2337 | 2340 | ||
2338 | ---------------------- Constants for registers: ---------------------- |
2341 | ---------------------- Constants for registers: ---------------------- |
2339 | eax - SF_STYLE_SETTINGS (48) |
2342 | eax - SF_STYLE_SETTINGS (48) |
2340 | ebx - SSF_GET_FONT_SMOOTH (9) |
2343 | ebx - SSF_GET_FONT_SMOOTH (9) |
2341 | ====================================================================== |
2344 | ====================================================================== |
2342 | ========== Function 48, subfunction 10 - set font smoothing. ========= |
2345 | ========== Function 48, subfunction 10 - set font smoothing. ========= |
2343 | ====================================================================== |
2346 | ====================================================================== |
2344 | Parameters: |
2347 | Parameters: |
2345 | * eax = 48 - function number |
2348 | * eax = 48 - function number |
2346 | * ebx = 10 - subfunction number |
2349 | * ebx = 10 - subfunction number |
2347 | * cl = 2 - subpixel, 1 - anti-aliasing, 0 - off |
2350 | * cl = 2 - subpixel, 1 - anti-aliasing, 0 - off |
2348 | 2351 | ||
2349 | ---------------------- Constants for registers: ---------------------- |
2352 | ---------------------- Constants for registers: ---------------------- |
2350 | eax - SF_STYLE_SETTINGS (48) |
2353 | eax - SF_STYLE_SETTINGS (48) |
2351 | ebx - SSF_SET_FONT_SMOOTH (10) |
2354 | ebx - SSF_SET_FONT_SMOOTH (10) |
2352 | ====================================================================== |
2355 | ====================================================================== |
2353 | ============ Function 48, subfunction 11 - get font size. ============ |
2356 | ============ Function 48, subfunction 11 - get font size. ============ |
2354 | ====================================================================== |
2357 | ====================================================================== |
2355 | Parameters: |
2358 | Parameters: |
2356 | * eax = 48 - function number |
2359 | * eax = 48 - function number |
2357 | * ebx = 9 - subfunction number |
2360 | * ebx = 9 - subfunction number |
2358 | Returned value: |
2361 | Returned value: |
2359 | * eax = current font height in pixels |
2362 | * eax = current font height in pixels |
2360 | 2363 | ||
2361 | ---------------------- Constants for registers: ---------------------- |
2364 | ---------------------- Constants for registers: ---------------------- |
2362 | eax - SF_STYLE_SETTINGS (48) |
2365 | eax - SF_STYLE_SETTINGS (48) |
2363 | ebx - SSF_GET_FONT_SIZE (11) |
2366 | ebx - SSF_GET_FONT_SIZE (11) |
2364 | ====================================================================== |
2367 | ====================================================================== |
2365 | ============ Function 48, subfunction 12 - set font size. ============ |
2368 | ============ Function 48, subfunction 12 - set font size. ============ |
2366 | ====================================================================== |
2369 | ====================================================================== |
2367 | Parameters: |
2370 | Parameters: |
2368 | * eax = 48 - function number |
2371 | * eax = 48 - function number |
2369 | * ebx = 10 - subfunction number |
2372 | * ebx = 10 - subfunction number |
2370 | * cl = new font height in pixels |
2373 | * cl = new font height in pixels |
2371 | 2374 | ||
2372 | ---------------------- Constants for registers: ---------------------- |
2375 | ---------------------- Constants for registers: ---------------------- |
2373 | eax - SF_STYLE_SETTINGS (48) |
2376 | eax - SF_STYLE_SETTINGS (48) |
2374 | ebx - SSF_SET_FONT_SIZE (12) |
2377 | ebx - SSF_SET_FONT_SIZE (12) |
2375 | ====================================================================== |
2378 | ====================================================================== |
2376 | =========== Function 49 - Advanced Power Management (APM). =========== |
2379 | =========== Function 49 - Advanced Power Management (APM). =========== |
2377 | ====================================================================== |
2380 | ====================================================================== |
2378 | Parameters: |
2381 | Parameters: |
2379 | * eax = 49 - function number |
2382 | * eax = 49 - function number |
2380 | * dx = number of the APM function |
2383 | * dx = number of the APM function |
2381 | (analogue of ax in APM specification) |
2384 | (analogue of ax in APM specification) |
2382 | * bx, cx = parameters of the APM function |
2385 | * bx, cx = parameters of the APM function |
2383 | Returned value: |
2386 | Returned value: |
2384 | * 16-bit registers ax, bx, cx, dx, si, di and carry flag CF |
2387 | * 16-bit registers ax, bx, cx, dx, si, di and carry flag CF |
2385 | are set according to the APM specification |
2388 | are set according to the APM specification |
2386 | * high halves of 32-bit registers eax, ebx, ecx, |
2389 | * high halves of 32-bit registers eax, ebx, ecx, |
2387 | edx, esi, edi are destroyed |
2390 | edx, esi, edi are destroyed |
2388 | Remarks: |
2391 | Remarks: |
2389 | * APM 1.2 specification is described in the document |
2392 | * APM 1.2 specification is described in the document |
2390 | "Advanced Power Management (APM) BIOS Specification" |
2393 | "Advanced Power Management (APM) BIOS Specification" |
2391 | (Revision 1.2), available at |
2394 | (Revision 1.2), available at |
2392 | http://www.microsoft.com/whdc/archive/amp_12.mspx; |
2395 | http://www.microsoft.com/whdc/archive/amp_12.mspx; |
2393 | besides it is included in famous Interrupt List by Ralf Brown |
2396 | besides it is included in famous Interrupt List by Ralf Brown |
2394 | (http://www.pobox.com/~ralf/files.html, |
2397 | (http://www.pobox.com/~ralf/files.html, |
2395 | ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). |
2398 | ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). |
2396 | 2399 | ||
2397 | ---------------------- Constants for registers: ---------------------- |
2400 | ---------------------- Constants for registers: ---------------------- |
2398 | eax - SF_APM (49) |
2401 | eax - SF_APM (49) |
2399 | ====================================================================== |
2402 | ====================================================================== |
2400 | =================== Function 50 - set window shape. ================== |
2403 | =================== Function 50 - set window shape. ================== |
2401 | ====================================================================== |
2404 | ====================================================================== |
2402 | Normal windows have rectangular shape. This function can give to |
2405 | Normal windows have rectangular shape. This function can give to |
2403 | a window any shape. The shape is given by a set of points inside |
2406 | a window any shape. The shape is given by a set of points inside |
2404 | the base rectangle belonging to a window. Position and coordinates |
2407 | the base rectangle belonging to a window. Position and coordinates |
2405 | of the base rectangle are set by function 0 |
2408 | of the base rectangle are set by function 0 |
2406 | and changed by function 67. |
2409 | and changed by function 67. |
2407 | 2410 | ||
2408 | --------------------------- Set shape data --------------------------- |
2411 | --------------------------- Set shape data --------------------------- |
2409 | Parameters: |
2412 | Parameters: |
2410 | * eax = 50 - function number |
2413 | * eax = 50 - function number |
2411 | * ebx = 0 - subfunction number |
2414 | * ebx = 0 - subfunction number |
2412 | * ecx = pointer to shape data (array of bytes 0/1) |
2415 | * ecx = pointer to shape data (array of bytes 0/1) |
2413 | Returned value: |
2416 | Returned value: |
2414 | * function does not return value |
2417 | * function does not return value |
2415 | 2418 | ||
2416 | -------------------------- Set shape scale --------------------------- |
2419 | -------------------------- Set shape scale --------------------------- |
2417 | Parameters: |
2420 | Parameters: |
2418 | * eax = 50 - function number |
2421 | * eax = 50 - function number |
2419 | * ebx = 1 - subfunction number |
2422 | * ebx = 1 - subfunction number |
2420 | * ecx sets a scale: each byte of data defines |
2423 | * ecx sets a scale: each byte of data defines |
2421 | (2^scale)*(2^scale) pixels |
2424 | (2^scale)*(2^scale) pixels |
2422 | Returned value: |
2425 | Returned value: |
2423 | * function does not return value |
2426 | * function does not return value |
2424 | Remarks: |
2427 | Remarks: |
2425 | * Default scale is 0 (scale factor is 1). If in the shape data |
2428 | * Default scale is 0 (scale factor is 1). If in the shape data |
2426 | one byte corresponds to one pixel, there is no necessity |
2429 | one byte corresponds to one pixel, there is no necessity |
2427 | to set scale. |
2430 | to set scale. |
2428 | * Let's designate xsize = window width (in pixels), ysize = height; |
2431 | * Let's designate xsize = window width (in pixels), ysize = height; |
2429 | pay attention, that they are one pixel more than defined by |
2432 | pay attention, that they are one pixel more than defined by |
2430 | functions 0, 67. |
2433 | functions 0, 67. |
2431 | * On definition of scale xsize and ysize must be divisible |
2434 | * On definition of scale xsize and ysize must be divisible |
2432 | on 2^scale. |
2435 | on 2^scale. |
2433 | * Byte of data on offset 'a' must be 0/1 and defines belonging |
2436 | * Byte of data on offset 'a' must be 0/1 and defines belonging |
2434 | to a window of square with the side 2^scale (if scale=0, |
2437 | to a window of square with the side 2^scale (if scale=0, |
2435 | this is one pixel) and coordinates of the left upper corner |
2438 | this is one pixel) and coordinates of the left upper corner |
2436 | (a mod (xsize shr scale), a div (xsize shr scale)) |
2439 | (a mod (xsize shr scale), a div (xsize shr scale)) |
2437 | * Data size: (xsize shr scale)*(ysize shr scale). |
2440 | * Data size: (xsize shr scale)*(ysize shr scale). |
2438 | * Data must be presented in the memory and not change |
2441 | * Data must be presented in the memory and not change |
2439 | after set of shape. |
2442 | after set of shape. |
2440 | * The system views the shape data at every window redraw by |
2443 | * The system views the shape data at every window redraw by |
2441 | function 0. |
2444 | function 0. |
2442 | * The call of subfunction 0 with NULL pointer results in return |
2445 | * The call of subfunction 0 with NULL pointer results in return |
2443 | to the rectangular shape. |
2446 | to the rectangular shape. |
2444 | 2447 | ||
2445 | ---------------------- Constants for registers: ---------------------- |
2448 | ---------------------- Constants for registers: ---------------------- |
2446 | eax - SF_SET_WINDOW_SHAPE (50) |
2449 | eax - SF_SET_WINDOW_SHAPE (50) |
2447 | ====================================================================== |
2450 | ====================================================================== |
2448 | ==================== Function 51 - create thread. ==================== |
2451 | ==================== Function 51 - create thread. ==================== |
2449 | ====================================================================== |
2452 | ====================================================================== |
2450 | Parameters: |
2453 | Parameters: |
2451 | * eax = 51 - function number |
2454 | * eax = 51 - function number |
2452 | * ebx = 1 - unique subfunction |
2455 | * ebx = 1 - unique subfunction |
2453 | * ecx = address of thread entry point (starting eip) |
2456 | * ecx = address of thread entry point (starting eip) |
2454 | * edx = pointer to thread stack (starting esp) |
2457 | * edx = pointer to thread stack (starting esp) |
2455 | Returned value: |
2458 | Returned value: |
2456 | * eax = -1 - error (there is too many threads) |
2459 | * eax = -1 - error (there is too many threads) |
2457 | * otherwise eax = TID - thread identifier |
2460 | * otherwise eax = TID - thread identifier |
2458 | 2461 | ||
2459 | ---------------------- Constants for registers: ---------------------- |
2462 | ---------------------- Constants for registers: ---------------------- |
2460 | eax - SF_CREATE_THREAD (51) |
2463 | eax - SF_CREATE_THREAD (51) |
2461 | ====================================================================== |
2464 | ====================================================================== |
2462 | ==================== Function 54, subfunction 0 ====================== |
2465 | ==================== Function 54, subfunction 0 ====================== |
2463 | ============== Get the number of slots in the clipboard. ============= |
2466 | ============== Get the number of slots in the clipboard. ============= |
2464 | ====================================================================== |
2467 | ====================================================================== |
2465 | Parameters: |
2468 | Parameters: |
2466 | * eax = 54 - function number |
2469 | * eax = 54 - function number |
2467 | * ebx = 0 - subfunction number |
2470 | * ebx = 0 - subfunction number |
2468 | Returned value: |
2471 | Returned value: |
2469 | * eax = slots in the clipboard |
2472 | * eax = slots in the clipboard |
2470 | * eax = -1 - main list area not found |
2473 | * eax = -1 - main list area not found |
2471 | 2474 | ||
2472 | ---------------------- Constants for registers: ---------------------- |
2475 | ---------------------- Constants for registers: ---------------------- |
2473 | eax - SF_CLIPBOARD (54) |
2476 | eax - SF_CLIPBOARD (54) |
2474 | ebx - SSF_GET_SLOT_COUNT (0) |
2477 | ebx - SSF_GET_SLOT_COUNT (0) |
2475 | ====================================================================== |
2478 | ====================================================================== |
2476 | ==================== Function 54, subfunction 1 ====================== |
2479 | ==================== Function 54, subfunction 1 ====================== |
2477 | ================= Read the data from the clipboard. ================== |
2480 | ================= Read the data from the clipboard. ================== |
2478 | ====================================================================== |
2481 | ====================================================================== |
2479 | Parameters: |
2482 | Parameters: |
2480 | * eax = 54 - function number |
2483 | * eax = 54 - function number |
2481 | * ebx = 1 - subfunction number |
2484 | * ebx = 1 - subfunction number |
2482 | * eсx = slot number |
2485 | * eсx = slot number |
2483 | Returned value: |
2486 | Returned value: |
2484 | * eax = if successful - pointer to a memory with data |
2487 | * eax = if successful - pointer to a memory with data |
2485 | * eax = 1 - error |
2488 | * eax = 1 - error |
2486 | * eax = -1 - main list area not found |
2489 | * eax = -1 - main list area not found |
2487 | 2490 | ||
2488 | ---------------------- Constants for registers: ---------------------- |
2491 | ---------------------- Constants for registers: ---------------------- |
2489 | eax - SF_CLIPBOARD (54) |
2492 | eax - SF_CLIPBOARD (54) |
2490 | ebx - SSF_READ_CB (1) |
2493 | ebx - SSF_READ_CB (1) |
2491 | ====================================================================== |
2494 | ====================================================================== |
2492 | ==================== Function 54, subfunction 2 ====================== |
2495 | ==================== Function 54, subfunction 2 ====================== |
2493 | ================= Write the data to the clipboard. =================== |
2496 | ================= Write the data to the clipboard. =================== |
2494 | ====================================================================== |
2497 | ====================================================================== |
2495 | Parameters: |
2498 | Parameters: |
2496 | * eax = 54 - function number |
2499 | * eax = 54 - function number |
2497 | * ebx = 2 - subfunction number |
2500 | * ebx = 2 - subfunction number |
2498 | * eсx = the number of bytes to be copied |
2501 | * eсx = the number of bytes to be copied |
2499 | * edx = a pointer to a buffer for data to be copied |
2502 | * edx = a pointer to a buffer for data to be copied |
2500 | Returned value: |
2503 | Returned value: |
2501 | * eax = 0 - success |
2504 | * eax = 0 - success |
2502 | * eax = 1 - error |
2505 | * eax = 1 - error |
2503 | * eax = -1 - main list area not found |
2506 | * eax = -1 - main list area not found |
2504 | 2507 | ||
2505 | ---------------------- Constants for registers: ---------------------- |
2508 | ---------------------- Constants for registers: ---------------------- |
2506 | eax - SF_CLIPBOARD (54) |
2509 | eax - SF_CLIPBOARD (54) |
2507 | ebx - SSF_WRITE_CB (2) |
2510 | ebx - SSF_WRITE_CB (2) |
2508 | ====================================================================== |
2511 | ====================================================================== |
2509 | ===================== Function 54, subfunction 3 ===================== |
2512 | ===================== Function 54, subfunction 3 ===================== |
2510 | ================ Delete the last slot in the clipboard =============== |
2513 | ================ Delete the last slot in the clipboard =============== |
2511 | ====================================================================== |
2514 | ====================================================================== |
2512 | Parameters: |
2515 | Parameters: |
2513 | * eax = 54 - function number |
2516 | * eax = 54 - function number |
2514 | * ebx = 3 - subfunction number |
2517 | * ebx = 3 - subfunction number |
2515 | Returned value: |
2518 | Returned value: |
2516 | * eax = 0 - success |
2519 | * eax = 0 - success |
2517 | * eax = 1 - error |
2520 | * eax = 1 - error |
2518 | * eax = -1 - main list area not found |
2521 | * eax = -1 - main list area not found |
2519 | 2522 | ||
2520 | ---------------------- Constants for registers: ---------------------- |
2523 | ---------------------- Constants for registers: ---------------------- |
2521 | eax - SF_CLIPBOARD (54) |
2524 | eax - SF_CLIPBOARD (54) |
2522 | ebx - SSF_DEL_SLOT (3) |
2525 | ebx - SSF_DEL_SLOT (3) |
2523 | ====================================================================== |
2526 | ====================================================================== |
2524 | ===================== Function 54, subfunction 4 ===================== |
2527 | ===================== Function 54, subfunction 4 ===================== |
2525 | ===================== Alarm reset the lock buffer ==================== |
2528 | ===================== Alarm reset the lock buffer ==================== |
2526 | ====================================================================== |
2529 | ====================================================================== |
2527 | Parameters: |
2530 | Parameters: |
2528 | * eax = 54 - function number |
2531 | * eax = 54 - function number |
2529 | * ebx = 4 - subfunction number |
2532 | * ebx = 4 - subfunction number |
2530 | Returned value: |
2533 | Returned value: |
2531 | * eax = 0 - success |
2534 | * eax = 0 - success |
2532 | * eax = -1 - main list area not found or no blocking |
2535 | * eax = -1 - main list area not found or no blocking |
2533 | Remarks: |
2536 | Remarks: |
2534 | * Used in exceptional cases, where no responsible or killed |
2537 | * Used in exceptional cases, where no responsible or killed |
2535 | application blocked the clipboard operations. |
2538 | application blocked the clipboard operations. |
2536 | 2539 | ||
2537 | ---------------------- Constants for registers: ---------------------- |
2540 | ---------------------- Constants for registers: ---------------------- |
2538 | eax - SF_CLIPBOARD (54) |
2541 | eax - SF_CLIPBOARD (54) |
2539 | ebx - SSF_UNLOCK_BUFFER (4) |
2542 | ebx - SSF_UNLOCK_BUFFER (4) |
2540 | ====================================================================== |
2543 | ====================================================================== |
2541 | Function 55, subfunction 55 - begin to play data on built-in speaker. |
2544 | Function 55, subfunction 55 - begin to play data on built-in speaker. |
2542 | ====================================================================== |
2545 | ====================================================================== |
2543 | Parameters: |
2546 | Parameters: |
2544 | * eax = 55 - function number |
2547 | * eax = 55 - function number |
2545 | * ebx = 55 - subfunction number |
2548 | * ebx = 55 - subfunction number |
2546 | * esi = pointer to data |
2549 | * esi = pointer to data |
2547 | Returned value: |
2550 | Returned value: |
2548 | * eax = 0 - success |
2551 | * eax = 0 - success |
2549 | * eax = 55 - error (speaker is off or busy) |
2552 | * eax = 55 - error (speaker is off or busy) |
2550 | Data is an array of items with variable length. |
2553 | Data is an array of items with variable length. |
2551 | Format of each item is defined by first byte: |
2554 | Format of each item is defined by first byte: |
2552 | * 0 = end of data |
2555 | * 0 = end of data |
2553 | * 1..0x80 = sets sound duration on 1/100 of second; sound note |
2556 | * 1..0x80 = sets sound duration on 1/100 of second; sound note |
2554 | is defined by immediate value of frequency |
2557 | is defined by immediate value of frequency |
2555 | * following word (2 bytes) contains frequency divider; |
2558 | * following word (2 bytes) contains frequency divider; |
2556 | frequency is defined as 1193180/divider |
2559 | frequency is defined as 1193180/divider |
2557 | * 0x81 = invalid |
2560 | * 0x81 = invalid |
2558 | * 0x82..0xFF = note is defined by octave and number: |
2561 | * 0x82..0xFF = note is defined by octave and number: |
2559 | * duration in 1/100 of second = (first byte)-0x81 |
2562 | * duration in 1/100 of second = (first byte)-0x81 |
2560 | * there is one more byte; |
2563 | * there is one more byte; |
2561 | * (second byte)=0xFF - delay |
2564 | * (second byte)=0xFF - delay |
2562 | * otherwise it looks like a*0x10+b, where b=number of the note in |
2565 | * otherwise it looks like a*0x10+b, where b=number of the note in |
2563 | an octave from 1 to 12, a=number of octave (beginning from 0) |
2566 | an octave from 1 to 12, a=number of octave (beginning from 0) |
2564 | Remarks: |
2567 | Remarks: |
2565 | * Speaker play can be disabled/enabled by |
2568 | * Speaker play can be disabled/enabled by |
2566 | subfunction 8 of function 18. |
2569 | subfunction 8 of function 18. |
2567 | * Function returns control, having informed the system |
2570 | * Function returns control, having informed the system |
2568 | an information on request. Play itself goes independently from |
2571 | an information on request. Play itself goes independently from |
2569 | the program. |
2572 | the program. |
2570 | * The data must be kept in the memory at least up to the end |
2573 | * The data must be kept in the memory at least up to the end |
2571 | of play. |
2574 | of play. |
2572 | 2575 | ||
2573 | ---------------------- Constants for registers: ---------------------- |
2576 | ---------------------- Constants for registers: ---------------------- |
2574 | eax - SF_SPEAKER_PLAY (55) |
2577 | eax - SF_SPEAKER_PLAY (55) |
2575 | ====================================================================== |
2578 | ====================================================================== |
2576 | ======================= Function 57 - PCI BIOS. ====================== |
2579 | ======================= Function 57 - PCI BIOS. ====================== |
2577 | ====================================================================== |
2580 | ====================================================================== |
2578 | Parameters: |
2581 | Parameters: |
2579 | * eax = 57 - function number |
2582 | * eax = 57 - function number |
2580 | * ebp corresponds to al in PCI BIOS specification |
2583 | * ebp corresponds to al in PCI BIOS specification |
2581 | * other registers are set according to PCI BIOS specification |
2584 | * other registers are set according to PCI BIOS specification |
2582 | Returned value: |
2585 | Returned value: |
2583 | * CF is undefined |
2586 | * CF is undefined |
2584 | * other registers are set according to PCI BIOS specification |
2587 | * other registers are set according to PCI BIOS specification |
2585 | Remarks: |
2588 | Remarks: |
2586 | * Many effects of this function can be also achieved with |
2589 | * Many effects of this function can be also achieved with |
2587 | corresponding subfunctions of function 62. |
2590 | corresponding subfunctions of function 62. |
2588 | * The function calls PCI32 BIOS extension, documented e.g. in |
2591 | * The function calls PCI32 BIOS extension, documented e.g. in |
2589 | http://alpha1.dyns.net/files/PCI/bios21.pdf. |
2592 | http://alpha1.dyns.net/files/PCI/bios21.pdf. |
2590 | * If BIOS does not support this extension, its behavior is emulated |
2593 | * If BIOS does not support this extension, its behavior is emulated |
2591 | (through kernel-mode analogues of subfunctions of function 62). |
2594 | (through kernel-mode analogues of subfunctions of function 62). |
2592 | 2595 | ||
2593 | ---------------------- Constants for registers: ---------------------- |
2596 | ---------------------- Constants for registers: ---------------------- |
2594 | eax - SF_PCI_BIOS (57) |
2597 | eax - SF_PCI_BIOS (57) |
2595 | ====================================================================== |
2598 | ====================================================================== |
2596 | ========== Function 60 - Inter Process Communication (IPC). ========== |
2599 | ========== Function 60 - Inter Process Communication (IPC). ========== |
2597 | ====================================================================== |
2600 | ====================================================================== |
2598 | IPC is used for message dispatching from one process/thread to |
2601 | IPC is used for message dispatching from one process/thread to |
2599 | another. Previously it is necessary to agree how to interpret |
2602 | another. Previously it is necessary to agree how to interpret |
2600 | the concrete message. |
2603 | the concrete message. |
2601 | 2604 | ||
2602 | ----------- Subfunction 1 - set the area for IPC receiving ----------- |
2605 | ----------- Subfunction 1 - set the area for IPC receiving ----------- |
2603 | Is called by process-receiver. |
2606 | Is called by process-receiver. |
2604 | Parameters: |
2607 | Parameters: |
2605 | * eax = 60 - function number |
2608 | * eax = 60 - function number |
2606 | * ebx = 1 - subfunction number |
2609 | * ebx = 1 - subfunction number |
2607 | * ecx = pointer to the buffer |
2610 | * ecx = pointer to the buffer |
2608 | * edx = size of the buffer |
2611 | * edx = size of the buffer |
2609 | Returned value: |
2612 | Returned value: |
2610 | * eax = 0 - always success |
2613 | * eax = 0 - always success |
2611 | Format of IPC-buffer: |
2614 | Format of IPC-buffer: |
2612 | * +0: dword: if nonzero, buffer is considered locked; |
2615 | * +0: dword: if nonzero, buffer is considered locked; |
2613 | lock/unlock the buffer, when you work with it and need that |
2616 | lock/unlock the buffer, when you work with it and need that |
2614 | buffer data are not changed from outside (no new messages) |
2617 | buffer data are not changed from outside (no new messages) |
2615 | * +4: dword: occupied place in the buffer (in bytes) |
2618 | * +4: dword: occupied place in the buffer (in bytes) |
2616 | * +8: first message |
2619 | * +8: first message |
2617 | * +8+n: second message |
2620 | * +8+n: second message |
2618 | * ... |
2621 | * ... |
2619 | Format of a message: |
2622 | Format of a message: |
2620 | * +0: dword: PID of sender |
2623 | * +0: dword: PID of sender |
2621 | * +4: dword: message length (not including this header) |
2624 | * +4: dword: message length (not including this header) |
2622 | * +8: n*byte: message data |
2625 | * +8: n*byte: message data |
2623 | 2626 | ||
2624 | ------------------ Subfunction 2 - send IPC message ------------------ |
2627 | ------------------ Subfunction 2 - send IPC message ------------------ |
2625 | Is called by process-sender. |
2628 | Is called by process-sender. |
2626 | Parameters: |
2629 | Parameters: |
2627 | * eax = 60 - function number |
2630 | * eax = 60 - function number |
2628 | * ebx = 2 - subfunction number |
2631 | * ebx = 2 - subfunction number |
2629 | * ecx = PID of receiver |
2632 | * ecx = PID of receiver |
2630 | * edx = pointer to the message data |
2633 | * edx = pointer to the message data |
2631 | * esi = message length (in bytes) |
2634 | * esi = message length (in bytes) |
2632 | Returned value: |
2635 | Returned value: |
2633 | * eax = 0 - success |
2636 | * eax = 0 - success |
2634 | * eax = 1 - the receiver has not defined buffer for IPC messages |
2637 | * eax = 1 - the receiver has not defined buffer for IPC messages |
2635 | (can be, still have no time, |
2638 | (can be, still have no time, |
2636 | and can be, this is not right process) |
2639 | and can be, this is not right process) |
2637 | * eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit |
2640 | * eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit |
2638 | * eax = 3 - overflow of IPC-buffer of the receiver |
2641 | * eax = 3 - overflow of IPC-buffer of the receiver |
2639 | * eax = 4 - process/thread with such PID does not exist |
2642 | * eax = 4 - process/thread with such PID does not exist |
2640 | Remarks: |
2643 | Remarks: |
2641 | * Immediately after writing of IPC-message to the buffer the system |
2644 | * Immediately after writing of IPC-message to the buffer the system |
2642 | sends to the receiver the event with code 7 (see event codes). |
2645 | sends to the receiver the event with code 7 (see event codes). |
2643 | 2646 | ||
2644 | ---------------------- Constants for registers: ---------------------- |
2647 | ---------------------- Constants for registers: ---------------------- |
2645 | eax - SF_IPC (60) |
2648 | eax - SF_IPC (60) |
2646 | ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2) |
2649 | ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2) |
2647 | ====================================================================== |
2650 | ====================================================================== |
2648 | ==== Function 61 - get parameters for the direct graphics access. ==== |
2651 | ==== Function 61 - get parameters for the direct graphics access. ==== |
2649 | ====================================================================== |
2652 | ====================================================================== |
2650 | The data of the graphics screen (the memory area which displays |
2653 | The data of the graphics screen (the memory area which displays |
2651 | screen contents) are accessible to a program directly, without |
2654 | screen contents) are accessible to a program directly, without |
2652 | any system calls, through the selector gs: |
2655 | any system calls, through the selector gs: |
2653 | mov eax, [gs:0] |
2656 | mov eax, [gs:0] |
2654 | places in eax the first dword of the buffer, which contains |
2657 | places in eax the first dword of the buffer, which contains |
2655 | information on color of the left upper point (and, possibly, colors |
2658 | information on color of the left upper point (and, possibly, colors |
2656 | of several following). |
2659 | of several following). |
2657 | mov [gs:0], eax |
2660 | mov [gs:0], eax |
2658 | by work in VESA modes with LFB sets color of the left upper point |
2661 | by work in VESA modes with LFB sets color of the left upper point |
2659 | (and, possibly, colors of several following). |
2662 | (and, possibly, colors of several following). |
2660 | To interpret the data of graphics screen program needs to know |
2663 | To interpret the data of graphics screen program needs to know |
2661 | some parameters, returning by this function. |
2664 | some parameters, returning by this function. |
2662 | Remarks: |
2665 | Remarks: |
2663 | * Graphics parameters changes very seldom at work, |
2666 | * Graphics parameters changes very seldom at work, |
2664 | namely, only in cases, when user works with the application VRR. |
2667 | namely, only in cases, when user works with the application VRR. |
2665 | * At videomode change the system redraws all windows (event |
2668 | * At videomode change the system redraws all windows (event |
2666 | with code 1) and redraws the background (event 5). |
2669 | with code 1) and redraws the background (event 5). |
2667 | Same events occur in other cases too, which meet much more often, |
2670 | Same events occur in other cases too, which meet much more often, |
2668 | than videomode change. |
2671 | than videomode change. |
2669 | * By operation in videomodes with LFB the selector gs points to |
2672 | * By operation in videomodes with LFB the selector gs points to |
2670 | LFB itself, so reading/writing on gs result directly in |
2673 | LFB itself, so reading/writing on gs result directly in |
2671 | change of screen contents. By operation in videomodes without |
2674 | change of screen contents. By operation in videomodes without |
2672 | LFB gs points to some data area in the kernel, and all functions |
2675 | LFB gs points to some data area in the kernel, and all functions |
2673 | of screen output fulfil honesty double operation on writing |
2676 | of screen output fulfil honesty double operation on writing |
2674 | directly to the screen and writing to this buffer. In result |
2677 | directly to the screen and writing to this buffer. In result |
2675 | at reading contents of this buffer the results correspond to |
2678 | at reading contents of this buffer the results correspond to |
2676 | screen contents (with, generally speaking, large color |
2679 | screen contents (with, generally speaking, large color |
2677 | resolution), and writing is ignored. |
2680 | resolution), and writing is ignored. |
2678 | One exception is the mode 320*200, for which main loop of the |
2681 | One exception is the mode 320*200, for which main loop of the |
2679 | system thread updates the screen according to mouse movements. |
2682 | system thread updates the screen according to mouse movements. |
2680 | 2683 | ||
2681 | ------------------------- Screen resolution -------------------------- |
2684 | ------------------------- Screen resolution -------------------------- |
2682 | Parameters: |
2685 | Parameters: |
2683 | * eax = 61 - function number |
2686 | * eax = 61 - function number |
2684 | * ebx = 1 - subfunction number |
2687 | * ebx = 1 - subfunction number |
2685 | Returned value: |
2688 | Returned value: |
2686 | * eax = [resolution on x axis]*65536 + [resolution on y axis] |
2689 | * eax = [resolution on x axis]*65536 + [resolution on y axis] |
2687 | Remarks: |
2690 | Remarks: |
2688 | * One can use function 14 paying attention that |
2691 | * One can use function 14 paying attention that |
2689 | it returns sizes on 1 pixel less. It is fully equivalent way. |
2692 | it returns sizes on 1 pixel less. It is fully equivalent way. |
2690 | 2693 | ||
2691 | ---------------------- Number of bits per pixel ---------------------- |
2694 | ---------------------- Number of bits per pixel ---------------------- |
2692 | Parameters: |
2695 | Parameters: |
2693 | * eax = 61 - function number |
2696 | * eax = 61 - function number |
2694 | * ebx = 2 - subfunction number |
2697 | * ebx = 2 - subfunction number |
2695 | Returned value: |
2698 | Returned value: |
2696 | * eax = number of bits per pixel (24 or 32) |
2699 | * eax = number of bits per pixel (24 or 32) |
2697 | 2700 | ||
2698 | -------------------- Number of bytes per scanline -------------------- |
2701 | -------------------- Number of bytes per scanline -------------------- |
2699 | Parameters: |
2702 | Parameters: |
2700 | * eax = 61 - function number |
2703 | * eax = 61 - function number |
2701 | * ebx = 3 - subfunction number |
2704 | * ebx = 3 - subfunction number |
2702 | Returned value: |
2705 | Returned value: |
2703 | * eax = number of bytes occupied by one scanline |
2706 | * eax = number of bytes occupied by one scanline |
2704 | (horizontal line on the screen) |
2707 | (horizontal line on the screen) |
2705 | 2708 | ||
2706 | ---------------------- Constants for registers: ---------------------- |
2709 | ---------------------- Constants for registers: ---------------------- |
2707 | eax - SF_GET_GRAPHICAL_PARAMS (61) |
2710 | eax - SF_GET_GRAPHICAL_PARAMS (61) |
2708 | ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2), |
2711 | ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2), |
2709 | SSF_BYTES_PER_LINE (3) |
2712 | SSF_BYTES_PER_LINE (3) |
2710 | ====================================================================== |
2713 | ====================================================================== |
2711 | ===== Function 62, subfunction 0 - get version of PCI-interface. ===== |
2714 | ===== Function 62, subfunction 0 - get version of PCI-interface. ===== |
2712 | ====================================================================== |
2715 | ====================================================================== |
2713 | Parameters: |
2716 | Parameters: |
2714 | * eax = 62 - function number |
2717 | * eax = 62 - function number |
2715 | * bl = 0 - subfunction number |
2718 | * bl = 0 - subfunction number |
2716 | Returned value: |
2719 | Returned value: |
2717 | * eax = -1 - PCI access is disabled; otherwise |
2720 | * eax = -1 - PCI access is disabled; otherwise |
2718 | * ah.al = version of PCI-interface (ah=version, al=subversion) |
2721 | * ah.al = version of PCI-interface (ah=version, al=subversion) |
2719 | * high word of eax is zeroed |
2722 | * high word of eax is zeroed |
2720 | Remarks: |
2723 | Remarks: |
2721 | * Previously low-level access to PCI for applications must be |
2724 | * Previously low-level access to PCI for applications must be |
2722 | enabled by subfunction 12 of function 21. |
2725 | enabled by subfunction 12 of function 21. |
2723 | * If PCI BIOS is not supported, the value of ax is undefined. |
2726 | * If PCI BIOS is not supported, the value of ax is undefined. |
2724 | 2727 | ||
2725 | ---------------------- Constants for registers: ---------------------- |
2728 | ---------------------- Constants for registers: ---------------------- |
2726 | eax - SF_PCI (62) |
2729 | eax - SF_PCI (62) |
2727 | ebx - SSF_GET_VERSION (0) |
2730 | ebx - SSF_GET_VERSION (0) |
2728 | ====================================================================== |
2731 | ====================================================================== |
2729 | ==== Function 62, subfunction 1 - get number of the last PCI-bus. ==== |
2732 | ==== Function 62, subfunction 1 - get number of the last PCI-bus. ==== |
2730 | ====================================================================== |
2733 | ====================================================================== |
2731 | Parameters: |
2734 | Parameters: |
2732 | * eax = 62 - function number |
2735 | * eax = 62 - function number |
2733 | * bl = 1 - subfunction number |
2736 | * bl = 1 - subfunction number |
2734 | Returned value: |
2737 | Returned value: |
2735 | * eax = -1 - access to PCI is disabled; otherwise |
2738 | * eax = -1 - access to PCI is disabled; otherwise |
2736 | * al = number of the last PCI-bus; other bytes of eax are destroyed |
2739 | * al = number of the last PCI-bus; other bytes of eax are destroyed |
2737 | Remarks: |
2740 | Remarks: |
2738 | * Previously low-level access to PCI for applications must be |
2741 | * Previously low-level access to PCI for applications must be |
2739 | enabled by subfunction 12 of function 21. |
2742 | enabled by subfunction 12 of function 21. |
2740 | * If PCI BIOS is not supported, the value of ax is undefined. |
2743 | * If PCI BIOS is not supported, the value of ax is undefined. |
2741 | 2744 | ||
2742 | ---------------------- Constants for registers: ---------------------- |
2745 | ---------------------- Constants for registers: ---------------------- |
2743 | eax - SF_PCI (62) |
2746 | eax - SF_PCI (62) |
2744 | ebx - SSF_GET_LAST_BUS (1) |
2747 | ebx - SSF_GET_LAST_BUS (1) |
2745 | ====================================================================== |
2748 | ====================================================================== |
2746 | ===================== Function 62, subfunction 2 ===================== |
2749 | ===================== Function 62, subfunction 2 ===================== |
2747 | ===== Get mechanism of addressing to the PCI configuration space. ==== |
2750 | ===== Get mechanism of addressing to the PCI configuration space. ==== |
2748 | ====================================================================== |
2751 | ====================================================================== |
2749 | Parameters: |
2752 | Parameters: |
2750 | * eax = 62 - function number |
2753 | * eax = 62 - function number |
2751 | * bl = 2 - subfunction number |
2754 | * bl = 2 - subfunction number |
2752 | Returned value: |
2755 | Returned value: |
2753 | * eax = -1 - access to PCI is disabled; otherwise |
2756 | * eax = -1 - access to PCI is disabled; otherwise |
2754 | * al = mechanism (1 or 2); other bytes of eax are destroyed |
2757 | * al = mechanism (1 or 2); other bytes of eax are destroyed |
2755 | Remarks: |
2758 | Remarks: |
2756 | * Previously low-level access to PCI for applications must be |
2759 | * Previously low-level access to PCI for applications must be |
2757 | enabled by subfunction 12 of function 21. |
2760 | enabled by subfunction 12 of function 21. |
2758 | * Addressing mechanism is selected depending on |
2761 | * Addressing mechanism is selected depending on |
2759 | equipment characteristics. |
2762 | equipment characteristics. |
2760 | * Subfunctions of read and write work automatically |
2763 | * Subfunctions of read and write work automatically |
2761 | with the selected mechanism. |
2764 | with the selected mechanism. |
2762 | 2765 | ||
2763 | ---------------------- Constants for registers: ---------------------- |
2766 | ---------------------- Constants for registers: ---------------------- |
2764 | eax - SF_PCI (62) |
2767 | eax - SF_PCI (62) |
2765 | ebx - SSF_GET_ADRR_MODE (2) |
2768 | ebx - SSF_GET_ADRR_MODE (2) |
2766 | ====================================================================== |
2769 | ====================================================================== |
2767 | ======== Function 62, subfunctions 4,5,6 - read PCI-register. ======== |
2770 | ======== Function 62, subfunctions 4,5,6 - read PCI-register. ======== |
2768 | ====================================================================== |
2771 | ====================================================================== |
2769 | Parameters: |
2772 | Parameters: |
2770 | * eax = 62 - function number |
2773 | * eax = 62 - function number |
2771 | * bl = 4 - read byte |
2774 | * bl = 4 - read byte |
2772 | * bl = 5 - read word |
2775 | * bl = 5 - read word |
2773 | * bl = 6 - read dword |
2776 | * bl = 6 - read dword |
2774 | * bh = number of PCI-bus |
2777 | * bh = number of PCI-bus |
2775 | * ch = dddddfff, where ddddd = number of the device on the bus, |
2778 | * ch = dddddfff, where ddddd = number of the device on the bus, |
2776 | fff = function number of device |
2779 | fff = function number of device |
2777 | * cl = number of register (must be even for bl=5, |
2780 | * cl = number of register (must be even for bl=5, |
2778 | divisible by 4 for bl=6) |
2781 | divisible by 4 for bl=6) |
2779 | Returned value: |
2782 | Returned value: |
2780 | * eax = -1 - error (access to PCI is disabled or parameters |
2783 | * eax = -1 - error (access to PCI is disabled or parameters |
2781 | are not supported); otherwise |
2784 | are not supported); otherwise |
2782 | * al/ax/eax (depending on requested size) contains the data; |
2785 | * al/ax/eax (depending on requested size) contains the data; |
2783 | the other part of register eax is destroyed |
2786 | the other part of register eax is destroyed |
2784 | Remarks: |
2787 | Remarks: |
2785 | * Previously low-level access to PCI for applications must be |
2788 | * Previously low-level access to PCI for applications must be |
2786 | enabled by subfunction 12 of function 21. |
2789 | enabled by subfunction 12 of function 21. |
2787 | * Access mechanism 2 supports only 16 devices on a bus and ignores |
2790 | * Access mechanism 2 supports only 16 devices on a bus and ignores |
2788 | function number. To get access mechanism use subfunction 2. |
2791 | function number. To get access mechanism use subfunction 2. |
2789 | * Some registers are standard and exist for all devices, some are |
2792 | * Some registers are standard and exist for all devices, some are |
2790 | defined by the concrete device. The list of registers of the |
2793 | defined by the concrete device. The list of registers of the |
2791 | first type can be found e.g. in famous |
2794 | first type can be found e.g. in famous |
2792 | Interrupt List by Ralf Brown |
2795 | Interrupt List by Ralf Brown |
2793 | (http://www.pobox.com/~ralf/files.html, |
2796 | (http://www.pobox.com/~ralf/files.html, |
2794 | ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); |
2797 | ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); |
2795 | registers of the second type must be listed |
2798 | registers of the second type must be listed |
2796 | in the device documentation. |
2799 | in the device documentation. |
2797 | 2800 | ||
2798 | ---------------------- Constants for registers: ---------------------- |
2801 | ---------------------- Constants for registers: ---------------------- |
2799 | eax - SF_PCI (62) |
2802 | eax - SF_PCI (62) |
2800 | ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6) |
2803 | ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6) |
2801 | ====================================================================== |
2804 | ====================================================================== |
2802 | ====== Function 62, subfunctions 8,9,10 - write to PCI-register. ===== |
2805 | ====== Function 62, subfunctions 8,9,10 - write to PCI-register. ===== |
2803 | ====================================================================== |
2806 | ====================================================================== |
2804 | Parameters: |
2807 | Parameters: |
2805 | * eax = 62 - function number |
2808 | * eax = 62 - function number |
2806 | * bl = 8 - write byte |
2809 | * bl = 8 - write byte |
2807 | * bl = 9 - write word |
2810 | * bl = 9 - write word |
2808 | * bl = 10 - write dword |
2811 | * bl = 10 - write dword |
2809 | * bh = number of PCI-bus |
2812 | * bh = number of PCI-bus |
2810 | * ch = dddddfff, where ddddd = number of the device on the bus, |
2813 | * ch = dddddfff, where ddddd = number of the device on the bus, |
2811 | fff = function number of device |
2814 | fff = function number of device |
2812 | * cl = number of register (must be even for bl=9, |
2815 | * cl = number of register (must be even for bl=9, |
2813 | divisible by 4 for bl=10) |
2816 | divisible by 4 for bl=10) |
2814 | * dl/dx/edx (depending on requested size) contatins |
2817 | * dl/dx/edx (depending on requested size) contatins |
2815 | the data to write |
2818 | the data to write |
2816 | Returned value: |
2819 | Returned value: |
2817 | * eax = -1 - error (access to PCI is disabled or parameters |
2820 | * eax = -1 - error (access to PCI is disabled or parameters |
2818 | are not supported) |
2821 | are not supported) |
2819 | * eax = 0 - success |
2822 | * eax = 0 - success |
2820 | Remarks: |
2823 | Remarks: |
2821 | * Previously low-level access to PCI for applications must be |
2824 | * Previously low-level access to PCI for applications must be |
2822 | enabled by subfunction 12 of function 21. |
2825 | enabled by subfunction 12 of function 21. |
2823 | * Access mechanism 2 supports only 16 devices on a bus and ignores |
2826 | * Access mechanism 2 supports only 16 devices on a bus and ignores |
2824 | function number. To get access mechanism use subfunction 2. |
2827 | function number. To get access mechanism use subfunction 2. |
2825 | * Some registers are standard and exist for all devices, some are |
2828 | * Some registers are standard and exist for all devices, some are |
2826 | defined by the concrete device. The list of registers of the |
2829 | defined by the concrete device. The list of registers of the |
2827 | first type can be found e.g. in famous Interrupt List by |
2830 | first type can be found e.g. in famous Interrupt List by |
2828 | Ralf Brown; registers of the second type must be listed |
2831 | Ralf Brown; registers of the second type must be listed |
2829 | in the device documentation. |
2832 | in the device documentation. |
2830 | 2833 | ||
2831 | ---------------------- Constants for registers: ---------------------- |
2834 | ---------------------- Constants for registers: ---------------------- |
2832 | eax - SF_PCI (62) |
2835 | eax - SF_PCI (62) |
2833 | ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10) |
2836 | ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10) |
2834 | ====================================================================== |
2837 | ====================================================================== |
2835 | ============== Function 63 - work with the debug board. ============== |
2838 | ============== Function 63 - work with the debug board. ============== |
2836 | ====================================================================== |
2839 | ====================================================================== |
2837 | The debug board is the global system buffer (with the size |
2840 | The debug board is the global system buffer (with the size |
2838 | 1024 bytes), to which any program can write (generally speaking, |
2841 | 1024 bytes), to which any program can write (generally speaking, |
2839 | arbitrary) data and from which other program can read these data. |
2842 | arbitrary) data and from which other program can read these data. |
2840 | By the agreement written data are text strings interpreted as |
2843 | By the agreement written data are text strings interpreted as |
2841 | debug messages on a course of program execution. The kernel in |
2844 | debug messages on a course of program execution. The kernel in |
2842 | some situations also writes to the debug board information on |
2845 | some situations also writes to the debug board information on |
2843 | execution of some functions; by the agreement kernel messages |
2846 | execution of some functions; by the agreement kernel messages |
2844 | begins from the prefix "K : ". |
2847 | begins from the prefix "K : ". |
2845 | For view of the debug board the application 'board' was created, |
2848 | For view of the debug board the application 'board' was created, |
2846 | which reads data from the buffer and displays them in its window. |
2849 | which reads data from the buffer and displays them in its window. |
2847 | 'board' interpretes the sequence of codes 13,10 as newline. |
2850 | 'board' interpretes the sequence of codes 13,10 as newline. |
2848 | A character with null code in an end of line is not necessary, |
2851 | A character with null code in an end of line is not necessary, |
2849 | but also does not prevent. |
2852 | but also does not prevent. |
2850 | Because debugger has been written, the value of the debug board |
2853 | Because debugger has been written, the value of the debug board |
2851 | has decreased, as debugger allows to inspect completely a course of |
2854 | has decreased, as debugger allows to inspect completely a course of |
2852 | program execution without any efforts from the direction of program |
2855 | program execution without any efforts from the direction of program |
2853 | itself. Nevertheless in some cases the debug board is still useful. |
2856 | itself. Nevertheless in some cases the debug board is still useful. |
2854 | 2857 | ||
2855 | ----------------------------- Write byte ----------------------------- |
2858 | ----------------------------- Write byte ----------------------------- |
2856 | Parameters: |
2859 | Parameters: |
2857 | * eax = 63 - function number |
2860 | * eax = 63 - function number |
2858 | * ebx = 1 - subfunction number |
2861 | * ebx = 1 - subfunction number |
2859 | * cl = data byte |
2862 | * cl = data byte |
2860 | Returned value: |
2863 | Returned value: |
2861 | * function does not return value |
2864 | * function does not return value |
2862 | Remarks: |
2865 | Remarks: |
2863 | * Byte is written to the buffer. Buffer size is 512 bytes. |
2866 | * Byte is written to the buffer. Buffer size is 512 bytes. |
2864 | At buffer overflow all obtained data are lost. |
2867 | At buffer overflow all obtained data are lost. |
2865 | * For output to the debug board of more complicated objects |
2868 | * For output to the debug board of more complicated objects |
2866 | (strings, numbers) it is enough to call this function in cycle. |
2869 | (strings, numbers) it is enough to call this function in cycle. |
2867 | It is possible not to write the appropriate code manually and use |
2870 | It is possible not to write the appropriate code manually and use |
2868 | file 'debug.inc', which is included into the distributive. |
2871 | file 'debug.inc', which is included into the distributive. |
2869 | 2872 | ||
2870 | ----------------------------- Read byte ------------------------------ |
2873 | ----------------------------- Read byte ------------------------------ |
2871 | Takes away byte from the buffer. |
2874 | Takes away byte from the buffer. |
2872 | Parameters: |
2875 | Parameters: |
2873 | * eax = 63 - function number |
2876 | * eax = 63 - function number |
2874 | * ebx = 2 - subfunction number |
2877 | * ebx = 2 - subfunction number |
2875 | Returned value: |
2878 | Returned value: |
2876 | * eax = ebx = 0 - the buffer is empty |
2879 | * eax = ebx = 0 - the buffer is empty |
2877 | * eax = byte, ebx = 1 - byte was successfully read |
2880 | * eax = byte, ebx = 1 - byte was successfully read |
2878 | 2881 | ||
2879 | ---------------------- Constants for registers: ---------------------- |
2882 | ---------------------- Constants for registers: ---------------------- |
2880 | eax - SF_BOARD (63) |
2883 | eax - SF_BOARD (63) |
2881 | ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2) |
2884 | ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2) |
2882 | ====================================================================== |
2885 | ====================================================================== |
2883 | ============== Function 64 - resize application memory. ============== |
2886 | ============== Function 64 - resize application memory. ============== |
2884 | ====================================================================== |
2887 | ====================================================================== |
2885 | Parameters: |
2888 | Parameters: |
2886 | * eax = 64 - function number |
2889 | * eax = 64 - function number |
2887 | * ebx = 1 - unique subfunction |
2890 | * ebx = 1 - unique subfunction |
2888 | * ecx = new memory size |
2891 | * ecx = new memory size |
2889 | Returned value: |
2892 | Returned value: |
2890 | * eax = 0 - success |
2893 | * eax = 0 - success |
2891 | * eax = 1 - not enough memory |
2894 | * eax = 1 - not enough memory |
2892 | Remarks: |
2895 | Remarks: |
2893 | * There is another way to dynamically allocate/free memory - |
2896 | * There is another way to dynamically allocate/free memory - |
2894 | subfunctions 11, 12, 13 of function 68. |
2897 | subfunctions 11, 12, 13 of function 68. |
2895 | * The function cannot be used together with 68.11, 68.12, 68.13. |
2898 | * The function cannot be used together with 68.11, 68.12, 68.13. |
2896 | The function call will be ignored after creation of process heap |
2899 | The function call will be ignored after creation of process heap |
2897 | with function 68.11. |
2900 | with function 68.11. |
2898 | 2901 | ||
2899 | ---------------------- Constants for registers: ---------------------- |
2902 | ---------------------- Constants for registers: ---------------------- |
2900 | eax - SF_MEMORY_RESIZE (64) |
2903 | eax - SF_MEMORY_RESIZE (64) |
2901 | ====================================================================== |
2904 | ====================================================================== |
2902 | ======== Function 65 - draw image with palette in the window. ======== |
2905 | ======== Function 65 - draw image with palette in the window. ======== |
2903 | ====================================================================== |
2906 | ====================================================================== |
2904 | Parameters: |
2907 | Parameters: |
2905 | * eax = 65 - function number |
2908 | * eax = 65 - function number |
2906 | * ebx = pointer to the image |
2909 | * ebx = pointer to the image |
2907 | * ecx = [size on axis x]*65536 + [size on axis y] |
2910 | * ecx = [size on axis x]*65536 + [size on axis y] |
2908 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2911 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2909 | * esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32; |
2912 | * esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32; |
2910 | * edi = pointer to palette (2 to the power esi colors 0x00RRGGBB); |
2913 | * edi = pointer to palette (2 to the power esi colors 0x00RRGGBB); |
2911 | ignored when esi > 8 |
2914 | ignored when esi > 8 |
2912 | * ebp = offset of next row data relative to previous row data |
2915 | * ebp = offset of next row data relative to previous row data |
2913 | Returned value: |
2916 | Returned value: |
2914 | * function does not return value |
2917 | * function does not return value |
2915 | Remarks: |
2918 | Remarks: |
2916 | * Coordinates of the image are coordinates of the upper left corner |
2919 | * Coordinates of the image are coordinates of the upper left corner |
2917 | of the image relative to the window. |
2920 | of the image relative to the window. |
2918 | * Format of image with 1 bit per pixel: each byte of image |
2921 | * Format of image with 1 bit per pixel: each byte of image |
2919 | (possibly excluding last bytes in rows), contains information on |
2922 | (possibly excluding last bytes in rows), contains information on |
2920 | the color of 8 pixels, MSB corresponds to first pixel. |
2923 | the color of 8 pixels, MSB corresponds to first pixel. |
2921 | * Format of image with 2 bits per pixel: each byte of image |
2924 | * Format of image with 2 bits per pixel: each byte of image |
2922 | (possibly excluding last bytes in rows), contains information on |
2925 | (possibly excluding last bytes in rows), contains information on |
2923 | the color of 4 pixels, two MSBs correspond to first pixel. |
2926 | the color of 4 pixels, two MSBs correspond to first pixel. |
2924 | * Format of image with 4 bits per pixel: each byte of image |
2927 | * Format of image with 4 bits per pixel: each byte of image |
2925 | excluding last bytes in rows (if width is odd) contains |
2928 | excluding last bytes in rows (if width is odd) contains |
2926 | information on the color of 2 pixels, high-order tetrad |
2929 | information on the color of 2 pixels, high-order tetrad |
2927 | corresponds to first pixel. |
2930 | corresponds to first pixel. |
2928 | * Format of image with 8 bits per pixel: each byte of image is |
2931 | * Format of image with 8 bits per pixel: each byte of image is |
2929 | index in the palette. |
2932 | index in the palette. |
2930 | * Format of image with 9 bits per pixel: array of one byte values; |
2933 | * Format of image with 9 bits per pixel: array of one byte values; |
2931 | each byte (8 bit) represents the intensity of gray for one pixel; |
2934 | each byte (8 bit) represents the intensity of gray for one pixel; |
2932 | this format is equal to 8bpp without palette. |
2935 | this format is equal to 8bpp without palette. |
2933 | * Format of image with 15 bits per pixel: the color of each pixel |
2936 | * Format of image with 15 bits per pixel: the color of each pixel |
2934 | is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per |
2937 | is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per |
2935 | each color. |
2938 | each color. |
2936 | * Format of image with 16 bits per pixel: the color of each pixel |
2939 | * Format of image with 16 bits per pixel: the color of each pixel |
2937 | is coded as RRRRRGGGGGGBBBBB (5+6+5). |
2940 | is coded as RRRRRGGGGGGBBBBB (5+6+5). |
2938 | * Format of image with 24 bits per pixel: the color of each pixel |
2941 | * Format of image with 24 bits per pixel: the color of each pixel |
2939 | is coded as 3 bytes - sequentially blue, green, red components. |
2942 | is coded as 3 bytes - sequentially blue, green, red components. |
2940 | * Format of image with 32 bits per pixel: similar to 24, but |
2943 | * Format of image with 32 bits per pixel: similar to 24, but |
2941 | one additional ignored byte is present. |
2944 | one additional ignored byte is present. |
2942 | * The call to function 7 is equivalent to call to this function |
2945 | * The call to function 7 is equivalent to call to this function |
2943 | with esi=24, ebp=0. |
2946 | with esi=24, ebp=0. |
2944 | 2947 | ||
2945 | ---------------------- Constants for registers: ---------------------- |
2948 | ---------------------- Constants for registers: ---------------------- |
2946 | eax - SF_PUT_IMAGE_EXT (65) |
2949 | eax - SF_PUT_IMAGE_EXT (65) |
2947 | ====================================================================== |
2950 | ====================================================================== |
2948 | ================== Function 66 - work with keyboard. ================= |
2951 | ================== Function 66 - work with keyboard. ================= |
2949 | ====================================================================== |
2952 | ====================================================================== |
2950 | The input mode influences results of reading keys by function 2. |
2953 | The input mode influences results of reading keys by function 2. |
2951 | When a program loads, ASCII input mode is set for it. |
2954 | When a program loads, ASCII input mode is set for it. |
2952 | 2955 | ||
2953 | -------------- Subfunction 1 - set keyboard input mode. -------------- |
2956 | -------------- Subfunction 1 - set keyboard input mode. -------------- |
2954 | Parameters: |
2957 | Parameters: |
2955 | * eax = 66 - function number |
2958 | * eax = 66 - function number |
2956 | * ebx = 1 - subfunction number |
2959 | * ebx = 1 - subfunction number |
2957 | * ecx = mode: |
2960 | * ecx = mode: |
2958 | * 0 = normal (ASCII-characters) |
2961 | * 0 = normal (ASCII-characters) |
2959 | * 1 = scancodes |
2962 | * 1 = scancodes |
2960 | Returned value: |
2963 | Returned value: |
2961 | * function does not return value |
2964 | * function does not return value |
2962 | 2965 | ||
2963 | -------------- Subfunction 2 - get keyboard input mode. -------------- |
2966 | -------------- Subfunction 2 - get keyboard input mode. -------------- |
2964 | Parameters: |
2967 | Parameters: |
2965 | * eax = 66 - function number |
2968 | * eax = 66 - function number |
2966 | * ebx = 2 - subfunction number |
2969 | * ebx = 2 - subfunction number |
2967 | Returned value: |
2970 | Returned value: |
2968 | * eax = current mode |
2971 | * eax = current mode |
2969 | 2972 | ||
2970 | ------------ Subfunction 3 - get status of control keys. ------------- |
2973 | ------------ Subfunction 3 - get status of control keys. ------------- |
2971 | Parameters: |
2974 | Parameters: |
2972 | * eax = 66 - function number |
2975 | * eax = 66 - function number |
2973 | * ebx = 3 - subfunction number |
2976 | * ebx = 3 - subfunction number |
2974 | Returned value: |
2977 | Returned value: |
2975 | * eax = bit mask: |
2978 | * eax = bit mask: |
2976 | * bit 0 (mask 1): left Shift is pressed |
2979 | * bit 0 (mask 1): left Shift is pressed |
2977 | * bit 1 (mask 2): right Shift is pressed |
2980 | * bit 1 (mask 2): right Shift is pressed |
2978 | * bit 2 (mask 4): left Ctrl is pressed |
2981 | * bit 2 (mask 4): left Ctrl is pressed |
2979 | * bit 3 (mask 8): right Ctrl is pressed |
2982 | * bit 3 (mask 8): right Ctrl is pressed |
2980 | * bit 4 (mask 0x10): left Alt is pressed |
2983 | * bit 4 (mask 0x10): left Alt is pressed |
2981 | * bit 5 (mask 0x20): right Alt is pressed |
2984 | * bit 5 (mask 0x20): right Alt is pressed |
2982 | * bit 6 (mask 0x40): CapsLock is on |
2985 | * bit 6 (mask 0x40): CapsLock is on |
2983 | * bit 7 (mask 0x80): NumLock is on |
2986 | * bit 7 (mask 0x80): NumLock is on |
2984 | * bit 8 (mask 0x100): ScrollLock is on |
2987 | * bit 8 (mask 0x100): ScrollLock is on |
2985 | * bit 9 (mask 0x200): left Win is pressed |
2988 | * bit 9 (mask 0x200): left Win is pressed |
2986 | * bit 10 (mask 0x400): right Win is pressed |
2989 | * bit 10 (mask 0x400): right Win is pressed |
2987 | * other bits are cleared |
2990 | * other bits are cleared |
2988 | 2991 | ||
2989 | -------------- Subfunction 4 - set system-wide hotkey. --------------- |
2992 | -------------- Subfunction 4 - set system-wide hotkey. --------------- |
2990 | When hotkey is pressed, the system notifies only those applications, |
2993 | When hotkey is pressed, the system notifies only those applications, |
2991 | which have installed it; the active application (which receives |
2994 | which have installed it; the active application (which receives |
2992 | all normal input) does not receive such keys. |
2995 | all normal input) does not receive such keys. |
2993 | The notification consists in sending event with the code 2. |
2996 | The notification consists in sending event with the code 2. |
2994 | Reading hotkey is the same as reading normal key - by function 2. |
2997 | Reading hotkey is the same as reading normal key - by function 2. |
2995 | Parameters: |
2998 | Parameters: |
2996 | * eax = 66 - function number |
2999 | * eax = 66 - function number |
2997 | * ebx = 4 - subfunction number |
3000 | * ebx = 4 - subfunction number |
2998 | * cl determines key scancode; |
3001 | * cl determines key scancode; |
2999 | use cl=0 to give combinations such as Ctrl+Shift |
3002 | use cl=0 to give combinations such as Ctrl+Shift |
3000 | * edx = 0xXYZ determines possible states of control keys: |
3003 | * edx = 0xXYZ determines possible states of control keys: |
3001 | * Z (low 4 bits) determines state of LShift and RShift: |
3004 | * Z (low 4 bits) determines state of LShift and RShift: |
3002 | * 0 = no key must be pressed; |
3005 | * 0 = no key must be pressed; |
3003 | * 1 = exactly one key must be pressed; |
3006 | * 1 = exactly one key must be pressed; |
3004 | * 2 = both keys must be pressed; |
3007 | * 2 = both keys must be pressed; |
3005 | * 3 = must be pressed LShift, but not RShift; |
3008 | * 3 = must be pressed LShift, but not RShift; |
3006 | * 4 = must be pressed RShift, but not LShift |
3009 | * 4 = must be pressed RShift, but not LShift |
3007 | * Y - similar for LCtrl and RCtrl; |
3010 | * Y - similar for LCtrl and RCtrl; |
3008 | * X - similar for LAlt and RAlt |
3011 | * X - similar for LAlt and RAlt |
3009 | Returned value: |
3012 | Returned value: |
3010 | * eax=0 - success |
3013 | * eax=0 - success |
3011 | * eax=1 - too mant hotkeys (maximum 256 are allowed) |
3014 | * eax=1 - too mant hotkeys (maximum 256 are allowed) |
3012 | Remarks: |
3015 | Remarks: |
3013 | * Hotkey can work either at pressing or at release. Release |
3016 | * Hotkey can work either at pressing or at release. Release |
3014 | scancode of a key is more on 128 than pressing scancode |
3017 | scancode of a key is more on 128 than pressing scancode |
3015 | (i.e. high bit is set). |
3018 | (i.e. high bit is set). |
3016 | * Several applications can set the same combination; |
3019 | * Several applications can set the same combination; |
3017 | all such applications will be informed on pressing |
3020 | all such applications will be informed on pressing |
3018 | such combination. |
3021 | such combination. |
3019 | 3022 | ||
3020 | -------------- Subfunction 5 - delete installed hotkey. -------------- |
3023 | -------------- Subfunction 5 - delete installed hotkey. -------------- |
3021 | Parameters: |
3024 | Parameters: |
3022 | * eax = 66 - function number |
3025 | * eax = 66 - function number |
3023 | * ebx = 5 - subfunction number |
3026 | * ebx = 5 - subfunction number |
3024 | * cl = scancode of key and edx = 0xXYZ the same as in subfunction 4 |
3027 | * cl = scancode of key and edx = 0xXYZ the same as in subfunction 4 |
3025 | Returned value: |
3028 | Returned value: |
3026 | * eax = 0 - success |
3029 | * eax = 0 - success |
3027 | * eax = 1 - there is no such hotkey |
3030 | * eax = 1 - there is no such hotkey |
3028 | Remarks: |
3031 | Remarks: |
3029 | * When a process/thread terminates, all hotkey installed by it are |
3032 | * When a process/thread terminates, all hotkey installed by it are |
3030 | deleted. |
3033 | deleted. |
3031 | * The call to this subfunction does not affect other applications. |
3034 | * The call to this subfunction does not affect other applications. |
3032 | If other application has defined the same combination, it will |
3035 | If other application has defined the same combination, it will |
3033 | still receive notices. |
3036 | still receive notices. |
3034 | 3037 | ||
3035 | --------------- Subfunction 6 - block the normal input. -------------- |
3038 | --------------- Subfunction 6 - block the normal input. -------------- |
3036 | Parameters: |
3039 | Parameters: |
3037 | * eax = 66 - function number |
3040 | * eax = 66 - function number |
3038 | * ebx = 6 - subfunction number |
3041 | * ebx = 6 - subfunction number |
3039 | Returned value: |
3042 | Returned value: |
3040 | * function does not return value |
3043 | * function does not return value |
3041 | Remarks: |
3044 | Remarks: |
3042 | * Blocking the normal keyboard input for installed hotkeys |
3045 | * Blocking the normal keyboard input for installed hotkeys |
3043 | * To emulate a mouse via the keyboard, the application MOUSEMUL |
3046 | * To emulate a mouse via the keyboard, the application MOUSEMUL |
3044 | 3047 | ||
3045 | ------------ Subfunction 7 - unlock the normal input. ---------------- |
3048 | ------------ Subfunction 7 - unlock the normal input. ---------------- |
3046 | Parameters: |
3049 | Parameters: |
3047 | * eax = 66 - function number |
3050 | * eax = 66 - function number |
3048 | * ebx = 7 - subfunction number |
3051 | * ebx = 7 - subfunction number |
3049 | Returned value: |
3052 | Returned value: |
3050 | * function does not return value |
3053 | * function does not return value |
3051 | Remarks: |
3054 | Remarks: |
3052 | * Unlocking the results of the f. 66.6 |
3055 | * Unlocking the results of the f. 66.6 |
3053 | * To emulate a mouse via the keyboard, the application MOUSEMUL |
3056 | * To emulate a mouse via the keyboard, the application MOUSEMUL |
3054 | 3057 | ||
3055 | ---------------------- Constants for registers: ---------------------- |
3058 | ---------------------- Constants for registers: ---------------------- |
3056 | eax - SF_KEYBOARD (66) |
3059 | eax - SF_KEYBOARD (66) |
3057 | ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2), |
3060 | ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2), |
3058 | SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4), |
3061 | SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4), |
3059 | SSF_DEL_SYS_HOTKEY (5), SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7) |
3062 | SSF_DEL_SYS_HOTKEY (5), SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7) |
3060 | ====================================================================== |
3063 | ====================================================================== |
3061 | ========= Function 67 - change position/sizes of the window. ========= |
3064 | ========= Function 67 - change position/sizes of the window. ========= |
3062 | ====================================================================== |
3065 | ====================================================================== |
3063 | Parameters: |
3066 | Parameters: |
3064 | * eax = 67 - function number |
3067 | * eax = 67 - function number |
3065 | * ebx = new x-coordinate of the window |
3068 | * ebx = new x-coordinate of the window |
3066 | * ecx = new y-coordinate of the window |
3069 | * ecx = new y-coordinate of the window |
3067 | * edx = new x-size of the window |
3070 | * edx = new x-size of the window |
3068 | * esi = new y-size of the window |
3071 | * esi = new y-size of the window |
3069 | Returned value: |
3072 | Returned value: |
3070 | * function does not return value |
3073 | * function does not return value |
3071 | Remarks: |
3074 | Remarks: |
3072 | * The value -1 for a parameter means "do not change"; e.g. to move |
3075 | * The value -1 for a parameter means "do not change"; e.g. to move |
3073 | the window without resizing it is possible to specify edx=esi=-1. |
3076 | the window without resizing it is possible to specify edx=esi=-1. |
3074 | * Previously the window must be defined by function 0. |
3077 | * Previously the window must be defined by function 0. |
3075 | It sets initial coordinates and sizes of the window. |
3078 | It sets initial coordinates and sizes of the window. |
3076 | * Sizes of the window are understood in sense of function 0, |
3079 | * Sizes of the window are understood in sense of function 0, |
3077 | that is one pixel less than real sizes. |
3080 | that is one pixel less than real sizes. |
3078 | * The function call for maximized windows is simply ignored. |
3081 | * The function call for maximized windows is simply ignored. |
3079 | * For windows of appropriate styles position and/or sizes can be |
3082 | * For windows of appropriate styles position and/or sizes can be |
3080 | changed by user; current position and sizes can be obtained by |
3083 | changed by user; current position and sizes can be obtained by |
3081 | call to function 9. |
3084 | call to function 9. |
3082 | * The function sends to the window redraw event (with the code 1). |
3085 | * The function sends to the window redraw event (with the code 1). |
3083 | 3086 | ||
3084 | ---------------------- Constants for registers: ---------------------- |
3087 | ---------------------- Constants for registers: ---------------------- |
3085 | eax - SF_CHANGE_WINDOW (67) |
3088 | eax - SF_CHANGE_WINDOW (67) |
3086 | ====================================================================== |
3089 | ====================================================================== |
3087 | ====== Function 68, subfunction 0 - get the task switch counter. ===== |
3090 | ====== Function 68, subfunction 0 - get the task switch counter. ===== |
3088 | ====================================================================== |
3091 | ====================================================================== |
3089 | Parameters: |
3092 | Parameters: |
3090 | * eax = 68 - function number |
3093 | * eax = 68 - function number |
3091 | * ebx = 0 - subfunction number |
3094 | * ebx = 0 - subfunction number |
3092 | Returned value: |
3095 | Returned value: |
3093 | * eax = number of task switches from the system booting |
3096 | * eax = number of task switches from the system booting |
3094 | (modulo 2^32) |
3097 | (modulo 2^32) |
3095 | 3098 | ||
3096 | ---------------------- Constants for registers: ---------------------- |
3099 | ---------------------- Constants for registers: ---------------------- |
3097 | eax - SF_SYS_MISC (68) |
3100 | eax - SF_SYS_MISC (68) |
3098 | ebx - SSF_GET_TASK_SWITCH_COUNT (0) |
3101 | ebx - SSF_GET_TASK_SWITCH_COUNT (0) |
3099 | ====================================================================== |
3102 | ====================================================================== |
3100 | ======= Function 68, subfunction 1 - switch to the next thread. ====== |
3103 | ======= Function 68, subfunction 1 - switch to the next thread. ====== |
3101 | ====================================================================== |
3104 | ====================================================================== |
3102 | The function completes the current time slice allocated to the |
3105 | The function completes the current time slice allocated to the |
3103 | thread and switches to the next. (Which thread in which process |
3106 | thread and switches to the next. (Which thread in which process |
3104 | will be next, is unpredictable). Later, when execution queue |
3107 | will be next, is unpredictable). Later, when execution queue |
3105 | will reach the current thread, execution will be continued. |
3108 | will reach the current thread, execution will be continued. |
3106 | Parameters: |
3109 | Parameters: |
3107 | * eax = 68 - function number |
3110 | * eax = 68 - function number |
3108 | * ebx = 1 - subfunction number |
3111 | * ebx = 1 - subfunction number |
3109 | Returned value: |
3112 | Returned value: |
3110 | * function does not return value |
3113 | * function does not return value |
3111 | 3114 | ||
3112 | ---------------------- Constants for registers: ---------------------- |
3115 | ---------------------- Constants for registers: ---------------------- |
3113 | eax - SF_SYS_MISC (68) |
3116 | eax - SF_SYS_MISC (68) |
3114 | ebx - SSF_SWITCH_TASK (1) |
3117 | ebx - SSF_SWITCH_TASK (1) |
3115 | ====================================================================== |
3118 | ====================================================================== |
3116 | ============= Function 68, subfunction 2 - cache + rdpmc. ============ |
3119 | ============= Function 68, subfunction 2 - cache + rdpmc. ============ |
3117 | ====================================================================== |
3120 | ====================================================================== |
3118 | Parameters: |
3121 | Parameters: |
3119 | * eax = 68 - function number |
3122 | * eax = 68 - function number |
3120 | * ebx = 2 - subfunction number |
3123 | * ebx = 2 - subfunction number |
3121 | * ecx = required action: |
3124 | * ecx = required action: |
3122 | * ecx = 0 - enable instruction 'rdpmc' |
3125 | * ecx = 0 - enable instruction 'rdpmc' |
3123 | (ReaD Performance-Monitoring Counters) for applications |
3126 | (ReaD Performance-Monitoring Counters) for applications |
3124 | * ecx = 1 - find out whether cache is disabled/enabled |
3127 | * ecx = 1 - find out whether cache is disabled/enabled |
3125 | * ecx = 2 - enable cache |
3128 | * ecx = 2 - enable cache |
3126 | * ecx = 3 - disable cache |
3129 | * ecx = 3 - disable cache |
3127 | Returned value: |
3130 | Returned value: |
3128 | * for ecx=0: |
3131 | * for ecx=0: |
3129 | * eax = the value of cr4 |
3132 | * eax = the value of cr4 |
3130 | * for ecx=1: |
3133 | * for ecx=1: |
3131 | * eax = (cr0 and 0x60000000): |
3134 | * eax = (cr0 and 0x60000000): |
3132 | * eax = 0 - cache is on |
3135 | * eax = 0 - cache is on |
3133 | * eax <> 0 - cache is off |
3136 | * eax <> 0 - cache is off |
3134 | * for ecx=2 and ecx=3: |
3137 | * for ecx=2 and ecx=3: |
3135 | * function does not return value |
3138 | * function does not return value |
3136 | 3139 | ||
3137 | ---------------------- Constants for registers: ---------------------- |
3140 | ---------------------- Constants for registers: ---------------------- |
3138 | eax - SF_SYS_MISC (68) |
3141 | eax - SF_SYS_MISC (68) |
3139 | ebx - SSF_PERFORMANCE (2) |
3142 | ebx - SSF_PERFORMANCE (2) |
3140 | ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1), |
3143 | ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1), |
3141 | SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3) |
3144 | SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3) |
3142 | ====================================================================== |
3145 | ====================================================================== |
3143 | =========== Function 68, subfunction 3 - read MSR-register. ========== |
3146 | =========== Function 68, subfunction 3 - read MSR-register. ========== |
3144 | ====================================================================== |
3147 | ====================================================================== |
3145 | MSR = Model Specific Register; the complete list of MSR-registers |
3148 | MSR = Model Specific Register; the complete list of MSR-registers |
3146 | of a processor is included to the documentation on it (for example, |
3149 | of a processor is included to the documentation on it (for example, |
3147 | IA-32 Intel Architecture Software Developer's Manual, |
3150 | IA-32 Intel Architecture Software Developer's Manual, |
3148 | Volume 3, Appendix B); each processor family has its own subset |
3151 | Volume 3, Appendix B); each processor family has its own subset |
3149 | of the MSR-registers. |
3152 | of the MSR-registers. |
3150 | Parameters: |
3153 | Parameters: |
3151 | * eax = 68 - function number |
3154 | * eax = 68 - function number |
3152 | * ebx = 3 - subfunction number |
3155 | * ebx = 3 - subfunction number |
3153 | * ecx is ignored |
3156 | * ecx is ignored |
3154 | * edx = MSR address |
3157 | * edx = MSR address |
3155 | Returned value: |
3158 | Returned value: |
3156 | * ebx:eax = high:low dword of the result |
3159 | * ebx:eax = high:low dword of the result |
3157 | Remarks: |
3160 | Remarks: |
3158 | * If ecx contains nonexistent or not implemented for this processor |
3161 | * If ecx contains nonexistent or not implemented for this processor |
3159 | MSR, processor will generate an exception in the kernel, which |
3162 | MSR, processor will generate an exception in the kernel, which |
3160 | will kill the thread. |
3163 | will kill the thread. |
3161 | * Previously it is necessary to check, whether MSRs are supported |
3164 | * Previously it is necessary to check, whether MSRs are supported |
3162 | as a whole, with the instruction 'cpuid'. Otherwise processor |
3165 | as a whole, with the instruction 'cpuid'. Otherwise processor |
3163 | will generate other exception in the kernel, which will anyway |
3166 | will generate other exception in the kernel, which will anyway |
3164 | kill the thread. |
3167 | kill the thread. |
3165 | 3168 | ||
3166 | ---------------------- Constants for registers: ---------------------- |
3169 | ---------------------- Constants for registers: ---------------------- |
3167 | eax - SF_SYS_MISC (68) |
3170 | eax - SF_SYS_MISC (68) |
3168 | ebx - SSF_READ_MSR (3) |
3171 | ebx - SSF_READ_MSR (3) |
3169 | ====================================================================== |
3172 | ====================================================================== |
3170 | ========= Function 68, subfunction 4 - write to MSR-register. ======== |
3173 | ========= Function 68, subfunction 4 - write to MSR-register. ======== |
3171 | ====================================================================== |
3174 | ====================================================================== |
3172 | MSR = Model Specific Register; the complete list of MSR-registers |
3175 | MSR = Model Specific Register; the complete list of MSR-registers |
3173 | of a processor is included to the documentation on it (for example, |
3176 | of a processor is included to the documentation on it (for example, |
3174 | IA-32 Intel Architecture Software Developer's Manual, |
3177 | IA-32 Intel Architecture Software Developer's Manual, |
3175 | Volume 3, Appendix B); each processor family has its own subset |
3178 | Volume 3, Appendix B); each processor family has its own subset |
3176 | of the MSR-registers. |
3179 | of the MSR-registers. |
3177 | Parameters: |
3180 | Parameters: |
3178 | * eax = 68 - function number |
3181 | * eax = 68 - function number |
3179 | * ebx = 4 - subfunction number |
3182 | * ebx = 4 - subfunction number |
3180 | * ecx is ignored |
3183 | * ecx is ignored |
3181 | * edx = MSR address |
3184 | * edx = MSR address |
3182 | * esi:edi = high:low dword |
3185 | * esi:edi = high:low dword |
3183 | Returned value: |
3186 | Returned value: |
3184 | * function does not return value |
3187 | * function does not return value |
3185 | Remarks: |
3188 | Remarks: |
3186 | * If ecx contains nonexistent or not implemented for this processor |
3189 | * If ecx contains nonexistent or not implemented for this processor |
3187 | MSR, processor will generate an exception in the kernel, which |
3190 | MSR, processor will generate an exception in the kernel, which |
3188 | will kill the thread. |
3191 | will kill the thread. |
3189 | * Previously it is necessary to check, whether MSRs are supported |
3192 | * Previously it is necessary to check, whether MSRs are supported |
3190 | as a whole, with the instruction 'cpuid'. Otherwise processor |
3193 | as a whole, with the instruction 'cpuid'. Otherwise processor |
3191 | will generate other exception in the kernel, which will anyway |
3194 | will generate other exception in the kernel, which will anyway |
3192 | kill the thread. |
3195 | kill the thread. |
3193 | 3196 | ||
3194 | ---------------------- Constants for registers: ---------------------- |
3197 | ---------------------- Constants for registers: ---------------------- |
3195 | eax - SF_SYS_MISC (68) |
3198 | eax - SF_SYS_MISC (68) |
3196 | ebx - SSF_WRITE_MSR (4) |
3199 | ebx - SSF_WRITE_MSR (4) |
3197 | ====================================================================== |
3200 | ====================================================================== |
3198 | ======= Function 68, subfunction 11 - initialize process heap. ======= |
3201 | ======= Function 68, subfunction 11 - initialize process heap. ======= |
3199 | ====================================================================== |
3202 | ====================================================================== |
3200 | Parameters: |
3203 | Parameters: |
3201 | * eax = 68 - function number |
3204 | * eax = 68 - function number |
3202 | * ebx = 11 - subfunction number |
3205 | * ebx = 11 - subfunction number |
3203 | Returned value: |
3206 | Returned value: |
3204 | * eax = 0 - failed |
3207 | * eax = 0 - failed |
3205 | * otherwise size of created heap |
3208 | * otherwise size of created heap |
3206 | Remarks: |
3209 | Remarks: |
3207 | * The function call initializes heap, from which one can in future |
3210 | * The function call initializes heap, from which one can in future |
3208 | allocate and free memory blocks with subfunctions 12 and 13. |
3211 | allocate and free memory blocks with subfunctions 12 and 13. |
3209 | Heap size is equal to total amount of free application memory. |
3212 | Heap size is equal to total amount of free application memory. |
3210 | * The second function call from the same process results in |
3213 | * The second function call from the same process results in |
3211 | returning the size of the existing heap. |
3214 | returning the size of the existing heap. |
3212 | * After creation of the heap calls to function 64 will be ignored. |
3215 | * After creation of the heap calls to function 64 will be ignored. |
3213 | 3216 | ||
3214 | ---------------------- Constants for registers: ---------------------- |
3217 | ---------------------- Constants for registers: ---------------------- |
3215 | eax - SF_SYS_MISC (68) |
3218 | eax - SF_SYS_MISC (68) |
3216 | ebx - SSF_HEAP_INIT (11) |
3219 | ebx - SSF_HEAP_INIT (11) |
3217 | ====================================================================== |
3220 | ====================================================================== |
3218 | ======== Function 68, subfunction 12 - allocate memory block. ======== |
3221 | ======== Function 68, subfunction 12 - allocate memory block. ======== |
3219 | ====================================================================== |
3222 | ====================================================================== |
3220 | Parameters: |
3223 | Parameters: |
3221 | * eax = 68 - function number |
3224 | * eax = 68 - function number |
3222 | * ebx = 12 - subfunction number |
3225 | * ebx = 12 - subfunction number |
3223 | * ecx = required size in bytes |
3226 | * ecx = required size in bytes |
3224 | Returned value: |
3227 | Returned value: |
3225 | * eax = pointer to the allocated block |
3228 | * eax = pointer to the allocated block |
3226 | Remarks: |
3229 | Remarks: |
3227 | * Before this call one must initialize process heap by call to |
3230 | * Before this call one must initialize process heap by call to |
3228 | subfunction 11. |
3231 | subfunction 11. |
3229 | * The function allocates an integer number of pages (4 Kb) in such |
3232 | * The function allocates an integer number of pages (4 Kb) in such |
3230 | way that the real size of allocated block is more than or equal to |
3233 | way that the real size of allocated block is more than or equal to |
3231 | requested size. |
3234 | requested size. |
3232 | 3235 | ||
3233 | ---------------------- Constants for registers: ---------------------- |
3236 | ---------------------- Constants for registers: ---------------------- |
3234 | eax - SF_SYS_MISC (68) |
3237 | eax - SF_SYS_MISC (68) |
3235 | ebx - SSF_MEM_ALLOC (12) |
3238 | ebx - SSF_MEM_ALLOC (12) |
3236 | ====================================================================== |
3239 | ====================================================================== |
3237 | ========== Function 68, subfunction 13 - free memory block. ========== |
3240 | ========== Function 68, subfunction 13 - free memory block. ========== |
3238 | ====================================================================== |
3241 | ====================================================================== |
3239 | Parameters: |
3242 | Parameters: |
3240 | * eax = 68 - function number |
3243 | * eax = 68 - function number |
3241 | * ebx = 13 - subfunction number |
3244 | * ebx = 13 - subfunction number |
3242 | * ecx = pointer to the memory block |
3245 | * ecx = pointer to the memory block |
3243 | Returned value: |
3246 | Returned value: |
3244 | * eax = 1 - success |
3247 | * eax = 1 - success |
3245 | * eax = 0 - failed |
3248 | * eax = 0 - failed |
3246 | Remarks: |
3249 | Remarks: |
3247 | * The memory block must have been allocated by subfunction 12 |
3250 | * The memory block must have been allocated by subfunction 12 |
3248 | or subfunction 20. |
3251 | or subfunction 20. |
3249 | 3252 | ||
3250 | ---------------------- Constants for registers: ---------------------- |
3253 | ---------------------- Constants for registers: ---------------------- |
3251 | eax - SF_SYS_MISC (68) |
3254 | eax - SF_SYS_MISC (68) |
3252 | ebx - SSF_MEM_FREE (13) |
3255 | ebx - SSF_MEM_FREE (13) |
3253 | ====================================================================== |
3256 | ====================================================================== |
3254 | ===================== Function 68, subfunction 14 ==================== |
3257 | ===================== Function 68, subfunction 14 ==================== |
3255 | ============ Wait for signal from another program/driver. ============ |
3258 | ============ Wait for signal from another program/driver. ============ |
3256 | ====================================================================== |
3259 | ====================================================================== |
3257 | Parameters: |
3260 | Parameters: |
3258 | * eax = 68 - function number |
3261 | * eax = 68 - function number |
3259 | * ebx = 14 - subfunction number |
3262 | * ebx = 14 - subfunction number |
3260 | * ecx = pointer to the buffer for information (24 bytes) |
3263 | * ecx = pointer to the buffer for information (24 bytes) |
3261 | Returned value: |
3264 | Returned value: |
3262 | * buffer pointed to by ecx contains the following information: |
3265 | * buffer pointed to by ecx contains the following information: |
3263 | * +0: dword: identifier for following data of signal |
3266 | * +0: dword: identifier for following data of signal |
3264 | * +4: dword: data of signal (20 bytes), format of which is defined |
3267 | * +4: dword: data of signal (20 bytes), format of which is defined |
3265 | by the first dword |
3268 | by the first dword |
3266 | 3269 | ||
3267 | ---------------------- Constants for registers: ---------------------- |
3270 | ---------------------- Constants for registers: ---------------------- |
3268 | eax - SF_SYS_MISC (68) |
3271 | eax - SF_SYS_MISC (68) |
3269 | ebx - SSF_WAIT_SIGNAL (14) |
3272 | ebx - SSF_WAIT_SIGNAL (14) |
3270 | ====================================================================== |
3273 | ====================================================================== |
3271 | ============= Function 68, subfunction 16 - load driver. ============= |
3274 | ============= Function 68, subfunction 16 - load driver. ============= |
3272 | ====================================================================== |
3275 | ====================================================================== |
3273 | Parameters: |
3276 | Parameters: |
3274 | * eax = 68 - function number |
3277 | * eax = 68 - function number |
3275 | * ebx = 16 - subfunction number |
3278 | * ebx = 16 - subfunction number |
3276 | * ecx = pointer to ASCIIZ-string with driver name |
3279 | * ecx = pointer to ASCIIZ-string with driver name |
3277 | Returned value: |
3280 | Returned value: |
3278 | * eax = 0 - failed |
3281 | * eax = 0 - failed |
3279 | * otherwise eax = driver handle |
3282 | * otherwise eax = driver handle |
3280 | Remarks: |
3283 | Remarks: |
3281 | * If the driver was not loaded yet, it is loaded; |
3284 | * If the driver was not loaded yet, it is loaded; |
3282 | if the driver was loaded yet, nothing happens. |
3285 | if the driver was loaded yet, nothing happens. |
3283 | * Driver name is case-sensitive. |
3286 | * Driver name is case-sensitive. |
3284 | Maximum length of the name is 16 characters, including |
3287 | Maximum length of the name is 16 characters, including |
3285 | terminating null character, the rest is ignored. |
3288 | terminating null character, the rest is ignored. |
3286 | * Driver ABC is loaded from file /rd/1/drivers/ABC.obj. |
3289 | * Driver ABC is loaded from file /rd/1/drivers/ABC.obj. |
3287 | 3290 | ||
3288 | ---------------------- Constants for registers: ---------------------- |
3291 | ---------------------- Constants for registers: ---------------------- |
3289 | eax - SF_SYS_MISC (68) |
3292 | eax - SF_SYS_MISC (68) |
3290 | ebx - SSF_LOAD_DRIVER (16) |
3293 | ebx - SSF_LOAD_DRIVER (16) |
3291 | ====================================================================== |
3294 | ====================================================================== |
3292 | ============ Function 68, subfunction 17 - driver control. =========== |
3295 | ============ Function 68, subfunction 17 - driver control. =========== |
3293 | ====================================================================== |
3296 | ====================================================================== |
3294 | Parameters: |
3297 | Parameters: |
3295 | * eax = 68 - function number |
3298 | * eax = 68 - function number |
3296 | * ebx = 17 - subfunction number |
3299 | * ebx = 17 - subfunction number |
3297 | * ecx = pointer to the control structure: |
3300 | * ecx = pointer to the control structure: |
3298 | * +0: dword: handle of driver |
3301 | * +0: dword: handle of driver |
3299 | * +4: dword: code of driver function |
3302 | * +4: dword: code of driver function |
3300 | * +8: dword: pointer to input data |
3303 | * +8: dword: pointer to input data |
3301 | * +12 = +0xC: dword: size of input data |
3304 | * +12 = +0xC: dword: size of input data |
3302 | * +16 = +0x10: dword: pointer to output data |
3305 | * +16 = +0x10: dword: pointer to output data |
3303 | * +20 = +0x14: dword: size of output data |
3306 | * +20 = +0x14: dword: size of output data |
3304 | Returned value: |
3307 | Returned value: |
3305 | * eax = determined by driver |
3308 | * eax = determined by driver |
3306 | Remarks: |
3309 | Remarks: |
3307 | * Function codes and the structure of input/output data |
3310 | * Function codes and the structure of input/output data |
3308 | are defined by driver. |
3311 | are defined by driver. |
3309 | * Previously one must obtain driver handle by subfunction 16. |
3312 | * Previously one must obtain driver handle by subfunction 16. |
3310 | 3313 | ||
3311 | ---------------------- Constants for registers: ---------------------- |
3314 | ---------------------- Constants for registers: ---------------------- |
3312 | eax - SF_SYS_MISC (68) |
3315 | eax - SF_SYS_MISC (68) |
3313 | ebx - SSF_CONTROL_DRIVER (17) |
3316 | ebx - SSF_CONTROL_DRIVER (17) |
3314 | ====================================================================== |
3317 | ====================================================================== |
3315 | =============== Function 68, subfunction 19 - load DLL. ============== |
3318 | =============== Function 68, subfunction 19 - load DLL. ============== |
3316 | ====================================================================== |
3319 | ====================================================================== |
3317 | Parameters: |
3320 | Parameters: |
3318 | * eax = 68 - function number |
3321 | * eax = 68 - function number |
3319 | * ebx = 19 - subfunction number |
3322 | * ebx = 19 - subfunction number |
3320 | * ecx = pointer to ASCIIZ-string with the full path to DLL |
3323 | * ecx = pointer to ASCIIZ-string with the full path to DLL |
3321 | Returned value: |
3324 | Returned value: |
3322 | * eax = 0 - failed |
3325 | * eax = 0 - failed |
3323 | * otherwise eax = pointer to DLL export table |
3326 | * otherwise eax = pointer to DLL export table |
3324 | Remarks: |
3327 | Remarks: |
3325 | * Export table is an array of structures of 2 dword's, terminated |
3328 | * Export table is an array of structures of 2 dword's, terminated |
3326 | by zero. The first dword in structure points to function name, |
3329 | by zero. The first dword in structure points to function name, |
3327 | the second dword contains address of function. |
3330 | the second dword contains address of function. |
3328 | 3331 | ||
3329 | ---------------------- Constants for registers: ---------------------- |
3332 | ---------------------- Constants for registers: ---------------------- |
3330 | eax - SF_SYS_MISC (68) |
3333 | eax - SF_SYS_MISC (68) |
3331 | ebx - SSF_LOAD_DLL (19) |
3334 | ebx - SSF_LOAD_DLL (19) |
3332 | ====================================================================== |
3335 | ====================================================================== |
3333 | ======= Function 68, subfunction 20 - reallocate memory block. ======= |
3336 | ======= Function 68, subfunction 20 - reallocate memory block. ======= |
3334 | ====================================================================== |
3337 | ====================================================================== |
3335 | Parameters: |
3338 | Parameters: |
3336 | * eax = 68 - function number |
3339 | * eax = 68 - function number |
3337 | * ebx = 20 - subfunction number |
3340 | * ebx = 20 - subfunction number |
3338 | * ecx = new size in bytes |
3341 | * ecx = new size in bytes |
3339 | * edx = pointer to already allocated block |
3342 | * edx = pointer to already allocated block |
3340 | Returned value: |
3343 | Returned value: |
3341 | * eax = pointer to the reallocated block, 0 = error |
3344 | * eax = pointer to the reallocated block, 0 = error |
3342 | Remarks: |
3345 | Remarks: |
3343 | * Before this call one must initialize process heap by call to |
3346 | * Before this call one must initialize process heap by call to |
3344 | subfunction 11. |
3347 | subfunction 11. |
3345 | * The function allocates an integer number of pages (4 Kb) in such |
3348 | * The function allocates an integer number of pages (4 Kb) in such |
3346 | way that the real size of allocated block is more than or equal to |
3349 | way that the real size of allocated block is more than or equal to |
3347 | requested size. |
3350 | requested size. |
3348 | * If edx=0, the function call is equivalent to memory allocation |
3351 | * If edx=0, the function call is equivalent to memory allocation |
3349 | with subfunction 12. Otherwise the block at edx |
3352 | with subfunction 12. Otherwise the block at edx |
3350 | must be allocated earlier with subfunction 12 or this subfunction. |
3353 | must be allocated earlier with subfunction 12 or this subfunction. |
3351 | * If ecx=0, the function frees memory block at edx and returns 0. |
3354 | * If ecx=0, the function frees memory block at edx and returns 0. |
3352 | * The contents of the block are unchanged up to the shorter of |
3355 | * The contents of the block are unchanged up to the shorter of |
3353 | the new and old sizes. |
3356 | the new and old sizes. |
3354 | 3357 | ||
3355 | ---------------------- Constants for registers: ---------------------- |
3358 | ---------------------- Constants for registers: ---------------------- |
3356 | eax - SF_SYS_MISC (68) |
3359 | eax - SF_SYS_MISC (68) |
3357 | ebx - SSF_MEM_REALLOC (20) |
3360 | ebx - SSF_MEM_REALLOC (20) |
3358 | ====================================================================== |
3361 | ====================================================================== |
3359 | =========== Function 68, subfunction 21 - load driver PE. ============ |
3362 | =========== Function 68, subfunction 21 - load driver PE. ============ |
3360 | ====================================================================== |
3363 | ====================================================================== |
3361 | Parameters: |
3364 | Parameters: |
3362 | * eax = 68 - function number |
3365 | * eax = 68 - function number |
3363 | * ebx = 21 - subfunction number |
3366 | * ebx = 21 - subfunction number |
3364 | * ecx = pointer to ASCIIZ-string with driver name |
3367 | * ecx = pointer to ASCIIZ-string with driver name |
3365 | * edx = pointer to command line |
3368 | * edx = pointer to command line |
3366 | Returned value: |
3369 | Returned value: |
3367 | * eax = 0 - failed |
3370 | * eax = 0 - failed |
3368 | * otherwise eax = driver handle |
3371 | * otherwise eax = driver handle |
3369 | Remarks: |
3372 | Remarks: |
3370 | * If the driver was not loaded yet, it is loaded; |
3373 | * If the driver was not loaded yet, it is loaded; |
3371 | if the driver was loaded yet, nothing happens. |
3374 | if the driver was loaded yet, nothing happens. |
3372 | 3375 | ||
3373 | ---------------------- Constants for registers: ---------------------- |
3376 | ---------------------- Constants for registers: ---------------------- |
3374 | eax - SF_SYS_MISC (68) |
3377 | eax - SF_SYS_MISC (68) |
3375 | ebx - SSF_LOAD_DRIVER_PE (21) |
3378 | ebx - SSF_LOAD_DRIVER_PE (21) |
3376 | ====================================================================== |
3379 | ====================================================================== |
3377 | ======== Function 68, subfunction 22 - open named memory area. ======= |
3380 | ======== Function 68, subfunction 22 - open named memory area. ======= |
3378 | ====================================================================== |
3381 | ====================================================================== |
3379 | Parameters: |
3382 | Parameters: |
3380 | * eax = 68 - function number |
3383 | * eax = 68 - function number |
3381 | * ebx = 22 - subfunction number |
3384 | * ebx = 22 - subfunction number |
3382 | * ecx = area name. Maximum of 31 characters with terminating zero |
3385 | * ecx = area name. Maximum of 31 characters with terminating zero |
3383 | * edx = area size in bytes for SHM_CREATE and SHM_OPEN_ALWAYS |
3386 | * edx = area size in bytes for SHM_CREATE and SHM_OPEN_ALWAYS |
3384 | * esi = flags for open and access: |
3387 | * esi = flags for open and access: |
3385 | * SHM_OPEN = 0x00 - open existing memory area. If an area |
3388 | * SHM_OPEN = 0x00 - open existing memory area. If an area |
3386 | with such name does not exist, the function |
3389 | with such name does not exist, the function |
3387 | will return error code 5. |
3390 | will return error code 5. |
3388 | * SHM_OPEN_ALWAYS = 0x04 - open existing or create new |
3391 | * SHM_OPEN_ALWAYS = 0x04 - open existing or create new |
3389 | memory area. |
3392 | memory area. |
3390 | * SHM_CREATE = 0x08 - create new memory area. If an area |
3393 | * SHM_CREATE = 0x08 - create new memory area. If an area |
3391 | with such name already exists, the function |
3394 | with such name already exists, the function |
3392 | will return error code 10. |
3395 | will return error code 10. |
3393 | * SHM_READ = 0x00 - only read access |
3396 | * SHM_READ = 0x00 - only read access |
3394 | * SHM_WRITE = 0x01 - read and write access |
3397 | * SHM_WRITE = 0x01 - read and write access |
3395 | Returned value: |
3398 | Returned value: |
3396 | * eax = pointer to memory area, 0 if error has occured |
3399 | * eax = pointer to memory area, 0 if error has occured |
3397 | * if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS): |
3400 | * if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS): |
3398 | edx = 0 - success, otherwise - error code |
3401 | edx = 0 - success, otherwise - error code |
3399 | * if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS): |
3402 | * if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS): |
3400 | edx = error code (if eax=0) or area size in bytes |
3403 | edx = error code (if eax=0) or area size in bytes |
3401 | Error codes: |
3404 | Error codes: |
3402 | * E_NOTFOUND = 5 |
3405 | * E_NOTFOUND = 5 |
3403 | * E_ACCESS = 10 |
3406 | * E_ACCESS = 10 |
3404 | * E_NOMEM = 30 |
3407 | * E_NOMEM = 30 |
3405 | * E_PARAM = 33 |
3408 | * E_PARAM = 33 |
3406 | Remarks: |
3409 | Remarks: |
3407 | * Before this call one must initialize process heap by call to |
3410 | * Before this call one must initialize process heap by call to |
3408 | subfunction 11. |
3411 | subfunction 11. |
3409 | * If a new area is created, access flags set maximal rights |
3412 | * If a new area is created, access flags set maximal rights |
3410 | for other processes. An attempt from other process to open |
3413 | for other processes. An attempt from other process to open |
3411 | with denied rights will fail with error code E_ACCESS. |
3414 | with denied rights will fail with error code E_ACCESS. |
3412 | * The process which has created an area always has write access. |
3415 | * The process which has created an area always has write access. |
3413 | 3416 | ||
3414 | ---------------------- Constants for registers: ---------------------- |
3417 | ---------------------- Constants for registers: ---------------------- |
3415 | eax - SF_SYS_MISC (68) |
3418 | eax - SF_SYS_MISC (68) |
3416 | ebx - SSF_MEM_OPEN (22) |
3419 | ebx - SSF_MEM_OPEN (22) |
3417 | ====================================================================== |
3420 | ====================================================================== |
3418 | ======= Function 68, subfunction 23 - close named memory area. ======= |
3421 | ======= Function 68, subfunction 23 - close named memory area. ======= |
3419 | ====================================================================== |
3422 | ====================================================================== |
3420 | Parameters: |
3423 | Parameters: |
3421 | * eax = 68 - function number |
3424 | * eax = 68 - function number |
3422 | * ebx = 23 - subfunction number |
3425 | * ebx = 23 - subfunction number |
3423 | * ecx = area name. Maximum of 31 characters with terminating zero |
3426 | * ecx = area name. Maximum of 31 characters with terminating zero |
3424 | Returned value: |
3427 | Returned value: |
3425 | * eax destroyed |
3428 | * eax destroyed |
3426 | Remarks: |
3429 | Remarks: |
3427 | * A memory area is physically freed (with deleting all data and |
3430 | * A memory area is physically freed (with deleting all data and |
3428 | freeing physical memory), when all threads which have opened |
3431 | freeing physical memory), when all threads which have opened |
3429 | this area will close it. |
3432 | this area will close it. |
3430 | * When thread is terminating, all opened by it areas are closed. |
3433 | * When thread is terminating, all opened by it areas are closed. |
3431 | 3434 | ||
3432 | ---------------------- Constants for registers: ---------------------- |
3435 | ---------------------- Constants for registers: ---------------------- |
3433 | eax - SF_SYS_MISC (68) |
3436 | eax - SF_SYS_MISC (68) |
3434 | ebx - SSF_MEM_CLOSE (23) |
3437 | ebx - SSF_MEM_CLOSE (23) |
3435 | ====================================================================== |
3438 | ====================================================================== |
3436 | ======== Function 68, subfunction 24 - set exception handler. ======== |
3439 | ======== Function 68, subfunction 24 - set exception handler. ======== |
3437 | ====================================================================== |
3440 | ====================================================================== |
3438 | Parameters: |
3441 | Parameters: |
3439 | * eax = 68 - function number |
3442 | * eax = 68 - function number |
3440 | * ebx = 24 - subfunction number |
3443 | * ebx = 24 - subfunction number |
3441 | * ecx = address of the new exception handler |
3444 | * ecx = address of the new exception handler |
3442 | * edx = the mask of handled exceptions |
3445 | * edx = the mask of handled exceptions |
3443 | Returned value: |
3446 | Returned value: |
3444 | * eax = address of the old exception handler (0, if it was not set) |
3447 | * eax = address of the old exception handler (0, if it was not set) |
3445 | * ebx = the old mask of handled exceptions |
3448 | * ebx = the old mask of handled exceptions |
3446 | Remarks: |
3449 | Remarks: |
3447 | * Bit number in mask of exceptions corresponds to exception number |
3450 | * Bit number in mask of exceptions corresponds to exception number |
3448 | in CPU-specification (Intel-PC). For example, FPU exceptions have |
3451 | in CPU-specification (Intel-PC). For example, FPU exceptions have |
3449 | number 16 (#MF), and SSE exceptions - 19 (#XF). |
3452 | number 16 (#MF), and SSE exceptions - 19 (#XF). |
3450 | * The current implementation ignores the inquiry for hook of 7 |
3453 | * The current implementation ignores the inquiry for hook of 7 |
3451 | exception - the system handles #NM by its own. |
3454 | exception - the system handles #NM by its own. |
3452 | * The exception handler is called with exception number as first |
3455 | * The exception handler is called with exception number as first |
3453 | (and only) stack parameter. So, correct exit from the handler is |
3456 | (and only) stack parameter. So, correct exit from the handler is |
3454 | RET 4. It returns to the instruction, that caused the exception, |
3457 | RET 4. It returns to the instruction, that caused the exception, |
3455 | for faults, and to the next instruction for traps (see |
3458 | for faults, and to the next instruction for traps (see |
3456 | classification of exceptions in CPU specification). |
3459 | classification of exceptions in CPU specification). |
3457 | * When user handler receives control, the corresponding bit in |
3460 | * When user handler receives control, the corresponding bit in |
3458 | the exception mask is cleared. Raising this exception |
3461 | the exception mask is cleared. Raising this exception |
3459 | in consequence leads to default handling, that is, |
3462 | in consequence leads to default handling, that is, |
3460 | terminating the application in absence of debugger or |
3463 | terminating the application in absence of debugger or |
3461 | suspend with notification of debugger otherwise. |
3464 | suspend with notification of debugger otherwise. |
3462 | * After user handler completes critical operations, it can set |
3465 | * After user handler completes critical operations, it can set |
3463 | the corresponding bit in the exception mask with subfunction 25. |
3466 | the corresponding bit in the exception mask with subfunction 25. |
3464 | Also user handler is responsible for clearing exceptions flags in |
3467 | Also user handler is responsible for clearing exceptions flags in |
3465 | FPU and/or SSE. |
3468 | FPU and/or SSE. |
3466 | 3469 | ||
3467 | ---------------------- Constants for registers: ---------------------- |
3470 | ---------------------- Constants for registers: ---------------------- |
3468 | eax - SF_SYS_MISC (68) |
3471 | eax - SF_SYS_MISC (68) |
3469 | ebx - SSF_SET_EXCEPTION_HANDLER (24) |
3472 | ebx - SSF_SET_EXCEPTION_HANDLER (24) |
3470 | ====================================================================== |
3473 | ====================================================================== |
3471 | ======== Function 68, subfunction 25 - set exception activity ======== |
3474 | ======== Function 68, subfunction 25 - set exception activity ======== |
3472 | ====================================================================== |
3475 | ====================================================================== |
3473 | Parameters: |
3476 | Parameters: |
3474 | * eax = 68 - function number |
3477 | * eax = 68 - function number |
3475 | * ebx = 25 - subfunction number |
3478 | * ebx = 25 - subfunction number |
3476 | * ecx = signal number |
3479 | * ecx = signal number |
3477 | * edx = value of activity (0/1) |
3480 | * edx = value of activity (0/1) |
3478 | Returned value: |
3481 | Returned value: |
3479 | * eax = -1 - invalid signal number |
3482 | * eax = -1 - invalid signal number |
3480 | * otherwise eax = old value of activity for this signal (0/1) |
3483 | * otherwise eax = old value of activity for this signal (0/1) |
3481 | Remarks: |
3484 | Remarks: |
3482 | * In current implementation only mask for user excepton handler, |
3485 | * In current implementation only mask for user excepton handler, |
3483 | which has been previously set by subfunction 24, |
3486 | which has been previously set by subfunction 24, |
3484 | is changed. Signal number corresponds to exception number. |
3487 | is changed. Signal number corresponds to exception number. |
3485 | 3488 | ||
3486 | ---------------------- Constants for registers: ---------------------- |
3489 | ---------------------- Constants for registers: ---------------------- |
3487 | eax - SF_SYS_MISC (68) |
3490 | eax - SF_SYS_MISC (68) |
3488 | ebx - SSF_SET_EXCEPTION_STATE (25) |
3491 | ebx - SSF_SET_EXCEPTION_STATE (25) |
3489 | ====================================================================== |
3492 | ====================================================================== |
3490 | ====== Function 68, subfunction 26 - release memory pages ============ |
3493 | ====== Function 68, subfunction 26 - release memory pages ============ |
3491 | ====================================================================== |
3494 | ====================================================================== |
3492 | Parameters: |
3495 | Parameters: |
3493 | * eax = 68 - function number |
3496 | * eax = 68 - function number |
3494 | * ebx = 26 - subfunction number |
3497 | * ebx = 26 - subfunction number |
3495 | * ecx = pointer to the memory block, allocated by subfunction 12 |
3498 | * ecx = pointer to the memory block, allocated by subfunction 12 |
3496 | * edx = offset from the block beginnings |
3499 | * edx = offset from the block beginnings |
3497 | * esi = the size of the region of memory to release, in bytes |
3500 | * esi = the size of the region of memory to release, in bytes |
3498 | Remarks: |
3501 | Remarks: |
3499 | * function release range of pages from ecx+edx to ecx+edx+esi |
3502 | * function release range of pages from ecx+edx to ecx+edx+esi |
3500 | and set virtual memory into reserved state. |
3503 | and set virtual memory into reserved state. |
3501 | 3504 | ||
3502 | ---------------------- Constants for registers: ---------------------- |
3505 | ---------------------- Constants for registers: ---------------------- |
3503 | eax - SF_SYS_MISC (68) |
3506 | eax - SF_SYS_MISC (68) |
3504 | ebx - SSF_MEM_FREE_EXT (26) |
3507 | ebx - SSF_MEM_FREE_EXT (26) |
3505 | ====================================================================== |
3508 | ====================================================================== |
3506 | ========== Function 68, subfunction 27 - load file =================== |
3509 | ========== Function 68, subfunction 27 - load file =================== |
3507 | ====================================================================== |
3510 | ====================================================================== |
3508 | Parameters: |
3511 | Parameters: |
3509 | * eax = 68 - function number |
3512 | * eax = 68 - function number |
3510 | * ebx = 27 - subfunction number |
3513 | * ebx = 27 - subfunction number |
3511 | * ecx = pointer to ASCIIZ-string with the filename |
3514 | * ecx = pointer to ASCIIZ-string with the filename |
3512 | Returned value: |
3515 | Returned value: |
3513 | * eax = pointer to the loaded file, or zero |
3516 | * eax = pointer to the loaded file, or zero |
3514 | * edx = size of the loaded file, or zero |
3517 | * edx = size of the loaded file, or zero |
3515 | Remarks: |
3518 | Remarks: |
3516 | * function loads file and unpacks, if necessary |
3519 | * function loads file and unpacks, if necessary |
3517 | 3520 | ||
3518 | ---------------------- Constants for registers: ---------------------- |
3521 | ---------------------- Constants for registers: ---------------------- |
3519 | eax - SF_SYS_MISC (68) |
3522 | eax - SF_SYS_MISC (68) |
3520 | ebx - SSF_LOAD_FILE (27) |
3523 | ebx - SSF_LOAD_FILE (27) |
3521 | ====================================================================== |
3524 | ====================================================================== |
3522 | ====================== Function 69 - debugging. ====================== |
3525 | ====================== Function 69 - debugging. ====================== |
3523 | ====================================================================== |
3526 | ====================================================================== |
3524 | A process can load other process as debugged by set of corresponding |
3527 | A process can load other process as debugged by set of corresponding |
3525 | bit by call to subfunction 7 of function 70. |
3528 | bit by call to subfunction 7 of function 70. |
3526 | A process can have only one debugger; one process can debug some |
3529 | A process can have only one debugger; one process can debug some |
3527 | others. The system notifies debugger on events occuring with |
3530 | others. The system notifies debugger on events occuring with |
3528 | debugged process. Messages are written to the buffer defined by |
3531 | debugged process. Messages are written to the buffer defined by |
3529 | subfunction 0. |
3532 | subfunction 0. |
3530 | Format of a message: |
3533 | Format of a message: |
3531 | * +0: dword: message code |
3534 | * +0: dword: message code |
3532 | * +4: dword: PID of debugged process |
3535 | * +4: dword: PID of debugged process |
3533 | * +8: there can be additional data depending on message code |
3536 | * +8: there can be additional data depending on message code |
3534 | Message codes: |
3537 | Message codes: |
3535 | * 1 = exception |
3538 | * 1 = exception |
3536 | * in addition dword-number of the exception is given |
3539 | * in addition dword-number of the exception is given |
3537 | * process is suspended |
3540 | * process is suspended |
3538 | * 2 = process has terminated |
3541 | * 2 = process has terminated |
3539 | * comes at any termination: both through the system function -1, |
3542 | * comes at any termination: both through the system function -1, |
3540 | and at "murder" by any other process (including debugger itself) |
3543 | and at "murder" by any other process (including debugger itself) |
3541 | * 3 = debug exception int 1 = #DB |
3544 | * 3 = debug exception int 1 = #DB |
3542 | * in addition dword-image of the register DR6 is given: |
3545 | * in addition dword-image of the register DR6 is given: |
3543 | * bits 0-3: condition of the corresponding breakpoint (set by |
3546 | * bits 0-3: condition of the corresponding breakpoint (set by |
3544 | subfunction 9) is satisfied |
3547 | subfunction 9) is satisfied |
3545 | * bit 14: exception has occured because of the trace mode |
3548 | * bit 14: exception has occured because of the trace mode |
3546 | (flag TF is set TF) |
3549 | (flag TF is set TF) |
3547 | * process is suspended |
3550 | * process is suspended |
3548 | When debugger terminates, all debugged processes are killed. |
3551 | When debugger terminates, all debugged processes are killed. |
3549 | If debugger does not want this, it must previously detach by |
3552 | If debugger does not want this, it must previously detach by |
3550 | subfunction 3. |
3553 | subfunction 3. |
3551 | 3554 | ||
3552 | All subfunctions are applicable only to processes/threads started |
3555 | All subfunctions are applicable only to processes/threads started |
3553 | from the current by function 70 with set debugging flag. |
3556 | from the current by function 70 with set debugging flag. |
3554 | Debugging of multithreaded programs is not supported yet. |
3557 | Debugging of multithreaded programs is not supported yet. |
3555 | The full list of subfunctions: |
3558 | The full list of subfunctions: |
3556 | * subfunction 0 - define data area for debug messages |
3559 | * subfunction 0 - define data area for debug messages |
3557 | * subfunction 1 - get contents of registers of debugged thread |
3560 | * subfunction 1 - get contents of registers of debugged thread |
3558 | * subfunction 2 - set contents of registers of debugged thread |
3561 | * subfunction 2 - set contents of registers of debugged thread |
3559 | * subfunction 3 - detach from debugged process |
3562 | * subfunction 3 - detach from debugged process |
3560 | * subfunction 4 - suspend debugged thread |
3563 | * subfunction 4 - suspend debugged thread |
3561 | * subfunction 5 - resume debugged thread |
3564 | * subfunction 5 - resume debugged thread |
3562 | * subfunction 6 - read from the memory of debugged process |
3565 | * subfunction 6 - read from the memory of debugged process |
3563 | * subfunction 7 - write to the memory of debugged process |
3566 | * subfunction 7 - write to the memory of debugged process |
3564 | * subfunction 8 - terminate debugged thread |
3567 | * subfunction 8 - terminate debugged thread |
3565 | * subfunction 9 - set/clear hardware breakpoint |
3568 | * subfunction 9 - set/clear hardware breakpoint |
3566 | 3569 | ||
3567 | ---------------------- Constants for registers: ---------------------- |
3570 | ---------------------- Constants for registers: ---------------------- |
3568 | eax - SF_DEBUG (69) |
3571 | eax - SF_DEBUG (69) |
3569 | ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1), |
3572 | ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1), |
3570 | SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4), |
3573 | SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4), |
3571 | SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7), |
3574 | SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7), |
3572 | SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9) |
3575 | SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9) |
3573 | ====================================================================== |
3576 | ====================================================================== |
3574 | = Function 69, subfunction 0 - define data area fror debug messages. = |
3577 | = Function 69, subfunction 0 - define data area fror debug messages. = |
3575 | ====================================================================== |
3578 | ====================================================================== |
3576 | Parameters: |
3579 | Parameters: |
3577 | * eax = 69 - function number |
3580 | * eax = 69 - function number |
3578 | * ebx = 0 - subfunction number |
3581 | * ebx = 0 - subfunction number |
3579 | * ecx = pointer |
3582 | * ecx = pointer |
3580 | Format of data area: |
3583 | Format of data area: |
3581 | * +0: dword: N = buffer size (not including this header) |
3584 | * +0: dword: N = buffer size (not including this header) |
3582 | * +4: dword: occupied place |
3585 | * +4: dword: occupied place |
3583 | * +8: N*byte: buffer |
3586 | * +8: N*byte: buffer |
3584 | Returned value: |
3587 | Returned value: |
3585 | * function does not return value |
3588 | * function does not return value |
3586 | Remarks: |
3589 | Remarks: |
3587 | * If the size field is negative, the buffer is considered locked |
3590 | * If the size field is negative, the buffer is considered locked |
3588 | and at arrival of new message the system will wait. |
3591 | and at arrival of new message the system will wait. |
3589 | For synchronization frame all work with the buffer by operations |
3592 | For synchronization frame all work with the buffer by operations |
3590 | lock/unlock |
3593 | lock/unlock |
3591 | neg [bufsize] |
3594 | neg [bufsize] |
3592 | * Data in the buffer are considered as array of items with variable |
3595 | * Data in the buffer are considered as array of items with variable |
3593 | length - messages. Format of a message is explained in |
3596 | length - messages. Format of a message is explained in |
3594 | general description. |
3597 | general description. |
3595 | 3598 | ||
3596 | ---------------------- Constants for registers: ---------------------- |
3599 | ---------------------- Constants for registers: ---------------------- |
3597 | eax - SF_DEBUG (69) |
3600 | eax - SF_DEBUG (69) |
3598 | ebx - SSF_SET_MESSAGE_AREA (0) |
3601 | ebx - SSF_SET_MESSAGE_AREA (0) |
3599 | ====================================================================== |
3602 | ====================================================================== |
3600 | ===================== Function 69, subfunction 1 ===================== |
3603 | ===================== Function 69, subfunction 1 ===================== |
3601 | ============ Get contents of registers of debugged thread. =========== |
3604 | ============ Get contents of registers of debugged thread. =========== |
3602 | ====================================================================== |
3605 | ====================================================================== |
3603 | Parameters: |
3606 | Parameters: |
3604 | * eax = 69 - function number |
3607 | * eax = 69 - function number |
3605 | * ebx = 1 - subfunction number |
3608 | * ebx = 1 - subfunction number |
3606 | * ecx = thread identifier |
3609 | * ecx = thread identifier |
3607 | * edx = size of context structure, must be 0x28=40 bytes |
3610 | * edx = size of context structure, must be 0x28=40 bytes |
3608 | * esi = pointer to context structure |
3611 | * esi = pointer to context structure |
3609 | Returned value: |
3612 | Returned value: |
3610 | * function does not return value |
3613 | * function does not return value |
3611 | Format of context structure: (FPU is not supported yet) |
3614 | Format of context structure: (FPU is not supported yet) |
3612 | * +0: dword: eip |
3615 | * +0: dword: eip |
3613 | * +4: dword: eflags |
3616 | * +4: dword: eflags |
3614 | * +8: dword: eax |
3617 | * +8: dword: eax |
3615 | * +12 = +0xC: dword: ecx |
3618 | * +12 = +0xC: dword: ecx |
3616 | * +16 = +0x10: dword: edx |
3619 | * +16 = +0x10: dword: edx |
3617 | * +20 = +0x14: dword: ebx |
3620 | * +20 = +0x14: dword: ebx |
3618 | * +24 = +0x18: dword: esp |
3621 | * +24 = +0x18: dword: esp |
3619 | * +28 = +0x1C: dword: ebp |
3622 | * +28 = +0x1C: dword: ebp |
3620 | * +32 = +0x20: dword: esi |
3623 | * +32 = +0x20: dword: esi |
3621 | * +36 = +0x24: dword: edi |
3624 | * +36 = +0x24: dword: edi |
3622 | Remarks: |
3625 | Remarks: |
3623 | * If the thread executes code of ring-0, the function returns |
3626 | * If the thread executes code of ring-0, the function returns |
3624 | contents of registers of ring-3. |
3627 | contents of registers of ring-3. |
3625 | * Process must be loaded for debugging (as is shown in |
3628 | * Process must be loaded for debugging (as is shown in |
3626 | general description). |
3629 | general description). |
3627 | 3630 | ||
3628 | ---------------------- Constants for registers: ---------------------- |
3631 | ---------------------- Constants for registers: ---------------------- |
3629 | eax - SF_DEBUG (69) |
3632 | eax - SF_DEBUG (69) |
3630 | ebx - SSF_GET_REGISTERS (1) |
3633 | ebx - SSF_GET_REGISTERS (1) |
3631 | ====================================================================== |
3634 | ====================================================================== |
3632 | ===================== Function 69, subfunction 2 ===================== |
3635 | ===================== Function 69, subfunction 2 ===================== |
3633 | ============ Set contents of registers of debugged thread. =========== |
3636 | ============ Set contents of registers of debugged thread. =========== |
3634 | ====================================================================== |
3637 | ====================================================================== |
3635 | Parameters: |
3638 | Parameters: |
3636 | * eax = 69 - function number |
3639 | * eax = 69 - function number |
3637 | * ebx = 2 - subfunction number |
3640 | * ebx = 2 - subfunction number |
3638 | * ecx = thread identifier |
3641 | * ecx = thread identifier |
3639 | * edx = size of context structure, must be 0x28=40 bytes |
3642 | * edx = size of context structure, must be 0x28=40 bytes |
3640 | Returned value: |
3643 | Returned value: |
3641 | * function does not return value |
3644 | * function does not return value |
3642 | Format of context structure is shown in the description of |
3645 | Format of context structure is shown in the description of |
3643 | subfunction 1. |
3646 | subfunction 1. |
3644 | Remarks: |
3647 | Remarks: |
3645 | * If the thread executes code of ring-0, the function returns |
3648 | * If the thread executes code of ring-0, the function returns |
3646 | contents of registers of ring-3. |
3649 | contents of registers of ring-3. |
3647 | * Process must be loaded for debugging (as is shown in |
3650 | * Process must be loaded for debugging (as is shown in |
3648 | general description). |
3651 | general description). |
3649 | 3652 | ||
3650 | ---------------------- Constants for registers: ---------------------- |
3653 | ---------------------- Constants for registers: ---------------------- |
3651 | eax - SF_DEBUG (69) |
3654 | eax - SF_DEBUG (69) |
3652 | ebx - SSF_SET_REGISTERS (2) |
3655 | ebx - SSF_SET_REGISTERS (2) |
3653 | ====================================================================== |
3656 | ====================================================================== |
3654 | ===== Function 69, subfunction 3 - detach from debugged process. ===== |
3657 | ===== Function 69, subfunction 3 - detach from debugged process. ===== |
3655 | ====================================================================== |
3658 | ====================================================================== |
3656 | Parameters: |
3659 | Parameters: |
3657 | * eax = 69 - function number |
3660 | * eax = 69 - function number |
3658 | * ebx = 3 - subfunction number |
3661 | * ebx = 3 - subfunction number |
3659 | * ecx = identifier |
3662 | * ecx = identifier |
3660 | Returned value: |
3663 | Returned value: |
3661 | * function does not return value |
3664 | * function does not return value |
3662 | Remarks: |
3665 | Remarks: |
3663 | * If the process was suspended, it resumes execution. |
3666 | * If the process was suspended, it resumes execution. |
3664 | 3667 | ||
3665 | ---------------------- Constants for registers: ---------------------- |
3668 | ---------------------- Constants for registers: ---------------------- |
3666 | eax - SF_DEBUG (69) |
3669 | eax - SF_DEBUG (69) |
3667 | ebx - SSF_DETACH (3) |
3670 | ebx - SSF_DETACH (3) |
3668 | ====================================================================== |
3671 | ====================================================================== |
3669 | ======== Function 69, subfunction 4 - suspend debugged thread. ======= |
3672 | ======== Function 69, subfunction 4 - suspend debugged thread. ======= |
3670 | ====================================================================== |
3673 | ====================================================================== |
3671 | Parameters: |
3674 | Parameters: |
3672 | * eax = 69 - function number |
3675 | * eax = 69 - function number |
3673 | * ebx = 4 - subfunction number |
3676 | * ebx = 4 - subfunction number |
3674 | * ecx = thread identifier |
3677 | * ecx = thread identifier |
3675 | Returned value: |
3678 | Returned value: |
3676 | * function does not return value |
3679 | * function does not return value |
3677 | Remarks: |
3680 | Remarks: |
3678 | * Process must be loaded for debugging (as is shown in |
3681 | * Process must be loaded for debugging (as is shown in |
3679 | general description). |
3682 | general description). |
3680 | 3683 | ||
3681 | ---------------------- Constants for registers: ---------------------- |
3684 | ---------------------- Constants for registers: ---------------------- |
3682 | eax - SF_DEBUG (69) |
3685 | eax - SF_DEBUG (69) |
3683 | ebx - SSF_SUSPEND (4) |
3686 | ebx - SSF_SUSPEND (4) |
3684 | ====================================================================== |
3687 | ====================================================================== |
3685 | ======== Function 69, subfunction 5 - resume debugged thread. ======== |
3688 | ======== Function 69, subfunction 5 - resume debugged thread. ======== |
3686 | ====================================================================== |
3689 | ====================================================================== |
3687 | Parameters: |
3690 | Parameters: |
3688 | * eax = 69 - function number |
3691 | * eax = 69 - function number |
3689 | * ebx = 5 - subfunction number |
3692 | * ebx = 5 - subfunction number |
3690 | * ecx = thread identifier |
3693 | * ecx = thread identifier |
3691 | Returned value: |
3694 | Returned value: |
3692 | * function does not return value |
3695 | * function does not return value |
3693 | Remarks: |
3696 | Remarks: |
3694 | * Process must be loaded for debugging (as is shown in |
3697 | * Process must be loaded for debugging (as is shown in |
3695 | general description). |
3698 | general description). |
3696 | 3699 | ||
3697 | ---------------------- Constants for registers: ---------------------- |
3700 | ---------------------- Constants for registers: ---------------------- |
3698 | eax - SF_DEBUG (69) |
3701 | eax - SF_DEBUG (69) |
3699 | ebx - SSF_RESUME (5) |
3702 | ebx - SSF_RESUME (5) |
3700 | ====================================================================== |
3703 | ====================================================================== |
3701 | = Fucntion 69, subfunction 6 - read from memory of debugged process. = |
3704 | = Fucntion 69, subfunction 6 - read from memory of debugged process. = |
3702 | ====================================================================== |
3705 | ====================================================================== |
3703 | Parameters: |
3706 | Parameters: |
3704 | * eax = 69 - function number |
3707 | * eax = 69 - function number |
3705 | * ebx = 6 - subfunction number |
3708 | * ebx = 6 - subfunction number |
3706 | * ecx = identifier |
3709 | * ecx = identifier |
3707 | * edx = number of bytes to read |
3710 | * edx = number of bytes to read |
3708 | * esi = address in the memory of debugged process |
3711 | * esi = address in the memory of debugged process |
3709 | * edi = pointer to buffer for data |
3712 | * edi = pointer to buffer for data |
3710 | Returned value: |
3713 | Returned value: |
3711 | * eax = -1 at an error (invalid PID or buffer) |
3714 | * eax = -1 at an error (invalid PID or buffer) |
3712 | * otherwise eax = number of read bytes (possibly, 0, |
3715 | * otherwise eax = number of read bytes (possibly, 0, |
3713 | if esi is too large) |
3716 | if esi is too large) |
3714 | Remarks: |
3717 | Remarks: |
3715 | * Process must be loaded for debugging (as is shown in |
3718 | * Process must be loaded for debugging (as is shown in |
3716 | general description). |
3719 | general description). |
3717 | 3720 | ||
3718 | ---------------------- Constants for registers: ---------------------- |
3721 | ---------------------- Constants for registers: ---------------------- |
3719 | eax - SF_DEBUG (69) |
3722 | eax - SF_DEBUG (69) |
3720 | ebx - SSF_READ_MEMORY (6) |
3723 | ebx - SSF_READ_MEMORY (6) |
3721 | ====================================================================== |
3724 | ====================================================================== |
3722 | == Function 69, subfunction 7 - write to memory of debugged process. = |
3725 | == Function 69, subfunction 7 - write to memory of debugged process. = |
3723 | ====================================================================== |
3726 | ====================================================================== |
3724 | Parameters: |
3727 | Parameters: |
3725 | * eax = 69 - function number |
3728 | * eax = 69 - function number |
3726 | * ebx = 7 - subfunction number |
3729 | * ebx = 7 - subfunction number |
3727 | * ecx = identifier |
3730 | * ecx = identifier |
3728 | * edx = number of bytes to write |
3731 | * edx = number of bytes to write |
3729 | * esi = address of memory in debugged process |
3732 | * esi = address of memory in debugged process |
3730 | * edi = pointer to data |
3733 | * edi = pointer to data |
3731 | Returned value: |
3734 | Returned value: |
3732 | * eax = -1 at an error (invalid PID or buffer) |
3735 | * eax = -1 at an error (invalid PID or buffer) |
3733 | * otherwise eax = number of written bytes (possibly, 0, |
3736 | * otherwise eax = number of written bytes (possibly, 0, |
3734 | if esi is too large) |
3737 | if esi is too large) |
3735 | Remarks: |
3738 | Remarks: |
3736 | * Process must be loaded for debugging (as is shown in |
3739 | * Process must be loaded for debugging (as is shown in |
3737 | general description). |
3740 | general description). |
3738 | 3741 | ||
3739 | ---------------------- Constants for registers: ---------------------- |
3742 | ---------------------- Constants for registers: ---------------------- |
3740 | eax - SF_DEBUG (69) |
3743 | eax - SF_DEBUG (69) |
3741 | ebx - SSF_WRITE_MEMORY (7) |
3744 | ebx - SSF_WRITE_MEMORY (7) |
3742 | ====================================================================== |
3745 | ====================================================================== |
3743 | ======= Function 69, subfunction 8 - terminate debugged thread. ====== |
3746 | ======= Function 69, subfunction 8 - terminate debugged thread. ====== |
3744 | ====================================================================== |
3747 | ====================================================================== |
3745 | Parameters: |
3748 | Parameters: |
3746 | * eax = 69 - function number |
3749 | * eax = 69 - function number |
3747 | * ebx = 8 - subfunction number |
3750 | * ebx = 8 - subfunction number |
3748 | * ecx = identifier |
3751 | * ecx = identifier |
3749 | Returned value: |
3752 | Returned value: |
3750 | * function does not return value |
3753 | * function does not return value |
3751 | Remarks: |
3754 | Remarks: |
3752 | * Process must be loaded for debugging (as is shown in |
3755 | * Process must be loaded for debugging (as is shown in |
3753 | general description). |
3756 | general description). |
3754 | * The function is similar to subfunction 2 of function 18 |
3757 | * The function is similar to subfunction 2 of function 18 |
3755 | with two differences: it requires first remark and |
3758 | with two differences: it requires first remark and |
3756 | accepts PID rather than slot number. |
3759 | accepts PID rather than slot number. |
3757 | 3760 | ||
3758 | ---------------------- Constants for registers: ---------------------- |
3761 | ---------------------- Constants for registers: ---------------------- |
3759 | eax - SF_DEBUG (69) |
3762 | eax - SF_DEBUG (69) |
3760 | ebx - SSF_TERMINATE (8) |
3763 | ebx - SSF_TERMINATE (8) |
3761 | ====================================================================== |
3764 | ====================================================================== |
3762 | ===== Function 69, subfunction 9 - set/clear hardware breakpoint. ==== |
3765 | ===== Function 69, subfunction 9 - set/clear hardware breakpoint. ==== |
3763 | ====================================================================== |
3766 | ====================================================================== |
3764 | Parameters: |
3767 | Parameters: |
3765 | * eax = 69 - function number |
3768 | * eax = 69 - function number |
3766 | * ebx = 9 - subfunction number |
3769 | * ebx = 9 - subfunction number |
3767 | * ecx = thread identifier |
3770 | * ecx = thread identifier |
3768 | * dl = index of breakpoint, from 0 to 3 inclusively |
3771 | * dl = index of breakpoint, from 0 to 3 inclusively |
3769 | * dh = flags: |
3772 | * dh = flags: |
3770 | * if high bit is cleared - set breakpoint: |
3773 | * if high bit is cleared - set breakpoint: |
3771 | * bits 0-1 - condition: |
3774 | * bits 0-1 - condition: |
3772 | * 00 = breakpoint on execution |
3775 | * 00 = breakpoint on execution |
3773 | * 01 = breakpoint on read |
3776 | * 01 = breakpoint on read |
3774 | * 11 = breakpoint on read/write |
3777 | * 11 = breakpoint on read/write |
3775 | * bits 2-3 - length; for breakpoints on exception it must be |
3778 | * bits 2-3 - length; for breakpoints on exception it must be |
3776 | 00, otherwise one of |
3779 | 00, otherwise one of |
3777 | * 00 = byte |
3780 | * 00 = byte |
3778 | * 01 = word |
3781 | * 01 = word |
3779 | * 11 = dword |
3782 | * 11 = dword |
3780 | * esi = breakpoint address; must be aligned according to |
3783 | * esi = breakpoint address; must be aligned according to |
3781 | the length (i.e. must be even for word breakpoints, |
3784 | the length (i.e. must be even for word breakpoints, |
3782 | divisible by 4 for dword) |
3785 | divisible by 4 for dword) |
3783 | * if high bit is set - clear breakpoint |
3786 | * if high bit is set - clear breakpoint |
3784 | Returned value: |
3787 | Returned value: |
3785 | * eax = 0 - success |
3788 | * eax = 0 - success |
3786 | * eax = 1 - error in the input data |
3789 | * eax = 1 - error in the input data |
3787 | * eax = 2 - (reserved, is never returned in the current |
3790 | * eax = 2 - (reserved, is never returned in the current |
3788 | implementation) a global breakpoint with that index is already set |
3791 | implementation) a global breakpoint with that index is already set |
3789 | Remarks: |
3792 | Remarks: |
3790 | * Process must be loaded for debugging (as is shown in |
3793 | * Process must be loaded for debugging (as is shown in |
3791 | general description). |
3794 | general description). |
3792 | * Hardware breakpoints are implemented through DRx-registers of |
3795 | * Hardware breakpoints are implemented through DRx-registers of |
3793 | the processor, all limitations results from this. |
3796 | the processor, all limitations results from this. |
3794 | * The function can reinstall the breakpoint, previously set |
3797 | * The function can reinstall the breakpoint, previously set |
3795 | by it (and it does not inform on this). |
3798 | by it (and it does not inform on this). |
3796 | Carry on the list of set breakpoints in the debugger. |
3799 | Carry on the list of set breakpoints in the debugger. |
3797 | * Breakpoints generate debug exception #DB, on which the system |
3800 | * Breakpoints generate debug exception #DB, on which the system |
3798 | notifies debugger. |
3801 | notifies debugger. |
3799 | * Breakpoints on write and read/write act after |
3802 | * Breakpoints on write and read/write act after |
3800 | execution of the caused it instruction. |
3803 | execution of the caused it instruction. |
3801 | 3804 | ||
3802 | ---------------------- Constants for registers: ---------------------- |
3805 | ---------------------- Constants for registers: ---------------------- |
3803 | eax - SF_DEBUG (69) |
3806 | eax - SF_DEBUG (69) |
3804 | ebx - SSF_DEFINE_BREAKPOINT (9) |
3807 | ebx - SSF_DEFINE_BREAKPOINT (9) |
3805 | ====================================================================== |
3808 | ====================================================================== |
3806 | ==== Function 70 - work with file system with long names support. ==== |
3809 | ==== Function 70 - work with file system with long names support. ==== |
3807 | ====================================================================== |
3810 | ====================================================================== |
3808 | Parameters: |
3811 | Parameters: |
3809 | * eax = 70 |
3812 | * eax = 70 |
3810 | * ebx = pointer to the information structure |
3813 | * ebx = pointer to the information structure |
3811 | Returned value: |
3814 | Returned value: |
3812 | * eax = 0 - success; otherwise file system error code |
3815 | * eax = 0 - success; otherwise file system error code |
3813 | * some subfunctions return value in other registers too |
3816 | * some subfunctions return value in other registers too |
3814 | General format of the information structure: |
3817 | General format of the information structure: |
3815 | * +0: dword: subfunction number |
3818 | * +0: dword: subfunction number |
3816 | * +4: dword: file offset |
3819 | * +4: dword: file offset |
3817 | * +8: dword: high dword of offset (must be 0) or flags field |
3820 | * +8: dword: high dword of offset (must be 0) or flags field |
3818 | * +12 = +0xC: dword: size |
3821 | * +12 = +0xC: dword: size |
3819 | * +16 = +0x10: dword: pointer to data |
3822 | * +16 = +0x10: dword: pointer to data |
3820 | * +20 = +0x14: n db: ASCIIZ-string with the filename |
3823 | * +20 = +0x14: n db: ASCIIZ-string with the filename |
3821 | or |
3824 | or |
3822 | * +20 = +0x14: db 0 |
3825 | * +20 = +0x14: db 0 |
3823 | * +21 = +0x15: dd pointer to ASCIIZ-string with the filename |
3826 | * +21 = +0x15: dd pointer to ASCIIZ-string with the filename |
3824 | Specifications - in documentation on the appropriate subfunction. |
3827 | Specifications - in documentation on the appropriate subfunction. |
3825 | Filename is case-insensitive. Russian letters must be written in |
3828 | Filename is case-insensitive. Russian letters must be written in |
3826 | the encoding cp866 (DOS). |
3829 | the encoding cp866 (DOS). |
3827 | Format of filename: |
3830 | Format of filename: |
3828 | /base/number/dir1/dir2/.../dirn/file, |
3831 | /base/number/dir1/dir2/.../dirn/file, |
3829 | where /base/number identifies device, on which file is located: |
3832 | where /base/number identifies device, on which file is located: |
3830 | one of |
3833 | one of |
3831 | * /RD/1 = /RAMDISK/1 to access ramdisk |
3834 | * /RD/1 = /RAMDISK/1 to access ramdisk |
3832 | * /FD/1 = /FLOPPYDISK/1 to access first floppy drive, |
3835 | * /FD/1 = /FLOPPYDISK/1 to access first floppy drive, |
3833 | /FD/2 = /FLOPPYDISK/2 to access second one |
3836 | /FD/2 = /FLOPPYDISK/2 to access second one |
3834 | * /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices |
3837 | * /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices |
3835 | IDE0 (Primary Master), IDE1 (Primary Slave), |
3838 | IDE0 (Primary Master), IDE1 (Primary Slave), |
3836 | IDE2 (Secondary Master), IDE3 (Secondary Slave); |
3839 | IDE2 (Secondary Master), IDE3 (Secondary Slave); |
3837 | x - partition number on the selected hard drive, varies from 1 |
3840 | x - partition number on the selected hard drive, varies from 1 |
3838 | to 255 (on each hard drive the indexing starts from 1) |
3841 | to 255 (on each hard drive the indexing starts from 1) |
3839 | * /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to |
3842 | * /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to |
3840 | CD on IDE0 (Primary Master), IDE1 (Primary Slave), |
3843 | CD on IDE0 (Primary Master), IDE1 (Primary Slave), |
3841 | IDE2 (Secondary Master), IDE3 (Secondary Slave) |
3844 | IDE2 (Secondary Master), IDE3 (Secondary Slave) |
3842 | * /SYS means system folder; with the usual boot (from floppy) |
3845 | * /SYS means system folder; with the usual boot (from floppy) |
3843 | is equivalent to /RD/1 |
3846 | is equivalent to /RD/1 |
3844 | Examples: |
3847 | Examples: |
3845 | * '/rd/1/kernel.asm',0 |
3848 | * '/rd/1/kernel.asm',0 |
3846 | * '/HD0/1/kernel.asm',0 |
3849 | * '/HD0/1/kernel.asm',0 |
3847 | * '/hd0/2/menuet/pics/tanzania.bmp',0 |
3850 | * '/hd0/2/menuet/pics/tanzania.bmp',0 |
3848 | * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
3851 | * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
3849 | * '/sys/MySuperApp.ini',0 |
3852 | * '/sys/MySuperApp.ini',0 |
3850 | Also function supports relative names. If the path begins not |
3853 | Also function supports relative names. If the path begins not |
3851 | with '/', it is considered relative to a current folder. To get or |
3854 | with '/', it is considered relative to a current folder. To get or |
3852 | set a current folder, use the function 30. |
3855 | set a current folder, use the function 30. |
3853 | 3856 | ||
3854 | Available subfunctions: |
3857 | Available subfunctions: |
3855 | * subfunction 0 - read file |
3858 | * subfunction 0 - read file |
3856 | * subfunction 1 - read folder |
3859 | * subfunction 1 - read folder |
3857 | * subfunction 2 - create/rewrite file |
3860 | * subfunction 2 - create/rewrite file |
3858 | * subfunction 3 - write to existing file |
3861 | * subfunction 3 - write to existing file |
3859 | * subfunction 4 - set file size |
3862 | * subfunction 4 - set file size |
3860 | * subfunction 5 - get attributes of file/folder |
3863 | * subfunction 5 - get attributes of file/folder |
3861 | * subfunction 6 - set attributes of file/folder |
3864 | * subfunction 6 - set attributes of file/folder |
3862 | * subfunction 7 - start application |
3865 | * subfunction 7 - start application |
3863 | * subfunction 8 - delete file/folder |
3866 | * subfunction 8 - delete file/folder |
3864 | * subfunction 9 - create folder |
3867 | * subfunction 9 - create folder |
3865 | For CD-drives due to hardware limitations only subfunctions |
3868 | For CD-drives due to hardware limitations only subfunctions |
3866 | 0,1,5 and 7 are available, other subfunctions return error |
3869 | 0,1,5 and 7 are available, other subfunctions return error |
3867 | with code 2. |
3870 | with code 2. |
3868 | At the first call of subfunctions 0,1,5,7 to ATAPI devices |
3871 | At the first call of subfunctions 0,1,5,7 to ATAPI devices |
3869 | (CD and DVD) the manual control of tray is locked due to caching |
3872 | (CD and DVD) the manual control of tray is locked due to caching |
3870 | drive data. Unlocking is made when subfunction 4 of function 24 |
3873 | drive data. Unlocking is made when subfunction 4 of function 24 |
3871 | is called for corresponding device. |
3874 | is called for corresponding device. |
3872 | 3875 | ||
3873 | ---------------------- Constants for registers: ---------------------- |
3876 | ---------------------- Constants for registers: ---------------------- |
3874 | eax - SF_FILE (70) |
3877 | eax - SF_FILE (70) |
3875 | [ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2), |
3878 | [ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2), |
3876 | SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5), |
3879 | SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5), |
3877 | SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8), |
3880 | SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8), |
3878 | SSF_CREATE_FOLDER (9) |
3881 | SSF_CREATE_FOLDER (9) |
3879 | ====================================================================== |
3882 | ====================================================================== |
3880 | === Function 70, subfunction 0 - read file with long names support. == |
3883 | === Function 70, subfunction 0 - read file with long names support. == |
3881 | ====================================================================== |
3884 | ====================================================================== |
3882 | Parameters: |
3885 | Parameters: |
3883 | * eax = 70 - function number |
3886 | * eax = 70 - function number |
3884 | * ebx = pointer to the information structure |
3887 | * ebx = pointer to the information structure |
3885 | Format of the information structure: |
3888 | Format of the information structure: |
3886 | * +0: dword: 0 = subfunction number |
3889 | * +0: dword: 0 = subfunction number |
3887 | * +4: dword: file offset (in bytes) |
3890 | * +4: dword: file offset (in bytes) |
3888 | * +8: dword: 0 (reserved for high dword of offset) |
3891 | * +8: dword: 0 (reserved for high dword of offset) |
3889 | * +12 = +0xC: dword: number of bytes to read |
3892 | * +12 = +0xC: dword: number of bytes to read |
3890 | * +16 = +0x10: dword: pointer to buffer for data |
3893 | * +16 = +0x10: dword: pointer to buffer for data |
3891 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
3894 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
3892 | given in the general description |
3895 | given in the general description |
3893 | or |
3896 | or |
3894 | * +20 = +0x14: db 0 |
3897 | * +20 = +0x14: db 0 |
3895 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
3898 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
3896 | Returned value: |
3899 | Returned value: |
3897 | * eax = 0 - success, otherwise file system error code |
3900 | * eax = 0 - success, otherwise file system error code |
3898 | * ebx = number of read bytes or -1=0xffffffff if file was not found |
3901 | * ebx = number of read bytes or -1=0xffffffff if file was not found |
3899 | Remarks: |
3902 | Remarks: |
3900 | * If file was ended before last requested block was read, |
3903 | * If file was ended before last requested block was read, |
3901 | the function will read as many as it can, and after that return |
3904 | the function will read as many as it can, and after that return |
3902 | eax=6 (EOF). |
3905 | eax=6 (EOF). |
3903 | * The function does not allow to read folder (returns eax=10, |
3906 | * The function does not allow to read folder (returns eax=10, |
3904 | access denied). |
3907 | access denied). |
3905 | 3908 | ||
3906 | ---------------------- Constants for registers: ---------------------- |
3909 | ---------------------- Constants for registers: ---------------------- |
3907 | eax - SF_FILE (70) |
3910 | eax - SF_FILE (70) |
3908 | [ebx] - SSF_READ_FILE (0) |
3911 | [ebx] - SSF_READ_FILE (0) |
3909 | ====================================================================== |
3912 | ====================================================================== |
3910 | == Function 70, subfunction 1 - read folder with long names support. = |
3913 | == Function 70, subfunction 1 - read folder with long names support. = |
3911 | ====================================================================== |
3914 | ====================================================================== |
3912 | Parameters: |
3915 | Parameters: |
3913 | * eax = 70 - function number |
3916 | * eax = 70 - function number |
3914 | * ebx = pointer to the information structure |
3917 | * ebx = pointer to the information structure |
3915 | Format of the information structure: |
3918 | Format of the information structure: |
3916 | * +0: dword: 1 = subfunction number |
3919 | * +0: dword: 1 = subfunction number |
3917 | * +4: dword: index of starting block (beginning from 0) |
3920 | * +4: dword: index of starting block (beginning from 0) |
3918 | * +8: dword: flags field: |
3921 | * +8: dword: flags field: |
3919 | * bit 0 (mask 1): in what format to return names, |
3922 | * bit 0 (mask 1): in what format to return names, |
3920 | 0=ANSI, 1=UNICODE |
3923 | 0=ANSI, 1=UNICODE |
3921 | * other bits are reserved and must be set to 0 for the future |
3924 | * other bits are reserved and must be set to 0 for the future |
3922 | compatibility |
3925 | compatibility |
3923 | * +12 = +0xC: dword: number of blocks to read |
3926 | * +12 = +0xC: dword: number of blocks to read |
3924 | * +16 = +0x10: dword: pointer to buffer for data, buffer size |
3927 | * +16 = +0x10: dword: pointer to buffer for data, buffer size |
3925 | must be not less than 32 + [+12]*560 bytes |
3928 | must be not less than 32 + [+12]*560 bytes |
3926 | * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are |
3929 | * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are |
3927 | given in the general description |
3930 | given in the general description |
3928 | or |
3931 | or |
3929 | * +20 = +0x14: db 0 |
3932 | * +20 = +0x14: db 0 |
3930 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
3933 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
3931 | Returned value: |
3934 | Returned value: |
3932 | * eax = 0 - success, otherwise file system error code |
3935 | * eax = 0 - success, otherwise file system error code |
3933 | * ebx = number of files, information on which was written to |
3936 | * ebx = number of files, information on which was written to |
3934 | the buffer, or -1=0xffffffff, if folder was not found |
3937 | the buffer, or -1=0xffffffff, if folder was not found |
3935 | Structure of the buffer: |
3938 | Structure of the buffer: |
3936 | * +0: 32*byte: header |
3939 | * +0: 32*byte: header |
3937 | * +32 = +0x20: n1*byte: block with information on file 1 |
3940 | * +32 = +0x20: n1*byte: block with information on file 1 |
3938 | * +32+n1: n2*byte: block with information on file 2 |
3941 | * +32+n1: n2*byte: block with information on file 2 |
3939 | * ... |
3942 | * ... |
3940 | Structure of header: |
3943 | Structure of header: |
3941 | * +0: dword: version of structure (current is 1) |
3944 | * +0: dword: version of structure (current is 1) |
3942 | * +4: dword: number of placed blocks; is not greater than requested |
3945 | * +4: dword: number of placed blocks; is not greater than requested |
3943 | in the field +12 of information structure; can be less, if |
3946 | in the field +12 of information structure; can be less, if |
3944 | there are no more files in folder (the same as in ebx) |
3947 | there are no more files in folder (the same as in ebx) |
3945 | * +8: dword: total number of files in folder |
3948 | * +8: dword: total number of files in folder |
3946 | * +12 = +0xC: 20*byte: reserved (zeroed) |
3949 | * +12 = +0xC: 20*byte: reserved (zeroed) |
3947 | Structure of block of data for folder entry (BDFE): |
3950 | Structure of block of data for folder entry (BDFE): |
3948 | * +0: dword: attributes of file: |
3951 | * +0: dword: attributes of file: |
3949 | * bit 0 (mask 1): file is read-only |
3952 | * bit 0 (mask 1): file is read-only |
3950 | * bit 1 (mask 2): file is hidden |
3953 | * bit 1 (mask 2): file is hidden |
3951 | * bit 2 (mask 4): file is system |
3954 | * bit 2 (mask 4): file is system |
3952 | * bit 3 (mask 8): this is not a file but volume label |
3955 | * bit 3 (mask 8): this is not a file but volume label |
3953 | (for one partition meets no more than once and |
3956 | (for one partition meets no more than once and |
3954 | only in root folder) |
3957 | only in root folder) |
3955 | * bit 4 (mask 0x10): this is a folder |
3958 | * bit 4 (mask 0x10): this is a folder |
3956 | * bit 5 (mask 0x20): file was not archived - many archivation |
3959 | * bit 5 (mask 0x20): file was not archived - many archivation |
3957 | programs have an option to archive only files with this bit set, |
3960 | programs have an option to archive only files with this bit set, |
3958 | and after archiving this bit is cleared - it can be useful |
3961 | and after archiving this bit is cleared - it can be useful |
3959 | for automatically creating of backup-archives as at writing |
3962 | for automatically creating of backup-archives as at writing |
3960 | this bit is usually set |
3963 | this bit is usually set |
3961 | * +4: byte: type of name data: |
3964 | * +4: byte: type of name data: |
3962 | (coincides with bit 0 of flags in the information structure) |
3965 | (coincides with bit 0 of flags in the information structure) |
3963 | * 0 = ASCII = 1-byte representation of each character |
3966 | * 0 = ASCII = 1-byte representation of each character |
3964 | * 1 = UNICODE = 2-byte representation of each character |
3967 | * 1 = UNICODE = 2-byte representation of each character |
3965 | * +5: 3*byte: reserved (zero) |
3968 | * +5: 3*byte: reserved (zero) |
3966 | * +8: 4*byte: time of file creation |
3969 | * +8: 4*byte: time of file creation |
3967 | * +12 = +0xC: 4*byte: date of file creation |
3970 | * +12 = +0xC: 4*byte: date of file creation |
3968 | * +16 = +0x10: 4*byte: time of last access (read or write) |
3971 | * +16 = +0x10: 4*byte: time of last access (read or write) |
3969 | * +20 = +0x14: 4*byte: date of last access |
3972 | * +20 = +0x14: 4*byte: date of last access |
3970 | * +24 = +0x18: 4*byte: time of last modification |
3973 | * +24 = +0x18: 4*byte: time of last modification |
3971 | * +28 = +0x1C: 4*byte: date of last modification |
3974 | * +28 = +0x1C: 4*byte: date of last modification |
3972 | * +32 = +0x20: qword: file size in bytes (up to 16777216 Tb) |
3975 | * +32 = +0x20: qword: file size in bytes (up to 16777216 Tb) |
3973 | * +40 = +0x28: name |
3976 | * +40 = +0x28: name |
3974 | * for ASCII format: maximum length is 263 characters |
3977 | * for ASCII format: maximum length is 263 characters |
3975 | (263 bytes), byte after the name has value 0 |
3978 | (263 bytes), byte after the name has value 0 |
3976 | * for UNICODE format: maximum length is 259 characters |
3979 | * for UNICODE format: maximum length is 259 characters |
3977 | (518 bytes), 2 bytes after the name have value 0 |
3980 | (518 bytes), 2 bytes after the name have value 0 |
3978 | Time format: |
3981 | Time format: |
3979 | * +0: byte: seconds |
3982 | * +0: byte: seconds |
3980 | * +1: byte: minutes |
3983 | * +1: byte: minutes |
3981 | * +2: byte: hours |
3984 | * +2: byte: hours |
3982 | * +3: byte: reserved (0) |
3985 | * +3: byte: reserved (0) |
3983 | * for example, 23.59.59 is written as (in hex) 3B 3B 17 00 |
3986 | * for example, 23.59.59 is written as (in hex) 3B 3B 17 00 |
3984 | Date format: |
3987 | Date format: |
3985 | * +0: byte: day |
3988 | * +0: byte: day |
3986 | * +1: byte: month |
3989 | * +1: byte: month |
3987 | * +2: word: year |
3990 | * +2: word: year |
3988 | * for example, 25.11.1979 is written as (in hex) 19 0B BB 07 |
3991 | * for example, 25.11.1979 is written as (in hex) 19 0B BB 07 |
3989 | Remarks: |
3992 | Remarks: |
3990 | * If BDFE contains ASCII name, the length of BDFE is 304 bytes, |
3993 | * If BDFE contains ASCII name, the length of BDFE is 304 bytes, |
3991 | if UNICODE name - 560 bytes. Value of length is aligned |
3994 | if UNICODE name - 560 bytes. Value of length is aligned |
3992 | on 16-byte bound (to accelerate processing in CPU cache). |
3995 | on 16-byte bound (to accelerate processing in CPU cache). |
3993 | * First character after a name is zero (ASCIIZ-string). The further |
3996 | * First character after a name is zero (ASCIIZ-string). The further |
3994 | data contain garbage. |
3997 | data contain garbage. |
3995 | * If files in folder were ended before requested number was read, |
3998 | * If files in folder were ended before requested number was read, |
3996 | the function will read as many as it can, and after that return |
3999 | the function will read as many as it can, and after that return |
3997 | eax=6 (EOF). |
4000 | eax=6 (EOF). |
3998 | * Any folder on the disk, except for root, contains two special |
4001 | * Any folder on the disk, except for root, contains two special |
3999 | entries "." and "..", identifying accordingly the folder itself |
4002 | entries "." and "..", identifying accordingly the folder itself |
4000 | and the parent folder. |
4003 | and the parent folder. |
4001 | * The function allows also to read virtual folders "/", "/rd", |
4004 | * The function allows also to read virtual folders "/", "/rd", |
4002 | "/fd", "/hd[n]", thus attributes of subfolders are set to 0x10, |
4005 | "/fd", "/hd[n]", thus attributes of subfolders are set to 0x10, |
4003 | and times and dates are zeroed. An alternative way to get the |
4006 | and times and dates are zeroed. An alternative way to get the |
4004 | equipment information - subfunction 11 of function 18. |
4007 | equipment information - subfunction 11 of function 18. |
4005 | 4008 | ||
4006 | ---------------------- Constants for registers: ---------------------- |
4009 | ---------------------- Constants for registers: ---------------------- |
4007 | eax - SF_FILE (70) |
4010 | eax - SF_FILE (70) |
4008 | [ebx] - SSF_READ_FOLDER (1) |
4011 | [ebx] - SSF_READ_FOLDER (1) |
4009 | ====================================================================== |
4012 | ====================================================================== |
4010 | ===================== Function 70, subfunction 2 ===================== |
4013 | ===================== Function 70, subfunction 2 ===================== |
4011 | ============ Create/rewrite file with long names support. ============ |
4014 | ============ Create/rewrite file with long names support. ============ |
4012 | ====================================================================== |
4015 | ====================================================================== |
4013 | Parameters: |
4016 | Parameters: |
4014 | * eax = 70 - function number |
4017 | * eax = 70 - function number |
4015 | * ebx = pointer to the information structure |
4018 | * ebx = pointer to the information structure |
4016 | Format of the information structure: |
4019 | Format of the information structure: |
4017 | * +0: dword: 2 = subfunction number |
4020 | * +0: dword: 2 = subfunction number |
4018 | * +4: dword: 0 (reserved) |
4021 | * +4: dword: 0 (reserved) |
4019 | * +8: dword: 0 (reserved) |
4022 | * +8: dword: 0 (reserved) |
4020 | * +12 = +0xC: dword: number of bytes to write |
4023 | * +12 = +0xC: dword: number of bytes to write |
4021 | * +16 = +0x10: dword: pointer to data |
4024 | * +16 = +0x10: dword: pointer to data |
4022 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4025 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4023 | given in the general description |
4026 | given in the general description |
4024 | or |
4027 | or |
4025 | * +20 = +0x14: db 0 |
4028 | * +20 = +0x14: db 0 |
4026 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4029 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4027 | Returned value: |
4030 | Returned value: |
4028 | * eax = 0 - success, otherwise file system error code |
4031 | * eax = 0 - success, otherwise file system error code |
4029 | * ebx = number of written bytes (possibly 0) |
4032 | * ebx = number of written bytes (possibly 0) |
4030 | Remarks: |
4033 | Remarks: |
4031 | * If a file with given name did not exist, it is created; |
4034 | * If a file with given name did not exist, it is created; |
4032 | if it existed, it is rewritten. |
4035 | if it existed, it is rewritten. |
4033 | * If there is not enough free space on disk, the function will |
4036 | * If there is not enough free space on disk, the function will |
4034 | write as many as can and then return error code 8. |
4037 | write as many as can and then return error code 8. |
4035 | * The function is not supported for CD (returns error code 2). |
4038 | * The function is not supported for CD (returns error code 2). |
4036 | 4039 | ||
4037 | ---------------------- Constants for registers: ---------------------- |
4040 | ---------------------- Constants for registers: ---------------------- |
4038 | eax - SF_FILE (70) |
4041 | eax - SF_FILE (70) |
4039 | [ebx] - SSF_CREATE_FILE (2) |
4042 | [ebx] - SSF_CREATE_FILE (2) |
4040 | ====================================================================== |
4043 | ====================================================================== |
4041 | ===================== Function 70, subfunction 3 ===================== |
4044 | ===================== Function 70, subfunction 3 ===================== |
4042 | =========== Write to existing file with long names support. ========== |
4045 | =========== Write to existing file with long names support. ========== |
4043 | ====================================================================== |
4046 | ====================================================================== |
4044 | Parameters: |
4047 | Parameters: |
4045 | * eax = 70 - function number |
4048 | * eax = 70 - function number |
4046 | * ebx = pointer to the information structure |
4049 | * ebx = pointer to the information structure |
4047 | Format of the information structure: |
4050 | Format of the information structure: |
4048 | * +0: dword: 3 = subfunction number |
4051 | * +0: dword: 3 = subfunction number |
4049 | * +4: dword: file offset (in bytes) |
4052 | * +4: dword: file offset (in bytes) |
4050 | * +8: dword: high dword of offset (must be 0 for FAT) |
4053 | * +8: dword: high dword of offset (must be 0 for FAT) |
4051 | * +12 = +0xC: dword: number of bytes to write |
4054 | * +12 = +0xC: dword: number of bytes to write |
4052 | * +16 = +0x10: dword: pointer to data |
4055 | * +16 = +0x10: dword: pointer to data |
4053 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4056 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4054 | given in the general description |
4057 | given in the general description |
4055 | or |
4058 | or |
4056 | * +20 = +0x14: db 0 |
4059 | * +20 = +0x14: db 0 |
4057 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4060 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4058 | Returned value: |
4061 | Returned value: |
4059 | * eax = 0 - success, otherwise file system error code |
4062 | * eax = 0 - success, otherwise file system error code |
4060 | * ebx = number of written bytes (possibly 0) |
4063 | * ebx = number of written bytes (possibly 0) |
4061 | Remarks: |
4064 | Remarks: |
4062 | * The file must already exist, otherwise function returns eax=5. |
4065 | * The file must already exist, otherwise function returns eax=5. |
4063 | * The only result of write 0 bytes is update in the file attributes |
4066 | * The only result of write 0 bytes is update in the file attributes |
4064 | date/time of modification and access to the current date/time. |
4067 | date/time of modification and access to the current date/time. |
4065 | * If beginning and/or ending position is greater than file size |
4068 | * If beginning and/or ending position is greater than file size |
4066 | (except for the previous case), the file is expanded to needed |
4069 | (except for the previous case), the file is expanded to needed |
4067 | size with zero characters. |
4070 | size with zero characters. |
4068 | * The function is not supported for CD (returns error code 2). |
4071 | * The function is not supported for CD (returns error code 2). |
4069 | 4072 | ||
4070 | ---------------------- Constants for registers: ---------------------- |
4073 | ---------------------- Constants for registers: ---------------------- |
4071 | eax - SF_FILE (70) |
4074 | eax - SF_FILE (70) |
4072 | [ebx] - SSF_WRITE_FILE (3) |
4075 | [ebx] - SSF_WRITE_FILE (3) |
4073 | ====================================================================== |
4076 | ====================================================================== |
4074 | ============ Function 70, subfunction 4 - set end of file. =========== |
4077 | ============ Function 70, subfunction 4 - set end of file. =========== |
4075 | ====================================================================== |
4078 | ====================================================================== |
4076 | Parameters: |
4079 | Parameters: |
4077 | * eax = 70 - function number |
4080 | * eax = 70 - function number |
4078 | * ebx = pointer to the information structure |
4081 | * ebx = pointer to the information structure |
4079 | Format of the information structure: |
4082 | Format of the information structure: |
4080 | * +0: dword: 4 = subfunction number |
4083 | * +0: dword: 4 = subfunction number |
4081 | * +4: dword: low dword of new file size |
4084 | * +4: dword: low dword of new file size |
4082 | * +8: dword: high dword of new file size (must be 0 for FAT) |
4085 | * +8: dword: high dword of new file size (must be 0 for FAT) |
4083 | * +12 = +0xC: dword: 0 (reserved) |
4086 | * +12 = +0xC: dword: 0 (reserved) |
4084 | * +16 = +0x10: dword: 0 (reserved) |
4087 | * +16 = +0x10: dword: 0 (reserved) |
4085 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4088 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4086 | given in the general description |
4089 | given in the general description |
4087 | or |
4090 | or |
4088 | * +20 = +0x14: db 0 |
4091 | * +20 = +0x14: db 0 |
4089 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4092 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4090 | Returned value: |
4093 | Returned value: |
4091 | * eax = 0 - success, otherwise file system error code |
4094 | * eax = 0 - success, otherwise file system error code |
4092 | * ebx destroyed |
4095 | * ebx destroyed |
4093 | Remarks: |
4096 | Remarks: |
4094 | * If the new file size is less than old one, file is truncated. |
4097 | * If the new file size is less than old one, file is truncated. |
4095 | If the new size is greater than old one, file is expanded with |
4098 | If the new size is greater than old one, file is expanded with |
4096 | characters with code 0. If the new size is equal to old one, |
4099 | characters with code 0. If the new size is equal to old one, |
4097 | the only result of call is set date/time of modification and |
4100 | the only result of call is set date/time of modification and |
4098 | access to the current date/time. |
4101 | access to the current date/time. |
4099 | * If there is not enough free space on disk for expansion, the |
4102 | * If there is not enough free space on disk for expansion, the |
4100 | function will expand to maximum possible size and then return |
4103 | function will expand to maximum possible size and then return |
4101 | error code 8. |
4104 | error code 8. |
4102 | * The function is not supported for CD (returns error code 2). |
4105 | * The function is not supported for CD (returns error code 2). |
4103 | 4106 | ||
4104 | ---------------------- Constants for registers: ---------------------- |
4107 | ---------------------- Constants for registers: ---------------------- |
4105 | eax - SF_FILE (70) |
4108 | eax - SF_FILE (70) |
4106 | [ebx] - SSF_SET_END (4) |
4109 | [ebx] - SSF_SET_END (4) |
4107 | ====================================================================== |
4110 | ====================================================================== |
4108 | ==== Function 70, subfunction 5 - get information on file/folder. ==== |
4111 | ==== Function 70, subfunction 5 - get information on file/folder. ==== |
4109 | ====================================================================== |
4112 | ====================================================================== |
4110 | Parameters: |
4113 | Parameters: |
4111 | * eax = 70 - function number |
4114 | * eax = 70 - function number |
4112 | * ebx = pointer to the information structure |
4115 | * ebx = pointer to the information structure |
4113 | Format of the information structure: |
4116 | Format of the information structure: |
4114 | * +0: dword: 5 = subfunction number |
4117 | * +0: dword: 5 = subfunction number |
4115 | * +4: dword: 0 (reserved) |
4118 | * +4: dword: 0 (reserved) |
4116 | * +8: dword: 0 (reserved) |
4119 | * +8: dword: 0 (reserved) |
4117 | * +12 = +0xC: dword: 0 (reserved) |
4120 | * +12 = +0xC: dword: 0 (reserved) |
4118 | * +16 = +0x10: dword: pointer to buffer for data (40 bytes) |
4121 | * +16 = +0x10: dword: pointer to buffer for data (40 bytes) |
4119 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4122 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4120 | given in the general description |
4123 | given in the general description |
4121 | or |
4124 | or |
4122 | * +20 = +0x14: db 0 |
4125 | * +20 = +0x14: db 0 |
4123 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4126 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4124 | Returned value: |
4127 | Returned value: |
4125 | * eax = 0 - success, otherwise file system error code |
4128 | * eax = 0 - success, otherwise file system error code |
4126 | * ebx destroyed |
4129 | * ebx destroyed |
4127 | Information on file is returned in the BDFE format (block of data |
4130 | Information on file is returned in the BDFE format (block of data |
4128 | for folder entry), explained in the description of |
4131 | for folder entry), explained in the description of |
4129 | subfunction 1, but without filename |
4132 | subfunction 1, but without filename |
4130 | (i.e. only first 40 = 0x28 bytes). |
4133 | (i.e. only first 40 = 0x28 bytes). |
4131 | Remarks: |
4134 | Remarks: |
4132 | * The function does not support virtual folders such as /, /rd and |
4135 | * The function does not support virtual folders such as /, /rd and |
4133 | root folders like /rd/1. |
4136 | root folders like /rd/1. |
4134 | 4137 | ||
4135 | ---------------------- Constants for registers: ---------------------- |
4138 | ---------------------- Constants for registers: ---------------------- |
4136 | eax - SF_FILE (70) |
4139 | eax - SF_FILE (70) |
4137 | [ebx] - SSF_GET_INFO (5) |
4140 | [ebx] - SSF_GET_INFO (5) |
4138 | ====================================================================== |
4141 | ====================================================================== |
4139 | ===== Function 70, subfunction 6 - set attributes of file/folder. ==== |
4142 | ===== Function 70, subfunction 6 - set attributes of file/folder. ==== |
4140 | ====================================================================== |
4143 | ====================================================================== |
4141 | Parameters: |
4144 | Parameters: |
4142 | * eax = 70 - function number |
4145 | * eax = 70 - function number |
4143 | * ebx = pointer to the information structure |
4146 | * ebx = pointer to the information structure |
4144 | Format of the information structure: |
4147 | Format of the information structure: |
4145 | * +0: dword: 6 = subfunction number |
4148 | * +0: dword: 6 = subfunction number |
4146 | * +4: dword: 0 (reserved) |
4149 | * +4: dword: 0 (reserved) |
4147 | * +8: dword: 0 (reserved) |
4150 | * +8: dword: 0 (reserved) |
4148 | * +12 = +0xC: dword: 0 (reserved) |
4151 | * +12 = +0xC: dword: 0 (reserved) |
4149 | * +16 = +0x10: dword: pointer to buffer with attributes (32 bytes) |
4152 | * +16 = +0x10: dword: pointer to buffer with attributes (32 bytes) |
4150 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4153 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4151 | given in the general description |
4154 | given in the general description |
4152 | or |
4155 | or |
4153 | * +20 = +0x14: db 0 |
4156 | * +20 = +0x14: db 0 |
4154 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4157 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4155 | Returned value: |
4158 | Returned value: |
4156 | * eax = 0 - success, otherwise file system error code |
4159 | * eax = 0 - success, otherwise file system error code |
4157 | * ebx destroyed |
4160 | * ebx destroyed |
4158 | File attributes are first 32 bytes in BDFE (block of data |
4161 | File attributes are first 32 bytes in BDFE (block of data |
4159 | for folder entry), explained in the description of subfunction 1 |
4162 | for folder entry), explained in the description of subfunction 1 |
4160 | (that is, without name and size of file). Attribute |
4163 | (that is, without name and size of file). Attribute |
4161 | file/folder/volume label (bits 3,4 in dword +0) is not changed. |
4164 | file/folder/volume label (bits 3,4 in dword +0) is not changed. |
4162 | Byte +4 (name format) is ignored. |
4165 | Byte +4 (name format) is ignored. |
4163 | Remarks: |
4166 | Remarks: |
4164 | * The function does not support virtual folders such as /, /rd and |
4167 | * The function does not support virtual folders such as /, /rd and |
4165 | root folders like /rd/1. |
4168 | root folders like /rd/1. |
4166 | * The function is not supported for CD (returns error code 2). |
4169 | * The function is not supported for CD (returns error code 2). |
4167 | 4170 | ||
4168 | ---------------------- Constants for registers: ---------------------- |
4171 | ---------------------- Constants for registers: ---------------------- |
4169 | eax - SF_FILE (70) |
4172 | eax - SF_FILE (70) |
4170 | [ebx] - SSF_SET_INFO (6) |
4173 | [ebx] - SSF_SET_INFO (6) |
4171 | ====================================================================== |
4174 | ====================================================================== |
4172 | =========== Function 70, subfunction 7 - start application. ========== |
4175 | =========== Function 70, subfunction 7 - start application. ========== |
4173 | ====================================================================== |
4176 | ====================================================================== |
4174 | Parameters: |
4177 | Parameters: |
4175 | * eax = 70 - function number |
4178 | * eax = 70 - function number |
4176 | * ebx = pointer to the information structure |
4179 | * ebx = pointer to the information structure |
4177 | Format of the information structure: |
4180 | Format of the information structure: |
4178 | * +0: dword: 7 = subfunction number |
4181 | * +0: dword: 7 = subfunction number |
4179 | * +4: dword: flags field: |
4182 | * +4: dword: flags field: |
4180 | * bit 0: start process as debugged |
4183 | * bit 0: start process as debugged |
4181 | * other bits are reserved and must be set to 0 |
4184 | * other bits are reserved and must be set to 0 |
4182 | * +8: dword: 0 or pointer to ASCIIZ-string with parameters |
4185 | * +8: dword: 0 or pointer to ASCIIZ-string with parameters |
4183 | * +12 = +0xC: dword: 0 (reserved) |
4186 | * +12 = +0xC: dword: 0 (reserved) |
4184 | * +16 = +0x10: dword: 0 (reserved) |
4187 | * +16 = +0x10: dword: 0 (reserved) |
4185 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4188 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4186 | given in the general description |
4189 | given in the general description |
4187 | or |
4190 | or |
4188 | * +20 = +0x14: db 0 |
4191 | * +20 = +0x14: db 0 |
4189 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4192 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4190 | Returned value: |
4193 | Returned value: |
4191 | * eax > 0 - program is loaded, eax contains PID |
4194 | * eax > 0 - program is loaded, eax contains PID |
4192 | * eax < 0 - an error has occured, -eax contains |
4195 | * eax < 0 - an error has occured, -eax contains |
4193 | file system error code |
4196 | file system error code |
4194 | * ebx destroyed |
4197 | * ebx destroyed |
4195 | Remarks: |
4198 | Remarks: |
4196 | * Command line must be terminated by the character with the code 0 |
4199 | * Command line must be terminated by the character with the code 0 |
4197 | (ASCIIZ-string); function takes into account either all characters |
4200 | (ASCIIZ-string); function takes into account either all characters |
4198 | up to terminating zero inclusively or first 256 character |
4201 | up to terminating zero inclusively or first 256 character |
4199 | regarding what is less. |
4202 | regarding what is less. |
4200 | * If the process is started as debugged, it is created in |
4203 | * If the process is started as debugged, it is created in |
4201 | the suspended state; to run use subfunction 5 of function 69. |
4204 | the suspended state; to run use subfunction 5 of function 69. |
4202 | 4205 | ||
4203 | ---------------------- Constants for registers: ---------------------- |
4206 | ---------------------- Constants for registers: ---------------------- |
4204 | eax - SF_FILE (70) |
4207 | eax - SF_FILE (70) |
4205 | [ebx] - SSF_START_APP (7) |
4208 | [ebx] - SSF_START_APP (7) |
4206 | ====================================================================== |
4209 | ====================================================================== |
4207 | ========== Function 70, subfunction 8 - delete file/folder. ========== |
4210 | ========== Function 70, subfunction 8 - delete file/folder. ========== |
4208 | ====================================================================== |
4211 | ====================================================================== |
4209 | Parameters: |
4212 | Parameters: |
4210 | * eax = 70 - function number |
4213 | * eax = 70 - function number |
4211 | * ebx = pointer to the information structure |
4214 | * ebx = pointer to the information structure |
4212 | Format of the information structure: |
4215 | Format of the information structure: |
4213 | * +0: dword: 8 = subfunction number |
4216 | * +0: dword: 8 = subfunction number |
4214 | * +4: dword: 0 (reserved) |
4217 | * +4: dword: 0 (reserved) |
4215 | * +8: dword: 0 (reserved) |
4218 | * +8: dword: 0 (reserved) |
4216 | * +12 = +0xC: dword: 0 (reserved) |
4219 | * +12 = +0xC: dword: 0 (reserved) |
4217 | * +16 = +0x10: dword: 0 (reserved) |
4220 | * +16 = +0x10: dword: 0 (reserved) |
4218 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4221 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
4219 | given in the general description |
4222 | given in the general description |
4220 | or |
4223 | or |
4221 | * +20 = +0x14: db 0 |
4224 | * +20 = +0x14: db 0 |
4222 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4225 | * +21 = +0x15: dd pointer to ASCIIZ-string with file name |
4223 | Returned value: |
4226 | Returned value: |
4224 | * eax = 0 - success, otherwise file system error code |
4227 | * eax = 0 - success, otherwise file system error code |
4225 | * ebx destroyed |
4228 | * ebx destroyed |
4226 | Remarks: |
4229 | Remarks: |
4227 | * The function is not supported for CD (returns error code 2). |
4230 | * The function is not supported for CD (returns error code 2). |
4228 | * The function can delete only empty folders (attempt to delete |
4231 | * The function can delete only empty folders (attempt to delete |
4229 | nonempty folder results in error with code 10, "access denied"). |
4232 | nonempty folder results in error with code 10, "access denied"). |
4230 | 4233 | ||
4231 | ---------------------- Constants for registers: ---------------------- |
4234 | ---------------------- Constants for registers: ---------------------- |
4232 | eax - SF_FILE (70) |
4235 | eax - SF_FILE (70) |
4233 | [ebx] - SSF_DELETE (8) |
4236 | [ebx] - SSF_DELETE (8) |
4234 | ====================================================================== |
4237 | ====================================================================== |
4235 | ============= Function 70, subfunction 9 - create folder. ============ |
4238 | ============= Function 70, subfunction 9 - create folder. ============ |
4236 | ====================================================================== |
4239 | ====================================================================== |
4237 | Parameters: |
4240 | Parameters: |
4238 | * eax = 70 - function number |
4241 | * eax = 70 - function number |
4239 | * ebx = pointer to the information structure |
4242 | * ebx = pointer to the information structure |
4240 | Format of the information structure: |
4243 | Format of the information structure: |
4241 | * +0: dword: 9 = subfunction number |
4244 | * +0: dword: 9 = subfunction number |
4242 | * +4: dword: 0 (reserved) |
4245 | * +4: dword: 0 (reserved) |
4243 | * +8: dword: 0 (reserved) |
4246 | * +8: dword: 0 (reserved) |
4244 | * +12 = +0xC: dword: 0 (reserved) |
4247 | * +12 = +0xC: dword: 0 (reserved) |
4245 | * +16 = +0x10: dword: 0 (reserved) |
4248 | * +16 = +0x10: dword: 0 (reserved) |
4246 | * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are |
4249 | * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are |
4247 | given in the general description |
4250 | given in the general description |
4248 | or |
4251 | or |
4249 | * +20 = +0x14: db 0 |
4252 | * +20 = +0x14: db 0 |
4250 | * +21 = +0x15: dd pointer to ASCIIZ-string with folder name |
4253 | * +21 = +0x15: dd pointer to ASCIIZ-string with folder name |
4251 | Returned value: |
4254 | Returned value: |
4252 | * eax = 0 - success, otherwise file system error code |
4255 | * eax = 0 - success, otherwise file system error code |
4253 | * ebx destroyed |
4256 | * ebx destroyed |
4254 | Remarks: |
4257 | Remarks: |
4255 | * The function is not supported for CD (returns error code 2). |
4258 | * The function is not supported for CD (returns error code 2). |
4256 | * The parent folder must already exist. |
4259 | * The parent folder must already exist. |
4257 | * If target folder already exists, function returns success (eax=0). |
4260 | * If target folder already exists, function returns success (eax=0). |
4258 | 4261 | ||
4259 | ---------------------- Constants for registers: ---------------------- |
4262 | ---------------------- Constants for registers: ---------------------- |
4260 | eax - SF_FILE (70) |
4263 | eax - SF_FILE (70) |
4261 | [ebx] - SSF_CREATE_FOLDER (9) |
4264 | [ebx] - SSF_CREATE_FOLDER (9) |
4262 | ====================================================================== |
4265 | ====================================================================== |
4263 | ========== Function 71, subfunction 1 - set window caption. ========== |
4266 | ========== Function 71, subfunction 1 - set window caption. ========== |
4264 | ====================================================================== |
4267 | ====================================================================== |
4265 | Parameters: |
4268 | Parameters: |
4266 | * eax = 71 - function number |
4269 | * eax = 71 - function number |
4267 | * ebx = 1 - subfunction number |
4270 | * ebx = 1 - subfunction number |
4268 | * ecx = pointer to zero terminated string |
4271 | * ecx = pointer to zero terminated string |
4269 | Returned value: |
4272 | Returned value: |
4270 | * function does not return value |
4273 | * function does not return value |
4271 | Remarks: |
4274 | Remarks: |
4272 | * You may set the caption string encoding by putting |
4275 | * You may set the caption string encoding by putting |
4273 | at the start of the string a byte with next values: |
4276 | at the start of the string a byte with next values: |
4274 | 1 = cp866 |
4277 | 1 = cp866 |
4275 | 2 = UTF-16LE |
4278 | 2 = UTF-16LE |
4276 | 3 = UTF-8 |
4279 | 3 = UTF-8 |
4277 | otherwise will be used cp866. |
4280 | otherwise will be used cp866. |
4278 | * Pass NULL in ecx to remove caption. |
4281 | * Pass NULL in ecx to remove caption. |
4279 | 4282 | ||
4280 | ---------------------- Constants for registers: ---------------------- |
4283 | ---------------------- Constants for registers: ---------------------- |
4281 | eax - SF_SET_CAPTION (71) |
4284 | eax - SF_SET_CAPTION (71) |
4282 | ====================================================================== |
4285 | ====================================================================== |
4283 | =============== Function 72 - send message to a window. ============== |
4286 | =============== Function 72 - send message to a window. ============== |
4284 | ====================================================================== |
4287 | ====================================================================== |
4285 | 4288 | ||
4286 | - Subfunction 1 - send message with parameter to the active window. -- |
4289 | - Subfunction 1 - send message with parameter to the active window. -- |
4287 | Parameters: |
4290 | Parameters: |
4288 | * eax = 72 - function number |
4291 | * eax = 72 - function number |
4289 | * ebx = 1 - subfunction number |
4292 | * ebx = 1 - subfunction number |
4290 | * ecx = event code: 2 or 3 |
4293 | * ecx = event code: 2 or 3 |
4291 | * edx = parameter: key code for ecx=2, button identifier for ecx=3 |
4294 | * edx = parameter: key code for ecx=2, button identifier for ecx=3 |
4292 | Returned value: |
4295 | Returned value: |
4293 | * eax = 0 - success |
4296 | * eax = 0 - success |
4294 | * eax = 1 - buffer is full |
4297 | * eax = 1 - buffer is full |
4295 | 4298 | ||
4296 | ---------------------- Constants for registers: ---------------------- |
4299 | ---------------------- Constants for registers: ---------------------- |
4297 | eax - SF_SEND_MESSAGE (72) |
4300 | eax - SF_SEND_MESSAGE (72) |
4298 | ====================================================================== |
4301 | ====================================================================== |
4299 | ===================== Function 73 - blit bitmap ===================== |
4302 | ===================== Function 73 - blit bitmap ===================== |
4300 | ====================================================================== |
4303 | ====================================================================== |
4301 | 4304 | ||
4302 | Parameters: |
4305 | Parameters: |
4303 | * eax = 73 - function number |
4306 | * eax = 73 - function number |
4304 | 4307 | ||
4305 | * ebx = ROP and optional flags |
4308 | * ebx = ROP and optional flags |
4306 | 31 6 5 4 3 0 |
4309 | 31 6 5 4 3 0 |
4307 | [ reserved ][T][B][ROP] |
4310 | [ reserved ][T][B][ROP] |
4308 | ROP - raster operation code |
4311 | ROP - raster operation code |
4309 | 0: Copy |
4312 | 0: Copy |
4310 | 1-15: reserved |
4313 | 1-15: reserved |
4311 | B - blit into the background surface |
4314 | B - blit into the background surface |
4312 | T - transparent blit |
4315 | T - transparent blit |
4313 | 4316 | ||
4314 | * ecx = pointer to the function parameters |
4317 | * ecx = pointer to the function parameters |
4315 | destination offset and clipping |
4318 | destination offset and clipping |
4316 | +0 signed dword: destination rectangle X offset from the window |
4319 | +0 signed dword: destination rectangle X offset from the window |
4317 | top-left corner |
4320 | top-left corner |
4318 | +4 signed dword: destination rectangle Y offset from the window |
4321 | +4 signed dword: destination rectangle Y offset from the window |
4319 | top-left corner |
4322 | top-left corner |
4320 | +8 dword: destination rectangle width |
4323 | +8 dword: destination rectangle width |
4321 | +12 dword: destination rectangle height |
4324 | +12 dword: destination rectangle height |
4322 | 4325 | ||
4323 | source offset and clipping |
4326 | source offset and clipping |
4324 | +16 signed dword: source rectangle X offset from the bitmap |
4327 | +16 signed dword: source rectangle X offset from the bitmap |
4325 | top-left corner |
4328 | top-left corner |
4326 | +20 signed dword: source rectangle Y offset from the bitmap |
4329 | +20 signed dword: source rectangle Y offset from the bitmap |
4327 | top-left corner |
4330 | top-left corner |
4328 | +24 dword: source rectangle width |
4331 | +24 dword: source rectangle width |
4329 | +28 dword: source rectangle height |
4332 | +28 dword: source rectangle height |
4330 | 4333 | ||
4331 | +32: dword: bitmap data - must be 32bpp |
4334 | +32: dword: bitmap data - must be 32bpp |
4332 | +36: dword: size of the bitmap row in bytes |
4335 | +36: dword: size of the bitmap row in bytes |
4333 | 4336 | ||
4334 | Returned value: |
4337 | Returned value: |
4335 | * function does not return value |
4338 | * function does not return value |
4336 | 4339 | ||
4337 | ---------------------- Constants for registers: ---------------------- |
4340 | ---------------------- Constants for registers: ---------------------- |
4338 | eax - SF_BLITTER (73) |
4341 | eax - SF_BLITTER (73) |
4339 | ====================================================================== |
4342 | ====================================================================== |
4340 | = Function 74, Subfunction 255, Get number of active network devices. = |
4343 | = Function 74, Subfunction 255, Get number of active network devices. = |
4341 | ====================================================================== |
4344 | ====================================================================== |
4342 | Parameters: |
4345 | Parameters: |
4343 | * eax = 74 - function number |
4346 | * eax = 74 - function number |
4344 | * bl = 255 - subfunction number |
4347 | * bl = 255 - subfunction number |
4345 | Returned value: |
4348 | Returned value: |
4346 | * eax = number of active network devices |
4349 | * eax = number of active network devices |
4347 | 4350 | ||
4348 | ---------------------- Constants for registers: ---------------------- |
4351 | ---------------------- Constants for registers: ---------------------- |
4349 | eax - SF_NETWORK_GET (74) |
4352 | eax - SF_NETWORK_GET (74) |
4350 | bl - SSF_DEVICE_COUNT (255) |
4353 | bl - SSF_DEVICE_COUNT (255) |
4351 | ====================================================================== |
4354 | ====================================================================== |
4352 | ======== Function 74, Subfunction 0, Get network device type. ======== |
4355 | ======== Function 74, Subfunction 0, Get network device type. ======== |
4353 | ====================================================================== |
4356 | ====================================================================== |
4354 | Parameters: |
4357 | Parameters: |
4355 | * eax = 74 - function number |
4358 | * eax = 74 - function number |
4356 | * bl = 0 - subfunction number |
4359 | * bl = 0 - subfunction number |
4357 | * bh = device number |
4360 | * bh = device number |
4358 | Returned value: |
4361 | Returned value: |
4359 | * eax = device type number |
4362 | * eax = device type number |
4360 | 4363 | ||
4361 | ---------------------- Constants for registers: ---------------------- |
4364 | ---------------------- Constants for registers: ---------------------- |
4362 | eax - SF_NETWORK_GET (74) |
4365 | eax - SF_NETWORK_GET (74) |
4363 | bl - SSF_DEVICE_TYPE (0) |
4366 | bl - SSF_DEVICE_TYPE (0) |
4364 | ====================================================================== |
4367 | ====================================================================== |
4365 | ======== Function 74, Subfunction 1, Get network device name. ======== |
4368 | ======== Function 74, Subfunction 1, Get network device name. ======== |
4366 | ====================================================================== |
4369 | ====================================================================== |
4367 | Parameters: |
4370 | Parameters: |
4368 | * eax = 74 - function number |
4371 | * eax = 74 - function number |
4369 | * bl = 1 - subfunction number |
4372 | * bl = 1 - subfunction number |
4370 | * bh = device number |
4373 | * bh = device number |
4371 | * ecx = pointer to 64 byte buffer |
4374 | * ecx = pointer to 64 byte buffer |
4372 | Returned value: |
4375 | Returned value: |
4373 | * eax = -1 on error |
4376 | * eax = -1 on error |
4374 | * The network device name is written into the buffer, on success |
4377 | * The network device name is written into the buffer, on success |
4375 | 4378 | ||
4376 | ---------------------- Constants for registers: ---------------------- |
4379 | ---------------------- Constants for registers: ---------------------- |
4377 | eax - SF_NETWORK_GET (74) |
4380 | eax - SF_NETWORK_GET (74) |
4378 | bl - SSF_DEVICE_NAME (1) |
4381 | bl - SSF_DEVICE_NAME (1) |
4379 | ====================================================================== |
4382 | ====================================================================== |
4380 | ========= Function 74, Subfunction 2, Reset network device. ========== |
4383 | ========= Function 74, Subfunction 2, Reset network device. ========== |
4381 | ====================================================================== |
4384 | ====================================================================== |
4382 | Parameters: |
4385 | Parameters: |
4383 | * eax = 74 - function number |
4386 | * eax = 74 - function number |
4384 | * bl = 2 - subfunction number |
4387 | * bl = 2 - subfunction number |
4385 | * bh = device number |
4388 | * bh = device number |
4386 | Returned value: |
4389 | Returned value: |
4387 | * eax = -1 on error |
4390 | * eax = -1 on error |
4388 | 4391 | ||
4389 | ---------------------- Constants for registers: ---------------------- |
4392 | ---------------------- Constants for registers: ---------------------- |
4390 | eax - SF_NETWORK_GET (74) |
4393 | eax - SF_NETWORK_GET (74) |
4391 | bl - SSF_RESET_DEVICE (2) |
4394 | bl - SSF_RESET_DEVICE (2) |
4392 | ====================================================================== |
4395 | ====================================================================== |
4393 | ========== Function 74, Subfunction 3, Stop network device. ========== |
4396 | ========== Function 74, Subfunction 3, Stop network device. ========== |
4394 | ====================================================================== |
4397 | ====================================================================== |
4395 | Parameters: |
4398 | Parameters: |
4396 | * eax = 74 - function number |
4399 | * eax = 74 - function number |
4397 | * bl = 3 - subfunction number |
4400 | * bl = 3 - subfunction number |
4398 | * bh = device number |
4401 | * bh = device number |
4399 | Returned value: |
4402 | Returned value: |
4400 | * eax = -1 on error |
4403 | * eax = -1 on error |
4401 | 4404 | ||
4402 | ---------------------- Constants for registers: ---------------------- |
4405 | ---------------------- Constants for registers: ---------------------- |
4403 | eax - SF_NETWORK_GET (74) |
4406 | eax - SF_NETWORK_GET (74) |
4404 | bl - SSF_STOP_DEVICE (3) |
4407 | bl - SSF_STOP_DEVICE (3) |
4405 | ====================================================================== |
4408 | ====================================================================== |
4406 | =========== Function 74, Subfunction 4, Get device pointer. ========== |
4409 | =========== Function 74, Subfunction 4, Get device pointer. ========== |
4407 | ====================================================================== |
4410 | ====================================================================== |
4408 | Parameters: |
4411 | Parameters: |
4409 | * eax = 74 - function number |
4412 | * eax = 74 - function number |
4410 | * bl = 4 - subfunction number |
4413 | * bl = 4 - subfunction number |
4411 | * bh = device number |
4414 | * bh = device number |
4412 | Returned value: |
4415 | Returned value: |
4413 | * eax = device pointer, -1 on error |
4416 | * eax = device pointer, -1 on error |
4414 | 4417 | ||
4415 | ---------------------- Constants for registers: ---------------------- |
4418 | ---------------------- Constants for registers: ---------------------- |
4416 | eax - SF_NETWORK_GET (74) |
4419 | eax - SF_NETWORK_GET (74) |
4417 | bl - SSF_DEVICE_POINER (4) |
4420 | bl - SSF_DEVICE_POINER (4) |
4418 | ====================================================================== |
4421 | ====================================================================== |
4419 | ========= Function 74, Subfunction 6, Get packet TX counter. ========= |
4422 | ========= Function 74, Subfunction 6, Get packet TX counter. ========= |
4420 | ====================================================================== |
4423 | ====================================================================== |
4421 | Parameters: |
4424 | Parameters: |
4422 | * eax = 74 - function number |
4425 | * eax = 74 - function number |
4423 | * bl = 6 - subfunction number |
4426 | * bl = 6 - subfunction number |
4424 | * bh = device number |
4427 | * bh = device number |
4425 | Returned value: |
4428 | Returned value: |
4426 | * eax = Number of packets sent since device start, -1 on error |
4429 | * eax = Number of packets sent since device start, -1 on error |
4427 | 4430 | ||
4428 | ---------------------- Constants for registers: ---------------------- |
4431 | ---------------------- Constants for registers: ---------------------- |
4429 | eax - SF_NETWORK_GET (74) |
4432 | eax - SF_NETWORK_GET (74) |
4430 | bl - SSF_TX_PACKET_COUNT (6) |
4433 | bl - SSF_TX_PACKET_COUNT (6) |
4431 | ====================================================================== |
4434 | ====================================================================== |
4432 | ========= Function 74, Subfunction 7, Get packet RX counter. ========= |
4435 | ========= Function 74, Subfunction 7, Get packet RX counter. ========= |
4433 | ====================================================================== |
4436 | ====================================================================== |
4434 | Parameters: |
4437 | Parameters: |
4435 | * eax = 74 - function number |
4438 | * eax = 74 - function number |
4436 | * bl = 7 - subfunction number |
4439 | * bl = 7 - subfunction number |
4437 | * bh = device number |
4440 | * bh = device number |
4438 | Returned value: |
4441 | Returned value: |
4439 | * eax = Number of packets received since device start, -1 on error |
4442 | * eax = Number of packets received since device start, -1 on error |
4440 | 4443 | ||
4441 | ---------------------- Constants for registers: ---------------------- |
4444 | ---------------------- Constants for registers: ---------------------- |
4442 | eax - SF_NETWORK_GET (74) |
4445 | eax - SF_NETWORK_GET (74) |
4443 | bl - SSF_RX_PACKET_COUNT (7) |
4446 | bl - SSF_RX_PACKET_COUNT (7) |
4444 | ====================================================================== |
4447 | ====================================================================== |
4445 | ========== Function 74, Subfunction 8, Get TX byte counter. ========== |
4448 | ========== Function 74, Subfunction 8, Get TX byte counter. ========== |
4446 | ====================================================================== |
4449 | ====================================================================== |
4447 | Parameters: |
4450 | Parameters: |
4448 | * eax = 74 - function number |
4451 | * eax = 74 - function number |
4449 | * bl = 8 - subfunction number |
4452 | * bl = 8 - subfunction number |
4450 | * bh = device number |
4453 | * bh = device number |
4451 | Returned value: |
4454 | Returned value: |
4452 | * eax = Number of bytes sent since device start (lower dword) |
4455 | * eax = Number of bytes sent since device start (lower dword) |
4453 | -1 on error |
4456 | -1 on error |
4454 | * ebx = Number of bytes sent since device start (higher dword) |
4457 | * ebx = Number of bytes sent since device start (higher dword) |
4455 | 4458 | ||
4456 | ---------------------- Constants for registers: ---------------------- |
4459 | ---------------------- Constants for registers: ---------------------- |
4457 | eax - SF_NETWORK_GET (74) |
4460 | eax - SF_NETWORK_GET (74) |
4458 | bl - SSF_TX_BYTE_COUNT (8) |
4461 | bl - SSF_TX_BYTE_COUNT (8) |
4459 | ====================================================================== |
4462 | ====================================================================== |
4460 | ========== Function 74, Subfunction 9, Get RX byte counter. ========== |
4463 | ========== Function 74, Subfunction 9, Get RX byte counter. ========== |
4461 | ====================================================================== |
4464 | ====================================================================== |
4462 | Parameters: |
4465 | Parameters: |
4463 | * eax = 74 - function number |
4466 | * eax = 74 - function number |
4464 | * bl = 9 - subfunction number |
4467 | * bl = 9 - subfunction number |
4465 | * bh = device number |
4468 | * bh = device number |
4466 | Returned value: |
4469 | Returned value: |
4467 | * eax = Number of bytes received since device start (lower dword) |
4470 | * eax = Number of bytes received since device start (lower dword) |
4468 | -1 on error |
4471 | -1 on error |
4469 | * ebx = Number of bytes received since device start (higher dword) |
4472 | * ebx = Number of bytes received since device start (higher dword) |
4470 | 4473 | ||
4471 | ---------------------- Constants for registers: ---------------------- |
4474 | ---------------------- Constants for registers: ---------------------- |
4472 | eax - SF_NETWORK_GET (74) |
4475 | eax - SF_NETWORK_GET (74) |
4473 | bl - SSF_RX_BYTE_COUNT (9) |
4476 | bl - SSF_RX_BYTE_COUNT (9) |
4474 | ====================================================================== |
4477 | ====================================================================== |
4475 | ========== Function 74, Subfunction 10, Get link status. ============= |
4478 | ========== Function 74, Subfunction 10, Get link status. ============= |
4476 | ====================================================================== |
4479 | ====================================================================== |
4477 | Parameters: |
4480 | Parameters: |
4478 | * eax = 74 - function number |
4481 | * eax = 74 - function number |
4479 | * bl = 10 - subfunction number |
4482 | * bl = 10 - subfunction number |
4480 | * bh = device number |
4483 | * bh = device number |
4481 | Returned value: |
4484 | Returned value: |
4482 | * eax = link status, -1 on error |
4485 | * eax = link status, -1 on error |
4483 | 4486 | ||
4484 | Link status: |
4487 | Link status: |
4485 | ETH_LINK_DOWN = 0b ; Link is down |
4488 | ETH_LINK_DOWN = 0b ; Link is down |
4486 | ETH_LINK_UNKNOWN= 1b ; There could be an active link |
4489 | ETH_LINK_UNKNOWN= 1b ; There could be an active link |
4487 | ETH_LINK_FD = 10b ; full duplex flag |
4490 | ETH_LINK_FD = 10b ; full duplex flag |
4488 | ETH_LINK_10M = 100b ; 10 mbit |
4491 | ETH_LINK_10M = 100b ; 10 mbit |
4489 | ETH_LINK_100M = 1000b ; 100 mbit |
4492 | ETH_LINK_100M = 1000b ; 100 mbit |
4490 | ETH_LINK_1G = 1100b ; gigabit |
4493 | ETH_LINK_1G = 1100b ; gigabit |
4491 | 4494 | ||
4492 | ---------------------- Constants for registers: ---------------------- |
4495 | ---------------------- Constants for registers: ---------------------- |
4493 | eax - SF_NETWORK_GET (74) |
4496 | eax - SF_NETWORK_GET (74) |
4494 | bl - SSF_LINK_STATUS (10) |
4497 | bl - SSF_LINK_STATUS (10) |
4495 | ====================================================================== |
4498 | ====================================================================== |
4496 | ============== Function 75, Subfunction 0, Open socket. ============== |
4499 | ============== Function 75, Subfunction 0, Open socket. ============== |
4497 | ====================================================================== |
4500 | ====================================================================== |
4498 | Parameters: |
4501 | Parameters: |
4499 | * eax = 75 - function number |
4502 | * eax = 75 - function number |
4500 | * bl = 0 - subfunction number |
4503 | * bl = 0 - subfunction number |
4501 | * ecx = domain |
4504 | * ecx = domain |
4502 | * edx = type |
4505 | * edx = type |
4503 | * esi = protocol |
4506 | * esi = protocol |
4504 | Returned value: |
4507 | Returned value: |
4505 | * eax = socket number, -1 on error |
4508 | * eax = socket number, -1 on error |
4506 | * ebx = errorcode |
4509 | * ebx = errorcode |
4507 | 4510 | ||
4508 | ---------------------- Constants for registers: ---------------------- |
4511 | ---------------------- Constants for registers: ---------------------- |
4509 | eax - SF_NETWORK_SOCKET (75) |
4512 | eax - SF_NETWORK_SOCKET (75) |
4510 | bl - SSF_OPEN (0) |
4513 | bl - SSF_OPEN (0) |
4511 | ====================================================================== |
4514 | ====================================================================== |
4512 | ============= Function 75, Subfunction 1, Close socket. ============== |
4515 | ============= Function 75, Subfunction 1, Close socket. ============== |
4513 | ====================================================================== |
4516 | ====================================================================== |
4514 | Parameters: |
4517 | Parameters: |
4515 | * eax = 75 - function number |
4518 | * eax = 75 - function number |
4516 | * bl = 1 - subfunction number |
4519 | * bl = 1 - subfunction number |
4517 | * ecx = socket number |
4520 | * ecx = socket number |
4518 | Returned value: |
4521 | Returned value: |
4519 | * eax = -1 on error |
4522 | * eax = -1 on error |
4520 | * ebx = errorcode |
4523 | * ebx = errorcode |
4521 | 4524 | ||
4522 | ---------------------- Constants for registers: ---------------------- |
4525 | ---------------------- Constants for registers: ---------------------- |
4523 | eax - SF_NETWORK_SOCKET (75) |
4526 | eax - SF_NETWORK_SOCKET (75) |
4524 | bl - SSF_CLOSE (1) |
4527 | bl - SSF_CLOSE (1) |
4525 | ====================================================================== |
4528 | ====================================================================== |
4526 | ================== Function 75, Subfunction 2, Bind. ================= |
4529 | ================== Function 75, Subfunction 2, Bind. ================= |
4527 | ====================================================================== |
4530 | ====================================================================== |
4528 | Parameters: |
4531 | Parameters: |
4529 | * eax = 75 - function number |
4532 | * eax = 75 - function number |
4530 | * bl = 2 - subfunction number |
4533 | * bl = 2 - subfunction number |
4531 | * ecx = socket number |
4534 | * ecx = socket number |
4532 | * edx = pointer to sockaddr structure |
4535 | * edx = pointer to sockaddr structure |
4533 | * esi = length of sockaddr structure |
4536 | * esi = length of sockaddr structure |
4534 | Returned value: |
4537 | Returned value: |
4535 | * eax = -1 on error |
4538 | * eax = -1 on error |
4536 | * ebx = errorcode |
4539 | * ebx = errorcode |
4537 | 4540 | ||
4538 | ---------------------- Constants for registers: ---------------------- |
4541 | ---------------------- Constants for registers: ---------------------- |
4539 | eax - SF_NETWORK_SOCKET (75) |
4542 | eax - SF_NETWORK_SOCKET (75) |
4540 | bl - SSF_BIND (2) |
4543 | bl - SSF_BIND (2) |
4541 | ====================================================================== |
4544 | ====================================================================== |
4542 | ================= Function 75, Subfunction 3, Listen. ================ |
4545 | ================= Function 75, Subfunction 3, Listen. ================ |
4543 | ====================================================================== |
4546 | ====================================================================== |
4544 | Parameters: |
4547 | Parameters: |
4545 | * eax = 75 - function number |
4548 | * eax = 75 - function number |
4546 | * bl = 3 - subfunction number |
4549 | * bl = 3 - subfunction number |
4547 | * ecx = socket number |
4550 | * ecx = socket number |
4548 | * edx = backlog |
4551 | * edx = backlog |
4549 | Returned value: |
4552 | Returned value: |
4550 | * eax = -1 on error |
4553 | * eax = -1 on error |
4551 | * ebx = errorcode |
4554 | * ebx = errorcode |
4552 | 4555 | ||
4553 | ---------------------- Constants for registers: ---------------------- |
4556 | ---------------------- Constants for registers: ---------------------- |
4554 | eax - SF_NETWORK_SOCKET (75) |
4557 | eax - SF_NETWORK_SOCKET (75) |
4555 | bl - SSF_LISTEN (3) |
4558 | bl - SSF_LISTEN (3) |
4556 | ====================================================================== |
4559 | ====================================================================== |
4557 | ================ Function 75, Subfunction 4, Connect. ================ |
4560 | ================ Function 75, Subfunction 4, Connect. ================ |
4558 | ====================================================================== |
4561 | ====================================================================== |
4559 | Parameters: |
4562 | Parameters: |
4560 | * eax = 75 - function number |
4563 | * eax = 75 - function number |
4561 | * bl = 4 - subfunction number |
4564 | * bl = 4 - subfunction number |
4562 | * ecx = socket number |
4565 | * ecx = socket number |
4563 | * edx = pointer to sockaddr structure |
4566 | * edx = pointer to sockaddr structure |
4564 | * esi = length of sockaddr structure |
4567 | * esi = length of sockaddr structure |
4565 | Returned value: |
4568 | Returned value: |
4566 | * eax = -1 on error |
4569 | * eax = -1 on error |
4567 | * ebx = errorcode |
4570 | * ebx = errorcode |
4568 | 4571 | ||
4569 | ---------------------- Constants for registers: ---------------------- |
4572 | ---------------------- Constants for registers: ---------------------- |
4570 | eax - SF_NETWORK_SOCKET (75) |
4573 | eax - SF_NETWORK_SOCKET (75) |
4571 | bl - SSF_CONNECT (4) |
4574 | bl - SSF_CONNECT (4) |
4572 | ====================================================================== |
4575 | ====================================================================== |
4573 | ================= Function 75, Subfunction 5, Accept. ================ |
4576 | ================= Function 75, Subfunction 5, Accept. ================ |
4574 | ====================================================================== |
4577 | ====================================================================== |
4575 | Parameters: |
4578 | Parameters: |
4576 | * eax = 75 - function number |
4579 | * eax = 75 - function number |
4577 | * bl = 5 - subfunction number |
4580 | * bl = 5 - subfunction number |
4578 | * ecx = socket number |
4581 | * ecx = socket number |
4579 | * edx = pointer to sockaddr structure |
4582 | * edx = pointer to sockaddr structure |
4580 | * esi = length of sockaddr structure |
4583 | * esi = length of sockaddr structure |
4581 | Returned value: |
4584 | Returned value: |
4582 | * eax = socket number of accepted socket, -1 on error |
4585 | * eax = socket number of accepted socket, -1 on error |
4583 | * ebx = errorcode |
4586 | * ebx = errorcode |
4584 | 4587 | ||
4585 | ---------------------- Constants for registers: ---------------------- |
4588 | ---------------------- Constants for registers: ---------------------- |
4586 | eax - SF_NETWORK_SOCKET (75) |
4589 | eax - SF_NETWORK_SOCKET (75) |
4587 | bl - SSF_ACCEPT (5) |
4590 | bl - SSF_ACCEPT (5) |
4588 | ====================================================================== |
4591 | ====================================================================== |
4589 | ================== Function 75, Subfunction 6, Send. ================= |
4592 | ================== Function 75, Subfunction 6, Send. ================= |
4590 | ====================================================================== |
4593 | ====================================================================== |
4591 | Parameters: |
4594 | Parameters: |
4592 | * eax = 75 - function number |
4595 | * eax = 75 - function number |
4593 | * bl = 6 - subfunction number |
4596 | * bl = 6 - subfunction number |
4594 | * ecx = socket number |
4597 | * ecx = socket number |
4595 | * edx = pointer to buffer |
4598 | * edx = pointer to buffer |
4596 | * esi = length of buffer |
4599 | * esi = length of buffer |
4597 | * edi = flags |
4600 | * edi = flags |
4598 | Returned value: |
4601 | Returned value: |
4599 | * eax = number of bytes copied, -1 on error |
4602 | * eax = number of bytes copied, -1 on error |
4600 | * ebx = errorcode |
4603 | * ebx = errorcode |
4601 | 4604 | ||
4602 | ---------------------- Constants for registers: ---------------------- |
4605 | ---------------------- Constants for registers: ---------------------- |
4603 | eax - SF_NETWORK_SOCKET (75) |
4606 | eax - SF_NETWORK_SOCKET (75) |
4604 | bl - SSF_SEND (6) |
4607 | bl - SSF_SEND (6) |
4605 | ====================================================================== |
4608 | ====================================================================== |
4606 | ================ Function 75, Subfunction 7, Receive. ================ |
4609 | ================ Function 75, Subfunction 7, Receive. ================ |
4607 | ====================================================================== |
4610 | ====================================================================== |
4608 | Parameters: |
4611 | Parameters: |
4609 | * eax = 75 - function number |
4612 | * eax = 75 - function number |
4610 | * bl = 7 - subfunction number |
4613 | * bl = 7 - subfunction number |
4611 | * ecx = socket number |
4614 | * ecx = socket number |
4612 | * edx = pointer to buffer |
4615 | * edx = pointer to buffer |
4613 | * esi = length of buffer |
4616 | * esi = length of buffer |
4614 | * edi = flags |
4617 | * edi = flags |
4615 | Returned value: |
4618 | Returned value: |
4616 | * eax = number of bytes copied, -1 on error |
4619 | * eax = number of bytes copied, -1 on error |
4617 | * ebx = errorcode |
4620 | * ebx = errorcode |
4618 | 4621 | ||
4619 | ---------------------- Constants for registers: ---------------------- |
4622 | ---------------------- Constants for registers: ---------------------- |
4620 | eax - SF_NETWORK_SOCKET (75) |
4623 | eax - SF_NETWORK_SOCKET (75) |
4621 | bl - SSF_RECEIVE (7) |
4624 | bl - SSF_RECEIVE (7) |
4622 | ====================================================================== |
4625 | ====================================================================== |
4623 | =========== Function 75, Subfunction 8, Set socket options. ========== |
4626 | =========== Function 75, Subfunction 8, Set socket options. ========== |
4624 | ====================================================================== |
4627 | ====================================================================== |
4625 | Parameters: |
4628 | Parameters: |
4626 | * eax = 75 - function number |
4629 | * eax = 75 - function number |
4627 | * bl = 8 - subfunction number |
4630 | * bl = 8 - subfunction number |
4628 | * ecx = socket number |
4631 | * ecx = socket number |
4629 | * edx = pointer to optstruct |
4632 | * edx = pointer to optstruct |
4630 | Returned value: |
4633 | Returned value: |
4631 | * eax = -1 on error |
4634 | * eax = -1 on error |
4632 | * ebx = errorcode |
4635 | * ebx = errorcode |
4633 | Remarks: |
4636 | Remarks: |
4634 | 4637 | ||
4635 | Optstruct: |
4638 | Optstruct: |
4636 | dd level |
4639 | dd level |
4637 | dd optionname |
4640 | dd optionname |
4638 | dd optlength |
4641 | dd optlength |
4639 | db options... |
4642 | db options... |
4640 | 4643 | ||
4641 | ---------------------- Constants for registers: ---------------------- |
4644 | ---------------------- Constants for registers: ---------------------- |
4642 | eax - SF_NETWORK_SOCKET (75) |
4645 | eax - SF_NETWORK_SOCKET (75) |
4643 | bl - SSF_SET_OPTIONS (8) |
4646 | bl - SSF_SET_OPTIONS (8) |
4644 | ====================================================================== |
4647 | ====================================================================== |
4645 | =========== Function 75, Subfunction 9, Get socket options. ========== |
4648 | =========== Function 75, Subfunction 9, Get socket options. ========== |
4646 | ====================================================================== |
4649 | ====================================================================== |
4647 | Parameters: |
4650 | Parameters: |
4648 | * eax = 75 - function number |
4651 | * eax = 75 - function number |
4649 | * bl = 9 - subfunction number |
4652 | * bl = 9 - subfunction number |
4650 | * ecx = socket number |
4653 | * ecx = socket number |
4651 | * edx = pointer to optstruct |
4654 | * edx = pointer to optstruct |
4652 | Returned value: |
4655 | Returned value: |
4653 | * eax = -1 on error |
4656 | * eax = -1 on error |
4654 | * ebx = errorcode |
4657 | * ebx = errorcode |
4655 | Remarks: |
4658 | Remarks: |
4656 | 4659 | ||
4657 | Optstruct: |
4660 | Optstruct: |
4658 | dd level |
4661 | dd level |
4659 | dd optionname |
4662 | dd optionname |
4660 | dd optlength |
4663 | dd optlength |
4661 | db options... |
4664 | db options... |
4662 | 4665 | ||
4663 | ---------------------- Constants for registers: ---------------------- |
4666 | ---------------------- Constants for registers: ---------------------- |
4664 | eax - SF_NETWORK_SOCKET (75) |
4667 | eax - SF_NETWORK_SOCKET (75) |
4665 | bl - SSF_GET_OPTIONS (9) |
4668 | bl - SSF_GET_OPTIONS (9) |
4666 | ====================================================================== |
4669 | ====================================================================== |
4667 | ============ Function 75, Subfunction 10, Get socketpair. =========== |
4670 | ============ Function 75, Subfunction 10, Get socketpair. =========== |
4668 | ====================================================================== |
4671 | ====================================================================== |
4669 | Parameters: |
4672 | Parameters: |
4670 | * eax = 75 - function number |
4673 | * eax = 75 - function number |
4671 | * bl = 10 - subfunction number |
4674 | * bl = 10 - subfunction number |
4672 | Returned value: |
4675 | Returned value: |
4673 | * eax = socketnum1, -1 on error |
4676 | * eax = socketnum1, -1 on error |
4674 | * ebx = socketnum2, errorcode on error |
4677 | * ebx = socketnum2, errorcode on error |
4675 | 4678 | ||
4676 | ---------------------- Constants for registers: ---------------------- |
4679 | ---------------------- Constants for registers: ---------------------- |
4677 | eax - SF_NETWORK_SOCKET (75) |
4680 | eax - SF_NETWORK_SOCKET (75) |
4678 | bl - SSF_GET_PAIR (10) |
4681 | bl - SSF_GET_PAIR (10) |
4679 | ====================================================================== |
4682 | ====================================================================== |
4680 | ============ Function 76, Network options and statistics. ============ |
4683 | ============ Function 76, Network options and statistics. ============ |
4681 | ====================================================================== |
4684 | ====================================================================== |
4682 | Parameters: |
4685 | Parameters: |
4683 | * eax = 76 - function number |
4686 | * eax = 76 - function number |
4684 | * high half of ebx = protocol number |
4687 | * high half of ebx = protocol number |
4685 | * bh = device number |
4688 | * bh = device number |
4686 | * bl = subfunction number |
4689 | * bl = subfunction number |
4687 | 4690 | ||
4688 | Ethernet (0) |
4691 | Ethernet (0) |
4689 | 0 - Read MAC |
4692 | 0 - Read MAC |
4690 | 4693 | ||
4691 | IPv4 (1) |
4694 | IPv4 (1) |
4692 | 0 - Read # IP packets sent |
4695 | 0 - Read # IP packets sent |
4693 | 1 - Read # IP packets received |
4696 | 1 - Read # IP packets received |
4694 | 2 - Read IP |
4697 | 2 - Read IP |
4695 | 3 - Write IP |
4698 | 3 - Write IP |
4696 | 4 - Read DNS |
4699 | 4 - Read DNS |
4697 | 5 - Write DNS |
4700 | 5 - Write DNS |
4698 | 6 - Read subnet |
4701 | 6 - Read subnet |
4699 | 7 - Write subnet |
4702 | 7 - Write subnet |
4700 | 8 - Read gateway |
4703 | 8 - Read gateway |
4701 | 9 - Write gateway |
4704 | 9 - Write gateway |
4702 | 4705 | ||
4703 | ICMP (2) |
4706 | ICMP (2) |
4704 | 0 - Read # ICMP packets sent |
4707 | 0 - Read # ICMP packets sent |
4705 | 1 - Read # ICMP packets received |
4708 | 1 - Read # ICMP packets received |
4706 | 3 - enable/disable ICMP echo reply |
4709 | 3 - enable/disable ICMP echo reply |
4707 | 4710 | ||
4708 | UDP (3) |
4711 | UDP (3) |
4709 | 0 - Read # UDP packets sent |
4712 | 0 - Read # UDP packets sent |
4710 | 1 - Read # UDP packets received |
4713 | 1 - Read # UDP packets received |
4711 | 4714 | ||
4712 | TCP (4) |
4715 | TCP (4) |
4713 | 0 - Read # TCP packets sent |
4716 | 0 - Read # TCP packets sent |
4714 | 1 - Read # TCP packets received |
4717 | 1 - Read # TCP packets received |
4715 | 4718 | ||
4716 | ARP (5) |
4719 | ARP (5) |
4717 | 0 - Read # ARP packets sent |
4720 | 0 - Read # ARP packets sent |
4718 | 1 - Read # ARP packets received |
4721 | 1 - Read # ARP packets received |
4719 | 2 - Read # ARP entry's |
4722 | 2 - Read # ARP entry's |
4720 | 3 - Read ARP entry |
4723 | 3 - Read ARP entry |
4721 | 4 - Add static ARP entry |
4724 | 4 - Add static ARP entry |
4722 | 5 - Remove ARP entry (-1 = remove all) |
4725 | 5 - Remove ARP entry (-1 = remove all) |
4723 | 6 - Send ARP announce on specified interface |
4726 | 6 - Send ARP announce on specified interface |
4724 | 7 - Read # ARP conflicts (IP address conflicts) |
4727 | 7 - Read # ARP conflicts (IP address conflicts) |
4725 | 4728 | ||
4726 | ---------------------- Constants for registers: ---------------------- |
4729 | ---------------------- Constants for registers: ---------------------- |
4727 | eax - SF_NETWORK_PROTOCOL (76) |
4730 | eax - SF_NETWORK_PROTOCOL (76) |
4728 | 4731 | ||
4729 | ====================================================================== |
4732 | ====================================================================== |
4730 | ========== Function 77, Subfunction 0, Create futex object =========== |
4733 | ========== Function 77, Subfunction 0, Create futex object =========== |
4731 | ====================================================================== |
4734 | ====================================================================== |
4732 | Parameters: |
4735 | Parameters: |
4733 | * eax = 77 - function number |
4736 | * eax = 77 - function number |
4734 | * ebx = 0 - subfunction number |
4737 | * ebx = 0 - subfunction number |
4735 | * ecx = pointer to futex dword |
4738 | * ecx = pointer to futex dword |
4736 | Returned value: |
4739 | Returned value: |
4737 | * eax = futex handle, 0 on error |
4740 | * eax = futex handle, 0 on error |
4738 | Remarks: |
4741 | Remarks: |
4739 | * Use subfunction 1 to destroy the futex. |
4742 | * Use subfunction 1 to destroy the futex. |
4740 | The kernel destroys the futexes automatically when the process |
4743 | The kernel destroys the futexes automatically when the process |
4741 | terminates. |
4744 | terminates. |
4742 | ====================================================================== |
4745 | ====================================================================== |
4743 | ========= Function 77, Subfunction 1, Destroy futex object =========== |
4746 | ========= Function 77, Subfunction 1, Destroy futex object =========== |
4744 | ====================================================================== |
4747 | ====================================================================== |
4745 | Parameters: |
4748 | Parameters: |
4746 | * eax = 77 - function number |
4749 | * eax = 77 - function number |
4747 | * ebx = 1 - subfunction number |
4750 | * ebx = 1 - subfunction number |
4748 | * ecx = futex handle |
4751 | * ecx = futex handle |
4749 | Returned value: |
4752 | Returned value: |
4750 | * eax = 0 - successfull, -1 on error |
4753 | * eax = 0 - successfull, -1 on error |
4751 | Remarks: |
4754 | Remarks: |
4752 | * The futex handle must have been created by subfunction 0 |
4755 | * The futex handle must have been created by subfunction 0 |
4753 | 4756 | ||
4754 | ====================================================================== |
4757 | ====================================================================== |
4755 | =============== Function 77, Subfunction 2, Futex wait =============== |
4758 | =============== Function 77, Subfunction 2, Futex wait =============== |
4756 | ====================================================================== |
4759 | ====================================================================== |
4757 | Parameters: |
4760 | Parameters: |
4758 | * eax = 77 - function number |
4761 | * eax = 77 - function number |
4759 | * ebx = 2 - subfunction number |
4762 | * ebx = 2 - subfunction number |
4760 | * ecx = futex handle |
4763 | * ecx = futex handle |
4761 | * edx = control value |
4764 | * edx = control value |
4762 | * esi = timeout in system ticks or 0 for infinity |
4765 | * esi = timeout in system ticks or 0 for infinity |
4763 | Returned value: |
4766 | Returned value: |
4764 | * eax = 0 - successfull |
4767 | * eax = 0 - successfull |
4765 | -1 - timeout |
4768 | -1 - timeout |
4766 | -2 - futex dword does not have the same value as edx |
4769 | -2 - futex dword does not have the same value as edx |
4767 | Remarks: |
4770 | Remarks: |
4768 | * This functionn tests that the value at the futex dword still |
4771 | * This functionn tests that the value at the futex dword still |
4769 | contains the expected control value, and if so, then sleeps |
4772 | contains the expected control value, and if so, then sleeps |
4770 | waiting for a wake operation on the futex. |
4773 | waiting for a wake operation on the futex. |
4771 | * The futex handle must have been created by subfunction 0 |
4774 | * The futex handle must have been created by subfunction 0 |
4772 | 4775 | ||
4773 | ====================================================================== |
4776 | ====================================================================== |
4774 | =============== Function 77, Subfunction 3, Futex wake =============== |
4777 | =============== Function 77, Subfunction 3, Futex wake =============== |
4775 | ====================================================================== |
4778 | ====================================================================== |
4776 | Parameters: |
4779 | Parameters: |
4777 | * eax = 77 - function number |
4780 | * eax = 77 - function number |
4778 | * ebx = 3 - subfunction number |
4781 | * ebx = 3 - subfunction number |
4779 | * ecx = futex handle |
4782 | * ecx = futex handle |
4780 | * edx = number of waiters to wake |
4783 | * edx = number of waiters to wake |
4781 | Returned value: |
4784 | Returned value: |
4782 | * eax = number of waiters that were woken up |
4785 | * eax = number of waiters that were woken up |
4783 | 4786 | ||
4784 | Remarks: |
4787 | Remarks: |
4785 | * This function wakes at most edx of the waiters that are |
4788 | * This function wakes at most edx of the waiters that are |
4786 | waiting (e.g., inside futex wait) on the futex dword |
4789 | waiting (e.g., inside futex wait) on the futex dword |
4787 | * The futex handle must have been created by subfunction 0 |
4790 | * The futex handle must have been created by subfunction 0 |
4788 | 4791 | ||
4789 | ====================================================================== |
4792 | ====================================================================== |
4790 | =============== Function -1 - terminate thread/process =============== |
4793 | =============== Function -1 - terminate thread/process =============== |
4791 | ====================================================================== |
4794 | ====================================================================== |
4792 | Parameters: |
4795 | Parameters: |
4793 | * eax = -1 - function number |
4796 | * eax = -1 - function number |
4794 | Returned value: |
4797 | Returned value: |
4795 | * function does not return neither value nor control |
4798 | * function does not return neither value nor control |
4796 | Remarks: |
4799 | Remarks: |
4797 | * If the process did not create threads obviously, it has only |
4800 | * If the process did not create threads obviously, it has only |
4798 | one thread, which termination results in process termination. |
4801 | one thread, which termination results in process termination. |
4799 | * If the current thread is last in the process, its termination |
4802 | * If the current thread is last in the process, its termination |
4800 | also results in process terminates. |
4803 | also results in process terminates. |
4801 | * This function terminates the current thread. Other thread can be |
4804 | * This function terminates the current thread. Other thread can be |
4802 | killed by call to subfunction 2 of function 18. |
4805 | killed by call to subfunction 2 of function 18. |
4803 | 4806 | ||
4804 | ====================================================================== |
4807 | ====================================================================== |
4805 | =========================== List of events =========================== |
4808 | =========================== List of events =========================== |
4806 | ====================================================================== |
4809 | ====================================================================== |
4807 | Next event can be retrieved by the call of one from functions 10 |
4810 | Next event can be retrieved by the call of one from functions 10 |
4808 | (to wait for event), 11 (to check without waiting), 23 |
4811 | (to wait for event), 11 (to check without waiting), 23 |
4809 | (to wait during the given time). |
4812 | (to wait during the given time). |
4810 | These functions return only those events, which enter into a mask set |
4813 | These functions return only those events, which enter into a mask set |
4811 | by function 40. By default it is first three, |
4814 | by function 40. By default it is first three, |
4812 | there is enough for most applications. |
4815 | there is enough for most applications. |
4813 | Codes of events: |
4816 | Codes of events: |
4814 | * 1 = redraw event (is reset by call to function 0) |
4817 | * 1 = redraw event (is reset by call to function 0) |
4815 | * 2 = key on keyboard is pressed (acts, only when the window is |
4818 | * 2 = key on keyboard is pressed (acts, only when the window is |
4816 | active) or hotkey is pressed; is reset, when all keys from |
4819 | active) or hotkey is pressed; is reset, when all keys from |
4817 | the buffer are read out by function 2 |
4820 | the buffer are read out by function 2 |
4818 | * 3 = button is pressed, defined earlier by function 8 |
4821 | * 3 = button is pressed, defined earlier by function 8 |
4819 | (or close button, created implicitly by function 0; |
4822 | (or close button, created implicitly by function 0; |
4820 | minimize button is handled by the system and sends no message; |
4823 | minimize button is handled by the system and sends no message; |
4821 | acts, only when the window is active; |
4824 | acts, only when the window is active; |
4822 | is reset when all buttons from the buffer |
4825 | is reset when all buttons from the buffer |
4823 | are read out by function 17) |
4826 | are read out by function 17) |
4824 | * 4 = reserved (in current implementation never comes even after |
4827 | * 4 = reserved (in current implementation never comes even after |
4825 | unmasking by function 40) |
4828 | unmasking by function 40) |
4826 | * 5 = kernel finished redrawing of the desktop background |
4829 | * 5 = kernel finished redrawing of the desktop background |
4827 | * 6 = mouse event (something happened - button pressing or moving; |
4830 | * 6 = mouse event (something happened - button pressing or moving; |
4828 | is reset at reading) |
4831 | is reset at reading) |
4829 | * 7 = IPC event (see function 60 - |
4832 | * 7 = IPC event (see function 60 - |
4830 | Inter Process Communication; is reset at reading) |
4833 | Inter Process Communication; is reset at reading) |
4831 | * 8 = network event (is reset at reading) |
4834 | * 8 = network event (is reset at reading) |
4832 | * 9 = debug event (is reset at reading; see |
4835 | * 9 = debug event (is reset at reading; see |
4833 | debug subsystem) |
4836 | debug subsystem) |
4834 | * 16..31 = event with appropriate IRQ |
4837 | * 16..31 = event with appropriate IRQ |
4835 | (16=IRQ0, 31=IRQ15) (is reset after reading all IRQ data) |
4838 | (16=IRQ0, 31=IRQ15) (is reset after reading all IRQ data) |
4836 | 4839 | ||
4837 | ====================================================================== |
4840 | ====================================================================== |
4838 | =================== Error codes of the file system =================== |
4841 | =================== Error codes of the file system =================== |
4839 | ====================================================================== |
4842 | ====================================================================== |
4840 | * 0 = success |
4843 | * 0 = success |
4841 | * 1 = base and/or partition of a hard disk is not defined |
4844 | * 1 = base and/or partition of a hard disk is not defined |
4842 | (by subfunctions 7, 8 of function 21) |
4845 | (by subfunctions 7, 8 of function 21) |
4843 | * 2 = function is not supported for the given file system |
4846 | * 2 = function is not supported for the given file system |
4844 | * 3 = unknown file system |
4847 | * 3 = unknown file system |
4845 | * 4 = reserved, is never returned in the current implementation |
4848 | * 4 = reserved, is never returned in the current implementation |
4846 | * 5 = file not found |
4849 | * 5 = file not found |
4847 | * 6 = end of file, EOF |
4850 | * 6 = end of file, EOF |
4848 | * 7 = pointer lies outside of application memory |
4851 | * 7 = pointer lies outside of application memory |
4849 | * 8 = disk is full |
4852 | * 8 = disk is full |
4850 | * 9 = FAT table is destroyed |
4853 | * 9 = FAT table is destroyed |
4851 | * 10 = access denied |
4854 | * 10 = access denied |
4852 | * 11 = device error |
4855 | * 11 = device error |
4853 | Application start functions can return also following errors: |
4856 | Application start functions can return also following errors: |
4854 | * 30 = 0x1E = not enough memory |
4857 | * 30 = 0x1E = not enough memory |
4855 | * 31 = 0x1F = file is not executable |
4858 | * 31 = 0x1F = file is not executable |
4856 | * 32 = 0x20 = too many processes>>0,>=>=>=0xFFFF. |
4859 | * 32 = 0x20 = too many processes>>0,>=>=>=0xFFFF. |
4857 | >=ecx<=0xFFFF. |
4860 | >=ecx<=0xFFFF. |
4858 | > |
4861 | > |