Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 996 → Rev 995

/kernel/branches/kolibri_pe/blkdev/hd_drv.inc
478,10 → 478,10
ret
 
iglobal
align 8
align 4
; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary
IDE_descriptor_table:
dd IDE_DMA+(0x100000000-OS_BASE)
dd IDE_DMA
dw 0x2000
dw 0x8000
 
579,7 → 579,7
mov eax, [esp+4]
sub eax, [dma_cur_sector]
shl eax, 9
add eax, IDE_DMA
add eax, (OS_BASE+IDE_DMA)
push ecx esi edi
mov esi, eax
shl edi, 9
598,7 → 598,7
ret
.notread:
mov eax, IDE_descriptor_table
mov dword [eax], IDE_DMA+(0x100000000-OS_BASE)
mov dword [eax], IDE_DMA
mov word [eax+4], 0x2000
sub eax, OS_BASE
mov dx, [IDEContrRegsBaseAddr]
694,8 → 694,8
shl esi, 9
call calculate_cache_2
add esi,eax
mov edi, IDE_DMA
mov dword [edx], IDE_DMA+(0x100000000-OS_BASE)
mov edi, (OS_BASE+IDE_DMA)
mov dword [edx], IDE_DMA
movzx ecx, [cache_chain_size]
shl ecx, 9
mov word [edx+4], cx
/kernel/branches/kolibri_pe/blkdev/cd_drv.inc
14,7 → 14,7
; Àâòîð ÷àñòè èñõîäíîãî òåêñòà Êóëàêîâ Âëàäèìèð Ãåííàäüåâè÷
; Àäàïòàöèÿ, äîðàáîòêà è ðàçðàáîòêà Mario79
 
; Ìàêñèìàëüíîå êîëè÷åñòâî ïîâòîðåíèé îïåðàöèè ÷òåíè
; Ìàêñèìàëüíîå êîëè÷åñòâî ïîâòîðåíèé îïåðàöèè ÷òåíèÿ
MaxRetr equ 10
; Ïðåäåëüíîå âðåìÿ îæèäàíèÿ ãîòîâíîñòè ê ïðèåìó êîìàíäû
; (â òèêàõ)
38,7 → 38,7
mov [CDBlockSize],2048 ;2352
; Î÷èñòèòü áóôåð ïàêåòíîé êîìàíäû
call clear_packet_buffer
; Ñôîðìèðîâàòü ïàêåòíóþ êîìàíäó äëÿ ñ÷èòûâàíè
; Ñôîðìèðîâàòü ïàêåòíóþ êîìàíäó äëÿ ñ÷èòûâàíèÿ
; ñåêòîðà äàííûõ
; Çàäàòü êîä êîìàíäû Read CD
mov [PacketCommand],byte 0x28 ;0xBE
168,6 → 168,7
; Îáëàñòü ïàìÿòè äëÿ ôîðìèðîâàíèÿ ïàêåòíîé êîìàíäû
PacketCommand: rb 12 ;DB 12 DUP (?)
; Îáëàñòü ïàìÿòè äëÿ ïðèåìà äàííûõ îò äèñêîâîäà
;CDDataBuf DB 4096 DUP (0)
; Ðàçìåð ïðèíèìàåìîãî áëîêà äàííûõ â áàéòàõ
CDBlockSize DW ?
; Àäðåñ ñ÷èòûâàåìîãî ñåêòîðà äàííûõ
176,7 → 177,7
TickCounter_1 DD 0
; Âðåìÿ íà÷àëà îæèäàíèÿ ãîòîâíîñòè óñòðîéñòâà
WURStartTime DD 0
; óêàçàòåëü áóôåðà äëÿ ñ÷èòûâàíè
; óêàçàòåëü áóôåðà äëÿ ñ÷èòûâàíèÿ
CDDataBuf_pointer dd 0
 
;****************************************************
341,7 → 342,7
add DX,7 ;ïîðò 1õ7h
@@WaitDevice0_1:
call change_task
; Ïðîâåðèòü âðåìÿ îæèäàíè
; Ïðîâåðèòü âðåìÿ îæèäàíèÿ
mov EAX,[timer_ticks]
sub EAX,[TickCounter_1]
cmp EAX,BSYWaitTime
463,12 → 464,12
jmp .test
@@:
call change_task
; Ïðîâåðèòü âðåìÿ îæèäàíè
; Ïðîâåðèòü âðåìÿ îæèäàíèÿ
mov eax,[timer_ticks]
sub eax,[TickCounter_1]
cmp eax,BSYWaitTime ;300 ;îæèäàòü 3 ñåê.
ja @@Err1_4 ;îøèáêà òàéì-àóòà
; Ïðî÷èòàòü ðåãèñòð ñîñòîÿíè
; Ïðî÷èòàòü ðåãèñòð ñîñòîÿíèÿ
.test:
in AL,DX
; Ïðîâåðèòü ñîñòîÿíèå ñèãíàëà BSY
644,7 → 645,7
; Ñôîðìèðîâàòü êîìàíäó START/STOP UNIT
; Çàäàòü êîä êîìàíäû
mov [PacketCommand],word 1Bh
; Çàäàòü îïåðàöèþ çàãðóçêè íîñèòåë
; Çàäàòü îïåðàöèþ çàãðóçêè íîñèòåëÿ
mov [PacketCommand+4],word 00000011b
; Ïîäàòü êîìàíäó
call SendPacketNoDatCommand
665,7 → 666,7
; Ñôîðìèðîâàòü êîìàíäó START/STOP UNIT
; Çàäàòü êîä êîìàíäû
mov [PacketCommand],word 1Bh
; Çàäàòü îïåðàöèþ èçâëå÷åíèÿ íîñèòåë
; Çàäàòü îïåðàöèþ èçâëå÷åíèÿ íîñèòåëÿ
mov [PacketCommand+4],word 00000010b
; Ïîäàòü êîìàíäó
call SendPacketNoDatCommand
/kernel/branches/kolibri_pe/const.inc
208,35 → 208,68
OS_BASE equ 0xE0000000
IMAGE_BASE equ (OS_BASE+LOAD_BASE)
 
BOOT_VAR equ OS_BASE
window_data equ OS_BASE
 
SB16Buffer equ (OS_BASE+0x10000)
CURRENT_TASK equ (OS_BASE+0x0003000)
TASK_COUNT equ (OS_BASE+0x0003004)
TASK_BASE equ (OS_BASE+0x0003010)
TASK_DATA equ (OS_BASE+0x0003020)
TASK_EVENT equ (OS_BASE+0x0003020)
 
TASK_COUNT equ (CURRENT_TASK+0x04)
TASK_BASE equ (CURRENT_TASK+0x10)
TASK_DATA equ (CURRENT_TASK+0x20)
TASK_EVENT equ (CURRENT_TASK+0x20)
mouseunder equ (OS_BASE+0x0006900)
CDDataBuf equ (OS_BASE+0x0007000)
FLOPPY_BUFF equ (OS_BASE+0x0008000)
ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused
 
WIN_STACK equ (OS_BASE+0x000C000)
WIN_POS equ (OS_BASE+0x000C400)
FDD_BUFF equ (OS_BASE+0x000D000)
 
DRIVE_DATA equ (OS_BASE+0x0070000)
 
SLOT_BASE equ (OS_BASE+0x0080000)
 
VGABasePtr equ (OS_BASE+0x00A0000)
 
IRQ_SAVE equ (OS_BASE+0x0190000)
RAMDISK_FAT equ (OS_BASE+0x0180000)
FLOPPY_FAT equ (OS_BASE+0x0182000)
 
stack_data_start equ (OS_BASE+0x01A0000)
eth_data_start equ (OS_BASE+0x01A0000)
stack_data equ (OS_BASE+0x01A4000)
stack_data_end equ (OS_BASE+0x01Bffff)
resendQ equ (OS_BASE+0x01C0000)
IDE_DMA equ 0x184000
 
virtual at (OS_BASE+0x01C8F80)
BgrAuxTable equ (OS_BASE+0x0198000)
; unused?
SB16Buffer equ (OS_BASE+0x01A0000)
SB16_Status equ (OS_BASE+0x01B0000)
 
BUTTON_INFO equ (OS_BASE+0x01C0000)
RESERVED_PORTS equ (OS_BASE+0x01D0000)
IRQ_SAVE equ (OS_BASE+0x01E0000)
BOOT_VAR equ (OS_BASE+0x01f0000)
 
stack_data_start equ (OS_BASE+0x0200000)
eth_data_start equ (OS_BASE+0x0200000)
stack_data equ (OS_BASE+0x0204000)
stack_data_end equ (OS_BASE+0x021ffff)
resendQ equ (OS_BASE+0x0220000)
VMODE_BASE equ (OS_BASE+0x0228000)
skin_data equ (OS_BASE+0x0230000)
draw_data equ (OS_BASE+0x0238000);
 
BgrDrawMode equ (OS_BASE+0x023BFF4)
BgrDataWidth equ (OS_BASE+0x023BFF8)
BgrDataHeight equ (OS_BASE+0x023BFFC)
 
virtual at (OS_BASE+0x023CF80)
tss TSS
end virtual
 
LAST_PAGE equ 0x01CB000
LAST_PAGE equ 0x0240000
 
twdw equ (CURRENT_TASK-window_data)
;sys_pgmap equ (OS_BASE+LAST_PAGE)
 
twdw equ 0x3000 ;(CURRENT_TASK-window_data)
 
std_application_base_address equ new_app_base
RING0_STACK_SIZE equ (0x2000 - 512) ;512 áàéò äëÿ êîíòåêñòà FPU
 
REG_SS equ (RING0_STACK_SIZE-4)
270,8 → 303,6
PG_LARGE equ 0x080
PG_GLOBAL equ 0x100
 
PG_SHARED equ 0x200
 
;;;;;;;;;;;boot time variables
 
;BOOT_BPP equ 0x9000 ;byte bits per pixel
456,6 → 487,14
.pg_mutex dd ?
}
 
;struc LIB
;{ .lib_name rb 16
; .lib_base dd ?
; .lib_start dd ?
; .export dd ?
; .import dd ?
;}
 
struc SRV
{ .srv_name rb 16 ;ASCIIZ string
.magic dd ? ;+0x10 ;'SRV '
/kernel/branches/kolibri_pe/core/dll.c
454,10 → 454,10
thr_stack->ecx = 0;
thr_stack->eax = 0;
thr_stack->eip = entry;
thr_stack->cs = sel_app_code;
thr_stack->cs = 0x1b;
thr_stack->eflags = EFL_IOPL3 | EFL_IF;
thr_stack->pe_sp = 0x7FFFF000 + ((u32_t)ex_stack & 0xFFF);
thr_stack->pe_ss = sel_app_data;
thr_stack->pe_ss = 0x23;
 
};
 
585,12 → 585,13
 
DBG("import from %s\n",libname);
 
exp_dll = find_dll(&core_dll.link, libname);
if(exp_dll == NULL)
{
exp_dll = find_dll(&current_slot->dll_list, libname);
if(exp_dll == NULL)
if(exp_dll != NULL)
{
DBG("find %s\n", exp_dll->img_name);
}
else
{
int len = strlen(libname)+1;
 
memcpy(path, "/sys/lib/",9);
603,8 → 604,6
return false;
};
}
};
DBG("find %s\n", exp_dll->img_name);
 
exp = exp_dll->img_exp;
 
/kernel/branches/kolibri_pe/core/init.asm
218,9 → 218,26
 
; SAVE & CLEAR 0-0xffff
 
cld
xor esi, esi
mov edi,BOOT_VAR
mov ecx,0x10000 / 4
rep movsd
 
xor edi, edi
xor eax, eax
mov ecx,0x10000 / 4
rep stosd
 
mov edi, 0x40000
mov ecx, (0x90000-0x40000)/4
rep stosd
 
mov dword [_sys_pdbr], eax
mov dword [_sys_pdbr+4], eax
 
xchg bx, bx
 
movzx eax,word [BOOT_VAR+0x9008] ; screen mode
mov [scr_mode],eax
 
239,6 → 256,8
 
mov [_current_thread], eax
 
xchg bx, bx
 
mov ebx, [eax+THR.pdir]
mov ecx, cr3
cmp ebx, ecx
/kernel/branches/kolibri_pe/core/sys32.inc
592,25 → 592,26
pusha ; save window coordinates for window restoring
cld
shl esi,5
mov eax,[window_data+esi+WDATA.box.left]
add esi,window_data
mov eax,[esi+WDATA.box.left]
mov [dlx],eax
add eax,[window_data+esi+WDATA.box.width]
add eax,[esi+WDATA.box.width]
mov [dlxe],eax
mov eax,[window_data+esi+WDATA.box.top]
mov eax,[esi+WDATA.box.top]
mov [dly],eax
add eax,[window_data+esi+WDATA.box.height]
add eax,[esi+WDATA.box.height]
mov [dlye],eax
 
xor eax, eax
mov [window_data+esi+WDATA.box.left],eax
mov [window_data+esi+WDATA.box.width],eax
mov [window_data+esi+WDATA.box.top],eax
mov [window_data+esi+WDATA.box.height],eax
mov [window_data+esi+WDATA.cl_workarea],eax
mov [window_data+esi+WDATA.cl_titlebar],eax
mov [window_data+esi+WDATA.cl_frames],eax
mov dword [window_data+esi+WDATA.reserved],eax ; clear all flags: wstate, redraw, wdrawn
lea edi, [esi+draw_data]
mov [esi+WDATA.box.left],eax
mov [esi+WDATA.box.width],eax
mov [esi+WDATA.box.top],eax
mov [esi+WDATA.box.height],eax
mov [esi+WDATA.cl_workarea],eax
mov [esi+WDATA.cl_titlebar],eax
mov [esi+WDATA.cl_frames],eax
mov dword [esi+WDATA.reserved],eax ; clear all flags: wstate, redraw, wdrawn
lea edi, [esi-window_data+draw_data]
mov ecx,32/4
rep stosd
popa
811,6 → 812,9
xor esi, esi
call redrawscreen
 
mov [mouse_background], 0 ; no mouse background
mov [dont_draw_mouse], 0 ; draw mouse
 
mov [application_table_status],0
;mov esi,process_terminated
;call sys_msg_board_str
/kernel/branches/kolibri_pe/core/taskman.inc
432,7 → 432,7
mov [ecx*8+SLOT_BASE+APPDATA.saved_esp], ebx
mov [CURRENT_TASK+ecx+TASKDATA.state], 0
 
; DEBUGF 1,"%s",new_process_running
DEBUGF 1,"%s",new_process_running
.err:
mov eax,[process_number] ;set result
mov [application_table_status], 0 ;unlock application_table_status mutex
446,6 → 446,7
 
align 4
_pe_restart:
xchg bx, bx
add esp, 12
popad
iretd
/kernel/branches/kolibri_pe/core/v86.inc
94,9 → 94,9
pop eax
; first page - BIOS data (shared between all machines!)
; physical address = 0x1f0000
; linear address = 0
mov dword [eax], 111b
mov dword [eax+800h], OS_BASE
; linear address = BOOT_VAR = OS_BASE + 0x1f0000
mov dword [eax], (BOOT_VAR - OS_BASE) or 111b
mov dword [eax+800h], BOOT_VAR
; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!)
; physical address = 0x9C000
; linear address = 0x8009C000
/kernel/branches/kolibri_pe/data32.inc
282,49 → 282,13
 
align 4096
 
SLOT_BASE:
rb 64*1024
DRIVE_DATA:
rb 64*1024
RESERVED_PORTS:
rb 64*1024
FLOPPY_BUFF:
rb 16*1024
_sys_pdbr rd 1024
 
BUTTON_INFO:
rb 16*1024
BgrAuxTable:
rb 32*1024
skin_data:
rb 32*1024
 
IDE_DMA: rb 32*1024
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
window_data:
rb 8192
 
CURRENT_TASK:
_current_task:
rb 8192
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
draw_data:
rb 4096
CDDataBuf:
rb 4096
 
cur_saved_data rb 4096
 
_sys_pdbr rd 1024
fpu_data: rb 512
 
 
fpu_data:
rb 512
 
WIN_STACK:
rb 0x400
WIN_POS:
rb 0x800
 
idts rq 0x42
 
; device irq owners
354,9 → 318,6
FONT_I rb 2304 ;16*144
FONT_II rb 2560 ;16*160
 
RAMDISK_FAT: rb 2856*2 +16 ;16*357
FLOPPY_FAT: rb 2856*2 +16
 
_z_core rd 52
 
mem_block_map rb 512
396,6 → 357,9
srv.fd rd 1
srv.bk rd 1
 
scr_width rd 1
scr_height rd 1
 
_HwCursorCreate:
create_cursor rd 1
 
411,16 → 375,12
def_cursor rd 1
current_cursor rd 1
hw_cursor rd 1
cur_def_interl rd 1
cur_saved_base rd 1
cur_saved_interl rd 1
cur_saved_w rd 1
cur_saved_h rd 1
 
cur.lock rd 1 ;1 - lock update, 2- hide
cur.left rd 1 ;cursor clip box
cur.top rd 1
cur.right rd 1
cur.bottom rd 1
cur.w rd 1
cur.h rd 1
 
ipc_tmp rd 1
ipc_pdir rd 1
ipc_ptab rd 1
457,9 → 417,6
put_pixel rd 1
get_pixel rd 1
 
_screen_width rd 1
_screen_height rd 1
 
Screen_Max_X rd 1
Screen_Max_Y rd 1
 
466,9 → 423,8
btn_addr rd 1
 
redraw_background rd 1
BgrDrawMode rd 1
BgrDataWidth rd 1
BgrDataHeight rd 1
mouse_background rd 1
dont_draw_mouse rd 1
 
MOUSE_VISIBLE rd 1
WIN_TEMP_XY rd 1
483,6 → 439,9
KEY_COUNT rd 1
KEY_BUFF rb 128
 
 
mouse_color_mem rd 1
color_temp rd 1
btn_down rd 1
x_under rd 1
y_under rd 1
/kernel/branches/kolibri_pe/drivers/sb16/CONFIG.INC
6,8 → 6,10
API_VERSION equ 0 ;debug
 
OS_BASE equ 0xE0000000
;PROC_BASE equ (OS_BASE+0x080000)
SB16Buffer equ (OS_BASE+0x10000)
new_app_base equ 0x0
PROC_BASE equ (OS_BASE+0x080000)
SB16Buffer equ (OS_BASE+0x1A0000)
SB16_Status equ (OS_BASE+0x1B0000)
DMAPage equ ((SB16Buffer-OS_BASE) shr 16)
 
SB16Buffer0 equ SB16Buffer
/kernel/branches/kolibri_pe/gui/button.inc
584,6 → 584,8
popad
 
call negativebutton
mov [mouse_background], 0 ; no mouse background
mov [dont_draw_mouse], 0 ; draw mouse
;..................................... start 5/5 : modified by vhanla .............................
; check coordinates
iglobal
/kernel/branches/kolibri_pe/gui/skincode.inc
10,6 → 10,8
 
include "skindata.inc"
 
;skin_data = 0x00778000
 
read_skin_file:
stdcall load_file, ebx
test eax, eax
211,7 → 213,7
ret
 
sys_putimage_with_check:
test ebx,ebx
or ebx,ebx
jz @f
call sys_putimage.forced
@@: ret
/kernel/branches/kolibri_pe/gui/window.inc
498,7 → 498,7
 
repos_windows:
mov ecx,[TASK_COUNT]
mov edi, window_data+0x20*2
mov edi, OS_BASE+0x20*2
call force_redraw_background
dec ecx
jge @f
616,6 → 616,33
ret
 
 
uglobal
new_window_starting dd 0
endg
 
 
sys_window_mouse:
 
push eax
 
mov eax,[timer_ticks]
cmp [new_window_starting],eax
jb swml1
 
mov [mouse_background], 0 ; no mouse background
mov [dont_draw_mouse], 0 ; draw mouse
 
mov [new_window_starting],eax
 
swml1:
 
pop eax
 
ret
 
 
 
 
drawwindow_I_caption:
 
mov ecx,[edx+WDATA.cl_titlebar] ; grab bar
1018,6 → 1045,8
ret
 
 
 
 
waredraw: ; if redraw necessary at activate
 
pushad
1059,6 → 1088,8
popad
 
call windowactivate
mov [mouse_background], 0 ; no mouse background
mov [dont_draw_mouse], 0 ; draw mouse
ret
 
 
1125,6 → 1156,7
add edx, [edi+WDATA.box.height]
call calculatescreen
.done:
mov [mouse_background], 0 ; no mouse under
.skip_redrawings:
popfd
ret
1135,8 → 1167,6
window_moved db 'K : Window - done',13,10,0
endg
 
bPressedMouseXY_W db 0x0
 
; check window touch
align 4
checkwindows:
1164,34 → 1194,59
popad
ret
.mouse_buttons_pressed:
;..................................... start 2/4 : modified by vhanla .................
jmp @f
bPressedMouseXY_W db 0x0
@@:
;..................................... end 2/4 : modified by vhanla ...................
mov esi,[TASK_COUNT]
inc esi
 
;..................................... start 3/4 : modified by vhanla .................
push eax
cmp [bPressedMouseXY_W],0
jnz @f
mov [bPressedMouseXY_W],1
mov ax,[MOUSE_X]
mov [mx],ax
mov ax,[MOUSE_Y]
mov [my],ax
@@:
pop eax
;..................................... end 3/4 : modified by vhanla ...................
 
movzx eax,word [MOUSE_Y]
movzx ebx,word [MOUSE_X]
mov ecx, [Screen_Max_X]
add ebx, [_display_data]
inc ecx
mul ecx
movzx edi, byte [ebx+eax]
 
cwloop:
cmp esi,2
jb .exit
 
movzx esi, word [WIN_STACK + edi * 2]
 
dec esi
movzx edi, word [WIN_POS + esi * 2] ; ebx
shl edi, 5
add edi, window_data
; mov edi, ebx
mov ecx, [edi + WDATA.box.left]
mov edx, [edi + WDATA.box.top]
 
movzx eax,word [MOUSE_X]
movzx ebx,word [MOUSE_Y]
mov eax,ecx
mov ebx,edx
test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED
jnz cwloop
 
;..................................... start 4/4 : modified by vhanla .................
movzx eax, word [mx]; movzx eax,word[mouse_x]
movzx ebx, word [my]; movzx ebx,word[MOUSE_Y]
;..................................... endt 4/4 : modified by vhanla ..................
cmp ecx, eax
jae cwloop
cmp edx, ebx
jae cwloop
add ecx, [edi + WDATA.box.width]
add edx, [edi + WDATA.box.height]
cmp eax, ecx
jae cwloop
cmp ebx, edx
jae cwloop
 
pushad
mov eax, esi
mov ebx, [TASK_COUNT]
1316,10 → 1371,13
 
newchm:
 
mov [dont_draw_mouse], 1
 
call checkidle
 
call checkVga_N13
 
mov [mouse_background], 0
 
call [draw_pointer]
 
1422,6 → 1480,7
cmp byte [btn_down], 0
jne newchm
; new position done
mov [dont_draw_mouse], 1
mov cl,0
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
jnz @f
1448,8 → 1507,7
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP or WSTATE_MAXIMIZED
jnz @f
add ecx,2
@@:
sub edi,window_data
@@: sub edi,window_data
shr edi,5
shl edi,8
add edi,SLOT_BASE+APPDATA.saved_box
1575,6 → 1633,9
cmp [reposition],0
je retwm
 
mov [dont_draw_mouse], 1 ; no mouse
 
 
push eax ebx ecx edx
mov eax,[edi+WDATA.box.left]
mov ebx,[edi+WDATA.box.top]
1601,6 → 1662,7
 
mov ecx,100 ; wait to avoid mouse residuals
waitre2:
mov [dont_draw_mouse], 1
call checkidle
cmp [edi+WDATA.fl_redraw],0
jz retwm
1608,6 → 1670,9
 
retwm:
 
mov [dont_draw_mouse], 0 ; mouse pointer
mov [mouse_background], 0 ; no mouse under
 
mov esi,window_moved
call sys_msg_board_str
 
/kernel/branches/kolibri_pe/gui/skindata.inc
54,8 → 54,6
skin_btn_close SKIN_BUTTON
skin_btn_minimize SKIN_BUTTON
 
public _skin_active
_skin_active:
skin_active SKIN_DATA
skin_inactive SKIN_DATA
 
/kernel/branches/kolibri_pe/hid/mousedrv.inc
34,20 → 34,53
; return old picture
 
cmp [set_hw_cursor], 0
jz .exit
jz @F
pushad
mov eax, [x_under]
mov ebx, [y_under]
stdcall [hw_restore], eax, ebx
popad
.exit:
ret
@@:
pushad
xor ecx,ecx
xor edx,edx
align 4
mres:
mov eax, [x_under]
mov ebx, [y_under]
add eax,ecx
add ebx,edx
push ecx
push edx
push eax
push ebx
mov eax,edx
shl eax,6
shl ecx,2
add eax,ecx
add eax,mouseunder
mov ecx,[eax]
pop ebx
pop eax
mov edi, 1 ;force
call [putpixel]
pop edx
pop ecx
inc ecx
cmp ecx, 16
jnz mres
xor ecx, ecx
inc edx
cmp edx, 24
jnz mres
popad
ret
 
save_draw_mouse:
 
cmp [set_hw_cursor], 0
je .exit
 
je .no_hw_cursor
pushad
 
mov [x_under], eax
68,6 → 101,9
cmp esi, [current_cursor]
je .draw
 
; cmp [esi+CURSOR.magic], 'CURS'
; jne .fail
 
push esi
call [select_hw_cursor]
mov [current_cursor], esi
74,10 → 110,150
.draw:
stdcall [set_hw_cursor], esi
popad
.exit:
ret
.fail:
mov ecx, [def_cursor]
mov [edx+SLOT_BASE+APPDATA.cursor], ecx
stdcall [set_hw_cursor], ecx ; stdcall: [esp]=ebx,eax
popad
ret
 
.no_hw_cursor:
pushad
; save & draw
mov [x_under], eax
mov [y_under], ebx
push eax
push ebx
mov ecx,0
mov edx,0
align 4
drm:
push eax
push ebx
push ecx
push edx
; helloworld
push ecx
add eax,ecx ; save picture under mouse
add ebx,edx
push ecx
call getpixel
mov [color_temp],ecx
pop ecx
mov eax,edx
shl eax,6
shl ecx,2
add eax,ecx
add eax,mouseunder
mov ebx,[color_temp]
mov [eax],ebx
pop ecx
mov edi,edx ; y cycle
shl edi,4 ; *16 bytes per row
add edi,ecx ; x cycle
lea edi, [mousepointer+edi+edi*2] ; we have our str address
mov esi, edi
add esi, 16*24*3
push ecx
mov ecx, [color_temp]
call combine_colors
mov [mouse_color_mem], ecx
pop ecx
pop edx
pop ecx
pop ebx
pop eax
add eax,ecx ; we have x coord+cycle
add ebx,edx ; and y coord+cycle
push ecx
mov ecx, [mouse_color_mem]
mov edi, 1
call [putpixel]
pop ecx
mov ebx,[esp+0] ; pure y coord again
mov eax,[esp+4] ; and x
inc ecx ; +1 cycle
cmp ecx,16 ; if more than 16
jnz drm
xor ecx, ecx
inc edx
cmp edx,24
jnz drm
add esp,8
popad
ret
 
 
combine_colors:
; in
; ecx - color ( 00 RR GG BB )
; edi - ref to new color byte
; esi - ref to alpha byte
;
; out
; ecx - new color ( roughly (ecx*[esi]>>8)+([edi]*[esi]>>8) )
push eax
push ebx
push edx
push ecx
xor ecx, ecx
; byte 2
mov eax, 0xff
sub al, [esi+0]
mov ebx, [esp]
shr ebx, 16
and ebx, 0xff
mul ebx
shr eax, 8
add ecx, eax
xor eax, eax
xor ebx, ebx
mov al, [edi+0]
mov bl, [esi+0]
mul ebx
shr eax, 8
add ecx, eax
shl ecx, 8
; byte 1
mov eax, 0xff
sub al, [esi+1]
mov ebx, [esp]
shr ebx, 8
and ebx, 0xff
mul ebx
shr eax, 8
add ecx, eax
xor eax, eax
xor ebx, ebx
mov al, [edi+1]
mov bl, [esi+1]
mul ebx
shr eax, 8
add ecx, eax
shl ecx, 8
; byte 2
mov eax, 0xff
sub al, [esi+2]
mov ebx, [esp]
and ebx, 0xff
mul ebx
shr eax, 8
add ecx, eax
xor eax, eax
xor ebx, ebx
mov al, [edi+2]
mov bl, [esi+2]
mul ebx
shr eax, 8
add ecx, eax
pop eax
pop edx
pop ebx
pop eax
ret
 
 
__sys_disable_mouse:
cmp [MOUSE_VISIBLE], 0
je @f
100,7 → 276,7
movzx ebx, byte [ecx]
cmp eax,ebx
je yes_mouse_disable
movzx ebx, byte [ecx+32]
movzx ebx, byte [ecx+16]
cmp eax,ebx
je yes_mouse_disable
mov ebx,[Screen_Max_X]
110,7 → 286,7
movzx ebx, byte [ecx]
cmp eax,ebx
je yes_mouse_disable
movzx ebx, byte [ecx+32]
movzx ebx, byte [ecx+16]
cmp eax,ebx
je yes_mouse_disable
jmp no_mouse_disable
259,78 → 435,3
@@:
ret
 
 
;[ecx] x
;[ecx+4] y
;[ecx+8] w
;[ecx+12] h
 
align 4
lock_cursor:
 
pushfd
cli
 
xor eax, eax
mov edx, [ecx]
mov ebx, [ecx+4]
cmp edx, [cur.right]
jg .done
 
cmp ebx, [cur.bottom]
jg .done
 
add edx, [ecx+8]
add ebx, [ecx+12]
cmp edx, [cur.left]
jle .done
 
cmp ebx, [cur.top]
jle .done
 
mov ecx, [CURRENT_TASK]
 
mov ebx, [cur.left]
mov eax, [cur.top]
add ebx, [_display_data]
mul [_screen_width]
add ebx, eax
 
cmp cl, [ebx]
je .disable
 
cmp cl, [ebx+31]
je .disable
 
mov eax, [_screen_width]
shl eax, 5
sub eax, [_screen_width]
 
cmp cl, [ebx+eax]
je .disable
 
cmp cl, [ebx+eax+31]
jne .done
 
.disable:
call draw_mouse_under
 
mov eax, 1
.done:
inc eax
mov [cur.lock], eax
popfd
ret
 
align 4
unlock_cursor:
pushfd
cli
cmp [cur.lock], 2
jne .done
 
call save_draw_mouse
.done:
mov [cur.lock], 1
popfd
ret
/kernel/branches/kolibri_pe/include/core.h
189,54 → 189,3
#define EFL_IOPL1 0x1000
#define EFL_IOPL2 0x2000
#define EFL_IOPL3 0x3000
 
typedef struct
{
u32_t handle;
u32_t io_code;
void *input;
int inp_size;
void *output;
int out_size;
}ioctl_t;
 
 
typedef struct
{
u32_t code;
union
{
struct /* window event */
{
u32_t win; /* window handle */
u32_t val1;
u32_t val2;
u16_t x; /* cursor x */
u16_t y; /* cursor y */
u32_t unused;
}__attribute__ ((packed));
 
struct /* realtime io */
{
u32_t sender; /* service handler */
u32_t stream; /* io stream id, if present */
addr_t offset;
size_t size;
};
 
struct /* ipc event */
{
u32_t sender;
u32_t io_code;
addr_t *input;
size_t inp_size;
addr_t *output;
size_t out_size;
};
};
}event_t;
 
 
 
 
 
/kernel/branches/kolibri_pe/include/types.h
14,8 → 14,8
typedef u32_t size_t;
typedef u32_t index_t;
typedef u32_t eflags_t;
typedef u32_t color_t;
 
 
typedef int bool;
 
#define true (bool)1
/kernel/branches/kolibri_pe/kernel.asm
134,7 → 134,6
public _rd_root
public _rd_root_end
 
public _current_task
public _current_slot
public _current_thread
public _k_reenter
197,12 → 196,7
public LFBAddress
public LFBSize
 
public _screen_width
public _screen_height
 
public _vesa20_drawbar
 
 
extrn __edata
 
extrn __os_stack
300,12 → 294,12
align 4
init_apm:
; init selectors
mov ebx, [OS_BASE +0x9040] ; offset of APM entry point
movzx eax, word [OS_BASE+0x9050] ; real-mode segment base address of
mov ebx, [BOOT_VAR +0x9040] ; offset of APM entry point
movzx eax, word [BOOT_VAR+0x9050] ; real-mode segment base address of
; protected-mode 32-bit code segment
movzx ecx, word [OS_BASE+0x9052] ; real-mode segment base address of
movzx ecx, word [BOOT_VAR+0x9052] ; real-mode segment base address of
; protected-mode 16-bit code segment
movzx edx, word [OS_BASE+0x9054] ; real-mode segment base address of
movzx edx, word [BOOT_VAR+0x9054] ; real-mode segment base address of
; protected-mode 16-bit data segment
 
shl eax, 4
326,7 → 320,7
mov dword[apm_entry], ebx
mov word [apm_entry + 4], apm_code_32 - _gdts
 
mov eax, [OS_BASE + 0x9044] ; version & flags
mov eax, [BOOT_VAR + 0x9044] ; version & flags
mov [apm_vf], eax
ret
 
338,25 → 332,23
call init_apm
 
; SAVE REAL MODE VARIABLES
mov ax, [OS_BASE + 0x9031]
mov ax, [BOOT_VAR + 0x9031]
mov [IDEContrRegsBaseAddr], ax
 
mov al, [OS_BASE+0x901F] ; DMA access
mov al, [BOOT_VAR+0x901F] ; DMA access
mov [allow_dma_access], al
 
movzx eax, byte [OS_BASE+0x9000] ; bpp
movzx eax, byte [BOOT_VAR+0x9000] ; bpp
mov [ScreenBPP], eax
 
movzx eax,word [OS_BASE+0x900A] ; X max
movzx ebx,word [OS_BASE+0x900C] ; Y max
mov [_screen_width], eax
mov [_screen_height], ebx
movzx eax,word [BOOT_VAR+0x900A] ; X max
dec eax
dec ebx
mov [Screen_Max_X],eax
mov [screen_workarea.right],eax
mov [Screen_Max_Y],ebx
mov [screen_workarea.bottom],ebx
movzx eax,word [BOOT_VAR+0x900C] ; Y max
dec eax
mov [Screen_Max_Y],eax
mov [screen_workarea.bottom],eax
mov [BytesPerScanLine], 640*4
cmp [scr_mode], 0x13 ; 320x200
je @f
363,10 → 355,10
cmp [scr_mode], 0x12 ; VGA 640x480
je @f
 
movzx eax, word [OS_BASE+0x9001] ; for other modes
movzx eax, word [BOOT_VAR+0x9001] ; for other modes
mov [BytesPerScanLine], eax
@@:
mov esi, OS_BASE+0x9080
mov esi, BOOT_VAR+0x9080
movzx ecx, byte [esi-1]
mov [NumBiosDisks], ecx
mov edi, BiosDisksData
374,7 → 366,7
 
; GRAPHICS ADDRESSES
 
mov byte [OS_BASE+0x901e],0x0
mov byte [BOOT_VAR+0x901e],0x0
 
cmp [scr_mode], 0100000000000000b
jge setvesa20
995,10 → 987,10
mov [BTN_COUNT], 0 ; button buffer
 
push eax
mov ax,[OS_BASE+0x900c]
mov ax,[BOOT_VAR+0x900c]
shr ax,1
shl eax,16
mov ax,[OS_BASE+0x900A]
mov ax,[BOOT_VAR+0x900A]
shr ax,1
mov dword [MOUSE_X], eax
pop eax
1454,6 → 1446,10
ret
no_set_pci_access:
 
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
include 'vmodeint.inc'
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
sys_setup_err:
mov [esp+36],dword -1
ret
1803,7 → 1799,7
jl exit_for_anyone
cmp ecx,4
jg exit_for_anyone
mov [OS_BASE+0x9030],cl
mov [BOOT_VAR+0x9030],cl
 
mov eax,[TASK_COUNT]
mov [sys_shutdown], eax
2321,7 → 2317,7
jnz nogb1
mov eax,[BgrDataWidth]
shl eax,16
mov ax, word [BgrDataHeight]
mov ax,[BgrDataHeight]
mov [esp+36],eax
ret
 
2634,16 → 2630,17
jnz srl1
 
mov edx, [TASK_BASE] ; return whole screen draw area for this app
sub edx, CURRENT_TASK
mov [edx +draw_data + RECT.left], 0
mov [edx +draw_data+ RECT.top], 0
add edx, draw_data - CURRENT_TASK
mov [edx + RECT.left], 0
mov [edx + RECT.top], 0
mov eax, [Screen_Max_X]
mov [edx +draw_data+ RECT.right], eax
mov [edx + RECT.right], eax
mov eax, [Screen_Max_Y]
mov [edx +draw_data+ RECT.bottom], eax
mov [edx + RECT.bottom], eax
 
mov edi, [TASK_BASE]
or [edi - twdw + WDATA.fl_wdrawn], 1 ; no new position & buttons from app
call sys_window_mouse
ret
 
srl1:
2675,6 → 2672,7
call [disable_mouse]
call sys_set_window
call [disable_mouse]
call sys_window_mouse
dec [mouse_pause]
call [draw_pointer]
ret
2912,6 → 2910,10
test [edi+WDATA.fl_wdrawn],1
jnz newd
 
mov eax,[timer_ticks] ;[0xfdf0]
add eax,100
mov [new_window_starting],eax
 
movsx eax,bx
mov [edi+WDATA.box.width],eax
movsx eax,cx
3098,6 → 3100,9
xor esi,esi
call redrawscreen
 
mov [dont_draw_mouse], 0 ; mouse pointer
mov [mouse_background], 0 ; no mouse under
 
call [draw_pointer]
 
mov [window_move_pr],0
3429,7 → 3434,7
jz newdw8
test al,al
jz .az
lea eax,[edi+draw_data+(0x100000000-OS_BASE)]
lea eax,[edi+draw_data-window_data]
mov ebx,[dlx]
cmp ebx,[eax+RECT.left]
jae @f
3454,7 → 3459,7
.az:
 
mov eax,edi
add eax, draw_data+(0x100000000-OS_BASE)
add eax,draw_data-window_data
 
mov ebx,[dlx] ; set limits
mov [eax + RECT.left], ebx
3465,7 → 3470,7
mov ebx,[dlye]
mov [eax + RECT.bottom], ebx
 
sub eax,draw_data+(0x100000000-OS_BASE)
sub eax,draw_data-window_data
 
cmp dword [esp],1
jne nobgrd
5089,7 → 5094,7
align 4
system_shutdown: ; shut down the system
 
cmp byte [OS_BASE+0x9030], 1
cmp byte [BOOT_VAR+0x9030], 1
jne @F
ret
@@:
5102,10 → 5107,10
 
cli
 
cmp byte [OS_BASE+0x9030], 3
cmp byte [BOOT_VAR+0x9030], 3
je _sys_reboot
 
cmp byte [OS_BASE+0x9030], 4
cmp byte [BOOT_VAR+0x9030], 4
je _sys_restart
 
cld
5143,6 → 5148,10
call restorefatchain
 
cld
mov esi, BOOT_VAR ; restore 0x0 - 0xffff
mov edi, OS_BASE
mov ecx,0x10000/4
rep movsd
 
; mov eax, [_copy_pg_balloc]
mov [_pg_balloc], eax
/kernel/branches/kolibri_pe/makefile
6,12 → 6,11
 
DEFS = -DUSE_SMP -DCONFIG_DEBUG
 
CFLAGS = -c -O2 -DCONFIG_DEBUG -I $(INCLUDE) -fomit-frame-pointer -fno-builtin
CFLAGS = -c -O2 -I $(INCLUDE) -fomit-frame-pointer -fno-builtin
LDFLAGS = -shared -s -Map kernel.map --image-base 0x100000 --file-alignment 32
 
KERNEL_SRC:= \
kernel.asm \
const.inc \
data32.inc \
core/memory.inc \
core/heap.inc \
19,7 → 18,6
core/taskman.inc \
core/v86.inc \
core/sys32.inc \
core/syscall.inc \
core/dll.inc \
core/exports.inc \
fs/ntfs.inc \
26,8 → 24,7
gui/window.inc \
gui/event.inc \
video/vesa20.inc \
video/cursors.inc \
hid/mousedrv.inc
video/cursors.inc
 
 
PE_SRC:= \
/kernel/branches/kolibri_pe/video/cursors.inc
470,6 → 470,7
jne .fail
sub ebx, 96
.init:
mov [cur_def_interl], ebx
 
; stdcall load_driver, szHwMouse
; mov [hw_cursor], eax
485,6 → 486,13
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
mov [def_cursor], eax
 
mov ecx, [Screen_Max_X]
mov edx, [Screen_Max_Y]
inc ecx
inc edx
mov [scr_width], ecx
mov [scr_height], edx
 
mov ebx, [ScreenBPP]
cmp ebx, 32
jne @F
509,20 → 517,22
 
align 4
proc restore_24 stdcall, x:dword, y:dword
locals
w dd ?
endl
 
mov ebx, [cur_saved_base]
mov edx, [cur.h]
mov edi, [cur_saved_base]
mov edx, [cur_saved_h]
mov ebx, [cur_saved_interl]
test edx, edx
jz .ret
 
mov esi, cur_saved_data
@@:
mov edi, ebx
add ebx, [BytesPerScanLine]
 
mov ecx, [cur.w]
mov ecx, [cur_saved_w]
lea ecx, [ecx+ecx*2]
rep movsb
add edi, ebx
dec edx
jnz @B
.ret:
531,19 → 541,21
 
align 4
proc restore_32 stdcall, x:dword, y:dword
locals
w dd ?
endl
 
mov ebx, [cur_saved_base]
mov edx, [cur.h]
mov edi, [cur_saved_base]
mov edx, [cur_saved_h]
mov ebx, [cur_saved_interl]
test edx, edx
jz .ret
 
mov esi, cur_saved_data
@@:
mov edi, ebx
add ebx, [BytesPerScanLine]
 
mov ecx, [cur.w]
mov ecx, [cur_saved_w]
rep movsd
add edi, ebx
dec edx
jnz @B
.ret:
553,7 → 565,9
align 4
proc cursor_24 stdcall, hcursor:dword, x:dword, y:dword
locals
w dd ?
h dd ?
st dd ?
_dx dd ?
_dy dd ?
endl
565,12 → 579,10
 
xor edx, edx
sub ecx, [esi+CURSOR.hot_x]
lea ebx, [ecx+32-1]
mov [x], ecx
sets dl
dec edx
and ecx, edx ;clip x to 0<=x
mov [cur.left], ecx
mov edi, ecx
sub edi, [x]
mov [_dx], edi
577,73 → 589,76
 
xor edx, edx
sub eax, [esi+CURSOR.hot_y]
lea edi, [eax+32-1]
mov [y], eax
sets dl
dec edx
and eax, edx ;clip y to 0<=y
mov [cur.top], eax
mov edx, eax
sub edx, [y]
mov [_dy], edx
mov edi, eax
sub edi, [y]
mov [_dy], edi
 
mul [BytesPerScanLine]
lea edx, [LFB_BASE+ecx*3]
add edx, eax
mov [cur_saved_base],edx
mul ebx
lea esi, [LFB_BASE+ecx+ecx*2]
add esi, eax
mov [cur_saved_base],esi
 
cmp ebx, [Screen_Max_X]
jbe @F
mov ebx, [Screen_Max_X]
mov edi, [scr_width]
mov edx, [scr_height]
mov eax, 32
 
sub edi, ecx
cmp edi, eax
jng @F
mov edi, eax
@@:
cmp edi, [Screen_Max_Y]
jbe @F
mov edi, [Screen_Max_Y]
sub edi, [_dx]
 
sub edx, [y]
cmp edx, eax
jng @F
mov edx, eax
@@:
mov [cur.right], ebx
mov [cur.bottom], edi
sub edx, [_dy]
 
sub ebx, [x]
sub edi, [y]
inc ebx
inc edi
mov [w], edi
mov [h], edx
mov [cur_saved_w], edi
mov [cur_saved_h], edx
 
mov [cur.w], ebx
mov [cur.h], edi
mov [h], edi
sub eax, edi
shl eax, 2 ;lea eax, [eax+eax*2]
lea edi, [edi+edi*2]
sub ebx, edi
mov [cur_saved_interl], ebx
 
mov eax, edi
mov edi, cur_saved_data
@@:
mov esi, edx
add edx, [BytesPerScanLine]
mov ecx, [cur.w]
mov ecx, [w]
lea ecx, [ecx+ecx*2]
rep movsb
dec eax
add esi, ebx
dec edx
jnz @B
 
;draw cursor
mov ebx, [cur_saved_base]
mov edx, eax
mov edi, [cur_saved_base]
mov eax, [_dy]
shl eax, 5
add eax, [_dx]
shl eax, 2
 
mov esi, [hcursor]
mov esi, [esi+CURSOR.base]
lea edx, [esi+eax*4]
add esi, eax
.row:
mov ecx, [cur.w]
mov esi, edx
mov edi, ebx
add edx, 32*4
add ebx, [BytesPerScanLine]
mov ecx, [w]
.pix:
lodsd
test eax, 0xFF000000
jz @F
 
mov [edi], ax
mov word [edi], ax
shr eax, 16
mov [edi+2], al
@@:
651,6 → 666,8
dec ecx
jnz .pix
 
add esi, edx
add edi, ebx
dec [h]
jnz .row
ret
659,7 → 676,9
align 4
proc cursor_32 stdcall, hcursor:dword, x:dword, y:dword
locals
w dd ?
h dd ?
st dd ?
_dx dd ?
_dy dd ?
endl
667,15 → 686,14
mov esi, [hcursor]
mov ecx, [x]
mov eax, [y]
mov ebx, [BytesPerScanLine]
 
xor edx, edx
sub ecx, [esi+CURSOR.hot_x]
lea ebx, [ecx+32-1]
mov [x], ecx
sets dl
dec edx
and ecx, edx ;clip x to 0<=x
mov [cur.left], ecx
mov edi, ecx
sub edi, [x]
mov [_dx], edi
682,65 → 700,68
 
xor edx, edx
sub eax, [esi+CURSOR.hot_y]
lea edi, [eax+32-1]
mov [y], eax
sets dl
dec edx
and eax, edx ;clip y to 0<=y
mov [cur.top], eax
mov edx, eax
sub edx, [y]
mov [_dy], edx
mov edi, eax
sub edi, [y]
mov [_dy], edi
 
mul [BytesPerScanLine]
lea edx, [LFB_BASE+eax+ecx*4]
mov [cur_saved_base],edx
mul ebx
lea esi, [LFB_BASE+eax+ecx*4]
mov [cur_saved_base],esi
 
cmp ebx, [Screen_Max_X]
jbe @F
mov ebx, [Screen_Max_X]
mov edi, [scr_width]
mov edx, [scr_height]
mov eax, 32
 
sub edi, ecx
cmp edi, eax
jng @F
mov edi, eax
@@:
cmp edi, [Screen_Max_Y]
jbe @F
mov edi, [Screen_Max_Y]
sub edi, [_dx]
 
sub edx, [y]
cmp edx, eax
jng @F
mov edx, eax
@@:
mov [cur.right], ebx
mov [cur.bottom], edi
sub edx, [_dy]
 
sub ebx, [x]
sub edi, [y]
inc ebx
inc edi
mov [w], edi
mov [h], edx
mov [cur_saved_w], edi
mov [cur_saved_h], edx
 
mov [cur.w], ebx
mov [cur.h], edi
mov [h], edi
sub eax, edi
shl eax, 2
shl edi, 2
sub ebx, edi
mov [cur_saved_interl], ebx
 
mov eax, edi
mov edi, cur_saved_data
@@:
mov esi, edx
add edx, [BytesPerScanLine]
mov ecx, [cur.w]
mov ecx, [w]
rep movsd
dec eax
add esi, ebx
dec edx
jnz @B
 
;draw cursor
mov ebx, [cur_saved_base]
mov edx, eax
mov edi, [cur_saved_base]
mov eax, [_dy]
shl eax, 5
add eax, [_dx]
shl eax, 2
 
mov esi, [hcursor]
mov esi, [esi+CURSOR.base]
lea edx, [esi+eax*4]
add esi, eax
.row:
mov ecx, [cur.w]
mov esi, edx
mov edi, ebx
add edx, 32*4
add ebx, [BytesPerScanLine]
mov ecx, [w]
.pix:
lodsd
test eax, 0xFF000000
750,7 → 771,8
add edi, 4
dec ecx
jnz .pix
 
add esi, edx
add edi, ebx
dec [h]
jnz .row
ret
/kernel/branches/kolibri_pe/video/vesa12.inc
438,17 → 438,16
push eax
push ecx
mov eax,[TASK_BASE]
sub eax, CURRENT_TASK
mov ecx,[eax+draw_data+RECT.left]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.left]
cmp ecx,0
jnz dbcblimitlset12
mov ecx,[eax+draw_data+RECT.top]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.top]
cmp ecx,0
jnz dbcblimitlset12
mov ecx,[eax+draw_data+RECT.right]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
cmp ecx,[Screen_Max_X]
jnz dbcblimitlset12
mov ecx,[eax+draw_data+RECT.bottom]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
cmp ecx,[Screen_Max_Y]
jnz dbcblimitlset12
pop ecx
797,15 → 796,14
 
push ecx
mov eax,[TASK_BASE]
sub eax, CURRENT_TASK
cmp dword [eax+draw_data+RECT.left], 0
cmp dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
jnz dbcblimitlset212
cmp dword [eax+draw_data+RECT.top], 0
cmp dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
jnz dbcblimitlset212
mov ecx,[eax+draw_data+RECT.right]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
cmp ecx,[Screen_Max_X]
jnz dbcblimitlset212
mov ecx,[eax+draw_data+RECT.bottom]
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
cmp ecx,[Screen_Max_Y]
jnz dbcblimitlset212
pop ecx
/kernel/branches/kolibri_pe/video/vesa20.inc
574,7 → 574,6
; ecx xe
; edx ye
; edi color
_vesa20_drawbar:
vesa20_drawbar:
pushad
call [disable_mouse]
/kernel/branches/kolibri_pe/kernel32.inc
219,6 → 219,13
 
include "network/stack.inc"
 
;include "drivers/uart.inc"
 
 
; Mouse pointer
 
include "gui/mouse.inc"
 
; Window skinning
 
include "gui/skincode.inc"