forked from KolibriOS/kolibrios
1)fixed wrong exported LFB address
2)replace 0x3000 0x3004 0x3010 0x3020 whith symbolic constants git-svn-id: svn://kolibrios.org@379 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
73c568fb03
commit
04929cf017
@ -18,7 +18,7 @@ sys_cd_audio:
|
||||
|
||||
cmp eax,2
|
||||
jnz nocdtl
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add ebx,[edi]
|
||||
call sys_cdtracklist
|
||||
|
@ -5,7 +5,7 @@
|
||||
; Àäàïòàöèÿ è äîðàáîòêà Mario79
|
||||
|
||||
give_back_application_data: ; ïåðåñëàòü ïðèëîæåíèþ
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov edi,[edi+TASKDATA.mem_start]
|
||||
add edi,ecx
|
||||
give_back_application_data_1:
|
||||
@ -16,8 +16,8 @@ give_back_application_data_1:
|
||||
rep movsd
|
||||
ret
|
||||
|
||||
take_data_from_application: ; взять из приложения
|
||||
mov esi,[0x3010]
|
||||
take_data_from_application: ; взять из приложени
|
||||
mov esi,[TASK_BASE]
|
||||
mov esi,[esi+TASKDATA.mem_start]
|
||||
add esi,ecx
|
||||
take_data_from_application_1:
|
||||
@ -66,7 +66,7 @@ FDC_C DB ?
|
||||
FDC_H DB ?
|
||||
FDC_R DB ?
|
||||
FDC_N DB ?
|
||||
; Счетчик повторения операции чтения
|
||||
; Счетчик повторения операции чтени
|
||||
ReadRepCounter DB ?
|
||||
; Ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||
RecalRepCounter DB ?
|
||||
@ -174,7 +174,7 @@ FDCDataInput:
|
||||
;* ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÊÎÍÒÐÎËËÅÐÀ ÍÃÌÄ *
|
||||
;*********************************************
|
||||
FDCInterrupt:
|
||||
; Установить флаг прерывания
|
||||
; Установить флаг прерывани
|
||||
mov [FDD_IntFlag],1
|
||||
ret
|
||||
|
||||
@ -194,7 +194,7 @@ WaitFDCInterrupt:
|
||||
pusha
|
||||
; Ñáðîñèòü áàéò ñîñòîÿíèÿ îïåðàöèè
|
||||
mov [FDC_Status],FDC_Normal
|
||||
; Сбросить флаг прерывания
|
||||
; Сбросить флаг прерывани
|
||||
mov [FDD_IntFlag],0
|
||||
; Îáíóëèòü ñ÷åò÷èê òèêîâ
|
||||
mov eax,[timer_ticks]
|
||||
@ -352,7 +352,7 @@ SeekTrack:
|
||||
; Ïîäàòü êîìàíäó "Ïîèñê"
|
||||
mov AL,0Fh
|
||||
call FDCDataOutput
|
||||
; Передать байт номера головки/накопителя
|
||||
; Передать байт номера головки/накопител
|
||||
mov AL,[FDD_Head]
|
||||
shl AL,2
|
||||
call FDCDataOutput
|
||||
@ -467,7 +467,7 @@ ReadSectWithRetr:
|
||||
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||
mov [RecalRepCounter],0
|
||||
@@TryAgain:
|
||||
; Обнулить счетчик повторения операции чтения
|
||||
; Обнулить счетчик повторения операции чтени
|
||||
mov [ReadRepCounter],0
|
||||
@@ReadSector_1:
|
||||
call ReadSector
|
||||
@ -475,7 +475,7 @@ ReadSectWithRetr:
|
||||
je @@Exit_2
|
||||
cmp [FDC_Status],1
|
||||
je @@Err_3
|
||||
; Троекратное повторение чтения
|
||||
; Троекратное повторение чтени
|
||||
inc [ReadRepCounter]
|
||||
cmp [ReadRepCounter],3
|
||||
jb @@ReadSector_1
|
||||
@ -565,7 +565,7 @@ WriteSectWithRetr:
|
||||
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||
mov [RecalRepCounter],0
|
||||
@@TryAgain_1:
|
||||
; Обнулить счетчик повторения операции чтения
|
||||
; Обнулить счетчик повторения операции чтени
|
||||
mov [ReadRepCounter],0
|
||||
@@WriteSector_1:
|
||||
call WriteSector
|
||||
@ -573,7 +573,7 @@ WriteSectWithRetr:
|
||||
je @@Exit_4
|
||||
cmp [FDC_Status],1
|
||||
je @@Err_4
|
||||
; Троекратное повторение чтения
|
||||
; Троекратное повторение чтени
|
||||
inc [ReadRepCounter]
|
||||
cmp [ReadRepCounter],3
|
||||
jb @@WriteSector_1
|
||||
|
@ -19,7 +19,7 @@ sys_debug_services_table:
|
||||
debug_set_event_data:
|
||||
; in: ebx = pointer
|
||||
; destroys eax
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
|
||||
ret
|
||||
@ -36,7 +36,7 @@ get_debuggee_slot:
|
||||
jz .ret_bad
|
||||
shl eax, 5
|
||||
push ebx
|
||||
mov ebx, [0x3000]
|
||||
mov ebx, [CURRENT_TASK]
|
||||
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
|
||||
pop ebx
|
||||
jnz .ret_bad
|
||||
@ -72,13 +72,13 @@ debug_suspend:
|
||||
; destroys eax,ebx
|
||||
call get_debuggee_slot
|
||||
jc .ret
|
||||
mov bl, [0x3000+eax+TASKDATA.state] ; process state
|
||||
mov bl, [CURRENT_TASK+eax+TASKDATA.state] ; process state
|
||||
test bl, bl
|
||||
jz .1
|
||||
cmp bl, 5
|
||||
jnz .ret
|
||||
mov bl, 2
|
||||
.2: mov [0x3000+eax+TASKDATA.state], bl
|
||||
.2: mov [CURRENT_TASK+eax+TASKDATA.state], bl
|
||||
.ret:
|
||||
sti
|
||||
ret
|
||||
@ -87,13 +87,13 @@ debug_suspend:
|
||||
jmp .2
|
||||
|
||||
do_resume:
|
||||
mov bl, [0x3000+eax+TASKDATA.state]
|
||||
mov bl, [CURRENT_TASK+eax+TASKDATA.state]
|
||||
cmp bl, 1
|
||||
jz .1
|
||||
cmp bl, 2
|
||||
jnz .ret
|
||||
mov bl, 5
|
||||
.2: mov [0x3000+eax+TASKDATA.state], bl
|
||||
.2: mov [CURRENT_TASK+eax+TASKDATA.state], bl
|
||||
.ret: ret
|
||||
.1: dec ebx
|
||||
jmp .2
|
||||
@ -380,7 +380,7 @@ debugger_notify:
|
||||
pop ecx
|
||||
pop ecx
|
||||
pop ecx
|
||||
cmp dword [0x3000], 1
|
||||
cmp dword [CURRENT_TASK], 1
|
||||
jnz .notos
|
||||
cmp [timer_ticks], edi
|
||||
jae .ret
|
||||
@ -430,7 +430,7 @@ debug_exc:
|
||||
jns @f
|
||||
; this is exception from task switch
|
||||
; set DRx registers for task and continue
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
add eax, 0x80000+APPDATA.dbg_regs
|
||||
mov ecx, [eax+0]
|
||||
@ -453,7 +453,7 @@ debug_exc:
|
||||
mov dr6, eax
|
||||
; test if debugging
|
||||
cli
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||
test eax, eax
|
||||
@ -463,7 +463,7 @@ debug_exc:
|
||||
add esp, 28h+4
|
||||
mov [error_interrupt], 1
|
||||
call show_error_parameters
|
||||
mov edx, [0x3010]
|
||||
mov edx, [TASK_BASE]
|
||||
mov byte [edx+TASKDATA.state], 4
|
||||
jmp change_task
|
||||
.debug:
|
||||
@ -483,7 +483,7 @@ debug_exc:
|
||||
cmp cl, not 10h
|
||||
jnz .l1
|
||||
push edx ; DR6 image
|
||||
mov ecx, [0x3010]
|
||||
mov ecx, [TASK_BASE]
|
||||
push dword [ecx+TASKDATA.pid] ; PID
|
||||
push 12
|
||||
pop ecx
|
||||
@ -492,7 +492,7 @@ debug_exc:
|
||||
pop ecx
|
||||
pop ecx
|
||||
pop ecx
|
||||
mov edx, [0x3010]
|
||||
mov edx, [TASK_BASE]
|
||||
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||
call change_task
|
||||
restore_ring3_context
|
||||
|
@ -395,7 +395,7 @@ proc init_LFB
|
||||
mov edx, LFB_BASE
|
||||
mov esi, [LFBAddress]
|
||||
mov edi, [LFBSize]
|
||||
mov dword [exp_lfb+4], esi
|
||||
mov dword [exp_lfb+4], edx
|
||||
|
||||
shr edi, 12
|
||||
mov [pg_count], edi
|
||||
|
@ -67,11 +67,11 @@ change_task:
|
||||
jne .find_next_task
|
||||
mov [dma_task_switched], 0
|
||||
mov ebx, [dma_process]
|
||||
cmp [0x3000], ebx
|
||||
cmp [CURRENT_TASK], ebx
|
||||
je .return
|
||||
mov edi, [dma_slot_ptr]
|
||||
mov [0x3000], ebx
|
||||
mov [0x3010], edi
|
||||
mov [CURRENT_TASK], ebx
|
||||
mov [TASK_BASE], edi
|
||||
jmp @f
|
||||
.find_next_task:
|
||||
; \end{Mario79}
|
||||
@ -103,7 +103,7 @@ endg
|
||||
|
||||
|
||||
update_counters:
|
||||
mov edi, [0x3010]
|
||||
mov edi, [TASK_BASE]
|
||||
mov ebx, [edi+TASKDATA.counter_add] ; time stamp counter add
|
||||
call _rdtsc
|
||||
sub eax, ebx
|
||||
@ -119,17 +119,17 @@ ret
|
||||
; [0x3000] = ebx and [0x3010] = edi
|
||||
; corrupts other regs
|
||||
find_next_task:
|
||||
mov ebx, [0x3000]
|
||||
mov edi, [0x3010]
|
||||
mov ebx, [CURRENT_TASK]
|
||||
mov edi, [TASK_BASE]
|
||||
mov [prev_slot], ebx
|
||||
|
||||
.waiting_for_termination:
|
||||
.waiting_for_reuse:
|
||||
.waiting_for_event:
|
||||
.suspended:
|
||||
cmp ebx, [0x3004]
|
||||
cmp ebx, [TASK_COUNT]
|
||||
jb @f
|
||||
mov edi, 0x3000
|
||||
mov edi, CURRENT_TASK
|
||||
xor ebx, ebx
|
||||
@@:
|
||||
|
||||
@ -150,8 +150,8 @@ find_next_task:
|
||||
cmp al, 9
|
||||
je .waiting_for_reuse
|
||||
|
||||
mov [0x3000],ebx
|
||||
mov [0x3010],edi
|
||||
mov [CURRENT_TASK],ebx
|
||||
mov [TASK_BASE],edi
|
||||
|
||||
cmp al, 5
|
||||
jne .noevents
|
||||
@ -162,8 +162,8 @@ find_next_task:
|
||||
mov [edi+TASKDATA.state], byte 0
|
||||
.noevents:
|
||||
.found:
|
||||
mov [0x3000],ebx
|
||||
mov [0x3010],edi
|
||||
mov [CURRENT_TASK],ebx
|
||||
mov [TASK_BASE],edi
|
||||
call _rdtsc
|
||||
mov [edi+TASKDATA.counter_add],eax
|
||||
|
||||
@ -191,8 +191,8 @@ updatecputimes:
|
||||
mov eax,[idleuse]
|
||||
mov [idleusesec],eax
|
||||
mov [idleuse],dword 0
|
||||
mov ecx, [0x3004]
|
||||
mov edi, 0x3020
|
||||
mov ecx, [TASK_COUNT]
|
||||
mov edi, TASK_DATA
|
||||
.newupdate:
|
||||
mov ebx,[edi+TASKDATA.counter_sum]
|
||||
mov [edi+TASKDATA.cpu_usage],ebx
|
||||
|
@ -26,7 +26,7 @@ start_wait=$
|
||||
jmp start_wait
|
||||
ok=$
|
||||
push eax
|
||||
mov eax,dword [0x3010+second_base_address]
|
||||
mov eax,dword [TASK_BASE+second_base_address]
|
||||
mov eax,[eax+TASKDATA.pid]
|
||||
mov [name],eax
|
||||
pop eax
|
||||
@ -60,7 +60,7 @@ macro WaitSimpleCriticalSection name
|
||||
{
|
||||
local start_wait,first_wait,inc_counter,end_wait
|
||||
push eax
|
||||
mov eax,[0x3010+second_base_address]
|
||||
mov eax,[TASK_BASE+second_base_address]
|
||||
mov eax,[eax+TASKDATA.pid]
|
||||
start_wait=$
|
||||
cli
|
||||
@ -92,7 +92,7 @@ release_end=$
|
||||
macro TryWaitSimpleCriticalSection name ;result in eax and in flags
|
||||
{
|
||||
local ok,try_end
|
||||
mov eax,[0x3000+second_base_address]
|
||||
mov eax,[CURRENT_TASK+second_base_address]
|
||||
mov eax,[eax+TASKDATA.pid]
|
||||
cmp [name],eax
|
||||
jz ok
|
||||
|
@ -120,7 +120,7 @@ exc_c:
|
||||
|
||||
; test if debugging
|
||||
cli
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||
test eax, eax
|
||||
@ -132,7 +132,7 @@ exc_c:
|
||||
mov [error_interrupt], eax
|
||||
call show_error_parameters
|
||||
|
||||
mov edx, [0x3010]
|
||||
mov edx, [TASK_BASE]
|
||||
mov [edx + TASKDATA.state], byte 4
|
||||
|
||||
jmp change_task
|
||||
@ -143,7 +143,7 @@ exc_c:
|
||||
cld
|
||||
movzx ecx, bl
|
||||
push ecx
|
||||
mov ecx, [0x3010]
|
||||
mov ecx, [TASK_BASE]
|
||||
push dword [ecx+TASKDATA.pid] ; PID of current process
|
||||
push 12
|
||||
pop ecx
|
||||
@ -152,7 +152,7 @@ exc_c:
|
||||
pop ecx
|
||||
pop ecx
|
||||
pop ecx
|
||||
mov edx, [0x3010]
|
||||
mov edx, [TASK_BASE]
|
||||
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||
call change_task
|
||||
restore_ring3_context
|
||||
@ -196,9 +196,9 @@ endg
|
||||
show_error_parameters:
|
||||
|
||||
mov [write_error_to],process_pid+43
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax, 5
|
||||
mov eax,[0x3000+TASKDATA.pid+eax]
|
||||
mov eax,[CURRENT_TASK+TASKDATA.pid+eax]
|
||||
call writehex
|
||||
|
||||
mov [write_error_to],process_error+43
|
||||
@ -433,9 +433,9 @@ irqhandler:
|
||||
set_application_table_status:
|
||||
push eax
|
||||
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax, 5
|
||||
add eax,0x3000+TASKDATA.pid
|
||||
add eax,CURRENT_TASK+TASKDATA.pid
|
||||
mov eax,[eax]
|
||||
|
||||
mov [application_table_status],eax
|
||||
@ -448,9 +448,9 @@ set_application_table_status:
|
||||
clear_application_table_status:
|
||||
push eax
|
||||
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax, 5
|
||||
add eax,0x3000+TASKDATA.pid
|
||||
add eax,CURRENT_TASK+TASKDATA.pid
|
||||
mov eax,[eax]
|
||||
|
||||
cmp eax,[application_table_status]
|
||||
@ -737,7 +737,7 @@ term9:
|
||||
jz .nodebug
|
||||
push 8
|
||||
pop ecx
|
||||
push dword [0x3000+edi+TASKDATA.pid] ; PID
|
||||
push dword [CURRENT_TASK+edi+TASKDATA.pid] ; PID
|
||||
push 2
|
||||
call debugger_notify
|
||||
pop ecx
|
||||
@ -764,7 +764,7 @@ term9:
|
||||
|
||||
; activate window
|
||||
movzx eax, word [0xC000 + esi*2]
|
||||
cmp eax, [0x3004]
|
||||
cmp eax, [TASK_COUNT]
|
||||
jne .dont_activate
|
||||
pushad
|
||||
.check_next_window:
|
||||
@ -774,7 +774,7 @@ term9:
|
||||
lea esi, [0xc400+eax*2]
|
||||
movzx edi, word [esi] ; edi = process
|
||||
shl edi, 5
|
||||
cmp [0x3000 + edi + TASKDATA.state], byte 9 ; skip dead slots
|
||||
cmp [CURRENT_TASK + edi + TASKDATA.state], byte 9 ; skip dead slots
|
||||
je .check_next_window
|
||||
add edi, window_data
|
||||
; \begin{diamond}[19.09.2006]
|
||||
@ -789,7 +789,7 @@ term9:
|
||||
|
||||
push esi ; remove hd1 & cd & flp reservation
|
||||
shl esi, 5
|
||||
mov esi, [esi+0x3000+TASKDATA.pid]
|
||||
mov esi, [esi+CURRENT_TASK+TASKDATA.pid]
|
||||
cmp [hd1_status], esi
|
||||
jnz @f
|
||||
call free_hd_channel
|
||||
@ -809,7 +809,7 @@ term9:
|
||||
pusha ; remove all irq reservations
|
||||
mov eax,esi
|
||||
shl eax, 5
|
||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov edi,irq_owner
|
||||
mov ecx,16
|
||||
newirqfree:
|
||||
@ -823,7 +823,7 @@ term9:
|
||||
pusha ; remove all port reservations
|
||||
mov edx,esi
|
||||
shl edx, 5
|
||||
add edx,0x3000
|
||||
add edx,CURRENT_TASK
|
||||
mov edx,[edx+TASKDATA.pid]
|
||||
|
||||
rmpr0:
|
||||
@ -867,12 +867,12 @@ term9:
|
||||
popa
|
||||
mov edi,esi ; do not run this process slot
|
||||
shl edi, 5
|
||||
mov [edi+0x3000 + TASKDATA.state],byte 9
|
||||
mov [edi+CURRENT_TASK + TASKDATA.state],byte 9
|
||||
; debugger test - terminate all debuggees
|
||||
mov eax, 2
|
||||
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
|
||||
.xd0:
|
||||
cmp eax, [0x3004]
|
||||
cmp eax, [TASK_COUNT]
|
||||
ja .xd1
|
||||
cmp dword [ecx], esi
|
||||
jnz @f
|
||||
|
@ -342,7 +342,7 @@ proc CreateBuffer stdcall, format:dword, size:dword
|
||||
.test_ok:
|
||||
mov ebx, [CURRENT_TASK] ;hack: direct accsess
|
||||
shl ebx, 5 ;to kernel data
|
||||
mov ebx, [0x3000+ebx+4]
|
||||
mov ebx, [CURRENT_TASK+ebx+4]
|
||||
mov eax, STREAM_SIZE
|
||||
|
||||
call CreateObject
|
||||
|
@ -31,9 +31,9 @@ reserve_flp:
|
||||
reserve_flp_ok:
|
||||
|
||||
push eax
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,5
|
||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov [flp_status],eax
|
||||
pop eax
|
||||
sti
|
||||
|
@ -124,9 +124,9 @@ reserve_hd1:
|
||||
reserve_ok1:
|
||||
|
||||
push eax
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,5
|
||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov [hd1_status],eax
|
||||
pop eax
|
||||
sti
|
||||
|
@ -85,7 +85,7 @@ file_system:
|
||||
cmp dword [eax+0],15 ; GET_DISK_INFO
|
||||
je fs_info
|
||||
|
||||
cmp dword [0x3000],1 ; no memory checks for kernel requests
|
||||
cmp dword [CURRENT_TASK],1 ; no memory checks for kernel requests
|
||||
jz no_checks_for_kernel
|
||||
mov edx,eax
|
||||
cmp dword [eax+0],1
|
||||
|
@ -23,9 +23,9 @@ reserve_cd:
|
||||
reserve_ok2:
|
||||
|
||||
push eax
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,5
|
||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov [cd_status],eax
|
||||
pop eax
|
||||
sti
|
||||
@ -377,7 +377,7 @@ cd_get_parameters_of_file:
|
||||
cd_get_parameters_of_file_1:
|
||||
; ïîëó÷àåì àòðèáóòû ôàéëà
|
||||
xor eax,eax
|
||||
; файл не архивировался
|
||||
; ôàéë íå àðõèâèðîâàëñ
|
||||
inc al
|
||||
shl eax,1
|
||||
; ýòî êàòàëîã?
|
||||
|
@ -68,7 +68,7 @@ drawbuttonframes:
|
||||
|
||||
shr eax,16
|
||||
shr ebx,16
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
|
||||
add eax,[edx-twdw + WDATA.box.left]
|
||||
add ebx,[edx-twdw + WDATA.box.top]
|
||||
@ -164,7 +164,7 @@ button_dececx:
|
||||
sys_button:
|
||||
|
||||
push edi
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,8
|
||||
rol eax,16
|
||||
add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
@ -197,7 +197,7 @@ sys_button:
|
||||
push ebx
|
||||
shr eax,16
|
||||
shr ebx,16
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
mov esi,[edx-twdw + WDATA.box.left]
|
||||
mov edi,[edx-twdw + WDATA.box.top]
|
||||
add eax,esi
|
||||
@ -247,7 +247,7 @@ sys_button:
|
||||
shl eax,4
|
||||
add eax,edi
|
||||
|
||||
mov bx,[0x3000]
|
||||
mov bx,[CURRENT_TASK]
|
||||
mov [eax],bx
|
||||
|
||||
add eax,2 ; save button id number
|
||||
@ -298,7 +298,7 @@ remove_button:
|
||||
|
||||
add eax,0x10
|
||||
|
||||
mov dx,[0x3000]
|
||||
mov dx,[CURRENT_TASK]
|
||||
cmp dx,[eax]
|
||||
jnz rnewba
|
||||
|
||||
@ -504,7 +504,7 @@ checkbuttons:
|
||||
|
||||
movzx ebx,word [eax]
|
||||
movzx ecx,word [0xC000 + ebx * 2]
|
||||
cmp ecx,[0x3004]
|
||||
cmp ecx,[TASK_COUNT]
|
||||
jne buttonnewcheck
|
||||
|
||||
; check that button start is inside window x/y end
|
||||
|
@ -101,7 +101,7 @@ create_event:
|
||||
|
||||
mov ebx, [CURRENT_TASK]
|
||||
shl ebx, 5
|
||||
mov ebx, [0x3000+ebx+4]
|
||||
mov ebx, [CURRENT_TASK+ebx+4]
|
||||
mov [eax+APPOBJ.pid], ebx
|
||||
mov edx, [.flags]
|
||||
mov [eax+EVENT.state], edx
|
||||
@ -274,7 +274,7 @@ proc get_event_ex stdcall, p_ev:dword, timeout:dword
|
||||
call destroy_event.force
|
||||
ret
|
||||
.switch:
|
||||
mov eax, [0x3010]
|
||||
mov eax, [TASK_BASE]
|
||||
mov [eax+TASKDATA.state], byte 5
|
||||
call change_task
|
||||
jmp .wait
|
||||
@ -339,7 +339,7 @@ wait_event:
|
||||
ret
|
||||
.switch:
|
||||
or [eax+EVENT.state], EVENT_WATCHED
|
||||
mov eax, [0x3010]
|
||||
mov eax, [TASK_BASE]
|
||||
mov [eax+TASKDATA.state], byte 5
|
||||
call change_task
|
||||
mov eax, [.event]
|
||||
@ -497,7 +497,7 @@ sys_waitforevent:
|
||||
jne eventoccur
|
||||
newwait:
|
||||
|
||||
mov eax, [0x3010]
|
||||
mov eax, [TASK_BASE]
|
||||
mov [eax+TASKDATA.state], byte 5
|
||||
call change_task
|
||||
|
||||
@ -511,10 +511,10 @@ get_event_for_app:
|
||||
|
||||
pushad
|
||||
|
||||
mov edi,[0x3010] ; WINDOW REDRAW
|
||||
mov edi,[TASK_BASE] ; WINDOW REDRAW
|
||||
test [edi+TASKDATA.event_mask],dword 1
|
||||
jz no_eventoccur1
|
||||
;mov edi,[0x3010]
|
||||
;mov edi,[TASK_BASE]
|
||||
cmp [edi-twdw+WDATA.fl_redraw],byte 0
|
||||
je no_eventoccur1
|
||||
popad
|
||||
@ -522,12 +522,12 @@ get_event_for_app:
|
||||
ret
|
||||
no_eventoccur1:
|
||||
|
||||
;mov edi,[0x3010] ; KEY IN BUFFER
|
||||
;mov edi,[TASK_BASE] ; KEY IN BUFFER
|
||||
test [edi+TASKDATA.event_mask],dword 2
|
||||
jz no_eventoccur2
|
||||
mov ecx, [0x3000]
|
||||
mov ecx, [CURRENT_TASK]
|
||||
movzx edx,word [0xC000+ecx*2]
|
||||
mov eax, [0x3004]
|
||||
mov eax, [TASK_COUNT]
|
||||
cmp eax,edx
|
||||
jne no_eventoccur2x
|
||||
cmp [0xf400],byte 0
|
||||
@ -546,14 +546,14 @@ get_event_for_app:
|
||||
jb @b
|
||||
no_eventoccur2:
|
||||
|
||||
;mov edi,[0x3010] ; BUTTON IN BUFFER
|
||||
;mov edi,[TASK_BASE] ; BUTTON IN BUFFER
|
||||
test [edi+TASKDATA.event_mask],dword 4
|
||||
jz no_eventoccur3
|
||||
cmp [0xf500],byte 0
|
||||
je no_eventoccur3
|
||||
mov ecx, [0x3000]
|
||||
mov ecx, [CURRENT_TASK]
|
||||
movzx edx, word [0xC000+ecx*2]
|
||||
mov eax, [0x3004]
|
||||
mov eax, [TASK_COUNT]
|
||||
cmp eax,edx
|
||||
jnz no_eventoccur3
|
||||
popad
|
||||
@ -572,10 +572,10 @@ get_event_for_app:
|
||||
no_eventoccur3:
|
||||
|
||||
|
||||
;mov edi,[0x3010] ; mouse event
|
||||
;mov edi,[TASK_BASE] ; mouse event
|
||||
test [edi+TASKDATA.event_mask],dword 00100000b
|
||||
jz no_mouse_event
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,8
|
||||
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
|
||||
jz no_mouse_event
|
||||
@ -586,7 +586,7 @@ get_event_for_app:
|
||||
no_mouse_event:
|
||||
|
||||
|
||||
;mov edi,[0x3010] ; DESKTOP BACKGROUND REDRAW
|
||||
;mov edi,[TASK_BASE] ; DESKTOP BACKGROUND REDRAW
|
||||
test [edi+TASKDATA.event_mask],dword 16
|
||||
jz no_eventoccur5
|
||||
cmp [0xfff0],byte 2
|
||||
@ -596,10 +596,10 @@ get_event_for_app:
|
||||
ret
|
||||
no_eventoccur5:
|
||||
|
||||
;mov edi,[0x3010] ; IPC
|
||||
;mov edi,[TASK_BASE] ; IPC
|
||||
test [edi+TASKDATA.event_mask],dword 01000000b
|
||||
jz no_ipc
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,8
|
||||
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
|
||||
jz no_ipc
|
||||
@ -610,10 +610,10 @@ get_event_for_app:
|
||||
no_ipc:
|
||||
|
||||
|
||||
;mov edi,[0x3010] ; STACK
|
||||
;mov edi,[TASK_BASE] ; STACK
|
||||
test [edi+TASKDATA.event_mask],dword 10000000b
|
||||
jz no_stack_event
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,8
|
||||
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
|
||||
jz no_stack_event
|
||||
@ -625,7 +625,7 @@ get_event_for_app:
|
||||
|
||||
test byte [edi+TASKDATA.event_mask+1], 1 ; DEBUG
|
||||
jz .test_IRQ
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
|
||||
jz .test_IRQ
|
||||
@ -635,7 +635,7 @@ get_event_for_app:
|
||||
ret
|
||||
|
||||
;.test_ext:
|
||||
; mov eax, [0x3000]
|
||||
; mov eax, [CURRENT_TASK]
|
||||
; shl eax, 8
|
||||
; test dword [eax+0x80000+APPDATA.event_mask], EVENT_EXTENDED
|
||||
; jz .test_IRQ
|
||||
@ -651,14 +651,14 @@ get_event_for_app:
|
||||
mov ebx,0x00010000
|
||||
xor ecx, ecx
|
||||
irq_event_test:
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
test [edi+TASKDATA.event_mask],ebx
|
||||
jz no_irq_event
|
||||
mov edi,ecx
|
||||
shl edi,2
|
||||
add edi,irq_owner
|
||||
mov edx,[edi]
|
||||
mov eax,[0x3010]
|
||||
mov eax,[TASK_BASE]
|
||||
mov eax,[eax+TASKDATA.pid]
|
||||
cmp edx,eax
|
||||
jne no_irq_event
|
||||
|
@ -365,7 +365,7 @@ drawwindow_IV:
|
||||
shl eax,4
|
||||
add eax,edi
|
||||
|
||||
mov bx,[0x3000]
|
||||
mov bx,[CURRENT_TASK]
|
||||
mov [eax],bx
|
||||
|
||||
add eax,2 ; save button id number
|
||||
@ -404,7 +404,7 @@ drawwindow_IV:
|
||||
shl eax,4
|
||||
add eax,edi
|
||||
|
||||
mov bx,[0x3000]
|
||||
mov bx,[CURRENT_TASK]
|
||||
mov [eax],bx
|
||||
|
||||
add eax,2 ; save button id number
|
||||
|
@ -60,7 +60,7 @@ calculatescreen:
|
||||
mov esi, 1
|
||||
call setscreen
|
||||
|
||||
mov ebp, [0x3004] ; number of processes
|
||||
mov ebp, [TASK_COUNT] ; number of processes
|
||||
cmp ebp, 1
|
||||
jbe .finish
|
||||
align 4
|
||||
@ -68,7 +68,7 @@ calculatescreen:
|
||||
movzx edi, word [0xC400 + esi * 2]
|
||||
shl edi, 5
|
||||
|
||||
cmp [0x3000+edi+TASKDATA.state], byte 9
|
||||
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
|
||||
je .not_wnd
|
||||
|
||||
add edi, window_data
|
||||
@ -375,7 +375,7 @@ display_settings:
|
||||
cmp eax,2 ; set common window colours
|
||||
jne no_com_colours
|
||||
mov [windowtypechanged],dword 1
|
||||
mov esi,[0x3010]
|
||||
mov esi,[TASK_BASE]
|
||||
add esi,TASKDATA.mem_start
|
||||
add ebx,[esi]
|
||||
mov esi,ebx
|
||||
@ -389,7 +389,7 @@ display_settings:
|
||||
|
||||
cmp eax,3 ; get common window colours
|
||||
jne no_get_com
|
||||
mov esi,[0x3010]
|
||||
mov esi,[TASK_BASE]
|
||||
add esi,TASKDATA.mem_start
|
||||
add ebx,[esi]
|
||||
mov edi,ebx
|
||||
@ -468,7 +468,7 @@ display_settings:
|
||||
cmp eax,8 ; set window skin
|
||||
jne no_set_skin
|
||||
mov eax,ebx
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ebx,[edi+TASKDATA.mem_start] ; abs start of info block
|
||||
pushd [ebx+0] [ebx+4] [ebx+8] [ebx+12]
|
||||
mov dword[ebx+0],0 ; read
|
||||
@ -515,7 +515,7 @@ display_settings:
|
||||
|
||||
|
||||
repos_windows:
|
||||
mov ecx,[0x3004]
|
||||
mov ecx,[TASK_COUNT]
|
||||
mov edi,0x20*2
|
||||
mov byte[0x0000fff0],1
|
||||
dec ecx
|
||||
@ -911,7 +911,7 @@ windowactivate:
|
||||
|
||||
; if type of current active window is 3,
|
||||
; it must be redrawn
|
||||
mov eax, [0x3004]
|
||||
mov eax, [TASK_COUNT]
|
||||
movzx eax, word [0xC400 + eax*2]
|
||||
shl eax, 5
|
||||
add eax, window_data
|
||||
@ -928,7 +928,7 @@ windowactivate:
|
||||
|
||||
xor esi, esi ; drop others
|
||||
waloop:
|
||||
cmp esi, dword [0x3004]
|
||||
cmp esi, dword [TASK_COUNT]
|
||||
jae wacont
|
||||
inc esi
|
||||
lea edi, [0xC000 + esi*2]
|
||||
@ -944,13 +944,13 @@ windowactivate:
|
||||
pop esi ; esi = pointer at 0xC400
|
||||
|
||||
movzx eax, word [esi]
|
||||
mov bx, [0x3004] ; number of processes
|
||||
mov bx, [TASK_COUNT] ; number of processes
|
||||
mov [0xC000+eax*2], bx ; this is the last (and the upper)
|
||||
|
||||
; update on screen -window stack
|
||||
xor esi, esi
|
||||
waloop2:
|
||||
mov edi, [0x3004]
|
||||
mov edi, [TASK_COUNT]
|
||||
cmp esi, edi
|
||||
jae wacont2
|
||||
inc esi
|
||||
@ -992,7 +992,7 @@ checkwindowdraw:
|
||||
add esi, 2
|
||||
push esi
|
||||
|
||||
mov eax, [0x3004]
|
||||
mov eax, [TASK_COUNT]
|
||||
lea eax, word [0xC400 + eax * 2] ; number of the upper window
|
||||
|
||||
cmp esi, eax
|
||||
@ -1000,7 +1000,7 @@ checkwindowdraw:
|
||||
|
||||
movzx eax, word [esi]
|
||||
shl eax, 5
|
||||
cmp [0x3000 + eax + TASKDATA.state], byte 9
|
||||
cmp [CURRENT_TASK + eax + TASKDATA.state], byte 9
|
||||
je .new_check ; skip dead windows
|
||||
|
||||
lea esi, [eax+window_data]
|
||||
@ -1058,7 +1058,7 @@ waredraw: ; if redraw necessary at activate
|
||||
|
||||
; update screen info
|
||||
pushad
|
||||
mov edi, [0x3004] ; the last process (number)
|
||||
mov edi, [TASK_COUNT] ; the last process (number)
|
||||
movzx esi, word [0xC400 + edi * 2]
|
||||
shl esi, 5
|
||||
add esi, window_data
|
||||
@ -1072,7 +1072,7 @@ waredraw: ; if redraw necessary at activate
|
||||
add ecx, eax ; ecx = x_end
|
||||
add edx, ebx ; edx = y_end
|
||||
|
||||
mov edi, [0x3004]
|
||||
mov edi, [TASK_COUNT]
|
||||
movzx esi, word [0xC400 + edi * 2]
|
||||
call setscreen
|
||||
popad
|
||||
@ -1137,7 +1137,7 @@ restore_minimized_window:
|
||||
jz .skip_redrawings
|
||||
mov [edi+WDATA.fl_redraw], 1
|
||||
and [edi+WDATA.fl_wstate], not WSTATE_MINIMIZED
|
||||
cmp eax, [0x3004] ; the uppermost window
|
||||
cmp eax, [TASK_COUNT] ; the uppermost window
|
||||
jnz .no_uppermost
|
||||
mov eax, [edi+WDATA.box.left]
|
||||
mov ebx, [edi+WDATA.box.top]
|
||||
@ -1174,7 +1174,7 @@ checkwindows:
|
||||
|
||||
cmp [window_minimize], 0
|
||||
je .no_minimizing
|
||||
mov eax, [0x3004] ; the uppermost window
|
||||
mov eax, [TASK_COUNT] ; the uppermost window
|
||||
mov bl, 0
|
||||
xchg [window_minimize], bl
|
||||
cmp bl, 1
|
||||
@ -1192,7 +1192,7 @@ checkwindows:
|
||||
ret
|
||||
.mouse_buttons_pressed:
|
||||
|
||||
mov esi,[0x3004]
|
||||
mov esi,[TASK_COUNT]
|
||||
inc esi
|
||||
|
||||
cwloop:
|
||||
@ -1228,7 +1228,7 @@ checkwindows:
|
||||
|
||||
pushad
|
||||
mov eax, esi
|
||||
mov ebx, [0x3004]
|
||||
mov ebx, [TASK_COUNT]
|
||||
cmp eax, ebx ; is this window active?
|
||||
jz .move_resize_window
|
||||
|
||||
@ -1751,7 +1751,7 @@ random_shaped_window:
|
||||
|
||||
test eax, eax
|
||||
jne rsw_no_address
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,8
|
||||
|
||||
mov [eax+0x80000+APPDATA.wnd_shape],ebx
|
||||
@ -1759,7 +1759,7 @@ random_shaped_window:
|
||||
|
||||
cmp eax,1
|
||||
jne rsw_no_scale
|
||||
mov eax,[0x3000]
|
||||
mov eax,[CURRENT_TASK]
|
||||
shl eax,8
|
||||
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
|
||||
rsw_no_scale:
|
||||
|
@ -91,7 +91,7 @@ irq1:
|
||||
; mov ds, ax
|
||||
; mov es, ax
|
||||
|
||||
movzx eax,word[0x3004] ; top window process
|
||||
movzx eax,word[TASK_COUNT] ; top window process
|
||||
movzx eax,word[0xC400+eax*2]
|
||||
shl eax,8
|
||||
mov al,[0x80000+eax+APPDATA.keyboard_mode]
|
||||
|
@ -265,9 +265,9 @@ __sys_disable_mouse:
|
||||
ret
|
||||
@@:
|
||||
pushad
|
||||
cmp [0x3000],dword 1
|
||||
cmp [CURRENT_TASK],dword 1
|
||||
je disable_m
|
||||
mov edx,[0x3000]
|
||||
mov edx,[CURRENT_TASK]
|
||||
shl edx,5
|
||||
add edx,window_data
|
||||
movzx eax, word [0xfb0a]
|
||||
@ -277,7 +277,7 @@ __sys_disable_mouse:
|
||||
imul ecx,ebx
|
||||
add ecx,eax
|
||||
add ecx, display_data
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
movzx ebx, byte [ecx]
|
||||
cmp eax,ebx
|
||||
je yes_mouse_disable
|
||||
@ -296,7 +296,7 @@ __sys_disable_mouse:
|
||||
je yes_mouse_disable
|
||||
jmp no_mouse_disable
|
||||
yes_mouse_disable:
|
||||
mov edx,[0x3000]
|
||||
mov edx,[CURRENT_TASK]
|
||||
shl edx,5
|
||||
add edx,window_data
|
||||
movzx eax, word [0xfb0a]
|
||||
|
@ -504,9 +504,9 @@ include 'vmodeld.inc'
|
||||
|
||||
; LOAD FONTS I and II
|
||||
|
||||
mov [0x3000],dword 1
|
||||
mov [0x3004],dword 1
|
||||
mov [0x3010],dword 0x3020
|
||||
mov [CURRENT_TASK],dword 1
|
||||
mov [TASK_COUNT],dword 1
|
||||
mov [TASK_BASE],dword TASK_DATA
|
||||
|
||||
mov esi,char
|
||||
xor ebx,ebx
|
||||
@ -636,9 +636,9 @@ include 'vmodeld.inc'
|
||||
mov dword [0x80000+256+APPDATA.bk_obj], ebx
|
||||
|
||||
; task list
|
||||
mov [0x3020+TASKDATA.wnd_number], 1 ; on screen number
|
||||
mov [0x3020+TASKDATA.pid], 1 ; process id number
|
||||
mov [0x3020+TASKDATA.mem_start], 0 ; process base address
|
||||
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
|
||||
|
||||
mov edi,tss_data+tss_step
|
||||
mov ecx, (tss_step)/4
|
||||
@ -719,8 +719,8 @@ include 'vmodeld.inc'
|
||||
call load_skin
|
||||
|
||||
; LOAD FIRST APPLICATION
|
||||
mov [0x3000],dword 1
|
||||
mov [0x3004],dword 1
|
||||
mov [CURRENT_TASK],dword 1
|
||||
mov [TASK_COUNT],dword 1
|
||||
cli
|
||||
cmp byte [0x2f0000+0x9030],1
|
||||
jne no_load_vrr_m
|
||||
@ -744,8 +744,8 @@ no_load_vrr_m:
|
||||
first_app_found:
|
||||
cli
|
||||
|
||||
;mov [0x3004],dword 2
|
||||
mov [0x3000],dword 1 ; set OS task fisrt
|
||||
;mov [TASK_COUNT],dword 2
|
||||
mov [CURRENT_TASK],dword 1 ; set OS task fisrt
|
||||
|
||||
|
||||
; SET KEYBOARD PARAMETERS
|
||||
@ -1061,7 +1061,7 @@ sys_outport:
|
||||
ret
|
||||
|
||||
sopl8:
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
mov edx,[edx+0x4]
|
||||
and ebx,65535
|
||||
cld
|
||||
@ -1326,7 +1326,7 @@ draw_num_text:
|
||||
; edx length
|
||||
; edi 1 force
|
||||
|
||||
; mov edi,[0x3000]
|
||||
; mov edi,[CURRENT_TASK]
|
||||
; shl edi,8
|
||||
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||
; rol eax,16
|
||||
@ -1339,12 +1339,12 @@ draw_num_text:
|
||||
add ecx,esp
|
||||
mov eax,[esp+64+32-8+4]
|
||||
push edx ; add window start x & y
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
mov ebx,[edx-twdw+WDATA.box.left]
|
||||
add ebx, [(edx-0x3000)*8+0x80000+APPDATA.wnd_clientbox.left]
|
||||
add ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.left]
|
||||
shl ebx,16
|
||||
add ebx,[edx-twdw+WDATA.box.top]
|
||||
add ebx, [(edx-0x3000)*8+0x80000+APPDATA.wnd_clientbox.top]
|
||||
add ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.top]
|
||||
add eax,ebx
|
||||
pop edx
|
||||
mov ebx,[esp+64+32-12+4]
|
||||
@ -1405,7 +1405,7 @@ endg
|
||||
jnz nsyse2
|
||||
cmp ebx,1
|
||||
jnz kbnobase
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov eax,ecx
|
||||
mov ebx,keymap
|
||||
@ -1415,7 +1415,7 @@ endg
|
||||
kbnobase:
|
||||
cmp ebx,2
|
||||
jnz kbnoshift
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov eax,ecx
|
||||
mov ebx,keymap_shift
|
||||
@ -1425,7 +1425,7 @@ endg
|
||||
kbnoshift:
|
||||
cmp ebx,3
|
||||
jne kbnoalt
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov eax,ecx
|
||||
mov ebx,keymap_alt
|
||||
@ -1608,7 +1608,7 @@ sys_getsetup:
|
||||
jne ngsyse2
|
||||
cmp ebx,1
|
||||
jnz kbnobaseret
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov ebx,ecx
|
||||
mov eax,keymap
|
||||
@ -1618,7 +1618,7 @@ sys_getsetup:
|
||||
kbnobaseret:
|
||||
cmp ebx,2
|
||||
jnz kbnoshiftret
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov ebx,ecx
|
||||
mov eax,keymap_shift
|
||||
@ -1628,7 +1628,7 @@ sys_getsetup:
|
||||
kbnoshiftret:
|
||||
cmp ebx,3
|
||||
jne kbnoaltret
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add ecx,[edi+TASKDATA.mem_start]
|
||||
mov ebx,ecx
|
||||
mov eax,keymap_alt
|
||||
@ -1733,7 +1733,7 @@ mswin:
|
||||
mov eax,[0xfb0a]
|
||||
shl eax,16
|
||||
mov ax,[0xfb0c]
|
||||
mov esi,[0x3010]
|
||||
mov esi,[TASK_BASE]
|
||||
mov bx, word [esi-twdw+WDATA.box.left]
|
||||
shl ebx,16
|
||||
mov bx, word [esi-twdw+WDATA.box.top]
|
||||
@ -1884,7 +1884,7 @@ include 'detect/ps2mouse.inc'
|
||||
|
||||
sys_end:
|
||||
|
||||
mov eax,[0x3010]
|
||||
mov eax,[TASK_BASE]
|
||||
mov [eax+TASKDATA.state], 3 ; terminate this program
|
||||
|
||||
waitterm: ; wait here for termination
|
||||
@ -1931,7 +1931,7 @@ sysfn_shutdown: ; 18.1 = BOOT
|
||||
mov [0x2f0000+0x9030],byte 0
|
||||
for_shutdown_parameter:
|
||||
|
||||
mov eax,[0x3004]
|
||||
mov eax,[TASK_COUNT]
|
||||
add eax,2
|
||||
mov [shutdown_processes],eax
|
||||
mov [0xFF00],al
|
||||
@ -1944,13 +1944,13 @@ sysfn_shutdown: ; 18.1 = BOOT
|
||||
sysfn_terminate: ; 18.2 = TERMINATE
|
||||
cmp ebx,2
|
||||
jb noprocessterminate
|
||||
mov edx,[0x3004]
|
||||
mov edx,[TASK_COUNT]
|
||||
cmp ebx,edx
|
||||
ja noprocessterminate
|
||||
mov eax,[0x3004]
|
||||
mov eax,[TASK_COUNT]
|
||||
shl ebx,5
|
||||
mov edx,[ebx+0x3000+TASKDATA.pid]
|
||||
add ebx,0x3000+TASKDATA.state
|
||||
mov edx,[ebx+CURRENT_TASK+TASKDATA.pid]
|
||||
add ebx,CURRENT_TASK+TASKDATA.state
|
||||
cmp byte [ebx], 9
|
||||
jz noprocessterminate
|
||||
|
||||
@ -1995,13 +1995,13 @@ sysfn_terminate2:
|
||||
sysfn_activate: ; 18.3 = ACTIVATE WINDOW
|
||||
cmp ebx,2
|
||||
jb .nowindowactivate
|
||||
cmp ebx,[0x3004]
|
||||
cmp ebx,[TASK_COUNT]
|
||||
ja .nowindowactivate
|
||||
|
||||
mov [window_minimize], 2 ; restore window if minimized
|
||||
|
||||
movzx esi, word [0xC000 + ebx*2]
|
||||
cmp esi, [0x3004]
|
||||
cmp esi, [TASK_COUNT]
|
||||
je .nowindowactivate ; already active
|
||||
|
||||
mov edi, ebx
|
||||
@ -2029,7 +2029,7 @@ sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
|
||||
;!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
sysfn_getactive: ; 18.7 = get active window
|
||||
mov eax, [0x3004]
|
||||
mov eax, [TASK_COUNT]
|
||||
movzx eax, word [0xC400 + eax*2]
|
||||
mov [esp+36],eax
|
||||
ret
|
||||
@ -2070,7 +2070,7 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
|
||||
rep movsb
|
||||
ret
|
||||
for_all_tables:
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov edi,[edi+TASKDATA.mem_start]
|
||||
add edi,ecx
|
||||
mov esi,0x40000
|
||||
@ -2089,7 +2089,7 @@ sysfn_lastkey: ; 18.12 = return 0 (backward compatibility)
|
||||
ret
|
||||
|
||||
sysfn_getversion: ; 18.13 = get kernel ID and version
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov edi,[edi+TASKDATA.mem_start]
|
||||
add edi,ebx
|
||||
mov esi,version_inf
|
||||
@ -2285,7 +2285,7 @@ draw_background_temp:
|
||||
cmp eax,5 ; BLOCK MOVE TO BGR
|
||||
jnz nosb5
|
||||
; bughere
|
||||
mov edi, [0x3010]
|
||||
mov edi, [TASK_BASE]
|
||||
add ebx, [edi+TASKDATA.mem_start]
|
||||
; mov esi, ebx
|
||||
; mov edi, ecx
|
||||
@ -2347,9 +2347,9 @@ align 4
|
||||
sys_getkey:
|
||||
mov [esp+36],dword 1
|
||||
; test main buffer
|
||||
mov ebx, [0x3000] ; TOP OF WINDOW STACK
|
||||
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||
movzx ecx,word [0xC000 + ebx * 2]
|
||||
mov edx,[0x3004]
|
||||
mov edx,[TASK_COUNT]
|
||||
cmp ecx,edx
|
||||
jne .finish
|
||||
cmp [0xf400],byte 0
|
||||
@ -2395,10 +2395,10 @@ align 4
|
||||
|
||||
sys_getbutton:
|
||||
|
||||
mov ebx, [0x3000] ; TOP OF WINDOW STACK
|
||||
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||
mov [esp+36],dword 1
|
||||
movzx ecx, word [0xC000 + ebx * 2]
|
||||
mov edx, [0x3004] ; less than 256 processes
|
||||
mov edx, [TASK_COUNT] ; less than 256 processes
|
||||
cmp ecx,edx
|
||||
jne .exit
|
||||
movzx eax,byte [0xf500]
|
||||
@ -2427,12 +2427,12 @@ sys_cpuusage:
|
||||
; +30 dword PID , process idenfification number
|
||||
;
|
||||
|
||||
mov edi,[0x3010] ; eax = return area
|
||||
mov edi,[TASK_BASE] ; eax = return area
|
||||
add eax,[edi + TASKDATA.mem_start]
|
||||
|
||||
cmp ebx,-1 ; who am I ?
|
||||
jne no_who_am_i
|
||||
mov ebx,[0x3000]
|
||||
mov ebx,[CURRENT_TASK]
|
||||
no_who_am_i:
|
||||
|
||||
push eax ; return area
|
||||
@ -2447,7 +2447,7 @@ sys_cpuusage:
|
||||
xor edx,edx
|
||||
mov eax,0x20
|
||||
mul ebx
|
||||
add eax,0x3000+TASKDATA.cpu_usage
|
||||
add eax,CURRENT_TASK+TASKDATA.cpu_usage
|
||||
mov ebx,eax
|
||||
pop eax
|
||||
mov ecx,[ebx]
|
||||
@ -2486,7 +2486,7 @@ sys_cpuusage:
|
||||
|
||||
mov eax,[esp]
|
||||
shl eax,5
|
||||
add eax,0x3000+TASKDATA.pid
|
||||
add eax,CURRENT_TASK+TASKDATA.pid
|
||||
mov eax,[eax]
|
||||
mov [ebx+20],eax
|
||||
|
||||
@ -2505,7 +2505,7 @@ sys_cpuusage:
|
||||
|
||||
mov eax,[esp]
|
||||
shl eax,5
|
||||
add eax,0x3000+TASKDATA.state
|
||||
add eax,CURRENT_TASK+TASKDATA.state
|
||||
mov eax,[eax]
|
||||
mov [ebx+40],ax
|
||||
|
||||
@ -2531,7 +2531,7 @@ sys_cpuusage:
|
||||
|
||||
; return number of processes
|
||||
|
||||
mov eax,[0x3004]
|
||||
mov eax,[TASK_COUNT]
|
||||
mov [esp+36],eax
|
||||
ret
|
||||
|
||||
@ -2618,7 +2618,7 @@ sys_redrawstat:
|
||||
|
||||
; buttons away
|
||||
|
||||
mov ecx,[0x3000]
|
||||
mov ecx,[CURRENT_TASK]
|
||||
|
||||
sys_newba2:
|
||||
|
||||
@ -2661,8 +2661,8 @@ sys_redrawstat:
|
||||
cmp eax,2
|
||||
jnz srl1
|
||||
|
||||
mov edx,[0x3010] ; return whole screen draw area for this app
|
||||
add edx,draw_data-0x3000
|
||||
mov edx,[TASK_BASE] ; return whole screen draw area for this app
|
||||
add edx,draw_data-CURRENT_TASK
|
||||
mov [edx+RECT.left], 0
|
||||
mov [edx+RECT.top], 0
|
||||
mov eax,[0xfe00]
|
||||
@ -2670,7 +2670,7 @@ sys_redrawstat:
|
||||
mov eax,[0xfe04]
|
||||
mov [edx+RECT.bottom],eax
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
or [edi-twdw+WDATA.fl_wdrawn], 1 ; no new position & buttons from app
|
||||
|
||||
call sys_window_mouse
|
||||
@ -2731,9 +2731,9 @@ sys_drawwindow:
|
||||
|
||||
; parameter for drawwindow_IV
|
||||
push 0
|
||||
mov edi, [0x3004]
|
||||
mov edi, [TASK_COUNT]
|
||||
movzx edi, word [0xC400 + edi*2]
|
||||
cmp edi, [0x3000]
|
||||
cmp edi, [CURRENT_TASK]
|
||||
jne @f
|
||||
inc dword [esp]
|
||||
@@:
|
||||
@ -2757,12 +2757,12 @@ draw_window_caption:
|
||||
call [disable_mouse]
|
||||
|
||||
xor eax,eax
|
||||
mov edx,[0x3004]
|
||||
mov edx,[TASK_COUNT]
|
||||
movzx edx,word[0xC400+edx*2]
|
||||
cmp edx,[0x3000]
|
||||
cmp edx,[CURRENT_TASK]
|
||||
jne @f
|
||||
inc eax
|
||||
@@: mov edx,[0x3000]
|
||||
@@: mov edx,[CURRENT_TASK]
|
||||
shl edx,5
|
||||
add edx,window_data
|
||||
movzx ebx,[edx+WDATA.fl_wstyle]
|
||||
@ -2790,7 +2790,7 @@ draw_window_caption:
|
||||
|
||||
;--------------------------------------------------------------
|
||||
.2: ;jmp @f
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,5
|
||||
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
||||
jz @f
|
||||
@ -2913,7 +2913,7 @@ set_window_clientbox:
|
||||
|
||||
sys_set_window:
|
||||
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,5
|
||||
add edi,window_data
|
||||
|
||||
@ -2996,7 +2996,7 @@ syscall_windowsettings:
|
||||
; NOTE: only window owner thread can set its caption,
|
||||
; so there's no parameter for PID/TID
|
||||
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,5
|
||||
|
||||
; have to check if caption is within application memory limit
|
||||
@ -3031,7 +3031,7 @@ syscall_windowsettings:
|
||||
|
||||
sys_window_move:
|
||||
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,5
|
||||
add edi,window_data
|
||||
|
||||
@ -3299,7 +3299,7 @@ checkmisc:
|
||||
jne mouse_not_active
|
||||
mov [mouse_active], 0
|
||||
xor edi, edi
|
||||
mov ecx, [0x3004]
|
||||
mov ecx, [TASK_COUNT]
|
||||
set_mouse_event:
|
||||
add edi, 256
|
||||
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
|
||||
@ -3357,8 +3357,8 @@ checkmisc:
|
||||
noshutdown:
|
||||
|
||||
|
||||
mov eax,[0x3004] ; termination
|
||||
mov ebx,0x3020+TASKDATA.state
|
||||
mov eax,[TASK_COUNT] ; termination
|
||||
mov ebx,TASK_DATA+TASKDATA.state
|
||||
mov esi,1
|
||||
|
||||
newct:
|
||||
@ -3475,7 +3475,7 @@ redrawscreen:
|
||||
|
||||
pop ecx
|
||||
|
||||
cmp ecx,[0x3004]
|
||||
cmp ecx,[TASK_COUNT]
|
||||
jle newdw2
|
||||
|
||||
pop eax
|
||||
@ -3545,7 +3545,7 @@ delay_ms: ; delay in 1/1000 sec
|
||||
set_app_param:
|
||||
push edi
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov [edi+TASKDATA.event_mask],eax
|
||||
|
||||
pop edi
|
||||
@ -3634,7 +3634,7 @@ memmove: ; memory move in bytes
|
||||
;; 5 file not found
|
||||
;; ebx = size of file
|
||||
;
|
||||
; mov edi,[0x3010]
|
||||
; mov edi,[TASK_BASE]
|
||||
; add edi,0x10
|
||||
; add esi,[edi]
|
||||
; add eax,[edi]
|
||||
@ -3662,12 +3662,12 @@ align 4
|
||||
|
||||
sys_programirq:
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add eax,[edi+TASKDATA.mem_start]
|
||||
|
||||
cmp ebx,16
|
||||
jae .not_owner
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov edi,[edi+TASKDATA.pid]
|
||||
cmp edi,[irq_owner+ebx*4]
|
||||
je spril1
|
||||
@ -3696,7 +3696,7 @@ get_irq_data:
|
||||
shl edx,2
|
||||
add edx,irq_owner
|
||||
mov edx,[edx]
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov edi,[edi+TASKDATA.pid]
|
||||
cmp edx,edi
|
||||
je gidril1
|
||||
@ -3736,7 +3736,7 @@ set_io_access_rights:
|
||||
|
||||
pushad
|
||||
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
imul edi,tss_step
|
||||
add edi,tss_data+128
|
||||
; add edi,128
|
||||
@ -3844,7 +3844,7 @@ r_f_port_area:
|
||||
mov [0x2d0000],edi
|
||||
shl edi,4
|
||||
add edi,0x2d0000
|
||||
mov esi,[0x3010]
|
||||
mov esi,[TASK_BASE]
|
||||
mov esi,[esi+TASKDATA.pid]
|
||||
mov [edi],esi
|
||||
mov [edi+4],ebx
|
||||
@ -3860,7 +3860,7 @@ free_port_area:
|
||||
mov esi,[0x2d0000] ; no reserved areas ?
|
||||
test esi,esi
|
||||
je frpal2
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
mov edx,[edx+TASKDATA.pid]
|
||||
frpal3:
|
||||
mov edi,esi
|
||||
@ -3934,7 +3934,7 @@ reserve_free_irq:
|
||||
|
||||
lea edi,[irq_owner+ebx*4]
|
||||
mov edx,[edi]
|
||||
mov eax,[0x3010]
|
||||
mov eax,[TASK_BASE]
|
||||
cmp edx,[eax+TASKDATA.pid]
|
||||
jne fril1
|
||||
dec ecx
|
||||
@ -3949,7 +3949,7 @@ reserve_free_irq:
|
||||
cmp dword [edi], 0
|
||||
jnz ril1
|
||||
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
mov edx,[edx+TASKDATA.pid]
|
||||
mov [edi],edx
|
||||
dec ecx
|
||||
@ -4001,7 +4001,7 @@ sys_putimage:
|
||||
.exit:
|
||||
ret
|
||||
@@:
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,8
|
||||
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||
rol edx,16
|
||||
@ -4043,7 +4043,7 @@ sys_putimage_palette:
|
||||
; esi = number of bits per pixel, must be 8, 24 or 32
|
||||
; edi = pointer to palette
|
||||
; ebp = row delta
|
||||
mov eax, [0x3000]
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
|
||||
rol edx, 16
|
||||
@ -4104,7 +4104,7 @@ putimage_get32bpp:
|
||||
; edi color
|
||||
|
||||
__sys_drawbar:
|
||||
mov esi,[0x3000]
|
||||
mov esi,[CURRENT_TASK]
|
||||
shl esi,8
|
||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
add ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
@ -4474,7 +4474,7 @@ sys_msg_board:
|
||||
|
||||
|
||||
sys_process_def:
|
||||
mov edi, [0x3000]
|
||||
mov edi, [CURRENT_TASK]
|
||||
|
||||
dec eax ; 1 = set keyboard mode
|
||||
jne no_set_keyboard_setup
|
||||
@ -4635,10 +4635,10 @@ align 4 ; system functions
|
||||
syscall_setpixel: ; SetPixel
|
||||
|
||||
|
||||
mov edx,[0x3010]
|
||||
mov edx,[TASK_BASE]
|
||||
add eax,[edx-twdw+WDATA.box.left]
|
||||
add ebx,[edx-twdw+WDATA.box.top]
|
||||
mov edi,[0x3000]
|
||||
mov edi,[CURRENT_TASK]
|
||||
shl edi,8
|
||||
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
add ebx,[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||
@ -4651,10 +4651,10 @@ align 4
|
||||
|
||||
syscall_writetext: ; WriteText
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
mov ebp,[edi-twdw+WDATA.box.left]
|
||||
push esi
|
||||
mov esi,[0x3000]
|
||||
mov esi,[CURRENT_TASK]
|
||||
shl esi,8
|
||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
shl ebp,16
|
||||
@ -4671,7 +4671,7 @@ align 4
|
||||
syscall_openramdiskfile: ; OpenRamdiskFile
|
||||
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
add edx,[edi]
|
||||
@ -4694,7 +4694,7 @@ syscall_drawrect: ; DrawRect
|
||||
shr eax,16
|
||||
movzx edx,bx
|
||||
shr ebx,16
|
||||
mov esi,[0x3000]
|
||||
mov esi,[CURRENT_TASK]
|
||||
shl esi,8
|
||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||
@ -4726,7 +4726,7 @@ align 4
|
||||
|
||||
syscall_delramdiskfile: ; DelRamdiskFile
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
call filedelete
|
||||
@ -4737,7 +4737,7 @@ align 4
|
||||
|
||||
syscall_writeramdiskfile: ; WriteRamdiskFile
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
add ebx,[edi]
|
||||
@ -4762,7 +4762,7 @@ align 4
|
||||
|
||||
syscall_readstring: ; ReadString
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
call read_string
|
||||
@ -4773,10 +4773,10 @@ align 4
|
||||
|
||||
syscall_drawline: ; DrawLine
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
movzx edx,word[edi-twdw+WDATA.box.left]
|
||||
mov ebp,edx
|
||||
mov esi,[0x3000]
|
||||
mov esi,[CURRENT_TASK]
|
||||
shl esi,8
|
||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||
@ -4860,7 +4860,7 @@ align 4
|
||||
|
||||
read_from_hd: ; Read from hd - fn not in use
|
||||
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
add ecx,[edi]
|
||||
@ -4924,7 +4924,7 @@ undefined_syscall: ; Undefined system call
|
||||
|
||||
; push edi
|
||||
|
||||
; mov edi,[0x3000] ; restore processes tss pointer in gdt, busyfl?
|
||||
; mov edi,[CURRENT_TASK] ; restore processes tss pointer in gdt, busyfl?
|
||||
; imul edi,8
|
||||
; mov [edi+gdts+ tss0 +5], word 01010000b *256 +11101001b
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
||||
;
|
||||
; 0x0098B000 -> kernel heap
|
||||
;
|
||||
; 0x01FFFFFF heam min limit
|
||||
; 0x01FFFFFF heap min limit
|
||||
; 0x7DBFFFFF heap max limit
|
||||
; 0x7DC00000 -> 0x7FBFFFFF LFB 32Mb
|
||||
; 0x7DC00000 -> 0x7E3FFFFF application available LFB 8Mb
|
||||
|
@ -215,7 +215,7 @@ socket_open:
|
||||
mov [eax + SOCKET.RemoteIP], edx
|
||||
mov [eax + SOCKET.rxDataCount], dword 0 ; recieved data count
|
||||
|
||||
mov esi, [0x3010]
|
||||
mov esi, [TASK_BASE]
|
||||
mov ebx, [esi+TASKDATA.pid]
|
||||
mov [eax + SOCKET.PID], ebx ; save the process ID
|
||||
pop eax ; Get the socket number back, so we can return it
|
||||
@ -279,7 +279,7 @@ socket_open_tcp:
|
||||
sot_001:
|
||||
mov [eax + SOCKET.TCBState], ebx ; Indicate the state of the TCB
|
||||
|
||||
mov esi, [0x3010]
|
||||
mov esi, [TASK_BASE]
|
||||
mov ecx, [esi+TASKDATA.pid]
|
||||
mov [eax + SOCKET.PID], ecx ; save the process ID
|
||||
|
||||
@ -709,7 +709,7 @@ socket_write:
|
||||
pop eax ; get callers ptr to data to send
|
||||
|
||||
; Get the address of the callers data
|
||||
mov edi, [0x3010]
|
||||
mov edi, [TASK_BASE]
|
||||
add edi, TASKDATA.mem_start
|
||||
add eax, [edi]
|
||||
mov esi, eax
|
||||
@ -824,7 +824,7 @@ socket_write_tcp:
|
||||
mov bl, 0x10 ; ACK
|
||||
|
||||
; Get the address of the callers data
|
||||
mov edi, [0x3010]
|
||||
mov edi, [TASK_BASE]
|
||||
add edi, TASKDATA.mem_start
|
||||
add edx, [edi]
|
||||
mov esi, edx
|
||||
|
@ -929,7 +929,7 @@ stack_get_packet:
|
||||
push eax ; save address of IP data
|
||||
|
||||
; Get the address of the callers data
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add edx,[edi]
|
||||
mov edi, edx
|
||||
@ -992,7 +992,7 @@ stack_insert_packet:
|
||||
pop eax ; get callers ptr to data to send
|
||||
|
||||
; Get the address of the callers data
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add eax,[edi]
|
||||
mov esi, eax
|
||||
|
@ -1057,14 +1057,14 @@ ste_data:
|
||||
; flag an event to the application
|
||||
pop eax
|
||||
mov ecx,1
|
||||
mov esi,0x3020+TASKDATA.pid
|
||||
mov esi,TASK_DATA+TASKDATA.pid
|
||||
|
||||
news:
|
||||
cmp [esi],eax
|
||||
je foundPID1
|
||||
inc ecx
|
||||
add esi,0x20
|
||||
cmp ecx,[0x3004]
|
||||
cmp ecx,[TASK_COUNT]
|
||||
jbe news
|
||||
|
||||
foundPID1:
|
||||
|
@ -141,14 +141,14 @@ udprx_002:
|
||||
; flag an event to the application
|
||||
pop eax
|
||||
mov ecx,1
|
||||
mov esi,0x3020+TASKDATA.pid
|
||||
mov esi,TASK_DATA+TASKDATA.pid
|
||||
|
||||
newsearch:
|
||||
cmp [esi],eax
|
||||
je foundPID
|
||||
inc ecx
|
||||
add esi,0x20
|
||||
cmp ecx,[0x3004]
|
||||
cmp ecx,[TASK_COUNT]
|
||||
jbe newsearch
|
||||
|
||||
foundPID:
|
||||
|
@ -30,7 +30,7 @@ sound_interface:
|
||||
|
||||
cmp eax,0 ; Load data
|
||||
jne no_SB16_load_music
|
||||
mov edi,[0x3010]
|
||||
mov edi,[TASK_BASE]
|
||||
add edi,TASKDATA.mem_start
|
||||
add ebx,[edi]
|
||||
call code_SB16_load_music
|
||||
@ -72,12 +72,12 @@ sound_interface:
|
||||
movzx eax, byte [countDelayNote]
|
||||
or al, al ; player is busy ?
|
||||
jnz retFunc55 ; return counter delay Note
|
||||
; mov eax, [0x3010]
|
||||
; mov eax, [TASK_BASE]
|
||||
; mov eax, [eax+0x10] ; address application im memory
|
||||
; add eax, edx ; add offset Delay-Note string
|
||||
; mov [memAdrNote], eax
|
||||
mov [memAdrNote],edx
|
||||
mov eax,[0x3010]
|
||||
mov eax,[TASK_BASE]
|
||||
mov eax,[eax+TASKDATA.pid]
|
||||
mov [pidProcessNote],eax
|
||||
xor eax, eax ; Ok! EAX = 0
|
||||
|
@ -361,7 +361,7 @@ proc load_cursor stdcall, src:dword, flags:dword
|
||||
@@:
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 5
|
||||
mov eax, [0x3000+eax+4]
|
||||
mov eax, [CURRENT_TASK+eax+4]
|
||||
mov ebx, [src]
|
||||
mov ecx, [flags]
|
||||
call [create_cursor] ;eax, ebx, ecx
|
||||
@ -394,7 +394,7 @@ proc delete_cursor stdcall, hcursor:dword
|
||||
|
||||
mov ebx, [CURRENT_TASK]
|
||||
shl ebx, 5
|
||||
mov ebx, [0x3000+ebx+4]
|
||||
mov ebx, [CURRENT_TASK+ebx+4]
|
||||
cmp ebx, [esi+CURSOR.pid]
|
||||
jne .fail
|
||||
|
||||
|
@ -364,7 +364,7 @@ vesa12_drawbar:
|
||||
push ebx
|
||||
push ecx
|
||||
push edx
|
||||
mov ecx,[0x3010]
|
||||
mov ecx,[TASK_BASE]
|
||||
add eax,[ecx-twdw+WDATA.box.left]
|
||||
add ebx,[ecx-twdw+WDATA.box.top]
|
||||
push eax
|
||||
@ -402,17 +402,17 @@ vesa12_drawbar:
|
||||
|
||||
push eax
|
||||
push ecx
|
||||
mov eax,[0x3010]
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
||||
mov eax,[TASK_BASE]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.left]
|
||||
cmp ecx,0
|
||||
jnz dbcblimitlset12
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.top]
|
||||
cmp ecx,0
|
||||
jnz dbcblimitlset12
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
|
||||
cmp ecx,[0xfe00]
|
||||
jnz dbcblimitlset12
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
|
||||
cmp ecx,[0xfe04]
|
||||
jnz dbcblimitlset12
|
||||
pop ecx
|
||||
@ -462,7 +462,7 @@ dbpi24bit12:
|
||||
mov ebx,3
|
||||
div ebx
|
||||
add eax,WinMapAddress
|
||||
mov ebx,[0x3000]
|
||||
mov ebx,[CURRENT_TASK]
|
||||
cld
|
||||
|
||||
dbnp2412:
|
||||
@ -553,7 +553,7 @@ dbpi24bit12:
|
||||
sub eax,[0xfe80]
|
||||
shr eax,2
|
||||
add eax,WinMapAddress
|
||||
mov ebx,[0x3000]
|
||||
mov ebx,[CURRENT_TASK]
|
||||
cld
|
||||
|
||||
dbnp3212:
|
||||
@ -731,7 +731,7 @@ vesa12_putimage:
|
||||
push edx
|
||||
movzx eax,word [esp+2]
|
||||
movzx ebx,word [esp+0]
|
||||
mov ecx,[0x3010]
|
||||
mov ecx,[TASK_BASE]
|
||||
add eax,[ecx-twdw+WDATA.box.left]
|
||||
add ebx,[ecx-twdw+WDATA.box.top]
|
||||
push eax
|
||||
@ -760,15 +760,15 @@ vesa12_putimage:
|
||||
; check limits while draw ?
|
||||
|
||||
push ecx
|
||||
mov eax,[0x3010]
|
||||
cmp dword [eax+draw_data-0x3000+RECT.left], 0
|
||||
mov eax,[TASK_BASE]
|
||||
cmp dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
|
||||
jnz dbcblimitlset212
|
||||
cmp dword [eax+draw_data-0x3000+RECT.top], 0
|
||||
cmp dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
|
||||
jnz dbcblimitlset212
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
|
||||
cmp ecx,[0xfe00]
|
||||
jnz dbcblimitlset212
|
||||
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
|
||||
cmp ecx,[0xfe04]
|
||||
jnz dbcblimitlset212
|
||||
pop ecx
|
||||
@ -798,7 +798,7 @@ vesa12_putimage:
|
||||
mov ebx,3
|
||||
div ebx
|
||||
add edx,WinMapAddress
|
||||
mov ebx,[0x3000]
|
||||
mov ebx,[CURRENT_TASK]
|
||||
mov bh,[esp+4*3]
|
||||
|
||||
np2412:
|
||||
@ -867,7 +867,7 @@ vesa12_putimage:
|
||||
sub edx,[0xfe80]
|
||||
shr edx,2
|
||||
add edx,WinMapAddress
|
||||
mov ebx,[0x3000]
|
||||
mov ebx,[CURRENT_TASK]
|
||||
mov bh,[esp+4*3]
|
||||
|
||||
np3212:
|
||||
|
@ -122,7 +122,7 @@ vesa20_putimage:
|
||||
mov [putimg.image_cy], edx
|
||||
|
||||
; calculate absolute (i.e. screen) coordinates
|
||||
mov eax, [0x3010]
|
||||
mov eax, [TASK_BASE]
|
||||
mov ebx, [eax-twdw + WDATA.box.left]
|
||||
add ebx, [putimg.image_cx]
|
||||
mov [putimg.abs_cx], ebx
|
||||
@ -211,7 +211,7 @@ vesa20_putimage:
|
||||
xchg eax, ebp
|
||||
|
||||
; get process number
|
||||
mov ebx, [0x3000]
|
||||
mov ebx, [CURRENT_TASK]
|
||||
|
||||
cmp byte [ScreenBPP], 32
|
||||
je put_image_end_32
|
||||
@ -619,7 +619,7 @@ vesa20_drawbar:
|
||||
mov [drbar.bar_cx], eax
|
||||
mov [drbar.bar_cy], ebx
|
||||
|
||||
mov edi, [0x3010]
|
||||
mov edi, [TASK_BASE]
|
||||
add eax, [edi-twdw + WDATA.box.left] ; win_cx
|
||||
add ebx, [edi-twdw + WDATA.box.top] ; win_cy
|
||||
mov [drbar.abs_cx], eax
|
||||
@ -701,7 +701,7 @@ vesa20_drawbar:
|
||||
xchg eax, ebp
|
||||
|
||||
; get process number
|
||||
mov ebx, [0x3000]
|
||||
mov ebx, [CURRENT_TASK]
|
||||
|
||||
cmp byte [ScreenBPP], 24
|
||||
jne draw_bar_end_32
|
||||
|
@ -409,7 +409,7 @@ VGA_draw_bar:
|
||||
|
||||
VGA_draw_bar_1:
|
||||
mov [temp.cx],eax
|
||||
mov eax, [0x3010]
|
||||
mov eax, [TASK_BASE]
|
||||
add ebx, [eax-twdw + 4]
|
||||
mov eax, [eax-twdw + 0]
|
||||
add eax, [temp.cx]
|
||||
|
Loading…
Reference in New Issue
Block a user