Subversion Repositories Kolibri OS

Rev

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

Rev 6030 Rev 6057
Line 124... Line 124...
124
    * if A=1 and edi contains (nonzero) pointer to caption string,
124
    * if A=1 and edi contains (nonzero) pointer to caption string,
125
      it is drawn in place in header defined in the skin
125
      it is drawn in place in header defined in the skin
126
    * value _skinh is accessible as the result of call
126
    * value _skinh is accessible as the result of call
127
      subfunction 4 of function 48
127
      subfunction 4 of function 48
Line -... Line 128...
-
 
128
 
-
 
129
---------------------- Constants for registers: ----------------------
128
 
130
  eax - SF_CREATE_WINDOW (0)
129
======================================================================
131
======================================================================
130
================ Function 1 - put pixel in the window. ===============
132
================ Function 1 - put pixel in the window. ===============
131
======================================================================
133
======================================================================
132
Parameters:
134
Parameters:
Line 137... Line 139...
137
    edx = 0x01xxxxxx - invert color of a pixel
139
    edx = 0x01xxxxxx - invert color of a pixel
138
          (low 24 bits are ignored)
140
          (low 24 bits are ignored)
139
Returned value:
141
Returned value:
140
  * function does not return value
142
  * function does not return value
Line -... Line 143...
-
 
143
 
-
 
144
---------------------- Constants for registers: ----------------------
141
 
145
  eax - SF_PUT_PIXEL (1)
142
======================================================================
146
======================================================================
143
============ Function 2 - get the code of the pressed key. ===========
147
============ Function 2 - get the code of the pressed key. ===========
144
======================================================================
148
======================================================================
145
Takes away the code of the pressed key from the buffer.
149
Takes away the code of the pressed key from the buffer.
Line 174... Line 178...
174
  * As a consequence, ASCII-codes take into account current
178
  * As a consequence, ASCII-codes take into account current
175
    keyboard layout (rus/en) as opposed to scancodes.
179
    keyboard layout (rus/en) as opposed to scancodes.
176
  * This function notifies only about those hotkeys, which were
180
  * This function notifies only about those hotkeys, which were
177
    defined by this thread by subfunction 4 of function 66.
181
    defined by this thread by subfunction 4 of function 66.
Line -... Line 182...
-
 
182
 
-
 
183
---------------------- Constants for registers: ----------------------
178
 
184
  eax - SF_GET_KEY (2)
179
======================================================================
185
======================================================================
180
==================== Function 3 - get system time. ===================
186
==================== Function 3 - get system time. ===================
181
======================================================================
187
======================================================================
182
Parameters:
188
Parameters:
Line 189... Line 195...
189
  * See also subfunction 9 of function 26 - get time from
195
  * See also subfunction 9 of function 26 - get time from
190
    the moment of start of the system; it is more convenient, because
196
    the moment of start of the system; it is more convenient, because
191
    returns simply DWORD-value of the time counter.
197
    returns simply DWORD-value of the time counter.
192
  * System time can be set by function 22.
198
  * System time can be set by function 22.
Line -... Line 199...
-
 
199
 
-
 
200
---------------------- Constants for registers: ----------------------
193
 
201
  eax - SF_GET_SYS_TIME (3)
194
======================================================================
202
======================================================================
195
=================== Function 4 - draw text string. ===================
203
=================== Function 4 - draw text string. ===================
196
======================================================================
204
======================================================================
197
Parameters:
205
Parameters:
Line 223... Line 231...
223
  * User buffer structure:
231
  * User buffer structure:
224
Xsize       dd
232
Xsize       dd
225
Ysize       dd
233
Ysize       dd
226
picture     rb  Xsize*Ysize*4  ; 32 bpp
234
picture     rb  Xsize*Ysize*4  ; 32 bpp
Line -... Line 235...
-
 
235
 
-
 
236
---------------------- Constants for registers: ----------------------
227
 
237
  eax - SF_DRAW_TEXT (4)
228
======================================================================
238
======================================================================
229
========================= Function 5 - delay. ========================
239
========================= Function 5 - delay. ========================
230
======================================================================
240
======================================================================
231
Delays execution of the program on the given time.
241
Delays execution of the program on the given time.
Line 238... Line 248...
238
  * Passing ebx=0 does not transfer control to the next process
248
  * Passing ebx=0 does not transfer control to the next process
239
    and does not make any operations at all. If it is really required
249
    and does not make any operations at all. If it is really required
240
    to transfer control to the next process (to complete a current
250
    to transfer control to the next process (to complete a current
241
    time slice), use subfunction 1 of function 68.
251
    time slice), use subfunction 1 of function 68.
Line -... Line 252...
-
 
252
 
-
 
253
---------------------- Constants for registers: ----------------------
242
 
254
  eax - SF_SLEEP (5)
243
======================================================================
255
======================================================================
244
=============== Function 7 - draw image in the window. ===============
256
=============== Function 7 - draw image in the window. ===============
245
======================================================================
257
======================================================================
246
Paramters:
258
Paramters:
Line 253... Line 265...
253
Remarks:
265
Remarks:
254
  * Coordinates of the image are coordinates of the upper left corner
266
  * Coordinates of the image are coordinates of the upper left corner
255
    of the image relative to the window.
267
    of the image relative to the window.
256
  * Size of the image in bytes is 3*xsize*ysize.
268
  * Size of the image in bytes is 3*xsize*ysize.
Line -... Line 269...
-
 
269
 
-
 
270
---------------------- Constants for registers: ----------------------
257
 
271
  eax - SF_PUT_IMAGE (7)
258
======================================================================
272
======================================================================
259
=============== Function 8 - define/delete the button. ===============
273
=============== Function 8 - define/delete the button. ===============
260
======================================================================
274
======================================================================
261
Parameters for button definition:
275
Parameters for button definition:
Line 285... Line 299...
285
    by the system as the button of minimization, the system handles
299
    by the system as the button of minimization, the system handles
286
    such pressing independently, not accessing to the application.
300
    such pressing independently, not accessing to the application.
287
    In rest it is usual button.
301
    In rest it is usual button.
288
  * Total number of buttons for all applications is limited to 4095.
302
  * Total number of buttons for all applications is limited to 4095.
Line -... Line 303...
-
 
303
 
-
 
304
---------------------- Constants for registers: ----------------------
289
 
305
  eax - SF_DEFINE_BUTTON (8)
290
======================================================================
306
======================================================================
291
============ Function 9 - information on execution thread. ===========
307
============ Function 9 - information on execution thread. ===========
292
======================================================================
308
======================================================================
293
Parameters:
309
Parameters:
Line 383... Line 399...
383
  * At the moment only the part of the buffer by a size
399
  * At the moment only the part of the buffer by a size
384
    76 = 0x4C bytes is used. Nevertheless it is recommended to use
400
    76 = 0x4C bytes is used. Nevertheless it is recommended to use
385
    1-Kb buffer for the future compatibility, in the future
401
    1-Kb buffer for the future compatibility, in the future
386
    some fields can be added.
402
    some fields can be added.
Line -... Line 403...
-
 
403
 
-
 
404
---------------------- Constants for registers: ----------------------
387
 
405
  eax - SF_THREAD_INFO (9)
388
======================================================================
406
======================================================================
389
==================== Function 10 - wait for event. ===================
407
==================== Function 10 - wait for event. ===================
390
======================================================================
408
======================================================================
391
If the message queue is empty, waits for appearance of the message
409
If the message queue is empty, waits for appearance of the message
Line 401... Line 419...
401
    a mask set by function 40. By default it is
419
    a mask set by function 40. By default it is
402
    redraw, key and button events.
420
    redraw, key and button events.
403
  * To check, whether there is a message in queue, use function 11.
421
  * To check, whether there is a message in queue, use function 11.
404
    To wait for no more than given time, use function 23.
422
    To wait for no more than given time, use function 23.
Line -... Line 423...
-
 
423
 
-
 
424
---------------------- Constants for registers: ----------------------
405
 
425
  eax - SF_WAIT_EVENT (10)
406
======================================================================
426
======================================================================
407
=============== Function 11 - check for event, no wait. ==============
427
=============== Function 11 - check for event, no wait. ==============
408
======================================================================
428
======================================================================
409
If the message queue contains event, function reads out
429
If the message queue contains event, function reads out
Line 418... Line 438...
418
    a mask set by function 40. By default it is
438
    a mask set by function 40. By default it is
419
    redraw, key and button events.
439
    redraw, key and button events.
420
  * To wait for event, use function 10.
440
  * To wait for event, use function 10.
421
    To wait for no more than given time, use function 23.
441
    To wait for no more than given time, use function 23.
Line -... Line 442...
-
 
442
 
-
 
443
---------------------- Constants for registers: ----------------------
422
 
444
  eax - SF_CHECK_EVENT (11)
423
======================================================================
445
======================================================================
424
=============== Function 12 - begin/end window redraw. ===============
446
=============== Function 12 - begin/end window redraw. ===============
Line 425... Line 447...
425
======================================================================
447
======================================================================
Line 439... Line 461...
439
  * function does not return value
461
  * function does not return value
440
Remarks:
462
Remarks:
441
  * Subfunction 1 deletes all buttons defined with
463
  * Subfunction 1 deletes all buttons defined with
442
    function 8, they must be defined again.
464
    function 8, they must be defined again.
Line -... Line 465...
-
 
465
 
-
 
466
---------------------- Constants for registers: ----------------------
-
 
467
  eax - SF_REDRAW (12)
443
 
468
  ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2)
444
======================================================================
469
======================================================================
445
============ Function 13 - draw a rectangle in the window. ===========
470
============ Function 13 - draw a rectangle in the window. ===========
446
======================================================================
471
======================================================================
447
Parameters:
472
Parameters:
Line 453... Line 478...
453
  * function does not return value
478
  * function does not return value
454
Remarks:
479
Remarks:
455
  * Coordinates are understood as coordinates of the left upper corner
480
  * Coordinates are understood as coordinates of the left upper corner
456
    of a rectangle relative to the window.
481
    of a rectangle relative to the window.
Line -... Line 482...
-
 
482
 
-
 
483
---------------------- Constants for registers: ----------------------
457
 
484
  eax - SF_DRAW_RECT (13)
458
======================================================================
485
======================================================================
459
=================== Function 14 - get screen size. ===================
486
=================== Function 14 - get screen size. ===================
460
======================================================================
487
======================================================================
461
Parameters:
488
Parameters:
Line 468... Line 495...
468
            vertical size - 1
495
            vertical size - 1
469
Remarks:
496
Remarks:
470
  * See also subfunction 5 of function 48 - get sizes of
497
  * See also subfunction 5 of function 48 - get sizes of
471
    working area of the screen.
498
    working area of the screen.
Line -... Line 499...
-
 
499
 
-
 
500
---------------------- Constants for registers: ----------------------
472
 
501
  eax - SF_GET_SCREEN_SIZE (14)
473
======================================================================
502
======================================================================
474
== Function 15, subfunction 1 - set a size of the background image. ==
503
== Function 15, subfunction 1 - set a size of the background image. ==
475
======================================================================
504
======================================================================
476
Parameters:
505
Parameters:
Line 486... Line 515...
486
  * For update of the screen (after completion of a series of commands
515
  * For update of the screen (after completion of a series of commands
487
    working with a background) call subfunction 3.
516
    working with a background) call subfunction 3.
488
  * There is a pair function for get size of the background image -
517
  * There is a pair function for get size of the background image -
489
    subfunction 1 of function 39.
518
    subfunction 1 of function 39.
Line -... Line 519...
-
 
519
 
-
 
520
---------------------- Constants for registers: ----------------------
-
 
521
  eax - SF_BACKGROUND_SET (15)
490
 
522
  ebx - SSF_SIZE_BG (1)
491
======================================================================
523
======================================================================
492
=== Function 15, subfunction 2 - put pixel on the background image. ==
524
=== Function 15, subfunction 2 - put pixel on the background image. ==
493
======================================================================
525
======================================================================
494
Parameters:
526
Parameters:
Line 506... Line 538...
506
  * For update of the screen (after completion of a series of commands
538
  * For update of the screen (after completion of a series of commands
507
    working with a background) call subfunction 3.
539
    working with a background) call subfunction 3.
508
  * There is a pair function for get pixel on the background image -
540
  * There is a pair function for get pixel on the background image -
509
    subfunction 2 of function 39.
541
    subfunction 2 of function 39.
Line -... Line 542...
-
 
542
 
-
 
543
---------------------- Constants for registers: ----------------------
-
 
544
  eax - SF_BACKGROUND_SET (15)
510
 
545
  ebx - SSF_PIXEL_BG (2)
511
======================================================================
546
======================================================================
512
=========== Function 15, subfunction 3 - redraw background. ==========
547
=========== Function 15, subfunction 3 - redraw background. ==========
513
======================================================================
548
======================================================================
514
Parameters:
549
Parameters:
515
  * eax = 15 - function number
550
  * eax = 15 - function number
516
  * ebx = 3 - subfunction number
551
  * ebx = 3 - subfunction number
517
Returned value:
552
Returned value:
Line -... Line 553...
-
 
553
  * function does not return value
-
 
554
 
-
 
555
---------------------- Constants for registers: ----------------------
518
  * function does not return value
556
  eax - SF_BACKGROUND_SET (15)
519
 
557
  ebx - SSF_REDRAW_BG (3)
520
======================================================================
558
======================================================================
521
== Function 15, subfunction 4 - set drawing mode for the background. =
559
== Function 15, subfunction 4 - set drawing mode for the background. =
522
======================================================================
560
======================================================================
Line 532... Line 570...
532
  * For update of the screen (after completion of a series of commands
570
  * For update of the screen (after completion of a series of commands
533
    working with a background) call subfunction 3.
571
    working with a background) call subfunction 3.
534
  * There is a pair function for get drawing mode of the background -
572
  * There is a pair function for get drawing mode of the background -
535
    subfunction 4 of function 39.
573
    subfunction 4 of function 39.
Line -... Line 574...
-
 
574
 
-
 
575
---------------------- Constants for registers: ----------------------
-
 
576
  eax - SF_BACKGROUND_SET (15)
536
 
577
  ebx - SSF_MODE_BG (4)
537
======================================================================
578
======================================================================
538
===================== Function 15, subfunction 5 =====================
579
===================== Function 15, subfunction 5 =====================
539
============ Put block of pixels on the background image. ============
580
============ Put block of pixels on the background image. ============
540
======================================================================
581
======================================================================
Line 553... Line 594...
553
    from left to right, from up to down.
594
    from left to right, from up to down.
554
  * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3.
595
  * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3.
555
  * For update of the screen (after completion of a series of commands
596
  * For update of the screen (after completion of a series of commands
556
    working with a background) call subfunction 3.
597
    working with a background) call subfunction 3.
Line -... Line 598...
-
 
598
 
-
 
599
---------------------- Constants for registers: ----------------------
-
 
600
  eax - SF_BACKGROUND_SET (15)
557
 
601
  ebx - SSF_IMAGE_BG (5)
558
======================================================================
602
======================================================================
559
===================== Function 15, subfunction 6 =====================
603
===================== Function 15, subfunction 6 =====================
560
======== Map background data to the address space of process. ========
604
======== Map background data to the address space of process. ========
561
======================================================================
605
======================================================================
Line 570... Line 614...
570
    changes of background sizes while process works with mapped data.
614
    changes of background sizes while process works with mapped data.
571
  * Color of each pixel is stored as 3-bytes value BBGGRR.
615
  * Color of each pixel is stored as 3-bytes value BBGGRR.
572
  * Pixels of the background image are written sequentially
616
  * Pixels of the background image are written sequentially
573
    from left to right, from up to down.
617
    from left to right, from up to down.
Line -... Line 618...
-
 
618
 
-
 
619
---------------------- Constants for registers: ----------------------
-
 
620
  eax - SF_BACKGROUND_SET (15)
574
 
621
  ebx - SSF_MAP_BG (6)
575
======================================================================
622
======================================================================
576
===== Function 15, subfunction 7 - close mapped background data. =====
623
===== Function 15, subfunction 7 - close mapped background data. =====
577
======================================================================
624
======================================================================
578
Parameters:
625
Parameters:
579
  * eax = 15 - function number
626
  * eax = 15 - function number
580
  * ebx = 7 - subfunction number
627
  * ebx = 7 - subfunction number
581
  * ecx = pointer to mapped data
628
  * ecx = pointer to mapped data
582
Returned value:
629
Returned value:
Line -... Line 630...
-
 
630
  * eax = 1 - success, 0 - error
-
 
631
 
-
 
632
---------------------- Constants for registers: ----------------------
583
  * eax = 1 - success, 0 - error
633
  eax - SF_BACKGROUND_SET (15)
584
 
634
  ebx - SSF_UNMAP_BG (7)
585
======================================================================
635
======================================================================
586
===================== Function 15, subfunction 8 =====================
636
===================== Function 15, subfunction 8 =====================
587
============= Get coordinates of last draw the background ============
637
============= Get coordinates of last draw the background ============
Line 597... Line 647...
597
    (right,bottom) are coordinates of the right lower one.
647
    (right,bottom) are coordinates of the right lower one.
598
  * For receiving more reliable information, call the function
648
  * For receiving more reliable information, call the function
599
    immediately after the event:
649
    immediately after the event:
600
             5 = kernel finished redrawing of the desktop background
650
             5 = kernel finished redrawing of the desktop background
Line -... Line 651...
-
 
651
 
-
 
652
---------------------- Constants for registers: ----------------------
-
 
653
  eax - SF_BACKGROUND_SET (15)
601
 
654
  ebx - SSF_LAST_DRAW (8)
602
======================================================================
655
======================================================================
603
===================== Function 15, subfunction 9 =====================
656
===================== Function 15, subfunction 9 =====================
604
============= Redraws a rectangular part of the background ===========
657
============= Redraws a rectangular part of the background ===========
605
======================================================================
658
======================================================================
Line 613... Line 666...
613
Remarks:
666
Remarks:
614
  * (left,top) are coordinates of the left upper corner,
667
  * (left,top) are coordinates of the left upper corner,
615
    (right,bottom) are coordinates of the right lower one.
668
    (right,bottom) are coordinates of the right lower one.
616
  * If parameters are set incorrectly then background is not redrawn.
669
  * If parameters are set incorrectly then background is not redrawn.
Line -... Line 670...
-
 
670
 
-
 
671
---------------------- Constants for registers: ----------------------
-
 
672
  eax - SF_BACKGROUND_SET (15)
617
 
673
  ebx - SSF_REDRAW_RECT (9)
618
======================================================================
674
======================================================================
619
=============== Function 16 - save ramdisk on a floppy. ==============
675
=============== Function 16 - save ramdisk on a floppy. ==============
620
======================================================================
676
======================================================================
621
Parameters:
677
Parameters:
622
  * eax = 16 - function number
678
  * eax = 16 - function number
623
  * ebx = 1 or ebx = 2 - on which floppy save
679
  * ebx = 1 or ebx = 2 - on which floppy save
624
Returned value:
680
Returned value:
625
  * eax = 0 - success
681
  * eax = 0 - success
Line -... Line 682...
-
 
682
  * eax = 1 - error
-
 
683
 
626
  * eax = 1 - error
684
---------------------- Constants for registers: ----------------------
627
 
685
  eax - SF_RD_TO_FLOPPY (16)
628
======================================================================
686
======================================================================
629
======= Function 17 - get the identifier of the pressed button. ======
687
======= Function 17 - get the identifier of the pressed button. ======
630
======================================================================
688
======================================================================
Line 646... Line 704...
646
    will return answer "buffer is empty".
704
    will return answer "buffer is empty".
647
  * Returned value for al corresponds to the state of mouse buttons
705
  * Returned value for al corresponds to the state of mouse buttons
648
    as in subfunction 2 of function 37 at the beginning
706
    as in subfunction 2 of function 37 at the beginning
649
    of button press, excluding lower bit, which is cleared.
707
    of button press, excluding lower bit, which is cleared.
Line -... Line 708...
-
 
708
 
-
 
709
---------------------- Constants for registers: ----------------------
650
 
710
  eax - SF_GET_BUTTON (17)
651
======================================================================
711
======================================================================
652
===================== Function 18, subfunction 1 =====================
712
===================== Function 18, subfunction 1 =====================
653
============= Make deactive the window of the given thread. ==========
713
============= Make deactive the window of the given thread. ==========
654
======================================================================
714
======================================================================
Line 657... Line 717...
657
  * ebx = 1 - subfunction number
717
  * ebx = 1 - subfunction number
658
  * ecx = number of the thread slot
718
  * ecx = number of the thread slot
659
Returned value:
719
Returned value:
660
  * function does not return value
720
  * function does not return value
Line -... Line 721...
-
 
721
 
-
 
722
---------------------- Constants for registers: ----------------------
-
 
723
  eax - SF_SYSTEM (18)
661
 
724
  ebx - SSF_UNFOCUS_WINDOW (1)
662
======================================================================
725
======================================================================
663
= Function 18, subfunction 2 - terminate process/thread by the slot. =
726
= Function 18, subfunction 2 - terminate process/thread by the slot. =
664
======================================================================
727
======================================================================
665
Parameters:
728
Parameters:
Line 673... Line 736...
673
    number of the slot 1),
736
    number of the slot 1),
674
    it is possible to terminate any normal process/thread.
737
    it is possible to terminate any normal process/thread.
675
  * See also subfunction 18 - terminate
738
  * See also subfunction 18 - terminate
676
    process/thread by the identifier.
739
    process/thread by the identifier.
Line -... Line 740...
-
 
740
 
-
 
741
---------------------- Constants for registers: ----------------------
-
 
742
  eax - SF_SYSTEM (18)
677
 
743
  ebx - SSF_TERMINATE_THREAD (2)
678
======================================================================
744
======================================================================
679
===================== Function 18, subfunction 3 =====================
745
===================== Function 18, subfunction 3 =====================
680
============= Make active the window of the given thread. ============
746
============= Make active the window of the given thread. ============
681
======================================================================
747
======================================================================
Line 688... Line 754...
688
Remarks:
754
Remarks:
689
  * If correct, but nonexistent slot is given,
755
  * If correct, but nonexistent slot is given,
690
    some window is made active.
756
    some window is made active.
691
  * To find out, which window is active, use subfunction 7.
757
  * To find out, which window is active, use subfunction 7.
Line -... Line 758...
-
 
758
 
-
 
759
---------------------- Constants for registers: ----------------------
-
 
760
  eax - SF_SYSTEM (18)
692
 
761
  ebx - SSF_FOCUS_WINDOW (3)
693
======================================================================
762
======================================================================
694
===================== Function 18, subfunction 4 =====================
763
===================== Function 18, subfunction 4 =====================
695
=========== Get counter of idle time units per one second. ===========
764
=========== Get counter of idle time units per one second. ===========
696
======================================================================
765
======================================================================
Line 701... Line 770...
701
  * eax = 18 - function number
770
  * eax = 18 - function number
702
  * ebx = 4 - subfunction number
771
  * ebx = 4 - subfunction number
703
Returned value:
772
Returned value:
704
  * eax = value of the counter of idle time units per one second
773
  * eax = value of the counter of idle time units per one second
Line -... Line 774...
-
 
774
 
-
 
775
---------------------- Constants for registers: ----------------------
-
 
776
  eax - SF_SYSTEM (18)
705
 
777
  ebx - SSF_GET_IDLE_COUNT (4)
706
======================================================================
778
======================================================================
707
========== Function 18, subfunction 5 - get CPU clock rate. ==========
779
========== Function 18, subfunction 5 - get CPU clock rate. ==========
708
======================================================================
780
======================================================================
709
Parameters:
781
Parameters:
710
  * eax = 18 - function number
782
  * eax = 18 - function number
711
  * ebx = 5 - subfunction number
783
  * ebx = 5 - subfunction number
712
Returned value:
784
Returned value:
Line -... Line 785...
-
 
785
  * eax = clock rate (modulo 2^32 clock ticks = 4GHz)
-
 
786
 
-
 
787
---------------------- Constants for registers: ----------------------
713
  * eax = clock rate (modulo 2^32 clock ticks = 4GHz)
788
  eax - SF_SYSTEM (18)
714
 
789
  ebx - SSF_GET_CPU_REQUENCY (5)
715
======================================================================
790
======================================================================
716
 Function 18, subfunction 6 - save ramdisk to the file on hard drive.
791
 Function 18, subfunction 6 - save ramdisk to the file on hard drive.
717
======================================================================
792
======================================================================
Line 725... Line 800...
725
  * else eax = error code of the file system
800
  * else eax = error code of the file system
726
Remarks:
801
Remarks:
727
  * All folders in the given path must exist, otherwise function
802
  * All folders in the given path must exist, otherwise function
728
    returns value 5, "file not found".
803
    returns value 5, "file not found".
Line -... Line 804...
-
 
804
 
-
 
805
---------------------- Constants for registers: ----------------------
-
 
806
  eax - SF_SYSTEM (18)
729
 
807
  ebx - SSF_RD_TO_HDD (6)
730
======================================================================
808
======================================================================
731
=========== Function 18, subfunction 7 - get active window. ==========
809
=========== Function 18, subfunction 7 - get active window. ==========
732
======================================================================
810
======================================================================
733
Parameters:
811
Parameters:
Line 739... Line 817...
739
Remarks:
817
Remarks:
740
  * Active window is at the top of the window stack and receives
818
  * Active window is at the top of the window stack and receives
741
    messages on all keyboard input.
819
    messages on all keyboard input.
742
  * To make a window active, use subfunction 3.
820
  * To make a window active, use subfunction 3.
Line -... Line 821...
-
 
821
 
-
 
822
---------------------- Constants for registers: ----------------------
-
 
823
  eax - SF_SYSTEM (18)
743
 
824
  ebx - SSF_GET_ACTIVE_WINDOW (7)
744
======================================================================
825
======================================================================
745
== Function 18, subfunction 8 - disable/enable the internal speaker. =
826
== Function 18, subfunction 8 - disable/enable the internal speaker. =
746
======================================================================
827
======================================================================
747
If speaker sound is disabled, all calls to subfunction 55 of
828
If speaker sound is disabled, all calls to subfunction 55 of
Line 763... Line 844...
763
  * ebx = 8 - subfunction number
844
  * ebx = 8 - subfunction number
764
  * ecx = 2 - number of the subsubfunction
845
  * ecx = 2 - number of the subsubfunction
765
Returned value:
846
Returned value:
766
  * function does not return value
847
  * function does not return value
Line -... Line 848...
-
 
848
 
-
 
849
---------------------- Constants for registers: ----------------------
-
 
850
  eax - SF_SYSTEM (18)
-
 
851
  ebx - SSF_SPEAKER (8)
767
 
852
  ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2)
768
======================================================================
853
======================================================================
769
== Function 18, subfunction 9 - system shutdown with the parameter. ==
854
== Function 18, subfunction 9 - system shutdown with the parameter. ==
770
======================================================================
855
======================================================================
771
Parameters:
856
Parameters:
Line 781... Line 866...
781
    as the tag of success
866
    as the tag of success
782
Remarks:
867
Remarks:
783
  * Do not rely on returned value by incorrect call, it can be
868
  * Do not rely on returned value by incorrect call, it can be
784
    changed in future versions of the kernel.
869
    changed in future versions of the kernel.
Line -... Line 870...
-
 
870
 
-
 
871
---------------------- Constants for registers: ----------------------
-
 
872
  eax - SF_SYSTEM (18)
785
 
873
  ebx - SSF_SHUTDOWN (9)
786
======================================================================
874
======================================================================
787
======= Function 18, subfunction 10 - minimize topmost window. =======
875
======= Function 18, subfunction 10 - minimize topmost window. =======
788
======================================================================
876
======================================================================
789
Minimizes the topmost (active) window.
877
Minimizes the topmost (active) window.
Line 802... Line 890...
802
    at pressing the minimization button (for skinned windows
890
    at pressing the minimization button (for skinned windows
803
    it is defined automatically by function 0,
891
    it is defined automatically by function 0,
804
    for other windows it can be defined manually by function 8),
892
    for other windows it can be defined manually by function 8),
805
    restore of a window is done by the application '@taskbar'.
893
    restore of a window is done by the application '@taskbar'.
Line -... Line 894...
-
 
894
 
-
 
895
---------------------- Constants for registers: ----------------------
-
 
896
  eax - SF_SYSTEM (18)
806
 
897
  ebx - SSF_MINIMIZE_WINDOW (10)
807
======================================================================
898
======================================================================
808
 Function 18, subfunction 11 - get information on the disk subsystem.
899
 Function 18, subfunction 11 - get information on the disk subsystem.
809
======================================================================
900
======================================================================
810
Parameters:
901
Parameters:
Line 870... Line 961...
870
 
961
 
871
Remarks:
962
Remarks:
872
  * The table can be used for obtaining the information about
963
  * The table can be used for obtaining the information about
Line -... Line 964...
-
 
964
    available devices.
-
 
965
 
-
 
966
---------------------- Constants for registers: ----------------------
873
    available devices.
967
  eax - SF_SYSTEM (18)
874
 
968
  ebx - SSF_INFO_DISC_SYS (11)
875
======================================================================
969
======================================================================
876
========== Function 18, subfunction 13 - get kernel version. =========
970
========== Function 18, subfunction 13 - get kernel version. =========
877
======================================================================
971
======================================================================
Line 889... Line 983...
889
For Kolibri 0.7.7.0+ kernel:
983
For Kolibri 0.7.7.0+ kernel:
890
db 0,7,7,0
984
db 0,7,7,0
891
db 0
985
db 0
892
dd 1675
986
dd 1675
Line -... Line 987...
-
 
987
 
-
 
988
---------------------- Constants for registers: ----------------------
-
 
989
  eax - SF_SYSTEM (18)
893
 
990
  ebx - SSF_KERNEL_VERSION (13)
894
======================================================================
991
======================================================================
895
======= Function 18, subfunction 14 - wait for screen retrace. =======
992
======= Function 18, subfunction 14 - wait for screen retrace. =======
896
======================================================================
993
======================================================================
897
Waits for the beginning of retrace of the scanning ray of the screen
994
Waits for the beginning of retrace of the scanning ray of the screen
Line 903... Line 1000...
903
  * eax = 0 as the tag of success
1000
  * eax = 0 as the tag of success
904
Remarks:
1001
Remarks:
905
  * Function is intended only for active high-efficiency graphics
1002
  * Function is intended only for active high-efficiency graphics
906
    applications; is used for smooth output of a graphics.
1003
    applications; is used for smooth output of a graphics.
Line -... Line 1004...
-
 
1004
 
-
 
1005
---------------------- Constants for registers: ----------------------
-
 
1006
  eax - SF_SYSTEM (18)
907
 
1007
  ebx - SSF_WAIT_RETRACE (14)
908
======================================================================
1008
======================================================================
909
== Function 18, subfunction 15 - center mouse cursor on the screen. ==
1009
== Function 18, subfunction 15 - center mouse cursor on the screen. ==
910
======================================================================
1010
======================================================================
911
Parameters:
1011
Parameters:
912
  * eax = 18 - function number
1012
  * eax = 18 - function number
913
  * ebx = 15 - subfunction number
1013
  * ebx = 15 - subfunction number
914
Returned value:
1014
Returned value:
Line -... Line 1015...
-
 
1015
  * eax = 0 as the tag of success
-
 
1016
 
-
 
1017
---------------------- Constants for registers: ----------------------
915
  * eax = 0 as the tag of success
1018
  eax - SF_SYSTEM (18)
916
 
1019
  ebx - SSF_CURSOR_CENTER (15)
917
======================================================================
1020
======================================================================
918
========= Function 18, subfunction 16 - get size of free RAM. ========
1021
========= Function 18, subfunction 16 - get size of free RAM. ========
919
======================================================================
1022
======================================================================
920
Parameters:
1023
Parameters:
921
  * eax = 18 - function number
1024
  * eax = 18 - function number
922
  * ebx = 16 - subfunction number
1025
  * ebx = 16 - subfunction number
Line -... Line 1026...
-
 
1026
Returned value:
-
 
1027
  * eax = size of free memory in kilobytes
-
 
1028
 
923
Returned value:
1029
---------------------- Constants for registers: ----------------------
924
  * eax = size of free memory in kilobytes
1030
  eax - SF_SYSTEM (18)
925
 
1031
  ebx - SSF_GET_FREE_RAM (16)
926
======================================================================
1032
======================================================================
927
======== Function 18, subfunction 17 - get full amount of RAM. =======
1033
======== Function 18, subfunction 17 - get full amount of RAM. =======
928
======================================================================
1034
======================================================================
929
Parameters:
1035
Parameters:
930
  * eax = 18 - function number
1036
  * eax = 18 - function number
Line -... Line 1037...
-
 
1037
  * ebx = 17 - subfunction number
-
 
1038
Returned value:
-
 
1039
  * eax = total size of existing memory in kilobytes
931
  * ebx = 17 - subfunction number
1040
 
932
Returned value:
1041
---------------------- Constants for registers: ----------------------
933
  * eax = total size of existing memory in kilobytes
1042
  eax - SF_SYSTEM (18)
934
 
1043
  ebx - SSF_GET_TOTAL_RAM (17)
935
======================================================================
1044
======================================================================
Line 947... Line 1056...
947
  * It is impossible to terminate system thread OS/IDLE (identifier
1056
  * It is impossible to terminate system thread OS/IDLE (identifier
948
    1), it is possible to terminate any normal process/thread.
1057
    1), it is possible to terminate any normal process/thread.
949
  * See also subfunction 2 - terminate
1058
  * See also subfunction 2 - terminate
950
    process/thread by given slot.
1059
    process/thread by given slot.
Line -... Line 1060...
-
 
1060
 
-
 
1061
---------------------- Constants for registers: ----------------------
-
 
1062
  eax - SF_SYSTEM (18)
951
 
1063
  ebx - SSF_TERMINATE_THREAD_ID (18)
952
======================================================================
1064
======================================================================
953
======== Function 18, subfunction 19 - get/set mouse features. =======
1065
======== Function 18, subfunction 19 - get/set mouse features. =======
Line 954... Line 1066...
954
======================================================================
1066
======================================================================
Line 1030... Line 1142...
1030
Returned value:
1142
Returned value:
1031
  * function does not return value
1143
  * function does not return value
Line 1032... Line 1144...
1032
 
1144
 
Line -... Line 1145...
-
 
1145
Remark: mouse settings can be modified in the application mouse_cfg.
-
 
1146
 
-
 
1147
---------------------- Constants for registers: ----------------------
-
 
1148
  eax - SF_SYSTEM (18)
-
 
1149
  ebx - SSF_MOUSE_SETTINGS (19)
-
 
1150
  ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2),
1033
Remark: mouse settings can be modified in the application mouse_cfg.
1151
    SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5),
1034
 
1152
    SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7)
1035
======================================================================
1153
======================================================================
1036
======== Function 18, subfunction 20 - get information on RAM. =======
1154
======== Function 18, subfunction 20 - get information on RAM. =======
1037
======================================================================
1155
======================================================================
Line 1054... Line 1172...
1054
    * +28: dword: size of maximum free block in kernel heap
1172
    * +28: dword: size of maximum free block in kernel heap
1055
                 (reserved)
1173
                 (reserved)
1056
    * +32: dword: size of maximum allocated block in kernel heap
1174
    * +32: dword: size of maximum allocated block in kernel heap
1057
                 (reserved)
1175
                 (reserved)
Line -... Line 1176...
-
 
1176
 
-
 
1177
---------------------- Constants for registers: ----------------------
-
 
1178
  eax - SF_SYSTEM (18)
1058
 
1179
  ebx - SSF_GET_RAM_INFO (20)
1059
======================================================================
1180
======================================================================
1060
===================== Function 18, subfunction 21 ====================
1181
===================== Function 18, subfunction 21 ====================
1061
======== Get slot number of process/thread by the identifier. ========
1182
======== Get slot number of process/thread by the identifier. ========
1062
======================================================================
1183
======================================================================
Line 1066... Line 1187...
1066
  * ecx = identifer of process/thread (PID/TID)
1187
  * ecx = identifer of process/thread (PID/TID)
1067
Returned value:
1188
Returned value:
1068
  * eax = 0 - error (invalid identifier)
1189
  * eax = 0 - error (invalid identifier)
1069
  * otherwise eax = slot number
1190
  * otherwise eax = slot number
Line -... Line 1191...
-
 
1191
 
-
 
1192
---------------------- Constants for registers: ----------------------
-
 
1193
  eax - SF_SYSTEM (18)
1070
 
1194
  ebx - SSF_GET_THREAD_SLOT (21)
1071
======================================================================
1195
======================================================================
1072
===================== Function 18, subfunction 22 ====================
1196
===================== Function 18, subfunction 22 ====================
1073
============== Operations with window of another thread. =============
1197
============== Operations with window of another thread. =============
1074
======================================================================
1198
======================================================================
Line 1087... Line 1211...
1087
Remarks:
1211
Remarks:
1088
  * The thread can minimize its window with subfunction 10.
1212
  * The thread can minimize its window with subfunction 10.
1089
  * One can restore and activate window simultaneously with
1213
  * One can restore and activate window simultaneously with
1090
    subfunction 3 (which requires slot number).
1214
    subfunction 3 (which requires slot number).
Line -... Line 1215...
-
 
1215
 
-
 
1216
---------------------- Constants for registers: ----------------------
-
 
1217
  eax - SF_SYSTEM (18)
-
 
1218
  ebx - SSF_FOREIGN_WINDOW (22)
-
 
1219
  ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2),
1091
 
1220
    SSSF_RESTORE_ID (3)
1092
======================================================================
1221
======================================================================
1093
======== Function 18, subfunction 23 - minimize all windows. ==========
1222
======== Function 18, subfunction 23 - minimize all windows. ==========
1094
======================================================================
1223
======================================================================
1095
Parameters:
1224
Parameters:
Line 1099... Line 1228...
1099
  * eax = 0 - all windows have been minimized before a function call
1228
  * eax = 0 - all windows have been minimized before a function call
1100
  * eax = N - number of windows minimized from function
1229
  * eax = N - number of windows minimized from function
1101
Remarks:
1230
Remarks:
1102
  * Window of special thread (name begin to symbol @) is not minimize.
1231
  * Window of special thread (name begin to symbol @) is not minimize.
Line -... Line 1232...
-
 
1232
 
-
 
1233
---------------------- Constants for registers: ----------------------
-
 
1234
  eax - SF_SYSTEM (18)
1103
 
1235
  ebx - SSF_MINIMIZE_ALL (23)
1104
======================================================================
1236
======================================================================
1105
======= Function 18, subfunction 24 - set limits of screen. ==========
1237
======= Function 18, subfunction 24 - set limits of screen. ==========
1106
======================================================================
1238
======================================================================
1107
Parameters:
1239
Parameters:
Line 1117... Line 1249...
1117
    partially.
1249
    partially.
1118
  * The sizes specified in the function should not exceed the sizes
1250
  * The sizes specified in the function should not exceed the sizes
1119
    of the current video mode, otherwise the function will not change
1251
    of the current video mode, otherwise the function will not change
1120
    anything.
1252
    anything.
Line -... Line 1253...
-
 
1253
 
-
 
1254
---------------------- Constants for registers: ----------------------
-
 
1255
  eax - SF_SYSTEM (18)
1121
 
1256
  ebx - SSF_SET_SCREEN_LIMITS (24)
1122
======================================================================
1257
======================================================================
1123
===================== Function 18, subfunction 25 ====================
1258
===================== Function 18, subfunction 25 ====================
1124
===== Control position of the window relative to other windows. ======
1259
===== Control position of the window relative to other windows. ======
Line 1148... Line 1283...
1148
 ZPOS_DESKTOP     = -2 - on the background
1283
 ZPOS_DESKTOP     = -2 - on the background
1149
 ZPOS_ALWAYS_BACK = -1 - behind all the windows
1284
 ZPOS_ALWAYS_BACK = -1 - behind all the windows
1150
 ZPOS_NORMAL      = 0  - normal
1285
 ZPOS_NORMAL      = 0  - normal
1151
 ZPOS_ALWAYS_TOP  = 1  - on top of all windows
1286
 ZPOS_ALWAYS_TOP  = 1  - on top of all windows
Line -... Line 1287...
-
 
1287
 
-
 
1288
---------------------- Constants for registers: ----------------------
-
 
1289
  eax - SF_SYSTEM (18)
-
 
1290
  ebx - SSF_WINDOW_BEHAVIOR (25)
1152
 
1291
  ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
1153
======================================================================
1292
======================================================================
1154
==================== Function 20 - MIDI interface. ===================
1293
==================== Function 20 - MIDI interface. ===================
Line 1155... Line 1294...
1155
======================================================================
1294
======================================================================
Line 1169... Line 1308...
1169
  * eax = 1 - base port is not defined
1308
  * eax = 1 - base port is not defined
1170
Remarks:
1309
Remarks:
1171
  * Previously the base port must be defined by
1310
  * Previously the base port must be defined by
1172
    subfunction 1 of function 21.
1311
    subfunction 1 of function 21.
Line -... Line 1312...
-
 
1312
 
-
 
1313
---------------------- Constants for registers: ----------------------
-
 
1314
  eax - SF_MIDI (20)
1173
 
1315
  ebx - SSF_RESET (1), SSF_OUTPUT (2)
1174
======================================================================
1316
======================================================================
1175
======== Function 21, subfunction 1 - set MPU MIDI base port. ========
1317
======== Function 21, subfunction 1 - set MPU MIDI base port. ========
1176
======================================================================
1318
======================================================================
1177
Parameters:
1319
Parameters:
Line 1184... Line 1326...
1184
Remarks:
1326
Remarks:
1185
  * Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF.
1327
  * Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF.
1186
  * The installation of base is necessary for function 20.
1328
  * The installation of base is necessary for function 20.
1187
  * To get base port use subfunction 1 of function 26.
1329
  * To get base port use subfunction 1 of function 26.
Line -... Line 1330...
-
 
1330
 
-
 
1331
---------------------- Constants for registers: ----------------------
-
 
1332
  eax - SF_SYSTEM_SET (21)
1188
 
1333
  ebx - SSF_MPU_MIDI_BASE (1)
1189
======================================================================
1334
======================================================================
1190
========== Function 21, subfunction 2 - set keyboard layout. =========
1335
========== Function 21, subfunction 2 - set keyboard layout. =========
1191
======================================================================
1336
======================================================================
1192
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
1337
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
Line 1217... Line 1362...
1217
  * Country identifier is global system variable, which is not used
1362
  * Country identifier is global system variable, which is not used
1218
    by the kernel itself; however the application '@taskbar' displays
1363
    by the kernel itself; however the application '@taskbar' displays
1219
    the corresponding icon.
1364
    the corresponding icon.
1220
  * The application @taskbar switches layouts on user request.
1365
  * The application @taskbar switches layouts on user request.
Line -... Line 1366...
-
 
1366
 
-
 
1367
---------------------- Constants for registers: ----------------------
-
 
1368
  eax - SF_SYSTEM_SET (21)
1221
 
1369
  ebx - SSF_KEYBOARD_LAYOUT (2)
1222
======================================================================
1370
======================================================================
1223
========== Function 21, subfunction 5 - set system language. =========
1371
========== Function 21, subfunction 5 - set system language. =========
1224
======================================================================
1372
======================================================================
1225
Parameters:
1373
Parameters:
Line 1234... Line 1382...
1234
    appropriate icon.
1382
    appropriate icon.
1235
  * Function does not check for correctness, as the kernel does not
1383
  * Function does not check for correctness, as the kernel does not
1236
    use this variable.
1384
    use this variable.
1237
  * To get system language use subfunction 5 of function 26.
1385
  * To get system language use subfunction 5 of function 26.
Line -... Line 1386...
-
 
1386
 
-
 
1387
---------------------- Constants for registers: ----------------------
-
 
1388
  eax - SF_SYSTEM_SET (21)
1238
 
1389
  ebx - SSF_SYS_LANG (5)
1239
======================================================================
1390
======================================================================
1240
 Function 21, subfunction 11 - enable/disable low-level access to HD.
1391
 Function 21, subfunction 11 - enable/disable low-level access to HD.
1241
======================================================================
1392
======================================================================
1242
Parameters:
1393
Parameters:
Line 1248... Line 1399...
1248
Remarks:
1399
Remarks:
1249
  * Is used in LBA-read (subfunction 8 of function 58).
1400
  * Is used in LBA-read (subfunction 8 of function 58).
1250
  * The current implementation uses only low bit of ecx.
1401
  * The current implementation uses only low bit of ecx.
1251
  * To get current status use subfunction 11 of function 26.
1402
  * To get current status use subfunction 11 of function 26.
Line -... Line 1403...
-
 
1403
 
-
 
1404
---------------------- Constants for registers: ----------------------
-
 
1405
  eax - SF_SYSTEM_SET (21)
1252
 
1406
  ebx - SSF_ACCESS_HD_LBA (11)
1253
======================================================================
1407
======================================================================
1254
 Function 21, subfunction 12 - enable/disable low-level access to PCI.
1408
 Function 21, subfunction 12 - enable/disable low-level access to PCI.
1255
======================================================================
1409
======================================================================
1256
Parameters:
1410
Parameters:
Line 1262... Line 1416...
1262
Remarks:
1416
Remarks:
1263
  * Is used in operations with PCI bus (function 62).
1417
  * Is used in operations with PCI bus (function 62).
1264
  * The current implementation uses only low bit of ecx.
1418
  * The current implementation uses only low bit of ecx.
1265
  * To get current status use subfunction 12 of function 26.
1419
  * To get current status use subfunction 12 of function 26.
Line -... Line 1420...
-
 
1420
 
-
 
1421
---------------------- Constants for registers: ----------------------
-
 
1422
  eax - SF_SYSTEM_SET (21)
1266
 
1423
  ebx - SSF_ACCESS_PCI (12)
1267
======================================================================
1424
======================================================================
1268
================= Function 22 - set system date/time. ================
1425
================= Function 22 - set system date/time. ================
1269
======================================================================
1426
======================================================================
1270
Parameters:
1427
Parameters:
Line 1300... Line 1457...
1300
    (will return 1).
1457
    (will return 1).
1301
  * Alarm clock is a global system resource; the set of
1458
  * Alarm clock is a global system resource; the set of
1302
    an alarm clock cancels automatically the previous set.
1459
    an alarm clock cancels automatically the previous set.
1303
    However, at moment no program uses it.
1460
    However, at moment no program uses it.
Line -... Line 1461...
-
 
1461
 
-
 
1462
---------------------- Constants for registers: ----------------------
1304
 
1463
  eax - SF_SET_TIME_DATE (22)
1305
======================================================================
1464
======================================================================
1306
============= Function 23 - wait for event with timeout. =============
1465
============= Function 23 - wait for event with timeout. =============
1307
======================================================================
1466
======================================================================
1308
If the message queue is empty, waits for new message in the queue,
1467
If the message queue is empty, waits for new message in the queue,
Line 1323... Line 1482...
1323
  * Transmission ebx=0 results in immediate returning eax=0.
1482
  * Transmission ebx=0 results in immediate returning eax=0.
1324
  * Current implementation returns immediately with eax=0,
1483
  * Current implementation returns immediately with eax=0,
1325
    if the addition of ebx with the current value of time counter
1484
    if the addition of ebx with the current value of time counter
1326
    makes 32-bit overflow.
1485
    makes 32-bit overflow.
Line -... Line 1486...
-
 
1486
 
-
 
1487
---------------------- Constants for registers: ----------------------
1327
 
1488
  eax - SF_WAIT_EVENT_TIMEOUT (23)
1328
======================================================================
1489
======================================================================
1329
======= Function 24, subfunction 4 - eject tray of disk drive. =======
1490
======= Function 24, subfunction 4 - eject tray of disk drive. =======
1330
======================================================================
1491
======================================================================
1331
Parameters:
1492
Parameters:
Line 1343... Line 1504...
1343
    manual control of tray is unlocked.
1504
    manual control of tray is unlocked.
1344
  * When the tray is being ejected, the code clears the cache for
1505
  * When the tray is being ejected, the code clears the cache for
1345
    corresponding device.
1506
    corresponding device.
1346
  * An example of usage of the function is the application CD_tray.
1507
  * An example of usage of the function is the application CD_tray.
Line -... Line 1508...
-
 
1508
 
-
 
1509
---------------------- Constants for registers: ----------------------
-
 
1510
  eax - SF_CD (24)
1347
 
1511
  ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
1348
======================================================================
1512
======================================================================
1349
======== Function 24, subfunction 5 - load tray of disk drive. =======
1513
======== Function 24, subfunction 5 - load tray of disk drive. =======
1350
======================================================================
1514
======================================================================
1351
Parameters:
1515
Parameters:
Line 1359... Line 1523...
1359
  * function does not return value
1523
  * function does not return value
1360
Remarks:
1524
Remarks:
1361
  * The function is supported only for ATAPI devices (CD and DVD).
1525
  * The function is supported only for ATAPI devices (CD and DVD).
1362
  * An example of usage of the function is the application CD_tray.
1526
  * An example of usage of the function is the application CD_tray.
Line -... Line 1527...
-
 
1527
 
-
 
1528
---------------------- Constants for registers: ----------------------
-
 
1529
  eax - SF_CD (24)
1363
 
1530
  ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5)
1364
======================================================================
1531
======================================================================
1365
======= Function 25 - put image area on the background layer. ========
1532
======= Function 25 - put image area on the background layer. ========
1366
======================================================================
1533
======================================================================
1367
Paramters:
1534
Paramters:
Line 1379... Line 1546...
1379
  * TT - byte pointer of transparency, at current version:
1546
  * TT - byte pointer of transparency, at current version:
1380
         1 to FF - opaque, 0 - transparent.
1547
         1 to FF - opaque, 0 - transparent.
1381
  * The function places the image directly to LFB. It is not for
1548
  * The function places the image directly to LFB. It is not for
1382
    background image f.15. Options f.15 to f.25 does not make sense.
1549
    background image f.15. Options f.15 to f.25 does not make sense.
Line -... Line 1550...
-
 
1550
 
-
 
1551
---------------------- Constants for registers: ----------------------
1383
 
1552
  eax - SF_SCREEN_PUT_IMAGE (25)
1384
======================================================================
1553
======================================================================
1385
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
1554
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
1386
======================================================================
1555
======================================================================
1387
Parameters:
1556
Parameters:
Line 1390... Line 1559...
1390
Returned value:
1559
Returned value:
1391
  * eax = port number
1560
  * eax = port number
1392
Parameters:
1561
Parameters:
1393
  * To set base port use subfunction 1 of function 21.
1562
  * To set base port use subfunction 1 of function 21.
Line -... Line 1563...
-
 
1563
 
-
 
1564
---------------------- Constants for registers: ----------------------
-
 
1565
  eax - SF_SYSTEM_GET (26)
1394
 
1566
  ebx - SSF_MPU_MIDI_BASE (1)
1395
======================================================================
1567
======================================================================
1396
========== Function 26, subfunction 2 - get keyboard layout. =========
1568
========== Function 26, subfunction 2 - get keyboard layout. =========
1397
======================================================================
1569
======================================================================
1398
The keyboard layout is used to convert keyboard scancodes to
1570
The keyboard layout is used to convert keyboard scancodes to
Line 1426... Line 1598...
1426
  * Country identifier is global system variable, which is not used
1598
  * Country identifier is global system variable, which is not used
1427
    by the kernel itself; however the application '@taskbar' displays
1599
    by the kernel itself; however the application '@taskbar' displays
1428
    the corresponding icon (using this function).
1600
    the corresponding icon (using this function).
1429
  * The application @taskbar switches layouts on user request.
1601
  * The application @taskbar switches layouts on user request.
Line -... Line 1602...
-
 
1602
 
-
 
1603
---------------------- Constants for registers: ----------------------
-
 
1604
  eax - SF_SYSTEM_GET (26)
1430
 
1605
  ebx - SSF_KEYBOARD_LAYOUT (2)
1431
======================================================================
1606
======================================================================
1432
========== Function 26, subfunction 5 - get system language. =========
1607
========== Function 26, subfunction 5 - get system language. =========
1433
======================================================================
1608
======================================================================
1434
Parameters:
1609
Parameters:
Line 1440... Line 1615...
1440
  * System language is global system variable and is not used
1615
  * System language is global system variable and is not used
1441
    by the kernel itself, however application @taskbar draws the
1616
    by the kernel itself, however application @taskbar draws the
1442
    appropriate icon (using this function).
1617
    appropriate icon (using this function).
1443
  * To set system language use subfunction 5 of function 21.
1618
  * To set system language use subfunction 5 of function 21.
Line -... Line 1619...
-
 
1619
 
-
 
1620
---------------------- Constants for registers: ----------------------
-
 
1621
  eax - SF_SYSTEM_GET (26)
1444
 
1622
  ebx - SSF_SYS_LANG (5)
1445
======================================================================
1623
======================================================================
1446
=== Function 26, subfunction 9 - get the value of the time counter. ==
1624
=== Function 26, subfunction 9 - get the value of the time counter. ==
1447
======================================================================
1625
======================================================================
1448
Parameters:
1626
Parameters:
Line 1453... Line 1631...
1453
Remarks:
1631
Remarks:
1454
  * Counter takes modulo 2^32, that correspond to a little more
1632
  * Counter takes modulo 2^32, that correspond to a little more
1455
    than 497 days.
1633
    than 497 days.
1456
  * To get system time use function 3.  
1634
  * To get system time use function 3.  
Line -... Line 1635...
-
 
1635
 
-
 
1636
---------------------- Constants for registers: ----------------------
-
 
1637
  eax - SF_SYSTEM_GET (26)
1457
  
1638
  ebx - SSF_TIME_COUNT (9)
1458
======================================================================
1639
======================================================================
1459
===================== Function 26, subfunction 10 ====================
1640
===================== Function 26, subfunction 10 ====================
1460
========== Get the value of the high precision time counter. =========
1641
========== Get the value of the high precision time counter. =========
1461
======================================================================
1642
======================================================================
Line 1467... Line 1648...
1467
  * edx = number of nanoseconds since system boot time (high DWORD)  
1648
  * edx = number of nanoseconds since system boot time (high DWORD)  
1468
Remarks:
1649
Remarks:
1469
  * The counter is based on HPET, if HPET is not available, resolution
1650
  * The counter is based on HPET, if HPET is not available, resolution
1470
    will be reduced to 10 000 000 nanoseconds.
1651
    will be reduced to 10 000 000 nanoseconds.
Line -... Line 1652...
-
 
1652
 
-
 
1653
---------------------- Constants for registers: ----------------------
-
 
1654
  eax - SF_SYSTEM_GET (26)
1471
 
1655
  ebx - SSF_TIME_COUNT_PRO (10)
1472
======================================================================
1656
======================================================================
1473
===================== Function 26, subfunction 11 ====================
1657
===================== Function 26, subfunction 11 ====================
1474
========== Find out whether low-level HD access is enabled. ==========
1658
========== Find out whether low-level HD access is enabled. ==========
1475
======================================================================
1659
======================================================================
Line 1480... Line 1664...
1480
  * eax = 0/1 - disabled/enabled
1664
  * eax = 0/1 - disabled/enabled
1481
Remarks:
1665
Remarks:
1482
  * Is used in LBA read (subfunction 8 of function 58).
1666
  * Is used in LBA read (subfunction 8 of function 58).
1483
  * To set current state use subfunction 11 of function 21.
1667
  * To set current state use subfunction 11 of function 21.
Line -... Line 1668...
-
 
1668
 
-
 
1669
---------------------- Constants for registers: ----------------------
-
 
1670
  eax - SF_SYSTEM_GET (26)
1484
 
1671
  ebx - SSF_ACCESS_HD_LBA (11)
1485
======================================================================
1672
======================================================================
1486
===================== Function 26, subfunction 12 ====================
1673
===================== Function 26, subfunction 12 ====================
1487
========== Find out whether low-level PCI access is enabled. =========
1674
========== Find out whether low-level PCI access is enabled. =========
1488
======================================================================
1675
======================================================================
Line 1494... Line 1681...
1494
Remarks:
1681
Remarks:
1495
  * Is used by operations with PCI bus (function 62).
1682
  * Is used by operations with PCI bus (function 62).
1496
  * The current implementation uses only low bit of ecx.
1683
  * The current implementation uses only low bit of ecx.
1497
  * To set the current state use subfunction 12 of function 21.
1684
  * To set the current state use subfunction 12 of function 21.
Line -... Line 1685...
-
 
1685
 
-
 
1686
---------------------- Constants for registers: ----------------------
-
 
1687
  eax - SF_SYSTEM_GET (26)
1498
 
1688
  ebx - SSF_ACCESS_PCI (12)
1499
======================================================================
1689
======================================================================
1500
=================== Function 29 - get system date. ===================
1690
=================== Function 29 - get system date. ===================
1501
======================================================================
1691
======================================================================
1502
Parameters:
1692
Parameters:
Line 1508... Line 1698...
1508
  * MM = month (01..12)
1698
  * MM = month (01..12)
1509
  * DD = day (01..31)
1699
  * DD = day (01..31)
1510
Remarks:
1700
Remarks:
1511
  * To set system date use function 22.
1701
  * To set system date use function 22.
Line -... Line 1702...
-
 
1702
 
-
 
1703
---------------------- Constants for registers: ----------------------
1512
 
1704
  eax - SF_GET_SYS_DATE (29)
1513
======================================================================
1705
======================================================================
1514
============= Function 30 - work with the current folder. ============
1706
============= Function 30 - work with the current folder. ============
Line 1515... Line 1707...
1515
======================================================================
1707
======================================================================
Line 1552... Line 1744...
1552
Returned value:
1744
Returned value:
1553
  * function does not return value
1745
  * function does not return value
1554
Remarks:
1746
Remarks:
1555
  * The function can be called only 1 time for 1 session of the OS.
1747
  * The function can be called only 1 time for 1 session of the OS.
Line -... Line 1748...
-
 
1748
 
-
 
1749
---------------------- Constants for registers: ----------------------
-
 
1750
  eax - SF_CURRENT_FOLDER (30)
1556
 
1751
  ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3)
1557
======================================================================
1752
======================================================================
1558
========= Function 34 - who owner the pixel on the screen. ===========
1753
========= Function 34 - who owner the pixel on the screen. ===========
1559
======================================================================
1754
======================================================================
1560
Parameters:
1755
Parameters:
Line 1565... Line 1760...
1565
Returned value:
1760
Returned value:
1566
  * eax = 0x000000XX - owner of pixel the slot window N
1761
  * eax = 0x000000XX - owner of pixel the slot window N
1567
    If incorrect values ebx and ecx then function returns 0
1762
    If incorrect values ebx and ecx then function returns 0
1568
  * The function takes the value from the area [_WinMapAddress]
1763
  * The function takes the value from the area [_WinMapAddress]
Line -... Line 1764...
-
 
1764
 
-
 
1765
---------------------- Constants for registers: ----------------------
1569
 
1766
  eax - SF_GET_PIXEL_OWNER (34)
1570
======================================================================
1767
======================================================================
1571
======= Function 35 - read the color of a pixel on the screen. =======
1768
======= Function 35 - read the color of a pixel on the screen. =======
1572
======================================================================
1769
======================================================================
1573
Parameters:
1770
Parameters:
Line 1582... Line 1779...
1582
    that it subtracts 1 from both sizes.
1779
    that it subtracts 1 from both sizes.
1583
  * There is also direct access (without any system calls)
1780
  * There is also direct access (without any system calls)
1584
    to videomemory through the selector gs. To get parameters of
1781
    to videomemory through the selector gs. To get parameters of
1585
    the current videomode, use function 61.
1782
    the current videomode, use function 61.
Line -... Line 1783...
-
 
1783
 
-
 
1784
---------------------- Constants for registers: ----------------------
1586
 
1785
  eax - SF_GET_PIXEL (35)
1587
======================================================================
1786
======================================================================
1588
=================== Function 36 - read screen area. ==================
1787
=================== Function 36 - read screen area. ==================
1589
======================================================================
1788
======================================================================
1590
Paramters:
1789
Paramters:
Line 1598... Line 1797...
1598
Remarks:
1797
Remarks:
1599
  * Coordinates of the image are coordinates of the upper left corner
1798
  * Coordinates of the image are coordinates of the upper left corner
1600
    of the image relative to the screen.
1799
    of the image relative to the screen.
1601
  * Size of the image in bytes is 3*xsize*ysize.
1800
  * Size of the image in bytes is 3*xsize*ysize.
Line -... Line 1801...
-
 
1801
 
-
 
1802
---------------------- Constants for registers: ----------------------
1602
 
1803
  eax - SF_GET_IMAGE (36)
1603
======================================================================
1804
======================================================================
1604
=================== Function 37 - work with mouse. ===================
1805
=================== Function 37 - work with mouse. ===================
Line 1605... Line 1806...
1605
======================================================================
1806
======================================================================
Line 1720... Line 1921...
1720
Remarks:
1921
Remarks:
1721
  * Scroll data is available for active window only.
1922
  * Scroll data is available for active window only.
1722
  * Values are zeroed after reading.
1923
  * Values are zeroed after reading.
1723
  * Values are signed.
1924
  * Values are signed.
Line -... Line 1925...
-
 
1925
 
-
 
1926
---------------------- Constants for registers: ----------------------
-
 
1927
  eax - SF_MOUSE_GET (37)
-
 
1928
  ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1),
-
 
1929
    SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4),
1724
 
1930
    SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7)
1725
======================================================================
1931
======================================================================
1726
====================== Function 38 - draw line. ======================
1932
====================== Function 38 - draw line. ======================
1727
======================================================================
1933
======================================================================
1728
Parameters:
1934
Parameters:
Line 1738... Line 1944...
1738
  * function does not return value
1944
  * function does not return value
1739
Remarks:
1945
Remarks:
1740
  * Coordinates are relative to the window.
1946
  * Coordinates are relative to the window.
1741
  * End point is also drawn.
1947
  * End point is also drawn.
Line -... Line 1948...
-
 
1948
 
-
 
1949
---------------------- Constants for registers: ----------------------
1742
 
1950
  eax - SF_DRAW_LINE (38)
1743
======================================================================
1951
======================================================================
1744
== Function 39, subfunction 1 - get a size of the background image. ==
1952
== Function 39, subfunction 1 - get a size of the background image. ==
1745
======================================================================
1953
======================================================================
1746
Parameters:
1954
Parameters:
Line 1751... Line 1959...
1751
Remarks:
1959
Remarks:
1752
  * There is a pair function to set sizes of background image -
1960
  * There is a pair function to set sizes of background image -
1753
    subfunction 1 of function 15. After which it is necessary,
1961
    subfunction 1 of function 15. After which it is necessary,
1754
    of course, anew to define image.
1962
    of course, anew to define image.
Line -... Line 1963...
-
 
1963
 
-
 
1964
---------------------- Constants for registers: ----------------------
1755
 
1965
  eax - SF_BACKGROUND_GET (39)
1756
======================================================================
1966
======================================================================
1757
== Function 39, subfunction 2 - get pixel from the background image. =
1967
== Function 39, subfunction 2 - get pixel from the background image. =
1758
======================================================================
1968
======================================================================
1759
Parameters:
1969
Parameters:
Line 1770... Line 1980...
1770
  * Offset for pixel with coordinates (x,y)
1980
  * Offset for pixel with coordinates (x,y)
1771
    is calculated as (x+y*xsize)*3.
1981
    is calculated as (x+y*xsize)*3.
1772
  * There is a pair function to set pixel on the background image -
1982
  * There is a pair function to set pixel on the background image -
1773
    subfunction 2 of function 15.
1983
    subfunction 2 of function 15.
Line -... Line 1984...
-
 
1984
 
-
 
1985
---------------------- Constants for registers: ----------------------
1774
 
1986
  eax - SF_BACKGROUND_GET (39)
1775
======================================================================
1987
======================================================================
1776
== Function 39, subfunction 4 - get drawing mode for the background. =
1988
== Function 39, subfunction 4 - get drawing mode for the background. =
1777
======================================================================
1989
======================================================================
1778
Parameters:
1990
Parameters:
Line 1783... Line 1995...
1783
  * eax = 2 - stretch
1995
  * eax = 2 - stretch
1784
Remarks:
1996
Remarks:
1785
  * There is a pair function to set drawing mode -
1997
  * There is a pair function to set drawing mode -
1786
    subfunction 4 of function 15.
1998
    subfunction 4 of function 15.
Line -... Line 1999...
-
 
1999
 
-
 
2000
---------------------- Constants for registers: ----------------------
1787
 
2001
  eax - SF_BACKGROUND_GET (39)
1788
======================================================================
2002
======================================================================
1789
=========== Function 40 - set the mask for expected events. ==========
2003
=========== Function 40 - set the mask for expected events. ==========
1790
======================================================================
2004
======================================================================
1791
The mask for expected events affects function working with events
2005
The mask for expected events affects function working with events
Line 1810... Line 2024...
1810
  * Events prohibited in the mask are saved anyway, when come;
2024
  * Events prohibited in the mask are saved anyway, when come;
1811
    they are simply not informed with event functions.
2025
    they are simply not informed with event functions.
1812
  * Event functions take into account the mask on moment of
2026
  * Event functions take into account the mask on moment of
1813
    function call, not on moment of event arrival.
2027
    function call, not on moment of event arrival.
Line 1814... Line -...
1814
 
-
 
-
 
2028
 
-
 
2029
---------------------- Constants for registers: ----------------------
1815
 
2030
  eax - SF_SET_EVENTS_MASK (40)
1816
======================================================================
2031
======================================================================
1817
================ Function 43 - input/output to a port. ===============
2032
================ Function 43 - input/output to a port. ===============
Line 1818... Line 2033...
1818
======================================================================
2033
======================================================================
Line 1839... Line 2054...
1839
    for itself by function 46.
2054
    for itself by function 46.
1840
  * Instead of call to this function it is better to use
2055
  * Instead of call to this function it is better to use
1841
    processor instructions in/out - this is much
2056
    processor instructions in/out - this is much
1842
    faster and a bit shorter and easier.
2057
    faster and a bit shorter and easier.
Line 1843... Line -...
1843
 
-
 
-
 
2058
 
-
 
2059
---------------------- Constants for registers: ----------------------
1844
 
2060
  eax - SF_PORT_IN_OUT (43)
1845
======================================================================
2061
======================================================================
1846
====== Function 46 - reserve/free a group of input/output ports. =====
2062
====== Function 46 - reserve/free a group of input/output ports. =====
1847
======================================================================
2063
======================================================================
1848
To work with reserved ports an application can access directly by
2064
To work with reserved ports an application can access directly by
Line 1872... Line 2088...
1872
  * At booting the system reserves for itself ports
2088
  * At booting the system reserves for itself ports
1873
    0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively).
2089
    0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively).
1874
  * When a thread terminates, all reserved by it ports
2090
  * When a thread terminates, all reserved by it ports
1875
    are freed automatically.
2091
    are freed automatically.
Line -... Line 2092...
-
 
2092
 
-
 
2093
---------------------- Constants for registers: ----------------------
1876
 
2094
  eax - SF_SET_PORTS (46)
1877
======================================================================
2095
======================================================================
1878
============= Function 47 - draw a number in the window. =============
2096
============= Function 47 - draw a number in the window. =============
1879
======================================================================
2097
======================================================================
1880
Parameters:
2098
Parameters:
Line 1906... Line 2124...
1906
    by leading zeroes; if the number is big and can not be written by
2124
    by leading zeroes; if the number is big and can not be written by
1907
    given amount of digits, extra digits are not drawn.
2125
    given amount of digits, extra digits are not drawn.
1908
  * Parameters of fonts are shown in the description of function 4
2126
  * Parameters of fonts are shown in the description of function 4
1909
    (text output).
2127
    (text output).
Line -... Line 2128...
-
 
2128
 
-
 
2129
---------------------- Constants for registers: ----------------------
1910
 
2130
  eax - SF_DRAW_NUMBER (47)
1911
======================================================================
2131
======================================================================
1912
========= Function 48, subfunction 0 - apply screen settings. ========
2132
========= Function 48, subfunction 0 - apply screen settings. ========
1913
======================================================================
2133
======================================================================
1914
Parameters:
2134
Parameters:
Line 1922... Line 2142...
1922
    subfunctions 1 and 2.
2142
    subfunctions 1 and 2.
1923
  * Function call without prior call to one of indicated subfunctions
2143
  * Function call without prior call to one of indicated subfunctions
1924
    is ignored.
2144
    is ignored.
1925
  * Function call with nonzero ecx is ignored.
2145
  * Function call with nonzero ecx is ignored.
Line -... Line 2146...
-
 
2146
 
-
 
2147
---------------------- Constants for registers: ----------------------
-
 
2148
  eax - SF_STYLE_SETTINGS (48)
1926
 
2149
  ebx - SSF_APPLY (0)
1927
======================================================================
2150
======================================================================
1928
=========== Function 48, subfunction 1 - set button style. ===========
2151
=========== Function 48, subfunction 1 - set button style. ===========
1929
======================================================================
2152
======================================================================
1930
Parameters:
2153
Parameters:
Line 1938... Line 2161...
1938
Remarks:
2161
Remarks:
1939
  * After call to this function one should redraw the screen by
2162
  * After call to this function one should redraw the screen by
1940
    subfunction 0.
2163
    subfunction 0.
1941
  * Button style influences only to their draw of function 8.
2164
  * Button style influences only to their draw of function 8.
Line -... Line 2165...
-
 
2165
 
-
 
2166
---------------------- Constants for registers: ----------------------
-
 
2167
  eax - SF_STYLE_SETTINGS (48)
1942
 
2168
  ebx - SSF_SET_BUTTON_STYLE (1)
1943
======================================================================
2169
======================================================================
1944
====== Function 48, subfunction 2 - set standard window colors. ======
2170
====== Function 48, subfunction 2 - set standard window colors. ======
1945
======================================================================
2171
======================================================================
1946
Parameters:
2172
Parameters:
Line 1961... Line 2187...
1961
  * Table of standard colors is included in skin and is installed
2187
  * Table of standard colors is included in skin and is installed
1962
    anew with skin installation (by subfunction 8).
2188
    anew with skin installation (by subfunction 8).
1963
  * Color table can be viewed/changed interactively with
2189
  * Color table can be viewed/changed interactively with
1964
    the application 'desktop'.
2190
    the application 'desktop'.
Line -... Line 2191...
-
 
2191
 
-
 
2192
---------------------- Constants for registers: ----------------------
-
 
2193
  eax - SF_STYLE_SETTINGS (48)
1965
 
2194
  ebx - SSF_SET_COLORS (2)
1966
======================================================================
2195
======================================================================
1967
====== Function 48, subfunction 3 - get standard window colors. ======
2196
====== Function 48, subfunction 3 - get standard window colors. ======
1968
======================================================================
2197
======================================================================
1969
Parameters:
2198
Parameters:
Line 2006... Line 2235...
2006
    at skin set by subfunction 8) the system sends to all windows
2235
    at skin set by subfunction 8) the system sends to all windows
2007
    redraw message (the event with code 1).
2236
    redraw message (the event with code 1).
2008
  * Color table can be viewed/changed interactively with
2237
  * Color table can be viewed/changed interactively with
2009
    the application 'desktop'.
2238
    the application 'desktop'.
Line -... Line 2239...
-
 
2239
 
-
 
2240
---------------------- Constants for registers: ----------------------
-
 
2241
  eax - SF_STYLE_SETTINGS (48)
2010
 
2242
  ebx - SSF_GET_COLORS (3)
2011
======================================================================
2243
======================================================================
2012
============ Function 48, subfunction 4 - get skin height. ===========
2244
============ Function 48, subfunction 4 - get skin height. ===========
2013
======================================================================
2245
======================================================================
2014
Parameters:
2246
Parameters:
Line 2020... Line 2252...
2020
  * Skin height is defined as the height of a header
2252
  * Skin height is defined as the height of a header
2021
    of skinned windows.
2253
    of skinned windows.
2022
  * See also general structure of window in the description
2254
  * See also general structure of window in the description
2023
    of function 0.
2255
    of function 0.
Line -... Line 2256...
-
 
2256
 
-
 
2257
---------------------- Constants for registers: ----------------------
-
 
2258
  eax - SF_STYLE_SETTINGS (48)
2024
 
2259
  ebx - SSF_GET_SKIN_HEIGHT (4)
2025
======================================================================
2260
======================================================================
2026
======== Function 48, subfunction 5 - get screen working area. =======
2261
======== Function 48, subfunction 5 - get screen working area. =======
2027
======================================================================
2262
======================================================================
2028
Parameters:
2263
Parameters:
Line 2042... Line 2277...
2042
    formula right-left+1, on y axis - by formula bottom-right+1.
2277
    formula right-left+1, on y axis - by formula bottom-right+1.
2043
  * See also function 14,
2278
  * See also function 14,
2044
    to get sizes of all screen.
2279
    to get sizes of all screen.
2045
  * There is a pair function to set working area - subfunction 6.
2280
  * There is a pair function to set working area - subfunction 6.
Line -... Line 2281...
-
 
2281
 
-
 
2282
---------------------- Constants for registers: ----------------------
-
 
2283
  eax - SF_STYLE_SETTINGS (48)
2046
 
2284
  ebx - SSF_GET_SCREEN_AREA (5)
2047
======================================================================
2285
======================================================================
2048
======== Function 48, subfunction 6 - set screen working area. =======
2286
======== Function 48, subfunction 6 - set screen working area. =======
2049
======================================================================
2287
======================================================================
2050
Parameters:
2288
Parameters:
Line 2072... Line 2310...
2072
  * There is a pair function to get working area - subfunction 5.
2310
  * There is a pair function to get working area - subfunction 5.
2073
  * This function redraws the screen automatically,
2311
  * This function redraws the screen automatically,
2074
    updating coordinates and sizes of maximized windows.
2312
    updating coordinates and sizes of maximized windows.
2075
    The system sends to all windows redraw message (the event 1).
2313
    The system sends to all windows redraw message (the event 1).
Line -... Line 2314...
-
 
2314
 
-
 
2315
---------------------- Constants for registers: ----------------------
-
 
2316
  eax - SF_STYLE_SETTINGS (48)
2076
 
2317
  ebx - SSF_SET_SCREEN_AREA (6)
2077
======================================================================
2318
======================================================================
2078
=========== Function 48, subfunction 7 - get skin margins. ===========
2319
=========== Function 48, subfunction 7 - get skin margins. ===========
2079
======================================================================
2320
======================================================================
2080
Returns the area of a header of a skinned window, intended for
2321
Returns the area of a header of a skinned window, intended for
Line 2090... Line 2331...
2090
  * It is recommended to take into account returned value
2331
  * It is recommended to take into account returned value
2091
    of this function for choice of a place for drawing header text
2332
    of this function for choice of a place for drawing header text
2092
    (by function 4) or a substitute of header text
2333
    (by function 4) or a substitute of header text
2093
    (at the discretion of an application).
2334
    (at the discretion of an application).
Line -... Line 2335...
-
 
2335
 
-
 
2336
---------------------- Constants for registers: ----------------------
-
 
2337
  eax - SF_STYLE_SETTINGS (48)
2094
 
2338
  ebx - SSF_GET_SKIN_MARGINS (7)
2095
======================================================================
2339
======================================================================
2096
============= Function 48, subfunction 8 - set used skin. ============
2340
============= Function 48, subfunction 8 - set used skin. ============
2097
======================================================================
2341
======================================================================
2098
Parameters:
2342
Parameters:
Line 2110... Line 2354...
2110
  * At booting the system reads skin from file 'default.skn'
2354
  * At booting the system reads skin from file 'default.skn'
2111
    on ramdisk.
2355
    on ramdisk.
2112
  * User can change the skin statically by creating hisself
2356
  * User can change the skin statically by creating hisself
2113
    'default.skn' or dynamically with the application 'desktop'.
2357
    'default.skn' or dynamically with the application 'desktop'.
Line -... Line 2358...
-
 
2358
 
-
 
2359
---------------------- Constants for registers: ----------------------
-
 
2360
  eax - SF_STYLE_SETTINGS (48)
2114
 
2361
  ebx - SSF_SET_SKIN (8)
2115
======================================================================
2362
======================================================================
2116
====== Function 48, subfunction 9 - get font smoothing setting. ======
2363
====== Function 48, subfunction 9 - get font smoothing setting. ======
2117
======================================================================
2364
======================================================================
2118
Parameters:
2365
Parameters:
2119
  * eax = 48 - function number
2366
  * eax = 48 - function number
2120
  * ebx = 9 - subfunction number
2367
  * ebx = 9 - subfunction number
2121
Returned value:
2368
Returned value:
Line -... Line 2369...
-
 
2369
  * eax = 2 - subpixel, 1 - anti-aliasing, 0 - off
-
 
2370
 
-
 
2371
---------------------- Constants for registers: ----------------------
2122
  * eax = 2 - subpixel, 1 - anti-aliasing, 0 - off
2372
  eax - SF_STYLE_SETTINGS (48)
2123
 
2373
  ebx - SSF_GET_FONT_SMOOTH (9)
2124
======================================================================
2374
======================================================================
2125
========== Function 48, subfunction 10 - set font smoothing. =========
2375
========== Function 48, subfunction 10 - set font smoothing. =========
2126
======================================================================
2376
======================================================================
2127
Parameters:
2377
Parameters:
2128
  * eax = 48 - function number
2378
  * eax = 48 - function number
Line -... Line 2379...
-
 
2379
  * ebx = 10 - subfunction number
-
 
2380
  * cl  = 2 - subpixel, 1 - anti-aliasing, 0 - off
-
 
2381
 
2129
  * ebx = 10 - subfunction number
2382
---------------------- Constants for registers: ----------------------
2130
  * cl  = 2 - subpixel, 1 - anti-aliasing, 0 - off
2383
  eax - SF_STYLE_SETTINGS (48)
2131
 
2384
  ebx - SSF_SET_FONT_SMOOTH (10)
2132
======================================================================
2385
======================================================================
2133
============ Function 48, subfunction 11 - get font size. ============
2386
============ Function 48, subfunction 11 - get font size. ============
2134
======================================================================
2387
======================================================================
2135
Parameters:
2388
Parameters:
2136
  * eax = 48 - function number
2389
  * eax = 48 - function number
Line -... Line 2390...
-
 
2390
  * ebx = 9 - subfunction number
-
 
2391
Returned value:
-
 
2392
  * eax = current font height in pixels
2137
  * ebx = 9 - subfunction number
2393
 
2138
Returned value:
2394
---------------------- Constants for registers: ----------------------
2139
  * eax = current font height in pixels
2395
  eax - SF_STYLE_SETTINGS (48)
2140
 
2396
  ebx - SSF_GET_FONT_SIZE (11)
2141
======================================================================
2397
======================================================================
2142
============ Function 48, subfunction 12 - set font size. ============
2398
============ Function 48, subfunction 12 - set font size. ============
2143
======================================================================
2399
======================================================================
Line -... Line 2400...
-
 
2400
Parameters:
-
 
2401
  * eax = 48 - function number
-
 
2402
  * ebx = 10 - subfunction number
2144
Parameters:
2403
  * cl  = new font height in pixels
2145
  * eax = 48 - function number
2404
 
2146
  * ebx = 10 - subfunction number
2405
---------------------- Constants for registers: ----------------------
2147
  * cl  = new font height in pixels
2406
  eax - SF_STYLE_SETTINGS (48)
2148
 
2407
  ebx - SSF_SET_FONT_SIZE (12)
Line 2166... Line 2425...
2166
    http://www.microsoft.com/whdc/archive/amp_12.mspx;
2425
    http://www.microsoft.com/whdc/archive/amp_12.mspx;
2167
    besides it is included in famous Interrupt List by Ralf Brown
2426
    besides it is included in famous Interrupt List by Ralf Brown
2168
    (http://www.pobox.com/~ralf/files.html,
2427
    (http://www.pobox.com/~ralf/files.html,
2169
    ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/).
2428
    ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/).
Line -... Line 2429...
-
 
2429
 
-
 
2430
---------------------- Constants for registers: ----------------------
2170
 
2431
  eax - SF_APM (49)
2171
======================================================================
2432
======================================================================
2172
=================== Function 50 - set window shape. ==================
2433
=================== Function 50 - set window shape. ==================
2173
======================================================================
2434
======================================================================
2174
Normal windows have rectangular shape. This function can give to
2435
Normal windows have rectangular shape. This function can give to
Line 2212... Line 2473...
2212
  * The system views the shape data at every window redraw by
2473
  * The system views the shape data at every window redraw by
2213
    function 0.
2474
    function 0.
2214
  * The call of subfunction 0 with NULL pointer results in return
2475
  * The call of subfunction 0 with NULL pointer results in return
2215
    to the rectangular shape.
2476
    to the rectangular shape.
Line -... Line 2477...
-
 
2477
 
-
 
2478
---------------------- Constants for registers: ----------------------
2216
 
2479
  eax - SF_SET_WINDOW_SHAPE (50)
2217
======================================================================
2480
======================================================================
2218
==================== Function 51 - create thread. ====================
2481
==================== Function 51 - create thread. ====================
2219
======================================================================
2482
======================================================================
2220
Parameters:
2483
Parameters:
Line 2223... Line 2486...
2223
  * ecx = address of thread entry point (starting eip)
2486
  * ecx = address of thread entry point (starting eip)
2224
  * edx = pointer to thread stack (starting esp)
2487
  * edx = pointer to thread stack (starting esp)
2225
Returned value:
2488
Returned value:
2226
  * eax = -1 - error (there is too many threads)
2489
  * eax = -1 - error (there is too many threads)
2227
  * otherwise eax = TID - thread identifier
2490
  * otherwise eax = TID - thread identifier
2228
    
-
 
Line -... Line 2491...
-
 
2491
 
-
 
2492
---------------------- Constants for registers: ----------------------
2229
 
2493
  eax - SF_CREATE_THREAD (51)
2230
======================================================================
2494
======================================================================
2231
==================== Function 54, subfunction 0 ======================
2495
==================== Function 54, subfunction 0 ======================
2232
============== Get the number of slots in the clipboard. =============
2496
============== Get the number of slots in the clipboard. =============
2233
======================================================================
2497
======================================================================
Line 2236... Line 2500...
2236
  * ebx = 0 - subfunction number
2500
  * ebx = 0 - subfunction number
2237
Returned value:
2501
Returned value:
2238
  * eax = slots in the clipboard
2502
  * eax = slots in the clipboard
2239
  * eax = -1 - main list area not found
2503
  * eax = -1 - main list area not found
Line -... Line 2504...
-
 
2504
 
-
 
2505
---------------------- Constants for registers: ----------------------
-
 
2506
  eax - SF_CLIPBOARD (54)
2240
 
2507
  ebx - SSF_GET_SLOT_COUNT (0)
2241
======================================================================
2508
======================================================================
2242
==================== Function 54, subfunction 1 ======================
2509
==================== Function 54, subfunction 1 ======================
2243
================= Read the data from the clipboard. ==================
2510
================= Read the data from the clipboard. ==================
2244
======================================================================
2511
======================================================================
Line 2249... Line 2516...
2249
Returned value:
2516
Returned value:
2250
  * eax = if successful - pointer to a memory with data
2517
  * eax = if successful - pointer to a memory with data
2251
  * eax = 1 - error
2518
  * eax = 1 - error
2252
  * eax = -1 - main list area not found
2519
  * eax = -1 - main list area not found
Line -... Line 2520...
-
 
2520
 
-
 
2521
---------------------- Constants for registers: ----------------------
-
 
2522
  eax - SF_CLIPBOARD (54)
2253
 
2523
  ebx - SSF_READ_CB (1)
2254
======================================================================
2524
======================================================================
2255
==================== Function 54, subfunction 2 ======================
2525
==================== Function 54, subfunction 2 ======================
2256
================= Write the data to the clipboard. ===================
2526
================= Write the data to the clipboard. ===================
2257
======================================================================
2527
======================================================================
Line 2263... Line 2533...
2263
Returned value:
2533
Returned value:
2264
  * eax = 0 - success
2534
  * eax = 0 - success
2265
  * eax = 1 - error
2535
  * eax = 1 - error
2266
  * eax = -1 - main list area not found
2536
  * eax = -1 - main list area not found
Line -... Line 2537...
-
 
2537
 
-
 
2538
---------------------- Constants for registers: ----------------------
-
 
2539
  eax - SF_CLIPBOARD (54)
2267
 
2540
  ebx - SSF_WRITE_CB (2)
2268
======================================================================
2541
======================================================================
2269
===================== Function 54, subfunction 3 =====================
2542
===================== Function 54, subfunction 3 =====================
2270
================ Delete the last slot in the clipboard ===============
2543
================ Delete the last slot in the clipboard ===============
2271
======================================================================
2544
======================================================================
Line 2275... Line 2548...
2275
Returned value:
2548
Returned value:
2276
  * eax = 0 - success
2549
  * eax = 0 - success
2277
  * eax = 1 - error
2550
  * eax = 1 - error
2278
  * eax = -1 - main list area not found
2551
  * eax = -1 - main list area not found
Line -... Line 2552...
-
 
2552
 
-
 
2553
---------------------- Constants for registers: ----------------------
-
 
2554
  eax - SF_CLIPBOARD (54)
2279
  
2555
  ebx - SSF_DEL_SLOT (3)
2280
======================================================================
2556
======================================================================
2281
===================== Function 54, subfunction 4 =====================
2557
===================== Function 54, subfunction 4 =====================
2282
===================== Alarm reset the lock buffer ====================
2558
===================== Alarm reset the lock buffer ====================
2283
======================================================================
2559
======================================================================
Line 2289... Line 2565...
2289
  * eax = -1 - main list area not found or no blocking
2565
  * eax = -1 - main list area not found or no blocking
2290
Remarks:
2566
Remarks:
2291
  * Used in exceptional cases, where no responsible or killed
2567
  * Used in exceptional cases, where no responsible or killed
2292
    application blocked the clipboard operations.
2568
    application blocked the clipboard operations.
Line -... Line 2569...
-
 
2569
 
-
 
2570
---------------------- Constants for registers: ----------------------
-
 
2571
  eax - SF_CLIPBOARD (54)
2293
 
2572
  ebx - SSF_UNLOCK_BUFFER (4)
2294
======================================================================
2573
======================================================================
2295
 Function 55, subfunction 55 - begin to play data on built-in speaker.
2574
 Function 55, subfunction 55 - begin to play data on built-in speaker.
2296
======================================================================
2575
======================================================================
2297
Parameters:
2576
Parameters:
Line 2322... Line 2601...
2322
    an information on request. Play itself goes independently from
2601
    an information on request. Play itself goes independently from
2323
    the program.
2602
    the program.
2324
  * The data must be kept in the memory at least up to the end
2603
  * The data must be kept in the memory at least up to the end
2325
    of play.
2604
    of play.
Line -... Line 2605...
-
 
2605
 
-
 
2606
---------------------- Constants for registers: ----------------------
2326
 
2607
  eax - SF_SPEAKER_PLAY (55)
2327
======================================================================
2608
======================================================================
2328
======================= Function 57 - PCI BIOS. ======================
2609
======================= Function 57 - PCI BIOS. ======================
2329
======================================================================
2610
======================================================================
2330
Parameters:
2611
Parameters:
Line 2340... Line 2621...
2340
  * The function calls PCI32 BIOS extension, documented e.g. in
2621
  * The function calls PCI32 BIOS extension, documented e.g. in
2341
    http://alpha1.dyns.net/files/PCI/bios21.pdf.
2622
    http://alpha1.dyns.net/files/PCI/bios21.pdf.
2342
  * If BIOS does not support this extension, its behavior is emulated
2623
  * If BIOS does not support this extension, its behavior is emulated
2343
    (through kernel-mode analogues of subfunctions of function 62).
2624
    (through kernel-mode analogues of subfunctions of function 62).
Line -... Line 2625...
-
 
2625
 
-
 
2626
---------------------- Constants for registers: ----------------------
2344
 
2627
  eax - SF_PCI_BIOS (57)
2345
======================================================================
2628
======================================================================
2346
========== Function 60 - Inter Process Communication (IPC). ==========
2629
========== Function 60 - Inter Process Communication (IPC). ==========
2347
======================================================================
2630
======================================================================
2348
IPC is used for message dispatching from one process/thread to
2631
IPC is used for message dispatching from one process/thread to
Line 2389... Line 2672...
2389
  * eax = 4 - process/thread with such PID does not exist
2672
  * eax = 4 - process/thread with such PID does not exist
2390
Remarks:
2673
Remarks:
2391
  * Immediately after writing of IPC-message to the buffer the system
2674
  * Immediately after writing of IPC-message to the buffer the system
2392
    sends to the receiver the event with code 7 (see event codes).
2675
    sends to the receiver the event with code 7 (see event codes).
Line -... Line 2676...
-
 
2676
 
-
 
2677
---------------------- Constants for registers: ----------------------
-
 
2678
  eax - SF_IPC (60)
2393
 
2679
  ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2)
2394
======================================================================
2680
======================================================================
2395
==== Function 61 - get parameters for the direct graphics access. ====
2681
==== Function 61 - get parameters for the direct graphics access. ====
2396
======================================================================
2682
======================================================================
2397
The data of the graphics screen (the memory area which displays
2683
The data of the graphics screen (the memory area which displays
Line 2448... Line 2734...
2448
  * ebx = 3 - subfunction number
2734
  * ebx = 3 - subfunction number
2449
Returned value:
2735
Returned value:
2450
  * eax = number of bytes occupied by one scanline
2736
  * eax = number of bytes occupied by one scanline
2451
    (horizontal line on the screen)
2737
    (horizontal line on the screen)
Line -... Line 2738...
-
 
2738
 
-
 
2739
---------------------- Constants for registers: ----------------------
-
 
2740
  eax - SF_GET_GRAPHICAL_PARAMS (61)
-
 
2741
  ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2),
2452
 
2742
    SSF_BYTES_PER_LINE (3)
2453
======================================================================
2743
======================================================================
2454
===== Function 62, subfunction 0 - get version of PCI-interface. =====
2744
===== Function 62, subfunction 0 - get version of PCI-interface. =====
2455
======================================================================
2745
======================================================================
2456
Parameters:
2746
Parameters:
Line 2463... Line 2753...
2463
Remarks:
2753
Remarks:
2464
  * Previously low-level access to PCI for applications must be
2754
  * Previously low-level access to PCI for applications must be
2465
    enabled by subfunction 12 of function 21.
2755
    enabled by subfunction 12 of function 21.
2466
  * If PCI BIOS is not supported, the value of ax is undefined.
2756
  * If PCI BIOS is not supported, the value of ax is undefined.
Line -... Line 2757...
-
 
2757
 
-
 
2758
---------------------- Constants for registers: ----------------------
-
 
2759
  eax - SF_PCI (62)
2467
 
2760
  ebx - SSF_GET_VERSION (0)
2468
======================================================================
2761
======================================================================
2469
==== Function 62, subfunction 1 - get number of the last PCI-bus. ====
2762
==== Function 62, subfunction 1 - get number of the last PCI-bus. ====
2470
======================================================================
2763
======================================================================
2471
Parameters:
2764
Parameters:
Line 2477... Line 2770...
2477
Remarks:
2770
Remarks:
2478
  * Previously low-level access to PCI for applications must be
2771
  * Previously low-level access to PCI for applications must be
2479
    enabled by subfunction 12 of function 21.
2772
    enabled by subfunction 12 of function 21.
2480
  * If PCI BIOS is not supported, the value of ax is undefined.
2773
  * If PCI BIOS is not supported, the value of ax is undefined.
Line -... Line 2774...
-
 
2774
 
-
 
2775
---------------------- Constants for registers: ----------------------
-
 
2776
  eax - SF_PCI (62)
2481
 
2777
  ebx - SSF_GET_LAST_BUS (1)
2482
======================================================================
2778
======================================================================
2483
===================== Function 62, subfunction 2 =====================
2779
===================== Function 62, subfunction 2 =====================
2484
===== Get mechanism of addressing to the PCI configuration space. ====
2780
===== Get mechanism of addressing to the PCI configuration space. ====
2485
======================================================================
2781
======================================================================
Line 2495... Line 2791...
2495
  * Addressing mechanism is selected depending on
2791
  * Addressing mechanism is selected depending on
2496
    equipment characteristics.
2792
    equipment characteristics.
2497
  * Subfunctions of read and write work automatically
2793
  * Subfunctions of read and write work automatically
2498
    with the selected mechanism.
2794
    with the selected mechanism.
Line -... Line 2795...
-
 
2795
 
-
 
2796
---------------------- Constants for registers: ----------------------
-
 
2797
  eax - SF_PCI (62)
2499
 
2798
  ebx - SSF_GET_ADRR_MODE (2)
2500
======================================================================
2799
======================================================================
2501
======== Function 62, subfunctions 4,5,6 - read PCI-register. ========
2800
======== Function 62, subfunctions 4,5,6 - read PCI-register. ========
2502
======================================================================
2801
======================================================================
2503
Parameters:
2802
Parameters:
Line 2527... Line 2826...
2527
    (http://www.pobox.com/~ralf/files.html,
2826
    (http://www.pobox.com/~ralf/files.html,
2528
    ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/);
2827
    ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/);
2529
    registers of the second type must be listed
2828
    registers of the second type must be listed
2530
    in the device documentation.
2829
    in the device documentation.
Line -... Line 2830...
-
 
2830
 
-
 
2831
---------------------- Constants for registers: ----------------------
-
 
2832
  eax - SF_PCI (62)
2531
 
2833
  ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6)
2532
======================================================================
2834
======================================================================
2533
====== Function 62, subfunctions 8,9,10 - write to PCI-register. =====
2835
====== Function 62, subfunctions 8,9,10 - write to PCI-register. =====
2534
======================================================================
2836
======================================================================
2535
Parameters:
2837
Parameters:
Line 2557... Line 2859...
2557
    defined by the concrete device. The list of registers of the
2859
    defined by the concrete device. The list of registers of the
2558
    first type can be found e.g. in famous Interrupt List by
2860
    first type can be found e.g. in famous Interrupt List by
2559
    Ralf Brown; registers of the second type must be listed
2861
    Ralf Brown; registers of the second type must be listed
2560
    in the device documentation.
2862
    in the device documentation.
Line -... Line 2863...
-
 
2863
 
-
 
2864
---------------------- Constants for registers: ----------------------
-
 
2865
  eax - SF_PCI (62)
2561
 
2866
  ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10)
2562
======================================================================
2867
======================================================================
2563
============== Function 63 - work with the debug board. ==============
2868
============== Function 63 - work with the debug board. ==============
2564
======================================================================
2869
======================================================================
2565
The debug board is the global system buffer (with the size
2870
The debug board is the global system buffer (with the size
Line 2602... Line 2907...
2602
  * ebx = 2 - subfunction number
2907
  * ebx = 2 - subfunction number
2603
Returned value:
2908
Returned value:
2604
  * eax = ebx = 0 - the buffer is empty
2909
  * eax = ebx = 0 - the buffer is empty
2605
  * eax = byte, ebx = 1 - byte was successfully read
2910
  * eax = byte, ebx = 1 - byte was successfully read
Line -... Line 2911...
-
 
2911
 
-
 
2912
---------------------- Constants for registers: ----------------------
-
 
2913
  eax - SF_BOARD (63)
2606
 
2914
  ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2)
2607
======================================================================
2915
======================================================================
2608
============== Function 64 - resize application memory. ==============
2916
============== Function 64 - resize application memory. ==============
2609
======================================================================
2917
======================================================================
2610
Parameters:
2918
Parameters:
Line 2619... Line 2927...
2619
    subfunctions 11, 12, 13 of function 68.
2927
    subfunctions 11, 12, 13 of function 68.
2620
  * The function cannot be used together with 68.11, 68.12, 68.13.
2928
  * The function cannot be used together with 68.11, 68.12, 68.13.
2621
    The function call will be ignored after creation of process heap
2929
    The function call will be ignored after creation of process heap
2622
    with function 68.11.
2930
    with function 68.11.
Line -... Line 2931...
-
 
2931
 
-
 
2932
---------------------- Constants for registers: ----------------------
2623
 
2933
  eax - SF_MEMORY_RESIZE (64)
2624
======================================================================
2934
======================================================================
2625
======== Function 65 - draw image with palette in the window. ========
2935
======== Function 65 - draw image with palette in the window. ========
2626
======================================================================
2936
======================================================================
2627
Parameters:
2937
Parameters:
Line 2663... Line 2973...
2663
  * Format of image with 32 bits per pixel: similar to 24, but
2973
  * Format of image with 32 bits per pixel: similar to 24, but
2664
    one additional ignored byte is present.
2974
    one additional ignored byte is present.
2665
  * The call to function 7 is equivalent to call to this function
2975
  * The call to function 7 is equivalent to call to this function
2666
    with esi=24, ebp=0.
2976
    with esi=24, ebp=0.
Line -... Line 2977...
-
 
2977
 
-
 
2978
---------------------- Constants for registers: ----------------------
2667
 
2979
  eax - SF_PUT_IMAGE_EXT (65)
2668
======================================================================
2980
======================================================================
2669
================== Function 66 - work with keyboard. =================
2981
================== Function 66 - work with keyboard. =================
2670
======================================================================
2982
======================================================================
2671
The input mode influences results of reading keys by function 2.
2983
The input mode influences results of reading keys by function 2.
Line 2771... Line 3083...
2771
  * function does not return value
3083
  * function does not return value
2772
Remarks:
3084
Remarks:
2773
  * Unlocking the results of the f. 66.6
3085
  * Unlocking the results of the f. 66.6
2774
  * To emulate a mouse via the keyboard, the application MOUSEMUL
3086
  * To emulate a mouse via the keyboard, the application MOUSEMUL
Line -... Line 3087...
-
 
3087
 
-
 
3088
---------------------- Constants for registers: ----------------------
-
 
3089
  eax - SF_KEYBOARD (66)
-
 
3090
  ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2),
-
 
3091
    SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4),
2775
 
3092
    SSF_DEL_SYS_HOTKEY (5),  SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7)
2776
======================================================================
3093
======================================================================
2777
========= Function 67 - change position/sizes of the window. =========
3094
========= Function 67 - change position/sizes of the window. =========
2778
======================================================================
3095
======================================================================
2779
Parameters:
3096
Parameters:
Line 2795... Line 3112...
2795
  * For windows of appropriate styles position and/or sizes can be
3112
  * For windows of appropriate styles position and/or sizes can be
2796
    changed by user; current position and sizes can be obtained by
3113
    changed by user; current position and sizes can be obtained by
2797
    call to function 9.
3114
    call to function 9.
2798
  * The function sends to the window redraw event (with the code 1).
3115
  * The function sends to the window redraw event (with the code 1).
Line -... Line 3116...
-
 
3116
 
-
 
3117
---------------------- Constants for registers: ----------------------
2799
 
3118
  eax - SF_CHANGE_WINDOW (67)
2800
======================================================================
3119
======================================================================
2801
====== Function 68, subfunction 0 - get the task switch counter. =====
3120
====== Function 68, subfunction 0 - get the task switch counter. =====
2802
======================================================================
3121
======================================================================
2803
Parameters:
3122
Parameters:
2804
  * eax = 68 - function number
3123
  * eax = 68 - function number
2805
  * ebx = 0 - subfunction number
3124
  * ebx = 0 - subfunction number
2806
Returned value:
3125
Returned value:
2807
  * eax = number of task switches from the system booting
3126
  * eax = number of task switches from the system booting
Line -... Line 3127...
-
 
3127
    (modulo 2^32)
-
 
3128
 
-
 
3129
---------------------- Constants for registers: ----------------------
2808
    (modulo 2^32)
3130
  eax - SF_SYS_MISC (68)
2809
 
3131
  ebx - SSF_GET_TASK_SWITCH_COUNT (0)
2810
======================================================================
3132
======================================================================
2811
======= Function 68, subfunction 1 - switch to the next thread. ======
3133
======= Function 68, subfunction 1 - switch to the next thread. ======
2812
======================================================================
3134
======================================================================
Line 2818... Line 3140...
2818
  * eax = 68 - function number
3140
  * eax = 68 - function number
2819
  * ebx = 1 - subfunction number
3141
  * ebx = 1 - subfunction number
2820
Returned value:
3142
Returned value:
2821
  * function does not return value
3143
  * function does not return value
Line -... Line 3144...
-
 
3144
 
-
 
3145
---------------------- Constants for registers: ----------------------
-
 
3146
  eax - SF_SYS_MISC (68)
2822
 
3147
  ebx - SSF_SWITCH_TASK (1)
2823
======================================================================
3148
======================================================================
2824
============= Function 68, subfunction 2 - cache + rdpmc. ============
3149
============= Function 68, subfunction 2 - cache + rdpmc. ============
2825
======================================================================
3150
======================================================================
2826
Parameters:
3151
Parameters:
Line 2840... Line 3165...
2840
    * eax = 0 - cache is on
3165
    * eax = 0 - cache is on
2841
    * eax <> 0 - cache is off
3166
    * eax <> 0 - cache is off
2842
  * for ecx=2 and ecx=3:
3167
  * for ecx=2 and ecx=3:
2843
    * function does not return value
3168
    * function does not return value
Line -... Line 3169...
-
 
3169
 
-
 
3170
---------------------- Constants for registers: ----------------------
-
 
3171
  eax - SF_SYS_MISC (68)
-
 
3172
  ebx - SSF_PERFORMANCE (2)
-
 
3173
  ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1),
2844
 
3174
    SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3)
2845
======================================================================
3175
======================================================================
2846
=========== Function 68, subfunction 3 - read MSR-register. ==========
3176
=========== Function 68, subfunction 3 - read MSR-register. ==========
2847
======================================================================
3177
======================================================================
2848
MSR = Model Specific Register; the complete list of MSR-registers
3178
MSR = Model Specific Register; the complete list of MSR-registers
Line 2864... Line 3194...
2864
  * Previously it is necessary to check, whether MSRs are supported
3194
  * Previously it is necessary to check, whether MSRs are supported
2865
    as a whole, with the instruction 'cpuid'. Otherwise processor
3195
    as a whole, with the instruction 'cpuid'. Otherwise processor
2866
    will generate other exception in the kernel, which will anyway
3196
    will generate other exception in the kernel, which will anyway
2867
    kill the thread.
3197
    kill the thread.
Line -... Line 3198...
-
 
3198
 
-
 
3199
---------------------- Constants for registers: ----------------------
-
 
3200
  eax - SF_SYS_MISC (68)
2868
 
3201
  ebx - SSF_READ_MSR (3)
2869
======================================================================
3202
======================================================================
2870
========= Function 68, subfunction 4 - write to MSR-register. ========
3203
========= Function 68, subfunction 4 - write to MSR-register. ========
2871
======================================================================
3204
======================================================================
2872
MSR = Model Specific Register; the complete list of MSR-registers
3205
MSR = Model Specific Register; the complete list of MSR-registers
Line 2889... Line 3222...
2889
  * Previously it is necessary to check, whether MSRs are supported
3222
  * Previously it is necessary to check, whether MSRs are supported
2890
    as a whole, with the instruction 'cpuid'. Otherwise processor
3223
    as a whole, with the instruction 'cpuid'. Otherwise processor
2891
    will generate other exception in the kernel, which will anyway
3224
    will generate other exception in the kernel, which will anyway
2892
    kill the thread.
3225
    kill the thread.
Line -... Line 3226...
-
 
3226
 
-
 
3227
---------------------- Constants for registers: ----------------------
-
 
3228
  eax - SF_SYS_MISC (68)
2893
 
3229
  ebx - SSF_WRITE_MSR (4)
2894
======================================================================
3230
======================================================================
2895
======= Function 68, subfunction 11 - initialize process heap. =======
3231
======= Function 68, subfunction 11 - initialize process heap. =======
2896
======================================================================
3232
======================================================================
2897
Parameters:
3233
Parameters:
Line 2906... Line 3242...
2906
    Heap size is equal to total amount of free application memory.
3242
    Heap size is equal to total amount of free application memory.
2907
  * The second function call from the same process results in
3243
  * The second function call from the same process results in
2908
    returning the size of the existing heap.
3244
    returning the size of the existing heap.
2909
  * After creation of the heap calls to function 64 will be ignored.
3245
  * After creation of the heap calls to function 64 will be ignored.
Line -... Line 3246...
-
 
3246
 
-
 
3247
---------------------- Constants for registers: ----------------------
-
 
3248
  eax - SF_SYS_MISC (68)
2910
 
3249
  ebx - SSF_HEAP_INIT (11)
2911
======================================================================
3250
======================================================================
2912
======== Function 68, subfunction 12 - allocate memory block. ========
3251
======== Function 68, subfunction 12 - allocate memory block. ========
2913
======================================================================
3252
======================================================================
2914
Parameters:
3253
Parameters:
Line 2922... Line 3261...
2922
    subfunction 11.
3261
    subfunction 11.
2923
  * The function allocates an integer number of pages (4 Kb) in such
3262
  * The function allocates an integer number of pages (4 Kb) in such
2924
    way that the real size of allocated block is more than or equal to
3263
    way that the real size of allocated block is more than or equal to
2925
    requested size.
3264
    requested size.
Line -... Line 3265...
-
 
3265
 
-
 
3266
---------------------- Constants for registers: ----------------------
-
 
3267
  eax - SF_SYS_MISC (68)
2926
 
3268
  ebx - SSF_MEM_ALLOC (12)
2927
======================================================================
3269
======================================================================
2928
========== Function 68, subfunction 13 - free memory block. ==========
3270
========== Function 68, subfunction 13 - free memory block. ==========
2929
======================================================================
3271
======================================================================
2930
Parameters:
3272
Parameters:
Line 2936... Line 3278...
2936
  * eax = 0 - failed
3278
  * eax = 0 - failed
2937
Remarks:
3279
Remarks:
2938
  * The memory block must have been allocated by subfunction 12
3280
  * The memory block must have been allocated by subfunction 12
2939
    or subfunction 20.
3281
    or subfunction 20.
Line -... Line 3282...
-
 
3282
 
-
 
3283
---------------------- Constants for registers: ----------------------
-
 
3284
  eax - SF_SYS_MISC (68)
2940
 
3285
  ebx - SSF_MEM_FREE (13)
2941
======================================================================
3286
======================================================================
2942
===================== Function 68, subfunction 14 ====================
3287
===================== Function 68, subfunction 14 ====================
2943
============ Wait for signal from another program/driver. ============
3288
============ Wait for signal from another program/driver. ============
2944
======================================================================
3289
======================================================================
Line 2950... Line 3295...
2950
  * buffer pointed to by ecx contains the following information:
3295
  * buffer pointed to by ecx contains the following information:
2951
    * +0: dword: identifier for following data of signal
3296
    * +0: dword: identifier for following data of signal
2952
    * +4: dword: data of signal (20 bytes), format of which is defined
3297
    * +4: dword: data of signal (20 bytes), format of which is defined
2953
          by the first dword
3298
          by the first dword
Line -... Line 3299...
-
 
3299
 
-
 
3300
---------------------- Constants for registers: ----------------------
-
 
3301
  eax - SF_SYS_MISC (68)
2954
 
3302
  ebx - SSF_WAIT_SIGNAL (14)
2955
======================================================================
3303
======================================================================
2956
============= Function 68, subfunction 16 - load driver. =============
3304
============= Function 68, subfunction 16 - load driver. =============
2957
======================================================================
3305
======================================================================
2958
Parameters:
3306
Parameters:
Line 2968... Line 3316...
2968
  * Driver name is case-sensitive.
3316
  * Driver name is case-sensitive.
2969
    Maximum length of the name is 16 characters, including
3317
    Maximum length of the name is 16 characters, including
2970
    terminating null character, the rest is ignored.
3318
    terminating null character, the rest is ignored.
2971
  * Driver ABC is loaded from file /rd/1/drivers/ABC.obj.
3319
  * Driver ABC is loaded from file /rd/1/drivers/ABC.obj.
Line -... Line 3320...
-
 
3320
 
-
 
3321
---------------------- Constants for registers: ----------------------
-
 
3322
  eax - SF_SYS_MISC (68)
2972
 
3323
  ebx - SSF_LOAD_DRIVER (16)
2973
======================================================================
3324
======================================================================
2974
============ Function 68, subfunction 17 - driver control. ===========
3325
============ Function 68, subfunction 17 - driver control. ===========
2975
======================================================================
3326
======================================================================
2976
Parameters:
3327
Parameters:
Line 2988... Line 3339...
2988
Remarks:
3339
Remarks:
2989
  * Function codes and the structure of input/output data
3340
  * Function codes and the structure of input/output data
2990
    are defined by driver.
3341
    are defined by driver.
2991
  * Previously one must obtain driver handle by subfunction 16.
3342
  * Previously one must obtain driver handle by subfunction 16.
Line -... Line 3343...
-
 
3343
 
-
 
3344
---------------------- Constants for registers: ----------------------
-
 
3345
  eax - SF_SYS_MISC (68)
2992
 
3346
  ebx - SSF_CONTROL_DRIVER (17)
2993
======================================================================
3347
======================================================================
2994
=============== Function 68, subfunction 19 - load DLL. ==============
3348
=============== Function 68, subfunction 19 - load DLL. ==============
2995
======================================================================
3349
======================================================================
2996
Parameters:
3350
Parameters:
Line 3003... Line 3357...
3003
Remarks:
3357
Remarks:
3004
  * Export table is an array of structures of 2 dword's, terminated
3358
  * Export table is an array of structures of 2 dword's, terminated
3005
    by zero. The first dword in structure points to function name,
3359
    by zero. The first dword in structure points to function name,
3006
    the second dword contains address of function.
3360
    the second dword contains address of function.
Line -... Line 3361...
-
 
3361
 
-
 
3362
---------------------- Constants for registers: ----------------------
-
 
3363
  eax - SF_SYS_MISC (68)
3007
 
3364
  ebx - SSF_LOAD_DLL (19)
3008
======================================================================
3365
======================================================================
3009
======= Function 68, subfunction 20 - reallocate memory block. =======
3366
======= Function 68, subfunction 20 - reallocate memory block. =======
3010
======================================================================
3367
======================================================================
3011
Parameters:
3368
Parameters:
Line 3026... Line 3383...
3026
    must be allocated earlier with subfunction 12 or this subfunction.
3383
    must be allocated earlier with subfunction 12 or this subfunction.
3027
  * If ecx=0, the function frees memory block at edx and returns 0.
3384
  * If ecx=0, the function frees memory block at edx and returns 0.
3028
  * The contents of the block are unchanged up to the shorter of
3385
  * The contents of the block are unchanged up to the shorter of
3029
    the new and old sizes.
3386
    the new and old sizes.
Line -... Line 3387...
-
 
3387
 
-
 
3388
---------------------- Constants for registers: ----------------------
-
 
3389
  eax - SF_SYS_MISC (68)
3030
 
3390
  ebx - SSF_MEM_REALLOC (20)
3031
======================================================================
3391
======================================================================
3032
=========== Function 68, subfunction 21 - load driver PE. ============
3392
=========== Function 68, subfunction 21 - load driver PE. ============
3033
======================================================================
3393
======================================================================
3034
Parameters:
3394
Parameters:
Line 3041... Line 3401...
3041
  * otherwise eax = driver handle
3401
  * otherwise eax = driver handle
3042
Remarks:
3402
Remarks:
3043
  * If the driver was not loaded yet, it is loaded;
3403
  * If the driver was not loaded yet, it is loaded;
3044
    if the driver was loaded yet, nothing happens.
3404
    if the driver was loaded yet, nothing happens.
Line -... Line 3405...
-
 
3405
 
-
 
3406
---------------------- Constants for registers: ----------------------
-
 
3407
  eax - SF_SYS_MISC (68)
3045
 
3408
  ebx - SSF_LOAD_DRIVER_PE (21)
3046
======================================================================
3409
======================================================================
3047
======== Function 68, subfunction 22 - open named memory area. =======
3410
======== Function 68, subfunction 22 - open named memory area. =======
3048
======================================================================
3411
======================================================================
3049
Parameters:
3412
Parameters:
Line 3079... Line 3442...
3079
  * If a new area is created, access flags set maximal rights
3442
  * If a new area is created, access flags set maximal rights
3080
    for other processes. An attempt from other process to open
3443
    for other processes. An attempt from other process to open
3081
    with denied rights will fail with error code E_ACCESS.
3444
    with denied rights will fail with error code E_ACCESS.
3082
  * The process which has created an area always has write access.
3445
  * The process which has created an area always has write access.
Line -... Line 3446...
-
 
3446
 
-
 
3447
---------------------- Constants for registers: ----------------------
-
 
3448
  eax - SF_SYS_MISC (68)
3083
 
3449
  ebx - SSF_MEM_OPEN (22)
3084
======================================================================
3450
======================================================================
3085
======= Function 68, subfunction 23 - close named memory area. =======
3451
======= Function 68, subfunction 23 - close named memory area. =======
3086
======================================================================
3452
======================================================================
3087
Parameters:
3453
Parameters:
Line 3094... Line 3460...
3094
  * A memory area is physically freed (with deleting all data and
3460
  * A memory area is physically freed (with deleting all data and
3095
    freeing physical memory), when all threads which have opened
3461
    freeing physical memory), when all threads which have opened
3096
    this area will close it.
3462
    this area will close it.
3097
  * When thread is terminating, all opened by it areas are closed.
3463
  * When thread is terminating, all opened by it areas are closed.
Line -... Line 3464...
-
 
3464
 
-
 
3465
---------------------- Constants for registers: ----------------------
-
 
3466
  eax - SF_SYS_MISC (68)
3098
 
3467
  ebx - SSF_MEM_CLOSE (23)
3099
======================================================================
3468
======================================================================
3100
======== Function 68, subfunction 24 - set exception handler. ========
3469
======== Function 68, subfunction 24 - set exception handler. ========
3101
======================================================================
3470
======================================================================
3102
Parameters:
3471
Parameters:
Line 3126... Line 3495...
3126
  * After user handler completes critical operations, it can set
3495
  * After user handler completes critical operations, it can set
3127
    the corresponding bit in the exception mask with subfunction 25.
3496
    the corresponding bit in the exception mask with subfunction 25.
3128
    Also user handler is responsible for clearing exceptions flags in
3497
    Also user handler is responsible for clearing exceptions flags in
3129
    FPU and/or SSE.
3498
    FPU and/or SSE.
Line -... Line 3499...
-
 
3499
 
-
 
3500
---------------------- Constants for registers: ----------------------
-
 
3501
  eax - SF_SYS_MISC (68)
3130
 
3502
  ebx - SSF_SET_EXCEPTION_HANDLER (24)
3131
======================================================================
3503
======================================================================
3132
======== Function 68, subfunction 25 - set exception activity ========
3504
======== Function 68, subfunction 25 - set exception activity ========
3133
======================================================================
3505
======================================================================
3134
Parameters:
3506
Parameters:
Line 3142... Line 3514...
3142
Remarks:
3514
Remarks:
3143
  * In current implementation only mask for user excepton handler,
3515
  * In current implementation only mask for user excepton handler,
3144
    which has been previously set by subfunction 24,
3516
    which has been previously set by subfunction 24,
3145
    is changed. Signal number corresponds to exception number.
3517
    is changed. Signal number corresponds to exception number.
Line -... Line 3518...
-
 
3518
 
-
 
3519
---------------------- Constants for registers: ----------------------
-
 
3520
  eax - SF_SYS_MISC (68)
3146
 
3521
  ebx - SSF_SET_EXCEPTION_STATE (25)
3147
======================================================================
3522
======================================================================
3148
====== Function 68, subfunction 26 - release memory pages ============
3523
====== Function 68, subfunction 26 - release memory pages ============
3149
======================================================================
3524
======================================================================
3150
Parameters:
3525
Parameters:
Line 3155... Line 3530...
3155
  * esi = the size of the region of memory to release, in bytes
3530
  * esi = the size of the region of memory to release, in bytes
3156
Remarks:
3531
Remarks:
3157
  * function release range of pages from ecx+edx to ecx+edx+esi
3532
  * function release range of pages from ecx+edx to ecx+edx+esi
3158
    and set virtual memory into reserved state.
3533
    and set virtual memory into reserved state.
Line -... Line 3534...
-
 
3534
 
-
 
3535
---------------------- Constants for registers: ----------------------
-
 
3536
  eax - SF_SYS_MISC (68)
3159
 
3537
  ebx - SSF_MEM_FREE_EXT (26)
3160
======================================================================
3538
======================================================================
3161
========== Function 68, subfunction 27 - load file ===================
3539
========== Function 68, subfunction 27 - load file ===================
3162
======================================================================
3540
======================================================================
3163
Parameters:
3541
Parameters:
Line 3168... Line 3546...
3168
  * eax = pointer to the loaded file, or zero
3546
  * eax = pointer to the loaded file, or zero
3169
  * edx = size of the loaded file, or zero
3547
  * edx = size of the loaded file, or zero
3170
Remarks:
3548
Remarks:
3171
  * function loads file and unpacks, if necessary
3549
  * function loads file and unpacks, if necessary
Line -... Line 3550...
-
 
3550
 
-
 
3551
---------------------- Constants for registers: ----------------------
-
 
3552
  eax - SF_SYS_MISC (68)
3172
 
3553
  ebx - SSF_LOAD_FILE (27)
3173
======================================================================
3554
======================================================================
3174
====================== Function 69 - debugging. ======================
3555
====================== Function 69 - debugging. ======================
3175
======================================================================
3556
======================================================================
3176
A process can load other process as debugged by set of corresponding
3557
A process can load other process as debugged by set of corresponding
Line 3214... Line 3595...
3214
  * subfunction 6 - read from the memory of debugged process
3595
  * subfunction 6 - read from the memory of debugged process
3215
  * subfunction 7 - write to the memory of debugged process
3596
  * subfunction 7 - write to the memory of debugged process
3216
  * subfunction 8 - terminate debugged thread
3597
  * subfunction 8 - terminate debugged thread
3217
  * subfunction 9 - set/clear hardware breakpoint
3598
  * subfunction 9 - set/clear hardware breakpoint
Line -... Line 3599...
-
 
3599
 
-
 
3600
---------------------- Constants for registers: ----------------------
-
 
3601
  eax - SF_DEBUG (69)
-
 
3602
  ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1),
-
 
3603
    SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4),
-
 
3604
    SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7),
3218
 
3605
    SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9)
3219
======================================================================
3606
======================================================================
3220
= Function 69, subfunction 0 - define data area fror debug messages. =
3607
= Function 69, subfunction 0 - define data area fror debug messages. =
3221
======================================================================
3608
======================================================================
3222
Parameters:
3609
Parameters:
Line 3237... Line 3624...
3237
        neg     [bufsize]
3624
        neg     [bufsize]
3238
  * Data in the buffer are considered as array of items with variable
3625
  * Data in the buffer are considered as array of items with variable
3239
    length - messages. Format of a message is explained in
3626
    length - messages. Format of a message is explained in
3240
    general description.
3627
    general description.
Line -... Line 3628...
-
 
3628
 
-
 
3629
---------------------- Constants for registers: ----------------------
-
 
3630
  eax - SF_DEBUG (69)
3241
 
3631
  ebx - SSF_SET_MESSAGE_AREA (0)
3242
======================================================================
3632
======================================================================
3243
===================== Function 69, subfunction 1 =====================
3633
===================== Function 69, subfunction 1 =====================
3244
============ Get contents of registers of debugged thread. ===========
3634
============ Get contents of registers of debugged thread. ===========
3245
======================================================================
3635
======================================================================
Line 3266... Line 3656...
3266
  * If the thread executes code of ring-0, the function returns
3656
  * If the thread executes code of ring-0, the function returns
3267
    contents of registers of ring-3.
3657
    contents of registers of ring-3.
3268
  * Process must be loaded for debugging (as is shown in
3658
  * Process must be loaded for debugging (as is shown in
3269
    general description).
3659
    general description).
Line -... Line 3660...
-
 
3660
 
-
 
3661
---------------------- Constants for registers: ----------------------
-
 
3662
  eax - SF_DEBUG (69)
3270
 
3663
  ebx - SSF_GET_REGISTERS (1)
3271
======================================================================
3664
======================================================================
3272
===================== Function 69, subfunction 2 =====================
3665
===================== Function 69, subfunction 2 =====================
3273
============ Set contents of registers of debugged thread. ===========
3666
============ Set contents of registers of debugged thread. ===========
3274
======================================================================
3667
======================================================================
Line 3285... Line 3678...
3285
  * If the thread executes code of ring-0, the function returns
3678
  * If the thread executes code of ring-0, the function returns
3286
    contents of registers of ring-3.
3679
    contents of registers of ring-3.
3287
  * Process must be loaded for debugging (as is shown in
3680
  * Process must be loaded for debugging (as is shown in
3288
    general description).
3681
    general description).
Line -... Line 3682...
-
 
3682
 
-
 
3683
---------------------- Constants for registers: ----------------------
-
 
3684
  eax - SF_DEBUG (69)
3289
 
3685
  ebx - SSF_SET_REGISTERS (2)
3290
======================================================================
3686
======================================================================
3291
===== Function 69, subfunction 3 - detach from debugged process. =====
3687
===== Function 69, subfunction 3 - detach from debugged process. =====
3292
======================================================================
3688
======================================================================
3293
Parameters:
3689
Parameters:
Line 3297... Line 3693...
3297
Returned value:
3693
Returned value:
3298
  * function does not return value
3694
  * function does not return value
3299
Remarks:
3695
Remarks:
3300
  * If the process was suspended, it resumes execution.
3696
  * If the process was suspended, it resumes execution.
Line -... Line 3697...
-
 
3697
 
-
 
3698
---------------------- Constants for registers: ----------------------
-
 
3699
  eax - SF_DEBUG (69)
3301
 
3700
  ebx - SSF_DETACH (3)
3302
======================================================================
3701
======================================================================
3303
======== Function 69, subfunction 4 - suspend debugged thread. =======
3702
======== Function 69, subfunction 4 - suspend debugged thread. =======
3304
======================================================================
3703
======================================================================
3305
Parameters:
3704
Parameters:
Line 3310... Line 3709...
3310
  * function does not return value
3709
  * function does not return value
3311
Remarks:
3710
Remarks:
3312
  * Process must be loaded for debugging (as is shown in
3711
  * Process must be loaded for debugging (as is shown in
3313
    general description).
3712
    general description).
Line -... Line 3713...
-
 
3713
 
-
 
3714
---------------------- Constants for registers: ----------------------
-
 
3715
  eax - SF_DEBUG (69)
3314
 
3716
  ebx - SSF_SUSPEND (4)
3315
======================================================================
3717
======================================================================
3316
======== Function 69, subfunction 5 - resume debugged thread. ========
3718
======== Function 69, subfunction 5 - resume debugged thread. ========
3317
======================================================================
3719
======================================================================
3318
Parameters:
3720
Parameters:
Line 3323... Line 3725...
3323
  * function does not return value
3725
  * function does not return value
3324
Remarks:
3726
Remarks:
3325
  * Process must be loaded for debugging (as is shown in
3727
  * Process must be loaded for debugging (as is shown in
3326
    general description).
3728
    general description).
Line -... Line 3729...
-
 
3729
 
-
 
3730
---------------------- Constants for registers: ----------------------
-
 
3731
  eax - SF_DEBUG (69)
3327
 
3732
  ebx - SSF_RESUME (5)
3328
======================================================================
3733
======================================================================
3329
= Fucntion 69, subfunction 6 - read from memory of debugged process. =
3734
= Fucntion 69, subfunction 6 - read from memory of debugged process. =
3330
======================================================================
3735
======================================================================
3331
Parameters:
3736
Parameters:
Line 3341... Line 3746...
3341
    if esi is too large)
3746
    if esi is too large)
3342
Remarks:
3747
Remarks:
3343
  * Process must be loaded for debugging (as is shown in
3748
  * Process must be loaded for debugging (as is shown in
3344
    general description).
3749
    general description).
Line -... Line 3750...
-
 
3750
 
-
 
3751
---------------------- Constants for registers: ----------------------
-
 
3752
  eax - SF_DEBUG (69)
3345
 
3753
  ebx - SSF_READ_MEMORY (6)
3346
======================================================================
3754
======================================================================
3347
== Function 69, subfunction 7 - write to memory of debugged process. =
3755
== Function 69, subfunction 7 - write to memory of debugged process. =
3348
======================================================================
3756
======================================================================
3349
Parameters:
3757
Parameters:
Line 3359... Line 3767...
3359
    if esi is too large)
3767
    if esi is too large)
3360
Remarks:
3768
Remarks:
3361
  * Process must be loaded for debugging (as is shown in
3769
  * Process must be loaded for debugging (as is shown in
3362
    general description).
3770
    general description).
Line -... Line 3771...
-
 
3771
 
-
 
3772
---------------------- Constants for registers: ----------------------
-
 
3773
  eax - SF_DEBUG (69)
3363
 
3774
  ebx - SSF_WRITE_MEMORY (7)
3364
======================================================================
3775
======================================================================
3365
======= Function 69, subfunction 8 - terminate debugged thread. ======
3776
======= Function 69, subfunction 8 - terminate debugged thread. ======
3366
======================================================================
3777
======================================================================
3367
Parameters:
3778
Parameters:
Line 3375... Line 3786...
3375
    general description).
3786
    general description).
3376
  * The function is similar to subfunction 2 of function 18
3787
  * The function is similar to subfunction 2 of function 18
3377
    with two differences: it requires first remark and
3788
    with two differences: it requires first remark and
3378
    accepts PID rather than slot number.
3789
    accepts PID rather than slot number.
Line -... Line 3790...
-
 
3790
 
-
 
3791
---------------------- Constants for registers: ----------------------
-
 
3792
  eax - SF_DEBUG (69)
3379
 
3793
  ebx - SSF_TERMINATE (8)
3380
======================================================================
3794
======================================================================
3381
===== Function 69, subfunction 9 - set/clear hardware breakpoint. ====
3795
===== Function 69, subfunction 9 - set/clear hardware breakpoint. ====
3382
======================================================================
3796
======================================================================
3383
Parameters:
3797
Parameters:
Line 3416... Line 3830...
3416
  * Breakpoints generate debug exception #DB, on which the system
3830
  * Breakpoints generate debug exception #DB, on which the system
3417
    notifies debugger.
3831
    notifies debugger.
3418
  * Breakpoints on write and read/write act after
3832
  * Breakpoints on write and read/write act after
3419
    execution of the caused it instruction.
3833
    execution of the caused it instruction.
Line -... Line 3834...
-
 
3834
 
-
 
3835
---------------------- Constants for registers: ----------------------
-
 
3836
  eax - SF_DEBUG (69)
3420
 
3837
  ebx - SSF_DEFINE_BREAKPOINT (9)
3421
======================================================================
3838
======================================================================
3422
==== Function 70 - work with file system with long names support. ====
3839
==== Function 70 - work with file system with long names support. ====
3423
======================================================================
3840
======================================================================
3424
Parameters:
3841
Parameters:
Line 3484... Line 3901...
3484
At the first call of subfunctions 0,1,5,7 to ATAPI devices
3901
At the first call of subfunctions 0,1,5,7 to ATAPI devices
3485
(CD and DVD) the manual control of tray is locked due to caching
3902
(CD and DVD) the manual control of tray is locked due to caching
3486
drive data. Unlocking is made when subfunction 4 of function 24
3903
drive data. Unlocking is made when subfunction 4 of function 24
3487
is called for corresponding device.
3904
is called for corresponding device.
Line -... Line 3905...
-
 
3905
 
-
 
3906
---------------------- Constants for registers: ----------------------
-
 
3907
  eax - SF_FILE (70)
-
 
3908
 [ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2),
-
 
3909
    SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5),
-
 
3910
    SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8),
3488
 
3911
    SSF_CREATE_FOLDER (9)
3489
======================================================================
3912
======================================================================
3490
=== Function 70, subfunction 0 - read file with long names support. ==
3913
=== Function 70, subfunction 0 - read file with long names support. ==
3491
======================================================================
3914
======================================================================
3492
Parameters:
3915
Parameters:
Line 3511... Line 3934...
3511
    the function will read as many as it can, and after that return
3934
    the function will read as many as it can, and after that return
3512
    eax=6 (EOF).
3935
    eax=6 (EOF).
3513
  * The function does not allow to read folder (returns eax=10,
3936
  * The function does not allow to read folder (returns eax=10,
3514
    access denied).
3937
    access denied).
Line -... Line 3938...
-
 
3938
 
-
 
3939
---------------------- Constants for registers: ----------------------
-
 
3940
  eax - SF_FILE (70)
3515
 
3941
 [ebx] - SSF_READ_FILE (0)
3516
======================================================================
3942
======================================================================
3517
== Function 70, subfunction 1 - read folder with long names support. =
3943
== Function 70, subfunction 1 - read folder with long names support. =
3518
======================================================================
3944
======================================================================
3519
Parameters:
3945
Parameters:
Line 3608... Line 4034...
3608
  * The function allows also to read virtual folders "/", "/rd",
4034
  * The function allows also to read virtual folders "/", "/rd",
3609
    "/fd", "/hd[n]", thus attributes of subfolders are set to 0x10,
4035
    "/fd", "/hd[n]", thus attributes of subfolders are set to 0x10,
3610
    and times and dates are zeroed. An alternative way to get the
4036
    and times and dates are zeroed. An alternative way to get the
3611
    equipment information - subfunction 11 of function 18.
4037
    equipment information - subfunction 11 of function 18.
Line -... Line 4038...
-
 
4038
 
-
 
4039
---------------------- Constants for registers: ----------------------
-
 
4040
  eax - SF_FILE (70)
3612
 
4041
 [ebx] - SSF_READ_FOLDER (1)
3613
======================================================================
4042
======================================================================
3614
===================== Function 70, subfunction 2 =====================
4043
===================== Function 70, subfunction 2 =====================
3615
============ Create/rewrite file with long names support. ============
4044
============ Create/rewrite file with long names support. ============
3616
======================================================================
4045
======================================================================
Line 3636... Line 4065...
3636
    if it existed, it is rewritten.
4065
    if it existed, it is rewritten.
3637
  * If there is not enough free space on disk, the function will
4066
  * If there is not enough free space on disk, the function will
3638
    write as many as can and then return error code 8.
4067
    write as many as can and then return error code 8.
3639
  * The function is not supported for CD (returns error code 2).
4068
  * The function is not supported for CD (returns error code 2).
Line -... Line 4069...
-
 
4069
 
-
 
4070
---------------------- Constants for registers: ----------------------
-
 
4071
  eax - SF_FILE (70)
3640
 
4072
 [ebx] - SSF_CREATE_FILE (2)
3641
======================================================================
4073
======================================================================
3642
===================== Function 70, subfunction 3 =====================
4074
===================== Function 70, subfunction 3 =====================
3643
=========== Write to existing file with long names support. ==========
4075
=========== Write to existing file with long names support. ==========
3644
======================================================================
4076
======================================================================
Line 3666... Line 4098...
3666
  * If beginning and/or ending position is greater than file size
4098
  * If beginning and/or ending position is greater than file size
3667
    (except for the previous case), the file is expanded to needed
4099
    (except for the previous case), the file is expanded to needed
3668
    size with zero characters.
4100
    size with zero characters.
3669
  * The function is not supported for CD (returns error code 2).
4101
  * The function is not supported for CD (returns error code 2).
Line -... Line 4102...
-
 
4102
 
-
 
4103
---------------------- Constants for registers: ----------------------
-
 
4104
  eax - SF_FILE (70)
3670
 
4105
 [ebx] - SSF_WRITE_FILE (3)
3671
======================================================================
4106
======================================================================
3672
============ Function 70, subfunction 4 - set end of file. ===========
4107
============ Function 70, subfunction 4 - set end of file. ===========
3673
======================================================================
4108
======================================================================
3674
Parameters:
4109
Parameters:
Line 3697... Line 4132...
3697
  * If there is not enough free space on disk for expansion, the
4132
  * If there is not enough free space on disk for expansion, the
3698
    function will expand to maximum possible size and then return
4133
    function will expand to maximum possible size and then return
3699
    error code 8.
4134
    error code 8.
3700
  * The function is not supported for CD (returns error code 2).
4135
  * The function is not supported for CD (returns error code 2).
Line -... Line 4136...
-
 
4136
 
-
 
4137
---------------------- Constants for registers: ----------------------
-
 
4138
  eax - SF_FILE (70)
3701
 
4139
 [ebx] - SSF_SET_END (4)
3702
======================================================================
4140
======================================================================
3703
==== Function 70, subfunction 5 - get information on file/folder. ====
4141
==== Function 70, subfunction 5 - get information on file/folder. ====
3704
======================================================================
4142
======================================================================
3705
Parameters:
4143
Parameters:
Line 3725... Line 4163...
3725
(i.e. only first 40 = 0x28 bytes).
4163
(i.e. only first 40 = 0x28 bytes).
3726
Remarks:
4164
Remarks:
3727
  * The function does not support virtual folders such as /, /rd and
4165
  * The function does not support virtual folders such as /, /rd and
3728
    root folders like /rd/1.
4166
    root folders like /rd/1.
Line -... Line 4167...
-
 
4167
 
-
 
4168
---------------------- Constants for registers: ----------------------
-
 
4169
  eax - SF_FILE (70)
3729
 
4170
 [ebx] - SSF_GET_INFO (5)
3730
======================================================================
4171
======================================================================
3731
===== Function 70, subfunction 6 - set attributes of file/folder. ====
4172
===== Function 70, subfunction 6 - set attributes of file/folder. ====
3732
======================================================================
4173
======================================================================
3733
Parameters:
4174
Parameters:
Line 3755... Line 4196...
3755
Remarks:
4196
Remarks:
3756
  * The function does not support virtual folders such as /, /rd and
4197
  * The function does not support virtual folders such as /, /rd and
3757
    root folders like /rd/1.
4198
    root folders like /rd/1.
3758
  * The function is not supported for CD (returns error code 2).
4199
  * The function is not supported for CD (returns error code 2).
Line -... Line 4200...
-
 
4200
 
-
 
4201
---------------------- Constants for registers: ----------------------
-
 
4202
  eax - SF_FILE (70)
3759
 
4203
 [ebx] - SSF_SET_INFO (6)
3760
======================================================================
4204
======================================================================
3761
=========== Function 70, subfunction 7 - start application. ==========
4205
=========== Function 70, subfunction 7 - start application. ==========
3762
======================================================================
4206
======================================================================
3763
Parameters:
4207
Parameters:
Line 3787... Line 4231...
3787
    up to terminating zero inclusively or first 256 character
4231
    up to terminating zero inclusively or first 256 character
3788
    regarding what is less.
4232
    regarding what is less.
3789
  * If the process is started as debugged, it is created in
4233
  * If the process is started as debugged, it is created in
3790
    the suspended state; to run use subfunction 5 of function 69.
4234
    the suspended state; to run use subfunction 5 of function 69.
Line -... Line 4235...
-
 
4235
 
-
 
4236
---------------------- Constants for registers: ----------------------
-
 
4237
  eax - SF_FILE (70)
3791
 
4238
 [ebx] - SSF_START_APP (7)
3792
======================================================================
4239
======================================================================
3793
========== Function 70, subfunction 8 - delete file/folder. ==========
4240
========== Function 70, subfunction 8 - delete file/folder. ==========
3794
======================================================================
4241
======================================================================
3795
Parameters:
4242
Parameters:
Line 3812... Line 4259...
3812
Remarks:
4259
Remarks:
3813
  * The function is not supported for CD (returns error code 2).
4260
  * The function is not supported for CD (returns error code 2).
3814
  * The function can delete only empty folders (attempt to delete
4261
  * The function can delete only empty folders (attempt to delete
3815
    nonempty folder results in error with code 10, "access denied").
4262
    nonempty folder results in error with code 10, "access denied").
Line -... Line 4263...
-
 
4263
 
-
 
4264
---------------------- Constants for registers: ----------------------
-
 
4265
  eax - SF_FILE (70)
3816
 
4266
 [ebx] - SSF_DELETE (8)
3817
======================================================================
4267
======================================================================
3818
============= Function 70, subfunction 9 - create folder. ============
4268
============= Function 70, subfunction 9 - create folder. ============
3819
======================================================================
4269
======================================================================
3820
Parameters:
4270
Parameters:
Line 3837... Line 4287...
3837
Remarks:
4287
Remarks:
3838
  * The function is not supported for CD (returns error code 2).
4288
  * The function is not supported for CD (returns error code 2).
3839
  * The parent folder must already exist.
4289
  * The parent folder must already exist.
3840
  * If target folder already exists, function returns success (eax=0).
4290
  * If target folder already exists, function returns success (eax=0).
Line -... Line 4291...
-
 
4291
 
-
 
4292
---------------------- Constants for registers: ----------------------
-
 
4293
  eax - SF_FILE (70)
3841
 
4294
 [ebx] - SSF_CREATE_FOLDER (9)
3842
======================================================================
4295
======================================================================
3843
========== Function 71, subfunction 1 - set window caption. ==========
4296
========== Function 71, subfunction 1 - set window caption. ==========
3844
======================================================================
4297
======================================================================
3845
Parameters:
4298
Parameters:
Line 3855... Line 4308...
3855
    2 = UTF-16LE
4308
    2 = UTF-16LE
3856
    3 = UTF-8
4309
    3 = UTF-8
3857
    otherwise will be used cp866.
4310
    otherwise will be used cp866.
3858
  * Pass NULL in ecx to remove caption.
4311
  * Pass NULL in ecx to remove caption.
Line -... Line 4312...
-
 
4312
 
-
 
4313
---------------------- Constants for registers: ----------------------
3859
 
4314
  eax - SF_SET_CAPTION (71)
3860
======================================================================
4315
======================================================================
3861
=============== Function 72 - send message to a window. ==============
4316
=============== Function 72 - send message to a window. ==============
Line 3862... Line 4317...
3862
======================================================================
4317
======================================================================
Line 3869... Line 4324...
3869
  * edx = parameter: key code for ecx=2, button identifier for ecx=3
4324
  * edx = parameter: key code for ecx=2, button identifier for ecx=3
3870
Returned value:
4325
Returned value:
3871
  * eax = 0 - success
4326
  * eax = 0 - success
3872
  * eax = 1 - buffer is full
4327
  * eax = 1 - buffer is full
Line -... Line 4328...
-
 
4328
 
-
 
4329
---------------------- Constants for registers: ----------------------
3873
 
4330
  eax - SF_SEND_MESSAGE (72)
3874
======================================================================
4331
======================================================================
3875
===================== Function 73 - blit bitmap  =====================
4332
===================== Function 73 - blit bitmap  =====================
Line 3876... Line 4333...
3876
======================================================================
4333
======================================================================
Line 3908... Line 4365...
3908
    +36: dword: size of the bitmap row in bytes
4365
    +36: dword: size of the bitmap row in bytes
Line 3909... Line 4366...
3909
 
4366
 
3910
Returned value:
4367
Returned value:
Line -... Line 4368...
-
 
4368
  * function does not return value
-
 
4369
 
3911
  * function does not return value
4370
---------------------- Constants for registers: ----------------------
3912
 
4371
  eax - SF_BLITTER (73)
3913
======================================================================
4372
======================================================================
3914
= Function 74, Subfunction 255, Get number of active network devices. =
4373
= Function 74, Subfunction 255, Get number of active network devices. =
3915
======================================================================
4374
======================================================================
3916
Parameters:
4375
Parameters:
3917
  * eax = 74 - function number
4376
  * eax = 74 - function number
3918
  * bl = 255 - subfunction number
4377
  * bl = 255 - subfunction number
Line -... Line 4378...
-
 
4378
Returned value:
-
 
4379
  * eax = number of active network devices
-
 
4380
 
3919
Returned value:
4381
---------------------- Constants for registers: ----------------------
3920
  * eax = number of active network devices
4382
  eax - SF_NETWORK_GET (74)
3921
 
4383
   bl - SSF_DEVICE_COUNT (255)
3922
======================================================================
4384
======================================================================
3923
======== Function 74, Subfunction 0, Get network device type. ========
4385
======== Function 74, Subfunction 0, Get network device type. ========
3924
======================================================================
4386
======================================================================
3925
Parameters:
4387
Parameters:
3926
  * eax = 74 - function number
4388
  * eax = 74 - function number
3927
  * bl = 0 - subfunction number
4389
  * bl = 0 - subfunction number
Line -... Line 4390...
-
 
4390
  * bh = device number
-
 
4391
Returned value:
-
 
4392
  * eax = device type number
3928
  * bh = device number
4393
 
3929
Returned value:
4394
---------------------- Constants for registers: ----------------------
3930
  * eax = device type number
4395
  eax - SF_NETWORK_GET (74)
3931
 
4396
   bl - SSF_DEVICE_TYPE (0)
3932
======================================================================
4397
======================================================================
Line 3939... Line 4404...
3939
  * ecx = pointer to 64 byte buffer
4404
  * ecx = pointer to 64 byte buffer
3940
Returned value:
4405
Returned value:
3941
  * eax = -1 on error
4406
  * eax = -1 on error
3942
  * The network device name is written into the buffer, on success
4407
  * The network device name is written into the buffer, on success
Line -... Line 4408...
-
 
4408
 
-
 
4409
---------------------- Constants for registers: ----------------------
-
 
4410
  eax - SF_NETWORK_GET (74)
3943
 
4411
   bl - SSF_DEVICE_NAME (1)
3944
======================================================================
4412
======================================================================
3945
========= Function 74, Subfunction 2, Reset network device. ==========
4413
========= Function 74, Subfunction 2, Reset network device. ==========
3946
======================================================================
4414
======================================================================
3947
Parameters:
4415
Parameters:
3948
  * eax = 74 - function number
4416
  * eax = 74 - function number
3949
  * bl = 2 - subfunction number
4417
  * bl = 2 - subfunction number
3950
  * bh = device number
4418
  * bh = device number
3951
Returned value:
4419
Returned value:
Line -... Line 4420...
-
 
4420
  * eax = -1 on error
-
 
4421
 
-
 
4422
---------------------- Constants for registers: ----------------------
3952
  * eax = -1 on error
4423
  eax - SF_NETWORK_GET (74)
3953
 
4424
   bl - SSF_RESET_DEVICE (2)
3954
======================================================================
4425
======================================================================
3955
========== Function 74, Subfunction 3, Stop network device. ==========
4426
========== Function 74, Subfunction 3, Stop network device. ==========
3956
======================================================================
4427
======================================================================
3957
Parameters:
4428
Parameters:
3958
  * eax = 74 - function number
4429
  * eax = 74 - function number
3959
  * bl = 3 - subfunction number
4430
  * bl = 3 - subfunction number
3960
  * bh = device number
4431
  * bh = device number
Line -... Line 4432...
-
 
4432
Returned value:
-
 
4433
  * eax = -1 on error
-
 
4434
 
3961
Returned value:
4435
---------------------- Constants for registers: ----------------------
3962
  * eax = -1 on error
4436
  eax - SF_NETWORK_GET (74)
3963
 
4437
   bl - SSF_STOP_DEVICE (3)
3964
======================================================================
4438
======================================================================
3965
=========== Function 74, Subfunction 4, Get device pointer. ==========
4439
=========== Function 74, Subfunction 4, Get device pointer. ==========
3966
======================================================================
4440
======================================================================
3967
Parameters:
4441
Parameters:
3968
  * eax = 74 - function number
4442
  * eax = 74 - function number
3969
  * bl = 4 - subfunction number
4443
  * bl = 4 - subfunction number
Line -... Line 4444...
-
 
4444
  * bh = device number
-
 
4445
Returned value:
-
 
4446
  * eax = device pointer, -1 on error
3970
  * bh = device number
4447
 
3971
Returned value:
4448
---------------------- Constants for registers: ----------------------
3972
  * eax = device pointer, -1 on error
4449
  eax - SF_NETWORK_GET (74)
3973
 
4450
   bl - SSF_DEVICE_POINER (4)
3974
======================================================================
4451
======================================================================
3975
========= Function 74, Subfunction 6, Get packet TX counter. =========
4452
========= Function 74, Subfunction 6, Get packet TX counter. =========
3976
======================================================================
4453
======================================================================
3977
Parameters:
4454
Parameters:
3978
  * eax = 74 - function number
4455
  * eax = 74 - function number
Line -... Line 4456...
-
 
4456
  * bl = 6 - subfunction number
-
 
4457
  * bh = device number
-
 
4458
Returned value:
3979
  * bl = 6 - subfunction number
4459
  * eax = Number of packets sent since device start, -1 on error
3980
  * bh = device number
4460
 
3981
Returned value:
4461
---------------------- Constants for registers: ----------------------
3982
  * eax = Number of packets sent since device start, -1 on error
4462
  eax - SF_NETWORK_GET (74)
3983
 
4463
   bl - SSF_TX_PACKET_COUNT (6)
3984
======================================================================
4464
======================================================================
3985
========= Function 74, Subfunction 7, Get packet RX counter. =========
4465
========= Function 74, Subfunction 7, Get packet RX counter. =========
3986
======================================================================
4466
======================================================================
3987
Parameters:
4467
Parameters:
Line -... Line 4468...
-
 
4468
  * eax = 74 - function number
-
 
4469
  * bl = 7 - subfunction number
-
 
4470
  * bh = device number
3988
  * eax = 74 - function number
4471
Returned value:
3989
  * bl = 7 - subfunction number
4472
  * eax = Number of packets received since device start, -1 on error
3990
  * bh = device number
4473
 
3991
Returned value:
4474
---------------------- Constants for registers: ----------------------
3992
  * eax = Number of packets received since device start, -1 on error
4475
  eax - SF_NETWORK_GET (74)
Line 4001... Line 4484...
4001
Returned value:
4484
Returned value:
4002
  * eax = Number of bytes sent since device start (lower dword)
4485
  * eax = Number of bytes sent since device start (lower dword)
4003
                  -1 on error
4486
                  -1 on error
4004
  * ebx = Number of bytes sent since device start (higher dword)
4487
  * ebx = Number of bytes sent since device start (higher dword)
Line -... Line 4488...
-
 
4488
 
-
 
4489
---------------------- Constants for registers: ----------------------
-
 
4490
  eax - SF_NETWORK_GET (74)
4005
 
4491
   bl - SSF_TX_BYTE_COUNT (8)
4006
======================================================================
4492
======================================================================
4007
========== Function 74, Subfunction 9, Get RX byte counter. ==========
4493
========== Function 74, Subfunction 9, Get RX byte counter. ==========
4008
======================================================================
4494
======================================================================
4009
Parameters:
4495
Parameters:
Line 4013... Line 4499...
4013
Returned value:
4499
Returned value:
4014
  * eax = Number of bytes received since device start (lower dword)
4500
  * eax = Number of bytes received since device start (lower dword)
4015
                  -1 on error
4501
                  -1 on error
4016
  * ebx = Number of bytes received since device start (higher dword)
4502
  * ebx = Number of bytes received since device start (higher dword)
Line -... Line 4503...
-
 
4503
 
-
 
4504
---------------------- Constants for registers: ----------------------
-
 
4505
  eax - SF_NETWORK_GET (74)
4017
 
4506
   bl - SSF_RX_BYTE_COUNT (9)
4018
======================================================================
4507
======================================================================
4019
========== Function 74, Subfunction 10, Get link status. =============
4508
========== Function 74, Subfunction 10, Get link status. =============
4020
======================================================================
4509
======================================================================
4021
Parameters:
4510
Parameters:
Line 4031... Line 4520...
4031
    ETH_LINK_FD     =   10b         ; full duplex flag
4520
    ETH_LINK_FD     =   10b         ; full duplex flag
4032
    ETH_LINK_10M    =  100b         ; 10 mbit
4521
    ETH_LINK_10M    =  100b         ; 10 mbit
4033
    ETH_LINK_100M   = 1000b         ; 100 mbit
4522
    ETH_LINK_100M   = 1000b         ; 100 mbit
4034
    ETH_LINK_1G     = 1100b         ; gigabit
4523
    ETH_LINK_1G     = 1100b         ; gigabit
Line -... Line 4524...
-
 
4524
 
-
 
4525
---------------------- Constants for registers: ----------------------
-
 
4526
  eax - SF_NETWORK_GET (74)
4035
 
4527
   bl - SSF_LINK_STATUS (10)
4036
======================================================================
4528
======================================================================
4037
============== Function 75, Subfunction 0, Open socket. ==============
4529
============== Function 75, Subfunction 0, Open socket. ==============
4038
======================================================================
4530
======================================================================
4039
Parameters:
4531
Parameters:
Line 4044... Line 4536...
4044
  * esi = protocol
4536
  * esi = protocol
4045
Returned value:
4537
Returned value:
4046
  * eax = socket number, -1 on error
4538
  * eax = socket number, -1 on error
4047
  * ebx = errorcode
4539
  * ebx = errorcode
Line -... Line 4540...
-
 
4540
 
-
 
4541
---------------------- Constants for registers: ----------------------
-
 
4542
  eax - SF_NETWORK_SOCKET (75)
4048
 
4543
   bl - SSF_OPEN (0)
4049
======================================================================
4544
======================================================================
4050
============= Function 75, Subfunction 1, Close socket. ==============
4545
============= Function 75, Subfunction 1, Close socket. ==============
4051
======================================================================
4546
======================================================================
4052
Parameters:
4547
Parameters:
Line 4055... Line 4550...
4055
  * ecx = socket number
4550
  * ecx = socket number
4056
Returned value:
4551
Returned value:
4057
  * eax = -1 on error
4552
  * eax = -1 on error
4058
  * ebx = errorcode
4553
  * ebx = errorcode
Line -... Line 4554...
-
 
4554
 
-
 
4555
---------------------- Constants for registers: ----------------------
-
 
4556
  eax - SF_NETWORK_SOCKET (75)
4059
 
4557
   bl - SSF_CLOSE (1)
4060
======================================================================
4558
======================================================================
4061
================== Function 75, Subfunction 2, Bind. =================
4559
================== Function 75, Subfunction 2, Bind. =================
4062
======================================================================
4560
======================================================================
4063
Parameters:
4561
Parameters:
Line 4068... Line 4566...
4068
  * esi = length of sockaddr structure
4566
  * esi = length of sockaddr structure
4069
Returned value:
4567
Returned value:
4070
  * eax = -1 on error
4568
  * eax = -1 on error
4071
  * ebx = errorcode
4569
  * ebx = errorcode
Line -... Line 4570...
-
 
4570
 
-
 
4571
---------------------- Constants for registers: ----------------------
-
 
4572
  eax - SF_NETWORK_SOCKET (75)
4072
 
4573
   bl - SSF_BIND (2)
4073
======================================================================
4574
======================================================================
4074
================= Function 75, Subfunction 3, Listen. ================
4575
================= Function 75, Subfunction 3, Listen. ================
4075
======================================================================
4576
======================================================================
4076
Parameters:
4577
Parameters:
Line 4080... Line 4581...
4080
  * edx = backlog
4581
  * edx = backlog
4081
Returned value:
4582
Returned value:
4082
  * eax = -1 on error
4583
  * eax = -1 on error
4083
  * ebx = errorcode
4584
  * ebx = errorcode
Line -... Line 4585...
-
 
4585
 
-
 
4586
---------------------- Constants for registers: ----------------------
-
 
4587
  eax - SF_NETWORK_SOCKET (75)
4084
 
4588
   bl - SSF_LISTEN (3)
4085
======================================================================
4589
======================================================================
4086
================ Function 75, Subfunction 4, Connect. ================
4590
================ Function 75, Subfunction 4, Connect. ================
4087
======================================================================
4591
======================================================================
4088
Parameters:
4592
Parameters:
Line 4093... Line 4597...
4093
  * esi = length of sockaddr structure
4597
  * esi = length of sockaddr structure
4094
Returned value:
4598
Returned value:
4095
  * eax = -1 on error
4599
  * eax = -1 on error
4096
  * ebx = errorcode
4600
  * ebx = errorcode
Line -... Line 4601...
-
 
4601
 
-
 
4602
---------------------- Constants for registers: ----------------------
-
 
4603
  eax - SF_NETWORK_SOCKET (75)
4097
 
4604
   bl - SSF_CONNECT (4)
4098
======================================================================
4605
======================================================================
4099
================= Function 75, Subfunction 5, Accept. ================
4606
================= Function 75, Subfunction 5, Accept. ================
4100
======================================================================
4607
======================================================================
4101
Parameters:
4608
Parameters:
Line 4106... Line 4613...
4106
  * esi = length of sockaddr structure
4613
  * esi = length of sockaddr structure
4107
Returned value:
4614
Returned value:
4108
  * eax = socket number of accepted socket, -1 on error
4615
  * eax = socket number of accepted socket, -1 on error
4109
  * ebx = errorcode
4616
  * ebx = errorcode
Line -... Line 4617...
-
 
4617
 
-
 
4618
---------------------- Constants for registers: ----------------------
-
 
4619
  eax - SF_NETWORK_SOCKET (75)
4110
 
4620
   bl - SSF_ACCEPT (5)
4111
======================================================================
4621
======================================================================
4112
================== Function 75, Subfunction 6, Send. =================
4622
================== Function 75, Subfunction 6, Send. =================
4113
======================================================================
4623
======================================================================
4114
Parameters:
4624
Parameters:
Line 4120... Line 4630...
4120
  * edi = flags
4630
  * edi = flags
4121
Returned value:
4631
Returned value:
4122
  * eax = number of bytes copied, -1 on error
4632
  * eax = number of bytes copied, -1 on error
4123
  * ebx = errorcode
4633
  * ebx = errorcode
Line -... Line 4634...
-
 
4634
 
-
 
4635
---------------------- Constants for registers: ----------------------
-
 
4636
  eax - SF_NETWORK_SOCKET (75)
4124
 
4637
   bl - SSF_SEND (6)
4125
======================================================================
4638
======================================================================
4126
================ Function 75, Subfunction 7, Receive. ================
4639
================ Function 75, Subfunction 7, Receive. ================
4127
======================================================================
4640
======================================================================
4128
Parameters:
4641
Parameters:
Line 4134... Line 4647...
4134
  * edi = flags
4647
  * edi = flags
4135
Returned value:
4648
Returned value:
4136
  * eax = number of bytes copied, -1 on error
4649
  * eax = number of bytes copied, -1 on error
4137
  * ebx = errorcode
4650
  * ebx = errorcode
Line -... Line 4651...
-
 
4651
 
-
 
4652
---------------------- Constants for registers: ----------------------
-
 
4653
  eax - SF_NETWORK_SOCKET (75)
4138
 
4654
   bl - SSF_RECEIVE (7)
4139
======================================================================
4655
======================================================================
4140
=========== Function 75, Subfunction 8, Set socket options. ==========
4656
=========== Function 75, Subfunction 8, Set socket options. ==========
4141
======================================================================
4657
======================================================================
4142
Parameters:
4658
Parameters:
Line 4153... Line 4669...
4153
    dd level
4669
    dd level
4154
    dd optionname
4670
    dd optionname
4155
    dd optlength
4671
    dd optlength
4156
    db options...
4672
    db options...
Line -... Line 4673...
-
 
4673
 
-
 
4674
---------------------- Constants for registers: ----------------------
-
 
4675
  eax - SF_NETWORK_SOCKET (75)
4157
 
4676
   bl - SSF_SET_OPTIONS (8)
4158
======================================================================
4677
======================================================================
4159
=========== Function 75, Subfunction 9, Get socket options. ==========
4678
=========== Function 75, Subfunction 9, Get socket options. ==========
4160
======================================================================
4679
======================================================================
4161
Parameters:
4680
Parameters:
Line 4172... Line 4691...
4172
    dd level
4691
    dd level
4173
    dd optionname
4692
    dd optionname
4174
    dd optlength
4693
    dd optlength
4175
    db options...
4694
    db options...
Line -... Line 4695...
-
 
4695
 
-
 
4696
---------------------- Constants for registers: ----------------------
-
 
4697
  eax - SF_NETWORK_SOCKET (75)
4176
 
4698
   bl - SSF_GET_OPTIONS (9)
4177
======================================================================
4699
======================================================================
4178
============ Function 75, Subfunction 10, Get socketpair. ===========
4700
============ Function 75, Subfunction 10, Get socketpair. ===========
4179
======================================================================
4701
======================================================================
4180
Parameters:
4702
Parameters:
4181
  * eax = 75 - function number
4703
  * eax = 75 - function number
4182
  * bl = 10 - subfunction number
4704
  * bl = 10 - subfunction number
4183
Returned value:
4705
Returned value:
4184
  * eax = socketnum1, -1 on error
4706
  * eax = socketnum1, -1 on error
Line -... Line 4707...
-
 
4707
  * ebx = socketnum2, errorcode on error
-
 
4708
 
-
 
4709
---------------------- Constants for registers: ----------------------
4185
  * ebx = socketnum2, errorcode on error
4710
  eax - SF_NETWORK_SOCKET (75)
4186
  
4711
   bl - SSF_GET_PAIR (10)
4187
======================================================================
4712
======================================================================
4188
============ Function 76, Network options and statistics. ============
4713
============ Function 76, Network options and statistics. ============
4189
======================================================================
4714
======================================================================
Line 4229... Line 4754...
4229
        4 - Add static ARP entry
4754
        4 - Add static ARP entry
4230
        5 - Remove ARP entry (-1 = remove all)
4755
        5 - Remove ARP entry (-1 = remove all)
4231
        6 - Send ARP announce on specified interface
4756
        6 - Send ARP announce on specified interface
4232
        7 - Read # ARP conflicts (IP address conflicts) 
4757
        7 - Read # ARP conflicts (IP address conflicts) 
Line -... Line 4758...
-
 
4758
 
-
 
4759
---------------------- Constants for registers: ----------------------
4233
 
4760
  eax - SF_NETWORK_PROTOCOL (76)
4234
======================================================================
4761
======================================================================
4235
=============== Function -1 - terminate thread/process ===============
4762
=============== Function -1 - terminate thread/process ===============
4236
======================================================================
4763
======================================================================
4237
Parameters:
4764
Parameters: