optimization

git-svn-id: svn://kolibrios.org@427 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2007-03-22 12:01:05 +00:00
parent 6f7428a7e4
commit e449a2473e
16 changed files with 626 additions and 260 deletions

View File

@@ -134,6 +134,45 @@ SSE_FZ equ 0x8000
SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM) SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM)
struc TSS
{
._back rw 2
._esp0 rd 1
._ss0 rw 2
._esp1 rd 1
._ss1 rw 2
._esp2 rd 1
._ss2 rw 2
._cr3 rd 1
._eip rd 1
._eflags rd 1
._eax rd 1
._ecx rd 1
._edx rd 1
._ebx rd 1
._esp rd 1
._ebp rd 1
._esi rd 1
._edi rd 1
._es rw 2
._cs rw 2
._ss rw 2
._ds rw 2
._fs rw 2
._gs rw 2
._ldt rw 2
._trap rw 1
._io rw 1
rb 24
._io_map_0 rb 4096
._io_map_1 rb 4096
}
virtual at 0
TSS TSS
end virtual
OS_BASE equ 0x80000000 OS_BASE equ 0x80000000
window_data equ OS_BASE window_data equ OS_BASE
@@ -339,6 +378,20 @@ EVENT_EXTENDED equ 0x00000200
EV_INTR equ 1 EV_INTR equ 1
struc THR_DATA
{
rb (8192-512)
.pl0_stack:
.fpu_state rb 512
.pdbr rb 4096
}
THR_DATA_SIZE equ 4096*3
virtual at (OS_BASE-THR_DATA_SIZE)
thr_data THR_DATA
end virtual
struc SYS_VARS struc SYS_VARS
{ .bpp dd ? { .bpp dd ?
.scanline dd ? .scanline dd ?

View File

@@ -19,9 +19,8 @@ sys_debug_services_table:
debug_set_event_data: debug_set_event_data:
; in: ebx = pointer ; in: ebx = pointer
; destroys eax ; destroys eax
mov eax, [CURRENT_TASK] mov eax, [current_slot]
shl eax, 8 mov [eax+APPDATA.dbg_event_mem], ebx
mov [eax+SLOT_BASE+APPDATA.dbg_event_mem], ebx
ret ret
get_debuggee_slot: get_debuggee_slot:
@@ -453,9 +452,8 @@ debug_exc:
mov dr6, eax mov dr6, eax
; test if debugging ; test if debugging
cli cli
mov eax, [CURRENT_TASK] mov eax, [current_slot]
shl eax, 8 mov eax, [eax+APPDATA.debugger_slot]
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
test eax, eax test eax, eax
jnz .debug jnz .debug
sti sti

View File

@@ -152,14 +152,13 @@ align 4
proc get_notify stdcall, p_ev:dword proc get_notify stdcall, p_ev:dword
.wait: .wait:
mov ebx,[CURRENT_TASK] mov ebx,[current_slot]
shl ebx,8 test dword [ebx+APPDATA.event_mask],EVENT_NOTIFY
test dword [ebx+SLOT_BASE+0xA8],EVENT_NOTIFY
jz @f jz @f
and dword [ebx+SLOT_BASE+0xA8], not EVENT_NOTIFY and dword [ebx+APPDATA.event_mask], not EVENT_NOTIFY
mov edi, [p_ev] mov edi, [p_ev]
mov dword [edi], EV_INTR mov dword [edi], EV_INTR
mov eax, [ebx+SLOT_BASE+APPDATA.event] mov eax, [ebx+APPDATA.event]
mov dword [edi+4], eax mov dword [edi+4], eax
ret ret
@@: @@:
@@ -994,9 +993,8 @@ create_kernel_object:
test eax, eax test eax, eax
jz .fail jz .fail
mov ecx,[CURRENT_TASK] mov ecx,[current_slot]
shl ecx,8 add ecx, APP_OBJ_OFFSET
add ecx, SLOT_BASE+APP_OBJ_OFFSET
pushfd pushfd
cli cli
@@ -1036,3 +1034,68 @@ destroy_kernel_object:
ret ret
if 0
irq:
.irq0:
pusfd
pushad
push IRQ_0
jmp .master
.irq_1:
pusfd
pushad
push IRQ_1
jmp .master
.master:
mov ax, app_data
mov ds, eax
mov es, eax
mov ebx, [esp+4] ;IRQ_xx
mov eax, [irq_handlers+ebx+4]
call intr_handler
mov ecx, [esp+4]
cmp [irq_actids+ecx*4], 0
je @F
in al, 0x21
bts eax, ecx
out 0x21, al
mov al, 0x20
out 0x20, al
jmp .restart
.slave:
mov ax, app_data
mov ds, eax
mov es, eax
mov ebx, [esp+4] ;IRQ_xx
mov eax, [irq_handlers+ebx+4]
call intr_handler
mov ecx, [esp+4]
sub ecx, 8
cmp [irq_actids+ecx*4], 0
je @F
in al, 0xA1
bts eax, ecx
out 0xA1, al
mov al, 0x20
out 0xA0, al
out 0x20, al
.restart:
mov ebx, [next_slot]
test ebx, ebx
jz @F
mov [next_task],0
mov esi, [prev_slot]
call do_change_task
add esp, 4
iretd
end if

View File

@@ -227,10 +227,9 @@ except_19: ;sse exceptions handler
push ecx push ecx
push edx push edx
mov ebx, [CURRENT_TASK] mov ebx, [current_slot]
shl ebx, 8
mov eax, [ebx+SLOT_BASE+APPDATA.sse_handler] mov eax, [ebx+APPDATA.sse_handler]
test eax, eax test eax, eax
jz .default jz .default

View File

@@ -614,22 +614,21 @@ HEAP_TOP equ 0x5FC00000
align 4 align 4
proc init_heap proc init_heap
mov ebx,[CURRENT_TASK] mov ebx,[current_slot]
shl ebx,8 mov eax, [ebx+APPDATA.heap_top]
mov eax, [SLOT_BASE+APPDATA.heap_top+ebx]
test eax, eax test eax, eax
jz @F jz @F
sub eax,[SLOT_BASE+APPDATA.heap_base+ebx] sub eax,[ebx+APPDATA.heap_base]
sub eax, 4096 sub eax, 4096
ret ret
@@: @@:
mov esi, [SLOT_BASE+APPDATA.mem_size+ebx] mov esi, [ebx+APPDATA.mem_size]
add esi, 4095 add esi, 4095
and esi, not 4095 and esi, not 4095
mov [SLOT_BASE+APPDATA.mem_size+ebx], esi mov [ebx+APPDATA.mem_size], esi
mov eax, HEAP_TOP mov eax, HEAP_TOP
mov [SLOT_BASE+APPDATA.heap_base+ebx], esi mov [ebx+APPDATA.heap_base], esi
mov [SLOT_BASE+APPDATA.heap_top+ebx], eax mov [ebx+APPDATA.heap_top], eax
sub eax, esi sub eax, esi
; add esi, new_app_base ; add esi, new_app_base
@@ -651,12 +650,9 @@ proc user_alloc stdcall, alloc_size:dword
add ecx, (4095+4096) add ecx, (4095+4096)
and ecx, not 4095 and ecx, not 4095
mov ebx, [CURRENT_TASK] mov ebx, [current_slot]
shl ebx, 8 mov esi, dword [ebx+APPDATA.heap_base] ; heap_base
mov esi, dword [ebx+SLOT_BASE+APPDATA.heap_base]; heap_base mov edi, dword [ebx+APPDATA.heap_top] ; heap_top
mov edi, dword [ebx+SLOT_BASE+APPDATA.heap_top]; heap_top
; add esi, new_app_base
; add edi, new_app_base
l_0: l_0:
cmp esi, edi cmp esi, edi
jae m_exit jae m_exit
@@ -677,7 +673,6 @@ l_0:
or eax, FREE_BLOCK or eax, FREE_BLOCK
shr edx, 12 shr edx, 12
mov [page_tabs+edx*4], eax mov [page_tabs+edx*4], eax
@@: @@:
or ecx, USED_BLOCK or ecx, USED_BLOCK
mov [page_tabs+ebx*4], ecx mov [page_tabs+ebx*4], ecx
@@ -690,17 +685,15 @@ l_0:
dec ecx dec ecx
jnz @B jnz @B
mov edx, [CURRENT_TASK] mov edx, [current_slot]
shl edx, 8 mov ebx, [alloc_size]
mov ebx, [alloc_size] add ebx, 0xFFF
add ebx, 0xFFF and ebx, not 0xFFF
and ebx, not 0xFFF add ebx, [edx+APPDATA.mem_size]
add ebx, [SLOT_BASE+APPDATA.mem_size+edx] call update_mem_size
call update_mem_size
mov eax, esi mov eax, esi
add eax, 4096 add eax, 4096
; sub eax, new_app_base
ret ret
m_next: m_next:
add esi, eax add esi, eax
@@ -750,15 +743,12 @@ proc user_free stdcall, base:dword
dec ecx dec ecx
jnz .release jnz .release
.not_used: .not_used:
mov edx, [CURRENT_TASK] mov edx, [current_slot]
shl edx, 8 mov esi, dword [edx+APPDATA.heap_base]
mov esi, dword [edx+SLOT_BASE+APPDATA.heap_base]; heap_base mov edi, dword [edx+APPDATA.heap_top]
mov edi, dword [edx+SLOT_BASE+APPDATA.heap_top]; heap_top sub ebx, [edx+APPDATA.mem_size]
sub ebx, [edx+SLOT_BASE+APPDATA.mem_size]
neg ebx neg ebx
call update_mem_size call update_mem_size
; add esi, new_app_base
; add edi, new_app_base
shr esi, 12 shr esi, 12
shr edi, 12 shr edi, 12
@@: @@:

View File

@@ -303,12 +303,11 @@ proc new_mem_resize stdcall, new_size:dword
and edi,not 4095 and edi,not 4095
mov [new_size], edi mov [new_size], edi
mov edx,[CURRENT_TASK] mov edx,[current_slot]
shl edx,8 cmp [edx+APPDATA.heap_base],0
cmp [SLOT_BASE+APPDATA.heap_base+edx],0
jne .exit jne .exit
mov esi, [SLOT_BASE+APPDATA.mem_size+edx] mov esi, [edx+APPDATA.mem_size]
add esi, 4095 add esi, 4095
and esi, not 4095 and esi, not 4095
@@ -332,16 +331,13 @@ proc new_mem_resize stdcall, new_size:dword
jb @B jb @B
.update_size: .update_size:
mov ebx, [new_size] mov ebx, [new_size]
call update_mem_size call update_mem_size
xor eax, eax xor eax, eax
dec [pg_data.pg_mutex] dec [pg_data.pg_mutex]
ret ret
.expand: .expand:
; add edi, new_app_base
; add esi, new_app_base
push esi push esi
push edi push edi
@@ -405,14 +401,14 @@ proc new_mem_resize stdcall, new_size:dword
endp endp
update_mem_size: update_mem_size:
; in: edx = slot shl 8 ; in: edx = slot base
; ebx = new memory size ; ebx = new memory size
; destroys eax,ecx,edx ; destroys eax,ecx,edx
mov [SLOT_BASE+APPDATA.mem_size+edx],ebx mov [APPDATA.mem_size+edx],ebx
;search threads and update ;search threads and update
;application memory size infomation ;application memory size infomation
mov ecx,[SLOT_BASE+APPDATA.dir_table+edx] mov ecx,[APPDATA.dir_table+edx]
mov eax,2 mov eax,2
.search_threads: .search_threads:
@@ -456,38 +452,35 @@ proc page_fault_handler
.err_addr equ ebp-4 .err_addr equ ebp-4
pushad pushad
; push eax
; push edx
; mov edx, 0x400 ;bocsh
; mov al,0xff ;bocsh
; out dx, al ;bocsh
; pop edx
; pop eax
mov ebp, esp mov ebp, esp
mov eax, cr2 mov eax, cr2
push eax push eax
push ds
push es
mov ax, 0x10 mov ax, app_data
mov ds, ax mov ds, ax
mov es, ax mov es, ax
inc [pg_data.pages_faults] inc [pg_data.pages_faults]
push eax
push edx
mov edx, 0x400 ;bochs
mov al,0xff ;bochs
out dx, al ;bochs
pop edx
pop eax
mov ebx, [.err_addr] mov ebx, [.err_addr]
mov eax, [.err_code] mov eax, [.err_code]
cmp ebx, OS_BASE cmp ebx, OS_BASE
jb .user_space ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> jb .user_space ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;
cmp ebx, page_tabs cmp ebx, page_tabs
jb .kernel_space ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> jb .kernel_space ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp ebx, kernel_tabs cmp ebx, kernel_tabs
jb .alloc;.app_tabs ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> jb .alloc;.app_tabs ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp ebx, LFB_BASE cmp ebx, LFB_BASE
@@ -514,7 +507,7 @@ align 4
mov eax, [page_tabs+ebx*4] mov eax, [page_tabs+ebx*4]
test eax, 2 test eax, 2
jz .fail ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> jz .fail ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ;
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.alloc: .alloc:
call alloc_page call alloc_page
@@ -530,8 +523,6 @@ align 4
cld cld
rep stosd rep stosd
.exit: .exit:
pop es
pop ds
mov esp, ebp mov esp, ebp
popad popad
add esp, 4 add esp, 4
@@ -557,8 +548,6 @@ align 4
.core_tabs: .core_tabs:
.fail: .fail:
pop es
pop ds
mov esp, ebp mov esp, ebp
popad popad
add esp, 4 add esp, 4
@@ -729,15 +718,12 @@ sys_IPC:
align 4 align 4
proc set_ipc_buff proc set_ipc_buff
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8
add eax, SLOT_BASE
pushf pushf
cli cli
mov [eax+0xA0],ebx ;set fields in extended information area mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area
mov [eax+0xA4],ecx mov [eax+APPDATA.ipc_size],ecx
; add ebx, new_app_base
add ecx, ebx add ecx, ebx
add ecx, 4095 add ecx, 4095
and ecx, not 4095 and ecx, not 4095
@@ -914,14 +900,12 @@ new_services:
@@: @@:
cmp eax, 13 cmp eax, 13
ja @f ja @f
; add ebx, new_app_base
stdcall user_free, ebx stdcall user_free, ebx
mov [esp+36], eax mov [esp+36], eax
ret ret
@@: @@:
cmp eax, 14 cmp eax, 14
ja @f ja @f
; add ebx, new_app_base
cmp ebx, OS_BASE cmp ebx, OS_BASE
jae .fail jae .fail
stdcall get_event_ex, ebx, ecx stdcall get_event_ex, ebx, ecx
@@ -930,10 +914,9 @@ new_services:
@@: @@:
cmp eax, 15 cmp eax, 15
ja @f ja @f
mov ecx, [CURRENT_TASK] mov ecx, [current_slot]
shl ecx, 8 mov eax, [ecx+APPDATA.fpu_handler]
mov eax, [ecx+SLOT_BASE+APPDATA.fpu_handler] mov [ecx+APPDATA.fpu_handler], ebx
mov [ecx+SLOT_BASE+APPDATA.fpu_handler], ebx
mov [esp+36], eax mov [esp+36], eax
ret ret
@@: @@:
@@ -942,7 +925,6 @@ new_services:
test ebx, ebx test ebx, ebx
jz .fail jz .fail
; add ebx, new_app_base
cmp ebx, OS_BASE cmp ebx, OS_BASE
jae .fail jae .fail
stdcall get_service, ebx stdcall get_service, ebx
@@ -957,10 +939,9 @@ new_services:
@@: @@:
cmp eax, 18 cmp eax, 18
ja @f ja @f
mov ecx, [CURRENT_TASK] mov ecx, [current_slot]
shl ecx, 8 mov eax, [ecx+APPDATA.sse_handler]
mov eax, [ecx+SLOT_BASE+APPDATA.sse_handler] mov [ecx+APPDATA.sse_handler], ebx
mov [ecx+SLOT_BASE+APPDATA.sse_handler], ebx
mov [esp+36], eax mov [esp+36], eax
ret ret
@@: @@:

View File

@@ -138,7 +138,7 @@ find_next_task:
jb @f jb @f
mov edi, CURRENT_TASK mov edi, CURRENT_TASK
xor ebx, ebx xor ebx, ebx
@@: @@:
add edi,0x20 add edi,0x20
inc ebx inc ebx
@@ -237,3 +237,91 @@ updatecputimes:
jnz .newupdate jnz .newupdate
ret ret
if 0
MAX_PROIRITY 0 ; highest, used for kernel tasks
MAX_USER_PRIORITY 0 ; highest priority for user processes
USER_PRIORITY 7 ; default (should correspond to nice 0)
MIN_USER_PRIORITY 14 ; minimum priority for user processes
IDLE_PRIORITY 15 ; lowest, only IDLE process goes here
NR_SCHED_QUEUES 16 ; MUST equal IDLE_PRIORYTY + 1
rdy_head rd 16
align 4
pick_task:
xor eax, eax
.pick:
mov ebx, [rdy_head+eax*4]
test ebx, ebx
jz .next
mov [next_task], ebx
test [ebx+flags.billable]
jz @F
mov [bill_task], ebx
@@:
ret
.next:
inc eax
jmp .pick
; param
; eax= task
;
; retval
; eax= task
; ebx= queue
; ecx= front if 1 or back if 0
align 4
shed:
cmp [eax+.tics_left], 0 ;signed compare
mov ebx, [eax+.priority]
setg ecx
jg @F
mov edx, [eax+.tics_quantum]
mov [eax+.ticks_left], edx
cmp ebx, (IDLE_PRIORITY-1)
je @F
inc ebx
@@:
ret
; param
; eax= task
align 4
enqueue:
call shed ;eax
cmp [rdy_head+ebx*4],0
jnz @F
mov [rdy_head+ebx*4], eax
mov [rdy_tail+ebx*4], eax
mov [eax+.next_ready], 0
jmp .pick
@@:
test ecx, ecx
jz .back
mov ecx, [rdy_head+ebx*4]
mov [eax+.next_ready], ecx
mov [rdy_head+ebx*4], eax
jmp .pick
.back:
mov ecx, [rdy_tail+ebx*4]
mov [ecx+.next_ready], eax
mov [rdy_tail+ebx*4], eax
mov [eax+.next_ready], 0
.pick:
call pick_proc ;select next task
ret
end if

View File

@@ -118,9 +118,8 @@ exc_c:
; test if debugging ; test if debugging
cli cli
mov eax, [CURRENT_TASK] mov eax, [current_slot]
shl eax, 8 mov eax, [eax+APPDATA.debugger_slot]
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
test eax, eax test eax, eax
jnz .debug jnz .debug
sti sti

View File

@@ -55,9 +55,8 @@ sysenter_entry:
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP ; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app ; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
mov esp, [CURRENT_TASK] mov esp, [current_slot]
shl esp, 8 mov esp, [esp + APPDATA.pl0_stack]
mov esp, [SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP add esp, RING0_STACK_SIZE ; configure ESP
sti sti
;------------------ ;------------------
@@ -104,14 +103,12 @@ syscall_entry:
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP ; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app ; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
mov esp, [CURRENT_TASK] mov esp, [current_slot]
shl esp, 8 mov esp, [esp + APPDATA.pl0_stack]
mov esp, [SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP add esp, RING0_STACK_SIZE ; configure ESP
sti sti
;------------------ ;------------------
; push ds es
pushad pushad
cld cld
@@ -132,7 +129,6 @@ syscall_entry:
pop eax pop eax
popad popad
; pop es ds
;------------------ ;------------------
cli cli

View File

@@ -21,40 +21,6 @@ struc APP_HEADER_01
.i_icon dd ? ;+32 .i_icon dd ? ;+32
} }
struc TSS
{
._back rw 2
._esp0 rd 1
._ss0 rw 2
._esp1 rd 1
._ss1 rw 2
._esp2 rd 1
._ss2 rw 2
._cr3 rd 1
._eip rd 1
._eflags rd 1
._eax rd 1
._ecx rd 1
._edx rd 1
._ebx rd 1
._esp rd 1
._ebp rd 1
._esi rd 1
._edi rd 1
._es rw 2
._cs rw 2
._ss rw 2
._ds rw 2
._fs rw 2
._gs rw 2
._ldt rw 2
._trap rw 1
._io rw 1
}
virtual at 0
TSS TSS
end virtual
struc APP_PARAMS struc APP_PARAMS
{ .app_cmdline ;0x00 { .app_cmdline ;0x00
@@ -484,14 +450,19 @@ endp
align 4 align 4
set_cr3: set_cr3:
mov esi, [CURRENT_TASK]
mov ebx, esi mov ebx, [current_slot]
shl esi,8 mov [ebx+APPDATA.dir_table], eax
mov [SLOT_BASE+esi+0xB8],eax
imul ebx,tss_step
add ebx,tss_data
mov [ebx+28], eax
mov cr3, eax mov cr3, eax
; mov esi, [CURRENT_TASK]
; mov ebx, esi
; shl esi,8
; mov [SLOT_BASE+esi+0xB8],eax
; imul ebx,tss_step
; add ebx,tss_data
; mov [ebx+28], eax
; mov cr3, eax
ret ret
align 4 align 4
@@ -864,9 +835,7 @@ proc new_sys_threads
mov [slot], eax mov [slot], eax
mov esi,[CURRENT_TASK] mov esi,[current_slot]
shl esi,8
add esi,SLOT_BASE
mov ebx,esi ;ebx=esi - pointer to extended information about current thread mov ebx,esi ;ebx=esi - pointer to extended information about current thread
mov edi, eax mov edi, eax

View File

@@ -164,16 +164,15 @@ button_dececx:
sys_button: sys_button:
push edi push edi
mov edi,[CURRENT_TASK] mov edi,[current_slot]
shl edi,8
rol eax,16 rol eax,16
add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] add ax,word[edi+APPDATA.wnd_clientbox.left]
rol eax,16 rol eax,16
rol ebx,16 rol ebx,16
add bx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top] add bx,word[edi+APPDATA.wnd_clientbox.top]
rol ebx,16 rol ebx,16
pop edi pop edi
.forced: .forced:
test ecx,0x80000000 test ecx,0x80000000
jnz remove_button jnz remove_button
@@ -220,7 +219,7 @@ sys_button:
pop edx pop edx
and edx, 0xFFFF and edx, 0xFFFF
.newline: .newline:
call button_dececx call button_dececx
push edi push edi
xor edi, edi xor edi, edi
@@ -233,7 +232,7 @@ sys_button:
call drawbuttonframes call drawbuttonframes
button_no_draw: button_no_draw:
and ecx,0xffff and ecx,0xffff
@@ -268,7 +267,7 @@ sys_button:
mov bx,[esp+8+0] mov bx,[esp+8+0]
mov [eax],bx mov [eax],bx
noaddbutt: noaddbutt:
pop edx pop edx
pop ecx pop ecx
@@ -284,14 +283,14 @@ remove_button:
and ecx,0x7fffffff and ecx,0x7fffffff
rnewba2: rnewba2:
mov edi,[BTN_ADDR] mov edi,[BTN_ADDR]
mov eax,edi mov eax,edi
movzx ebx,word [edi] movzx ebx,word [edi]
inc bx inc bx
rnewba: rnewba:
dec bx dec bx
jz rnmba jz rnmba
@@ -317,7 +316,7 @@ remove_button:
jmp rnewba2 jmp rnewba2
rnmba: rnmba:
ret ret
@@ -328,17 +327,17 @@ find_pressed_button_frames:
movzx ebx,word [eax+0] movzx ebx,word [eax+0]
shl ebx,5 shl ebx,5
add ebx,window_data add ebx,window_data
mov ecx, [ebx+ WDATA.box.left] ; window x start mov ecx, [ebx+ WDATA.box.left] ; window x start
movzx edx,word [eax+4] ; button x start movzx edx,word [eax+4] ; button x start
add ecx,edx add ecx,edx
push ecx push ecx
mov dx,[eax+6] ; button x size mov dx,[eax+6] ; button x size
add cx,dx add cx,dx
mov esi,ecx mov esi,ecx
inc esi inc esi
mov ecx, [ebx+WDATA.box.top] ; window y start mov ecx, [ebx+WDATA.box.top] ; window y start
mov dx,[eax+8] ; button y start mov dx,[eax+8] ; button y start
add ecx,edx add ecx,edx
mov ebx,ecx mov ebx,ecx
mov dx,[eax+10] ; button y size mov dx,[eax+10] ; button y size

View File

@@ -114,9 +114,8 @@ create_event:
cld cld
rep movsd rep movsd
@@: @@:
mov ecx, [CURRENT_TASK] mov ecx, [current_slot]
shl ecx,8 add ecx, APP_OBJ_OFFSET
add ecx, SLOT_BASE+APP_OBJ_OFFSET
pushfd pushfd
cli cli
@@ -217,12 +216,11 @@ align 4
proc get_event_ex stdcall, p_ev:dword, timeout:dword proc get_event_ex stdcall, p_ev:dword, timeout:dword
.wait: .wait:
mov edx,[CURRENT_TASK] mov edx,[current_slot]
shl edx,8
; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0 ; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
; je .switch ; je .switch
add edx, SLOT_BASE+APP_EV_OFFSET add edx, APP_EV_OFFSET
mov eax, [edx+APPOBJ.fd] mov eax, [edx+APPOBJ.fd]
cmp eax, edx cmp eax, edx
@@ -300,9 +298,7 @@ wait_event:
test [eax+EVENT.state], MANUAL_RESET test [eax+EVENT.state], MANUAL_RESET
jnz .done jnz .done
mov edx,[CURRENT_TASK] mov edx,[current_slot]
shl edx,8
add edx, SLOT_BASE
pushfd pushfd
cli ;remove event from events cli ;remove event from events
@@ -575,15 +571,14 @@ get_event_for_app:
;mov edi,[TASK_BASE] ; mouse event ;mov edi,[TASK_BASE] ; mouse event
test [edi+TASKDATA.event_mask],dword 00100000b test [edi+TASKDATA.event_mask],dword 00100000b
jz no_mouse_event jz no_mouse_event
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8 test [eax+APPDATA.event_mask],dword 00100000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
jz no_mouse_event jz no_mouse_event
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b and [eax+APPDATA.event_mask],dword 0xffffffff-00100000b
popad popad
mov eax,6 mov eax,6
ret ret
no_mouse_event: no_mouse_event:
;mov edi,[TASK_BASE] ; DESKTOP BACKGROUND REDRAW ;mov edi,[TASK_BASE] ; DESKTOP BACKGROUND REDRAW
@@ -594,42 +589,39 @@ get_event_for_app:
popad popad
mov eax,5 mov eax,5
ret ret
no_eventoccur5: no_eventoccur5:
;mov edi,[TASK_BASE] ; IPC ;mov edi,[TASK_BASE] ; IPC
test [edi+TASKDATA.event_mask],dword 01000000b test [edi+TASKDATA.event_mask],dword 01000000b
jz no_ipc jz no_ipc
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8 test [eax+APPDATA.event_mask],dword 01000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b
jz no_ipc jz no_ipc
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b and [eax+APPDATA.event_mask],dword 0xffffffff-01000000b
popad popad
mov eax,7 mov eax,7
ret ret
no_ipc: no_ipc:
;mov edi,[TASK_BASE] ; STACK ;mov edi,[TASK_BASE] ; STACK
test [edi+TASKDATA.event_mask],dword 10000000b test [edi+TASKDATA.event_mask],dword 10000000b
jz no_stack_event jz no_stack_event
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8 test [eax+APPDATA.event_mask],dword 10000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b
jz no_stack_event jz no_stack_event
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b and [eax+APPDATA.event_mask],dword 0xffffffff-10000000b
popad popad
mov eax,8 mov eax,8
ret ret
no_stack_event: no_stack_event:
test byte [edi+TASKDATA.event_mask+1], 1 ; DEBUG test byte [edi+TASKDATA.event_mask+1], 1 ; DEBUG
jz .test_IRQ jz .test_IRQ
mov eax, [CURRENT_TASK] mov eax, [current_slot]
shl eax, 8 test byte [eax+APPDATA.event_mask+1], byte 1
test byte [eax+SLOT_BASE+APPDATA.event_mask+1], byte 1
jz .test_IRQ jz .test_IRQ
and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1 and byte [eax+APPDATA.event_mask+1], not 1
popad popad
mov eax, 9 mov eax, 9
ret ret

View File

@@ -1773,18 +1773,15 @@ random_shaped_window:
test eax, eax test eax, eax
jne rsw_no_address jne rsw_no_address
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8 mov [eax+APPDATA.wnd_shape],ebx
rsw_no_address:
mov [eax+SLOT_BASE+APPDATA.wnd_shape],ebx
rsw_no_address:
cmp eax,1 cmp eax,1
jne rsw_no_scale jne rsw_no_scale
mov eax,[CURRENT_TASK] mov eax,[current_slot]
shl eax,8 mov byte [eax+APPDATA.wnd_shape_scale], bl
mov byte [eax+SLOT_BASE+APPDATA.wnd_shape_scale], bl rsw_no_scale:
rsw_no_scale:
ret ret

View File

@@ -424,6 +424,12 @@ high_code:
mov [graph_data_l+4],al mov [graph_data_l+4],al
mov [graph_data_l+7],ah mov [graph_data_l+7],ah
mov [CURRENT_TASK],dword 1
mov [TASK_COUNT],dword 1
mov [TASK_BASE],dword TASK_DATA
mov [current_slot], SLOT_BASE+256
;!!!!!!!!!!!!!!!!!!!!!!!!!! ;!!!!!!!!!!!!!!!!!!!!!!!!!!
include 'detect/disks.inc' include 'detect/disks.inc'
;!!!!!!!!!!!!!!!!!!!!!!!!!! ;!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -446,10 +452,6 @@ include 'vmodeld.inc'
; LOAD FONTS I and II ; LOAD FONTS I and II
mov [CURRENT_TASK],dword 1
mov [TASK_COUNT],dword 1
mov [TASK_BASE],dword TASK_DATA
mov esi,char mov esi,char
xor ebx,ebx xor ebx,ebx
mov ecx,2560 mov ecx,2560
@@ -577,6 +579,7 @@ include 'vmodeld.inc'
; task list ; task list
mov [CURRENT_TASK],dword 1 mov [CURRENT_TASK],dword 1
mov [TASK_COUNT],dword 1 mov [TASK_COUNT],dword 1
mov [current_slot], SLOT_BASE+256
mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
mov [TASK_DATA+TASKDATA.pid], 1 ; process id number mov [TASK_DATA+TASKDATA.pid], 1 ; process id number
mov [TASK_DATA+TASKDATA.mem_start], 0 ; process base address mov [TASK_DATA+TASKDATA.mem_start], 0 ; process base address
@@ -3986,11 +3989,10 @@ sys_putimage:
.exit: .exit:
ret ret
@@: @@:
mov edi,[CURRENT_TASK] mov edi,[current_slot]
shl edi,8 add dx,word[edi+APPDATA.wnd_clientbox.top]
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
rol edx,16 rol edx,16
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] add dx,word[edi+APPDATA.wnd_clientbox.left]
rol edx,16 rol edx,16
.forced: .forced:
push ebp esi 0 push ebp esi 0
@@ -4089,12 +4091,11 @@ putimage_get32bpp:
; edi color ; edi color
__sys_drawbar: __sys_drawbar:
mov esi,[CURRENT_TASK] mov esi,[current_slot]
shl esi,8 add eax,[esi+APPDATA.wnd_clientbox.left]
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] add ecx,[esi+APPDATA.wnd_clientbox.left]
add ecx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] add ebx,[esi+APPDATA.wnd_clientbox.top]
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] add edx,[esi+APPDATA.wnd_clientbox.top]
add edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
.forced: .forced:
inc [mouse_pause] inc [mouse_pause]
; call [disable_mouse] ; call [disable_mouse]
@@ -4623,10 +4624,9 @@ syscall_setpixel: ; SetPixel
mov edx,[TASK_BASE] mov edx,[TASK_BASE]
add eax,[edx-twdw+WDATA.box.left] add eax,[edx-twdw+WDATA.box.left]
add ebx,[edx-twdw+WDATA.box.top] add ebx,[edx-twdw+WDATA.box.top]
mov edi,[CURRENT_TASK] mov edi,[current_slot]
shl edi,8 add eax,[edi+APPDATA.wnd_clientbox.left]
add eax,[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] add ebx,[edi+APPDATA.wnd_clientbox.top]
add ebx,[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
xor edi,edi ; no force xor edi,edi ; no force
; mov edi,1 ; mov edi,1
call [disable_mouse] call [disable_mouse]
@@ -4636,20 +4636,19 @@ align 4
syscall_writetext: ; WriteText syscall_writetext: ; WriteText
mov edi,[TASK_BASE] mov edi,[TASK_BASE]
mov ebp,[edi-twdw+WDATA.box.left] mov ebp,[edi-twdw+WDATA.box.left]
push esi push esi
mov esi,[CURRENT_TASK] mov esi,[current_slot]
shl esi,8 add ebp,[esi+APPDATA.wnd_clientbox.left]
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] shl ebp,16
shl ebp,16 add ebp,[edi-twdw+WDATA.box.top]
add ebp,[edi-twdw+WDATA.box.top] add bp,word[esi+APPDATA.wnd_clientbox.top]
add bp,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] pop esi
pop esi add ecx,[edi+TASKDATA.mem_start]
add ecx,[edi+TASKDATA.mem_start] add eax,ebp
add eax,ebp xor edi,edi
xor edi,edi jmp dtext
jmp dtext
align 4 align 4
@@ -4679,10 +4678,9 @@ syscall_drawrect: ; DrawRect
shr eax,16 shr eax,16
movzx edx,bx movzx edx,bx
shr ebx,16 shr ebx,16
mov esi,[CURRENT_TASK] mov esi,[current_slot]
shl esi,8 add eax,[esi+APPDATA.wnd_clientbox.left]
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] add ebx,[esi+APPDATA.wnd_clientbox.top]
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
add ecx,eax add ecx,eax
add edx,ebx add edx,ebx
jmp [drawbar] jmp [drawbar]
@@ -4761,17 +4759,16 @@ syscall_drawline: ; DrawLine
mov edi,[TASK_BASE] mov edi,[TASK_BASE]
movzx edx,word[edi-twdw+WDATA.box.left] movzx edx,word[edi-twdw+WDATA.box.left]
mov ebp,edx mov ebp,edx
mov esi,[CURRENT_TASK] mov esi,[current_slot]
shl esi,8 add ebp,[esi+APPDATA.wnd_clientbox.left]
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] add dx,word[esi+APPDATA.wnd_clientbox.left]
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
shl edx,16 shl edx,16
add ebp,edx add ebp,edx
movzx edx,word[edi-twdw+WDATA.box.top] movzx edx,word[edi-twdw+WDATA.box.top]
add eax,ebp add eax,ebp
mov ebp,edx mov ebp,edx
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] add ebp,[esi+APPDATA.wnd_clientbox.top]
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] add dx,word[esi+APPDATA.wnd_clientbox.top]
shl edx,16 shl edx,16
xor edi,edi xor edi,edi
add edx,ebp add edx,ebp

View File

@@ -134,10 +134,10 @@
; 0x80080000 -> 8FFFF additional app info, in 256 byte steps - 256 entries ; 0x80080000 -> 8FFFF additional app info, in 256 byte steps - 256 entries
; ;
; 00 11db name of app running ; 00 11db name of app running
; 10 dword pointer to fpu save area ; 0x10 dword pointer to fpu save area
; 14 dword event count ; 0x14 dword event count
; 18 dword user fpu exceptoins handler ; 0x18 dword user fpu exceptoins handler
; 1c dword user sse exceptions handler ; 0x1c dword user sse exceptions handler
; 20 dword PL0 stack base ; 20 dword PL0 stack base
; 24 dword user heap base ; 24 dword user heap base
; 28 dword user heap top ; 28 dword user heap top
@@ -234,4 +234,252 @@
; 0xFE000000 -> 0xFE7FFFFF application available LFB 8Mb ; 0xFE000000 -> 0xFE7FFFFF application available LFB 8Mb
; 0xFE800000 -> 0xFFFFFFFF kernel LFB part 24 Mb ; 0xFE800000 -> 0xFFFFFFFF kernel LFB part 24 Mb
if 0
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MeOS 079p1
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
kernel.asm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.
;; PROGRAMMING:
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Mario79)
;; VaStaNi
;; Trans
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (mike.dld)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Wildwest)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (halyavin)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Mihasik)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (andrew_programmer)
;; NoName
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Diamond)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Ghost)
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Serge)
;; Johnny_B
;;
;; Data in this file was originally part of MenuetOS project which is
;; distributed under the terms of GNU GPL. It is modified and redistributed as
;; part of KolibriOS project under the terms of GNU GPL.
;;
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa
;; PROGRAMMING:
;;
;; Ville Mikael Turjanmaa, villemt@itu.jyu.fi
;; - main os coding/design
;; Jan-Michael Brummer, BUZZ2@gmx.de
;; Felix Kaiser, info@felix-kaiser.de
;; Paolo Minazzi, paolo.minazzi@inwind.it
;; quickcode@mail.ru
;; Alexey, kgaz@crosswinds.net
;; Juan M. Caravaca, bitrider@wanadoo.es
;; kristol@nic.fi
;; Mike Hibbett, mikeh@oceanfree.net
;; Lasse Kuusijarvi, kuusijar@lut.fi
;; Jarek Pelczar, jarekp3@wp.pl
;;
;; KolibriOS is distributed in the hope that it will be useful, but WITHOUT ANY
;; WARRANTY. No author or distributor accepts responsibility to anyone for the
;; consequences of using it or for whether it serves any particular purpose or
;; works at all, unless he says so in writing. Refer to the GNU General Public
;; License (the "GPL") for full details.
;
;; Everyone is granted permission to copy, modify and redistribute KolibriOS,
;; but only under the conditions described in the GPL. A copy of this license
;; is supposed to have been given to you along with KolibriOS so you can know
;; your rights and responsibilities. It should be in a file named COPYING.
;; Among other things, the copyright notice and this notice must be preserved
;; on all copies.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS Team
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.
;;
;; Distributed under terms of the GNU General Public License
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
fdo.inc
kernel16.inc
kernel32.inc
vmodeld.inc
vmodeint.inc
blkdev/cd_drv.inc
blkdev/flp_drv.inc
blkdev/hd_drv.inc
blkdev/rd.inc
boot/shutdown.inc
bus/pci/pci16.inc
bus/pci/pci32.inc
core/sync.inc
core/sys32.inc
detect/commouse.inc
detect/dev_fd.inc
detect/dev_hdcd.inc
detect/sear_par.inc
fs/fat12.inc
fs/fat32.inc
fs/fs.inc
fs/fs_lfn.inc
fs/part_set.inc
network/icmp.inc
network/ip.inc
network/queue.inc
network/socket.inc
network/stack.inc
network/tcp.inc
network/udp.inc
network/eth_drv/arp.inc
network/eth_drv/ethernet.inc
network/eth_drv/drivers/3c59x.inc
network/eth_drv/drivers/i8255x.inc
network/eth_drv/drivers/pcnet32.inc
network/eth_drv/drivers/rtl8029.inc
network/eth_drv/drivers/rtl8139.inc
network/eth_drv/drivers/rtl8169.inc
network/eth_drv/drivers/sis900.inc
sound/playnote.inc
video/vesa12.inc
video/vesa20.inc
video/vga.inc
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS Team <EFBFBD>
Menuet OS Team
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa
;;
;; Distributed under terms of the GNU General Public License
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
blkdev/cdrom.inc
blkdev/fdc.inc
boot/bootcode.inc
core/sched.inc
gui/button.inc
gui/event.inc
gui/mouse.inc
gui/window.inc
hid/keyboard.inc
sound/sb16.inc
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS Team
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.
;;
;; Distributed under terms of the GNU General Public License
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
kglobals.inc
unpacker.inc
const.inc
blkdev/rdsave.inc
boot/preboot.inc
boot/rdload.inc
core/debug.inc
core/dll.inc
core/exports.inc
core/fpu.inc
core/heap.inc
core/malloc.inc
core/memory.inc
core/syscall.inc
core/taskman.inc
detect/disks.inc
detect/ps2mouse.inc
docs/apm.txt
docs/sysfuncr.txt
docs/sysfuncs.txt
drivers/ati2d.asm
drivers/ensoniq.asm
drivers/infinity.asm
drivers/mixer.asm
drivers/sceletone.asm
drivers/sis.asm
drivers/sound.asm
drivers/codec.inc
drivers/imports.inc
drivers/main.inc
drivers/mix_mmx.inc
drivers/mix_sse2.inc
fs/iso9660.inc
fs/ntfs.inc
gui/font.inc
gui/skincode.inc
gui/skindata.inc
hid/m_com1.inc
hid/m_com2.inc
hid/m_ps2.inc
hid/mousedrv.inc
hid/set_dtc.inc
network/eth_drv/pci.inc
skin/default.asm
skin/me_skin.inc
video/cursors.inc
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memmap.inc
boot/booteng.inc
boot/bootet.inc
boot/bootge.inc
boot/bootru.inc
boot/et.inc
boot/ru.inc
end if

View File

@@ -267,15 +267,13 @@ proc set_cursor stdcall, hcursor:dword
jne .fail jne .fail
; cmp [eax+CURSOR.size], CURSOR_SIZE ; cmp [eax+CURSOR.size], CURSOR_SIZE
; jne .fail ; jne .fail
mov ebx, [CURRENT_TASK] mov ebx, [current_slot]
shl ebx, 8 xchg eax, [ebx+APPDATA.cursor]
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
ret ret
.fail: .fail:
mov eax, [def_cursor] mov eax, [def_cursor]
mov ebx, [CURRENT_TASK] mov ebx, [current_slot]
shl ebx, 8 xchg eax, [ebx+APPDATA.cursor]
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
ret ret
endp endp
@@ -398,12 +396,11 @@ proc delete_cursor stdcall, hcursor:dword
cmp ebx, [esi+CURSOR.pid] cmp ebx, [esi+CURSOR.pid]
jne .fail jne .fail
mov ebx, [CURRENT_TASK] mov ebx, [current_slot]
shl ebx, 8 cmp esi, [ebx+APPDATA.cursor]
cmp esi, [ebx+SLOT_BASE+APPDATA.cursor]
jne @F jne @F
mov eax, [def_cursor] mov eax, [def_cursor]
mov [ebx+SLOT_BASE+APPDATA.cursor], eax mov [ebx+APPDATA.cursor], eax
@@: @@:
mov eax, [hcursor] mov eax, [hcursor]
call [eax+APPOBJ.destroy] call [eax+APPOBJ.destroy]