2012-03-13 17:51:57 +01:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; ;;
|
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
|
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
|
;; ;;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
2010-10-17 10:53:29 +02:00
|
|
|
|
SYSTEM FUNCTIONS of OS Kolibri 0.7.7.0
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
Number of the function is located in the register eax.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
The call of the system function is executed by "int 0x40" command.
|
|
|
|
|
All registers except explicitly declared in the returned value,
|
|
|
|
|
including eflags, are preserved.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
======================================================================
|
|
|
|
|
============== Function 0 - define and draw the window. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
Defines an application window. Draws a frame of the window, header and
|
2006-08-21 15:06:02 +02:00
|
|
|
|
working area. For skinned windows defines standard close and minimize
|
|
|
|
|
buttons.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = [coordinate on axis x]*65536 + [size on axis x]
|
|
|
|
|
* ecx = [coordinate on axis y]*65536 + [size on axis y]
|
|
|
|
|
* edx = 0xXYRRGGBB, where:
|
|
|
|
|
* Y = style of the window:
|
2006-08-18 15:32:18 +02:00
|
|
|
|
* Y=0 - type I - fixed-size window
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Y=1 - only define window area, draw nothing
|
2006-08-18 15:32:18 +02:00
|
|
|
|
* Y=2 - type II - variable-size window
|
|
|
|
|
* Y=3 - skinned window
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* Y=4 - skinned fixed-size window
|
|
|
|
|
* other possible values (from 5 up to 15) are reserved,
|
2006-08-03 21:30:32 +02:00
|
|
|
|
function call with such Y is ignored
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* RR, GG, BB = accordingly red, green, blue components of a color
|
2013-10-19 12:24:30 +02:00
|
|
|
|
of the working area of the window (are ignored for style Y=1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* X = DCBA (bits)
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* A = 1 - window has caption; for styles Y=3,4 caption string
|
2006-08-11 15:30:23 +02:00
|
|
|
|
must be passed in edi, for other styles use
|
|
|
|
|
subfunction 1 of function 71
|
|
|
|
|
* B = 1 - coordinates of all graphics primitives are relative to
|
|
|
|
|
window client area
|
2007-01-30 22:54:34 +01:00
|
|
|
|
* C = 1 - don't fill working area on window draw
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* D = 0 - normal filling of the working area, 1 - gradient
|
|
|
|
|
The following parameters are intended for windows
|
|
|
|
|
of a type I and II, and ignored for styles Y=1,3:
|
|
|
|
|
* esi = 0xXYRRGGBB - color of the header
|
|
|
|
|
* RR, GG, BB define color
|
2013-10-19 12:24:30 +02:00
|
|
|
|
* Y=0 - usual window, Y=1 - unmovable window (works for all window styles)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* X defines a gradient of header: X=0 - no gradient,
|
2006-08-03 21:30:32 +02:00
|
|
|
|
X=8 - usual gradient,
|
|
|
|
|
for windows of a type II X=4 - negative gradient
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* other values of X and Y are reserved
|
|
|
|
|
* edi = 0x00RRGGBB - color of the frame
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Position and sizes of the window are installed by the first
|
|
|
|
|
call of this function and are ignored at subsequent; to change
|
|
|
|
|
position and/or sizes of already created window use function 67.
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* For windows with styles Y=3,4 and caption (A=1) caption string
|
|
|
|
|
is set by the first call of this function and is ignored
|
|
|
|
|
at subsequent (strictly speaking, is ignored after a call to
|
|
|
|
|
subfunction 2 of function 12 - end redraw); to change caption of
|
|
|
|
|
already created window use subfunction 1 of function 71.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the window has appropriate styles, position and/or sizes can be
|
|
|
|
|
changed by user. Current position and sizes can be obtained
|
|
|
|
|
by function 9.
|
|
|
|
|
* The window must fit on the screen. If the transferred
|
|
|
|
|
coordinates and sizes do not satisfy to this condition,
|
|
|
|
|
appropriate coordinate (or, probably, both) is considered as zero,
|
2006-08-18 15:32:18 +02:00
|
|
|
|
and if it does not help too, the appropriate size
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(or, probably, both) is installed in a size of the screen.
|
2012-02-26 05:22:47 +01:00
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
|
Further let us designate xpos,ypos,xsize,ysize - values passed
|
|
|
|
|
in ebx,ecx. The coordinates are resulted concerning
|
2006-08-11 15:30:23 +02:00
|
|
|
|
the left upper corner of the window, which, thus, is set as (0,0),
|
|
|
|
|
coordinates of the right lower corner essence (xsize,ysize).
|
|
|
|
|
* The sizes of the window are understood in sence of coordinates
|
|
|
|
|
of the right lower corner. This concerns all other functions too.
|
|
|
|
|
It means, that the real sizes are on 1 pixel more.
|
|
|
|
|
* The window of type I looks as follows:
|
|
|
|
|
* draw external frame of color indicated in edi, 1 pixel in width
|
|
|
|
|
* draw header - rectangle with the left upper corner (1,1) and
|
2014-02-18 18:49:35 +01:00
|
|
|
|
right lower (xsize-1,min(20,ysize-1)) color indicated in esi
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(taking a gradient into account)
|
2014-02-18 18:49:35 +01:00
|
|
|
|
* if ysize>21, fill the working area of the window -
|
2006-08-11 15:30:23 +02:00
|
|
|
|
rectangle with the left upper corner (1,21) and right lower
|
|
|
|
|
(xsize-1,ysize-1) (sizes (xsize-1)*(ysize-21)) with color
|
|
|
|
|
indicated in edx (taking a gradient into account)
|
|
|
|
|
* if A=1 and caption has been already set by subfunction 1
|
|
|
|
|
of function 71, it is drawn in the corresponding place of header
|
|
|
|
|
* The window of style Y=1 looks as follows:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* completely defined by the application
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The window of type II looks as follows:
|
|
|
|
|
* draw external frame of width 1 pixel with the "shaded" color
|
|
|
|
|
edi (all components of the color decrease twice)
|
|
|
|
|
* draw intermediate frame of width 3 pixels with color edi
|
|
|
|
|
* draw internal frame of width 1 pixel with the "shaded" color edi
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* draw header - rectangle with the left upper corner (4,4)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
and right lower (xsize-4,min(20,ysize)) color, indicated in esi
|
|
|
|
|
(taking a gradient into account)
|
|
|
|
|
* if ysize>=26, fill the working area of the window -
|
2006-08-03 21:30:32 +02:00
|
|
|
|
rectangle with the left upper corner (5,20) and right lower
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(xsize-5,ysize-5) with color indicated in edx
|
|
|
|
|
(taking a gradient into account)
|
|
|
|
|
* if A=1 and caption has been already set by subfunction 1
|
|
|
|
|
of function 71, it is drawn in the corresponding place of header
|
|
|
|
|
* The skinned window looks as follows:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* draw external frame of width 1 pixel
|
2006-08-11 15:30:23 +02:00
|
|
|
|
with color 'outer' from the skin
|
|
|
|
|
* draw intermediate frame of width 3 pixel
|
|
|
|
|
with color 'frame' from the skin
|
|
|
|
|
* draw internal frame of width 1 pixel
|
|
|
|
|
with color 'inner' from the skin
|
|
|
|
|
* draw header (on bitmaps from the skin) in a rectangle
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(0,0) - (xsize,_skinh-1)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* if ysize>=26, fill the working area of the window -
|
|
|
|
|
rectangle with the left upper corner (5,_skinh) and right lower
|
|
|
|
|
(xsize-5,ysize-5) with color indicated in edx
|
|
|
|
|
(taking a gradient into account)
|
2006-08-21 15:06:02 +02:00
|
|
|
|
* define two standard buttons: close and minimize
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(see function 8)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* if A=1 and edi contains (nonzero) pointer to caption string,
|
|
|
|
|
it is drawn in place in header defined in the skin
|
|
|
|
|
* value _skinh is accessible as the result of call
|
|
|
|
|
subfunction 4 of function 48
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CREATE_WINDOW (0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
================ Function 1 - put pixel in the window. ===============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 1 - function number
|
|
|
|
|
* ebx = x-coordinate (relative to the window)
|
|
|
|
|
* ecx = y-coordinate (relative to the window)
|
|
|
|
|
* edx = 0x00RRGGBB - color of a pixel
|
|
|
|
|
edx = 0x01xxxxxx - invert color of a pixel
|
|
|
|
|
(low 24 bits are ignored)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PUT_PIXEL (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============ Function 2 - get the code of the pressed key. ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Takes away the code of the pressed key from the buffer.
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 2 - function number
|
|
|
|
|
Returned value:
|
|
|
|
|
* if the buffer is empty, function returns eax=1
|
|
|
|
|
* if the buffer is not empty, function returns al=0,
|
2014-02-25 02:03:37 +01:00
|
|
|
|
ah=code of the pressed key,
|
2014-03-05 16:31:09 +01:00
|
|
|
|
bits 16-23 = contain scancode for pressed key in ASCII mode,
|
|
|
|
|
in the scancodes mode this bits cleared.
|
2014-02-25 02:03:37 +01:00
|
|
|
|
bits 23-31 = zero
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* if there is "hotkey", function returns al=2,
|
|
|
|
|
ah=scancode of the pressed key (0 for control keys),
|
|
|
|
|
high word of eax contains a status of control keys at the moment
|
|
|
|
|
of pressing a hotkey
|
|
|
|
|
Remarks:
|
|
|
|
|
* There is a common system buffer of the pressed keys
|
|
|
|
|
by a size of 120 bytes, organized as queue.
|
|
|
|
|
* There is one more common system buffer on 120 "hotkeys".
|
|
|
|
|
* If the application with the inactive window calls this function,
|
|
|
|
|
the buffer of the pressed keys is considered to be empty.
|
|
|
|
|
* By default this function returns ASCII-codes; to switch
|
|
|
|
|
to the scancodes mode (and back) use function 66.
|
|
|
|
|
However, hotkeys are always notificated as scancodes.
|
|
|
|
|
* To find out, what keys correspond to what codes, start
|
|
|
|
|
the application keyascii and scancode.
|
|
|
|
|
* Scancodes come directly from keyboard and are fixed;
|
|
|
|
|
ASCII-codes turn out with usage of the conversion tables,
|
|
|
|
|
which can be set by subfunction 2 of function 21
|
|
|
|
|
and get by subfunction 2 of function 26.
|
|
|
|
|
* As a consequence, ASCII-codes take into account current
|
|
|
|
|
keyboard layout (rus/en) as opposed to scancodes.
|
|
|
|
|
* This function notifies only about those hotkeys, which were
|
|
|
|
|
defined by this thread by subfunction 4 of function 66.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_KEY (2)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 3 - get system time. ===================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 3 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0x00SSMMHH, where HH:MM:SS = Hours:Minutes:Seconds
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* each item is BCD-number, for example,
|
|
|
|
|
for time 23:59:59 function returns 0x00595923
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* See also subfunction 9 of function 26 - get time from
|
|
|
|
|
the moment of start of the system; it is more convenient, because
|
|
|
|
|
returns simply DWORD-value of the time counter.
|
|
|
|
|
* System time can be set by function 22.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_SYS_TIME (3)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2015-10-15 17:20:20 +02:00
|
|
|
|
=================== Function 4 - draw text string. ===================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 4 - function number
|
2015-10-15 17:20:20 +02:00
|
|
|
|
* ebx = X*65536+Y, coordinates in the window or buffer
|
|
|
|
|
* ecx = 0xXXRRGGBB, where
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* RR, GG, BB specify text color
|
2015-10-15 17:20:20 +02:00
|
|
|
|
* XX = ABFFCSSS (bits):
|
2015-08-05 12:02:18 +02:00
|
|
|
|
* A=1 - output zero terminated string
|
2015-10-15 17:20:20 +02:00
|
|
|
|
* B=1 - fill background (color = edi)
|
2015-08-05 12:02:18 +02:00
|
|
|
|
* FF specifies the font and encoding:
|
|
|
|
|
0 = 6x9 cp866
|
2015-10-29 15:43:15 +01:00
|
|
|
|
1 = 8x16 cp866
|
2015-08-05 12:02:18 +02:00
|
|
|
|
2 = 8x16 UTF-16LE
|
|
|
|
|
3 = 8x16 UTF-8
|
2015-10-15 17:20:20 +02:00
|
|
|
|
* C=0 - draw to the window,
|
|
|
|
|
C=1 - draw to the user buffer (edi)
|
|
|
|
|
* SSS = (size multiplier)-1, so 0 = x1, 7 = x8
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = pointer to the beginning of the string
|
2015-08-05 12:02:18 +02:00
|
|
|
|
* esi = for A=0 length of the string, for A=1 is ignored
|
|
|
|
|
* edi = for B=1 color to fill background,
|
2015-10-15 17:20:20 +02:00
|
|
|
|
for C=1 pointer to user buffer
|
2013-07-08 10:17:53 +02:00
|
|
|
|
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2015-08-05 12:02:18 +02:00
|
|
|
|
* You can not use B=1 and C=1 at the same time, since both use edi.
|
2015-10-15 17:20:20 +02:00
|
|
|
|
* When SSS=0, font may be smoothed, depending on system setting.
|
|
|
|
|
* User buffer structure:
|
|
|
|
|
Xsize dd
|
|
|
|
|
Ysize dd
|
|
|
|
|
picture rb Xsize*Ysize*4 ; 32 bpp
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DRAW_TEXT (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========================= Function 5 - delay. ========================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Delays execution of the program on the given time.
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 5 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = time in the 1/100 of second
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Passing ebx=0 does not transfer control to the next process
|
|
|
|
|
and does not make any operations at all. If it is really required
|
|
|
|
|
to transfer control to the next process (to complete a current
|
|
|
|
|
time slice), use subfunction 1 of function 68.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SLEEP (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=============== Function 7 - draw image in the window. ===============
|
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Paramters:
|
|
|
|
|
* eax = 7 - function number
|
|
|
|
|
* ebx = pointer to the image in the format BBGGRRBBGGRR...
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Coordinates of the image are coordinates of the upper left corner
|
|
|
|
|
of the image relative to the window.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* Size of the image in bytes is 3*xsize*ysize.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PUT_IMAGE (7)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=============== Function 8 - define/delete the button. ===============
|
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Parameters for button definition:
|
|
|
|
|
* eax = 8 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = [coordinate on axis x]*65536 + [size on axis x]
|
|
|
|
|
* ecx = [coordinate on axis y]*65536 + [size on axis y]
|
|
|
|
|
* edx = 0xXYnnnnnn, where:
|
|
|
|
|
* nnnnnn = identifier of the button
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* high (31st) bit of edx is cleared
|
|
|
|
|
* if 30th bit of edx is set - do not draw the button
|
|
|
|
|
* if 29th bit of edx is set - do not draw a frame
|
2006-08-03 21:30:32 +02:00
|
|
|
|
at pressing the button
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* esi = 0x00RRGGBB - color of the button
|
|
|
|
|
Parameters for button deleting:
|
|
|
|
|
* eax = 8 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* edx = 0x80nnnnnn, where nnnnnn - identifier of the button
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Sizes of the button must be more than 0 and less than 0x8000.
|
2006-08-18 15:32:18 +02:00
|
|
|
|
* For skinned windows definition of the window
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(call of 0th function) creates two standard buttons -
|
|
|
|
|
for close of the window with identifier 1 and
|
|
|
|
|
for minimize of the window with identifier 0xffff.
|
|
|
|
|
* The creation of two buttons with same identifiers is admitted.
|
|
|
|
|
* The button with the identifier 0xffff at pressing is interpreted
|
|
|
|
|
by the system as the button of minimization, the system handles
|
|
|
|
|
such pressing independently, not accessing to the application.
|
|
|
|
|
In rest it is usual button.
|
|
|
|
|
* Total number of buttons for all applications is limited to 4095.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEFINE_BUTTON (8)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============ Function 9 - information on execution thread. ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 9 - function number
|
|
|
|
|
* ebx = pointer to 1-Kb buffer
|
|
|
|
|
* ecx = number of the slot of the thread
|
|
|
|
|
ecx = -1 - get information on the current thread
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = maximum number of the slot of a thread
|
|
|
|
|
* buffer pointed to by ebx contains the following information:
|
|
|
|
|
* +0: dword: usage of the processor (how many time units
|
|
|
|
|
per second leaves on execution of this thread)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +4: word: position of the window of thread in the window stack
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +6: word: (has no relation to the specified thread)
|
|
|
|
|
number of the thread slot, which window has in the window stack
|
|
|
|
|
position ecx
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +8: word: reserved
|
|
|
|
|
* +10 = +0xA: 11 bytes: name of the process
|
2012-04-18 00:17:20 +02:00
|
|
|
|
(name of the started file - executable file without extension)
|
2006-08-29 14:52:52 +02:00
|
|
|
|
* +21 = +0x15: byte: reserved, this byte is not changed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +22 = +0x16: dword: address of the process in memory
|
|
|
|
|
* +26 = +0x1A: dword: size of used memory - 1
|
|
|
|
|
* +30 = +0x1E: dword: identifier (PID/TID)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +34 = +0x22: dword: coordinate of the thread window on axis x
|
|
|
|
|
* +38 = +0x26: dword: coordinate of the thread window on axis y
|
|
|
|
|
* +42 = +0x2A: dword: size of the thread window on axis x
|
|
|
|
|
* +46 = +0x2E: dword: size of the thread window on axis y
|
|
|
|
|
* +50 = +0x32: word: status of the thread slot:
|
|
|
|
|
* 0 = thread is running
|
|
|
|
|
* 1 = thread is suspended
|
|
|
|
|
* 2 = thread is suspended while waiting for event
|
|
|
|
|
* 3 = thread is terminating as a result of call to function -1
|
|
|
|
|
or under duress as a result of call to subfunction 2
|
|
|
|
|
of function 18 or termination of the system
|
|
|
|
|
* 4 = thread is terminating as a result of exception
|
|
|
|
|
* 5 = thread waits for event
|
|
|
|
|
* 9 = requested slot is free, all other information on the slot
|
|
|
|
|
is not meaningful
|
2006-08-29 14:52:52 +02:00
|
|
|
|
* +52 = +0x34: word: reserved, this word is not changed
|
|
|
|
|
* +54 = +0x36: dword: coordinate of the client area on axis x
|
|
|
|
|
* +58 = +0x3A: dword: coordinate of the client area on axis y
|
|
|
|
|
* +62 = +0x3E: dword: width of the client area
|
|
|
|
|
* +66 = +0x42: dword: height of the client area
|
|
|
|
|
* +70 = +0x46: byte: state of the window - bitfield
|
|
|
|
|
* bit 0 (mask 1): window is maximized
|
|
|
|
|
* bit 1 (mask 2): window is minimized to panel
|
|
|
|
|
* bit 2 (mask 4): window is rolled up
|
2010-10-17 18:22:47 +02:00
|
|
|
|
* +71 = +0x47: dword: event mask
|
2013-11-20 22:19:36 +01:00
|
|
|
|
* +75 = +0x4B: byte: keyboard mode(ASCII = 0; SCAN = 1)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
* Slots are numbered starting from 1.
|
|
|
|
|
* Returned value is not a total number of threads, because there
|
|
|
|
|
can be free slots.
|
|
|
|
|
* When process is starting, system automatically creates
|
|
|
|
|
execution thread.
|
|
|
|
|
* Function gives information on the thread. Each process has
|
|
|
|
|
at least one thread. One process can create many threads,
|
|
|
|
|
in this case each thread has its own slot and the fields
|
|
|
|
|
+10, +22, +26 in these slots coincide.
|
|
|
|
|
Applications have no common way to define whether two threads
|
2006-08-03 21:30:32 +02:00
|
|
|
|
belong to one process.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The active window - window on top of the window stack -
|
|
|
|
|
receives the messages on a keyboard input. For such window
|
|
|
|
|
the position in the window stack coincides with returned value.
|
|
|
|
|
* Slot 1 corresponds to special system thread, for which:
|
|
|
|
|
* the window is in the bottom of the window stack, the fields
|
|
|
|
|
+4 and +6 contain value 1
|
|
|
|
|
* name of the process - "OS/IDLE" (supplemented by spaces)
|
|
|
|
|
* address of the process in memory is 0, size of used memory is
|
2006-08-03 21:30:32 +02:00
|
|
|
|
16 Mb (0x1000000)
|
|
|
|
|
* PID=1
|
2006-08-29 14:52:52 +02:00
|
|
|
|
* coordinates and sizes of the window and the client area are by
|
|
|
|
|
convention set to 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* status of the slot is always 0 (running)
|
|
|
|
|
* the execution time adds of time leaving on operations itself
|
|
|
|
|
and idle time in waiting for interrupt (which can be got by call
|
|
|
|
|
to subfunction 4 of function 18).
|
|
|
|
|
* Beginning from slot 2, the normal applications are placed.
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* The normal applications are placed in memory at the address
|
|
|
|
|
0 (kernel constant 'std_application_base_address').
|
2006-08-11 15:30:23 +02:00
|
|
|
|
There is no intersection, as each process has its own page table.
|
|
|
|
|
* At creation of the thread it is assigned the slot
|
|
|
|
|
in the system table and identifier (Process/Thread IDentifier =
|
|
|
|
|
PID/TID), which do not vary with time for given thread.
|
|
|
|
|
After completion of the thread its slot can be anew used
|
|
|
|
|
for another thread. The thread identifier can not be assigned
|
|
|
|
|
to other thread even after completion of this thread.
|
|
|
|
|
Identifiers, assigned to new threads, grow monotonously.
|
|
|
|
|
* If the thread has not yet defined the window by call to
|
|
|
|
|
function 0, the position and the sizes
|
|
|
|
|
of its window are considered to be zero.
|
2006-08-29 14:52:52 +02:00
|
|
|
|
* Coordinates of the client area are relative to the window.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* At the moment only the part of the buffer by a size
|
2013-11-20 22:19:36 +01:00
|
|
|
|
76 = 0x4C bytes is used. Nevertheless it is recommended to use
|
2006-08-11 15:30:23 +02:00
|
|
|
|
1-Kb buffer for the future compatibility, in the future
|
|
|
|
|
some fields can be added.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_THREAD_INFO (9)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 10 - wait for event. ===================
|
|
|
|
|
======================================================================
|
|
|
|
|
If the message queue is empty, waits for appearance of the message
|
|
|
|
|
in queue. In this state thread does not consume CPU time.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Then reads out the message from queue.
|
|
|
|
|
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 10 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = event (see the list of events)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Those events are taken into account only which enter into
|
|
|
|
|
a mask set by function 40. By default it is
|
|
|
|
|
redraw, key and button events.
|
|
|
|
|
* To check, whether there is a message in queue, use function 11.
|
|
|
|
|
To wait for no more than given time, use function 23.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_WAIT_EVENT (10)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=============== Function 11 - check for event, no wait. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
If the message queue contains event, function reads out
|
|
|
|
|
and return it. If the queue is empty, function returns 0.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 11 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - message queue is empty
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* else eax = event (see the list of events)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Those events are taken into account only, which enter into
|
|
|
|
|
a mask set by function 40. By default it is
|
|
|
|
|
redraw, key and button events.
|
|
|
|
|
* To wait for event, use function 10.
|
|
|
|
|
To wait for no more than given time, use function 23.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CHECK_EVENT (11)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=============== Function 12 - begin/end window redraw. ===============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
|
2006-08-28 15:34:54 +02:00
|
|
|
|
---------------- Subfunction 1 - begin window redraw. ----------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 12 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2006-08-28 15:34:54 +02:00
|
|
|
|
----------------- Subfunction 2 - end window redraw. -----------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 12 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Subfunction 1 deletes all buttons defined with
|
|
|
|
|
function 8, they must be defined again.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_REDRAW (12)
|
|
|
|
|
ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 13 - draw a rectangle in the window. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 13 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = [coordinate on axis x]*65536 + [size on axis x]
|
|
|
|
|
* ecx = [coordinate on axis y]*65536 + [size on axis y]
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = color 0xRRGGBB or 0x80RRGGBB for gradient fill
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Coordinates are understood as coordinates of the left upper corner
|
2006-08-11 15:30:23 +02:00
|
|
|
|
of a rectangle relative to the window.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DRAW_RECT (13)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=================== Function 14 - get screen size. ===================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 14 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = [xsize]*65536 + [ysize], where
|
|
|
|
|
* xsize = x-coordinate of the right lower corner of the screen =
|
2006-08-11 15:30:23 +02:00
|
|
|
|
horizontal size - 1
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ysize = y-coordinate of the right lower corner of the screen =
|
2006-08-11 15:30:23 +02:00
|
|
|
|
vertical size - 1
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* See also subfunction 5 of function 48 - get sizes of
|
|
|
|
|
working area of the screen.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_SCREEN_SIZE (14)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
== Function 15, subfunction 1 - set a size of the background image. ==
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = width of the image
|
|
|
|
|
* edx = height of the image
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* Before calling subfunctions 2 and 5 you should call this function
|
2007-05-10 15:48:35 +02:00
|
|
|
|
to set image size!
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* For update of the screen (after completion of a series of commands
|
|
|
|
|
working with a background) call subfunction 3.
|
|
|
|
|
* There is a pair function for get size of the background image -
|
|
|
|
|
subfunction 1 of function 39.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_SIZE_BG (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=== Function 15, subfunction 2 - put pixel on the background image. ==
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = offset
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = color of a pixel 0xRRGGBB
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Offset for a pixel with coordinates (x,y) is calculated as
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(x+y*xsize)*3.
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* If the given offset exceeds size set by subfunction 1,
|
2006-08-11 15:30:23 +02:00
|
|
|
|
the call is ignored.
|
|
|
|
|
* For update of the screen (after completion of a series of commands
|
|
|
|
|
working with a background) call subfunction 3.
|
|
|
|
|
* There is a pair function for get pixel on the background image -
|
|
|
|
|
subfunction 2 of function 39.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_PIXEL_BG (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 15, subfunction 3 - redraw background. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_REDRAW_BG (3)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
== Function 15, subfunction 4 - set drawing mode for the background. =
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
* ecx = drawing mode:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 1 = tile
|
|
|
|
|
* 2 = stretch
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* For update of the screen (after completion of a series of commands
|
|
|
|
|
working with a background) call subfunction 3.
|
|
|
|
|
* There is a pair function for get drawing mode of the background -
|
|
|
|
|
subfunction 4 of function 39.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_MODE_BG (4)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 15, subfunction 5 =====================
|
|
|
|
|
============ Put block of pixels on the background image. ============
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
|
|
|
|
* ecx = pointer to the data in the format BBGGRRBBGGRR...
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* edx = offset in data of the background image
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* esi = size of data in bytes = 3 * number of pixels
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* Offset and size are not checked for correctness.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Color of each pixel is stored as 3-bytes value BBGGRR.
|
|
|
|
|
* Pixels of the background image are written sequentially
|
|
|
|
|
from left to right, from up to down.
|
|
|
|
|
* Offset of pixel with coordinates (x,y) is (x+y*xsize)*3.
|
|
|
|
|
* For update of the screen (after completion of a series of commands
|
|
|
|
|
working with a background) call subfunction 3.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_IMAGE_BG (5)
|
2007-06-18 18:39:42 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 15, subfunction 6 =====================
|
|
|
|
|
======== Map background data to the address space of process. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = pointer to background data, 0 if error
|
|
|
|
|
Remarks:
|
|
|
|
|
* Mapped data are available for read and write.
|
|
|
|
|
* Size of background data is 3*xsize*ysize. The system blocks
|
|
|
|
|
changes of background sizes while process works with mapped data.
|
|
|
|
|
* Color of each pixel is stored as 3-bytes value BBGGRR.
|
|
|
|
|
* Pixels of the background image are written sequentially
|
|
|
|
|
from left to right, from up to down.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_MAP_BG (6)
|
2007-06-18 18:39:42 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===== Function 15, subfunction 7 - close mapped background data. =====
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
|
|
|
|
* ecx = pointer to mapped data
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 1 - success, 0 - error
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_UNMAP_BG (7)
|
2012-03-28 18:32:08 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 15, subfunction 8 =====================
|
|
|
|
|
============= Get coordinates of last draw the background ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 8 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = [left]*65536 + [right]
|
|
|
|
|
* ebx = [top]*65536 + [bottom]
|
|
|
|
|
Remarks:
|
|
|
|
|
* (left,top) are coordinates of the left upper corner,
|
|
|
|
|
(right,bottom) are coordinates of the right lower one.
|
|
|
|
|
* For receiving more reliable information, call the function
|
|
|
|
|
immediately after the event:
|
|
|
|
|
5 = kernel finished redrawing of the desktop background
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_LAST_DRAW (8)
|
2012-04-03 00:30:24 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 15, subfunction 9 =====================
|
|
|
|
|
============= Redraws a rectangular part of the background ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 15 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
|
|
|
|
* ecx = [left]*65536 + [right]
|
|
|
|
|
* edx = [top]*65536 + [bottom]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* (left,top) are coordinates of the left upper corner,
|
|
|
|
|
(right,bottom) are coordinates of the right lower one.
|
|
|
|
|
* If parameters are set incorrectly then background is not redrawn.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_SET (15)
|
|
|
|
|
ebx - SSF_REDRAW_RECT (9)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=============== Function 16 - save ramdisk on a floppy. ==============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 16 - function number
|
|
|
|
|
* ebx = 1 or ebx = 2 - on which floppy save
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 1 - error
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_RD_TO_FLOPPY (16)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======= Function 17 - get the identifier of the pressed button. ======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Takes away the code of the pressed button from the buffer.
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 17 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* if the buffer is empty, function returns eax=1
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* if the buffer is not empty:
|
|
|
|
|
* high 24 bits of eax contain button identifier (in particular,
|
|
|
|
|
ah contains low byte of the identifier; if all buttons have
|
|
|
|
|
the identifier less than 256, ah is enough to distinguish)
|
|
|
|
|
* al = 0 - the button was pressed with left mouse button
|
|
|
|
|
* al = bit corresponding to used mouse button otherwise
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* "Buffer" keeps only one button, at pressing the new button the
|
|
|
|
|
information about old is lost.
|
|
|
|
|
* The call of this function by an application with inactive window
|
|
|
|
|
will return answer "buffer is empty".
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* Returned value for al corresponds to the state of mouse buttons
|
|
|
|
|
as in subfunction 2 of function 37 at the beginning
|
|
|
|
|
of button press, excluding lower bit, which is cleared.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_BUTTON (17)
|
2011-09-27 09:08:12 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 18, subfunction 1 =====================
|
|
|
|
|
============= Make deactive the window of the given thread. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = number of the thread slot
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2012-02-26 05:22:47 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_UNFOCUS_WINDOW (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
= Function 18, subfunction 2 - terminate process/thread by the slot. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = number of the slot of process/thread
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* It is impossible to terminate system thread OS/IDLE (with
|
|
|
|
|
number of the slot 1),
|
|
|
|
|
it is possible to terminate any normal process/thread.
|
|
|
|
|
* See also subfunction 18 - terminate
|
|
|
|
|
process/thread by the identifier.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_TERMINATE_THREAD (2)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 18, subfunction 3 =====================
|
|
|
|
|
============= Make active the window of the given thread. ============
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
* ecx = number of the thread slot
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If correct, but nonexistent slot is given,
|
|
|
|
|
some window is made active.
|
|
|
|
|
* To find out, which window is active, use subfunction 7.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_FOCUS_WINDOW (3)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 18, subfunction 4 =====================
|
|
|
|
|
=========== Get counter of idle time units per one second. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Idle time units are units, in which the processor stands idle
|
|
|
|
|
in waiting for interrupt (in the command 'hlt').
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = value of the counter of idle time units per one second
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_IDLE_COUNT (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 18, subfunction 5 - get CPU clock rate. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = clock rate (modulo 2^32 clock ticks = 4GHz)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_CPU_REQUENCY (5)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2012-02-26 05:22:47 +01:00
|
|
|
|
Function 18, subfunction 6 - save ramdisk to the file on hard drive.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
2007-02-12 06:14:58 +01:00
|
|
|
|
* ecx = pointer to the full path to file
|
|
|
|
|
(for example, "/hd0/1/kolibri/kolibri.img")
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* else eax = error code of the file system
|
2007-05-16 15:59:46 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* All folders in the given path must exist, otherwise function
|
|
|
|
|
returns value 5, "file not found".
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_RD_TO_HDD (6)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=========== Function 18, subfunction 7 - get active window. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = number of the active window
|
|
|
|
|
(number of the slot of the thread with active window)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Active window is at the top of the window stack and receives
|
|
|
|
|
messages on all keyboard input.
|
|
|
|
|
* To make a window active, use subfunction 3.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_ACTIVE_WINDOW (7)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
== Function 18, subfunction 8 - disable/enable the internal speaker. =
|
|
|
|
|
======================================================================
|
|
|
|
|
If speaker sound is disabled, all calls to subfunction 55 of
|
|
|
|
|
function 55 are ignored. If speaker sound is enabled,
|
|
|
|
|
they are routed on builtin speaker.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
------------------- Subsubfunction 1 - get status. -------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 8 - subfunction number
|
|
|
|
|
* ecx = 1 - number of the subsubfunction
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - speaker sound is enabled; 1 - disabled
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
----------------- Subsubfunction 2 - toggle status. ------------------
|
|
|
|
|
Toggles states of disable/enable.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 8 - subfunction number
|
|
|
|
|
* ecx = 2 - number of the subsubfunction
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_SPEAKER (8)
|
|
|
|
|
ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2009-01-31 07:09:36 +01:00
|
|
|
|
== Function 18, subfunction 9 - system shutdown with the parameter. ==
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = parameter:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 2 = turn off computer
|
|
|
|
|
* 3 = reboot computer
|
|
|
|
|
* 4 = restart the kernel from the file 'kernel.mnt' on ramdisk
|
|
|
|
|
Returned value:
|
|
|
|
|
* at incorrect ecx the registers do not change (i.e. eax=18)
|
|
|
|
|
* by correct call function always returns eax=0
|
|
|
|
|
as the tag of success
|
|
|
|
|
Remarks:
|
|
|
|
|
* Do not rely on returned value by incorrect call, it can be
|
|
|
|
|
changed in future versions of the kernel.
|
2009-01-31 07:09:36 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_SHUTDOWN (9)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2014-02-18 19:21:49 +01:00
|
|
|
|
======= Function 18, subfunction 10 - minimize topmost window. =======
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
2014-02-18 19:21:49 +01:00
|
|
|
|
Minimizes the topmost (active) window.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 10 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The minimized window from the point of view of function 9
|
|
|
|
|
keeps position and sizes.
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* Restoring of an application window occurs at its activation by
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 3.
|
2014-02-18 19:21:49 +01:00
|
|
|
|
* Usually there is no necessity to minimize/restore a window
|
|
|
|
|
explicitly: minimization of a window is carried out by the system
|
2006-08-11 15:30:23 +02:00
|
|
|
|
at pressing the minimization button (for skinned windows
|
|
|
|
|
it is defined automatically by function 0,
|
|
|
|
|
for other windows it can be defined manually by function 8),
|
2015-02-23 17:01:43 +01:00
|
|
|
|
restore of a window is done by the application '@taskbar'.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_MINIMIZE_WINDOW (10)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2012-02-26 05:22:47 +01:00
|
|
|
|
Function 18, subfunction 11 - get information on the disk subsystem.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 11 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = type of the table:
|
2014-03-27 21:44:32 +01:00
|
|
|
|
* 1 = short version, 16 bytes
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = pointer to the buffer (in the application) for the table
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of the table: short version:
|
|
|
|
|
* +0: byte: information about FDD's (drives for floppies),
|
|
|
|
|
AAAABBBB, where AAAA gives type of the first drive, BBBB -
|
|
|
|
|
of the second regarding to the following list:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 0 = there is no drive
|
|
|
|
|
* 1 = 360Kb, 5.25''
|
|
|
|
|
* 2 = 1.2Mb, 5.25''
|
|
|
|
|
* 3 = 720Kb, 3.5''
|
|
|
|
|
* 4 = 1.44Mb, 3.5''
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 5 = 2.88Mb, 3.5'' (such drives are not used anymore)
|
|
|
|
|
For example, for the standard configuration from one 1.44-drive
|
|
|
|
|
here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B:
|
2015-02-23 17:01:43 +01:00
|
|
|
|
the value is 24h.
|
|
|
|
|
|
2014-03-27 21:44:32 +01:00
|
|
|
|
First IDE controller:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +1: byte: information about hard disks and CD-drives, AABBCCDD,
|
2006-08-03 21:30:32 +02:00
|
|
|
|
where AA corresponds to the controller IDE0, ..., DD - IDE3:
|
2014-03-27 21:44:32 +01:00
|
|
|
|
* 0 = device not found
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 1 = hard drive
|
|
|
|
|
* 2 = CD-drive
|
|
|
|
|
For example, in the case HD on IDE0 and CD on IDE2
|
|
|
|
|
this field contains 48h.
|
|
|
|
|
* +2: 4 db: number of the retrieved partitions on hard disks
|
2015-02-23 17:01:43 +01:00
|
|
|
|
at accordingly IDE0,...,IDE3.
|
|
|
|
|
|
|
|
|
|
Second IDE controller:
|
|
|
|
|
* +6: byte: information about hard disks and CD-drives, AABBCCDD,
|
|
|
|
|
where AA corresponds to the controller IDE4, ..., DD - IDE7:
|
|
|
|
|
* 0 = device not found
|
|
|
|
|
* 1 = hard drive
|
|
|
|
|
* 2 = CD-drive
|
|
|
|
|
For example, in the case HD on IDE4 and CD on IDE6
|
|
|
|
|
this field contains 48h.
|
|
|
|
|
* +7: 4 db: number of the retrieved partitions on hard disks
|
|
|
|
|
at accordingly IDE4,...,IDE7.
|
|
|
|
|
|
|
|
|
|
Third IDE controller:
|
|
|
|
|
* +11: byte: information about hard disks and CD-drives, AABBCCDD,
|
|
|
|
|
where AA corresponds to the controller IDE8, ..., DD - IDE11:
|
|
|
|
|
* 0 = device not found
|
|
|
|
|
* 1 = hard drive
|
|
|
|
|
* 2 = CD-drive
|
|
|
|
|
For example, in the case HD on IDE8 and CD on IDE10
|
|
|
|
|
this field contains 48h.
|
|
|
|
|
* +12: 4 db: number of the retrieved partitions on hard disks
|
|
|
|
|
at accordingly IDE8,...,IDE11.
|
2014-03-27 21:44:32 +01:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
If the hard disk on IDEx is absent, appropriate byte is zero,
|
|
|
|
|
otherwise it shows number of the recognized partitions, which
|
|
|
|
|
can be not presented (if the drive is not formatted or if
|
|
|
|
|
the file system is not supported). Current version of the kernel
|
2014-03-27 21:44:32 +01:00
|
|
|
|
supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks.
|
2014-03-13 08:21:24 +01:00
|
|
|
|
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2014-03-27 21:44:32 +01:00
|
|
|
|
* The table can be used for obtaining the information about
|
2006-08-11 15:30:23 +02:00
|
|
|
|
available devices.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_INFO_DISC_SYS (11)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 18, subfunction 13 - get kernel version. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 13 - subfunction number
|
|
|
|
|
* ecx = pointer to the buffer (not less than 16 bytes), where
|
|
|
|
|
the information will be placed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Structure of the buffer:
|
|
|
|
|
db a,b,c,d for version a.b.c.d
|
2010-10-24 18:06:14 +02:00
|
|
|
|
db 0: reserved
|
2007-06-11 17:42:19 +02:00
|
|
|
|
dd REV - kernel SVN revision number
|
2010-10-24 18:06:14 +02:00
|
|
|
|
For Kolibri 0.7.7.0+ kernel:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
db 0,7,7,0
|
2010-10-24 18:06:14 +02:00
|
|
|
|
db 0
|
2010-10-24 18:08:19 +02:00
|
|
|
|
dd 1675
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_KERNEL_VERSION (13)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======= Function 18, subfunction 14 - wait for screen retrace. =======
|
|
|
|
|
======================================================================
|
|
|
|
|
Waits for the beginning of retrace of the scanning ray of the screen
|
|
|
|
|
monitor.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 14 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 as the tag of success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Function is intended only for active high-efficiency graphics
|
2006-08-03 21:30:32 +02:00
|
|
|
|
applications; is used for smooth output of a graphics.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_WAIT_RETRACE (14)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
== Function 18, subfunction 15 - center mouse cursor on the screen. ==
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 15 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 as the tag of success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_CURSOR_CENTER (15)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========= Function 18, subfunction 16 - get size of free RAM. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 16 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = size of free memory in kilobytes
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_FREE_RAM (16)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======== Function 18, subfunction 17 - get full amount of RAM. =======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 17 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = total size of existing memory in kilobytes
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_TOTAL_RAM (17)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 18, subfunction 18 ====================
|
|
|
|
|
============= Terminate process/thread by the identifier. ============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 18 - subfunction number
|
|
|
|
|
* ecx = identifer of process/thread (PID/TID)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = -1 - error (process is not found or is system)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* It is impossible to terminate system thread OS/IDLE (identifier
|
|
|
|
|
1), it is possible to terminate any normal process/thread.
|
|
|
|
|
* See also subfunction 2 - terminate
|
|
|
|
|
process/thread by given slot.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_TERMINATE_THREAD_ID (18)
|
2006-08-13 15:02:57 +02:00
|
|
|
|
======================================================================
|
2006-08-18 15:32:18 +02:00
|
|
|
|
======== Function 18, subfunction 19 - get/set mouse features. =======
|
2006-08-13 15:02:57 +02:00
|
|
|
|
======================================================================
|
2006-08-18 15:32:18 +02:00
|
|
|
|
|
|
|
|
|
---------------- Subsubfunction 0 - get mouse speed. -----------------
|
2006-08-13 15:02:57 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
2006-08-18 15:32:18 +02:00
|
|
|
|
* ecx = 0 - subsubfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = current mouse speed
|
2006-08-13 15:02:57 +02:00
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
|
---------------- Subsubfunction 1 - set mouse speed. -----------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 1 - subsubfunction number
|
|
|
|
|
* edx = new value for speed
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-13 15:02:57 +02:00
|
|
|
|
|
2015-12-11 22:28:02 +01:00
|
|
|
|
Remark: recommended speed = 1, 0 = lock the cursor.
|
|
|
|
|
|
|
|
|
|
------------- Subsubfunction 2 - get mouse acceleration. -------------
|
2006-08-18 15:32:18 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 2 - subsubfunction number
|
|
|
|
|
Returned value:
|
2015-12-15 18:22:50 +01:00
|
|
|
|
* eax = 0 - off, 1 - slight, 2 - medium, 3 - intense
|
2006-08-13 15:02:57 +02:00
|
|
|
|
|
2015-12-11 22:28:02 +01:00
|
|
|
|
------------- Subsubfunction 3 - set mouse acceleration. -------------
|
2006-08-18 15:32:18 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 3 - subsubfunction number
|
2015-12-15 18:22:50 +01:00
|
|
|
|
* edx = 0 - off, 1 - slight, 2 - medium, 3 - intense
|
2006-08-18 15:32:18 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-13 15:02:57 +02:00
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
|
----------- Subsubfunction 4 - set mouse pointer position. -----------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 4 - subsubfunction number
|
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2007-09-05 23:30:16 +02:00
|
|
|
|
|
2007-09-23 22:58:50 +02:00
|
|
|
|
-------- Subsubfunction 5 - simulate state of mouse buttons. ---------
|
2007-09-05 23:30:16 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 5 - subsubfunction number
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* edx = information about emulated state of mouse buttons:
|
|
|
|
|
(same as return value in subfunction 2 of function 37)
|
2007-09-05 23:30:16 +02:00
|
|
|
|
* bit 0 is set = left button is pressed
|
|
|
|
|
* bit 1 is set = right button is pressed
|
|
|
|
|
* bit 2 is set = middle button is pressed
|
|
|
|
|
* bit 3 is set = 4th button is pressed
|
|
|
|
|
* bit 4 is set = 5th button is pressed
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2015-10-16 21:00:13 +02:00
|
|
|
|
|
|
|
|
|
-------------- Subsubfunction 6 - get doubleclick delay. -------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 6 - subsubfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = current doubleclick delay (100 = 1 second)
|
|
|
|
|
|
|
|
|
|
-------------- Subsubfunction 7 - set doubleclick delay. -------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = 7 - subsubfunction number
|
|
|
|
|
* dl = new value for doubleclick delay (100 = 1 second)
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2015-12-11 22:28:02 +01:00
|
|
|
|
Remark: mouse settings can be modified in the application mouse_cfg.
|
2006-08-13 15:02:57 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_MOUSE_SETTINGS (19)
|
|
|
|
|
ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2),
|
|
|
|
|
SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5),
|
|
|
|
|
SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7)
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 18, subfunction 20 - get information on RAM. =======
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 20 - subfunction number
|
|
|
|
|
* ecx = pointer to the buffer for information (36 bytes)
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = total size of existing RAM in pages
|
|
|
|
|
or -1 if error has occured
|
|
|
|
|
* buffer pointed to by ecx contains the following information:
|
|
|
|
|
* +0: dword: total size of existing RAM in pages
|
|
|
|
|
* +4: dword: size of free RAM in pages
|
|
|
|
|
* +8: dword: number of page faults (exceptions #PF)
|
|
|
|
|
in applications
|
|
|
|
|
* +12: dword: size of kernel heap in bytes
|
|
|
|
|
* +16: dword: free in kernel heap in bytes
|
|
|
|
|
* +20: dword: total number of memory blocks in kernel heap
|
|
|
|
|
* +24: dword: number of free memory blocks in kernel heap
|
|
|
|
|
* +28: dword: size of maximum free block in kernel heap
|
|
|
|
|
(reserved)
|
|
|
|
|
* +32: dword: size of maximum allocated block in kernel heap
|
|
|
|
|
(reserved)
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_RAM_INFO (20)
|
2007-08-23 00:34:57 +02:00
|
|
|
|
======================================================================
|
2007-09-23 22:58:50 +02:00
|
|
|
|
===================== Function 18, subfunction 21 ====================
|
|
|
|
|
======== Get slot number of process/thread by the identifier. ========
|
2007-08-23 00:34:57 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 21 - subfunction number
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* ecx = identifer of process/thread (PID/TID)
|
2007-08-23 00:34:57 +02:00
|
|
|
|
Returned value:
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* eax = 0 - error (invalid identifier)
|
|
|
|
|
* otherwise eax = slot number
|
2007-08-23 00:34:57 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_GET_THREAD_SLOT (21)
|
2007-08-23 00:34:57 +02:00
|
|
|
|
======================================================================
|
2007-09-23 22:58:50 +02:00
|
|
|
|
===================== Function 18, subfunction 22 ====================
|
|
|
|
|
============== Operations with window of another thread. =============
|
2007-08-23 00:34:57 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 22 - subfunction number
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* ecx = operation type:
|
|
|
|
|
* 0 = minimize window of the thread with given slot number
|
|
|
|
|
* 1 = minimize window of the thread with given identifier
|
|
|
|
|
* 2 = restore window of the thread with given slot number
|
|
|
|
|
* 3 = restore window of the thread with given identifier
|
|
|
|
|
* edx = parameter (slot number or PID/TID)
|
2007-08-23 00:34:57 +02:00
|
|
|
|
Returned value:
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = -1 - error (invalid identifier)
|
|
|
|
|
Remarks:
|
|
|
|
|
* The thread can minimize its window with subfunction 10.
|
|
|
|
|
* One can restore and activate window simultaneously with
|
|
|
|
|
subfunction 3 (which requires slot number).
|
2007-08-23 00:34:57 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_FOREIGN_WINDOW (22)
|
|
|
|
|
ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2),
|
|
|
|
|
SSSF_RESTORE_ID (3)
|
2012-04-26 16:21:46 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 18, subfunction 23 - minimize all windows. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 23 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - all windows have been minimized before a function call
|
|
|
|
|
* eax = N - number of windows minimized from function
|
|
|
|
|
Remarks:
|
|
|
|
|
* Window of special thread (name begin to symbol @) is not minimize.
|
2012-05-01 00:07:24 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_MINIMIZE_ALL (23)
|
2012-05-01 00:07:24 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======= Function 18, subfunction 24 - set limits of screen. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 24 - subfunction number
|
|
|
|
|
* ecx = new X size
|
|
|
|
|
* edx = new Y size
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* The function does not change the physical size of the video mode.
|
|
|
|
|
It is designed for non-standard displays which display the image
|
|
|
|
|
partially.
|
|
|
|
|
* The sizes specified in the function should not exceed the sizes
|
|
|
|
|
of the current video mode, otherwise the function will not change
|
|
|
|
|
anything.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_SET_SCREEN_LIMITS (24)
|
2015-10-09 15:59:11 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 18, subfunction 25 ====================
|
|
|
|
|
===== Control position of the window relative to other windows. ======
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
|
------------- Subsubfunction 1 - get position -----------------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 25 - subfunction number
|
|
|
|
|
* ecx = 1 - subsubfunction number
|
|
|
|
|
* edx = -1(for current window) or PID application
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = one of the constants window position
|
|
|
|
|
|
|
|
|
|
------------- Subsubfunction 2 - set position -----------------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 18 - function number
|
|
|
|
|
* ebx = 25 - subfunction number
|
|
|
|
|
* ecx = 2 - subsubfunction number
|
|
|
|
|
* edx = -1(for current window) or PID application
|
|
|
|
|
* esi = new window position (one of the constants below)
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - error
|
|
|
|
|
* eax = 1 - success
|
|
|
|
|
|
|
|
|
|
Constant position of the window relative to other windows:
|
2015-10-27 21:29:29 +01:00
|
|
|
|
ZPOS_DESKTOP = -2 - on the background
|
|
|
|
|
ZPOS_ALWAYS_BACK = -1 - behind all the windows
|
|
|
|
|
ZPOS_NORMAL = 0 - normal
|
|
|
|
|
ZPOS_ALWAYS_TOP = 1 - on top of all windows
|
2015-10-09 15:59:11 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM (18)
|
|
|
|
|
ebx - SSF_WINDOW_BEHAVIOR (25)
|
|
|
|
|
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
==================== Function 20 - MIDI interface. ===================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
----------------------- Subfunction 1 - reset ------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 20 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
-------------------- Subfunction 2 - output byte ---------------------
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 20 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* cl = byte for output
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Returned value (is the same for both subfunctions):
|
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 1 - base port is not defined
|
|
|
|
|
Remarks:
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* Previously the base port must be defined by
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 1 of function 21.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_MIDI (20)
|
|
|
|
|
ebx - SSF_RESET (1), SSF_OUTPUT (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======== Function 21, subfunction 1 - set MPU MIDI base port. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 21 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = number of base port
|
|
|
|
|
Returned value
|
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = -1 - erratic number of a port
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF.
|
|
|
|
|
* The installation of base is necessary for function 20.
|
|
|
|
|
* To get base port use subfunction 1 of function 26.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_SET (21)
|
|
|
|
|
ebx - SSF_MPU_MIDI_BASE (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 21, subfunction 2 - set keyboard layout. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
|
|
|
|
|
which will be read by function 2.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 21 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
|
|
|
|
* ecx = which layout to set:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 1 = normal layout
|
|
|
|
|
* 2 = layout at pressed Shift
|
|
|
|
|
* 3 = layout at pressed Alt
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = pointer to layout - table of length 128 bytes
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Or:
|
|
|
|
|
* ecx = 9
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - incorrect parameter
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If Alt is pressed, the layout with Alt is used;
|
|
|
|
|
if Alt is not pressed, but Shift is pressed,
|
|
|
|
|
the layout with Shift is used;
|
|
|
|
|
if Alt and Shift are not pressed, but Ctrl is pressed, the normal
|
|
|
|
|
layout is used and then from the code is subtracted 0x60;
|
|
|
|
|
if no control key is pressed, the normal layout is used.
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* To get layout and country identifier use
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 2 of function 26.
|
|
|
|
|
* Country identifier is global system variable, which is not used
|
2015-02-23 17:01:43 +01:00
|
|
|
|
by the kernel itself; however the application '@taskbar' displays
|
2006-08-11 15:30:23 +02:00
|
|
|
|
the corresponding icon.
|
2015-02-23 17:01:43 +01:00
|
|
|
|
* The application @taskbar switches layouts on user request.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_SET (21)
|
|
|
|
|
ebx - SSF_KEYBOARD_LAYOUT (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 21, subfunction 5 - set system language. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 21 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
|
|
|
|
* ecx = system language (1=eng, 2=fi, 3=ger, 4=rus)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* System language is global system variable and is not used
|
2015-02-23 17:01:43 +01:00
|
|
|
|
by the kernel itself, however application @taskbar draws the
|
2006-08-11 15:30:23 +02:00
|
|
|
|
appropriate icon.
|
|
|
|
|
* Function does not check for correctness, as the kernel does not
|
|
|
|
|
use this variable.
|
|
|
|
|
* To get system language use subfunction 5 of function 26.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_SET (21)
|
|
|
|
|
ebx - SSF_SYS_LANG (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2012-02-26 05:22:47 +01:00
|
|
|
|
Function 21, subfunction 11 - enable/disable low-level access to HD.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 21 - function number
|
|
|
|
|
* ebx = 11 - subfunction number
|
|
|
|
|
* ecx = 0/1 - disable/enable
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Is used in LBA-read (subfunction 8 of function 58).
|
|
|
|
|
* The current implementation uses only low bit of ecx.
|
|
|
|
|
* To get current status use subfunction 11 of function 26.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_SET (21)
|
|
|
|
|
ebx - SSF_ACCESS_HD_LBA (11)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2012-02-26 05:22:47 +01:00
|
|
|
|
Function 21, subfunction 12 - enable/disable low-level access to PCI.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 21 - function number
|
|
|
|
|
* ebx = 12 - subfunction number
|
|
|
|
|
* ecx = 0/1 - disable/enable
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Is used in operations with PCI bus (function 62).
|
|
|
|
|
* The current implementation uses only low bit of ecx.
|
|
|
|
|
* To get current status use subfunction 12 of function 26.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_SET (21)
|
|
|
|
|
ebx - SSF_ACCESS_PCI (12)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
================= Function 22 - set system date/time. ================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 22 - function number
|
|
|
|
|
* ebx = 0 - set time
|
|
|
|
|
* ecx = 0x00SSMMHH - time in the binary-decimal code (BCD):
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* HH=hour 00..23
|
|
|
|
|
* MM=minute 00..59
|
|
|
|
|
* SS=second 00..59
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ebx = 1 - set date
|
|
|
|
|
* ecx = 0x00DDMMYY - date in the binary-decimal code (BCD):
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* DD=day 01..31
|
|
|
|
|
* MM=month 01..12
|
|
|
|
|
* YY=year 00..99
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ebx = 2 - set day of week
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = 1 for Sunday, ..., 7 for Saturday
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ebx = 3 - set alarm clock
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = 0x00SSMMHH
|
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - incorrect parameter
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 2 - CMOS-battery was unloaded
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Value of installation of day of week seems to be doubtful,
|
|
|
|
|
as it a little where is used
|
|
|
|
|
(day of week can be calculated by date).
|
|
|
|
|
* Alarm clock can be set on operation in the given time every day.
|
|
|
|
|
But there is no existing system function to disable it.
|
|
|
|
|
* Operation of alarm clock consists in generation IRQ8.
|
|
|
|
|
* Generally CMOS supports for alarm clock set of value 0xFF
|
|
|
|
|
as one of parameters and it means that the appropriate parameter
|
|
|
|
|
is ignored. But current implementation does not allow this
|
|
|
|
|
(will return 1).
|
|
|
|
|
* Alarm clock is a global system resource; the set of
|
|
|
|
|
an alarm clock cancels automatically the previous set.
|
|
|
|
|
However, at moment no program uses it.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SET_TIME_DATE (22)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============= Function 23 - wait for event with timeout. =============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
If the message queue is empty, waits for new message in the queue,
|
|
|
|
|
but no more than given time. Then reads out a message from the queue.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 23 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = timeout (in 1/100 of second)
|
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - the message queue is empty
|
|
|
|
|
* otherwise eax = event (see the list of events)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Only those events are taken into account, which enter into
|
|
|
|
|
the mask set by function 40. By default it is
|
|
|
|
|
redraw, key and button events.
|
|
|
|
|
* To check for presence of a message in the queue use function 11.
|
|
|
|
|
To wait without timeout use function 10.
|
|
|
|
|
* Transmission ebx=0 results in immediate returning eax=0.
|
|
|
|
|
* Current implementation returns immediately with eax=0,
|
|
|
|
|
if the addition of ebx with the current value of time counter
|
|
|
|
|
makes 32-bit overflow.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_WAIT_EVENT_TIMEOUT (23)
|
2007-07-26 14:25:17 +02:00
|
|
|
|
======================================================================
|
2007-09-23 22:58:50 +02:00
|
|
|
|
======= Function 24, subfunction 4 - eject tray of disk drive. =======
|
2007-07-26 14:25:17 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 24 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* ecx = position of CD/DVD-drive
|
2014-03-28 21:04:31 +01:00
|
|
|
|
from 0=Primary Master to 3=Secondary Slave for first IDE contr.
|
|
|
|
|
from 4=Primary Master to 7=Secondary Slave for second IDE contr.
|
|
|
|
|
from 8=Primary Master to 11=Secondary Slave for third IDE contr.
|
2007-07-26 14:25:17 +02:00
|
|
|
|
Returned value:
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* function does not return value
|
2007-07-26 14:25:17 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
* The function is supported only for ATAPI devices (CD and DVD).
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* When the tray is being ejected,
|
|
|
|
|
manual control of tray is unlocked.
|
|
|
|
|
* When the tray is being ejected, the code clears the cache for
|
|
|
|
|
corresponding device.
|
2007-07-26 14:25:17 +02:00
|
|
|
|
* An example of usage of the function is the application CD_tray.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CD (24)
|
|
|
|
|
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
|
2007-07-26 14:25:17 +02:00
|
|
|
|
======================================================================
|
2007-09-23 22:58:50 +02:00
|
|
|
|
======== Function 24, subfunction 5 - load tray of disk drive. =======
|
2007-07-26 14:25:17 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 24 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* ecx = position of CD/DVD-drive
|
2014-03-28 21:04:31 +01:00
|
|
|
|
from 0=Primary Master to 3=Secondary Slave for first IDE contr.
|
|
|
|
|
from 4=Primary Master to 7=Secondary Slave for second IDE contr.
|
|
|
|
|
from 8=Primary Master to 11=Secondary Slave for third IDE contr.
|
2007-07-26 14:25:17 +02:00
|
|
|
|
Returned value:
|
2007-09-23 22:58:50 +02:00
|
|
|
|
* function does not return value
|
2007-07-26 14:25:17 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
* The function is supported only for ATAPI devices (CD and DVD).
|
|
|
|
|
* An example of usage of the function is the application CD_tray.
|
2013-10-21 11:30:07 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CD (24)
|
|
|
|
|
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
|
2013-10-21 11:30:07 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======= Function 25 - put image area on the background layer. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Paramters:
|
|
|
|
|
* eax = 25 - function number
|
|
|
|
|
* ebx = pointer to the previously allocated memory area,
|
|
|
|
|
where placed the source images in a format BBGGRRTTBBGGRRTT...
|
|
|
|
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Coordinates of the image are coordinates of the upper left corner
|
|
|
|
|
of the image relative to the screen.
|
|
|
|
|
* Size of the image in bytes is 4*xsize*ysize
|
|
|
|
|
* TT - byte pointer of transparency, at current version:
|
|
|
|
|
1 to FF - opaque, 0 - transparent.
|
|
|
|
|
* The function places the image directly to LFB. It is not for
|
|
|
|
|
background image f.15. Options f.15 to f.25 does not make sense.
|
2007-07-26 14:25:17 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SCREEN_PUT_IMAGE (25)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = port number
|
|
|
|
|
Parameters:
|
|
|
|
|
* To set base port use subfunction 1 of function 21.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_MPU_MIDI_BASE (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 26, subfunction 2 - get keyboard layout. =========
|
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
The keyboard layout is used to convert keyboard scancodes to
|
|
|
|
|
ASCII-codes for function 2.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = what layout to get:
|
|
|
|
|
* 1 = normal layout
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 2 = layout with pressed Shift
|
|
|
|
|
* 3 = layout with pressed Alt
|
|
|
|
|
* edx = pointer to the 128-bytes buffer, where the layout will be
|
|
|
|
|
copied
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Or:
|
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = 9
|
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = country identifier (1=eng, 2=fi, 3=ger, 4=rus)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If Alt is pressed, the layout with Alt is used;
|
|
|
|
|
if Alt is not pressed, but Shift is pressed,
|
|
|
|
|
the layout with Shift is used;
|
|
|
|
|
if Alt and Shift are not pressed, but Ctrl is pressed, the normal
|
|
|
|
|
layout is used and then from the code is subtracted 0x60;
|
|
|
|
|
if no control key is pressed, the normal layout is used.
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* To set layout and country identifier use
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 2 of function 21.
|
|
|
|
|
* Country identifier is global system variable, which is not used
|
2015-02-23 17:01:43 +01:00
|
|
|
|
by the kernel itself; however the application '@taskbar' displays
|
2006-08-11 15:30:23 +02:00
|
|
|
|
the corresponding icon (using this function).
|
2015-02-23 17:01:43 +01:00
|
|
|
|
* The application @taskbar switches layouts on user request.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_KEYBOARD_LAYOUT (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 26, subfunction 5 - get system language. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = system language (1=eng, 2=fi, 3=ger, 4=rus)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* System language is global system variable and is not used
|
2015-02-23 17:01:43 +01:00
|
|
|
|
by the kernel itself, however application @taskbar draws the
|
2006-08-11 15:30:23 +02:00
|
|
|
|
appropriate icon (using this function).
|
|
|
|
|
* To set system language use subfunction 5 of function 21.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_SYS_LANG (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=== Function 26, subfunction 9 - get the value of the time counter. ==
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = number of 1/100s of second, past from the system boot time
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Counter takes modulo 2^32, that correspond to a little more
|
|
|
|
|
than 497 days.
|
2015-09-06 13:32:52 +02:00
|
|
|
|
* To get system time use function 3.
|
2016-01-12 17:47:06 +01:00
|
|
|
|
|
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_TIME_COUNT (9)
|
2015-09-06 13:32:52 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 26, subfunction 10 ====================
|
|
|
|
|
========== Get the value of the high precision time counter. =========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 10 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = number of nanoseconds since system boot time (lower DWORD)
|
|
|
|
|
* edx = number of nanoseconds since system boot time (high DWORD)
|
|
|
|
|
Remarks:
|
|
|
|
|
* The counter is based on HPET, if HPET is not available, resolution
|
|
|
|
|
will be reduced to 10 000 000 nanoseconds.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_TIME_COUNT_PRO (10)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 26, subfunction 11 ====================
|
|
|
|
|
========== Find out whether low-level HD access is enabled. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 11 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0/1 - disabled/enabled
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Is used in LBA read (subfunction 8 of function 58).
|
|
|
|
|
* To set current state use subfunction 11 of function 21.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_ACCESS_HD_LBA (11)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 26, subfunction 12 ====================
|
|
|
|
|
========== Find out whether low-level PCI access is enabled. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 26 - function number
|
|
|
|
|
* ebx = 12 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0/1 - disabled/enabled
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Is used by operations with PCI bus (function 62).
|
|
|
|
|
* The current implementation uses only low bit of ecx.
|
|
|
|
|
* To set the current state use subfunction 12 of function 21.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYSTEM_GET (26)
|
|
|
|
|
ebx - SSF_ACCESS_PCI (12)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=================== Function 29 - get system date. ===================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 29 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0x00DDMMYY, where
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(binary-decimal coding, BCD, is used)
|
|
|
|
|
* YY = two low digits of year (00..99)
|
|
|
|
|
* MM = month (01..12)
|
|
|
|
|
* DD = day (01..31)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* To set system date use function 22.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_SYS_DATE (29)
|
2007-05-24 13:27:05 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============= Function 30 - work with the current folder. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
|
--------- Subfunction 1 - set current folder for the thread. ---------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 30 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = pointer to ASCIIZ-string with the path to new current folder
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
|
|
|
|
--------- Subfunction 2 - get current folder for the thread. ---------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 30 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
|
|
|
|
* ecx = pointer to buffer
|
|
|
|
|
* edx = size of buffer
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = size of the current folder's name (including terminating 0)
|
|
|
|
|
Remarks:
|
|
|
|
|
* If the buffer is too small to hold all data, only first (edx-1)
|
|
|
|
|
bytes are copied and than terminating 0 is inserted.
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* By default, current folder for the thread is "/rd/1".
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* At process/thread creation the current folder will be inherited
|
2010-10-17 10:53:29 +02:00
|
|
|
|
from the parent.
|
2009-01-31 07:09:36 +01:00
|
|
|
|
|
2013-06-15 23:17:06 +02:00
|
|
|
|
--- Subfunction 3 - install the add.system directory for the kernel --
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 30 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
* ecx = pointer to a block of data:
|
|
|
|
|
sysdir_name rb 64
|
|
|
|
|
sysdir_path rb 64
|
2013-07-08 10:17:53 +02:00
|
|
|
|
For example:
|
|
|
|
|
dir_name1 db 'KolibriOS',0
|
2013-09-17 11:22:10 +02:00
|
|
|
|
rb 64-10
|
2013-06-15 23:17:06 +02:00
|
|
|
|
dir_path1 db 'HD0/1',0
|
|
|
|
|
rb 64-6
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* The function can be called only 1 time for 1 session of the OS.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CURRENT_FOLDER (30)
|
|
|
|
|
ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3)
|
2012-03-27 15:25:30 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========= Function 34 - who owner the pixel on the screen. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 34 - function number
|
|
|
|
|
* ebx = x-coordinate (relative to the display)
|
|
|
|
|
* ecx = y-coordinate (relative to the display)
|
|
|
|
|
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0x000000XX - owner of pixel the slot window N
|
|
|
|
|
If incorrect values ebx and ecx then function returns 0
|
|
|
|
|
* The function takes the value from the area [_WinMapAddress]
|
2013-07-08 10:17:53 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_PIXEL_OWNER (34)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======= Function 35 - read the color of a pixel on the screen. =======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 35
|
|
|
|
|
* ebx = y*xsize+x, where
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* (x,y) = coordinates of a pixel (beginning from 0)
|
|
|
|
|
* xsize = horizontal screen size
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = color 0x00RRGGBB
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* To get screen sizes use function 14. Pay attention,
|
|
|
|
|
that it subtracts 1 from both sizes.
|
|
|
|
|
* There is also direct access (without any system calls)
|
|
|
|
|
to videomemory through the selector gs. To get parameters of
|
|
|
|
|
the current videomode, use function 61.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_PIXEL (35)
|
2008-11-16 16:23:40 +01:00
|
|
|
|
======================================================================
|
2009-01-31 07:09:36 +01:00
|
|
|
|
=================== Function 36 - read screen area. ==================
|
2008-11-16 16:23:40 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
Paramters:
|
|
|
|
|
* eax = 36 - function number
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* ebx = pointer to the previously allocated memory area,
|
|
|
|
|
where will be placed the image in the format BBGGRRBBGGRR...
|
2008-11-16 16:23:40 +01:00
|
|
|
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Coordinates of the image are coordinates of the upper left corner
|
2008-11-17 09:05:51 +01:00
|
|
|
|
of the image relative to the screen.
|
2008-11-16 16:23:40 +01:00
|
|
|
|
* Size of the image in bytes is 3*xsize*ysize.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_IMAGE (36)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2007-01-17 15:43:18 +01:00
|
|
|
|
=================== Function 37 - work with mouse. ===================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
---------- Subfunction 0 - screen coordinates of the mouse -----------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = x*65536 + y, (x,y)=coordinates of the mouse pointer
|
|
|
|
|
(beginning from 0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
-- Subfunction 1 - coordinates of the mouse relative to the window ---
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = x*65536 + y, (x,y)=coordinates of the mouse pointer
|
|
|
|
|
relative to the application window (beginning from 0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The value is calculated by formula (x-xwnd)*65536 + (y-ywnd).
|
|
|
|
|
If y>=ywnd, the low word is non-negative and contains
|
|
|
|
|
relative y-coordinate, and the high word - relative x-coordinate
|
|
|
|
|
(with correct sign). Otherwise the low word is negative and still
|
|
|
|
|
contains relative y-coordinate, and to the high word
|
|
|
|
|
1 should be added.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2015-10-16 21:00:13 +02:00
|
|
|
|
------------- Subfunction 2 - states of the mouse buttons ------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2015-10-16 21:00:13 +02:00
|
|
|
|
* eax = bits 0-4 equal to subfunction 3
|
|
|
|
|
|
|
|
|
|
------- Subfunction 3 - states and events of the mouse buttons -------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax contains next information:
|
|
|
|
|
|
|
|
|
|
states:
|
|
|
|
|
* bit 0 is set = left button is held
|
|
|
|
|
* bit 1 is set = right button is held
|
|
|
|
|
* bit 2 is set = middle button is held
|
|
|
|
|
* bit 3 is set = 4th button is held
|
|
|
|
|
* bit 4 is set = 5th button is held
|
|
|
|
|
|
|
|
|
|
events:
|
|
|
|
|
* bit 8 is set = left button is pressed
|
|
|
|
|
* bit 9 is set = right button is pressed
|
|
|
|
|
* bit 10 is set = middle button is pressed
|
|
|
|
|
|
|
|
|
|
* bit 15 is set = vertical scroll is used
|
|
|
|
|
|
|
|
|
|
* bit 16 is set = left button is released
|
|
|
|
|
* bit 17 is set = right button is released
|
|
|
|
|
* bit 18 is set = middle button is released
|
|
|
|
|
|
|
|
|
|
* bit 23 is set = horisontal scroll is used
|
|
|
|
|
|
|
|
|
|
* bit 24 is set = doubleclick by left button
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2007-01-17 15:43:18 +01:00
|
|
|
|
-------------------- Subfunction 4 - load cursor ---------------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
* dx = data source:
|
|
|
|
|
* dx = LOAD_FROM_FILE = 0 - data in a file
|
|
|
|
|
* ecx = pointer to full path to the cursor file
|
|
|
|
|
* the file must be in the format .cur, which is standard for
|
|
|
|
|
MS Windows, at that of the size 32*32 pixels
|
|
|
|
|
* dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory
|
|
|
|
|
* ecx = pointer to data of the cursor file
|
|
|
|
|
* the data format is the same as in the previous case
|
|
|
|
|
* dx = LOAD_INDIRECT = 2 - data in memory
|
|
|
|
|
* ecx = pointer to cursor image in the format ARGB 32*32 pixels
|
|
|
|
|
* edx = 0xXXYY0002, where
|
|
|
|
|
* XX = x-coordinate of cursor hotspot
|
|
|
|
|
* YY = y-coordinate
|
|
|
|
|
* 0 <= XX, YY <= 31
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - failed
|
|
|
|
|
* otherwise eax = cursor handle
|
|
|
|
|
|
|
|
|
|
--------------------- Subfunction 5 - set cursor ---------------------
|
|
|
|
|
Sets new cursor for the window of the current thread.
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
|
|
|
|
* ecx = cursor handle
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = handle of previous cursor
|
|
|
|
|
Remarks:
|
|
|
|
|
* If the handle is incorrect, the function restores the default
|
|
|
|
|
cursor (standard arrow). In particular, ecx=0 restores it.
|
|
|
|
|
|
|
|
|
|
------------------- Subfunction 6 - delete cursor --------------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
|
|
|
|
* ecx = cursor handle
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax destroyed
|
|
|
|
|
Remarks:
|
|
|
|
|
* The cursor must be loaded previously by the current thread
|
|
|
|
|
(with the call to subfunction 4). The function does not delete
|
|
|
|
|
system cursors and cursors, loaded by another applications.
|
|
|
|
|
* If the active cursor (set by subfunction 5) is deleted,
|
|
|
|
|
the system restores the default cursor (standard arrow).
|
|
|
|
|
|
2007-05-16 15:59:46 +02:00
|
|
|
|
------------------ Subfunction 7 - get scroll data -------------------
|
2007-05-10 16:43:38 +02:00
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 37 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
|
|
|
|
Returned value:
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* eax = [horizontal offset]*65536 + [vertical offset]
|
2007-05-10 16:43:38 +02:00
|
|
|
|
Remarks:
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* Scroll data is available for active window only.
|
|
|
|
|
* Values are zeroed after reading.
|
|
|
|
|
* Values are signed.
|
2007-05-10 16:43:38 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_MOUSE_GET (37)
|
|
|
|
|
ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1),
|
|
|
|
|
SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4),
|
|
|
|
|
SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
====================== Function 38 - draw line. ======================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 38 - function number
|
|
|
|
|
* ebx = [start coordinate on axis x]*65536 +
|
|
|
|
|
[end coordinate on axis x]
|
|
|
|
|
* ecx = [start coordinate on axis y]*65536 +
|
|
|
|
|
[end coordinate on axis y]
|
|
|
|
|
* edx = 0x00RRGGBB - color
|
2006-08-21 15:06:02 +02:00
|
|
|
|
edx = 0x01xxxxxx - draw inversed line
|
|
|
|
|
(low 24 bits are ignored)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Coordinates are relative to the window.
|
|
|
|
|
* End point is also drawn.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DRAW_LINE (38)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
== Function 39, subfunction 1 - get a size of the background image. ==
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 39 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = [width]*65536 + [height]
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* There is a pair function to set sizes of background image -
|
|
|
|
|
subfunction 1 of function 15. After which it is necessary,
|
|
|
|
|
of course, anew to define image.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_GET (39)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
== Function 39, subfunction 2 - get pixel from the background image. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 39 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = offset
|
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0x00RRGGBB - pixel color, if offset is valid
|
|
|
|
|
(less than 0x160000-16)
|
|
|
|
|
* eax = 2 otherwise
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Do not rely on returned value for invalid offsets, it may be
|
|
|
|
|
changed in future kernel versions.
|
|
|
|
|
* Offset for pixel with coordinates (x,y)
|
|
|
|
|
is calculated as (x+y*xsize)*3.
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* There is a pair function to set pixel on the background image -
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 2 of function 15.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_GET (39)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
== Function 39, subfunction 4 - get drawing mode for the background. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 39 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 1 - tile
|
|
|
|
|
* eax = 2 - stretch
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2012-02-26 05:22:47 +01:00
|
|
|
|
* There is a pair function to set drawing mode -
|
2006-08-11 15:30:23 +02:00
|
|
|
|
subfunction 4 of function 15.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BACKGROUND_GET (39)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=========== Function 40 - set the mask for expected events. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
The mask for expected events affects function working with events
|
|
|
|
|
10, 11, 23 - they notify only about events allowed by this mask.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 40 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = mask: bit i corresponds to event i+1 (see list of events)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(set bit permits notice on event)
|
2013-09-29 15:41:21 +02:00
|
|
|
|
bit 31: mouse active/inactive filter
|
2012-02-28 09:36:15 +01:00
|
|
|
|
bit 31 = 0 - inactive window receive mouse events
|
|
|
|
|
bit 31 = 1 - inactive window does not receive mouse events
|
|
|
|
|
bit 30: cursor position filter
|
|
|
|
|
bit 30 = 0 = the window receive mouse events if cursor
|
|
|
|
|
outside window
|
|
|
|
|
bit 30 = 1 - the window does not receive mouse events if cursor
|
|
|
|
|
outside window
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2009-09-08 13:32:39 +02:00
|
|
|
|
* eax = previous value of mask
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Default mask (7=111b) enables nofices about redraw,
|
|
|
|
|
keys and buttons. This is enough for many applications.
|
|
|
|
|
* Events prohibited in the mask are saved anyway, when come;
|
|
|
|
|
they are simply not informed with event functions.
|
|
|
|
|
* Event functions take into account the mask on moment of
|
|
|
|
|
function call, not on moment of event arrival.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SET_EVENTS_MASK (40)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
================ Function 43 - input/output to a port. ===============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
------------------------ Output data to port -------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 43 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bl = byte for output
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ecx = port number 0xnnnn (from 0 to 0xFFFF)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - the thread has not reserved the selected port
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
------------------------ Input data from port ------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 43 - function number
|
|
|
|
|
* ebx is ignored
|
|
|
|
|
* ecx = 0x8000nnnn, where nnnn = port number (from 0 to 0xFFFF)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success, thus ebx = entered byte
|
|
|
|
|
* eax = 1 - the thread has not reserved the selected port
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Previously the thread must reserve the selected port
|
|
|
|
|
for itself by function 46.
|
|
|
|
|
* Instead of call to this function it is better to use
|
|
|
|
|
processor instructions in/out - this is much
|
|
|
|
|
faster and a bit shorter and easier.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PORT_IN_OUT (43)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
====== Function 46 - reserve/free a group of input/output ports. =====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
To work with reserved ports an application can access directly by
|
|
|
|
|
commands in/out (recommended way) and can use function 43
|
|
|
|
|
(not recommended way).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 46 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = 0 - reserve, 1 - free
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ecx = start port number
|
|
|
|
|
* edx = end port number (inclusive)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 1 - error
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* For ports reservation: an error occurs if and only if
|
|
|
|
|
one from the following condition satisfies:
|
|
|
|
|
* start port is more than end port;
|
|
|
|
|
* the selected range contains incorrect port number
|
|
|
|
|
(correct are from 0 to 0xFFFF);
|
|
|
|
|
* limit for the total number of reserved areas is exceeded
|
|
|
|
|
(maximum 255 are allowed);
|
|
|
|
|
* the selected range intersects with any of earlier reserved
|
|
|
|
|
* For ports free: an error is an attempt to free range,
|
|
|
|
|
that was not earlier reserved by this function
|
|
|
|
|
(with same ecx,edx).
|
|
|
|
|
* If an error occurs (for both cases) function performs no action.
|
2007-01-17 15:43:18 +01:00
|
|
|
|
* At booting the system reserves for itself ports
|
|
|
|
|
0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively).
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* When a thread terminates, all reserved by it ports
|
|
|
|
|
are freed automatically.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SET_PORTS (46)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============= Function 47 - draw a number in the window. =============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 47 - function number
|
|
|
|
|
* ebx = parameters of conversion number to text:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bl = 0 - ecx contains number
|
2007-10-25 13:20:02 +02:00
|
|
|
|
* bl = 1 - ecx contains pointer to dword/qword-number
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* bh = 0 - display in decimal number system
|
|
|
|
|
* bh = 1 - display in hexadecimal system
|
|
|
|
|
* bh = 2 - display in binary system
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* bits 16-21 = how many digits to display
|
2007-10-18 18:27:26 +02:00
|
|
|
|
* bits 22-29 reserved and must be set to 0
|
2007-10-25 13:20:02 +02:00
|
|
|
|
* bit 30 set = display qword (64-bit) number (must be bl=1)
|
|
|
|
|
* bit 31 set = do not display leading zeroes of the number
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ecx = number (if bl=0) or pointer (if bl=1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
2006-08-28 15:34:54 +02:00
|
|
|
|
* esi = 0xX0RRGGBB:
|
|
|
|
|
* RR, GG, BB specify the color
|
|
|
|
|
* X = ABnn (bits)
|
|
|
|
|
* nn = font (0/1)
|
|
|
|
|
* A is ignored
|
|
|
|
|
* B=1 - fill background with the color edi
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The given length must not exceed 60.
|
|
|
|
|
* The exactly given amount of digits is output. If number is small
|
|
|
|
|
and can be written by smaller amount of digits, it is supplemented
|
|
|
|
|
by leading zeroes; if the number is big and can not be written by
|
|
|
|
|
given amount of digits, extra digits are not drawn.
|
|
|
|
|
* Parameters of fonts are shown in the description of function 4
|
|
|
|
|
(text output).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DRAW_NUMBER (47)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========= Function 48, subfunction 0 - apply screen settings. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = 0 - reserved
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Function redraws the screen after parameters change by
|
2006-08-03 21:30:32 +02:00
|
|
|
|
subfunctions 1 and 2.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Function call without prior call to one of indicated subfunctions
|
|
|
|
|
is ignored.
|
|
|
|
|
* Function call with nonzero ecx is ignored.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_APPLY (0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=========== Function 48, subfunction 1 - set button style. ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = button style:
|
|
|
|
|
* 0 = flat
|
|
|
|
|
* 1 = 3d
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* After call to this function one should redraw the screen by
|
|
|
|
|
subfunction 0.
|
|
|
|
|
* Button style influences only to their draw of function 8.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_BUTTON_STYLE (1)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
====== Function 48, subfunction 2 - set standard window colors. ======
|
|
|
|
|
======================================================================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
|
|
|
|
* ecx = pointer to the color table
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* edx = size of the color table
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(must be 40 bytes for future compatibility)
|
|
|
|
|
Format of the color table is shown in description of subfunction 3.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* After call to this function one should redraw the screen by
|
|
|
|
|
subfunction 0.
|
|
|
|
|
* Table of standard colors influences only to applications,
|
|
|
|
|
which receive this table obviously (by subfunction 3)
|
|
|
|
|
and use it (specifying colors from it to drawing functions).
|
|
|
|
|
* Table of standard colors is included in skin and is installed
|
|
|
|
|
anew with skin installation (by subfunction 8).
|
|
|
|
|
* Color table can be viewed/changed interactively with
|
|
|
|
|
the application 'desktop'.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_COLORS (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
====== Function 48, subfunction 3 - get standard window colors. ======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
* ecx = pointer to the buffer with size edx bytes,
|
|
|
|
|
where table will be written
|
|
|
|
|
* edx = size of color table
|
|
|
|
|
(must be 40 bytes for future compatibility)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of the color table:
|
|
|
|
|
each item is dword-value for color 0x00RRGGBB
|
|
|
|
|
* +0: dword: frames - color of frame
|
|
|
|
|
* +4: dword: grab - color of header
|
|
|
|
|
* +8: dword: grab_button - color of button on header bar
|
|
|
|
|
* +12 = +0xC: dword: grab_button_text - color of text on button
|
|
|
|
|
on header bar
|
|
|
|
|
* +16 = +0x10: dword: grab_text - color of text on header
|
|
|
|
|
* +20 = +0x14: dword: work - color of working area
|
|
|
|
|
* +24 = +0x18: dword: work_button - color of button in working area
|
|
|
|
|
* +28 = +0x1C: dword: work_button_text - color of text on button
|
|
|
|
|
in working area
|
|
|
|
|
* +32 = +0x20: dword: work_text - color of text in working area
|
|
|
|
|
* +36 = +0x24: dword: work_graph - color of graphics in working area
|
|
|
|
|
Remarks:
|
|
|
|
|
* Structure of the color table is described in the standard
|
|
|
|
|
include file 'macros.inc' as 'system_colors'; for example,
|
|
|
|
|
it is possible to write:
|
2015-11-01 11:04:41 +01:00
|
|
|
|
sc system_colors ; variable declaration
|
|
|
|
|
... ; somewhere one must call
|
|
|
|
|
; this function with ecx=sc
|
|
|
|
|
mov ecx, [sc.work_button_text] ; read text color on
|
|
|
|
|
; buttin in working area
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* A program itself desides to use or not to use color table.
|
|
|
|
|
For usage program must simply at calls to drawing functions select
|
|
|
|
|
color taken from the table.
|
|
|
|
|
* At change of the table of standard colors (by subfunction 2 with
|
|
|
|
|
the subsequent application of changes by subfunction 0 or
|
|
|
|
|
at skin set by subfunction 8) the system sends to all windows
|
|
|
|
|
redraw message (the event with code 1).
|
|
|
|
|
* Color table can be viewed/changed interactively with
|
|
|
|
|
the application 'desktop'.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_COLORS (3)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 48, subfunction 4 - get skin height. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = skin height
|
|
|
|
|
Remarks:
|
|
|
|
|
* Skin height is defined as the height of a header
|
|
|
|
|
of skinned windows.
|
|
|
|
|
* See also general structure of window in the description
|
|
|
|
|
of function 0.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_SKIN_HEIGHT (4)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 48, subfunction 5 - get screen working area. =======
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = [left]*65536 + [right]
|
|
|
|
|
* ebx = [top]*65536 + [bottom]
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The screen working area defines position and coordinates of
|
|
|
|
|
a maximized window.
|
|
|
|
|
* The screen working area in view of normal work is all screen
|
2015-02-23 17:01:43 +01:00
|
|
|
|
without taskbar ('@taskbar' application).
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* (left,top) are coordinates of the left upper corner,
|
|
|
|
|
(right,bottom) are coordinates of the right lower one.
|
|
|
|
|
Thus the size of working area on x axis can be calculated by
|
|
|
|
|
formula right-left+1, on y axis - by formula bottom-right+1.
|
|
|
|
|
* See also function 14,
|
|
|
|
|
to get sizes of all screen.
|
|
|
|
|
* There is a pair function to set working area - subfunction 6.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_SCREEN_AREA (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======== Function 48, subfunction 6 - set screen working area. =======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = [left]*65536 + [right]
|
|
|
|
|
* edx = [top]*65536 + [bottom]
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The screen working area defines position and coordinates of
|
|
|
|
|
a maximized window.
|
2015-02-23 17:01:43 +01:00
|
|
|
|
* This function is used only by the application '@taskbar',
|
|
|
|
|
which set working area to all screen without taskbar.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* (left,top) are coordinates of the left upper corner,
|
|
|
|
|
(right,bottom) are coordinates of the right lower one.
|
|
|
|
|
Thus the size of working area on x axis can be calculated by
|
|
|
|
|
formula right-left+1, on y axis - by formula bottom-right+1.
|
|
|
|
|
* If 'left'>='right', x-coordinate of working area is not changed.
|
|
|
|
|
If 'left'<0, 'left' will not be set. If 'right' is greater than or
|
|
|
|
|
equal to screen width, 'right' will not be set.
|
|
|
|
|
Similarly on y axis.
|
|
|
|
|
* See also function 14,
|
|
|
|
|
to get sizes of all screen.
|
|
|
|
|
* There is a pair function to get working area - subfunction 5.
|
|
|
|
|
* This function redraws the screen automatically,
|
|
|
|
|
updating coordinates and sizes of maximized windows.
|
|
|
|
|
The system sends to all windows redraw message (the event 1).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_SCREEN_AREA (6)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 48, subfunction 7 - get skin margins. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Returns the area of a header of a skinned window, intended for
|
|
|
|
|
a text of a header.
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = [left]*65536 + [right]
|
|
|
|
|
* ebx = [top]*65536 + [bottom]
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* An application decides itself to use or not to use this function.
|
|
|
|
|
* It is recommended to take into account returned value
|
|
|
|
|
of this function for choice of a place for drawing header text
|
|
|
|
|
(by function 4) or a substitute of header text
|
|
|
|
|
(at the discretion of an application).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_SKIN_MARGINS (7)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============= Function 48, subfunction 8 - set used skin. ============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 8 - subfunction number
|
2014-02-18 19:21:49 +01:00
|
|
|
|
* ecx = pointer to filename of the skin
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* otherwise eax = file system error code; if file does not
|
|
|
|
|
contain valid skin, function returns error 3
|
|
|
|
|
(unknown file system).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* After successful skin loading the system sends to all windows
|
|
|
|
|
redraw message (the event 1).
|
|
|
|
|
* At booting the system reads skin from file 'default.skn'
|
|
|
|
|
on ramdisk.
|
|
|
|
|
* User can change the skin statically by creating hisself
|
|
|
|
|
'default.skn' or dynamically with the application 'desktop'.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_SKIN (8)
|
2015-08-05 12:02:18 +02:00
|
|
|
|
======================================================================
|
2015-10-15 17:20:20 +02:00
|
|
|
|
====== Function 48, subfunction 9 - get font smoothing setting. ======
|
2015-08-05 12:02:18 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
2015-10-15 17:20:20 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 2 - subpixel, 1 - anti-aliasing, 0 - off
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_FONT_SMOOTH (9)
|
2015-10-15 17:20:20 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 48, subfunction 10 - set font smoothing. =========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 10 - subfunction number
|
|
|
|
|
* cl = 2 - subpixel, 1 - anti-aliasing, 0 - off
|
2015-08-05 12:02:18 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_FONT_SMOOTH (10)
|
2015-10-29 15:43:15 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 48, subfunction 11 - get font size. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = current font height in pixels
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_GET_FONT_SIZE (11)
|
2015-10-29 15:43:15 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 48, subfunction 12 - set font size. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 48 - function number
|
|
|
|
|
* ebx = 10 - subfunction number
|
|
|
|
|
* cl = new font height in pixels
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_STYLE_SETTINGS (48)
|
|
|
|
|
ebx - SSF_SET_FONT_SIZE (12)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=========== Function 49 - Advanced Power Management (APM). ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 49 - function number
|
|
|
|
|
* dx = number of the APM function
|
|
|
|
|
(analogue of ax in APM specification)
|
|
|
|
|
* bx, cx = parameters of the APM function
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 16-bit registers ax, bx, cx, dx, si, di and carry flag CF
|
|
|
|
|
are set according to the APM specification
|
|
|
|
|
* high halves of 32-bit registers eax, ebx, ecx,
|
|
|
|
|
edx, esi, edi are destroyed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* APM 1.2 specification is described in the document
|
|
|
|
|
"Advanced Power Management (APM) BIOS Specification"
|
|
|
|
|
(Revision 1.2), available at
|
2006-08-03 21:30:32 +02:00
|
|
|
|
http://www.microsoft.com/whdc/archive/amp_12.mspx;
|
2006-08-11 15:30:23 +02:00
|
|
|
|
besides it is included in famous Interrupt List by Ralf Brown
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(http://www.pobox.com/~ralf/files.html,
|
|
|
|
|
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_APM (49)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=================== Function 50 - set window shape. ==================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Normal windows have rectangular shape. This function can give to
|
|
|
|
|
a window any shape. The shape is given by a set of points inside
|
|
|
|
|
the base rectangle belonging to a window. Position and coordinates
|
|
|
|
|
of the base rectangle are set by function 0
|
|
|
|
|
and changed by function 67.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
--------------------------- Set shape data ---------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 50 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
|
|
|
|
* ecx = pointer to shape data (array of bytes 0/1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
-------------------------- Set shape scale ---------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 50 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx sets a scale: each byte of data defines
|
|
|
|
|
(2^scale)*(2^scale) pixels
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Default scale is 0 (scale factor is 1). If in the shape data
|
|
|
|
|
one byte corresponds to one pixel, there is no necessity
|
|
|
|
|
to set scale.
|
|
|
|
|
* Let's designate xsize = window width (in pixels), ysize = height;
|
|
|
|
|
pay attention, that they are one pixel more than defined by
|
2006-08-03 21:30:32 +02:00
|
|
|
|
functions 0, 67.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* On definition of scale xsize and ysize must be divisible
|
|
|
|
|
on 2^scale.
|
|
|
|
|
* Byte of data on offset 'a' must be 0/1 and defines belonging
|
|
|
|
|
to a window of square with the side 2^scale (if scale=0,
|
|
|
|
|
this is one pixel) and coordinates of the left upper corner
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(a mod (xsize shr scale), a div (xsize shr scale))
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Data size: (xsize shr scale)*(ysize shr scale).
|
|
|
|
|
* Data must be presented in the memory and not change
|
|
|
|
|
after set of shape.
|
|
|
|
|
* The system views the shape data at every window redraw by
|
|
|
|
|
function 0.
|
|
|
|
|
* The call of subfunction 0 with NULL pointer results in return
|
|
|
|
|
to the rectangular shape.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SET_WINDOW_SHAPE (50)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 51 - create thread. ====================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 51 - function number
|
|
|
|
|
* ebx = 1 - unique subfunction
|
|
|
|
|
* ecx = address of thread entry point (starting eip)
|
|
|
|
|
* edx = pointer to thread stack (starting esp)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 - error (there is too many threads)
|
|
|
|
|
* otherwise eax = TID - thread identifier
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CREATE_THREAD (51)
|
2013-11-10 05:10:03 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 54, subfunction 0 ======================
|
|
|
|
|
============== Get the number of slots in the clipboard. =============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 54 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = slots in the clipboard
|
|
|
|
|
* eax = -1 - main list area not found
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CLIPBOARD (54)
|
|
|
|
|
ebx - SSF_GET_SLOT_COUNT (0)
|
2013-11-10 05:10:03 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 54, subfunction 1 ======================
|
|
|
|
|
================= Read the data from the clipboard. ==================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 54 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* eсx = slot number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = if successful - pointer to a memory with data
|
|
|
|
|
* eax = 1 - error
|
|
|
|
|
* eax = -1 - main list area not found
|
2016-01-12 17:47:06 +01:00
|
|
|
|
|
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CLIPBOARD (54)
|
|
|
|
|
ebx - SSF_READ_CB (1)
|
2013-11-10 05:10:03 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
==================== Function 54, subfunction 2 ======================
|
|
|
|
|
================= Write the data to the clipboard. ===================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 54 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
|
|
|
|
* eсx = the number of bytes to be copied
|
|
|
|
|
* edx = a pointer to a buffer for data to be copied
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - error
|
|
|
|
|
* eax = -1 - main list area not found
|
2016-01-12 17:47:06 +01:00
|
|
|
|
|
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CLIPBOARD (54)
|
|
|
|
|
ebx - SSF_WRITE_CB (2)
|
2013-11-10 05:10:03 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 54, subfunction 3 =====================
|
|
|
|
|
================ Delete the last slot in the clipboard ===============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 54 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - error
|
|
|
|
|
* eax = -1 - main list area not found
|
2016-01-12 17:47:06 +01:00
|
|
|
|
|
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CLIPBOARD (54)
|
|
|
|
|
ebx - SSF_DEL_SLOT (3)
|
2013-11-10 05:10:03 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 54, subfunction 4 =====================
|
|
|
|
|
===================== Alarm reset the lock buffer ====================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 54 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = -1 - main list area not found or no blocking
|
|
|
|
|
Remarks:
|
|
|
|
|
* Used in exceptional cases, where no responsible or killed
|
|
|
|
|
application blocked the clipboard operations.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CLIPBOARD (54)
|
|
|
|
|
ebx - SSF_UNLOCK_BUFFER (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2012-02-26 05:22:47 +01:00
|
|
|
|
Function 55, subfunction 55 - begin to play data on built-in speaker.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 55 - function number
|
|
|
|
|
* ebx = 55 - subfunction number
|
|
|
|
|
* esi = pointer to data
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 55 - error (speaker is off or busy)
|
|
|
|
|
Data is an array of items with variable length.
|
|
|
|
|
Format of each item is defined by first byte:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 0 = end of data
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 1..0x80 = sets sound duration on 1/100 of second; sound note
|
|
|
|
|
is defined by immediate value of frequency
|
|
|
|
|
* following word (2 bytes) contains frequency divider;
|
|
|
|
|
frequency is defined as 1193180/divider
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 0x81 = invalid
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 0x82..0xFF = note is defined by octave and number:
|
|
|
|
|
* duration in 1/100 of second = (first byte)-0x81
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* there is one more byte;
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* (second byte)=0xFF - delay
|
|
|
|
|
* otherwise it looks like a*0x10+b, where b=number of the note in
|
|
|
|
|
an octave from 1 to 12, a=number of octave (beginning from 0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Speaker play can be disabled/enabled by
|
|
|
|
|
subfunction 8 of function 18.
|
|
|
|
|
* Function returns control, having informed the system
|
|
|
|
|
an information on request. Play itself goes independently from
|
|
|
|
|
the program.
|
|
|
|
|
* The data must be kept in the memory at least up to the end
|
|
|
|
|
of play.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SPEAKER_PLAY (55)
|
2007-09-23 22:58:50 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======================= Function 57 - PCI BIOS. ======================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 57 - function number
|
|
|
|
|
* ebp corresponds to al in PCI BIOS specification
|
|
|
|
|
* other registers are set according to PCI BIOS specification
|
|
|
|
|
Returned value:
|
|
|
|
|
* CF is undefined
|
|
|
|
|
* other registers are set according to PCI BIOS specification
|
|
|
|
|
Remarks:
|
|
|
|
|
* Many effects of this function can be also achieved with
|
|
|
|
|
corresponding subfunctions of function 62.
|
|
|
|
|
* The function calls PCI32 BIOS extension, documented e.g. in
|
|
|
|
|
http://alpha1.dyns.net/files/PCI/bios21.pdf.
|
|
|
|
|
* If BIOS does not support this extension, its behavior is emulated
|
|
|
|
|
(through kernel-mode analogues of subfunctions of function 62).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI_BIOS (57)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 60 - Inter Process Communication (IPC). ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
IPC is used for message dispatching from one process/thread to
|
|
|
|
|
another. Previously it is necessary to agree how to interpret
|
2006-08-03 21:30:32 +02:00
|
|
|
|
the concrete message.
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
----------- Subfunction 1 - set the area for IPC receiving -----------
|
|
|
|
|
Is called by process-receiver.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 60 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = pointer to the buffer
|
|
|
|
|
* edx = size of the buffer
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - always success
|
|
|
|
|
Format of IPC-buffer:
|
|
|
|
|
* +0: dword: if nonzero, buffer is considered locked;
|
|
|
|
|
lock/unlock the buffer, when you work with it and need that
|
|
|
|
|
buffer data are not changed from outside (no new messages)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +4: dword: occupied place in the buffer (in bytes)
|
|
|
|
|
* +8: first message
|
|
|
|
|
* +8+n: second message
|
|
|
|
|
* ...
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of a message:
|
|
|
|
|
* +0: dword: PID of sender
|
|
|
|
|
* +4: dword: message length (not including this header)
|
|
|
|
|
* +8: n*byte: message data
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
------------------ Subfunction 2 - send IPC message ------------------
|
|
|
|
|
Is called by process-sender.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 60 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = PID of receiver
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = pointer to the message data
|
|
|
|
|
* esi = message length (in bytes)
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - the receiver has not defined buffer for IPC messages
|
|
|
|
|
(can be, still have no time,
|
|
|
|
|
and can be, this is not right process)
|
|
|
|
|
* eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit
|
|
|
|
|
* eax = 3 - overflow of IPC-buffer of the receiver
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 4 - process/thread with such PID does not exist
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Immediately after writing of IPC-message to the buffer the system
|
|
|
|
|
sends to the receiver the event with code 7 (see event codes).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_IPC (60)
|
|
|
|
|
ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
==== Function 61 - get parameters for the direct graphics access. ====
|
|
|
|
|
======================================================================
|
|
|
|
|
The data of the graphics screen (the memory area which displays
|
|
|
|
|
screen contents) are accessible to a program directly, without
|
|
|
|
|
any system calls, through the selector gs:
|
2015-11-01 11:04:41 +01:00
|
|
|
|
mov eax, [gs:0]
|
2006-08-11 15:30:23 +02:00
|
|
|
|
places in eax the first dword of the buffer, which contains
|
|
|
|
|
information on color of the left upper point (and, possibly, colors
|
|
|
|
|
of several following).
|
2015-11-01 11:04:41 +01:00
|
|
|
|
mov [gs:0], eax
|
2006-08-11 15:30:23 +02:00
|
|
|
|
by work in VESA modes with LFB sets color of the left upper point
|
|
|
|
|
(and, possibly, colors of several following).
|
|
|
|
|
To interpret the data of graphics screen program needs to know
|
|
|
|
|
some parameters, returning by this function.
|
|
|
|
|
Remarks:
|
|
|
|
|
* Graphics parameters changes very seldom at work,
|
|
|
|
|
namely, only in cases, when user works with the application VRR.
|
|
|
|
|
* At videomode change the system redraws all windows (event
|
|
|
|
|
with code 1) and redraws the background (event 5).
|
|
|
|
|
Same events occur in other cases too, which meet much more often,
|
|
|
|
|
than videomode change.
|
|
|
|
|
* By operation in videomodes with LFB the selector gs points to
|
|
|
|
|
LFB itself, so reading/writing on gs result directly in
|
|
|
|
|
change of screen contents. By operation in videomodes without
|
|
|
|
|
LFB gs points to some data area in the kernel, and all functions
|
|
|
|
|
of screen output fulfil honesty double operation on writing
|
|
|
|
|
directly to the screen and writing to this buffer. In result
|
|
|
|
|
at reading contents of this buffer the results correspond to
|
|
|
|
|
screen contents (with, generally speaking, large color
|
|
|
|
|
resolution), and writing is ignored.
|
|
|
|
|
One exception is the mode 320*200, for which main loop of the
|
|
|
|
|
system thread updates the screen according to mouse movements.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
------------------------- Screen resolution --------------------------
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 61 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = [resolution on x axis]*65536 + [resolution on y axis]
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* One can use function 14 paying attention that
|
|
|
|
|
it returns sizes on 1 pixel less. It is fully equivalent way.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
---------------------- Number of bits per pixel ----------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 61 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = number of bits per pixel (24 or 32)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
-------------------- Number of bytes per scanline --------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 61 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = number of bytes occupied by one scanline
|
2006-08-03 21:30:32 +02:00
|
|
|
|
(horizontal line on the screen)
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_GET_GRAPHICAL_PARAMS (61)
|
|
|
|
|
ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2),
|
|
|
|
|
SSF_BYTES_PER_LINE (3)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===== Function 62, subfunction 0 - get version of PCI-interface. =====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 62 - function number
|
|
|
|
|
* bl = 0 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 - PCI access is disabled; otherwise
|
|
|
|
|
* ah.al = version of PCI-interface (ah=version, al=subversion)
|
|
|
|
|
* high word of eax is zeroed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Previously low-level access to PCI for applications must be
|
|
|
|
|
enabled by subfunction 12 of function 21.
|
|
|
|
|
* If PCI BIOS is not supported, the value of ax is undefined.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI (62)
|
|
|
|
|
ebx - SSF_GET_VERSION (0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
==== Function 62, subfunction 1 - get number of the last PCI-bus. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 62 - function number
|
|
|
|
|
* bl = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 - access to PCI is disabled; otherwise
|
|
|
|
|
* al = number of the last PCI-bus; other bytes of eax are destroyed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Previously low-level access to PCI for applications must be
|
|
|
|
|
enabled by subfunction 12 of function 21.
|
|
|
|
|
* If PCI BIOS is not supported, the value of ax is undefined.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI (62)
|
|
|
|
|
ebx - SSF_GET_LAST_BUS (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 62, subfunction 2 =====================
|
|
|
|
|
===== Get mechanism of addressing to the PCI configuration space. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 62 - function number
|
|
|
|
|
* bl = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 - access to PCI is disabled; otherwise
|
|
|
|
|
* al = mechanism (1 or 2); other bytes of eax are destroyed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Previously low-level access to PCI for applications must be
|
|
|
|
|
enabled by subfunction 12 of function 21.
|
|
|
|
|
* Addressing mechanism is selected depending on
|
|
|
|
|
equipment characteristics.
|
|
|
|
|
* Subfunctions of read and write work automatically
|
|
|
|
|
with the selected mechanism.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI (62)
|
|
|
|
|
ebx - SSF_GET_ADRR_MODE (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======== Function 62, subfunctions 4,5,6 - read PCI-register. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 62 - function number
|
|
|
|
|
* bl = 4 - read byte
|
|
|
|
|
* bl = 5 - read word
|
|
|
|
|
* bl = 6 - read dword
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bh = number of PCI-bus
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ch = dddddfff, where ddddd = number of the device on the bus,
|
|
|
|
|
fff = function number of device
|
|
|
|
|
* cl = number of register (must be even for bl=5,
|
|
|
|
|
divisible by 4 for bl=6)
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 - error (access to PCI is disabled or parameters
|
|
|
|
|
are not supported); otherwise
|
|
|
|
|
* al/ax/eax (depending on requested size) contains the data;
|
|
|
|
|
the other part of register eax is destroyed
|
|
|
|
|
Remarks:
|
|
|
|
|
* Previously low-level access to PCI for applications must be
|
|
|
|
|
enabled by subfunction 12 of function 21.
|
|
|
|
|
* Access mechanism 2 supports only 16 devices on a bus and ignores
|
|
|
|
|
function number. To get access mechanism use subfunction 2.
|
|
|
|
|
* Some registers are standard and exist for all devices, some are
|
|
|
|
|
defined by the concrete device. The list of registers of the
|
|
|
|
|
first type can be found e.g. in famous
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Interrupt List by Ralf Brown
|
|
|
|
|
(http://www.pobox.com/~ralf/files.html,
|
|
|
|
|
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/);
|
2006-08-11 15:30:23 +02:00
|
|
|
|
registers of the second type must be listed
|
|
|
|
|
in the device documentation.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI (62)
|
|
|
|
|
ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
====== Function 62, subfunctions 8,9,10 - write to PCI-register. =====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 62 - function number
|
|
|
|
|
* bl = 8 - write byte
|
|
|
|
|
* bl = 9 - write word
|
|
|
|
|
* bl = 10 - write dword
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bh = number of PCI-bus
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ch = dddddfff, where ddddd = number of the device on the bus,
|
|
|
|
|
fff = function number of device
|
|
|
|
|
* cl = number of register (must be even for bl=9,
|
|
|
|
|
divisible by 4 for bl=10)
|
|
|
|
|
* dl/dx/edx (depending on requested size) contatins
|
|
|
|
|
the data to write
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 - error (access to PCI is disabled or parameters
|
|
|
|
|
are not supported)
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
Remarks:
|
|
|
|
|
* Previously low-level access to PCI for applications must be
|
|
|
|
|
enabled by subfunction 12 of function 21.
|
|
|
|
|
* Access mechanism 2 supports only 16 devices on a bus and ignores
|
|
|
|
|
function number. To get access mechanism use subfunction 2.
|
|
|
|
|
* Some registers are standard and exist for all devices, some are
|
|
|
|
|
defined by the concrete device. The list of registers of the
|
|
|
|
|
first type can be found e.g. in famous Interrupt List by
|
|
|
|
|
Ralf Brown; registers of the second type must be listed
|
|
|
|
|
in the device documentation.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PCI (62)
|
|
|
|
|
ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============== Function 63 - work with the debug board. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
The debug board is the global system buffer (with the size
|
2007-05-16 15:59:46 +02:00
|
|
|
|
1024 bytes), to which any program can write (generally speaking,
|
2006-08-11 15:30:23 +02:00
|
|
|
|
arbitrary) data and from which other program can read these data.
|
|
|
|
|
By the agreement written data are text strings interpreted as
|
|
|
|
|
debug messages on a course of program execution. The kernel in
|
|
|
|
|
some situations also writes to the debug board information on
|
|
|
|
|
execution of some functions; by the agreement kernel messages
|
|
|
|
|
begins from the prefix "K : ".
|
|
|
|
|
For view of the debug board the application 'board' was created,
|
|
|
|
|
which reads data from the buffer and displays them in its window.
|
|
|
|
|
'board' interpretes the sequence of codes 13,10 as newline.
|
|
|
|
|
A character with null code in an end of line is not necessary,
|
2006-08-03 21:30:32 +02:00
|
|
|
|
but also does not prevent.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Because debugger has been written, the value of the debug board
|
|
|
|
|
has decreased, as debugger allows to inspect completely a course of
|
|
|
|
|
program execution without any efforts from the direction of program
|
|
|
|
|
itself. Nevertheless in some cases the debug board is still useful.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
----------------------------- Write byte -----------------------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 63 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* cl = data byte
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Byte is written to the buffer. Buffer size is 512 bytes.
|
|
|
|
|
At buffer overflow all obtained data are lost.
|
|
|
|
|
* For output to the debug board of more complicated objects
|
|
|
|
|
(strings, numbers) it is enough to call this function in cycle.
|
|
|
|
|
It is possible not to write the appropriate code manually and use
|
|
|
|
|
file 'debug.inc', which is included into the distributive.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
----------------------------- Read byte ------------------------------
|
|
|
|
|
Takes away byte from the buffer.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 63 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = ebx = 0 - the buffer is empty
|
|
|
|
|
* eax = byte, ebx = 1 - byte was successfully read
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BOARD (63)
|
|
|
|
|
ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============== Function 64 - resize application memory. ==============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 64 - function number
|
|
|
|
|
* ebx = 1 - unique subfunction
|
|
|
|
|
* ecx = new memory size
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - not enough memory
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* There is another way to dynamically allocate/free memory -
|
|
|
|
|
subfunctions 11, 12, 13 of function 68.
|
|
|
|
|
* The function cannot be used together with 68.11, 68.12, 68.13.
|
|
|
|
|
The function call will be ignored after creation of process heap
|
|
|
|
|
with function 68.11.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_MEMORY_RESIZE (64)
|
2007-01-19 16:02:33 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 65 - draw image with palette in the window. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 65 - function number
|
|
|
|
|
* ebx = pointer to the image
|
|
|
|
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
|
|
|
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
2012-06-03 16:32:49 +02:00
|
|
|
|
* esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32;
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* edi = pointer to palette (2 to the power esi colors 0x00RRGGBB);
|
|
|
|
|
ignored when esi > 8
|
2007-02-02 16:09:14 +01:00
|
|
|
|
* ebp = offset of next row data relative to previous row data
|
2007-01-19 16:02:33 +01:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Coordinates of the image are coordinates of the upper left corner
|
|
|
|
|
of the image relative to the window.
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* Format of image with 1 bit per pixel: each byte of image
|
|
|
|
|
(possibly excluding last bytes in rows), contains information on
|
|
|
|
|
the color of 8 pixels, MSB corresponds to first pixel.
|
|
|
|
|
* Format of image with 2 bits per pixel: each byte of image
|
|
|
|
|
(possibly excluding last bytes in rows), contains information on
|
|
|
|
|
the color of 4 pixels, two MSBs correspond to first pixel.
|
|
|
|
|
* Format of image with 4 bits per pixel: each byte of image
|
|
|
|
|
excluding last bytes in rows (if width is odd) contains
|
|
|
|
|
information on the color of 2 pixels, high-order tetrad
|
|
|
|
|
corresponds to first pixel.
|
|
|
|
|
* Format of image with 8 bits per pixel: each byte of image is
|
|
|
|
|
index in the palette.
|
2012-06-03 16:32:49 +02:00
|
|
|
|
* Format of image with 9 bits per pixel: array of one byte values;
|
|
|
|
|
each byte (8 bit) represents the intensity of gray for one pixel;
|
|
|
|
|
this format is equal to 8bpp without palette.
|
2009-01-31 07:09:36 +01:00
|
|
|
|
* Format of image with 15 bits per pixel: the color of each pixel
|
|
|
|
|
is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per
|
|
|
|
|
each color.
|
|
|
|
|
* Format of image with 16 bits per pixel: the color of each pixel
|
|
|
|
|
is coded as RRRRRGGGGGGBBBBB (5+6+5).
|
|
|
|
|
* Format of image with 24 bits per pixel: the color of each pixel
|
|
|
|
|
is coded as 3 bytes - sequentially blue, green, red components.
|
|
|
|
|
* Format of image with 32 bits per pixel: similar to 24, but
|
|
|
|
|
one additional ignored byte is present.
|
2007-02-02 16:09:14 +01:00
|
|
|
|
* The call to function 7 is equivalent to call to this function
|
|
|
|
|
with esi=24, ebp=0.
|
2007-01-19 16:02:33 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_PUT_IMAGE_EXT (65)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
================== Function 66 - work with keyboard. =================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
The input mode influences results of reading keys by function 2.
|
|
|
|
|
When a program loads, ASCII input mode is set for it.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
-------------- Subfunction 1 - set keyboard input mode. --------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = mode:
|
|
|
|
|
* 0 = normal (ASCII-characters)
|
|
|
|
|
* 1 = scancodes
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
-------------- Subfunction 2 - get keyboard input mode. --------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = current mode
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
------------ Subfunction 3 - get status of control keys. -------------
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = bit mask:
|
2013-03-08 17:27:43 +01:00
|
|
|
|
* bit 0 (mask 1): left Shift is pressed
|
|
|
|
|
* bit 1 (mask 2): right Shift is pressed
|
|
|
|
|
* bit 2 (mask 4): left Ctrl is pressed
|
|
|
|
|
* bit 3 (mask 8): right Ctrl is pressed
|
|
|
|
|
* bit 4 (mask 0x10): left Alt is pressed
|
|
|
|
|
* bit 5 (mask 0x20): right Alt is pressed
|
|
|
|
|
* bit 6 (mask 0x40): CapsLock is on
|
|
|
|
|
* bit 7 (mask 0x80): NumLock is on
|
|
|
|
|
* bit 8 (mask 0x100): ScrollLock is on
|
|
|
|
|
* bit 9 (mask 0x200): left Win is pressed
|
|
|
|
|
* bit 10 (mask 0x400): right Win is pressed
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* other bits are cleared
|
|
|
|
|
|
|
|
|
|
-------------- Subfunction 4 - set system-wide hotkey. ---------------
|
|
|
|
|
When hotkey is pressed, the system notifies only those applications,
|
|
|
|
|
which have installed it; the active application (which receives
|
|
|
|
|
all normal input) does not receive such keys.
|
|
|
|
|
The notification consists in sending event with the code 2.
|
|
|
|
|
Reading hotkey is the same as reading normal key - by function 2.
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
* cl determines key scancode;
|
|
|
|
|
use cl=0 to give combinations such as Ctrl+Shift
|
|
|
|
|
* edx = 0xXYZ determines possible states of control keys:
|
|
|
|
|
* Z (low 4 bits) determines state of LShift and RShift:
|
|
|
|
|
* 0 = no key must be pressed;
|
|
|
|
|
* 1 = exactly one key must be pressed;
|
|
|
|
|
* 2 = both keys must be pressed;
|
|
|
|
|
* 3 = must be pressed LShift, but not RShift;
|
|
|
|
|
* 4 = must be pressed RShift, but not LShift
|
|
|
|
|
* Y - similar for LCtrl and RCtrl;
|
|
|
|
|
* X - similar for LAlt and RAlt
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax=0 - success
|
|
|
|
|
* eax=1 - too mant hotkeys (maximum 256 are allowed)
|
|
|
|
|
Remarks:
|
|
|
|
|
* Hotkey can work either at pressing or at release. Release
|
|
|
|
|
scancode of a key is more on 128 than pressing scancode
|
|
|
|
|
(i.e. high bit is set).
|
|
|
|
|
* Several applications can set the same combination;
|
|
|
|
|
all such applications will be informed on pressing
|
|
|
|
|
such combination.
|
|
|
|
|
|
|
|
|
|
-------------- Subfunction 5 - delete installed hotkey. --------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
|
|
|
|
* cl = scancode of key and edx = 0xXYZ the same as in subfunction 4
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 1 - there is no such hotkey
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* When a process/thread terminates, all hotkey installed by it are
|
|
|
|
|
deleted.
|
|
|
|
|
* The call to this subfunction does not affect other applications.
|
|
|
|
|
If other application has defined the same combination, it will
|
|
|
|
|
still receive notices.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2012-06-01 02:58:16 +02:00
|
|
|
|
--------------- Subfunction 6 - block the normal input. --------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Blocking the normal keyboard input for installed hotkeys
|
|
|
|
|
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
|
|
|
|
|
|
|
|
|
------------ Subfunction 7 - unlock the normal input. ----------------
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 66 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
|
|
|
|
* Unlocking the results of the f. 66.6
|
|
|
|
|
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_KEYBOARD (66)
|
|
|
|
|
ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2),
|
|
|
|
|
SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4),
|
|
|
|
|
SSF_DEL_SYS_HOTKEY (5), SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========= Function 67 - change position/sizes of the window. =========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 67 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ebx = new x-coordinate of the window
|
|
|
|
|
* ecx = new y-coordinate of the window
|
|
|
|
|
* edx = new x-size of the window
|
|
|
|
|
* esi = new y-size of the window
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The value -1 for a parameter means "do not change"; e.g. to move
|
|
|
|
|
the window without resizing it is possible to specify edx=esi=-1.
|
|
|
|
|
* Previously the window must be defined by function 0.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
It sets initial coordinates and sizes of the window.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Sizes of the window are understood in sense of function 0,
|
|
|
|
|
that is one pixel less than real sizes.
|
|
|
|
|
* The function call for maximized windows is simply ignored.
|
|
|
|
|
* For windows of appropriate styles position and/or sizes can be
|
|
|
|
|
changed by user; current position and sizes can be obtained by
|
|
|
|
|
call to function 9.
|
|
|
|
|
* The function sends to the window redraw event (with the code 1).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_CHANGE_WINDOW (67)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
====== Function 68, subfunction 0 - get the task switch counter. =====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = number of task switches from the system booting
|
|
|
|
|
(modulo 2^32)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_GET_TASK_SWITCH_COUNT (0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======= Function 68, subfunction 1 - switch to the next thread. ======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
The function completes the current time slice allocated to the
|
|
|
|
|
thread and switches to the next. (Which thread in which process
|
|
|
|
|
will be next, is unpredictable). Later, when execution queue
|
|
|
|
|
will reach the current thread, execution will be continued.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_SWITCH_TASK (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
============= Function 68, subfunction 2 - cache + rdpmc. ============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
|
|
|
|
* ecx = required action:
|
|
|
|
|
* ecx = 0 - enable instruction 'rdpmc'
|
|
|
|
|
(ReaD Performance-Monitoring Counters) for applications
|
|
|
|
|
* ecx = 1 - find out whether cache is disabled/enabled
|
|
|
|
|
* ecx = 2 - enable cache
|
|
|
|
|
* ecx = 3 - disable cache
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* for ecx=0:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = the value of cr4
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* for ecx=1:
|
|
|
|
|
* eax = (cr0 and 0x60000000):
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - cache is on
|
|
|
|
|
* eax <> 0 - cache is off
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* for ecx=2 and ecx=3:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_PERFORMANCE (2)
|
|
|
|
|
ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1),
|
|
|
|
|
SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 68, subfunction 3 - read MSR-register. ==========
|
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
MSR = Model Specific Register; the complete list of MSR-registers
|
|
|
|
|
of a processor is included to the documentation on it (for example,
|
|
|
|
|
IA-32 Intel Architecture Software Developer's Manual,
|
|
|
|
|
Volume 3, Appendix B); each processor family has its own subset
|
|
|
|
|
of the MSR-registers.
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
|
|
|
|
* ecx is ignored
|
|
|
|
|
* edx = MSR address
|
|
|
|
|
Returned value:
|
|
|
|
|
* ebx:eax = high:low dword of the result
|
|
|
|
|
Remarks:
|
|
|
|
|
* If ecx contains nonexistent or not implemented for this processor
|
|
|
|
|
MSR, processor will generate an exception in the kernel, which
|
|
|
|
|
will kill the thread.
|
|
|
|
|
* Previously it is necessary to check, whether MSRs are supported
|
|
|
|
|
as a whole, with the instruction 'cpuid'. Otherwise processor
|
|
|
|
|
will generate other exception in the kernel, which will anyway
|
|
|
|
|
kill the thread.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_READ_MSR (3)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========= Function 68, subfunction 4 - write to MSR-register. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
MSR = Model Specific Register; the complete list of MSR-registers
|
|
|
|
|
of a processor is included to the documentation on it (for example,
|
|
|
|
|
IA-32 Intel Architecture Software Developer's Manual,
|
|
|
|
|
Volume 3, Appendix B); each processor family has its own subset
|
|
|
|
|
of the MSR-registers.
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
* ecx is ignored
|
|
|
|
|
* edx = MSR address
|
|
|
|
|
* esi:edi = high:low dword
|
|
|
|
|
Returned value:
|
2007-05-16 15:59:46 +02:00
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If ecx contains nonexistent or not implemented for this processor
|
|
|
|
|
MSR, processor will generate an exception in the kernel, which
|
|
|
|
|
will kill the thread.
|
|
|
|
|
* Previously it is necessary to check, whether MSRs are supported
|
|
|
|
|
as a whole, with the instruction 'cpuid'. Otherwise processor
|
|
|
|
|
will generate other exception in the kernel, which will anyway
|
|
|
|
|
kill the thread.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_WRITE_MSR (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======= Function 68, subfunction 11 - initialize process heap. =======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* ebx = 11 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* eax = 0 - failed
|
|
|
|
|
* otherwise size of created heap
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* The function call initializes heap, from which one can in future
|
|
|
|
|
allocate and free memory blocks with subfunctions 12 and 13.
|
|
|
|
|
Heap size is equal to total amount of free application memory.
|
|
|
|
|
* The second function call from the same process results in
|
|
|
|
|
returning the size of the existing heap.
|
|
|
|
|
* After creation of the heap calls to function 64 will be ignored.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_HEAP_INIT (11)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======== Function 68, subfunction 12 - allocate memory block. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* ebx = 12 - subfunction number
|
|
|
|
|
* ecx = required size in bytes
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* eax = pointer to the allocated block
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* Before this call one must initialize process heap by call to
|
|
|
|
|
subfunction 11.
|
|
|
|
|
* The function allocates an integer number of pages (4 Kb) in such
|
|
|
|
|
way that the real size of allocated block is more than or equal to
|
|
|
|
|
requested size.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_ALLOC (12)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-10-24 16:39:29 +02:00
|
|
|
|
========== Function 68, subfunction 13 - free memory block. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* ebx = 13 - subfunction number
|
|
|
|
|
* ecx = pointer to the memory block
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* eax = 1 - success
|
|
|
|
|
* eax = 0 - failed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2007-04-02 16:29:39 +02:00
|
|
|
|
* The memory block must have been allocated by subfunction 12
|
|
|
|
|
or subfunction 20.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_FREE (13)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2009-05-22 10:55:09 +02:00
|
|
|
|
===================== Function 68, subfunction 14 ====================
|
2010-10-17 10:53:29 +02:00
|
|
|
|
============ Wait for signal from another program/driver. ============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 68 - function number
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* ebx = 14 - subfunction number
|
2009-05-22 10:55:09 +02:00
|
|
|
|
* ecx = pointer to the buffer for information (24 bytes)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* buffer pointed to by ecx contains the following information:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* +0: dword: identifier for following data of signal
|
|
|
|
|
* +4: dword: data of signal (20 bytes), format of which is defined
|
|
|
|
|
by the first dword
|
2006-10-24 16:39:29 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_WAIT_SIGNAL (14)
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============= Function 68, subfunction 16 - load driver. =============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 16 - subfunction number
|
|
|
|
|
* ecx = pointer to ASCIIZ-string with driver name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - failed
|
|
|
|
|
* otherwise eax = driver handle
|
|
|
|
|
Remarks:
|
|
|
|
|
* If the driver was not loaded yet, it is loaded;
|
|
|
|
|
if the driver was loaded yet, nothing happens.
|
|
|
|
|
* Driver name is case-sensitive.
|
|
|
|
|
Maximum length of the name is 16 characters, including
|
|
|
|
|
terminating null character, the rest is ignored.
|
2007-02-14 17:01:07 +01:00
|
|
|
|
* Driver ABC is loaded from file /rd/1/drivers/ABC.obj.
|
2006-10-24 16:39:29 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_LOAD_DRIVER (16)
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 68, subfunction 17 - driver control. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 17 - subfunction number
|
|
|
|
|
* ecx = pointer to the control structure:
|
|
|
|
|
* +0: dword: handle of driver
|
|
|
|
|
* +4: dword: code of driver function
|
|
|
|
|
* +8: dword: pointer to input data
|
|
|
|
|
* +12 = +0xC: dword: size of input data
|
|
|
|
|
* +16 = +0x10: dword: pointer to output data
|
|
|
|
|
* +20 = +0x14: dword: size of output data
|
|
|
|
|
Returned value:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* eax = determined by driver
|
2006-10-24 16:39:29 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
* Function codes and the structure of input/output data
|
|
|
|
|
are defined by driver.
|
|
|
|
|
* Previously one must obtain driver handle by subfunction 16.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_CONTROL_DRIVER (17)
|
2007-01-17 15:43:18 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
=============== Function 68, subfunction 19 - load DLL. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 19 - subfunction number
|
|
|
|
|
* ecx = pointer to ASCIIZ-string with the full path to DLL
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - failed
|
|
|
|
|
* otherwise eax = pointer to DLL export table
|
|
|
|
|
Remarks:
|
|
|
|
|
* Export table is an array of structures of 2 dword's, terminated
|
|
|
|
|
by zero. The first dword in structure points to function name,
|
|
|
|
|
the second dword contains address of function.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_LOAD_DLL (19)
|
2007-04-02 16:29:39 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======= Function 68, subfunction 20 - reallocate memory block. =======
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 20 - subfunction number
|
|
|
|
|
* ecx = new size in bytes
|
|
|
|
|
* edx = pointer to already allocated block
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = pointer to the reallocated block, 0 = error
|
|
|
|
|
Remarks:
|
|
|
|
|
* Before this call one must initialize process heap by call to
|
|
|
|
|
subfunction 11.
|
|
|
|
|
* The function allocates an integer number of pages (4 Kb) in such
|
|
|
|
|
way that the real size of allocated block is more than or equal to
|
|
|
|
|
requested size.
|
|
|
|
|
* If edx=0, the function call is equivalent to memory allocation
|
|
|
|
|
with subfunction 12. Otherwise the block at edx
|
|
|
|
|
must be allocated earlier with subfunction 12 or this subfunction.
|
|
|
|
|
* If ecx=0, the function frees memory block at edx and returns 0.
|
|
|
|
|
* The contents of the block are unchanged up to the shorter of
|
|
|
|
|
the new and old sizes.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_REALLOC (20)
|
2012-04-25 21:49:25 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 68, subfunction 21 - load driver PE. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 21 - subfunction number
|
|
|
|
|
* ecx = pointer to ASCIIZ-string with driver name
|
2012-04-25 23:35:25 +02:00
|
|
|
|
* edx = pointer to command line
|
2012-04-25 21:49:25 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - failed
|
|
|
|
|
* otherwise eax = driver handle
|
|
|
|
|
Remarks:
|
|
|
|
|
* If the driver was not loaded yet, it is loaded;
|
|
|
|
|
if the driver was loaded yet, nothing happens.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_LOAD_DRIVER_PE (21)
|
2009-05-23 10:23:03 +02:00
|
|
|
|
======================================================================
|
2010-10-17 10:53:29 +02:00
|
|
|
|
======== Function 68, subfunction 22 - open named memory area. =======
|
2009-05-23 10:23:03 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* ebx = 22 - subfunction number
|
|
|
|
|
* ecx = area name. Maximum of 31 characters with terminating zero
|
|
|
|
|
* edx = area size in bytes for SHM_CREATE and SHM_OPEN_ALWAYS
|
|
|
|
|
* esi = flags for open and access:
|
|
|
|
|
* SHM_OPEN = 0x00 - open existing memory area. If an area
|
|
|
|
|
with such name does not exist, the function
|
|
|
|
|
will return error code 5.
|
|
|
|
|
* SHM_OPEN_ALWAYS = 0x04 - open existing or create new
|
|
|
|
|
memory area.
|
|
|
|
|
* SHM_CREATE = 0x08 - create new memory area. If an area
|
|
|
|
|
with such name already exists, the function
|
|
|
|
|
will return error code 10.
|
|
|
|
|
* SHM_READ = 0x00 - only read access
|
|
|
|
|
* SHM_WRITE = 0x01 - read and write access
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = pointer to memory area, 0 if error has occured
|
|
|
|
|
* if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS):
|
|
|
|
|
edx = 0 - success, otherwise - error code
|
|
|
|
|
* if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS):
|
|
|
|
|
edx = error code (if eax=0) or area size in bytes
|
|
|
|
|
Error codes:
|
|
|
|
|
* E_NOTFOUND = 5
|
|
|
|
|
* E_ACCESS = 10
|
|
|
|
|
* E_NOMEM = 30
|
|
|
|
|
* E_PARAM = 33
|
|
|
|
|
Remarks:
|
|
|
|
|
* Before this call one must initialize process heap by call to
|
|
|
|
|
subfunction 11.
|
|
|
|
|
* If a new area is created, access flags set maximal rights
|
|
|
|
|
for other processes. An attempt from other process to open
|
|
|
|
|
with denied rights will fail with error code E_ACCESS.
|
|
|
|
|
* The process which has created an area always has write access.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_OPEN (22)
|
2010-10-17 10:53:29 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======= Function 68, subfunction 23 - close named memory area. =======
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 23 - subfunction number
|
|
|
|
|
* ecx = area name. Maximum of 31 characters with terminating zero
|
2009-05-23 10:23:03 +02:00
|
|
|
|
Returned value:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* eax destroyed
|
2009-05-23 10:23:03 +02:00
|
|
|
|
Remarks:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* A memory area is physically freed (with deleting all data and
|
|
|
|
|
freeing physical memory), when all threads which have opened
|
|
|
|
|
this area will close it.
|
|
|
|
|
* When thread is terminating, all opened by it areas are closed.
|
2009-05-23 10:23:03 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_CLOSE (23)
|
2009-05-23 10:23:03 +02:00
|
|
|
|
======================================================================
|
2010-10-17 10:53:29 +02:00
|
|
|
|
======== Function 68, subfunction 24 - set exception handler. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 24 - subfunction number
|
|
|
|
|
* ecx = address of the new exception handler
|
|
|
|
|
* edx = the mask of handled exceptions
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = address of the old exception handler (0, if it was not set)
|
|
|
|
|
* ebx = the old mask of handled exceptions
|
|
|
|
|
Remarks:
|
|
|
|
|
* Bit number in mask of exceptions corresponds to exception number
|
|
|
|
|
in CPU-specification (Intel-PC). For example, FPU exceptions have
|
|
|
|
|
number 16 (#MF), and SSE exceptions - 19 (#XF).
|
|
|
|
|
* The current implementation ignores the inquiry for hook of 7
|
|
|
|
|
exception - the system handles #NM by its own.
|
|
|
|
|
* The exception handler is called with exception number as first
|
|
|
|
|
(and only) stack parameter. So, correct exit from the handler is
|
|
|
|
|
RET 4. It returns to the instruction, that caused the exception,
|
|
|
|
|
for faults, and to the next instruction for traps (see
|
|
|
|
|
classification of exceptions in CPU specification).
|
|
|
|
|
* When user handler receives control, the corresponding bit in
|
|
|
|
|
the exception mask is cleared. Raising this exception
|
|
|
|
|
in consequence leads to default handling, that is,
|
|
|
|
|
terminating the application in absence of debugger or
|
|
|
|
|
suspend with notification of debugger otherwise.
|
|
|
|
|
* After user handler completes critical operations, it can set
|
|
|
|
|
the corresponding bit in the exception mask with subfunction 25.
|
|
|
|
|
Also user handler is responsible for clearing exceptions flags in
|
|
|
|
|
FPU and/or SSE.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_SET_EXCEPTION_HANDLER (24)
|
2010-10-17 10:53:29 +02:00
|
|
|
|
======================================================================
|
2015-12-17 23:50:34 +01:00
|
|
|
|
======== Function 68, subfunction 25 - set exception activity ========
|
2009-05-23 10:23:03 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 25 - subfunction number
|
|
|
|
|
* ecx = signal number
|
|
|
|
|
* edx = value of activity (0/1)
|
|
|
|
|
Returned value:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* eax = -1 - invalid signal number
|
|
|
|
|
* otherwise eax = old value of activity for this signal (0/1)
|
2009-05-23 10:23:03 +02:00
|
|
|
|
Remarks:
|
2010-10-17 10:53:29 +02:00
|
|
|
|
* In current implementation only mask for user excepton handler,
|
|
|
|
|
which has been previously set by subfunction 24,
|
|
|
|
|
is changed. Signal number corresponds to exception number.
|
2009-05-23 10:23:03 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_SET_EXCEPTION_STATE (25)
|
2013-07-09 19:56:44 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
====== Function 68, subfunction 26 - release memory pages ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 26 - subfunction number
|
|
|
|
|
* ecx = pointer to the memory block, allocated by subfunction 12
|
|
|
|
|
* edx = offset from the block beginnings
|
|
|
|
|
* esi = the size of the region of memory to release, in bytes
|
|
|
|
|
Remarks:
|
|
|
|
|
* function release range of pages from ecx+edx to ecx+edx+esi
|
|
|
|
|
and set virtual memory into reserved state.
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_MEM_FREE_EXT (26)
|
2013-07-09 19:56:44 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 68, subfunction 27 - load file ===================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 68 - function number
|
|
|
|
|
* ebx = 27 - subfunction number
|
|
|
|
|
* ecx = pointer to ASCIIZ-string with the filename
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = pointer to the loaded file, or zero
|
|
|
|
|
* edx = size of the loaded file, or zero
|
|
|
|
|
Remarks:
|
|
|
|
|
* function loads file and unpacks, if necessary
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SYS_MISC (68)
|
|
|
|
|
ebx - SSF_LOAD_FILE (27)
|
2008-12-30 17:27:38 +01:00
|
|
|
|
======================================================================
|
2010-10-17 10:53:29 +02:00
|
|
|
|
====================== Function 69 - debugging. ======================
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
A process can load other process as debugged by set of corresponding
|
2006-10-24 16:39:29 +02:00
|
|
|
|
bit by call to subfunction 7 of function 70.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
A process can have only one debugger; one process can debug some
|
|
|
|
|
others. The system notifies debugger on events occuring with
|
|
|
|
|
debugged process. Messages are written to the buffer defined by
|
2006-08-03 21:30:32 +02:00
|
|
|
|
subfunction 0.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of a message:
|
|
|
|
|
* +0: dword: message code
|
|
|
|
|
* +4: dword: PID of debugged process
|
|
|
|
|
* +8: there can be additional data depending on message code
|
|
|
|
|
Message codes:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 1 = exception
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* in addition dword-number of the exception is given
|
|
|
|
|
* process is suspended
|
|
|
|
|
* 2 = process has terminated
|
|
|
|
|
* comes at any termination: both through the system function -1,
|
|
|
|
|
and at "murder" by any other process (including debugger itself)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 3 = debug exception int 1 = #DB
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* in addition dword-image of the register DR6 is given:
|
|
|
|
|
* bits 0-3: condition of the corresponding breakpoint (set by
|
|
|
|
|
subfunction 9) is satisfied
|
2013-05-28 00:16:00 +02:00
|
|
|
|
* bit 14: exception has occured because of the trace mode
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(flag TF is set TF)
|
|
|
|
|
* process is suspended
|
|
|
|
|
When debugger terminates, all debugged processes are killed.
|
|
|
|
|
If debugger does not want this, it must previously detach by
|
2006-08-03 21:30:32 +02:00
|
|
|
|
subfunction 3.
|
|
|
|
|
|
2009-01-31 07:09:36 +01:00
|
|
|
|
All subfunctions are applicable only to processes/threads started
|
|
|
|
|
from the current by function 70 with set debugging flag.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Debugging of multithreaded programs is not supported yet.
|
|
|
|
|
The full list of subfunctions:
|
|
|
|
|
* subfunction 0 - define data area for debug messages
|
|
|
|
|
* subfunction 1 - get contents of registers of debugged thread
|
|
|
|
|
* subfunction 2 - set contents of registers of debugged thread
|
|
|
|
|
* subfunction 3 - detach from debugged process
|
|
|
|
|
* subfunction 4 - suspend debugged thread
|
|
|
|
|
* subfunction 5 - resume debugged thread
|
|
|
|
|
* subfunction 6 - read from the memory of debugged process
|
|
|
|
|
* subfunction 7 - write to the memory of debugged process
|
|
|
|
|
* subfunction 8 - terminate debugged thread
|
|
|
|
|
* subfunction 9 - set/clear hardware breakpoint
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1),
|
|
|
|
|
SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4),
|
|
|
|
|
SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7),
|
|
|
|
|
SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
= Function 69, subfunction 0 - define data area fror debug messages. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 0 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = pointer
|
|
|
|
|
Format of data area:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +0: dword: N = buffer size (not including this header)
|
|
|
|
|
* +4: dword: occupied place
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +8: N*byte: buffer
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the size field is negative, the buffer is considered locked
|
|
|
|
|
and at arrival of new message the system will wait.
|
|
|
|
|
For synchronization frame all work with the buffer by operations
|
|
|
|
|
lock/unlock
|
2015-11-01 11:04:41 +01:00
|
|
|
|
neg [bufsize]
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Data in the buffer are considered as array of items with variable
|
|
|
|
|
length - messages. Format of a message is explained in
|
|
|
|
|
general description.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_SET_MESSAGE_AREA (0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 69, subfunction 1 =====================
|
|
|
|
|
============ Get contents of registers of debugged thread. ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = thread identifier
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = size of context structure, must be 0x28=40 bytes
|
|
|
|
|
* esi = pointer to context structure
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of context structure: (FPU is not supported yet)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +0: dword: eip
|
|
|
|
|
* +4: dword: eflags
|
|
|
|
|
* +8: dword: eax
|
|
|
|
|
* +12 = +0xC: dword: ecx
|
|
|
|
|
* +16 = +0x10: dword: edx
|
|
|
|
|
* +20 = +0x14: dword: ebx
|
|
|
|
|
* +24 = +0x18: dword: esp
|
|
|
|
|
* +28 = +0x1C: dword: ebp
|
|
|
|
|
* +32 = +0x20: dword: esi
|
|
|
|
|
* +36 = +0x24: dword: edi
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the thread executes code of ring-0, the function returns
|
|
|
|
|
contents of registers of ring-3.
|
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_GET_REGISTERS (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 69, subfunction 2 =====================
|
|
|
|
|
============ Set contents of registers of debugged thread. ===========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 2 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = thread identifier
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = size of context structure, must be 0x28=40 bytes
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Format of context structure is shown in the description of
|
|
|
|
|
subfunction 1.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the thread executes code of ring-0, the function returns
|
|
|
|
|
contents of registers of ring-3.
|
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_SET_REGISTERS (2)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===== Function 69, subfunction 3 - detach from debugged process. =====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 3 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = identifier
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the process was suspended, it resumes execution.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_DETACH (3)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2009-01-31 07:09:36 +01:00
|
|
|
|
======== Function 69, subfunction 4 - suspend debugged thread. =======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 4 - subfunction number
|
|
|
|
|
* ecx = thread identifier
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2009-01-31 07:09:36 +01:00
|
|
|
|
Remarks:
|
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_SUSPEND (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2009-01-31 07:09:36 +01:00
|
|
|
|
======== Function 69, subfunction 5 - resume debugged thread. ========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 5 - subfunction number
|
|
|
|
|
* ecx = thread identifier
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
2009-01-31 07:09:36 +01:00
|
|
|
|
Remarks:
|
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_RESUME (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
= Fucntion 69, subfunction 6 - read from memory of debugged process. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 6 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = identifier
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = number of bytes to read
|
|
|
|
|
* esi = address in the memory of debugged process
|
|
|
|
|
* edi = pointer to buffer for data
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 at an error (invalid PID or buffer)
|
|
|
|
|
* otherwise eax = number of read bytes (possibly, 0,
|
|
|
|
|
if esi is too large)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_READ_MEMORY (6)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
== Function 69, subfunction 7 - write to memory of debugged process. =
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 7 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = identifier
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* edx = number of bytes to write
|
|
|
|
|
* esi = address of memory in debugged process
|
|
|
|
|
* edi = pointer to data
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 at an error (invalid PID or buffer)
|
|
|
|
|
* otherwise eax = number of written bytes (possibly, 0,
|
|
|
|
|
if esi is too large)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_WRITE_MEMORY (7)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======= Function 69, subfunction 8 - terminate debugged thread. ======
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 8 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = identifier
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
|
|
|
|
* The function is similar to subfunction 2 of function 18
|
|
|
|
|
with two differences: it requires first remark and
|
|
|
|
|
accepts PID rather than slot number.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_TERMINATE (8)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===== Function 69, subfunction 9 - set/clear hardware breakpoint. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 69 - function number
|
|
|
|
|
* ebx = 9 - subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ecx = thread identifier
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* dl = index of breakpoint, from 0 to 3 inclusively
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* dh = flags:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* if high bit is cleared - set breakpoint:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bits 0-1 - condition:
|
|
|
|
|
* 00 = breakpoint on execution
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 01 = breakpoint on read
|
|
|
|
|
* 11 = breakpoint on read/write
|
|
|
|
|
* bits 2-3 - length; for breakpoints on exception it must be
|
|
|
|
|
00, otherwise one of
|
|
|
|
|
* 00 = byte
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 01 = word
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 11 = dword
|
|
|
|
|
* esi = breakpoint address; must be aligned according to
|
|
|
|
|
the length (i.e. must be even for word breakpoints,
|
|
|
|
|
divisible by 4 for dword)
|
|
|
|
|
* if high bit is set - clear breakpoint
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* eax = 1 - error in the input data
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 2 - (reserved, is never returned in the current
|
|
|
|
|
implementation) a global breakpoint with that index is already set
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Process must be loaded for debugging (as is shown in
|
|
|
|
|
general description).
|
|
|
|
|
* Hardware breakpoints are implemented through DRx-registers of
|
|
|
|
|
the processor, all limitations results from this.
|
|
|
|
|
* The function can reinstall the breakpoint, previously set
|
|
|
|
|
by it (and it does not inform on this).
|
|
|
|
|
Carry on the list of set breakpoints in the debugger.
|
|
|
|
|
* Breakpoints generate debug exception #DB, on which the system
|
|
|
|
|
notifies debugger.
|
|
|
|
|
* Breakpoints on write and read/write act after
|
|
|
|
|
execution of the caused it instruction.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_DEBUG (69)
|
|
|
|
|
ebx - SSF_DEFINE_BREAKPOINT (9)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
==== Function 70 - work with file system with long names support. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success; otherwise file system error code
|
|
|
|
|
* some subfunctions return value in other registers too
|
|
|
|
|
General format of the information structure:
|
|
|
|
|
* +0: dword: subfunction number
|
|
|
|
|
* +4: dword: file offset
|
|
|
|
|
* +8: dword: high dword of offset (must be 0) or flags field
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +12 = +0xC: dword: size
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +16 = +0x10: dword: pointer to data
|
|
|
|
|
* +20 = +0x14: n db: ASCIIZ-string with the filename
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with the filename
|
|
|
|
|
Specifications - in documentation on the appropriate subfunction.
|
|
|
|
|
Filename is case-insensitive. Russian letters must be written in
|
|
|
|
|
the encoding cp866 (DOS).
|
|
|
|
|
Format of filename:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
/base/number/dir1/dir2/.../dirn/file,
|
2006-08-11 15:30:23 +02:00
|
|
|
|
where /base/number identifies device, on which file is located:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
one of
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* /RD/1 = /RAMDISK/1 to access ramdisk
|
|
|
|
|
* /FD/1 = /FLOPPYDISK/1 to access first floppy drive,
|
|
|
|
|
/FD/2 = /FLOPPYDISK/2 to access second one
|
|
|
|
|
* /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices
|
|
|
|
|
IDE0 (Primary Master), IDE1 (Primary Slave),
|
2006-08-03 21:30:32 +02:00
|
|
|
|
IDE2 (Secondary Master), IDE3 (Secondary Slave);
|
2006-08-11 15:30:23 +02:00
|
|
|
|
x - partition number on the selected hard drive, varies from 1
|
|
|
|
|
to 255 (on each hard drive the indexing starts from 1)
|
|
|
|
|
* /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to
|
|
|
|
|
CD on IDE0 (Primary Master), IDE1 (Primary Slave),
|
|
|
|
|
IDE2 (Secondary Master), IDE3 (Secondary Slave)
|
2007-06-18 18:39:42 +02:00
|
|
|
|
* /SYS means system folder; with the usual boot (from floppy)
|
|
|
|
|
is equivalent to /RD/1
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Examples:
|
|
|
|
|
* '/rd/1/kernel.asm',0
|
|
|
|
|
* '/HD0/1/kernel.asm',0
|
|
|
|
|
* '/hd0/2/menuet/pics/tanzania.bmp',0
|
|
|
|
|
* '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0
|
2007-06-18 18:39:42 +02:00
|
|
|
|
* '/sys/MySuperApp.ini',0
|
2013-07-08 10:17:53 +02:00
|
|
|
|
Also function supports relative names. If the path begins not
|
|
|
|
|
with '/', it is considered relative to a current folder. To get or
|
2010-10-17 10:53:29 +02:00
|
|
|
|
set a current folder, use the function 30.
|
|
|
|
|
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Available subfunctions:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* subfunction 0 - read file
|
|
|
|
|
* subfunction 1 - read folder
|
|
|
|
|
* subfunction 2 - create/rewrite file
|
2006-08-18 15:32:18 +02:00
|
|
|
|
* subfunction 3 - write to existing file
|
2006-08-21 15:06:02 +02:00
|
|
|
|
* subfunction 4 - set file size
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* subfunction 5 - get attributes of file/folder
|
|
|
|
|
* subfunction 6 - set attributes of file/folder
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* subfunction 7 - start application
|
2006-10-24 16:39:29 +02:00
|
|
|
|
* subfunction 8 - delete file/folder
|
2007-02-05 15:20:36 +01:00
|
|
|
|
* subfunction 9 - create folder
|
2006-08-11 15:30:23 +02:00
|
|
|
|
For CD-drives due to hardware limitations only subfunctions
|
|
|
|
|
0,1,5 and 7 are available, other subfunctions return error
|
|
|
|
|
with code 2.
|
2007-09-23 22:58:50 +02:00
|
|
|
|
At the first call of subfunctions 0,1,5,7 to ATAPI devices
|
|
|
|
|
(CD and DVD) the manual control of tray is locked due to caching
|
|
|
|
|
drive data. Unlocking is made when subfunction 4 of function 24
|
|
|
|
|
is called for corresponding device.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2),
|
|
|
|
|
SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5),
|
|
|
|
|
SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8),
|
|
|
|
|
SSF_CREATE_FOLDER (9)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=== Function 70, subfunction 0 - read file with long names support. ==
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 0 = subfunction number
|
|
|
|
|
* +4: dword: file offset (in bytes)
|
|
|
|
|
* +8: dword: 0 (reserved for high dword of offset)
|
|
|
|
|
* +12 = +0xC: dword: number of bytes to read
|
|
|
|
|
* +16 = +0x10: dword: pointer to buffer for data
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx = number of read bytes or -1=0xffffffff if file was not found
|
|
|
|
|
Remarks:
|
|
|
|
|
* If file was ended before last requested block was read,
|
|
|
|
|
the function will read as many as it can, and after that return
|
|
|
|
|
eax=6 (EOF).
|
|
|
|
|
* The function does not allow to read folder (returns eax=10,
|
|
|
|
|
access denied).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_READ_FILE (0)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
== Function 70, subfunction 1 - read folder with long names support. =
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 1 = subfunction number
|
|
|
|
|
* +4: dword: index of starting block (beginning from 0)
|
|
|
|
|
* +8: dword: flags field:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* bit 0 (mask 1): in what format to return names,
|
|
|
|
|
0=ANSI, 1=UNICODE
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* other bits are reserved and must be set to 0 for the future
|
|
|
|
|
compatibility
|
|
|
|
|
* +12 = +0xC: dword: number of blocks to read
|
|
|
|
|
* +16 = +0x10: dword: pointer to buffer for data, buffer size
|
|
|
|
|
must be not less than 32 + [+12]*560 bytes
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx = number of files, information on which was written to
|
|
|
|
|
the buffer, or -1=0xffffffff, if folder was not found
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Structure of the buffer:
|
|
|
|
|
* +0: 32*byte: header
|
|
|
|
|
* +32 = +0x20: n1*byte: block with information on file 1
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +32+n1: n2*byte: block with information on file 2
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* ...
|
|
|
|
|
Structure of header:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +0: dword: version of structure (current is 1)
|
|
|
|
|
* +4: dword: number of placed blocks; is not greater than requested
|
|
|
|
|
in the field +12 of information structure; can be less, if
|
|
|
|
|
there are no more files in folder (the same as in ebx)
|
|
|
|
|
* +8: dword: total number of files in folder
|
|
|
|
|
* +12 = +0xC: 20*byte: reserved (zeroed)
|
|
|
|
|
Structure of block of data for folder entry (BDFE):
|
|
|
|
|
* +0: dword: attributes of file:
|
|
|
|
|
* bit 0 (mask 1): file is read-only
|
|
|
|
|
* bit 1 (mask 2): file is hidden
|
|
|
|
|
* bit 2 (mask 4): file is system
|
|
|
|
|
* bit 3 (mask 8): this is not a file but volume label
|
|
|
|
|
(for one partition meets no more than once and
|
|
|
|
|
only in root folder)
|
|
|
|
|
* bit 4 (mask 0x10): this is a folder
|
|
|
|
|
* bit 5 (mask 0x20): file was not archived - many archivation
|
|
|
|
|
programs have an option to archive only files with this bit set,
|
|
|
|
|
and after archiving this bit is cleared - it can be useful
|
|
|
|
|
for automatically creating of backup-archives as at writing
|
|
|
|
|
this bit is usually set
|
|
|
|
|
* +4: byte: type of name data:
|
|
|
|
|
(coincides with bit 0 of flags in the information structure)
|
|
|
|
|
* 0 = ASCII = 1-byte representation of each character
|
|
|
|
|
* 1 = UNICODE = 2-byte representation of each character
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +5: 3*byte: reserved (zero)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +8: 4*byte: time of file creation
|
|
|
|
|
* +12 = +0xC: 4*byte: date of file creation
|
|
|
|
|
* +16 = +0x10: 4*byte: time of last access (read or write)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +20 = +0x14: 4*byte: date of last access
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +24 = +0x18: 4*byte: time of last modification
|
|
|
|
|
* +28 = +0x1C: 4*byte: date of last modification
|
|
|
|
|
* +32 = +0x20: qword: file size in bytes (up to 16777216 Tb)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +40 = +0x28: name
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* for ASCII format: maximum length is 263 characters
|
|
|
|
|
(263 bytes), byte after the name has value 0
|
2007-02-05 15:20:36 +01:00
|
|
|
|
* for UNICODE format: maximum length is 259 characters
|
2006-08-11 15:30:23 +02:00
|
|
|
|
(518 bytes), 2 bytes after the name have value 0
|
|
|
|
|
Time format:
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +0: byte: seconds
|
|
|
|
|
* +1: byte: minutes
|
|
|
|
|
* +2: byte: hours
|
|
|
|
|
* +3: byte: reserved (0)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* for example, 23.59.59 is written as (in hex) 3B 3B 17 00
|
|
|
|
|
Date format:
|
|
|
|
|
* +0: byte: day
|
|
|
|
|
* +1: byte: month
|
|
|
|
|
* +2: word: year
|
|
|
|
|
* for example, 25.11.1979 is written as (in hex) 19 0B BB 07
|
|
|
|
|
Remarks:
|
|
|
|
|
* If BDFE contains ASCII name, the length of BDFE is 304 bytes,
|
|
|
|
|
if UNICODE name - 560 bytes. Value of length is aligned
|
|
|
|
|
on 16-byte bound (to accelerate processing in CPU cache).
|
|
|
|
|
* First character after a name is zero (ASCIIZ-string). The further
|
|
|
|
|
data contain garbage.
|
|
|
|
|
* If files in folder were ended before requested number was read,
|
|
|
|
|
the function will read as many as it can, and after that return
|
|
|
|
|
eax=6 (EOF).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* Any folder on the disk, except for root, contains two special
|
2006-08-11 15:30:23 +02:00
|
|
|
|
entries "." and "..", identifying accordingly the folder itself
|
|
|
|
|
and the parent folder.
|
|
|
|
|
* The function allows also to read virtual folders "/", "/rd",
|
|
|
|
|
"/fd", "/hd[n]", thus attributes of subfolders are set to 0x10,
|
|
|
|
|
and times and dates are zeroed. An alternative way to get the
|
|
|
|
|
equipment information - subfunction 11 of function 18.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_READ_FOLDER (1)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===================== Function 70, subfunction 2 =====================
|
|
|
|
|
============ Create/rewrite file with long names support. ============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 2 = subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +4: dword: 0 (reserved)
|
|
|
|
|
* +8: dword: 0 (reserved)
|
2013-10-21 11:30:07 +02:00
|
|
|
|
* +12 = +0xC: dword: number of bytes to write
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +16 = +0x10: dword: pointer to data
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx = number of written bytes (possibly 0)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If a file with given name did not exist, it is created;
|
|
|
|
|
if it existed, it is rewritten.
|
|
|
|
|
* If there is not enough free space on disk, the function will
|
|
|
|
|
write as many as can and then return error code 8.
|
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_CREATE_FILE (2)
|
2006-08-18 15:32:18 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 70, subfunction 3 =====================
|
|
|
|
|
=========== Write to existing file with long names support. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 3 = subfunction number
|
|
|
|
|
* +4: dword: file offset (in bytes)
|
|
|
|
|
* +8: dword: high dword of offset (must be 0 for FAT)
|
|
|
|
|
* +12 = +0xC: dword: number of bytes to write
|
|
|
|
|
* +16 = +0x10: dword: pointer to data
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx = number of written bytes (possibly 0)
|
|
|
|
|
Remarks:
|
|
|
|
|
* The file must already exist, otherwise function returns eax=5.
|
|
|
|
|
* The only result of write 0 bytes is update in the file attributes
|
|
|
|
|
date/time of modification and access to the current date/time.
|
|
|
|
|
* If beginning and/or ending position is greater than file size
|
|
|
|
|
(except for the previous case), the file is expanded to needed
|
|
|
|
|
size with zero characters.
|
2006-08-21 15:06:02 +02:00
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_WRITE_FILE (3)
|
2006-08-21 15:06:02 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 70, subfunction 4 - set end of file. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 4 = subfunction number
|
|
|
|
|
* +4: dword: low dword of new file size
|
|
|
|
|
* +8: dword: high dword of new file size (must be 0 for FAT)
|
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
|
|
|
|
* +16 = +0x10: dword: 0 (reserved)
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx destroyed
|
|
|
|
|
Remarks:
|
|
|
|
|
* If the new file size is less than old one, file is truncated.
|
|
|
|
|
If the new size is greater than old one, file is expanded with
|
|
|
|
|
characters with code 0. If the new size is equal to old one,
|
|
|
|
|
the only result of call is set date/time of modification and
|
|
|
|
|
access to the current date/time.
|
|
|
|
|
* If there is not enough free space on disk for expansion, the
|
|
|
|
|
function will expand to maximum possible size and then return
|
|
|
|
|
error code 8.
|
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
2006-08-18 15:32:18 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_SET_END (4)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
==== Function 70, subfunction 5 - get information on file/folder. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 5 = subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +4: dword: 0 (reserved)
|
|
|
|
|
* +8: dword: 0 (reserved)
|
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +16 = +0x10: dword: pointer to buffer for data (40 bytes)
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx destroyed
|
|
|
|
|
Information on file is returned in the BDFE format (block of data
|
|
|
|
|
for folder entry), explained in the description of
|
|
|
|
|
subfunction 1, but without filename
|
|
|
|
|
(i.e. only first 40 = 0x28 bytes).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The function does not support virtual folders such as /, /rd and
|
|
|
|
|
root folders like /rd/1.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_GET_INFO (5)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
===== Function 70, subfunction 6 - set attributes of file/folder. ====
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 6 = subfunction number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +4: dword: 0 (reserved)
|
|
|
|
|
* +8: dword: 0 (reserved)
|
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +16 = +0x10: dword: pointer to buffer with attributes (32 bytes)
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx destroyed
|
|
|
|
|
File attributes are first 32 bytes in BDFE (block of data
|
|
|
|
|
for folder entry), explained in the description of subfunction 1
|
|
|
|
|
(that is, without name and size of file). Attribute
|
|
|
|
|
file/folder/volume label (bits 3,4 in dword +0) is not changed.
|
|
|
|
|
Byte +4 (name format) is ignored.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* The function does not support virtual folders such as /, /rd and
|
|
|
|
|
root folders like /rd/1.
|
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_SET_INFO (6)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=========== Function 70, subfunction 7 - start application. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 7 = subfunction number
|
|
|
|
|
* +4: dword: flags field:
|
2013-05-28 00:16:00 +02:00
|
|
|
|
* bit 0: start process as debugged
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* other bits are reserved and must be set to 0
|
|
|
|
|
* +8: dword: 0 or pointer to ASCIIZ-string with parameters
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
|
|
|
|
* +16 = +0x10: dword: 0 (reserved)
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
2006-08-03 21:30:32 +02:00
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax > 0 - program is loaded, eax contains PID
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax < 0 - an error has occured, -eax contains
|
|
|
|
|
file system error code
|
|
|
|
|
* ebx destroyed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Command line must be terminated by the character with the code 0
|
|
|
|
|
(ASCIIZ-string); function takes into account either all characters
|
|
|
|
|
up to terminating zero inclusively or first 256 character
|
|
|
|
|
regarding what is less.
|
|
|
|
|
* If the process is started as debugged, it is created in
|
|
|
|
|
the suspended state; to run use subfunction 5 of function 69.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_START_APP (7)
|
2006-10-24 16:39:29 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 70, subfunction 8 - delete file/folder. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 8 = subfunction number
|
|
|
|
|
* +4: dword: 0 (reserved)
|
|
|
|
|
* +8: dword: 0 (reserved)
|
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
|
|
|
|
* +16 = +0x10: dword: 0 (reserved)
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
|
|
|
|
|
given in the general description
|
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with file name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx destroyed
|
|
|
|
|
Remarks:
|
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
|
|
|
|
* The function can delete only empty folders (attempt to delete
|
|
|
|
|
nonempty folder results in error with code 10, "access denied").
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_DELETE (8)
|
2007-02-05 15:20:36 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
============= Function 70, subfunction 9 - create folder. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 70 - function number
|
|
|
|
|
* ebx = pointer to the information structure
|
|
|
|
|
Format of the information structure:
|
|
|
|
|
* +0: dword: 9 = subfunction number
|
|
|
|
|
* +4: dword: 0 (reserved)
|
|
|
|
|
* +8: dword: 0 (reserved)
|
|
|
|
|
* +12 = +0xC: dword: 0 (reserved)
|
|
|
|
|
* +16 = +0x10: dword: 0 (reserved)
|
|
|
|
|
* +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are
|
|
|
|
|
given in the general description
|
|
|
|
|
or
|
|
|
|
|
* +20 = +0x14: db 0
|
|
|
|
|
* +21 = +0x15: dd pointer to ASCIIZ-string with folder name
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success, otherwise file system error code
|
|
|
|
|
* ebx destroyed
|
|
|
|
|
Remarks:
|
|
|
|
|
* The function is not supported for CD (returns error code 2).
|
|
|
|
|
* The parent folder must already exist.
|
|
|
|
|
* If target folder already exists, function returns success (eax=0).
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_FILE (70)
|
|
|
|
|
[ebx] - SSF_CREATE_FOLDER (9)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
========== Function 71, subfunction 1 - set window caption. ==========
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 71 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
2015-11-23 05:21:00 +01:00
|
|
|
|
* ecx = pointer to zero terminated string
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* function does not return value
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2015-11-23 05:21:00 +01:00
|
|
|
|
* You may set the caption string encoding by putting
|
|
|
|
|
at the start of the string a byte with next values:
|
|
|
|
|
1 = cp866
|
|
|
|
|
2 = UTF-16LE
|
|
|
|
|
3 = UTF-8
|
|
|
|
|
otherwise will be used cp866.
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* Pass NULL in ecx to remove caption.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SET_CAPTION (71)
|
2007-10-25 13:20:02 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=============== Function 72 - send message to a window. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
|
- Subfunction 1 - send message with parameter to the active window. --
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 72 - function number
|
|
|
|
|
* ebx = 1 - subfunction number
|
|
|
|
|
* ecx = event code: 2 or 3
|
|
|
|
|
* edx = parameter: key code for ecx=2, button identifier for ecx=3
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = 0 - success
|
|
|
|
|
* eax = 1 - buffer is full
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_SEND_MESSAGE (72)
|
2013-03-03 16:03:27 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
===================== Function 73 - blit bitmap =====================
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 73 - function number
|
|
|
|
|
|
|
|
|
|
* ebx = ROP and optional flags
|
|
|
|
|
31 6 5 4 3 0
|
|
|
|
|
[ reserved ][T][B][ROP]
|
|
|
|
|
ROP - raster operation code
|
|
|
|
|
0: Copy
|
|
|
|
|
1-15: reserved
|
|
|
|
|
B - blit into the background surface
|
|
|
|
|
T - transparent blit
|
|
|
|
|
|
|
|
|
|
* ecx = pointer to the function parameters
|
|
|
|
|
destination offset and clipping
|
|
|
|
|
+0 signed dword: destination rectangle X offset from the window
|
|
|
|
|
top-left corner
|
|
|
|
|
+4 signed dword: destination rectangle Y offset from the window
|
|
|
|
|
top-left corner
|
|
|
|
|
+8 dword: destination rectangle width
|
|
|
|
|
+12 dword: destination rectangle height
|
|
|
|
|
|
|
|
|
|
source offset and clipping
|
|
|
|
|
+16 signed dword: source rectangle X offset from the bitmap
|
|
|
|
|
top-left corner
|
|
|
|
|
+20 signed dword: source rectangle Y offset from the bitmap
|
|
|
|
|
top-left corner
|
|
|
|
|
+24 dword: source rectangle width
|
|
|
|
|
+28 dword: source rectangle height
|
|
|
|
|
|
2013-03-05 22:11:06 +01:00
|
|
|
|
+32: dword: bitmap data - must be 32bpp
|
|
|
|
|
+36: dword: size of the bitmap row in bytes
|
2013-03-03 16:03:27 +01:00
|
|
|
|
|
|
|
|
|
Returned value:
|
|
|
|
|
* function does not return value
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_BLITTER (73)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
2015-11-01 11:04:41 +01:00
|
|
|
|
= Function 74, Subfunction 255, Get number of active network devices. =
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
2015-11-01 11:04:41 +01:00
|
|
|
|
* bl = 255 - subfunction number
|
2013-05-29 15:47:55 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = number of active network devices
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_DEVICE_COUNT (255)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 74, Subfunction 0, Get network device type. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 0 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
2015-11-01 11:04:41 +01:00
|
|
|
|
* eax = device type number
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_DEVICE_TYPE (0)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
======== Function 74, Subfunction 1, Get network device name. ========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 1 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
* ecx = pointer to 64 byte buffer
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
|
|
|
|
* The network device name is written into the buffer, on success
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_DEVICE_NAME (1)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========= Function 74, Subfunction 2, Reset network device. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 2 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_RESET_DEVICE (2)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 74, Subfunction 3, Stop network device. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 3 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2015-12-17 23:50:34 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_STOP_DEVICE (3)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 74, Subfunction 4, Get device pointer. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 4 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
2015-12-17 23:50:34 +01:00
|
|
|
|
* eax = device pointer, -1 on error
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_DEVICE_POINER (4)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
========= Function 74, Subfunction 6, Get packet TX counter. =========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 6 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = Number of packets sent since device start, -1 on error
|
2015-12-17 23:50:34 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_TX_PACKET_COUNT (6)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
========= Function 74, Subfunction 7, Get packet RX counter. =========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 7 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = Number of packets received since device start, -1 on error
|
2015-12-17 23:50:34 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_RX_PACKET_COUNT (7)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 74, Subfunction 8, Get TX byte counter. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 8 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = Number of bytes sent since device start (lower dword)
|
|
|
|
|
-1 on error
|
|
|
|
|
* ebx = Number of bytes sent since device start (higher dword)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_TX_BYTE_COUNT (8)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 74, Subfunction 9, Get RX byte counter. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 9 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = Number of bytes received since device start (lower dword)
|
|
|
|
|
-1 on error
|
|
|
|
|
* ebx = Number of bytes received since device start (higher dword)
|
2015-12-17 23:50:34 +01:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_RX_BYTE_COUNT (9)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
========== Function 74, Subfunction 10, Get link status. =============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 74 - function number
|
|
|
|
|
* bl = 10 - subfunction number
|
|
|
|
|
* bh = device number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = link status, -1 on error
|
2015-12-17 23:50:34 +01:00
|
|
|
|
|
2015-11-01 11:04:41 +01:00
|
|
|
|
Link status:
|
|
|
|
|
ETH_LINK_DOWN = 0b ; Link is down
|
|
|
|
|
ETH_LINK_UNKNOWN= 1b ; There could be an active link
|
|
|
|
|
ETH_LINK_FD = 10b ; full duplex flag
|
|
|
|
|
ETH_LINK_10M = 100b ; 10 mbit
|
|
|
|
|
ETH_LINK_100M = 1000b ; 100 mbit
|
2015-12-17 23:50:34 +01:00
|
|
|
|
ETH_LINK_1G = 1100b ; gigabit
|
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_GET (74)
|
|
|
|
|
bl - SSF_LINK_STATUS (10)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============== Function 75, Subfunction 0, Open socket. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 0 - subfunction number
|
|
|
|
|
* ecx = domain
|
|
|
|
|
* edx = type
|
|
|
|
|
* esi = protocol
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = socket number, -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_OPEN (0)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============= Function 75, Subfunction 1, Close socket. ==============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 1 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_CLOSE (1)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================== Function 75, Subfunction 2, Bind. =================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 2 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to sockaddr structure
|
|
|
|
|
* esi = length of sockaddr structure
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_BIND (2)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================= Function 75, Subfunction 3, Listen. ================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 3 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = backlog
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_LISTEN (3)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================ Function 75, Subfunction 4, Connect. ================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 4 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to sockaddr structure
|
|
|
|
|
* esi = length of sockaddr structure
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_CONNECT (4)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================= Function 75, Subfunction 5, Accept. ================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 5 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to sockaddr structure
|
|
|
|
|
* esi = length of sockaddr structure
|
|
|
|
|
Returned value:
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* eax = socket number of accepted socket, -1 on error
|
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_ACCEPT (5)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================== Function 75, Subfunction 6, Send. =================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 6 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to buffer
|
|
|
|
|
* esi = length of buffer
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* edi = flags
|
2013-05-29 15:47:55 +02:00
|
|
|
|
Returned value:
|
|
|
|
|
* eax = number of bytes copied, -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_SEND (6)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
================ Function 75, Subfunction 7, Receive. ================
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 7 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to buffer
|
|
|
|
|
* esi = length of buffer
|
|
|
|
|
* edi = flags
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = number of bytes copied, -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_RECEIVE (7)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 75, Subfunction 8, Set socket options. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 8 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to optstruct
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
|
2015-11-01 11:04:41 +01:00
|
|
|
|
Optstruct:
|
|
|
|
|
dd level
|
|
|
|
|
dd optionname
|
|
|
|
|
dd optlength
|
|
|
|
|
db options...
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_SET_OPTIONS (8)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
=========== Function 75, Subfunction 9, Get socket options. ==========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 9 - subfunction number
|
|
|
|
|
* ecx = socket number
|
|
|
|
|
* edx = pointer to optstruct
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = errorcode
|
2013-05-29 15:47:55 +02:00
|
|
|
|
Remarks:
|
|
|
|
|
|
2015-11-01 11:04:41 +01:00
|
|
|
|
Optstruct:
|
|
|
|
|
dd level
|
|
|
|
|
dd optionname
|
|
|
|
|
dd optlength
|
|
|
|
|
db options...
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_GET_OPTIONS (9)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 75, Subfunction 10, Get socketpair. ===========
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 75 - function number
|
|
|
|
|
* bl = 10 - subfunction number
|
|
|
|
|
Returned value:
|
|
|
|
|
* eax = socketnum1, -1 on error
|
2013-08-10 22:02:13 +02:00
|
|
|
|
* ebx = socketnum2, errorcode on error
|
2016-01-12 17:47:06 +01:00
|
|
|
|
|
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_SOCKET (75)
|
|
|
|
|
bl - SSF_GET_PAIR (10)
|
2015-11-01 11:04:41 +01:00
|
|
|
|
======================================================================
|
|
|
|
|
============ Function 76, Network options and statistics. ============
|
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
|
|
|
|
* eax = 76 - function number
|
|
|
|
|
* high half of ebx = protocol number
|
|
|
|
|
* bh = device number
|
|
|
|
|
* bl = subfunction number
|
|
|
|
|
|
|
|
|
|
Ethernet (0)
|
|
|
|
|
0 - Read MAC
|
|
|
|
|
|
|
|
|
|
IPv4 (1)
|
2016-01-03 21:30:36 +01:00
|
|
|
|
0 - Read # IP packets sent
|
2015-11-01 11:04:41 +01:00
|
|
|
|
1 - Read # IP packets received
|
|
|
|
|
2 - Read IP
|
|
|
|
|
3 - Write IP
|
|
|
|
|
4 - Read DNS
|
|
|
|
|
5 - Write DNS
|
|
|
|
|
6 - Read subnet
|
|
|
|
|
7 - Write subnet
|
|
|
|
|
8 - Read gateway
|
|
|
|
|
9 - Write gateway
|
|
|
|
|
|
|
|
|
|
ICMP (2)
|
2016-01-03 21:30:36 +01:00
|
|
|
|
0 - Read # ICMP packets sent
|
2015-11-01 11:04:41 +01:00
|
|
|
|
1 - Read # ICMP packets received
|
|
|
|
|
3 - enable/disable ICMP echo reply
|
|
|
|
|
|
|
|
|
|
UDP (3)
|
2016-01-03 21:30:36 +01:00
|
|
|
|
0 - Read # UDP packets sent
|
2015-11-01 11:04:41 +01:00
|
|
|
|
1 - Read # UDP packets received
|
|
|
|
|
|
|
|
|
|
TCP (4)
|
2016-01-03 21:30:36 +01:00
|
|
|
|
0 - Read # TCP packets sent
|
2015-11-01 11:04:41 +01:00
|
|
|
|
1 - Read # TCP packets received
|
|
|
|
|
|
|
|
|
|
ARP (5)
|
2016-01-03 21:30:36 +01:00
|
|
|
|
0 - Read # ARP packets sent
|
2015-11-01 11:04:41 +01:00
|
|
|
|
1 - Read # ARP packets received
|
|
|
|
|
2 - Read # ARP entry's
|
|
|
|
|
3 - Read ARP entry
|
|
|
|
|
4 - Add static ARP entry
|
|
|
|
|
5 - Remove ARP entry (-1 = remove all)
|
|
|
|
|
6 - Send ARP announce on specified interface
|
|
|
|
|
7 - Read # ARP conflicts (IP address conflicts)
|
2013-05-29 15:47:55 +02:00
|
|
|
|
|
2016-01-12 17:47:06 +01:00
|
|
|
|
---------------------- Constants for registers: ----------------------
|
|
|
|
|
eax - SF_NETWORK_PROTOCOL (76)
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
=============== Function -1 - terminate thread/process ===============
|
2006-08-03 21:30:32 +02:00
|
|
|
|
======================================================================
|
|
|
|
|
Parameters:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* eax = -1 - function number
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Returned value:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* function does not return neither value nor control
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Remarks:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* If the process did not create threads obviously, it has only
|
|
|
|
|
one thread, which termination results in process termination.
|
|
|
|
|
* If the current thread is last in the process, its termination
|
|
|
|
|
also results in process terminates.
|
|
|
|
|
* This function terminates the current thread. Other thread can be
|
|
|
|
|
killed by call to subfunction 2 of function 18.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
|
|
|
|
|
======================================================================
|
|
|
|
|
=========================== List of events ===========================
|
|
|
|
|
======================================================================
|
2006-08-11 15:30:23 +02:00
|
|
|
|
Next event can be retrieved by the call of one from functions 10
|
|
|
|
|
(to wait for event), 11 (to check without waiting), 23
|
|
|
|
|
(to wait during the given time).
|
|
|
|
|
These functions return only those events, which enter into a mask set
|
|
|
|
|
by function 40. By default it is first three,
|
|
|
|
|
there is enough for most applications.
|
2006-08-03 21:30:32 +02:00
|
|
|
|
Codes of events:
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 1 = redraw event (is reset by call to function 0)
|
|
|
|
|
* 2 = key on keyboard is pressed (acts, only when the window is
|
|
|
|
|
active) or hotkey is pressed; is reset, when all keys from
|
|
|
|
|
the buffer are read out by function 2
|
|
|
|
|
* 3 = button is pressed, defined earlier by function 8
|
|
|
|
|
(or close button, created implicitly by function 0;
|
|
|
|
|
minimize button is handled by the system and sends no message;
|
|
|
|
|
acts, only when the window is active;
|
|
|
|
|
is reset when all buttons from the buffer
|
|
|
|
|
are read out by function 17)
|
|
|
|
|
* 4 = reserved (in current implementation never comes even after
|
|
|
|
|
unmasking by function 40)
|
2012-03-27 22:02:50 +02:00
|
|
|
|
* 5 = kernel finished redrawing of the desktop background
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 6 = mouse event (something happened - button pressing or moving;
|
|
|
|
|
is reset at reading)
|
|
|
|
|
* 7 = IPC event (see function 60 -
|
|
|
|
|
Inter Process Communication; is reset at reading)
|
|
|
|
|
* 8 = network event (is reset at reading)
|
|
|
|
|
* 9 = debug event (is reset at reading; see
|
|
|
|
|
debug subsystem)
|
|
|
|
|
* 16..31 = event with appropriate IRQ
|
|
|
|
|
(16=IRQ0, 31=IRQ15) (is reset after reading all IRQ data)
|
|
|
|
|
|
|
|
|
|
======================================================================
|
|
|
|
|
=================== Error codes of the file system ===================
|
|
|
|
|
======================================================================
|
|
|
|
|
* 0 = success
|
|
|
|
|
* 1 = base and/or partition of a hard disk is not defined
|
|
|
|
|
(by subfunctions 7, 8 of function 21)
|
|
|
|
|
* 2 = function is not supported for the given file system
|
|
|
|
|
* 3 = unknown file system
|
2007-04-02 16:29:39 +02:00
|
|
|
|
* 4 = reserved, is never returned in the current implementation
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 5 = file not found
|
|
|
|
|
* 6 = end of file, EOF
|
|
|
|
|
* 7 = pointer lies outside of application memory
|
|
|
|
|
* 8 = disk is full
|
|
|
|
|
* 9 = FAT table is destroyed
|
2006-08-03 21:30:32 +02:00
|
|
|
|
* 10 = access denied
|
2006-08-11 15:30:23 +02:00
|
|
|
|
* 11 = device error
|
|
|
|
|
Application start functions can return also following errors:
|
|
|
|
|
* 30 = 0x1E = not enough memory
|
|
|
|
|
* 31 = 0x1F = file is not executable
|
|
|
|
|
* 32 = 0x20 = too many processes
|