/kernel/trunk/core/syscall.inc |
---|
154,7 → 154,7 |
dd undefined_syscall ; 31-reserved |
dd undefined_syscall ; 32-reserved |
dd undefined_syscall ; 33-reserved |
dd undefined_syscall ; 34-reserved |
dd syscall_getpixel_WinMap ; 34-GetPixel WinMap |
dd syscall_getpixel ; 35-GetPixel |
dd syscall_getarea ; 36-GetArea |
dd readmousepos ; 37-GetMousePosition_ScreenRelative,. |
/kernel/trunk/docs/sysfuncr.txt |
---|
1724,6 → 1724,19 |
த¨â¥«ï. |
====================================================================== |
========= ãªæ¨ï 34 - 㧠âì ª®¬ã ¯à¨ ¤«¥¦¨â â®çª íªà . ========= |
====================================================================== |
à ¬¥âàë: |
* eax = 34 - ®¬¥à äãªæ¨¨ |
* ebx = x-ª®®à¤¨ â (®â®á¨â¥«ì® íªà ) |
* ecx = y-ª®®à¤¨ â (®â®á¨â¥«ì® íªà ) |
®§¢à é ¥¬®¥ § 票¥: |
* eax = 0x000000XX - â®çª ¯à¨ ¤«¥¦¨â á«®âã ®ª N |
ਠ¥ª®à४âëå § 票ïå ebx ¨ ecx äãªæ¨ï ¢®§¢à é ¥â 0 |
* ãªæ¨ï ¡¥à¥â § ç¥¨ï ¨§ ®¡« á⨠[_WinMapAddress] |
====================================================================== |
============ ãªæ¨ï 35 - ¯à®ç¨â âì 梥â â®çª¨ íªà ¥. ============ |
====================================================================== |
à ¬¥âàë: |
/kernel/trunk/docs/sysfuncs.txt |
---|
1702,6 → 1702,19 |
from the parent. |
====================================================================== |
========= Function 34 - who owner the pixel on the screen. =========== |
====================================================================== |
Parameters: |
* eax = 34 - function number |
* ebx = x-coordinate (relative to the display) |
* ecx = y-coordinate (relative to the display) |
Returned value: |
* eax = 0x000000XX - owner of pixel the slot window N |
If incorrect values ebx and ecx then function returns 0 |
* The function takes the value from the area [_WinMapAddress] |
====================================================================== |
======= Function 35 - read the color of a pixel on the screen. ======= |
====================================================================== |
Parameters: |
/kernel/trunk/kernel.asm |
---|
4672,9 → 4672,28 |
call .free |
; pop eax |
ret |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel_WinMap: ; GetPixel WinMap |
cmp ebx, [Screen_Max_X] |
jbe @f |
cmp ecx, [Screen_Max_Y] |
jbe @f |
xor eax, eax |
jmp .store |
;-------------------------------------- |
align 4 |
@@: |
mov eax, [d_width_calc_area + ecx*4] |
add eax, [_WinMapAddress] |
movzx eax, byte[eax+ebx] ; get value for current point |
;-------------------------------------- |
align 4 |
.store: |
mov [esp + 32], eax |
ret |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel: ; GetPixel |
mov ecx, [Screen_Max_X] |
inc ecx |