diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc index 56a2dc5b0a..ae75637222 100644 --- a/kernel/trunk/core/taskman.inc +++ b/kernel/trunk/core/taskman.inc @@ -906,7 +906,6 @@ common_app_entry: mov ebx, [current_slot] cmp [ebx+APPDATA.debugger_slot], 0 je .exit - ;mov eax, [current_slot] mov [ebx+APPDATA.state], TSTATE_RUN_SUSPENDED mov eax, [TASK_BASE] mov [eax+TASKDATA.state], TSTATE_RUN_SUSPENDED @@ -983,8 +982,6 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword mov [ebx+SLOT_BASE+APPDATA.cur_dir], eax rep movsd - ;shr ebx, 3 - ;mov dword [TASK_TABLE+ebx+TASKDATA.mem_start], 0 mov dword [ebx+SLOT_BASE+APPDATA.mem_start], 0 mov [ebx+SLOT_BASE+APPDATA.event_mask], dword 1+2+4;set default event flags (see 40 function) inc dword [process_number] @@ -1001,9 +998,6 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword mov [ebx+window_data+WDATA.fl_wstate], WSTATE_NORMAL mov [ebx+window_data+WDATA.fl_redraw], 1 add ebx, TASK_TABLE ;ebx - pointer to information about process - ;mov [ebx+TASKDATA.wnd_number], al;set window number on screen = process slot - - mov [ebx+TASKDATA.event_mask], dword 1+2+4;set default event flags (see 40 function) mov eax, [process_number] ; delete mov [ebx+TASKDATA.pid], eax ;set PID ; diff --git a/kernel/trunk/gui/event.inc b/kernel/trunk/gui/event.inc index a411348ca2..87726e30d9 100644 --- a/kernel/trunk/gui/event.inc +++ b/kernel/trunk/gui/event.inc @@ -513,11 +513,9 @@ get_event_for_app: ;; used from f10,f11,f23 ;retval: ; eax - event number (=0 => no events) movzx edi, bh ; bh is assumed as [current_slot_idx] - ;shl edi, 8 - ;mov ecx, [edi+SLOT_BASE+APPDATA.event_mask] + mov ecx, [ebx+APPDATA.event_mask] shl edi, 5 add edi, TASK_TABLE ; edi is assumed as [TASK_BASE] - mov ecx, [edi+TASKDATA.event_mask] and ecx, 0x7FFFFFFF ;-------------------------------------- align 4 @@ -557,10 +555,8 @@ align 4 align 4 .mouse_check: ; Mouse 5+1=6 push eax - ;mov eax, [current_slot] - ;mov eax, [eax + APPDATA.event_mask] - mov eax, [TASK_BASE] - mov eax, [eax + TASKDATA.event_mask] + mov eax, [current_slot] + mov eax, [eax + APPDATA.event_mask] test eax, 0x80000000 ; bit 31: active/inactive filter f.40 jz @f pop eax diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 8847106731..44195cafe7 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -1186,7 +1186,6 @@ proc setup_os_slot mov eax, edx shr eax, 3 add eax, TASK_TABLE - (SLOT_BASE shr 3) - ;mov [eax+TASKDATA.wnd_number], dh mov byte [eax+TASKDATA.pid], dh ret @@ -1549,7 +1548,6 @@ draw_num_text: add edx, esp mov ebx, [esp+64+32-8+4] ; add window start x & y - ;mov ecx, [TASK_BASE] mov edi, [current_slot_idx] mov ecx, edi @@ -1614,8 +1612,6 @@ sys_setup: dec ebx jnz @f - ;mov edi, [TASK_BASE] - ;mov eax, [edi+TASKDATA.mem_start] mov edi, [current_slot] mov eax, [edi+APPDATA.mem_start] add eax, edx @@ -1713,8 +1709,6 @@ sys_getsetup: dec ebx jnz @f - ;mov edi, [TASK_BASE] - ;mov ebx, [edi+TASKDATA.mem_start] mov edi, [current_slot] mov ebx, [edi+APPDATA.mem_start] add ebx, edx @@ -2311,10 +2305,6 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table .exit: ret ;------------------------------------------------------------------------------ -;sysfn_lastkey: ; 18.12 = return 0 (backward compatibility) -; and dword [esp+32], 0 -; ret -;------------------------------------------------------------------------------ sysfn_getversion: ; 18.13 = get kernel ID and version ; if given memory address belongs to kernel then error stdcall is_region_userspace, ecx, version_end-version_inf @@ -2698,7 +2688,6 @@ sys_cpuusage: ; Event mask (+71) mov EAX, dword [ecx*8 + SLOT_BASE + APPDATA.event_mask] - mov EAX, dword [ECX+TASK_TABLE+TASKDATA.event_mask] ; delete stosd ; Keyboard mode (+75) @@ -2941,7 +2930,7 @@ align 4 .set_mouse_event: add edi, sizeof.APPDATA add ebx, sizeof.TASKDATA - test [ebx+TASKDATA.event_mask], 0x80000000 + test [edi + SLOT_BASE + APPDATA.event_mask], 0x80000000 jz .pos_filter cmp edi, [esp] ; skip if filtration active @@ -2949,7 +2938,7 @@ align 4 ;-------------------------------------- align 4 .pos_filter: - test [ebx+TASKDATA.event_mask], 0x40000000 + test [edi + SLOT_BASE + APPDATA.event_mask], 0x40000000 jz .set mov esi, [ebx-twdw+WDATA.box.left] @@ -3413,11 +3402,8 @@ delay_ms: ; delay in 1/1000 sec align 4 set_app_param: mov edi, [current_slot] - mov edi, [TASK_BASE] - mov eax, ebx - ;xchg eax, [edi + APPDATA.event_mask] ; set new event mask - xchg eax, [edi + TASKDATA.event_mask] ; set new event mask - mov [esp+32], eax ; return old mask value + xchg ebx, [edi + APPDATA.event_mask] ; set new event mask + mov [esp+32], ebx ; return old mask value ret ;-----------------------------------------------------------------------------