Rev 486 | Rev 521 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 486 | Rev 499 | ||
---|---|---|---|
Line 491... | Line 491... | ||
491 | * ecx = width of the image |
491 | * ecx = width of the image |
492 | * edx = height of the image |
492 | * edx = height of the image |
493 | Returned value: |
493 | Returned value: |
494 | * function does not return value |
494 | * function does not return value |
495 | Remarks: |
495 | Remarks: |
496 | * Before calling functions 15.2 and 15.5 you should call this function |
496 | * Before calling subfunctions 2 and 5 you should call this function |
497 | to set image size! |
497 | to set image size! |
498 | * For update of the screen (after completion of a series of commands |
498 | * For update of the screen (after completion of a series of commands |
499 | working with a background) call subfunction 3. |
499 | working with a background) call subfunction 3. |
500 | * There is a pair function for get size of the background image - |
500 | * There is a pair function for get size of the background image - |
501 | subfunction 1 of function 39. |
501 | subfunction 1 of function 39. |
Line 511... | Line 511... | ||
511 | Returned value: |
511 | Returned value: |
512 | * function does not return value |
512 | * function does not return value |
513 | Remarks: |
513 | Remarks: |
514 | * Offset for a pixel with coordinates (x,y) is calculated as |
514 | * Offset for a pixel with coordinates (x,y) is calculated as |
515 | (x+y*xsize)*3. |
515 | (x+y*xsize)*3. |
516 | * If the given offset exceeds size sets by function 15.1, |
516 | * If the given offset exceeds size set by subfunction 1, |
517 | the call is ignored. |
517 | the call is ignored. |
518 | * For update of the screen (after completion of a series of commands |
518 | * For update of the screen (after completion of a series of commands |
519 | working with a background) call subfunction 3. |
519 | working with a background) call subfunction 3. |
520 | * There is a pair function for get pixel on the background image - |
520 | * There is a pair function for get pixel on the background image - |
521 | subfunction 2 of function 39. |
521 | subfunction 2 of function 39. |
Line 557... | Line 557... | ||
557 | * edx = offset in data of the background image |
557 | * edx = offset in data of the background image |
558 | * esi = size of data in bytes = 3 * number of pixels |
558 | * esi = size of data in bytes = 3 * number of pixels |
559 | Returned value: |
559 | Returned value: |
560 | * function does not return value |
560 | * function does not return value |
561 | Remarks: |
561 | Remarks: |
562 | * If the block gets out abroad size sets by function 15.1, |
562 | * Offset and size are not checked for correctness. |
563 | the call is ignored. |
- | |
564 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
563 | * Color of each pixel is stored as 3-bytes value BBGGRR. |
565 | * Pixels of the background image are written sequentially |
564 | * Pixels of the background image are written sequentially |
566 | from left to right, from up to down. |
565 | from left to right, from up to down. |
567 | * 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. |
568 | * 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 |
Line 672... | Line 671... | ||
672 | * ecx = pointer to the full path to file |
671 | * ecx = pointer to the full path to file |
673 | (for example, "/hd0/1/kolibri/kolibri.img") |
672 | (for example, "/hd0/1/kolibri/kolibri.img") |
674 | Returned value: |
673 | Returned value: |
675 | * eax = 0 - success |
674 | * eax = 0 - success |
676 | * else eax = error code of the file system |
675 | * else eax = error code of the file system |
677 | ³àìå÷àíèÿ: |
676 | Remarks: |
678 | * All folders in the given path must exist, otherwise function |
677 | * All folders in the given path must exist, otherwise function |
679 | returns value 5, "file not found". |
678 | returns value 5, "file not found". |
Line 680... | Line 679... | ||
680 | 679 | ||
681 | ====================================================================== |
680 | ====================================================================== |
Line 1412... | Line 1411... | ||
1412 | * eax = 24 - function number |
1411 | * eax = 24 - function number |
1413 | * ebx = 1 - subfunction number |
1412 | * ebx = 1 - subfunction number |
1414 | Returned value: |
1413 | Returned value: |
1415 | * eax = 0 - success |
1414 | * eax = 0 - success |
1416 | * eax = 1 - CD base is not defined |
1415 | * eax = 1 - CD base is not defined |
1417 | ³àìå÷àíèÿ: |
1416 | Remarks: |
1418 | * Previously CD base port must be defined by call to |
1417 | * Previously CD base port must be defined by call to |
1419 | subfunction 3 of function 21. |
1418 | subfunction 3 of function 21. |
Line 1420... | Line 1419... | ||
1420 | 1419 | ||
1421 | ====================================================================== |
1420 | ====================================================================== |
Line 1795... | Line 1794... | ||
1795 | (with the call to subfunction 4). The function does not delete |
1794 | (with the call to subfunction 4). The function does not delete |
1796 | system cursors and cursors, loaded by another applications. |
1795 | system cursors and cursors, loaded by another applications. |
1797 | * If the active cursor (set by subfunction 5) is deleted, |
1796 | * If the active cursor (set by subfunction 5) is deleted, |
1798 | the system restores the default cursor (standard arrow). |
1797 | the system restores the default cursor (standard arrow). |
Line 1799... | Line 1798... | ||
1799 | 1798 | ||
1800 | ------------------- Subfunction 7 - get scroll data -------------------- |
1799 | ------------------ Subfunction 7 - get scroll data ------------------- |
1801 | Parameters: |
1800 | Parameters: |
1802 | * eax = 37 - function number |
1801 | * eax = 37 - function number |
1803 | * ebx = 7 - subfunction number |
1802 | * ebx = 7 - subfunction number |
1804 | Returned value: |
1803 | Returned value: |
1805 | * eax = horizontal_offset*65536 + vertical_offset |
1804 | * eax = [horizontal offset]*65536 + [vertical offset] |
1806 | Remarks: |
1805 | Remarks: |
1807 | * Scroll data is available for active window only |
1806 | * Scroll data is available for active window only. |
1808 | * Values are zeroized after reading |
1807 | * Values are zeroed after reading. |
Line 1809... | Line 1808... | ||
1809 | * Values ara signed |
1808 | * Values are signed. |
1810 | 1809 | ||
1811 | ====================================================================== |
1810 | ====================================================================== |
1812 | ====================== Function 38 - draw line. ====================== |
1811 | ====================== Function 38 - draw line. ====================== |
Line 2040... | Line 2039... | ||
2040 | * bl = 0 - ecx contains number |
2039 | * bl = 0 - ecx contains number |
2041 | * bl = 1 - ecx contains pointer to dword-number |
2040 | * bl = 1 - ecx contains pointer to dword-number |
2042 | * bh = 0 - display in decimal number system |
2041 | * bh = 0 - display in decimal number system |
2043 | * bh = 1 - display in hexadecimal system |
2042 | * bh = 1 - display in hexadecimal system |
2044 | * bh = 2 - display in binary system |
2043 | * bh = 2 - display in binary system |
2045 | * áèòv 16-21 = how many digits to display |
2044 | * bits 16-21 = how many digits to display |
2046 | * áèòv 22-31 reserved and must be set to 0 |
2045 | * bits 22-31 reserved and must be set to 0 |
2047 | * ecx = number (if bl=0) or pointer (if bl=1) |
2046 | * ecx = number (if bl=0) or pointer (if bl=1) |
2048 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2047 | * edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
2049 | * esi = 0xX0RRGGBB: |
2048 | * esi = 0xX0RRGGBB: |
2050 | * RR, GG, BB specify the color |
2049 | * RR, GG, BB specify the color |
2051 | * X = ABnn (bits) |
2050 | * X = ABnn (bits) |
Line 2891... | Line 2890... | ||
2891 | '/rd/1/kernel.asm',0 |
2890 | '/rd/1/kernel.asm',0 |
2892 | * '/HD0/1/kernel.asm',0 |
2891 | * '/HD0/1/kernel.asm',0 |
2893 | * '/hd0/1/menuet/pics/tanzania.bmp',0 |
2892 | * '/hd0/1/menuet/pics/tanzania.bmp',0 |
2894 | Existing subfunctions: |
2893 | Existing subfunctions: |
2895 | * subfunction 0 - read file/folder |
2894 | * subfunction 0 - read file/folder |
2896 | * subfunction 1 - rewrite file |
- | |
2897 | * subfunction 8 - LBA-read from device |
2895 | * subfunction 8 - LBA-read from device |
2898 | * subfunction 15 - get file system information |
2896 | * subfunction 15 - get file system information |
Line 2899... | Line 2897... | ||
2899 | 2897 | ||
2900 | ====================================================================== |
2898 | ====================================================================== |
Line 2958... | Line 2956... | ||
2958 | is not described. To obtain the information about the equipment |
2956 | is not described. To obtain the information about the equipment |
2959 | use subfunction 11 of function 18 or |
2957 | use subfunction 11 of function 18 or |
2960 | read corresponding folder with subfunction 1 of function 70. |
2958 | read corresponding folder with subfunction 1 of function 70. |
Line 2961... | Line 2959... | ||
2961 | 2959 | ||
2962 | ====================================================================== |
- | |
2963 | ============= Function 58, subfunction 1 - rewrite file. ============= |
- | |
2964 | ====================================================================== |
- | |
2965 | If the file does not exist, it is created. |
- | |
2966 | If the file exists, it is rewritten. |
- | |
2967 | Parameters: |
- | |
2968 | * eax = 58 - function number |
- | |
2969 | * ebx = pointer to the information structure |
- | |
2970 | Format of the information structure: |
- | |
2971 | * +0: dword: 1 = subfunction number |
- | |
2972 | * +4: dword: ignored (set to 0) |
- | |
2973 | * +8: dword: number of bytes to write |
- | |
2974 | * +12 = +0xC: dword: pointer to data to write |
- | |
2975 | * +16 = +0x10: dword: pointer to buffer for system operations |
- | |
2976 | (4096 bytes) |
- | |
2977 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
- | |
2978 | given in the general description |
- | |
2979 | Returned value: |
- | |
2980 | * eax = 0 - success, otherwise file system error code |
- | |
2981 | * ebx destroyed |
- | |
2982 | Remarks: |
- | |
2983 | * This function is obsolete, use subfunction 2 of function 70. |
- | |
2984 | - | ||
2985 | ====================================================================== |
2960 | ====================================================================== |
2986 | ========= Function 58, subfunction 8 - LBA-read from device. ========= |
2961 | ========= Function 58, subfunction 8 - LBA-read from device. ========= |
2987 | ====================================================================== |
2962 | ====================================================================== |
2988 | Parameters: |
2963 | Parameters: |
2989 | * eax = 58 - function number |
2964 | * eax = 58 - function number |
Line 3295... | Line 3270... | ||
3295 | 3270 | ||
3296 | ====================================================================== |
3271 | ====================================================================== |
3297 | ============== Function 63 - work with the debug board. ============== |
3272 | ============== Function 63 - work with the debug board. ============== |
3298 | ====================================================================== |
3273 | ====================================================================== |
3299 | The debug board is the global system buffer (with the size |
3274 | The debug board is the global system buffer (with the size |
3300 | 4096 bytes), to which any program can write (generally speaking, |
3275 | 1024 bytes), to which any program can write (generally speaking, |
3301 | arbitrary) data and from which other program can read these data. |
3276 | arbitrary) data and from which other program can read these data. |
3302 | By the agreement written data are text strings interpreted as |
3277 | By the agreement written data are text strings interpreted as |
3303 | debug messages on a course of program execution. The kernel in |
3278 | debug messages on a course of program execution. The kernel in |
3304 | some situations also writes to the debug board information on |
3279 | some situations also writes to the debug board information on |
Line 3571... | Line 3546... | ||
3571 | * ebx = 4 - subfunction number |
3546 | * ebx = 4 - subfunction number |
3572 | * ecx is ignored |
3547 | * ecx is ignored |
3573 | * edx = MSR address |
3548 | * edx = MSR address |
3574 | * esi:edi = high:low dword |
3549 | * esi:edi = high:low dword |
3575 | Returned value: |
3550 | Returned value: |
3576 | * ebx:eax = copy of esi:edi |
3551 | * function does not return value |
3577 | ³àìå÷àíèÿ: |
3552 | Remarks: |
3578 | * If ecx contains nonexistent or not implemented for this processor |
3553 | * If ecx contains nonexistent or not implemented for this processor |
3579 | MSR, processor will generate an exception in the kernel, which |
3554 | MSR, processor will generate an exception in the kernel, which |
3580 | will kill the thread. |
3555 | will kill the thread. |
3581 | * Previously it is necessary to check, whether MSRs are supported |
3556 | * Previously it is necessary to check, whether MSRs are supported |
3582 | as a whole, with the instruction 'cpuid'. Otherwise processor |
3557 | as a whole, with the instruction 'cpuid'. Otherwise processor |
Line 3771... | Line 3746... | ||
3771 | When debugger terminates, all debugged processes are killed. |
3746 | When debugger terminates, all debugged processes are killed. |
3772 | If debugger does not want this, it must previously detach by |
3747 | If debugger does not want this, it must previously detach by |
3773 | subfunction 3. |
3748 | subfunction 3. |
Line 3774... | Line 3749... | ||
3774 | 3749 | ||
3775 | All subfunctions are applicable only to processes/threads started |
3750 | All subfunctions are applicable only to processes/threads started |
3776 | from the current by function 58 or 70 with set debugging flag. |
3751 | from the current by function 70 with set debugging flag. |
3777 | Debugging of multithreaded programs is not supported yet. |
3752 | Debugging of multithreaded programs is not supported yet. |
3778 | The full list of subfunctions: |
3753 | The full list of subfunctions: |
3779 | * subfunction 0 - define data area for debug messages |
3754 | * subfunction 0 - define data area for debug messages |
3780 | * subfunction 1 - get contents of registers of debugged thread |
3755 | * subfunction 1 - get contents of registers of debugged thread |