Rev 540 | Rev 549 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 540 | Rev 546 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | SYSTEM FUNCTIONS of OS Kolibri 0.6.5.0 |
1 | SYSTEM FUNCTIONS of OS Kolibri 0.7.0.0 |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | Number of the function is located in the register eax. |
3 | Number of the function is located in the register eax. |
4 | The call of the system function is executed by "int 0x40" command. |
4 | The call of the system function is executed by "int 0x40" command. |
5 | All registers except explicitly declared in the returned value, |
5 | All registers except explicitly declared in the returned value, |
Line 566... | Line 566... | ||
566 | * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. |
566 | * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. |
567 | * For update of the screen (after completion of a series of commands |
567 | * For update of the screen (after completion of a series of commands |
568 | working with a background) call subfunction 3. |
568 | working with a background) call subfunction 3. |
Line 569... | Line 569... | ||
569 | 569 | ||
- | 570 | ====================================================================== |
|
- | 571 | ===================== Function 15, subfunction 6 ===================== |
|
- | 572 | ======== Map background data to the address space of process. ======== |
|
- | 573 | ====================================================================== |
|
- | 574 | Parameters: |
|
- | 575 | * eax = 15 - function number |
|
- | 576 | * ebx = 6 - subfunction number |
|
- | 577 | Returned value: |
|
- | 578 | * eax = pointer to background data, 0 if error |
|
- | 579 | Remarks: |
|
- | 580 | * Mapped data are available for read and write. |
|
- | 581 | * Size of background data is 3*xsize*ysize. The system blocks |
|
- | 582 | changes of background sizes while process works with mapped data. |
|
- | 583 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
|
- | 584 | * Pixels of the background image are written sequentially |
|
- | 585 | from left to right, from up to down. |
|
- | 586 | ||
- | 587 | ====================================================================== |
|
- | 588 | ===== Function 15, subfunction 7 - close mapped background data. ===== |
|
- | 589 | ====================================================================== |
|
- | 590 | Parameters: |
|
- | 591 | * eax = 15 - function number |
|
- | 592 | * ebx = 7 - subfunction number |
|
- | 593 | * ecx = pointer to mapped data |
|
- | 594 | Returned value: |
|
- | 595 | * eax = 1 - success, 0 - error |
|
- | 596 | ||
570 | ====================================================================== |
597 | ====================================================================== |
571 | =============== Function 16 - save ramdisk on a floppy. ============== |
598 | =============== Function 16 - save ramdisk on a floppy. ============== |
572 | ====================================================================== |
599 | ====================================================================== |
573 | Parameters: |
600 | Parameters: |
574 | * eax = 16 - function number |
601 | * eax = 16 - function number |
Line 4023... | Line 4050... | ||
4023 | x - partition number on the selected hard drive, varies from 1 |
4050 | x - partition number on the selected hard drive, varies from 1 |
4024 | to 255 (on each hard drive the indexing starts from 1) |
4051 | to 255 (on each hard drive the indexing starts from 1) |
4025 | * /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to |
4052 | * /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to |
4026 | CD on IDE0 (Primary Master), IDE1 (Primary Slave), |
4053 | CD on IDE0 (Primary Master), IDE1 (Primary Slave), |
4027 | IDE2 (Secondary Master), IDE3 (Secondary Slave) |
4054 | IDE2 (Secondary Master), IDE3 (Secondary Slave) |
- | 4055 | * /SYS means system folder; with the usual boot (from floppy) |
|
- | 4056 | is equivalent to /RD/1 |
|
4028 | Examples: |
4057 | Examples: |
4029 | * '/rd/1/kernel.asm',0 |
4058 | * '/rd/1/kernel.asm',0 |
4030 | * '/HD0/1/kernel.asm',0 |
4059 | * '/HD0/1/kernel.asm',0 |
4031 | * '/hd0/2/menuet/pics/tanzania.bmp',0 |
4060 | * '/hd0/2/menuet/pics/tanzania.bmp',0 |
4032 | * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
4061 | * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
- | 4062 | * '/sys/MySuperApp.ini',0 |
|
4033 | Available subfunctions: |
4063 | Available subfunctions: |
4034 | * subfunction 0 - read file |
4064 | * subfunction 0 - read file |
4035 | * subfunction 1 - read folder |
4065 | * subfunction 1 - read folder |
4036 | * subfunction 2 - create/rewrite file |
4066 | * subfunction 2 - create/rewrite file |
4037 | * subfunction 3 - write to existing file |
4067 | * subfunction 3 - write to existing file |