/kernel/branches/flat_kernel/const.inc |
---|
134,6 → 134,45 |
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 |
window_data equ OS_BASE |
339,6 → 378,20 |
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 |
{ .bpp dd ? |
.scanline dd ? |
/kernel/branches/flat_kernel/core/debug.inc |
---|
19,9 → 19,8 |
debug_set_event_data: |
; in: ebx = pointer |
; destroys eax |
mov eax, [CURRENT_TASK] |
shl eax, 8 |
mov [eax+SLOT_BASE+APPDATA.dbg_event_mem], ebx |
mov eax, [current_slot] |
mov [eax+APPDATA.dbg_event_mem], ebx |
ret |
get_debuggee_slot: |
453,9 → 452,8 |
mov dr6, eax |
; test if debugging |
cli |
mov eax, [CURRENT_TASK] |
shl eax, 8 |
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot] |
mov eax, [current_slot] |
mov eax, [eax+APPDATA.debugger_slot] |
test eax, eax |
jnz .debug |
sti |
/kernel/branches/flat_kernel/core/dll.inc |
---|
152,14 → 152,13 |
proc get_notify stdcall, p_ev:dword |
.wait: |
mov ebx,[CURRENT_TASK] |
shl ebx,8 |
test dword [ebx+SLOT_BASE+0xA8],EVENT_NOTIFY |
mov ebx,[current_slot] |
test dword [ebx+APPDATA.event_mask],EVENT_NOTIFY |
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 dword [edi], EV_INTR |
mov eax, [ebx+SLOT_BASE+APPDATA.event] |
mov eax, [ebx+APPDATA.event] |
mov dword [edi+4], eax |
ret |
@@: |
994,9 → 993,8 |
test eax, eax |
jz .fail |
mov ecx,[CURRENT_TASK] |
shl ecx,8 |
add ecx, SLOT_BASE+APP_OBJ_OFFSET |
mov ecx,[current_slot] |
add ecx, APP_OBJ_OFFSET |
pushfd |
cli |
1036,3 → 1034,68 |
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 |
/kernel/branches/flat_kernel/core/fpu.inc |
---|
227,10 → 227,9 |
push ecx |
push edx |
mov ebx, [CURRENT_TASK] |
shl ebx, 8 |
mov ebx, [current_slot] |
mov eax, [ebx+SLOT_BASE+APPDATA.sse_handler] |
mov eax, [ebx+APPDATA.sse_handler] |
test eax, eax |
jz .default |
/kernel/branches/flat_kernel/core/heap.inc |
---|
614,22 → 614,21 |
align 4 |
proc init_heap |
mov ebx,[CURRENT_TASK] |
shl ebx,8 |
mov eax, [SLOT_BASE+APPDATA.heap_top+ebx] |
mov ebx,[current_slot] |
mov eax, [ebx+APPDATA.heap_top] |
test eax, eax |
jz @F |
sub eax,[SLOT_BASE+APPDATA.heap_base+ebx] |
sub eax,[ebx+APPDATA.heap_base] |
sub eax, 4096 |
ret |
@@: |
mov esi, [SLOT_BASE+APPDATA.mem_size+ebx] |
mov esi, [ebx+APPDATA.mem_size] |
add esi, 4095 |
and esi, not 4095 |
mov [SLOT_BASE+APPDATA.mem_size+ebx], esi |
mov [ebx+APPDATA.mem_size], esi |
mov eax, HEAP_TOP |
mov [SLOT_BASE+APPDATA.heap_base+ebx], esi |
mov [SLOT_BASE+APPDATA.heap_top+ebx], eax |
mov [ebx+APPDATA.heap_base], esi |
mov [ebx+APPDATA.heap_top], eax |
sub eax, esi |
; add esi, new_app_base |
651,12 → 650,9 |
add ecx, (4095+4096) |
and ecx, not 4095 |
mov ebx, [CURRENT_TASK] |
shl ebx, 8 |
mov esi, dword [ebx+SLOT_BASE+APPDATA.heap_base]; heap_base |
mov edi, dword [ebx+SLOT_BASE+APPDATA.heap_top]; heap_top |
; add esi, new_app_base |
; add edi, new_app_base |
mov ebx, [current_slot] |
mov esi, dword [ebx+APPDATA.heap_base] ; heap_base |
mov edi, dword [ebx+APPDATA.heap_top] ; heap_top |
l_0: |
cmp esi, edi |
jae m_exit |
677,7 → 673,6 |
or eax, FREE_BLOCK |
shr edx, 12 |
mov [page_tabs+edx*4], eax |
@@: |
or ecx, USED_BLOCK |
mov [page_tabs+ebx*4], ecx |
690,17 → 685,15 |
dec ecx |
jnz @B |
mov edx, [CURRENT_TASK] |
shl edx, 8 |
mov edx, [current_slot] |
mov ebx, [alloc_size] |
add ebx, 0xFFF |
and ebx, not 0xFFF |
add ebx, [SLOT_BASE+APPDATA.mem_size+edx] |
add ebx, [edx+APPDATA.mem_size] |
call update_mem_size |
mov eax, esi |
add eax, 4096 |
; sub eax, new_app_base |
ret |
m_next: |
add esi, eax |
750,15 → 743,12 |
dec ecx |
jnz .release |
.not_used: |
mov edx, [CURRENT_TASK] |
shl edx, 8 |
mov esi, dword [edx+SLOT_BASE+APPDATA.heap_base]; heap_base |
mov edi, dword [edx+SLOT_BASE+APPDATA.heap_top]; heap_top |
sub ebx, [edx+SLOT_BASE+APPDATA.mem_size] |
mov edx, [current_slot] |
mov esi, dword [edx+APPDATA.heap_base] |
mov edi, dword [edx+APPDATA.heap_top] |
sub ebx, [edx+APPDATA.mem_size] |
neg ebx |
call update_mem_size |
; add esi, new_app_base |
; add edi, new_app_base |
shr esi, 12 |
shr edi, 12 |
@@: |
/kernel/branches/flat_kernel/core/memory.inc |
---|
303,12 → 303,11 |
and edi,not 4095 |
mov [new_size], edi |
mov edx,[CURRENT_TASK] |
shl edx,8 |
cmp [SLOT_BASE+APPDATA.heap_base+edx],0 |
mov edx,[current_slot] |
cmp [edx+APPDATA.heap_base],0 |
jne .exit |
mov esi, [SLOT_BASE+APPDATA.mem_size+edx] |
mov esi, [edx+APPDATA.mem_size] |
add esi, 4095 |
and esi, not 4095 |
338,10 → 337,7 |
xor eax, eax |
dec [pg_data.pg_mutex] |
ret |
.expand: |
; add edi, new_app_base |
; add esi, new_app_base |
push esi |
push edi |
405,14 → 401,14 |
endp |
update_mem_size: |
; in: edx = slot shl 8 |
; in: edx = slot base |
; ebx = new memory size |
; destroys eax,ecx,edx |
mov [SLOT_BASE+APPDATA.mem_size+edx],ebx |
mov [APPDATA.mem_size+edx],ebx |
;search threads and update |
;application memory size infomation |
mov ecx,[SLOT_BASE+APPDATA.dir_table+edx] |
mov ecx,[APPDATA.dir_table+edx] |
mov eax,2 |
.search_threads: |
456,38 → 452,35 |
.err_addr equ ebp-4 |
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 eax, cr2 |
push eax |
push ds |
push es |
mov ax, 0x10 |
mov ax, app_data |
mov ds, ax |
mov es, ax |
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 eax, [.err_code] |
cmp ebx, OS_BASE |
jb .user_space ;ñòðàíèöà â ïàìÿòè ïðèëîæåíè |
jb .user_space ;ñòðàíèöà â ïàìÿòè ïðèëîæåíèÿ ; |
cmp ebx, page_tabs |
jb .kernel_space ;ñòðàíèöà â ïàìÿòè ÿäðà |
cmp ebx, kernel_tabs |
jb .alloc;.app_tabs ;òàáëèöû ñòðàíèö ïðèëîæåíè |
jb .alloc;.app_tabs ;òàáëèöû ñòðàíèö ïðèëîæåíèÿ ; |
;ïðîñòî ñîçäàäèì îäíó |
cmp ebx, LFB_BASE |
514,7 → 507,7 |
mov eax, [page_tabs+ebx*4] |
test eax, 2 |
jz .fail ;àäðåñ íå çàðåçåðâèðîâàí äë |
jz .fail ;àäðåñ íå çàðåçåðâèðîâàí äëÿ ; |
;èñïîëüçîâàíèÿ. Îøèáêà |
.alloc: |
call alloc_page |
530,8 → 523,6 |
cld |
rep stosd |
.exit: |
pop es |
pop ds |
mov esp, ebp |
popad |
add esp, 4 |
557,8 → 548,6 |
.core_tabs: |
.fail: |
pop es |
pop ds |
mov esp, ebp |
popad |
add esp, 4 |
729,15 → 718,12 |
align 4 |
proc set_ipc_buff |
mov eax,[CURRENT_TASK] |
shl eax,8 |
add eax, SLOT_BASE |
mov eax,[current_slot] |
pushf |
cli |
mov [eax+0xA0],ebx ;set fields in extended information area |
mov [eax+0xA4],ecx |
mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area |
mov [eax+APPDATA.ipc_size],ecx |
; add ebx, new_app_base |
add ecx, ebx |
add ecx, 4095 |
and ecx, not 4095 |
914,7 → 900,6 |
@@: |
cmp eax, 13 |
ja @f |
; add ebx, new_app_base |
stdcall user_free, ebx |
mov [esp+36], eax |
ret |
921,7 → 906,6 |
@@: |
cmp eax, 14 |
ja @f |
; add ebx, new_app_base |
cmp ebx, OS_BASE |
jae .fail |
stdcall get_event_ex, ebx, ecx |
930,10 → 914,9 |
@@: |
cmp eax, 15 |
ja @f |
mov ecx, [CURRENT_TASK] |
shl ecx, 8 |
mov eax, [ecx+SLOT_BASE+APPDATA.fpu_handler] |
mov [ecx+SLOT_BASE+APPDATA.fpu_handler], ebx |
mov ecx, [current_slot] |
mov eax, [ecx+APPDATA.fpu_handler] |
mov [ecx+APPDATA.fpu_handler], ebx |
mov [esp+36], eax |
ret |
@@: |
942,7 → 925,6 |
test ebx, ebx |
jz .fail |
; add ebx, new_app_base |
cmp ebx, OS_BASE |
jae .fail |
stdcall get_service, ebx |
957,10 → 939,9 |
@@: |
cmp eax, 18 |
ja @f |
mov ecx, [CURRENT_TASK] |
shl ecx, 8 |
mov eax, [ecx+SLOT_BASE+APPDATA.sse_handler] |
mov [ecx+SLOT_BASE+APPDATA.sse_handler], ebx |
mov ecx, [current_slot] |
mov eax, [ecx+APPDATA.sse_handler] |
mov [ecx+APPDATA.sse_handler], ebx |
mov [esp+36], eax |
ret |
@@: |
/kernel/branches/flat_kernel/core/sched.inc |
---|
237,3 → 237,91 |
jnz .newupdate |
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 |
/kernel/branches/flat_kernel/core/sys32.inc |
---|
118,9 → 118,8 |
; test if debugging |
cli |
mov eax, [CURRENT_TASK] |
shl eax, 8 |
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot] |
mov eax, [current_slot] |
mov eax, [eax+APPDATA.debugger_slot] |
test eax, eax |
jnz .debug |
sti |
/kernel/branches/flat_kernel/core/syscall.inc |
---|
55,9 → 55,8 |
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP |
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app |
mov esp, [CURRENT_TASK] |
shl esp, 8 |
mov esp, [SLOT_BASE + esp + APPDATA.pl0_stack] |
mov esp, [current_slot] |
mov esp, [esp + APPDATA.pl0_stack] |
add esp, RING0_STACK_SIZE ; configure ESP |
sti |
;------------------ |
104,14 → 103,12 |
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP |
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app |
mov esp, [CURRENT_TASK] |
shl esp, 8 |
mov esp, [SLOT_BASE + esp + APPDATA.pl0_stack] |
mov esp, [current_slot] |
mov esp, [esp + APPDATA.pl0_stack] |
add esp, RING0_STACK_SIZE ; configure ESP |
sti |
;------------------ |
; push ds es |
pushad |
cld |
132,7 → 129,6 |
pop eax |
popad |
; pop es ds |
;------------------ |
cli |
/kernel/branches/flat_kernel/core/taskman.inc |
---|
21,41 → 21,7 |
.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 |
{ .app_cmdline ;0x00 |
.app_path ;0x04 |
484,14 → 450,19 |
align 4 |
set_cr3: |
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 ebx, [current_slot] |
mov [ebx+APPDATA.dir_table], 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 |
align 4 |
864,9 → 835,7 |
mov [slot], eax |
mov esi,[CURRENT_TASK] |
shl esi,8 |
add esi,SLOT_BASE |
mov esi,[current_slot] |
mov ebx,esi ;ebx=esi - pointer to extended information about current thread |
mov edi, eax |
/kernel/branches/flat_kernel/gui/button.inc |
---|
164,13 → 164,12 |
sys_button: |
push edi |
mov edi,[CURRENT_TASK] |
shl edi,8 |
mov edi,[current_slot] |
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 ebx,16 |
add bx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
add bx,word[edi+APPDATA.wnd_clientbox.top] |
rol ebx,16 |
pop edi |
.forced: |
/kernel/branches/flat_kernel/gui/event.inc |
---|
114,9 → 114,8 |
cld |
rep movsd |
@@: |
mov ecx, [CURRENT_TASK] |
shl ecx,8 |
add ecx, SLOT_BASE+APP_OBJ_OFFSET |
mov ecx, [current_slot] |
add ecx, APP_OBJ_OFFSET |
pushfd |
cli |
217,12 → 216,11 |
proc get_event_ex stdcall, p_ev:dword, timeout:dword |
.wait: |
mov edx,[CURRENT_TASK] |
shl edx,8 |
mov edx,[current_slot] |
; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0 |
; je .switch |
add edx, SLOT_BASE+APP_EV_OFFSET |
add edx, APP_EV_OFFSET |
mov eax, [edx+APPOBJ.fd] |
cmp eax, edx |
300,9 → 298,7 |
test [eax+EVENT.state], MANUAL_RESET |
jnz .done |
mov edx,[CURRENT_TASK] |
shl edx,8 |
add edx, SLOT_BASE |
mov edx,[current_slot] |
pushfd |
cli ;remove event from events |
575,11 → 571,10 |
;mov edi,[TASK_BASE] ; mouse event |
test [edi+TASKDATA.event_mask],dword 00100000b |
jz no_mouse_event |
mov eax,[CURRENT_TASK] |
shl eax,8 |
test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b |
mov eax,[current_slot] |
test [eax+APPDATA.event_mask],dword 00100000b |
jz no_mouse_event |
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b |
and [eax+APPDATA.event_mask],dword 0xffffffff-00100000b |
popad |
mov eax,6 |
ret |
599,11 → 594,10 |
;mov edi,[TASK_BASE] ; IPC |
test [edi+TASKDATA.event_mask],dword 01000000b |
jz no_ipc |
mov eax,[CURRENT_TASK] |
shl eax,8 |
test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b |
mov eax,[current_slot] |
test [eax+APPDATA.event_mask],dword 01000000b |
jz no_ipc |
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b |
and [eax+APPDATA.event_mask],dword 0xffffffff-01000000b |
popad |
mov eax,7 |
ret |
613,11 → 607,10 |
;mov edi,[TASK_BASE] ; STACK |
test [edi+TASKDATA.event_mask],dword 10000000b |
jz no_stack_event |
mov eax,[CURRENT_TASK] |
shl eax,8 |
test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b |
mov eax,[current_slot] |
test [eax+APPDATA.event_mask],dword 10000000b |
jz no_stack_event |
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b |
and [eax+APPDATA.event_mask],dword 0xffffffff-10000000b |
popad |
mov eax,8 |
ret |
625,11 → 618,10 |
test byte [edi+TASKDATA.event_mask+1], 1 ; DEBUG |
jz .test_IRQ |
mov eax, [CURRENT_TASK] |
shl eax, 8 |
test byte [eax+SLOT_BASE+APPDATA.event_mask+1], byte 1 |
mov eax, [current_slot] |
test byte [eax+APPDATA.event_mask+1], byte 1 |
jz .test_IRQ |
and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1 |
and byte [eax+APPDATA.event_mask+1], not 1 |
popad |
mov eax, 9 |
ret |
/kernel/branches/flat_kernel/gui/window.inc |
---|
1773,17 → 1773,14 |
test eax, eax |
jne rsw_no_address |
mov eax,[CURRENT_TASK] |
shl eax,8 |
mov [eax+SLOT_BASE+APPDATA.wnd_shape],ebx |
mov eax,[current_slot] |
mov [eax+APPDATA.wnd_shape],ebx |
rsw_no_address: |
cmp eax,1 |
jne rsw_no_scale |
mov eax,[CURRENT_TASK] |
shl eax,8 |
mov byte [eax+SLOT_BASE+APPDATA.wnd_shape_scale], bl |
mov eax,[current_slot] |
mov byte [eax+APPDATA.wnd_shape_scale], bl |
rsw_no_scale: |
ret |
/kernel/branches/flat_kernel/kernel.asm |
---|
424,6 → 424,12 |
mov [graph_data_l+4],al |
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' |
;!!!!!!!!!!!!!!!!!!!!!!!!!! |
446,10 → 452,6 |
; LOAD FONTS I and II |
mov [CURRENT_TASK],dword 1 |
mov [TASK_COUNT],dword 1 |
mov [TASK_BASE],dword TASK_DATA |
mov esi,char |
xor ebx,ebx |
mov ecx,2560 |
577,6 → 579,7 |
; task list |
mov [CURRENT_TASK],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.pid], 1 ; process id number |
mov [TASK_DATA+TASKDATA.mem_start], 0 ; process base address |
3986,11 → 3989,10 |
.exit: |
ret |
@@: |
mov edi,[CURRENT_TASK] |
shl edi,8 |
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
mov edi,[current_slot] |
add dx,word[edi+APPDATA.wnd_clientbox.top] |
rol edx,16 |
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add dx,word[edi+APPDATA.wnd_clientbox.left] |
rol edx,16 |
.forced: |
push ebp esi 0 |
4089,12 → 4091,11 |
; edi color |
__sys_drawbar: |
mov esi,[CURRENT_TASK] |
shl esi,8 |
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add ecx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
add edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
mov esi,[current_slot] |
add eax,[esi+APPDATA.wnd_clientbox.left] |
add ecx,[esi+APPDATA.wnd_clientbox.left] |
add ebx,[esi+APPDATA.wnd_clientbox.top] |
add edx,[esi+APPDATA.wnd_clientbox.top] |
.forced: |
inc [mouse_pause] |
; call [disable_mouse] |
4623,10 → 4624,9 |
mov edx,[TASK_BASE] |
add eax,[edx-twdw+WDATA.box.left] |
add ebx,[edx-twdw+WDATA.box.top] |
mov edi,[CURRENT_TASK] |
shl edi,8 |
add eax,[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add ebx,[edi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
mov edi,[current_slot] |
add eax,[edi+APPDATA.wnd_clientbox.left] |
add ebx,[edi+APPDATA.wnd_clientbox.top] |
xor edi,edi ; no force |
; mov edi,1 |
call [disable_mouse] |
4639,12 → 4639,11 |
mov edi,[TASK_BASE] |
mov ebp,[edi-twdw+WDATA.box.left] |
push esi |
mov esi,[CURRENT_TASK] |
shl esi,8 |
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
mov esi,[current_slot] |
add ebp,[esi+APPDATA.wnd_clientbox.left] |
shl ebp,16 |
add ebp,[edi-twdw+WDATA.box.top] |
add bp,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
add bp,word[esi+APPDATA.wnd_clientbox.top] |
pop esi |
add ecx,[edi+TASKDATA.mem_start] |
add eax,ebp |
4679,10 → 4678,9 |
shr eax,16 |
movzx edx,bx |
shr ebx,16 |
mov esi,[CURRENT_TASK] |
shl esi,8 |
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
mov esi,[current_slot] |
add eax,[esi+APPDATA.wnd_clientbox.left] |
add ebx,[esi+APPDATA.wnd_clientbox.top] |
add ecx,eax |
add edx,ebx |
jmp [drawbar] |
4761,17 → 4759,16 |
mov edi,[TASK_BASE] |
movzx edx,word[edi-twdw+WDATA.box.left] |
mov ebp,edx |
mov esi,[CURRENT_TASK] |
shl esi,8 |
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.left] |
mov esi,[current_slot] |
add ebp,[esi+APPDATA.wnd_clientbox.left] |
add dx,word[esi+APPDATA.wnd_clientbox.left] |
shl edx,16 |
add ebp,edx |
movzx edx,word[edi-twdw+WDATA.box.top] |
add eax,ebp |
mov ebp,edx |
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top] |
add ebp,[esi+APPDATA.wnd_clientbox.top] |
add dx,word[esi+APPDATA.wnd_clientbox.top] |
shl edx,16 |
xor edi,edi |
add edx,ebp |
/kernel/branches/flat_kernel/memmap.inc |
---|
134,10 → 134,10 |
; 0x80080000 -> 8FFFF additional app info, in 256 byte steps - 256 entries |
; |
; 00 11db name of app running |
; 10 dword pointer to fpu save area |
; 14 dword event count |
; 18 dword user fpu exceptoins handler |
; 1c dword user sse exceptions handler |
; 0x10 dword pointer to fpu save area |
; 0x14 dword event count |
; 0x18 dword user fpu exceptoins handler |
; 0x1c dword user sse exceptions handler |
; 20 dword PL0 stack base |
; 24 dword user heap base |
; 28 dword user heap top |
234,4 → 234,252 |
; 0xFE000000 -> 0xFE7FFFFF application available LFB 8Mb |
; 0xFE800000 -> 0xFFFFFFFF kernel LFB part 24 Mb |
if 0 |
Ýòà áàäÿãà ñ êîïèðàéòàìè óæå çàäîëáàëà. Ïðèõîäèòñÿ äåëàòü âñ¸ ñàìîìó |
Âîò ïðîåêò çàãîëîâêîâ. |
Äëÿ ñðàâíåíèÿ ÿ áðàë èñõîäíèêè MeOS 079p1 |
Åñëè ôàéë ïîïàë â îäèí èç ñïèñêîâ îøèáî÷íî, óêàæèòå. |
Ñïèñîê ðàçðàáîò÷èêîâ ÿäðà KolibriOS âçÿò èç ïîñëåäíåãî äèñòðèáóòèâà. |
Åñëè êîãî-òî çàáûëè, óêàæèòå |
×åðåç äâå íåäåëè ÿ ïðîñòàâëþ çàãîëîâêè íà âñå ïåðå÷èñëåííûå ôàéëû. |
kernel.asm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; |
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. |
;; PROGRAMMING: |
;; Èâàí Ïîääóáíûé |
;; Ìàðàò Çàêèÿíîâ (Mario79) |
;; VaStaNi |
;; Trans |
;; Ìèõàèë Ñåìåíÿêî (mike.dld) |
;; Ñåðãåé Êóçüìèí (Wildwest) |
;; Õàëÿâèí Àíäðåé (halyavin) |
;; Ìèõàèë Ëèñîâèí (Mihasik) |
;; Àíäðåé Èãíàòüåâ (andrew_programmer) |
;; NoName |
;; Åâãåíèé Ãðå÷íèêîâ (Diamond) |
;; Ìèõàéëîâ Èëüÿ (Ghost) |
;; Ñåðãåé Ñåì¸íîâ (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. |
;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Íà ýòèõ ôàéëàõ óæå ñòîÿò ðàçëè÷íûå êîïèðàéòû |
Áóäåò äîáàâëåí êîïèðàéò 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 |
Ôàéëû áåç êîïèðàéòîâ ñ êîäîì èç ÌåÎÑ |
Áóäóò äîáàâëåíû êîïèðàéòû KolibriOS Team è |
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 |
Ôàëû ñ êîïèðàéòîì òîëüêî 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 |
ôàéëû êîòîðûå ìîæíî îñòàâèòü áåç êîïèðàéòà |
memmap.inc |
boot/booteng.inc |
boot/bootet.inc |
boot/bootge.inc |
boot/bootru.inc |
boot/et.inc |
boot/ru.inc |
end if |
/kernel/branches/flat_kernel/video/cursors.inc |
---|
267,15 → 267,13 |
jne .fail |
; cmp [eax+CURSOR.size], CURSOR_SIZE |
; jne .fail |
mov ebx, [CURRENT_TASK] |
shl ebx, 8 |
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor] |
mov ebx, [current_slot] |
xchg eax, [ebx+APPDATA.cursor] |
ret |
.fail: |
mov eax, [def_cursor] |
mov ebx, [CURRENT_TASK] |
shl ebx, 8 |
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor] |
mov ebx, [current_slot] |
xchg eax, [ebx+APPDATA.cursor] |
ret |
endp |
398,12 → 396,11 |
cmp ebx, [esi+CURSOR.pid] |
jne .fail |
mov ebx, [CURRENT_TASK] |
shl ebx, 8 |
cmp esi, [ebx+SLOT_BASE+APPDATA.cursor] |
mov ebx, [current_slot] |
cmp esi, [ebx+APPDATA.cursor] |
jne @F |
mov eax, [def_cursor] |
mov [ebx+SLOT_BASE+APPDATA.cursor], eax |
mov [ebx+APPDATA.cursor], eax |
@@: |
mov eax, [hcursor] |
call [eax+APPOBJ.destroy] |