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
|
cmp eax,2
|
||||||
jnz nocdtl
|
jnz nocdtl
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
call sys_cdtracklist
|
call sys_cdtracklist
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
; Àâòîð èñõîäíîãî òåêñòà Êóëàêîâ Âëàäèìèð Ãåííàäüåâè÷.
|
; Àâòîð èñõîäíîãî òåêñòà Êóëàêîâ Âëàäèìèð Ãåííàäüåâè÷.
|
||||||
; Àäàïòàöèÿ è äîðàáîòêà Mario79
|
; Àäàïòàöèÿ è äîðàáîòêà Mario79
|
||||||
|
|
||||||
give_back_application_data: ; переслать приложению
|
give_back_application_data: ; переслать приложению
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov edi,[edi+TASKDATA.mem_start]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ecx
|
add edi,ecx
|
||||||
give_back_application_data_1:
|
give_back_application_data_1:
|
||||||
@ -16,8 +16,8 @@ give_back_application_data_1:
|
|||||||
rep movsd
|
rep movsd
|
||||||
ret
|
ret
|
||||||
|
|
||||||
take_data_from_application: ; взять из приложения
|
take_data_from_application: ; взять из приложени
|
||||||
mov esi,[0x3010]
|
mov esi,[TASK_BASE]
|
||||||
mov esi,[esi+TASKDATA.mem_start]
|
mov esi,[esi+TASKDATA.mem_start]
|
||||||
add esi,ecx
|
add esi,ecx
|
||||||
take_data_from_application_1:
|
take_data_from_application_1:
|
||||||
@ -66,7 +66,7 @@ FDC_C DB ?
|
|||||||
FDC_H DB ?
|
FDC_H DB ?
|
||||||
FDC_R DB ?
|
FDC_R DB ?
|
||||||
FDC_N DB ?
|
FDC_N DB ?
|
||||||
; Счетчик повторения операции чтения
|
; Счетчик повторения операции чтени
|
||||||
ReadRepCounter DB ?
|
ReadRepCounter DB ?
|
||||||
; Ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
; Ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||||
RecalRepCounter DB ?
|
RecalRepCounter DB ?
|
||||||
@ -136,7 +136,7 @@ FDCDataOutput:
|
|||||||
out DX,AL
|
out DX,AL
|
||||||
@@End_5:
|
@@End_5:
|
||||||
; popa
|
; popa
|
||||||
pop edx ecx eax
|
pop edx ecx eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;******************************************
|
;******************************************
|
||||||
@ -174,7 +174,7 @@ FDCDataInput:
|
|||||||
;* ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÊÎÍÒÐÎËËÅÐÀ ÍÃÌÄ *
|
;* ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÊÎÍÒÐÎËËÅÐÀ ÍÃÌÄ *
|
||||||
;*********************************************
|
;*********************************************
|
||||||
FDCInterrupt:
|
FDCInterrupt:
|
||||||
; Установить флаг прерывания
|
; Установить флаг прерывани
|
||||||
mov [FDD_IntFlag],1
|
mov [FDD_IntFlag],1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ WaitFDCInterrupt:
|
|||||||
pusha
|
pusha
|
||||||
; Ñáðîñèòü áàéò ñîñòîÿíèÿ îïåðàöèè
|
; Ñáðîñèòü áàéò ñîñòîÿíèÿ îïåðàöèè
|
||||||
mov [FDC_Status],FDC_Normal
|
mov [FDC_Status],FDC_Normal
|
||||||
; Сбросить флаг прерывания
|
; Сбросить флаг прерывани
|
||||||
mov [FDD_IntFlag],0
|
mov [FDD_IntFlag],0
|
||||||
; Îáíóëèòü ñ÷åò÷èê òèêîâ
|
; Îáíóëèòü ñ÷åò÷èê òèêîâ
|
||||||
mov eax,[timer_ticks]
|
mov eax,[timer_ticks]
|
||||||
@ -352,7 +352,7 @@ SeekTrack:
|
|||||||
; Ïîäàòü êîìàíäó "Ïîèñê"
|
; Ïîäàòü êîìàíäó "Ïîèñê"
|
||||||
mov AL,0Fh
|
mov AL,0Fh
|
||||||
call FDCDataOutput
|
call FDCDataOutput
|
||||||
; Передать байт номера головки/накопителя
|
; Передать байт номера головки/накопител
|
||||||
mov AL,[FDD_Head]
|
mov AL,[FDD_Head]
|
||||||
shl AL,2
|
shl AL,2
|
||||||
call FDCDataOutput
|
call FDCDataOutput
|
||||||
@ -467,15 +467,15 @@ ReadSectWithRetr:
|
|||||||
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||||
mov [RecalRepCounter],0
|
mov [RecalRepCounter],0
|
||||||
@@TryAgain:
|
@@TryAgain:
|
||||||
; Обнулить счетчик повторения операции чтения
|
; Обнулить счетчик повторения операции чтени
|
||||||
mov [ReadRepCounter],0
|
mov [ReadRepCounter],0
|
||||||
@@ReadSector_1:
|
@@ReadSector_1:
|
||||||
call ReadSector
|
call ReadSector
|
||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
je @@Exit_2
|
je @@Exit_2
|
||||||
cmp [FDC_Status],1
|
cmp [FDC_Status],1
|
||||||
je @@Err_3
|
je @@Err_3
|
||||||
; Троекратное повторение чтения
|
; Троекратное повторение чтени
|
||||||
inc [ReadRepCounter]
|
inc [ReadRepCounter]
|
||||||
cmp [ReadRepCounter],3
|
cmp [ReadRepCounter],3
|
||||||
jb @@ReadSector_1
|
jb @@ReadSector_1
|
||||||
@ -565,7 +565,7 @@ WriteSectWithRetr:
|
|||||||
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
; Îáíóëèòü ñ÷åò÷èê ïîâòîðåíèÿ îïåðàöèè ðåêàëèáðîâêè
|
||||||
mov [RecalRepCounter],0
|
mov [RecalRepCounter],0
|
||||||
@@TryAgain_1:
|
@@TryAgain_1:
|
||||||
; Обнулить счетчик повторения операции чтения
|
; Обнулить счетчик повторения операции чтени
|
||||||
mov [ReadRepCounter],0
|
mov [ReadRepCounter],0
|
||||||
@@WriteSector_1:
|
@@WriteSector_1:
|
||||||
call WriteSector
|
call WriteSector
|
||||||
@ -573,7 +573,7 @@ WriteSectWithRetr:
|
|||||||
je @@Exit_4
|
je @@Exit_4
|
||||||
cmp [FDC_Status],1
|
cmp [FDC_Status],1
|
||||||
je @@Err_4
|
je @@Err_4
|
||||||
; Троекратное повторение чтения
|
; Троекратное повторение чтени
|
||||||
inc [ReadRepCounter]
|
inc [ReadRepCounter]
|
||||||
cmp [ReadRepCounter],3
|
cmp [ReadRepCounter],3
|
||||||
jb @@WriteSector_1
|
jb @@WriteSector_1
|
||||||
|
@ -19,7 +19,7 @@ sys_debug_services_table:
|
|||||||
debug_set_event_data:
|
debug_set_event_data:
|
||||||
; in: ebx = pointer
|
; in: ebx = pointer
|
||||||
; destroys eax
|
; destroys eax
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
|
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
|
||||||
ret
|
ret
|
||||||
@ -36,7 +36,7 @@ get_debuggee_slot:
|
|||||||
jz .ret_bad
|
jz .ret_bad
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
push ebx
|
push ebx
|
||||||
mov ebx, [0x3000]
|
mov ebx, [CURRENT_TASK]
|
||||||
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
|
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
|
||||||
pop ebx
|
pop ebx
|
||||||
jnz .ret_bad
|
jnz .ret_bad
|
||||||
@ -72,13 +72,13 @@ debug_suspend:
|
|||||||
; destroys eax,ebx
|
; destroys eax,ebx
|
||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .ret
|
jc .ret
|
||||||
mov bl, [0x3000+eax+TASKDATA.state] ; process state
|
mov bl, [CURRENT_TASK+eax+TASKDATA.state] ; process state
|
||||||
test bl, bl
|
test bl, bl
|
||||||
jz .1
|
jz .1
|
||||||
cmp bl, 5
|
cmp bl, 5
|
||||||
jnz .ret
|
jnz .ret
|
||||||
mov bl, 2
|
mov bl, 2
|
||||||
.2: mov [0x3000+eax+TASKDATA.state], bl
|
.2: mov [CURRENT_TASK+eax+TASKDATA.state], bl
|
||||||
.ret:
|
.ret:
|
||||||
sti
|
sti
|
||||||
ret
|
ret
|
||||||
@ -87,13 +87,13 @@ debug_suspend:
|
|||||||
jmp .2
|
jmp .2
|
||||||
|
|
||||||
do_resume:
|
do_resume:
|
||||||
mov bl, [0x3000+eax+TASKDATA.state]
|
mov bl, [CURRENT_TASK+eax+TASKDATA.state]
|
||||||
cmp bl, 1
|
cmp bl, 1
|
||||||
jz .1
|
jz .1
|
||||||
cmp bl, 2
|
cmp bl, 2
|
||||||
jnz .ret
|
jnz .ret
|
||||||
mov bl, 5
|
mov bl, 5
|
||||||
.2: mov [0x3000+eax+TASKDATA.state], bl
|
.2: mov [CURRENT_TASK+eax+TASKDATA.state], bl
|
||||||
.ret: ret
|
.ret: ret
|
||||||
.1: dec ebx
|
.1: dec ebx
|
||||||
jmp .2
|
jmp .2
|
||||||
@ -380,7 +380,7 @@ debugger_notify:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
cmp dword [0x3000], 1
|
cmp dword [CURRENT_TASK], 1
|
||||||
jnz .notos
|
jnz .notos
|
||||||
cmp [timer_ticks], edi
|
cmp [timer_ticks], edi
|
||||||
jae .ret
|
jae .ret
|
||||||
@ -430,7 +430,7 @@ debug_exc:
|
|||||||
jns @f
|
jns @f
|
||||||
; this is exception from task switch
|
; this is exception from task switch
|
||||||
; set DRx registers for task and continue
|
; set DRx registers for task and continue
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, 0x80000+APPDATA.dbg_regs
|
add eax, 0x80000+APPDATA.dbg_regs
|
||||||
mov ecx, [eax+0]
|
mov ecx, [eax+0]
|
||||||
@ -453,7 +453,7 @@ debug_exc:
|
|||||||
mov dr6, eax
|
mov dr6, eax
|
||||||
; test if debugging
|
; test if debugging
|
||||||
cli
|
cli
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -463,7 +463,7 @@ debug_exc:
|
|||||||
add esp, 28h+4
|
add esp, 28h+4
|
||||||
mov [error_interrupt], 1
|
mov [error_interrupt], 1
|
||||||
call show_error_parameters
|
call show_error_parameters
|
||||||
mov edx, [0x3010]
|
mov edx, [TASK_BASE]
|
||||||
mov byte [edx+TASKDATA.state], 4
|
mov byte [edx+TASKDATA.state], 4
|
||||||
jmp change_task
|
jmp change_task
|
||||||
.debug:
|
.debug:
|
||||||
@ -483,7 +483,7 @@ debug_exc:
|
|||||||
cmp cl, not 10h
|
cmp cl, not 10h
|
||||||
jnz .l1
|
jnz .l1
|
||||||
push edx ; DR6 image
|
push edx ; DR6 image
|
||||||
mov ecx, [0x3010]
|
mov ecx, [TASK_BASE]
|
||||||
push dword [ecx+TASKDATA.pid] ; PID
|
push dword [ecx+TASKDATA.pid] ; PID
|
||||||
push 12
|
push 12
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -492,7 +492,7 @@ debug_exc:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
mov edx, [0x3010]
|
mov edx, [TASK_BASE]
|
||||||
mov byte [edx+TASKDATA.state], 1 ; suspended
|
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||||
call change_task
|
call change_task
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
|
@ -395,7 +395,7 @@ proc init_LFB
|
|||||||
mov edx, LFB_BASE
|
mov edx, LFB_BASE
|
||||||
mov esi, [LFBAddress]
|
mov esi, [LFBAddress]
|
||||||
mov edi, [LFBSize]
|
mov edi, [LFBSize]
|
||||||
mov dword [exp_lfb+4], esi
|
mov dword [exp_lfb+4], edx
|
||||||
|
|
||||||
shr edi, 12
|
shr edi, 12
|
||||||
mov [pg_count], edi
|
mov [pg_count], edi
|
||||||
|
@ -48,7 +48,7 @@ irq0:
|
|||||||
jnz .return
|
jnz .return
|
||||||
|
|
||||||
call do_change_task
|
call do_change_task
|
||||||
|
|
||||||
.return:
|
.return:
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iret
|
iret
|
||||||
@ -67,11 +67,11 @@ change_task:
|
|||||||
jne .find_next_task
|
jne .find_next_task
|
||||||
mov [dma_task_switched], 0
|
mov [dma_task_switched], 0
|
||||||
mov ebx, [dma_process]
|
mov ebx, [dma_process]
|
||||||
cmp [0x3000], ebx
|
cmp [CURRENT_TASK], ebx
|
||||||
je .return
|
je .return
|
||||||
mov edi, [dma_slot_ptr]
|
mov edi, [dma_slot_ptr]
|
||||||
mov [0x3000], ebx
|
mov [CURRENT_TASK], ebx
|
||||||
mov [0x3010], edi
|
mov [TASK_BASE], edi
|
||||||
jmp @f
|
jmp @f
|
||||||
.find_next_task:
|
.find_next_task:
|
||||||
; \end{Mario79}
|
; \end{Mario79}
|
||||||
@ -103,7 +103,7 @@ endg
|
|||||||
|
|
||||||
|
|
||||||
update_counters:
|
update_counters:
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
mov ebx, [edi+TASKDATA.counter_add] ; time stamp counter add
|
mov ebx, [edi+TASKDATA.counter_add] ; time stamp counter add
|
||||||
call _rdtsc
|
call _rdtsc
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
@ -119,17 +119,17 @@ ret
|
|||||||
; [0x3000] = ebx and [0x3010] = edi
|
; [0x3000] = ebx and [0x3010] = edi
|
||||||
; corrupts other regs
|
; corrupts other regs
|
||||||
find_next_task:
|
find_next_task:
|
||||||
mov ebx, [0x3000]
|
mov ebx, [CURRENT_TASK]
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
mov [prev_slot], ebx
|
mov [prev_slot], ebx
|
||||||
|
|
||||||
.waiting_for_termination:
|
.waiting_for_termination:
|
||||||
.waiting_for_reuse:
|
.waiting_for_reuse:
|
||||||
.waiting_for_event:
|
.waiting_for_event:
|
||||||
.suspended:
|
.suspended:
|
||||||
cmp ebx, [0x3004]
|
cmp ebx, [TASK_COUNT]
|
||||||
jb @f
|
jb @f
|
||||||
mov edi, 0x3000
|
mov edi, CURRENT_TASK
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
@ -150,8 +150,8 @@ find_next_task:
|
|||||||
cmp al, 9
|
cmp al, 9
|
||||||
je .waiting_for_reuse
|
je .waiting_for_reuse
|
||||||
|
|
||||||
mov [0x3000],ebx
|
mov [CURRENT_TASK],ebx
|
||||||
mov [0x3010],edi
|
mov [TASK_BASE],edi
|
||||||
|
|
||||||
cmp al, 5
|
cmp al, 5
|
||||||
jne .noevents
|
jne .noevents
|
||||||
@ -162,8 +162,8 @@ find_next_task:
|
|||||||
mov [edi+TASKDATA.state], byte 0
|
mov [edi+TASKDATA.state], byte 0
|
||||||
.noevents:
|
.noevents:
|
||||||
.found:
|
.found:
|
||||||
mov [0x3000],ebx
|
mov [CURRENT_TASK],ebx
|
||||||
mov [0x3010],edi
|
mov [TASK_BASE],edi
|
||||||
call _rdtsc
|
call _rdtsc
|
||||||
mov [edi+TASKDATA.counter_add],eax
|
mov [edi+TASKDATA.counter_add],eax
|
||||||
|
|
||||||
@ -191,8 +191,8 @@ updatecputimes:
|
|||||||
mov eax,[idleuse]
|
mov eax,[idleuse]
|
||||||
mov [idleusesec],eax
|
mov [idleusesec],eax
|
||||||
mov [idleuse],dword 0
|
mov [idleuse],dword 0
|
||||||
mov ecx, [0x3004]
|
mov ecx, [TASK_COUNT]
|
||||||
mov edi, 0x3020
|
mov edi, TASK_DATA
|
||||||
.newupdate:
|
.newupdate:
|
||||||
mov ebx,[edi+TASKDATA.counter_sum]
|
mov ebx,[edi+TASKDATA.counter_sum]
|
||||||
mov [edi+TASKDATA.cpu_usage],ebx
|
mov [edi+TASKDATA.cpu_usage],ebx
|
||||||
|
@ -17,7 +17,7 @@ macro SimpleMutex name
|
|||||||
macro WaitSimpleMutex name
|
macro WaitSimpleMutex name
|
||||||
{
|
{
|
||||||
local start_wait,ok
|
local start_wait,ok
|
||||||
start_wait=$
|
start_wait=$
|
||||||
cli
|
cli
|
||||||
cmp [name],dword 0
|
cmp [name],dword 0
|
||||||
jz ok
|
jz ok
|
||||||
@ -26,7 +26,7 @@ start_wait=$
|
|||||||
jmp start_wait
|
jmp start_wait
|
||||||
ok=$
|
ok=$
|
||||||
push eax
|
push eax
|
||||||
mov eax,dword [0x3010+second_base_address]
|
mov eax,dword [TASK_BASE+second_base_address]
|
||||||
mov eax,[eax+TASKDATA.pid]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [name],eax
|
mov [name],eax
|
||||||
pop eax
|
pop eax
|
||||||
@ -60,7 +60,7 @@ macro WaitSimpleCriticalSection name
|
|||||||
{
|
{
|
||||||
local start_wait,first_wait,inc_counter,end_wait
|
local start_wait,first_wait,inc_counter,end_wait
|
||||||
push eax
|
push eax
|
||||||
mov eax,[0x3010+second_base_address]
|
mov eax,[TASK_BASE+second_base_address]
|
||||||
mov eax,[eax+TASKDATA.pid]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
start_wait=$
|
start_wait=$
|
||||||
cli
|
cli
|
||||||
@ -74,7 +74,7 @@ start_wait=$
|
|||||||
first_wait=$
|
first_wait=$
|
||||||
mov [name],eax
|
mov [name],eax
|
||||||
mov [name+4],dword 1
|
mov [name+4],dword 1
|
||||||
jmp end_wait
|
jmp end_wait
|
||||||
inc_counter=$
|
inc_counter=$
|
||||||
inc dword [name+4]
|
inc dword [name+4]
|
||||||
end_wait=$
|
end_wait=$
|
||||||
@ -92,7 +92,7 @@ release_end=$
|
|||||||
macro TryWaitSimpleCriticalSection name ;result in eax and in flags
|
macro TryWaitSimpleCriticalSection name ;result in eax and in flags
|
||||||
{
|
{
|
||||||
local ok,try_end
|
local ok,try_end
|
||||||
mov eax,[0x3000+second_base_address]
|
mov eax,[CURRENT_TASK+second_base_address]
|
||||||
mov eax,[eax+TASKDATA.pid]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
cmp [name],eax
|
cmp [name],eax
|
||||||
jz ok
|
jz ok
|
||||||
|
@ -120,7 +120,7 @@ exc_c:
|
|||||||
|
|
||||||
; test if debugging
|
; test if debugging
|
||||||
cli
|
cli
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -132,7 +132,7 @@ exc_c:
|
|||||||
mov [error_interrupt], eax
|
mov [error_interrupt], eax
|
||||||
call show_error_parameters
|
call show_error_parameters
|
||||||
|
|
||||||
mov edx, [0x3010]
|
mov edx, [TASK_BASE]
|
||||||
mov [edx + TASKDATA.state], byte 4
|
mov [edx + TASKDATA.state], byte 4
|
||||||
|
|
||||||
jmp change_task
|
jmp change_task
|
||||||
@ -143,7 +143,7 @@ exc_c:
|
|||||||
cld
|
cld
|
||||||
movzx ecx, bl
|
movzx ecx, bl
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [0x3010]
|
mov ecx, [TASK_BASE]
|
||||||
push dword [ecx+TASKDATA.pid] ; PID of current process
|
push dword [ecx+TASKDATA.pid] ; PID of current process
|
||||||
push 12
|
push 12
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -152,7 +152,7 @@ exc_c:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
mov edx, [0x3010]
|
mov edx, [TASK_BASE]
|
||||||
mov byte [edx+TASKDATA.state], 1 ; suspended
|
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||||
call change_task
|
call change_task
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
@ -196,9 +196,9 @@ endg
|
|||||||
show_error_parameters:
|
show_error_parameters:
|
||||||
|
|
||||||
mov [write_error_to],process_pid+43
|
mov [write_error_to],process_pid+43
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
mov eax,[0x3000+TASKDATA.pid+eax]
|
mov eax,[CURRENT_TASK+TASKDATA.pid+eax]
|
||||||
call writehex
|
call writehex
|
||||||
|
|
||||||
mov [write_error_to],process_error+43
|
mov [write_error_to],process_error+43
|
||||||
@ -433,9 +433,9 @@ irqhandler:
|
|||||||
set_application_table_status:
|
set_application_table_status:
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax,0x3000+TASKDATA.pid
|
add eax,CURRENT_TASK+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
|
|
||||||
mov [application_table_status],eax
|
mov [application_table_status],eax
|
||||||
@ -448,9 +448,9 @@ set_application_table_status:
|
|||||||
clear_application_table_status:
|
clear_application_table_status:
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax,0x3000+TASKDATA.pid
|
add eax,CURRENT_TASK+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
|
|
||||||
cmp eax,[application_table_status]
|
cmp eax,[application_table_status]
|
||||||
@ -628,7 +628,7 @@ term9:
|
|||||||
|
|
||||||
mov [fpu_owner],1
|
mov [fpu_owner],1
|
||||||
mov eax, [256+PROC_BASE+APPDATA.fpu_state]
|
mov eax, [256+PROC_BASE+APPDATA.fpu_state]
|
||||||
clts
|
clts
|
||||||
bt [cpu_caps], CAPS_SSE
|
bt [cpu_caps], CAPS_SSE
|
||||||
jnc .no_SSE
|
jnc .no_SSE
|
||||||
fxrstor [eax]
|
fxrstor [eax]
|
||||||
@ -737,7 +737,7 @@ term9:
|
|||||||
jz .nodebug
|
jz .nodebug
|
||||||
push 8
|
push 8
|
||||||
pop ecx
|
pop ecx
|
||||||
push dword [0x3000+edi+TASKDATA.pid] ; PID
|
push dword [CURRENT_TASK+edi+TASKDATA.pid] ; PID
|
||||||
push 2
|
push 2
|
||||||
call debugger_notify
|
call debugger_notify
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -764,7 +764,7 @@ term9:
|
|||||||
|
|
||||||
; activate window
|
; activate window
|
||||||
movzx eax, word [0xC000 + esi*2]
|
movzx eax, word [0xC000 + esi*2]
|
||||||
cmp eax, [0x3004]
|
cmp eax, [TASK_COUNT]
|
||||||
jne .dont_activate
|
jne .dont_activate
|
||||||
pushad
|
pushad
|
||||||
.check_next_window:
|
.check_next_window:
|
||||||
@ -774,7 +774,7 @@ term9:
|
|||||||
lea esi, [0xc400+eax*2]
|
lea esi, [0xc400+eax*2]
|
||||||
movzx edi, word [esi] ; edi = process
|
movzx edi, word [esi] ; edi = process
|
||||||
shl edi, 5
|
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
|
je .check_next_window
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
; \begin{diamond}[19.09.2006]
|
; \begin{diamond}[19.09.2006]
|
||||||
@ -789,7 +789,7 @@ term9:
|
|||||||
|
|
||||||
push esi ; remove hd1 & cd & flp reservation
|
push esi ; remove hd1 & cd & flp reservation
|
||||||
shl esi, 5
|
shl esi, 5
|
||||||
mov esi, [esi+0x3000+TASKDATA.pid]
|
mov esi, [esi+CURRENT_TASK+TASKDATA.pid]
|
||||||
cmp [hd1_status], esi
|
cmp [hd1_status], esi
|
||||||
jnz @f
|
jnz @f
|
||||||
call free_hd_channel
|
call free_hd_channel
|
||||||
@ -809,7 +809,7 @@ term9:
|
|||||||
pusha ; remove all irq reservations
|
pusha ; remove all irq reservations
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
mov edi,irq_owner
|
mov edi,irq_owner
|
||||||
mov ecx,16
|
mov ecx,16
|
||||||
newirqfree:
|
newirqfree:
|
||||||
@ -823,7 +823,7 @@ term9:
|
|||||||
pusha ; remove all port reservations
|
pusha ; remove all port reservations
|
||||||
mov edx,esi
|
mov edx,esi
|
||||||
shl edx, 5
|
shl edx, 5
|
||||||
add edx,0x3000
|
add edx,CURRENT_TASK
|
||||||
mov edx,[edx+TASKDATA.pid]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
|
|
||||||
rmpr0:
|
rmpr0:
|
||||||
@ -867,12 +867,12 @@ term9:
|
|||||||
popa
|
popa
|
||||||
mov edi,esi ; do not run this process slot
|
mov edi,esi ; do not run this process slot
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
mov [edi+0x3000 + TASKDATA.state],byte 9
|
mov [edi+CURRENT_TASK + TASKDATA.state],byte 9
|
||||||
; debugger test - terminate all debuggees
|
; debugger test - terminate all debuggees
|
||||||
mov eax, 2
|
mov eax, 2
|
||||||
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
|
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
|
||||||
.xd0:
|
.xd0:
|
||||||
cmp eax, [0x3004]
|
cmp eax, [TASK_COUNT]
|
||||||
ja .xd1
|
ja .xd1
|
||||||
cmp dword [ecx], esi
|
cmp dword [ecx], esi
|
||||||
jnz @f
|
jnz @f
|
||||||
|
@ -342,7 +342,7 @@ proc CreateBuffer stdcall, format:dword, size:dword
|
|||||||
.test_ok:
|
.test_ok:
|
||||||
mov ebx, [CURRENT_TASK] ;hack: direct accsess
|
mov ebx, [CURRENT_TASK] ;hack: direct accsess
|
||||||
shl ebx, 5 ;to kernel data
|
shl ebx, 5 ;to kernel data
|
||||||
mov ebx, [0x3000+ebx+4]
|
mov ebx, [CURRENT_TASK+ebx+4]
|
||||||
mov eax, STREAM_SIZE
|
mov eax, STREAM_SIZE
|
||||||
|
|
||||||
call CreateObject
|
call CreateObject
|
||||||
|
@ -31,9 +31,9 @@ reserve_flp:
|
|||||||
reserve_flp_ok:
|
reserve_flp_ok:
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
mov [flp_status],eax
|
mov [flp_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
;; 27.05.2006 LFN create/rewrite file - diamond ;;
|
;; 27.05.2006 LFN create/rewrite file - diamond ;;
|
||||||
;; 04.05.2006 LFN read folder - diamond ;;
|
;; 04.05.2006 LFN read folder - diamond ;;
|
||||||
;; 29.04.2006 Elimination of hangup after the ;;
|
;; 29.04.2006 Elimination of hangup after the ;;
|
||||||
;; expiration hd_wait_timeout - Mario79 ;;
|
;; expiration hd_wait_timeout - Mario79 ;;
|
||||||
;; 23.04.2006 LFN read file - diamond ;;
|
;; 23.04.2006 LFN read file - diamond ;;
|
||||||
;; 28.01.2006 find all Fat16/32 partition in all input point ;;
|
;; 28.01.2006 find all Fat16/32 partition in all input point ;;
|
||||||
;; to MBR, see file part_set.inc - Mario79 ;;
|
;; to MBR, see file part_set.inc - Mario79 ;;
|
||||||
@ -124,9 +124,9 @@ reserve_hd1:
|
|||||||
reserve_ok1:
|
reserve_ok1:
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
mov [hd1_status],eax
|
mov [hd1_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
@ -184,7 +184,7 @@ free_hd_channel:
|
|||||||
mov [IDE_Channel_2],0
|
mov [IDE_Channel_2],0
|
||||||
ret
|
ret
|
||||||
;********************************************
|
;********************************************
|
||||||
problem_partition db 0 ; used for partitions search
|
problem_partition db 0 ; used for partitions search
|
||||||
|
|
||||||
include 'part_set.inc'
|
include 'part_set.inc'
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ set_FAT:
|
|||||||
call hd_read
|
call hd_read
|
||||||
cmp [hd_error],0
|
cmp [hd_error],0
|
||||||
jne sfc_error
|
jne sfc_error
|
||||||
|
|
||||||
|
|
||||||
sfc_in_cache:
|
sfc_in_cache:
|
||||||
cmp [fs_type],16
|
cmp [fs_type],16
|
||||||
@ -632,7 +632,7 @@ get_data_cluster:
|
|||||||
gdcl1:
|
gdcl1:
|
||||||
call hd_read
|
call hd_read
|
||||||
cmp [hd_error],0
|
cmp [hd_error],0
|
||||||
jne gdc_error
|
jne gdc_error
|
||||||
|
|
||||||
add ebx,512 ; update pointer
|
add ebx,512 ; update pointer
|
||||||
dec edx
|
dec edx
|
||||||
@ -1329,7 +1329,7 @@ delete_entry_name:
|
|||||||
mov ebx,buffer
|
mov ebx,buffer
|
||||||
call hd_read ; read previous sector
|
call hd_read ; read previous sector
|
||||||
cmp [hd_error],0
|
cmp [hd_error],0
|
||||||
jne delete_name_end
|
jne delete_name_end
|
||||||
|
|
||||||
mov ebx,buffer+0x1e0 ; start from last entry
|
mov ebx,buffer+0x1e0 ; start from last entry
|
||||||
|
|
||||||
@ -1400,7 +1400,7 @@ get_hd_info:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
info_access_denied:
|
info_access_denied:
|
||||||
add esp,4
|
add esp,4
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
@ -1556,7 +1556,7 @@ fs_HdRead:
|
|||||||
or ebx, -1
|
or ebx, -1
|
||||||
mov eax, ERROR_ACCESS_DENIED
|
mov eax, ERROR_ACCESS_DENIED
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.noaccess_3:
|
.noaccess_3:
|
||||||
add esp,4
|
add esp,4
|
||||||
.noaccess_1:
|
.noaccess_1:
|
||||||
@ -1629,7 +1629,7 @@ fs_HdRead:
|
|||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
call hd_read
|
call hd_read
|
||||||
cmp [hd_error],0
|
cmp [hd_error],0
|
||||||
jne .noaccess_1
|
jne .noaccess_1
|
||||||
pop ebx
|
pop ebx
|
||||||
add edx, 512
|
add edx, 512
|
||||||
sub ecx, 512
|
sub ecx, 512
|
||||||
|
@ -85,7 +85,7 @@ file_system:
|
|||||||
cmp dword [eax+0],15 ; GET_DISK_INFO
|
cmp dword [eax+0],15 ; GET_DISK_INFO
|
||||||
je fs_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
|
jz no_checks_for_kernel
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
cmp dword [eax+0],1
|
cmp dword [eax+0],1
|
||||||
@ -96,7 +96,7 @@ file_system:
|
|||||||
call check_region
|
call check_region
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jnz area_in_app_mem
|
jnz area_in_app_mem
|
||||||
|
|
||||||
.error_output:
|
.error_output:
|
||||||
mov esi,buffer_failed
|
mov esi,buffer_failed
|
||||||
call sys_msg_board_str
|
call sys_msg_board_str
|
||||||
@ -105,7 +105,7 @@ file_system:
|
|||||||
ret
|
ret
|
||||||
iglobal
|
iglobal
|
||||||
buffer_failed db 'K : Buffer check failed',13,10,0
|
buffer_failed db 'K : Buffer check failed',13,10,0
|
||||||
endg
|
endg
|
||||||
.usual_check:
|
.usual_check:
|
||||||
cmp dword [eax+0],0
|
cmp dword [eax+0],0
|
||||||
mov ecx,512
|
mov ecx,512
|
||||||
@ -274,7 +274,7 @@ endg
|
|||||||
|
|
||||||
fs_noramdisk_write:
|
fs_noramdisk_write:
|
||||||
fs_noramdisk:
|
fs_noramdisk:
|
||||||
|
|
||||||
;********************************************************************
|
;********************************************************************
|
||||||
mov eax,[edi+1]
|
mov eax,[edi+1]
|
||||||
cmp eax,'FD '
|
cmp eax,'FD '
|
||||||
@ -289,7 +289,7 @@ endg
|
|||||||
je fs_give_dir1
|
je fs_give_dir1
|
||||||
|
|
||||||
mov eax,[edi+1+12]
|
mov eax,[edi+1+12]
|
||||||
cmp eax,'1 '
|
cmp eax,'1 '
|
||||||
je fs_yesflpdisk_first
|
je fs_yesflpdisk_first
|
||||||
cmp eax,'FIRS'
|
cmp eax,'FIRS'
|
||||||
je fs_yesflpdisk_first
|
je fs_yesflpdisk_first
|
||||||
@ -342,7 +342,7 @@ endg
|
|||||||
|
|
||||||
fs_noflpdisk:
|
fs_noflpdisk:
|
||||||
;*****************************************************************
|
;*****************************************************************
|
||||||
|
|
||||||
mov eax,[edi+1]
|
mov eax,[edi+1]
|
||||||
cmp eax,'HD0 '
|
cmp eax,'HD0 '
|
||||||
je fs_yesharddisk_IDE0
|
je fs_yesharddisk_IDE0
|
||||||
@ -378,8 +378,8 @@ fs_yesharddisk_IDE3:
|
|||||||
mov [hdpos],4
|
mov [hdpos],4
|
||||||
fs_yesharddisk_partition:
|
fs_yesharddisk_partition:
|
||||||
call reserve_hd_channel
|
call reserve_hd_channel
|
||||||
; call choice_necessity_partition
|
; call choice_necessity_partition
|
||||||
; jmp fs_yesharddisk_all
|
; jmp fs_yesharddisk_all
|
||||||
jmp fs_for_new_semantic
|
jmp fs_for_new_semantic
|
||||||
|
|
||||||
choice_necessity_partition:
|
choice_necessity_partition:
|
||||||
@ -429,7 +429,7 @@ choice_necessity_partition_1:
|
|||||||
je fs_give_dir1
|
je fs_give_dir1
|
||||||
call reserve_hd1
|
call reserve_hd1
|
||||||
fs_for_new_semantic:
|
fs_for_new_semantic:
|
||||||
call choice_necessity_partition
|
call choice_necessity_partition
|
||||||
|
|
||||||
fs_yesharddisk_all:
|
fs_yesharddisk_all:
|
||||||
mov eax,1
|
mov eax,1
|
||||||
@ -792,7 +792,7 @@ StringToNumber:
|
|||||||
mov [partition_string],eax
|
mov [partition_string],eax
|
||||||
mov edi,partition_string
|
mov edi,partition_string
|
||||||
xor cx,cx
|
xor cx,cx
|
||||||
i1:
|
i1:
|
||||||
mov al,[edi]
|
mov al,[edi]
|
||||||
cmp al,32 ;13
|
cmp al,32 ;13
|
||||||
je i_exit
|
je i_exit
|
||||||
|
@ -23,9 +23,9 @@ reserve_cd:
|
|||||||
reserve_ok2:
|
reserve_ok2:
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+TASKDATA.pid]
|
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
mov [cd_status],eax
|
mov [cd_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
@ -59,13 +59,13 @@ free_cd_channel:
|
|||||||
cmp [ChannelNumber],1
|
cmp [ChannelNumber],1
|
||||||
jne .IDE_Channel_2
|
jne .IDE_Channel_2
|
||||||
.IDE_Channel_1:
|
.IDE_Channel_1:
|
||||||
mov [IDE_Channel_1],0
|
mov [IDE_Channel_1],0
|
||||||
ret
|
ret
|
||||||
.IDE_Channel_2:
|
.IDE_Channel_2:
|
||||||
mov [IDE_Channel_2],0
|
mov [IDE_Channel_2],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
uglobal
|
uglobal
|
||||||
cd_status dd 0
|
cd_status dd 0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ fs_CdRead:
|
|||||||
or ebx, -1
|
or ebx, -1
|
||||||
mov eax, ERROR_ACCESS_DENIED
|
mov eax, ERROR_ACCESS_DENIED
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.noaccess_3:
|
.noaccess_3:
|
||||||
pop eax edx ecx edi
|
pop eax edx ecx edi
|
||||||
jmp .noaccess_2
|
jmp .noaccess_2
|
||||||
@ -161,7 +161,7 @@ fs_CdRead:
|
|||||||
mov [CDDataBuf_pointer],CDDataBuf
|
mov [CDDataBuf_pointer],CDDataBuf
|
||||||
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
|
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
|
||||||
cmp [DevErrorCode],0
|
cmp [DevErrorCode],0
|
||||||
jne .noaccess_3
|
jne .noaccess_3
|
||||||
push ecx
|
push ecx
|
||||||
add ecx, ebx
|
add ecx, ebx
|
||||||
cmp ecx, 2048
|
cmp ecx, 2048
|
||||||
@ -180,7 +180,7 @@ fs_CdRead:
|
|||||||
pop ecx
|
pop ecx
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
jmp .next
|
jmp .next
|
||||||
|
|
||||||
.done:
|
.done:
|
||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
pop eax edx ecx edi
|
pop eax edx ecx edi
|
||||||
@ -240,7 +240,7 @@ fs_CdReadFolder:
|
|||||||
pop ecx eax
|
pop ecx eax
|
||||||
mov byte [edx], 1 ; version
|
mov byte [edx], 1 ; version
|
||||||
mov [cd_mem_location], edx
|
mov [cd_mem_location], edx
|
||||||
add [cd_mem_location], 32
|
add [cd_mem_location], 32
|
||||||
; íà÷èíàåì ïåðåáðîñêó ÁÄÂÊ â ÓÑÂÊ
|
; íà÷èíàåì ïåðåáðîñêó ÁÄÂÊ â ÓÑÂÊ
|
||||||
;.mainloop:
|
;.mainloop:
|
||||||
mov [cd_counter_block], dword 0
|
mov [cd_counter_block], dword 0
|
||||||
@ -282,7 +282,7 @@ fs_CdReadFolder:
|
|||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz .get_names_from_buffer_1
|
jz .get_names_from_buffer_1
|
||||||
mov edi,[cd_counter_block]
|
mov edi,[cd_counter_block]
|
||||||
mov [edx+4],edi
|
mov [edx+4],edi
|
||||||
dec ecx
|
dec ecx
|
||||||
mov esi,ebp
|
mov esi,ebp
|
||||||
mov edi,[cd_mem_location]
|
mov edi,[cd_mem_location]
|
||||||
@ -377,7 +377,7 @@ cd_get_parameters_of_file:
|
|||||||
cd_get_parameters_of_file_1:
|
cd_get_parameters_of_file_1:
|
||||||
; ïîëó÷àåì àòðèáóòû ôàéëà
|
; ïîëó÷àåì àòðèáóòû ôàéëà
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
; ôàéë íå àðõèâèðîâàëñÿ
|
; ôàéë íå àðõèâèðîâàëñ
|
||||||
inc al
|
inc al
|
||||||
shl eax,1
|
shl eax,1
|
||||||
; ýòî êàòàëîã?
|
; ýòî êàòàëîã?
|
||||||
@ -449,7 +449,7 @@ cd_get_parameters_of_file_1:
|
|||||||
;
|
;
|
||||||
; fs_CdGetFileInfo - LFN variant for CD
|
; fs_CdGetFileInfo - LFN variant for CD
|
||||||
; get file/directory attributes structure
|
; get file/directory attributes structure
|
||||||
;
|
;
|
||||||
;----------------------------------------------------------------
|
;----------------------------------------------------------------
|
||||||
fs_CdGetFileInfo:
|
fs_CdGetFileInfo:
|
||||||
cmp byte [esi], 0
|
cmp byte [esi], 0
|
||||||
@ -554,7 +554,7 @@ fs_CdExecute:
|
|||||||
cmp [eax+8],dword 0
|
cmp [eax+8],dword 0
|
||||||
jne @f
|
jne @f
|
||||||
mov ecx,[eax+4]
|
mov ecx,[eax+4]
|
||||||
inc dword [eax+4]
|
inc dword [eax+4]
|
||||||
mov [CDSectorAddress],ecx
|
mov [CDSectorAddress],ecx
|
||||||
mov [CDDataBuf_pointer],CDDataBuf ;edi
|
mov [CDDataBuf_pointer],CDDataBuf ;edi
|
||||||
call ReadCDWRetr
|
call ReadCDWRetr
|
||||||
@ -564,7 +564,7 @@ fs_CdExecute:
|
|||||||
push esi edi ecx
|
push esi edi ecx
|
||||||
mov esi,512
|
mov esi,512
|
||||||
imul esi,[eax+8]
|
imul esi,[eax+8]
|
||||||
add esi,CDDataBuf
|
add esi,CDDataBuf
|
||||||
mov ecx,512/4
|
mov ecx,512/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -599,7 +599,7 @@ fs_CdExecute:
|
|||||||
.err:
|
.err:
|
||||||
popad
|
popad
|
||||||
mov eax, 11
|
mov eax, 11
|
||||||
ret
|
ret
|
||||||
|
|
||||||
cd_find_lfn:
|
cd_find_lfn:
|
||||||
; in: esi->name
|
; in: esi->name
|
||||||
@ -621,10 +621,10 @@ cd_find_lfn:
|
|||||||
jne .access_denied
|
jne .access_denied
|
||||||
; ñåêòîð ÿâëÿåòñÿ òåðìèíàòîðîì íàáîð äåñêðèïòîðîâ òîìîâ?
|
; ñåêòîð ÿâëÿåòñÿ òåðìèíàòîðîì íàáîð äåñêðèïòîðîâ òîìîâ?
|
||||||
cmp [CDDataBuf],byte 0xff
|
cmp [CDDataBuf],byte 0xff
|
||||||
je .access_denied
|
je .access_denied
|
||||||
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì è óëó÷øåííûì äåñêðèïòîðîì òîìà?
|
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì è óëó÷øåííûì äåñêðèïòîðîì òîìà?
|
||||||
cmp [CDDataBuf],byte 0x2
|
cmp [CDDataBuf],byte 0x2
|
||||||
jne .start
|
jne .start
|
||||||
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì äåñêðèïòîðîì òîìà?
|
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì äåñêðèïòîðîì òîìà?
|
||||||
cmp [CDDataBuf+6],byte 0x1
|
cmp [CDDataBuf+6],byte 0x1
|
||||||
jne .start
|
jne .start
|
||||||
@ -672,7 +672,7 @@ cd_find_lfn:
|
|||||||
pop esi eax
|
pop esi eax
|
||||||
clc
|
clc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
cd_find_name_in_buffer:
|
cd_find_name_in_buffer:
|
||||||
mov [cd_current_pointer_of_input_2],CDDataBuf
|
mov [cd_current_pointer_of_input_2],CDDataBuf
|
||||||
.start:
|
.start:
|
||||||
@ -680,9 +680,9 @@ cd_find_name_in_buffer:
|
|||||||
jc .not_found
|
jc .not_found
|
||||||
call cd_compare_name
|
call cd_compare_name
|
||||||
jc .start
|
jc .start
|
||||||
.found:
|
.found:
|
||||||
clc
|
clc
|
||||||
ret
|
ret
|
||||||
.not_found:
|
.not_found:
|
||||||
stc
|
stc
|
||||||
ret
|
ret
|
||||||
@ -713,7 +713,7 @@ cd_compare_name:
|
|||||||
; out: if names match: ZF=1 and esi->next component of name
|
; out: if names match: ZF=1 and esi->next component of name
|
||||||
; else: ZF=0, esi is not changed
|
; else: ZF=0, esi is not changed
|
||||||
; destroys eax
|
; destroys eax
|
||||||
push esi eax edi
|
push esi eax edi
|
||||||
mov edi,ebp
|
mov edi,ebp
|
||||||
.loop:
|
.loop:
|
||||||
cld
|
cld
|
||||||
@ -729,7 +729,7 @@ cd_compare_name:
|
|||||||
call char_toupper
|
call char_toupper
|
||||||
call ansi2uni_char
|
call ansi2uni_char
|
||||||
xchg ah,al
|
xchg ah,al
|
||||||
cld
|
cld
|
||||||
sub edi,2
|
sub edi,2
|
||||||
scasw
|
scasw
|
||||||
jne .name_not_coincide
|
jne .name_not_coincide
|
||||||
@ -752,7 +752,7 @@ cd_compare_name:
|
|||||||
add eax,ebp
|
add eax,ebp
|
||||||
sub eax,34
|
sub eax,34
|
||||||
cmp edi,eax
|
cmp edi,eax
|
||||||
je .done_1
|
je .done_1
|
||||||
; ïðîâåðêà êîíöà ïàïêè
|
; ïðîâåðêà êîíöà ïàïêè
|
||||||
movzx eax,byte [ebp-1]
|
movzx eax,byte [ebp-1]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
@ -764,7 +764,7 @@ cd_compare_name:
|
|||||||
inc esi
|
inc esi
|
||||||
clc
|
clc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
char_todown:
|
char_todown:
|
||||||
; convert character to uppercase, using cp866 encoding
|
; convert character to uppercase, using cp866 encoding
|
||||||
; in: al=symbol
|
; in: al=symbol
|
||||||
@ -788,7 +788,7 @@ char_todown:
|
|||||||
.az:
|
.az:
|
||||||
add al, 0x20
|
add al, 0x20
|
||||||
ret
|
ret
|
||||||
|
|
||||||
uni2ansi_char:
|
uni2ansi_char:
|
||||||
; convert UNICODE character in al to ANSI character in ax, using cp866 encoding
|
; convert UNICODE character in al to ANSI character in ax, using cp866 encoding
|
||||||
; in: ax=UNICODE character
|
; in: ax=UNICODE character
|
||||||
|
@ -18,39 +18,39 @@ dececx:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop edx
|
pop edx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
incecx:
|
incecx:
|
||||||
push edx
|
push edx
|
||||||
push ecx
|
push ecx
|
||||||
|
|
||||||
mov edx,2
|
mov edx,2
|
||||||
.loop:
|
.loop:
|
||||||
|
|
||||||
cmp byte [esp+edx],0xdf
|
cmp byte [esp+edx],0xdf
|
||||||
jbe @f
|
jbe @f
|
||||||
mov [esp+edx],byte 0xdf
|
mov [esp+edx],byte 0xdf
|
||||||
@@:
|
@@:
|
||||||
add [esp+edx],byte 0x20
|
add [esp+edx],byte 0x20
|
||||||
|
|
||||||
dec edx
|
dec edx
|
||||||
jns .loop
|
jns .loop
|
||||||
pop ecx
|
pop ecx
|
||||||
pop edx
|
pop edx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
incecx2:
|
incecx2:
|
||||||
push edx
|
push edx
|
||||||
push ecx
|
push ecx
|
||||||
|
|
||||||
mov edx,2
|
mov edx,2
|
||||||
.loop:
|
.loop:
|
||||||
|
|
||||||
cmp byte [esp+edx],0xeb
|
cmp byte [esp+edx],0xeb
|
||||||
jbe @f
|
jbe @f
|
||||||
mov [esp+edx],byte 0xeb
|
mov [esp+edx],byte 0xeb
|
||||||
@@:
|
@@:
|
||||||
add [esp+edx],byte 0x14
|
add [esp+edx],byte 0x14
|
||||||
|
|
||||||
dec edx
|
dec edx
|
||||||
jns .loop
|
jns .loop
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -68,7 +68,7 @@ drawbuttonframes:
|
|||||||
|
|
||||||
shr eax,16
|
shr eax,16
|
||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov edx,[0x3010]
|
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]
|
||||||
@ -164,7 +164,7 @@ button_dececx:
|
|||||||
sys_button:
|
sys_button:
|
||||||
|
|
||||||
push edi
|
push edi
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
rol eax,16
|
rol eax,16
|
||||||
add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
@ -197,9 +197,9 @@ sys_button:
|
|||||||
push ebx
|
push ebx
|
||||||
shr eax,16
|
shr eax,16
|
||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov edx,[0x3010]
|
mov edx,[TASK_BASE]
|
||||||
mov esi,[edx-twdw + WDATA.box.left]
|
mov esi,[edx-twdw + WDATA.box.left]
|
||||||
mov edi,[edx-twdw + WDATA.box.top]
|
mov edi,[edx-twdw + WDATA.box.top]
|
||||||
add eax,esi
|
add eax,esi
|
||||||
add ebx,edi
|
add ebx,edi
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
@ -247,7 +247,7 @@ sys_button:
|
|||||||
shl eax,4
|
shl eax,4
|
||||||
add eax,edi
|
add eax,edi
|
||||||
|
|
||||||
mov bx,[0x3000]
|
mov bx,[CURRENT_TASK]
|
||||||
mov [eax],bx
|
mov [eax],bx
|
||||||
|
|
||||||
add eax,2 ; save button id number
|
add eax,2 ; save button id number
|
||||||
@ -298,7 +298,7 @@ remove_button:
|
|||||||
|
|
||||||
add eax,0x10
|
add eax,0x10
|
||||||
|
|
||||||
mov dx,[0x3000]
|
mov dx,[CURRENT_TASK]
|
||||||
cmp dx,[eax]
|
cmp dx,[eax]
|
||||||
jnz rnewba
|
jnz rnewba
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ checkbuttons:
|
|||||||
|
|
||||||
movzx ebx,word [eax]
|
movzx ebx,word [eax]
|
||||||
movzx ecx,word [0xC000 + ebx * 2]
|
movzx ecx,word [0xC000 + ebx * 2]
|
||||||
cmp ecx,[0x3004]
|
cmp ecx,[TASK_COUNT]
|
||||||
jne buttonnewcheck
|
jne buttonnewcheck
|
||||||
|
|
||||||
; check that button start is inside window x/y end
|
; check that button start is inside window x/y end
|
||||||
|
@ -101,7 +101,7 @@ create_event:
|
|||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 5
|
shl ebx, 5
|
||||||
mov ebx, [0x3000+ebx+4]
|
mov ebx, [CURRENT_TASK+ebx+4]
|
||||||
mov [eax+APPOBJ.pid], ebx
|
mov [eax+APPOBJ.pid], ebx
|
||||||
mov edx, [.flags]
|
mov edx, [.flags]
|
||||||
mov [eax+EVENT.state], edx
|
mov [eax+EVENT.state], edx
|
||||||
@ -274,7 +274,7 @@ proc get_event_ex stdcall, p_ev:dword, timeout:dword
|
|||||||
call destroy_event.force
|
call destroy_event.force
|
||||||
ret
|
ret
|
||||||
.switch:
|
.switch:
|
||||||
mov eax, [0x3010]
|
mov eax, [TASK_BASE]
|
||||||
mov [eax+TASKDATA.state], byte 5
|
mov [eax+TASKDATA.state], byte 5
|
||||||
call change_task
|
call change_task
|
||||||
jmp .wait
|
jmp .wait
|
||||||
@ -339,7 +339,7 @@ wait_event:
|
|||||||
ret
|
ret
|
||||||
.switch:
|
.switch:
|
||||||
or [eax+EVENT.state], EVENT_WATCHED
|
or [eax+EVENT.state], EVENT_WATCHED
|
||||||
mov eax, [0x3010]
|
mov eax, [TASK_BASE]
|
||||||
mov [eax+TASKDATA.state], byte 5
|
mov [eax+TASKDATA.state], byte 5
|
||||||
call change_task
|
call change_task
|
||||||
mov eax, [.event]
|
mov eax, [.event]
|
||||||
@ -497,7 +497,7 @@ sys_waitforevent:
|
|||||||
jne eventoccur
|
jne eventoccur
|
||||||
newwait:
|
newwait:
|
||||||
|
|
||||||
mov eax, [0x3010]
|
mov eax, [TASK_BASE]
|
||||||
mov [eax+TASKDATA.state], byte 5
|
mov [eax+TASKDATA.state], byte 5
|
||||||
call change_task
|
call change_task
|
||||||
|
|
||||||
@ -511,10 +511,10 @@ get_event_for_app:
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edi,[0x3010] ; WINDOW REDRAW
|
mov edi,[TASK_BASE] ; WINDOW REDRAW
|
||||||
test [edi+TASKDATA.event_mask],dword 1
|
test [edi+TASKDATA.event_mask],dword 1
|
||||||
jz no_eventoccur1
|
jz no_eventoccur1
|
||||||
;mov edi,[0x3010]
|
;mov edi,[TASK_BASE]
|
||||||
cmp [edi-twdw+WDATA.fl_redraw],byte 0
|
cmp [edi-twdw+WDATA.fl_redraw],byte 0
|
||||||
je no_eventoccur1
|
je no_eventoccur1
|
||||||
popad
|
popad
|
||||||
@ -522,12 +522,12 @@ get_event_for_app:
|
|||||||
ret
|
ret
|
||||||
no_eventoccur1:
|
no_eventoccur1:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; KEY IN BUFFER
|
;mov edi,[TASK_BASE] ; KEY IN BUFFER
|
||||||
test [edi+TASKDATA.event_mask],dword 2
|
test [edi+TASKDATA.event_mask],dword 2
|
||||||
jz no_eventoccur2
|
jz no_eventoccur2
|
||||||
mov ecx, [0x3000]
|
mov ecx, [CURRENT_TASK]
|
||||||
movzx edx,word [0xC000+ecx*2]
|
movzx edx,word [0xC000+ecx*2]
|
||||||
mov eax, [0x3004]
|
mov eax, [TASK_COUNT]
|
||||||
cmp eax,edx
|
cmp eax,edx
|
||||||
jne no_eventoccur2x
|
jne no_eventoccur2x
|
||||||
cmp [0xf400],byte 0
|
cmp [0xf400],byte 0
|
||||||
@ -546,14 +546,14 @@ get_event_for_app:
|
|||||||
jb @b
|
jb @b
|
||||||
no_eventoccur2:
|
no_eventoccur2:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; BUTTON IN BUFFER
|
;mov edi,[TASK_BASE] ; BUTTON IN BUFFER
|
||||||
test [edi+TASKDATA.event_mask],dword 4
|
test [edi+TASKDATA.event_mask],dword 4
|
||||||
jz no_eventoccur3
|
jz no_eventoccur3
|
||||||
cmp [0xf500],byte 0
|
cmp [0xf500],byte 0
|
||||||
je no_eventoccur3
|
je no_eventoccur3
|
||||||
mov ecx, [0x3000]
|
mov ecx, [CURRENT_TASK]
|
||||||
movzx edx, word [0xC000+ecx*2]
|
movzx edx, word [0xC000+ecx*2]
|
||||||
mov eax, [0x3004]
|
mov eax, [TASK_COUNT]
|
||||||
cmp eax,edx
|
cmp eax,edx
|
||||||
jnz no_eventoccur3
|
jnz no_eventoccur3
|
||||||
popad
|
popad
|
||||||
@ -572,10 +572,10 @@ get_event_for_app:
|
|||||||
no_eventoccur3:
|
no_eventoccur3:
|
||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; 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,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
|
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
|
||||||
jz no_mouse_event
|
jz no_mouse_event
|
||||||
@ -586,7 +586,7 @@ get_event_for_app:
|
|||||||
no_mouse_event:
|
no_mouse_event:
|
||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; DESKTOP BACKGROUND REDRAW
|
;mov edi,[TASK_BASE] ; DESKTOP BACKGROUND REDRAW
|
||||||
test [edi+TASKDATA.event_mask],dword 16
|
test [edi+TASKDATA.event_mask],dword 16
|
||||||
jz no_eventoccur5
|
jz no_eventoccur5
|
||||||
cmp [0xfff0],byte 2
|
cmp [0xfff0],byte 2
|
||||||
@ -596,10 +596,10 @@ get_event_for_app:
|
|||||||
ret
|
ret
|
||||||
no_eventoccur5:
|
no_eventoccur5:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; 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,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
|
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
|
||||||
jz no_ipc
|
jz no_ipc
|
||||||
@ -610,10 +610,10 @@ get_event_for_app:
|
|||||||
no_ipc:
|
no_ipc:
|
||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; 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,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
|
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
|
||||||
jz no_stack_event
|
jz no_stack_event
|
||||||
@ -625,7 +625,7 @@ get_event_for_app:
|
|||||||
|
|
||||||
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, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
|
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
|
||||||
jz .test_IRQ
|
jz .test_IRQ
|
||||||
@ -635,7 +635,7 @@ get_event_for_app:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
;.test_ext:
|
;.test_ext:
|
||||||
; mov eax, [0x3000]
|
; mov eax, [CURRENT_TASK]
|
||||||
; shl eax, 8
|
; shl eax, 8
|
||||||
; test dword [eax+0x80000+APPDATA.event_mask], EVENT_EXTENDED
|
; test dword [eax+0x80000+APPDATA.event_mask], EVENT_EXTENDED
|
||||||
; jz .test_IRQ
|
; jz .test_IRQ
|
||||||
@ -651,14 +651,14 @@ get_event_for_app:
|
|||||||
mov ebx,0x00010000
|
mov ebx,0x00010000
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
irq_event_test:
|
irq_event_test:
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
test [edi+TASKDATA.event_mask],ebx
|
test [edi+TASKDATA.event_mask],ebx
|
||||||
jz no_irq_event
|
jz no_irq_event
|
||||||
mov edi,ecx
|
mov edi,ecx
|
||||||
shl edi,2
|
shl edi,2
|
||||||
add edi,irq_owner
|
add edi,irq_owner
|
||||||
mov edx,[edi]
|
mov edx,[edi]
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
mov eax,[eax+TASKDATA.pid]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
cmp edx,eax
|
cmp edx,eax
|
||||||
jne no_irq_event
|
jne no_irq_event
|
||||||
|
@ -365,7 +365,7 @@ drawwindow_IV:
|
|||||||
shl eax,4
|
shl eax,4
|
||||||
add eax,edi
|
add eax,edi
|
||||||
|
|
||||||
mov bx,[0x3000]
|
mov bx,[CURRENT_TASK]
|
||||||
mov [eax],bx
|
mov [eax],bx
|
||||||
|
|
||||||
add eax,2 ; save button id number
|
add eax,2 ; save button id number
|
||||||
@ -404,7 +404,7 @@ drawwindow_IV:
|
|||||||
shl eax,4
|
shl eax,4
|
||||||
add eax,edi
|
add eax,edi
|
||||||
|
|
||||||
mov bx,[0x3000]
|
mov bx,[CURRENT_TASK]
|
||||||
mov [eax],bx
|
mov [eax],bx
|
||||||
|
|
||||||
add eax,2 ; save button id number
|
add eax,2 ; save button id number
|
||||||
|
@ -60,7 +60,7 @@ calculatescreen:
|
|||||||
mov esi, 1
|
mov esi, 1
|
||||||
call setscreen
|
call setscreen
|
||||||
|
|
||||||
mov ebp, [0x3004] ; number of processes
|
mov ebp, [TASK_COUNT] ; number of processes
|
||||||
cmp ebp, 1
|
cmp ebp, 1
|
||||||
jbe .finish
|
jbe .finish
|
||||||
align 4
|
align 4
|
||||||
@ -68,7 +68,7 @@ calculatescreen:
|
|||||||
movzx edi, word [0xC400 + esi * 2]
|
movzx edi, word [0xC400 + esi * 2]
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
|
|
||||||
cmp [0x3000+edi+TASKDATA.state], byte 9
|
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
|
||||||
je .not_wnd
|
je .not_wnd
|
||||||
|
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
@ -213,7 +213,7 @@ pushad
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
.free_form:
|
.free_form:
|
||||||
|
|
||||||
; for (y=0; y <= x_size; y++)
|
; for (y=0; y <= x_size; y++)
|
||||||
@ -375,7 +375,7 @@ display_settings:
|
|||||||
cmp eax,2 ; set common window colours
|
cmp eax,2 ; set common window colours
|
||||||
jne no_com_colours
|
jne no_com_colours
|
||||||
mov [windowtypechanged],dword 1
|
mov [windowtypechanged],dword 1
|
||||||
mov esi,[0x3010]
|
mov esi,[TASK_BASE]
|
||||||
add esi,TASKDATA.mem_start
|
add esi,TASKDATA.mem_start
|
||||||
add ebx,[esi]
|
add ebx,[esi]
|
||||||
mov esi,ebx
|
mov esi,ebx
|
||||||
@ -389,7 +389,7 @@ display_settings:
|
|||||||
|
|
||||||
cmp eax,3 ; get common window colours
|
cmp eax,3 ; get common window colours
|
||||||
jne no_get_com
|
jne no_get_com
|
||||||
mov esi,[0x3010]
|
mov esi,[TASK_BASE]
|
||||||
add esi,TASKDATA.mem_start
|
add esi,TASKDATA.mem_start
|
||||||
add ebx,[esi]
|
add ebx,[esi]
|
||||||
mov edi,ebx
|
mov edi,ebx
|
||||||
@ -468,7 +468,7 @@ display_settings:
|
|||||||
cmp eax,8 ; set window skin
|
cmp eax,8 ; set window skin
|
||||||
jne no_set_skin
|
jne no_set_skin
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ebx,[edi+TASKDATA.mem_start] ; abs start of info block
|
add ebx,[edi+TASKDATA.mem_start] ; abs start of info block
|
||||||
pushd [ebx+0] [ebx+4] [ebx+8] [ebx+12]
|
pushd [ebx+0] [ebx+4] [ebx+8] [ebx+12]
|
||||||
mov dword[ebx+0],0 ; read
|
mov dword[ebx+0],0 ; read
|
||||||
@ -515,7 +515,7 @@ display_settings:
|
|||||||
|
|
||||||
|
|
||||||
repos_windows:
|
repos_windows:
|
||||||
mov ecx,[0x3004]
|
mov ecx,[TASK_COUNT]
|
||||||
mov edi,0x20*2
|
mov edi,0x20*2
|
||||||
mov byte[0x0000fff0],1
|
mov byte[0x0000fff0],1
|
||||||
dec ecx
|
dec ecx
|
||||||
@ -911,7 +911,7 @@ windowactivate:
|
|||||||
|
|
||||||
; if type of current active window is 3,
|
; if type of current active window is 3,
|
||||||
; it must be redrawn
|
; it must be redrawn
|
||||||
mov eax, [0x3004]
|
mov eax, [TASK_COUNT]
|
||||||
movzx eax, word [0xC400 + eax*2]
|
movzx eax, word [0xC400 + eax*2]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax, window_data
|
add eax, window_data
|
||||||
@ -928,7 +928,7 @@ windowactivate:
|
|||||||
|
|
||||||
xor esi, esi ; drop others
|
xor esi, esi ; drop others
|
||||||
waloop:
|
waloop:
|
||||||
cmp esi, dword [0x3004]
|
cmp esi, dword [TASK_COUNT]
|
||||||
jae wacont
|
jae wacont
|
||||||
inc esi
|
inc esi
|
||||||
lea edi, [0xC000 + esi*2]
|
lea edi, [0xC000 + esi*2]
|
||||||
@ -944,13 +944,13 @@ windowactivate:
|
|||||||
pop esi ; esi = pointer at 0xC400
|
pop esi ; esi = pointer at 0xC400
|
||||||
|
|
||||||
movzx eax, word [esi]
|
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)
|
mov [0xC000+eax*2], bx ; this is the last (and the upper)
|
||||||
|
|
||||||
; update on screen -window stack
|
; update on screen -window stack
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
waloop2:
|
waloop2:
|
||||||
mov edi, [0x3004]
|
mov edi, [TASK_COUNT]
|
||||||
cmp esi, edi
|
cmp esi, edi
|
||||||
jae wacont2
|
jae wacont2
|
||||||
inc esi
|
inc esi
|
||||||
@ -992,7 +992,7 @@ checkwindowdraw:
|
|||||||
add esi, 2
|
add esi, 2
|
||||||
push esi
|
push esi
|
||||||
|
|
||||||
mov eax, [0x3004]
|
mov eax, [TASK_COUNT]
|
||||||
lea eax, word [0xC400 + eax * 2] ; number of the upper window
|
lea eax, word [0xC400 + eax * 2] ; number of the upper window
|
||||||
|
|
||||||
cmp esi, eax
|
cmp esi, eax
|
||||||
@ -1000,7 +1000,7 @@ checkwindowdraw:
|
|||||||
|
|
||||||
movzx eax, word [esi]
|
movzx eax, word [esi]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
cmp [0x3000 + eax + TASKDATA.state], byte 9
|
cmp [CURRENT_TASK + eax + TASKDATA.state], byte 9
|
||||||
je .new_check ; skip dead windows
|
je .new_check ; skip dead windows
|
||||||
|
|
||||||
lea esi, [eax+window_data]
|
lea esi, [eax+window_data]
|
||||||
@ -1010,7 +1010,7 @@ checkwindowdraw:
|
|||||||
add edx, ebx ; y0e
|
add edx, ebx ; y0e
|
||||||
|
|
||||||
mov ecx, [esi+WDATA.box.top] ; y ; y check
|
mov ecx, [esi+WDATA.box.top] ; y ; y check
|
||||||
cmp ecx, edx
|
cmp ecx, edx
|
||||||
jae .new_check ; y < y0e
|
jae .new_check ; y < y0e
|
||||||
mov eax, [esi+WDATA.box.height]
|
mov eax, [esi+WDATA.box.height]
|
||||||
add ecx, eax ; ye
|
add ecx, eax ; ye
|
||||||
@ -1058,7 +1058,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
|
|
||||||
; update screen info
|
; update screen info
|
||||||
pushad
|
pushad
|
||||||
mov edi, [0x3004] ; the last process (number)
|
mov edi, [TASK_COUNT] ; the last process (number)
|
||||||
movzx esi, word [0xC400 + edi * 2]
|
movzx esi, word [0xC400 + edi * 2]
|
||||||
shl esi, 5
|
shl esi, 5
|
||||||
add esi, window_data
|
add esi, window_data
|
||||||
@ -1072,7 +1072,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
add ecx, eax ; ecx = x_end
|
add ecx, eax ; ecx = x_end
|
||||||
add edx, ebx ; edx = y_end
|
add edx, ebx ; edx = y_end
|
||||||
|
|
||||||
mov edi, [0x3004]
|
mov edi, [TASK_COUNT]
|
||||||
movzx esi, word [0xC400 + edi * 2]
|
movzx esi, word [0xC400 + edi * 2]
|
||||||
call setscreen
|
call setscreen
|
||||||
popad
|
popad
|
||||||
@ -1137,7 +1137,7 @@ restore_minimized_window:
|
|||||||
jz .skip_redrawings
|
jz .skip_redrawings
|
||||||
mov [edi+WDATA.fl_redraw], 1
|
mov [edi+WDATA.fl_redraw], 1
|
||||||
and [edi+WDATA.fl_wstate], not WSTATE_MINIMIZED
|
and [edi+WDATA.fl_wstate], not WSTATE_MINIMIZED
|
||||||
cmp eax, [0x3004] ; the uppermost window
|
cmp eax, [TASK_COUNT] ; the uppermost window
|
||||||
jnz .no_uppermost
|
jnz .no_uppermost
|
||||||
mov eax, [edi+WDATA.box.left]
|
mov eax, [edi+WDATA.box.left]
|
||||||
mov ebx, [edi+WDATA.box.top]
|
mov ebx, [edi+WDATA.box.top]
|
||||||
@ -1174,7 +1174,7 @@ checkwindows:
|
|||||||
|
|
||||||
cmp [window_minimize], 0
|
cmp [window_minimize], 0
|
||||||
je .no_minimizing
|
je .no_minimizing
|
||||||
mov eax, [0x3004] ; the uppermost window
|
mov eax, [TASK_COUNT] ; the uppermost window
|
||||||
mov bl, 0
|
mov bl, 0
|
||||||
xchg [window_minimize], bl
|
xchg [window_minimize], bl
|
||||||
cmp bl, 1
|
cmp bl, 1
|
||||||
@ -1192,7 +1192,7 @@ checkwindows:
|
|||||||
ret
|
ret
|
||||||
.mouse_buttons_pressed:
|
.mouse_buttons_pressed:
|
||||||
|
|
||||||
mov esi,[0x3004]
|
mov esi,[TASK_COUNT]
|
||||||
inc esi
|
inc esi
|
||||||
|
|
||||||
cwloop:
|
cwloop:
|
||||||
@ -1214,7 +1214,7 @@ checkwindows:
|
|||||||
|
|
||||||
movzx eax, word [0xfb0a]
|
movzx eax, word [0xfb0a]
|
||||||
movzx ebx, word [0xfb0c]
|
movzx ebx, word [0xfb0c]
|
||||||
|
|
||||||
cmp ecx, eax
|
cmp ecx, eax
|
||||||
jae cwloop
|
jae cwloop
|
||||||
cmp edx, ebx
|
cmp edx, ebx
|
||||||
@ -1228,7 +1228,7 @@ checkwindows:
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
mov eax, esi
|
mov eax, esi
|
||||||
mov ebx, [0x3004]
|
mov ebx, [TASK_COUNT]
|
||||||
cmp eax, ebx ; is this window active?
|
cmp eax, ebx ; is this window active?
|
||||||
jz .move_resize_window
|
jz .move_resize_window
|
||||||
|
|
||||||
@ -1453,7 +1453,7 @@ checkwindows:
|
|||||||
|
|
||||||
cwb:
|
cwb:
|
||||||
cmp [0xfb40],byte 0
|
cmp [0xfb40],byte 0
|
||||||
jne newchm
|
jne newchm
|
||||||
; new position done
|
; new position done
|
||||||
mov [0xfff5],byte 1
|
mov [0xfff5],byte 1
|
||||||
mov cl,0
|
mov cl,0
|
||||||
@ -1751,7 +1751,7 @@ random_shaped_window:
|
|||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jne rsw_no_address
|
jne rsw_no_address
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
|
|
||||||
mov [eax+0x80000+APPDATA.wnd_shape],ebx
|
mov [eax+0x80000+APPDATA.wnd_shape],ebx
|
||||||
@ -1759,7 +1759,7 @@ random_shaped_window:
|
|||||||
|
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jne rsw_no_scale
|
jne rsw_no_scale
|
||||||
mov eax,[0x3000]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
|
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
|
||||||
rsw_no_scale:
|
rsw_no_scale:
|
||||||
|
@ -91,7 +91,7 @@ irq1:
|
|||||||
; mov ds, ax
|
; mov ds, ax
|
||||||
; mov es, 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]
|
movzx eax,word[0xC400+eax*2]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov al,[0x80000+eax+APPDATA.keyboard_mode]
|
mov al,[0x80000+eax+APPDATA.keyboard_mode]
|
||||||
|
@ -265,9 +265,9 @@ __sys_disable_mouse:
|
|||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
pushad
|
pushad
|
||||||
cmp [0x3000],dword 1
|
cmp [CURRENT_TASK],dword 1
|
||||||
je disable_m
|
je disable_m
|
||||||
mov edx,[0x3000]
|
mov edx,[CURRENT_TASK]
|
||||||
shl edx,5
|
shl edx,5
|
||||||
add edx,window_data
|
add edx,window_data
|
||||||
movzx eax, word [0xfb0a]
|
movzx eax, word [0xfb0a]
|
||||||
@ -277,7 +277,7 @@ __sys_disable_mouse:
|
|||||||
imul ecx,ebx
|
imul ecx,ebx
|
||||||
add ecx,eax
|
add ecx,eax
|
||||||
add ecx, display_data
|
add ecx, display_data
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
movzx ebx, byte [ecx]
|
movzx ebx, byte [ecx]
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
je yes_mouse_disable
|
je yes_mouse_disable
|
||||||
@ -296,7 +296,7 @@ __sys_disable_mouse:
|
|||||||
je yes_mouse_disable
|
je yes_mouse_disable
|
||||||
jmp no_mouse_disable
|
jmp no_mouse_disable
|
||||||
yes_mouse_disable:
|
yes_mouse_disable:
|
||||||
mov edx,[0x3000]
|
mov edx,[CURRENT_TASK]
|
||||||
shl edx,5
|
shl edx,5
|
||||||
add edx,window_data
|
add edx,window_data
|
||||||
movzx eax, word [0xfb0a]
|
movzx eax, word [0xfb0a]
|
||||||
|
@ -504,9 +504,9 @@ include 'vmodeld.inc'
|
|||||||
|
|
||||||
; LOAD FONTS I and II
|
; LOAD FONTS I and II
|
||||||
|
|
||||||
mov [0x3000],dword 1
|
mov [CURRENT_TASK],dword 1
|
||||||
mov [0x3004],dword 1
|
mov [TASK_COUNT],dword 1
|
||||||
mov [0x3010],dword 0x3020
|
mov [TASK_BASE],dword TASK_DATA
|
||||||
|
|
||||||
mov esi,char
|
mov esi,char
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
@ -636,9 +636,9 @@ include 'vmodeld.inc'
|
|||||||
mov dword [0x80000+256+APPDATA.bk_obj], ebx
|
mov dword [0x80000+256+APPDATA.bk_obj], ebx
|
||||||
|
|
||||||
; task list
|
; task list
|
||||||
mov [0x3020+TASKDATA.wnd_number], 1 ; on screen number
|
mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
|
||||||
mov [0x3020+TASKDATA.pid], 1 ; process id number
|
mov [TASK_DATA+TASKDATA.pid], 1 ; process id number
|
||||||
mov [0x3020+TASKDATA.mem_start], 0 ; process base address
|
mov [TASK_DATA+TASKDATA.mem_start], 0 ; process base address
|
||||||
|
|
||||||
mov edi,tss_data+tss_step
|
mov edi,tss_data+tss_step
|
||||||
mov ecx, (tss_step)/4
|
mov ecx, (tss_step)/4
|
||||||
@ -719,8 +719,8 @@ include 'vmodeld.inc'
|
|||||||
call load_skin
|
call load_skin
|
||||||
|
|
||||||
; LOAD FIRST APPLICATION
|
; LOAD FIRST APPLICATION
|
||||||
mov [0x3000],dword 1
|
mov [CURRENT_TASK],dword 1
|
||||||
mov [0x3004],dword 1
|
mov [TASK_COUNT],dword 1
|
||||||
cli
|
cli
|
||||||
cmp byte [0x2f0000+0x9030],1
|
cmp byte [0x2f0000+0x9030],1
|
||||||
jne no_load_vrr_m
|
jne no_load_vrr_m
|
||||||
@ -744,8 +744,8 @@ no_load_vrr_m:
|
|||||||
first_app_found:
|
first_app_found:
|
||||||
cli
|
cli
|
||||||
|
|
||||||
;mov [0x3004],dword 2
|
;mov [TASK_COUNT],dword 2
|
||||||
mov [0x3000],dword 1 ; set OS task fisrt
|
mov [CURRENT_TASK],dword 1 ; set OS task fisrt
|
||||||
|
|
||||||
|
|
||||||
; SET KEYBOARD PARAMETERS
|
; SET KEYBOARD PARAMETERS
|
||||||
@ -1061,7 +1061,7 @@ sys_outport:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
sopl8:
|
sopl8:
|
||||||
mov edx,[0x3010]
|
mov edx,[TASK_BASE]
|
||||||
mov edx,[edx+0x4]
|
mov edx,[edx+0x4]
|
||||||
and ebx,65535
|
and ebx,65535
|
||||||
cld
|
cld
|
||||||
@ -1326,7 +1326,7 @@ draw_num_text:
|
|||||||
; edx length
|
; edx length
|
||||||
; edi 1 force
|
; edi 1 force
|
||||||
|
|
||||||
; mov edi,[0x3000]
|
; mov edi,[CURRENT_TASK]
|
||||||
; shl edi,8
|
; shl edi,8
|
||||||
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
; rol eax,16
|
; rol eax,16
|
||||||
@ -1339,12 +1339,12 @@ draw_num_text:
|
|||||||
add ecx,esp
|
add ecx,esp
|
||||||
mov eax,[esp+64+32-8+4]
|
mov eax,[esp+64+32-8+4]
|
||||||
push edx ; add window start x & y
|
push edx ; add window start x & y
|
||||||
mov edx,[0x3010]
|
mov edx,[TASK_BASE]
|
||||||
mov ebx,[edx-twdw+WDATA.box.left]
|
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
|
shl ebx,16
|
||||||
add ebx,[edx-twdw+WDATA.box.top]
|
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
|
add eax,ebx
|
||||||
pop edx
|
pop edx
|
||||||
mov ebx,[esp+64+32-12+4]
|
mov ebx,[esp+64+32-12+4]
|
||||||
@ -1405,7 +1405,7 @@ endg
|
|||||||
jnz nsyse2
|
jnz nsyse2
|
||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
jnz kbnobase
|
jnz kbnobase
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap
|
mov ebx,keymap
|
||||||
@ -1415,7 +1415,7 @@ endg
|
|||||||
kbnobase:
|
kbnobase:
|
||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jnz kbnoshift
|
jnz kbnoshift
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap_shift
|
mov ebx,keymap_shift
|
||||||
@ -1425,7 +1425,7 @@ endg
|
|||||||
kbnoshift:
|
kbnoshift:
|
||||||
cmp ebx,3
|
cmp ebx,3
|
||||||
jne kbnoalt
|
jne kbnoalt
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap_alt
|
mov ebx,keymap_alt
|
||||||
@ -1608,7 +1608,7 @@ sys_getsetup:
|
|||||||
jne ngsyse2
|
jne ngsyse2
|
||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
jnz kbnobaseret
|
jnz kbnobaseret
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap
|
mov eax,keymap
|
||||||
@ -1618,7 +1618,7 @@ sys_getsetup:
|
|||||||
kbnobaseret:
|
kbnobaseret:
|
||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jnz kbnoshiftret
|
jnz kbnoshiftret
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap_shift
|
mov eax,keymap_shift
|
||||||
@ -1628,7 +1628,7 @@ sys_getsetup:
|
|||||||
kbnoshiftret:
|
kbnoshiftret:
|
||||||
cmp ebx,3
|
cmp ebx,3
|
||||||
jne kbnoaltret
|
jne kbnoaltret
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap_alt
|
mov eax,keymap_alt
|
||||||
@ -1733,7 +1733,7 @@ mswin:
|
|||||||
mov eax,[0xfb0a]
|
mov eax,[0xfb0a]
|
||||||
shl eax,16
|
shl eax,16
|
||||||
mov ax,[0xfb0c]
|
mov ax,[0xfb0c]
|
||||||
mov esi,[0x3010]
|
mov esi,[TASK_BASE]
|
||||||
mov bx, word [esi-twdw+WDATA.box.left]
|
mov bx, word [esi-twdw+WDATA.box.left]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx, word [esi-twdw+WDATA.box.top]
|
mov bx, word [esi-twdw+WDATA.box.top]
|
||||||
@ -1884,7 +1884,7 @@ include 'detect/ps2mouse.inc'
|
|||||||
|
|
||||||
sys_end:
|
sys_end:
|
||||||
|
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
mov [eax+TASKDATA.state], 3 ; terminate this program
|
mov [eax+TASKDATA.state], 3 ; terminate this program
|
||||||
|
|
||||||
waitterm: ; wait here for termination
|
waitterm: ; wait here for termination
|
||||||
@ -1931,7 +1931,7 @@ sysfn_shutdown: ; 18.1 = BOOT
|
|||||||
mov [0x2f0000+0x9030],byte 0
|
mov [0x2f0000+0x9030],byte 0
|
||||||
for_shutdown_parameter:
|
for_shutdown_parameter:
|
||||||
|
|
||||||
mov eax,[0x3004]
|
mov eax,[TASK_COUNT]
|
||||||
add eax,2
|
add eax,2
|
||||||
mov [shutdown_processes],eax
|
mov [shutdown_processes],eax
|
||||||
mov [0xFF00],al
|
mov [0xFF00],al
|
||||||
@ -1944,13 +1944,13 @@ sysfn_shutdown: ; 18.1 = BOOT
|
|||||||
sysfn_terminate: ; 18.2 = TERMINATE
|
sysfn_terminate: ; 18.2 = TERMINATE
|
||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jb noprocessterminate
|
jb noprocessterminate
|
||||||
mov edx,[0x3004]
|
mov edx,[TASK_COUNT]
|
||||||
cmp ebx,edx
|
cmp ebx,edx
|
||||||
ja noprocessterminate
|
ja noprocessterminate
|
||||||
mov eax,[0x3004]
|
mov eax,[TASK_COUNT]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
mov edx,[ebx+0x3000+TASKDATA.pid]
|
mov edx,[ebx+CURRENT_TASK+TASKDATA.pid]
|
||||||
add ebx,0x3000+TASKDATA.state
|
add ebx,CURRENT_TASK+TASKDATA.state
|
||||||
cmp byte [ebx], 9
|
cmp byte [ebx], 9
|
||||||
jz noprocessterminate
|
jz noprocessterminate
|
||||||
|
|
||||||
@ -1995,13 +1995,13 @@ sysfn_terminate2:
|
|||||||
sysfn_activate: ; 18.3 = ACTIVATE WINDOW
|
sysfn_activate: ; 18.3 = ACTIVATE WINDOW
|
||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jb .nowindowactivate
|
jb .nowindowactivate
|
||||||
cmp ebx,[0x3004]
|
cmp ebx,[TASK_COUNT]
|
||||||
ja .nowindowactivate
|
ja .nowindowactivate
|
||||||
|
|
||||||
mov [window_minimize], 2 ; restore window if minimized
|
mov [window_minimize], 2 ; restore window if minimized
|
||||||
|
|
||||||
movzx esi, word [0xC000 + ebx*2]
|
movzx esi, word [0xC000 + ebx*2]
|
||||||
cmp esi, [0x3004]
|
cmp esi, [TASK_COUNT]
|
||||||
je .nowindowactivate ; already active
|
je .nowindowactivate ; already active
|
||||||
|
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
@ -2029,7 +2029,7 @@ sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
|
|||||||
;!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
sysfn_getactive: ; 18.7 = get active window
|
sysfn_getactive: ; 18.7 = get active window
|
||||||
mov eax, [0x3004]
|
mov eax, [TASK_COUNT]
|
||||||
movzx eax, word [0xC400 + eax*2]
|
movzx eax, word [0xC400 + eax*2]
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
@ -2070,7 +2070,7 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
|
|||||||
rep movsb
|
rep movsb
|
||||||
ret
|
ret
|
||||||
for_all_tables:
|
for_all_tables:
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov edi,[edi+TASKDATA.mem_start]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ecx
|
add edi,ecx
|
||||||
mov esi,0x40000
|
mov esi,0x40000
|
||||||
@ -2089,7 +2089,7 @@ sysfn_lastkey: ; 18.12 = return 0 (backward compatibility)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
sysfn_getversion: ; 18.13 = get kernel ID and version
|
sysfn_getversion: ; 18.13 = get kernel ID and version
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov edi,[edi+TASKDATA.mem_start]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ebx
|
add edi,ebx
|
||||||
mov esi,version_inf
|
mov esi,version_inf
|
||||||
@ -2285,7 +2285,7 @@ draw_background_temp:
|
|||||||
cmp eax,5 ; BLOCK MOVE TO BGR
|
cmp eax,5 ; BLOCK MOVE TO BGR
|
||||||
jnz nosb5
|
jnz nosb5
|
||||||
; bughere
|
; bughere
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
add ebx, [edi+TASKDATA.mem_start]
|
add ebx, [edi+TASKDATA.mem_start]
|
||||||
; mov esi, ebx
|
; mov esi, ebx
|
||||||
; mov edi, ecx
|
; mov edi, ecx
|
||||||
@ -2347,9 +2347,9 @@ align 4
|
|||||||
sys_getkey:
|
sys_getkey:
|
||||||
mov [esp+36],dword 1
|
mov [esp+36],dword 1
|
||||||
; test main buffer
|
; test main buffer
|
||||||
mov ebx, [0x3000] ; TOP OF WINDOW STACK
|
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||||
movzx ecx,word [0xC000 + ebx * 2]
|
movzx ecx,word [0xC000 + ebx * 2]
|
||||||
mov edx,[0x3004]
|
mov edx,[TASK_COUNT]
|
||||||
cmp ecx,edx
|
cmp ecx,edx
|
||||||
jne .finish
|
jne .finish
|
||||||
cmp [0xf400],byte 0
|
cmp [0xf400],byte 0
|
||||||
@ -2395,10 +2395,10 @@ align 4
|
|||||||
|
|
||||||
sys_getbutton:
|
sys_getbutton:
|
||||||
|
|
||||||
mov ebx, [0x3000] ; TOP OF WINDOW STACK
|
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||||
mov [esp+36],dword 1
|
mov [esp+36],dword 1
|
||||||
movzx ecx, word [0xC000 + ebx * 2]
|
movzx ecx, word [0xC000 + ebx * 2]
|
||||||
mov edx, [0x3004] ; less than 256 processes
|
mov edx, [TASK_COUNT] ; less than 256 processes
|
||||||
cmp ecx,edx
|
cmp ecx,edx
|
||||||
jne .exit
|
jne .exit
|
||||||
movzx eax,byte [0xf500]
|
movzx eax,byte [0xf500]
|
||||||
@ -2427,12 +2427,12 @@ sys_cpuusage:
|
|||||||
; +30 dword PID , process idenfification number
|
; +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]
|
add eax,[edi + TASKDATA.mem_start]
|
||||||
|
|
||||||
cmp ebx,-1 ; who am I ?
|
cmp ebx,-1 ; who am I ?
|
||||||
jne no_who_am_i
|
jne no_who_am_i
|
||||||
mov ebx,[0x3000]
|
mov ebx,[CURRENT_TASK]
|
||||||
no_who_am_i:
|
no_who_am_i:
|
||||||
|
|
||||||
push eax ; return area
|
push eax ; return area
|
||||||
@ -2447,7 +2447,7 @@ sys_cpuusage:
|
|||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov eax,0x20
|
mov eax,0x20
|
||||||
mul ebx
|
mul ebx
|
||||||
add eax,0x3000+TASKDATA.cpu_usage
|
add eax,CURRENT_TASK+TASKDATA.cpu_usage
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx,[ebx]
|
mov ecx,[ebx]
|
||||||
@ -2486,7 +2486,7 @@ sys_cpuusage:
|
|||||||
|
|
||||||
mov eax,[esp]
|
mov eax,[esp]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add eax,0x3000+TASKDATA.pid
|
add eax,CURRENT_TASK+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
mov [ebx+20],eax
|
mov [ebx+20],eax
|
||||||
|
|
||||||
@ -2505,7 +2505,7 @@ sys_cpuusage:
|
|||||||
|
|
||||||
mov eax,[esp]
|
mov eax,[esp]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add eax,0x3000+TASKDATA.state
|
add eax,CURRENT_TASK+TASKDATA.state
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
mov [ebx+40],ax
|
mov [ebx+40],ax
|
||||||
|
|
||||||
@ -2531,7 +2531,7 @@ sys_cpuusage:
|
|||||||
|
|
||||||
; return number of processes
|
; return number of processes
|
||||||
|
|
||||||
mov eax,[0x3004]
|
mov eax,[TASK_COUNT]
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2618,7 +2618,7 @@ sys_redrawstat:
|
|||||||
|
|
||||||
; buttons away
|
; buttons away
|
||||||
|
|
||||||
mov ecx,[0x3000]
|
mov ecx,[CURRENT_TASK]
|
||||||
|
|
||||||
sys_newba2:
|
sys_newba2:
|
||||||
|
|
||||||
@ -2661,8 +2661,8 @@ sys_redrawstat:
|
|||||||
cmp eax,2
|
cmp eax,2
|
||||||
jnz srl1
|
jnz srl1
|
||||||
|
|
||||||
mov edx,[0x3010] ; return whole screen draw area for this app
|
mov edx,[TASK_BASE] ; return whole screen draw area for this app
|
||||||
add edx,draw_data-0x3000
|
add edx,draw_data-CURRENT_TASK
|
||||||
mov [edx+RECT.left], 0
|
mov [edx+RECT.left], 0
|
||||||
mov [edx+RECT.top], 0
|
mov [edx+RECT.top], 0
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
@ -2670,7 +2670,7 @@ sys_redrawstat:
|
|||||||
mov eax,[0xfe04]
|
mov eax,[0xfe04]
|
||||||
mov [edx+RECT.bottom],eax
|
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
|
or [edi-twdw+WDATA.fl_wdrawn], 1 ; no new position & buttons from app
|
||||||
|
|
||||||
call sys_window_mouse
|
call sys_window_mouse
|
||||||
@ -2731,9 +2731,9 @@ sys_drawwindow:
|
|||||||
|
|
||||||
; parameter for drawwindow_IV
|
; parameter for drawwindow_IV
|
||||||
push 0
|
push 0
|
||||||
mov edi, [0x3004]
|
mov edi, [TASK_COUNT]
|
||||||
movzx edi, word [0xC400 + edi*2]
|
movzx edi, word [0xC400 + edi*2]
|
||||||
cmp edi, [0x3000]
|
cmp edi, [CURRENT_TASK]
|
||||||
jne @f
|
jne @f
|
||||||
inc dword [esp]
|
inc dword [esp]
|
||||||
@@:
|
@@:
|
||||||
@ -2757,12 +2757,12 @@ draw_window_caption:
|
|||||||
call [disable_mouse]
|
call [disable_mouse]
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edx,[0x3004]
|
mov edx,[TASK_COUNT]
|
||||||
movzx edx,word[0xC400+edx*2]
|
movzx edx,word[0xC400+edx*2]
|
||||||
cmp edx,[0x3000]
|
cmp edx,[CURRENT_TASK]
|
||||||
jne @f
|
jne @f
|
||||||
inc eax
|
inc eax
|
||||||
@@: mov edx,[0x3000]
|
@@: mov edx,[CURRENT_TASK]
|
||||||
shl edx,5
|
shl edx,5
|
||||||
add edx,window_data
|
add edx,window_data
|
||||||
movzx ebx,[edx+WDATA.fl_wstyle]
|
movzx ebx,[edx+WDATA.fl_wstyle]
|
||||||
@ -2790,7 +2790,7 @@ draw_window_caption:
|
|||||||
|
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
.2: ;jmp @f
|
.2: ;jmp @f
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
||||||
jz @f
|
jz @f
|
||||||
@ -2913,7 +2913,7 @@ set_window_clientbox:
|
|||||||
|
|
||||||
sys_set_window:
|
sys_set_window:
|
||||||
|
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
add edi,window_data
|
add edi,window_data
|
||||||
|
|
||||||
@ -2996,7 +2996,7 @@ syscall_windowsettings:
|
|||||||
; NOTE: only window owner thread can set its caption,
|
; NOTE: only window owner thread can set its caption,
|
||||||
; so there's no parameter for PID/TID
|
; so there's no parameter for PID/TID
|
||||||
|
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
|
|
||||||
; have to check if caption is within application memory limit
|
; have to check if caption is within application memory limit
|
||||||
@ -3031,7 +3031,7 @@ syscall_windowsettings:
|
|||||||
|
|
||||||
sys_window_move:
|
sys_window_move:
|
||||||
|
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
add edi,window_data
|
add edi,window_data
|
||||||
|
|
||||||
@ -3299,7 +3299,7 @@ checkmisc:
|
|||||||
jne mouse_not_active
|
jne mouse_not_active
|
||||||
mov [mouse_active], 0
|
mov [mouse_active], 0
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
mov ecx, [0x3004]
|
mov ecx, [TASK_COUNT]
|
||||||
set_mouse_event:
|
set_mouse_event:
|
||||||
add edi, 256
|
add edi, 256
|
||||||
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
|
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
|
||||||
@ -3357,8 +3357,8 @@ checkmisc:
|
|||||||
noshutdown:
|
noshutdown:
|
||||||
|
|
||||||
|
|
||||||
mov eax,[0x3004] ; termination
|
mov eax,[TASK_COUNT] ; termination
|
||||||
mov ebx,0x3020+TASKDATA.state
|
mov ebx,TASK_DATA+TASKDATA.state
|
||||||
mov esi,1
|
mov esi,1
|
||||||
|
|
||||||
newct:
|
newct:
|
||||||
@ -3475,7 +3475,7 @@ redrawscreen:
|
|||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
cmp ecx,[0x3004]
|
cmp ecx,[TASK_COUNT]
|
||||||
jle newdw2
|
jle newdw2
|
||||||
|
|
||||||
pop eax
|
pop eax
|
||||||
@ -3545,7 +3545,7 @@ delay_ms: ; delay in 1/1000 sec
|
|||||||
set_app_param:
|
set_app_param:
|
||||||
push edi
|
push edi
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov [edi+TASKDATA.event_mask],eax
|
mov [edi+TASKDATA.event_mask],eax
|
||||||
|
|
||||||
pop edi
|
pop edi
|
||||||
@ -3634,7 +3634,7 @@ memmove: ; memory move in bytes
|
|||||||
;; 5 file not found
|
;; 5 file not found
|
||||||
;; ebx = size of file
|
;; ebx = size of file
|
||||||
;
|
;
|
||||||
; mov edi,[0x3010]
|
; mov edi,[TASK_BASE]
|
||||||
; add edi,0x10
|
; add edi,0x10
|
||||||
; add esi,[edi]
|
; add esi,[edi]
|
||||||
; add eax,[edi]
|
; add eax,[edi]
|
||||||
@ -3662,12 +3662,12 @@ align 4
|
|||||||
|
|
||||||
sys_programirq:
|
sys_programirq:
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add eax,[edi+TASKDATA.mem_start]
|
add eax,[edi+TASKDATA.mem_start]
|
||||||
|
|
||||||
cmp ebx,16
|
cmp ebx,16
|
||||||
jae .not_owner
|
jae .not_owner
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov edi,[edi+TASKDATA.pid]
|
mov edi,[edi+TASKDATA.pid]
|
||||||
cmp edi,[irq_owner+ebx*4]
|
cmp edi,[irq_owner+ebx*4]
|
||||||
je spril1
|
je spril1
|
||||||
@ -3696,7 +3696,7 @@ get_irq_data:
|
|||||||
shl edx,2
|
shl edx,2
|
||||||
add edx,irq_owner
|
add edx,irq_owner
|
||||||
mov edx,[edx]
|
mov edx,[edx]
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov edi,[edi+TASKDATA.pid]
|
mov edi,[edi+TASKDATA.pid]
|
||||||
cmp edx,edi
|
cmp edx,edi
|
||||||
je gidril1
|
je gidril1
|
||||||
@ -3736,7 +3736,7 @@ set_io_access_rights:
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
imul edi,tss_step
|
imul edi,tss_step
|
||||||
add edi,tss_data+128
|
add edi,tss_data+128
|
||||||
; add edi,128
|
; add edi,128
|
||||||
@ -3844,7 +3844,7 @@ r_f_port_area:
|
|||||||
mov [0x2d0000],edi
|
mov [0x2d0000],edi
|
||||||
shl edi,4
|
shl edi,4
|
||||||
add edi,0x2d0000
|
add edi,0x2d0000
|
||||||
mov esi,[0x3010]
|
mov esi,[TASK_BASE]
|
||||||
mov esi,[esi+TASKDATA.pid]
|
mov esi,[esi+TASKDATA.pid]
|
||||||
mov [edi],esi
|
mov [edi],esi
|
||||||
mov [edi+4],ebx
|
mov [edi+4],ebx
|
||||||
@ -3860,7 +3860,7 @@ free_port_area:
|
|||||||
mov esi,[0x2d0000] ; no reserved areas ?
|
mov esi,[0x2d0000] ; no reserved areas ?
|
||||||
test esi,esi
|
test esi,esi
|
||||||
je frpal2
|
je frpal2
|
||||||
mov edx,[0x3010]
|
mov edx,[TASK_BASE]
|
||||||
mov edx,[edx+TASKDATA.pid]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
frpal3:
|
frpal3:
|
||||||
mov edi,esi
|
mov edi,esi
|
||||||
@ -3934,7 +3934,7 @@ reserve_free_irq:
|
|||||||
|
|
||||||
lea edi,[irq_owner+ebx*4]
|
lea edi,[irq_owner+ebx*4]
|
||||||
mov edx,[edi]
|
mov edx,[edi]
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
cmp edx,[eax+TASKDATA.pid]
|
cmp edx,[eax+TASKDATA.pid]
|
||||||
jne fril1
|
jne fril1
|
||||||
dec ecx
|
dec ecx
|
||||||
@ -3949,7 +3949,7 @@ reserve_free_irq:
|
|||||||
cmp dword [edi], 0
|
cmp dword [edi], 0
|
||||||
jnz ril1
|
jnz ril1
|
||||||
|
|
||||||
mov edx,[0x3010]
|
mov edx,[TASK_BASE]
|
||||||
mov edx,[edx+TASKDATA.pid]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
mov [edi],edx
|
mov [edi],edx
|
||||||
dec ecx
|
dec ecx
|
||||||
@ -4001,7 +4001,7 @@ sys_putimage:
|
|||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mov edi,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
rol edx,16
|
rol edx,16
|
||||||
@ -4043,7 +4043,7 @@ sys_putimage_palette:
|
|||||||
; esi = number of bits per pixel, must be 8, 24 or 32
|
; esi = number of bits per pixel, must be 8, 24 or 32
|
||||||
; edi = pointer to palette
|
; edi = pointer to palette
|
||||||
; ebp = row delta
|
; ebp = row delta
|
||||||
mov eax, [0x3000]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
|
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
@ -4104,7 +4104,7 @@ putimage_get32bpp:
|
|||||||
; edi color
|
; edi color
|
||||||
|
|
||||||
__sys_drawbar:
|
__sys_drawbar:
|
||||||
mov esi,[0x3000]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
add ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
@ -4474,7 +4474,7 @@ sys_msg_board:
|
|||||||
|
|
||||||
|
|
||||||
sys_process_def:
|
sys_process_def:
|
||||||
mov edi, [0x3000]
|
mov edi, [CURRENT_TASK]
|
||||||
|
|
||||||
dec eax ; 1 = set keyboard mode
|
dec eax ; 1 = set keyboard mode
|
||||||
jne no_set_keyboard_setup
|
jne no_set_keyboard_setup
|
||||||
@ -4635,10 +4635,10 @@ align 4 ; system functions
|
|||||||
syscall_setpixel: ; SetPixel
|
syscall_setpixel: ; SetPixel
|
||||||
|
|
||||||
|
|
||||||
mov edx,[0x3010]
|
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,[0x3000]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
add ebx,[edi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx,[edi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
@ -4651,10 +4651,10 @@ align 4
|
|||||||
|
|
||||||
syscall_writetext: ; WriteText
|
syscall_writetext: ; WriteText
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
mov ebp,[edi-twdw+WDATA.box.left]
|
mov ebp,[edi-twdw+WDATA.box.left]
|
||||||
push esi
|
push esi
|
||||||
mov esi,[0x3000]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
shl ebp,16
|
shl ebp,16
|
||||||
@ -4671,7 +4671,7 @@ align 4
|
|||||||
syscall_openramdiskfile: ; OpenRamdiskFile
|
syscall_openramdiskfile: ; OpenRamdiskFile
|
||||||
|
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
@ -4694,7 +4694,7 @@ syscall_drawrect: ; DrawRect
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
movzx edx,bx
|
movzx edx,bx
|
||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov esi,[0x3000]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
@ -4726,7 +4726,7 @@ align 4
|
|||||||
|
|
||||||
syscall_delramdiskfile: ; DelRamdiskFile
|
syscall_delramdiskfile: ; DelRamdiskFile
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
call filedelete
|
call filedelete
|
||||||
@ -4737,7 +4737,7 @@ align 4
|
|||||||
|
|
||||||
syscall_writeramdiskfile: ; WriteRamdiskFile
|
syscall_writeramdiskfile: ; WriteRamdiskFile
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
@ -4762,7 +4762,7 @@ align 4
|
|||||||
|
|
||||||
syscall_readstring: ; ReadString
|
syscall_readstring: ; ReadString
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
call read_string
|
call read_string
|
||||||
@ -4773,10 +4773,10 @@ align 4
|
|||||||
|
|
||||||
syscall_drawline: ; DrawLine
|
syscall_drawline: ; DrawLine
|
||||||
|
|
||||||
mov edi,[0x3010]
|
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,[0x3000]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
add dx,word[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
|
read_from_hd: ; Read from hd - fn not in use
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ecx,[edi]
|
add ecx,[edi]
|
||||||
@ -4924,7 +4924,7 @@ undefined_syscall: ; Undefined system call
|
|||||||
|
|
||||||
; push edi
|
; 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
|
; imul edi,8
|
||||||
; mov [edi+gdts+ tss0 +5], word 01010000b *256 +11101001b
|
; mov [edi+gdts+ tss0 +5], word 01010000b *256 +11101001b
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
;
|
;
|
||||||
; 0x0098B000 -> kernel heap
|
; 0x0098B000 -> kernel heap
|
||||||
;
|
;
|
||||||
; 0x01FFFFFF heam min limit
|
; 0x01FFFFFF heap min limit
|
||||||
; 0x7DBFFFFF heap max limit
|
; 0x7DBFFFFF heap max limit
|
||||||
; 0x7DC00000 -> 0x7FBFFFFF LFB 32Mb
|
; 0x7DC00000 -> 0x7FBFFFFF LFB 32Mb
|
||||||
; 0x7DC00000 -> 0x7E3FFFFF application available LFB 8Mb
|
; 0x7DC00000 -> 0x7E3FFFFF application available LFB 8Mb
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
;; socket_read
|
;; socket_read
|
||||||
;; socket_write
|
;; socket_write
|
||||||
;; socket_write_tcp
|
;; socket_write_tcp
|
||||||
;;
|
;;
|
||||||
;;
|
;;
|
||||||
;; Changes history:
|
;; Changes history:
|
||||||
;; 22.09.2003 - [Mike Hibbett] : mikeh@oceanfree.net
|
;; 22.09.2003 - [Mike Hibbett] : mikeh@oceanfree.net
|
||||||
;; 11.11.2006 - [Johnny_B] and [smb]
|
;; 11.11.2006 - [Johnny_B] and [smb]
|
||||||
@ -71,15 +71,15 @@
|
|||||||
; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
; 72| Retransmit queue # NOW WINDOW SIZE TIMER INTEL format|
|
; 72| Retransmit queue # NOW WINDOW SIZE TIMER INTEL format|
|
||||||
; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
; 76| RX offset from
|
; 76| RX offset from
|
||||||
; 76| RX Data |
|
; 76| RX Data |
|
||||||
; +-+-+-.......... -+
|
; +-+-+-.......... -+
|
||||||
|
|
||||||
|
|
||||||
; so, define struct
|
; so, define struct
|
||||||
struc SOCKET
|
struc SOCKET
|
||||||
{ .Status dd ? ;+00 - Status ( of this buffer )
|
{ .Status dd ? ;+00 - Status ( of this buffer )
|
||||||
.PID dd ? ;+04 - Application Process ID
|
.PID dd ? ;+04 - Application Process ID
|
||||||
.LocalIP dd ? ;+08 - Local IP Address
|
.LocalIP dd ? ;+08 - Local IP Address
|
||||||
.LocalPort dw ? ;+12 - Local Port
|
.LocalPort dw ? ;+12 - Local Port
|
||||||
.UnusedL dw ? ;+14 - may be removed in future
|
.UnusedL dw ? ;+14 - may be removed in future
|
||||||
@ -88,17 +88,17 @@ struc SOCKET
|
|||||||
.UnusedR dw ? ;+22 - may be removed in future
|
.UnusedR dw ? ;+22 - may be removed in future
|
||||||
.rxDataCount dd ? ;+24 - Rx Data Count
|
.rxDataCount dd ? ;+24 - Rx Data Count
|
||||||
.TCBState dd ? ;+28 - TCB STATE
|
.TCBState dd ? ;+28 - TCB STATE
|
||||||
.TCBTimer dd ? ;+32 - TCB Timer (seconds)
|
.TCBTimer dd ? ;+32 - TCB Timer (seconds)
|
||||||
.ISS dd ? ;+36 - Initial Send Sequence
|
.ISS dd ? ;+36 - Initial Send Sequence
|
||||||
.IRS dd ? ;+40 - Initial Receive Sequence
|
.IRS dd ? ;+40 - Initial Receive Sequence
|
||||||
.SND_UNA dd ? ;+44 - Sequence number of unack'ed sent packets
|
.SND_UNA dd ? ;+44 - Sequence number of unack'ed sent packets
|
||||||
.SND_NXT dd ? ;+48 - Next send sequence number to use
|
.SND_NXT dd ? ;+48 - Next send sequence number to use
|
||||||
.SND_WND dd ? ;+52 - Send window
|
.SND_WND dd ? ;+52 - Send window
|
||||||
.RCV_NXT dd ? ;+56 - Next receive sequence number to use
|
.RCV_NXT dd ? ;+56 - Next receive sequence number to use
|
||||||
.RCV_WND dd ? ;+60 - Receive window
|
.RCV_WND dd ? ;+60 - Receive window
|
||||||
.SEG_LEN dd ? ;+64 - Segment length
|
.SEG_LEN dd ? ;+64 - Segment length
|
||||||
.SEG_WND dd ? ;+68 - Segment window
|
.SEG_WND dd ? ;+68 - Segment window
|
||||||
.wndsizeTimer dd ? ;+72 - Retransmit queue # NOW WINDOW SIZE TIMER
|
.wndsizeTimer dd ? ;+72 - Retransmit queue # NOW WINDOW SIZE TIMER
|
||||||
.rxData dd ? ;+76 - receive data buffer here
|
.rxData dd ? ;+76 - receive data buffer here
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,11 +106,11 @@ virtual at 0
|
|||||||
SOCKET SOCKET
|
SOCKET SOCKET
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
; simple macro calcing real memory address of SOCKET struct by socket's
|
; simple macro calcing real memory address of SOCKET struct by socket's
|
||||||
macro Index2RealAddr reg
|
macro Index2RealAddr reg
|
||||||
{
|
{
|
||||||
shl reg, 12
|
shl reg, 12
|
||||||
add reg, sockets
|
add reg, sockets
|
||||||
}
|
}
|
||||||
|
|
||||||
;Constants
|
;Constants
|
||||||
@ -211,11 +211,11 @@ socket_open:
|
|||||||
mov [eax + SOCKET.RemotePort], cx
|
mov [eax + SOCKET.RemotePort], cx
|
||||||
|
|
||||||
mov ebx, [stack_ip]
|
mov ebx, [stack_ip]
|
||||||
mov [eax + SOCKET.LocalIP], ebx
|
mov [eax + SOCKET.LocalIP], ebx
|
||||||
mov [eax + SOCKET.RemoteIP], edx
|
mov [eax + SOCKET.RemoteIP], edx
|
||||||
mov [eax + SOCKET.rxDataCount], dword 0 ; recieved data count
|
mov [eax + SOCKET.rxDataCount], dword 0 ; recieved data count
|
||||||
|
|
||||||
mov esi, [0x3010]
|
mov esi, [TASK_BASE]
|
||||||
mov ebx, [esi+TASKDATA.pid]
|
mov ebx, [esi+TASKDATA.pid]
|
||||||
mov [eax + SOCKET.PID], ebx ; save the process ID
|
mov [eax + SOCKET.PID], ebx ; save the process ID
|
||||||
pop eax ; Get the socket number back, so we can return it
|
pop eax ; Get the socket number back, so we can return it
|
||||||
@ -256,19 +256,19 @@ socket_open_tcp:
|
|||||||
mov [eax + SOCKET.wndsizeTimer], dword 0 ; Reset the window timer.
|
mov [eax + SOCKET.wndsizeTimer], dword 0 ; Reset the window timer.
|
||||||
|
|
||||||
xchg bh, bl
|
xchg bh, bl
|
||||||
mov [eax + SOCKET.LocalPort], bx
|
mov [eax + SOCKET.LocalPort], bx
|
||||||
; mov [eax + 12], byte bh ; Local port ( LS 16 bits )
|
; mov [eax + 12], byte bh ; Local port ( LS 16 bits )
|
||||||
; mov [eax + 13], byte bl ; Local port ( LS 16 bits )
|
; mov [eax + 13], byte bl ; Local port ( LS 16 bits )
|
||||||
|
|
||||||
xchg ch, cl
|
xchg ch, cl
|
||||||
mov [eax + SOCKET.RemotePort], cx
|
mov [eax + SOCKET.RemotePort], cx
|
||||||
; mov [eax + 20], ch ; Remote Port ( LS 16 bits )
|
; mov [eax + 20], ch ; Remote Port ( LS 16 bits )
|
||||||
; mov [eax + 21], cl ; Remote Port ( LS 16 bits )
|
; mov [eax + 21], cl ; Remote Port ( LS 16 bits )
|
||||||
|
|
||||||
mov ebx, [stack_ip]
|
mov ebx, [stack_ip]
|
||||||
mov [eax + SOCKET.LocalIP], ebx
|
mov [eax + SOCKET.LocalIP], ebx
|
||||||
mov [eax + SOCKET.RemoteIP], edx
|
mov [eax + SOCKET.RemoteIP], edx
|
||||||
mov [eax + SOCKET.rxDataCount], dword 0
|
mov [eax + SOCKET.rxDataCount], dword 0
|
||||||
|
|
||||||
; Now fill in TCB state
|
; Now fill in TCB state
|
||||||
mov ebx, TCB_LISTEN
|
mov ebx, TCB_LISTEN
|
||||||
@ -279,7 +279,7 @@ socket_open_tcp:
|
|||||||
sot_001:
|
sot_001:
|
||||||
mov [eax + SOCKET.TCBState], ebx ; Indicate the state of the TCB
|
mov [eax + SOCKET.TCBState], ebx ; Indicate the state of the TCB
|
||||||
|
|
||||||
mov esi, [0x3010]
|
mov esi, [TASK_BASE]
|
||||||
mov ecx, [esi+TASKDATA.pid]
|
mov ecx, [esi+TASKDATA.pid]
|
||||||
mov [eax + SOCKET.PID], ecx ; save the process ID
|
mov [eax + SOCKET.PID], ecx ; save the process ID
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ socket_write:
|
|||||||
pop eax ; get callers ptr to data to send
|
pop eax ; get callers ptr to data to send
|
||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
add edi, TASKDATA.mem_start
|
add edi, TASKDATA.mem_start
|
||||||
add eax, [edi]
|
add eax, [edi]
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
@ -824,7 +824,7 @@ socket_write_tcp:
|
|||||||
mov bl, 0x10 ; ACK
|
mov bl, 0x10 ; ACK
|
||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
add edi, TASKDATA.mem_start
|
add edi, TASKDATA.mem_start
|
||||||
add edx, [edi]
|
add edx, [edi]
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
|
@ -215,7 +215,7 @@ sh_001:
|
|||||||
|
|
||||||
mov [last_1sTick], al
|
mov [last_1sTick], al
|
||||||
|
|
||||||
stdcall arp_table_manager, ARP_TABLE_TIMER, 0, 0
|
stdcall arp_table_manager, ARP_TABLE_TIMER, 0, 0
|
||||||
call tcp_tcb_handler
|
call tcp_tcb_handler
|
||||||
|
|
||||||
sh_exit:
|
sh_exit:
|
||||||
@ -485,8 +485,8 @@ not13:
|
|||||||
; write the dns IP Address
|
; write the dns IP Address
|
||||||
mov [dns_ip], ebx
|
mov [dns_ip], ebx
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;<added by Frank Sommer>
|
;<added by Frank Sommer>
|
||||||
not14:
|
not14:
|
||||||
cmp eax, 15
|
cmp eax, 15
|
||||||
@ -495,7 +495,7 @@ not14:
|
|||||||
; in ebx we need 4 to read the last 2 bytes
|
; in ebx we need 4 to read the last 2 bytes
|
||||||
cmp ebx, dword 4
|
cmp ebx, dword 4
|
||||||
je read
|
je read
|
||||||
|
|
||||||
; or we need 0 to read the first 4 bytes
|
; or we need 0 to read the first 4 bytes
|
||||||
cmp ebx, dword 0
|
cmp ebx, dword 0
|
||||||
jnz param_error
|
jnz param_error
|
||||||
@ -504,13 +504,13 @@ not14:
|
|||||||
read:
|
read:
|
||||||
mov eax, [node_addr + ebx]
|
mov eax, [node_addr + ebx]
|
||||||
jmp @f
|
jmp @f
|
||||||
|
|
||||||
param_error:
|
param_error:
|
||||||
mov eax, -1 ; params not accepted
|
mov eax, -1 ; params not accepted
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
; 0 -> arp_probe
|
; 0 -> arp_probe
|
||||||
; 1 -> arp_announce
|
; 1 -> arp_announce
|
||||||
; 2 -> arp_responce (not supported yet)
|
; 2 -> arp_responce (not supported yet)
|
||||||
@ -518,33 +518,33 @@ param_error:
|
|||||||
not15: ; ARP stuff
|
not15: ; ARP stuff
|
||||||
cmp eax, 16
|
cmp eax, 16
|
||||||
jnz not16
|
jnz not16
|
||||||
|
|
||||||
cmp ebx, 0
|
cmp ebx, 0
|
||||||
je a_probe
|
je a_probe
|
||||||
|
|
||||||
cmp ebx, 1
|
cmp ebx, 1
|
||||||
je a_ann ; arp announce
|
je a_ann ; arp announce
|
||||||
|
|
||||||
; cmp ebx,2
|
; cmp ebx,2
|
||||||
; jne a_resp ; arp response
|
; jne a_resp ; arp response
|
||||||
|
|
||||||
jmp param15_error
|
jmp param15_error
|
||||||
|
|
||||||
|
|
||||||
; arp probe, sender IP must be set to 0.0.0.0, target IP is set to address being probed
|
; arp probe, sender IP must be set to 0.0.0.0, target IP is set to address being probed
|
||||||
; ecx: pointer to target MAC, MAC should set to 0 by application
|
; ecx: pointer to target MAC, MAC should set to 0 by application
|
||||||
; edx: target IP
|
; edx: target IP
|
||||||
a_probe:
|
a_probe:
|
||||||
push dword [stack_ip]
|
push dword [stack_ip]
|
||||||
|
|
||||||
mov edx, [stack_ip]
|
mov edx, [stack_ip]
|
||||||
mov [stack_ip], dword 0
|
mov [stack_ip], dword 0
|
||||||
mov esi, ecx ; pointer to target MAC address
|
mov esi, ecx ; pointer to target MAC address
|
||||||
call arp_request
|
call arp_request
|
||||||
|
|
||||||
pop dword [stack_ip]
|
pop dword [stack_ip]
|
||||||
jmp @f
|
jmp @f
|
||||||
|
|
||||||
; arp announce, sender IP must be set to target IP
|
; arp announce, sender IP must be set to target IP
|
||||||
; ecx: pointer to target MAC
|
; ecx: pointer to target MAC
|
||||||
a_ann:
|
a_ann:
|
||||||
@ -552,10 +552,10 @@ a_ann:
|
|||||||
mov esi, ecx ; pointer to target MAC address
|
mov esi, ecx ; pointer to target MAC address
|
||||||
call arp_request
|
call arp_request
|
||||||
jmp @f
|
jmp @f
|
||||||
|
|
||||||
param15_error:
|
param15_error:
|
||||||
mov eax, -1
|
mov eax, -1
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
;</added by Frank Sommer>
|
;</added by Frank Sommer>
|
||||||
@ -929,7 +929,7 @@ stack_get_packet:
|
|||||||
push eax ; save address of IP data
|
push eax ; save address of IP data
|
||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
@ -992,7 +992,7 @@ stack_insert_packet:
|
|||||||
pop eax ; get callers ptr to data to send
|
pop eax ; get callers ptr to data to send
|
||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
|
@ -1057,14 +1057,14 @@ ste_data:
|
|||||||
; flag an event to the application
|
; flag an event to the application
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx,1
|
mov ecx,1
|
||||||
mov esi,0x3020+TASKDATA.pid
|
mov esi,TASK_DATA+TASKDATA.pid
|
||||||
|
|
||||||
news:
|
news:
|
||||||
cmp [esi],eax
|
cmp [esi],eax
|
||||||
je foundPID1
|
je foundPID1
|
||||||
inc ecx
|
inc ecx
|
||||||
add esi,0x20
|
add esi,0x20
|
||||||
cmp ecx,[0x3004]
|
cmp ecx,[TASK_COUNT]
|
||||||
jbe news
|
jbe news
|
||||||
|
|
||||||
foundPID1:
|
foundPID1:
|
||||||
|
@ -11,13 +11,13 @@
|
|||||||
;; See file COPYING for details ;;
|
;; See file COPYING for details ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************************
|
;*******************************************************************
|
||||||
; Interface
|
; Interface
|
||||||
;
|
;
|
||||||
; udp_rx Handles received IP packets with the UDP protocol
|
; udp_rx Handles received IP packets with the UDP protocol
|
||||||
;
|
;
|
||||||
;*******************************************************************
|
;*******************************************************************
|
||||||
|
|
||||||
|
|
||||||
@ -63,28 +63,28 @@ end virtual
|
|||||||
;***************************************************************************
|
;***************************************************************************
|
||||||
udp_rx:
|
udp_rx:
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
; First validate the header & checksum. Discard buffer if error
|
; First validate the header & checksum. Discard buffer if error
|
||||||
|
|
||||||
; Look for a socket where
|
; Look for a socket where
|
||||||
; IP Packet UDP Destination Port = local Port
|
; IP Packet UDP Destination Port = local Port
|
||||||
; IP Packet SA = Remote IP
|
; IP Packet SA = Remote IP
|
||||||
|
|
||||||
movzx ebx, word [edx + 22] ; get the local port from
|
movzx ebx, word [edx + 22] ; get the local port from
|
||||||
; the IP packet's UDP header
|
; the IP packet's UDP header
|
||||||
mov eax, SOCKETBUFFSIZE * NUM_SOCKETS
|
mov eax, SOCKETBUFFSIZE * NUM_SOCKETS
|
||||||
mov ecx, NUM_SOCKETS
|
mov ecx, NUM_SOCKETS
|
||||||
|
|
||||||
fs1:
|
fs1:
|
||||||
sub eax, SOCKETBUFFSIZE
|
sub eax, SOCKETBUFFSIZE
|
||||||
cmp [eax + sockets + 12], bx ; bx will hold the 'wrong' value,
|
cmp [eax + sockets + 12], bx ; bx will hold the 'wrong' value,
|
||||||
; but the comparision is correct
|
; but the comparision is correct
|
||||||
loopnz fs1 ; Return back if no match
|
loopnz fs1 ; Return back if no match
|
||||||
jz fs_done
|
jz fs_done
|
||||||
|
|
||||||
; No match, so exit
|
; No match, so exit
|
||||||
jmp udprx_001
|
jmp udprx_001
|
||||||
|
|
||||||
fs_done:
|
fs_done:
|
||||||
; For dhcp, we must allow any remote server to respond.
|
; For dhcp, we must allow any remote server to respond.
|
||||||
; I will accept the first incoming response to be the one
|
; I will accept the first incoming response to be the one
|
||||||
@ -92,13 +92,13 @@ fs_done:
|
|||||||
; 255.255.255.255
|
; 255.255.255.255
|
||||||
mov ebx, [eax + sockets + 16]
|
mov ebx, [eax + sockets + 16]
|
||||||
cmp ebx, 0xffffffff
|
cmp ebx, 0xffffffff
|
||||||
je udprx_002
|
je udprx_002
|
||||||
|
|
||||||
mov ebx, [edx + 12] ; get the Source address from the IP packet
|
mov ebx, [edx + 12] ; get the Source address from the IP packet
|
||||||
cmp [eax + sockets + 16], ebx
|
cmp [eax + sockets + 16], ebx
|
||||||
jne udprx_001 ; Quit if the source IP is not valid
|
jne udprx_001 ; Quit if the source IP is not valid
|
||||||
|
|
||||||
udprx_002:
|
udprx_002:
|
||||||
; OK - we have a valid UDP packet for this socket.
|
; OK - we have a valid UDP packet for this socket.
|
||||||
; First, update the sockets remote port number with the incoming msg
|
; First, update the sockets remote port number with the incoming msg
|
||||||
; - it will have changed
|
; - it will have changed
|
||||||
@ -106,58 +106,58 @@ udprx_002:
|
|||||||
movzx ebx, word [edx + 20] ; get the UDP source port
|
movzx ebx, word [edx + 20] ; get the UDP source port
|
||||||
; ( was 69, now new )
|
; ( was 69, now new )
|
||||||
mov [eax + sockets + 20], bx
|
mov [eax + sockets + 20], bx
|
||||||
|
|
||||||
; Now, copy data to socket. We have socket address as [eax + sockets].
|
; Now, copy data to socket. We have socket address as [eax + sockets].
|
||||||
; We have IP packet in edx
|
; We have IP packet in edx
|
||||||
|
|
||||||
; get # of bytes in ecx
|
; get # of bytes in ecx
|
||||||
movzx ecx, byte [edx + 3] ; total length of IP packet. Subtract
|
movzx ecx, byte [edx + 3] ; total length of IP packet. Subtract
|
||||||
mov ch, byte [edx + 2] ; 20 + 8 gives data length
|
mov ch, byte [edx + 2] ; 20 + 8 gives data length
|
||||||
sub ecx, 28
|
sub ecx, 28
|
||||||
|
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
add ebx, sockets ; ebx = address of actual socket
|
add ebx, sockets ; ebx = address of actual socket
|
||||||
|
|
||||||
mov eax, [ebx+ 4] ; get socket owner PID
|
mov eax, [ebx+ 4] ; get socket owner PID
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
mov eax, [ebx + 24] ; get # of bytes already in buffer
|
mov eax, [ebx + 24] ; get # of bytes already in buffer
|
||||||
add [ebx + 24], ecx ; increment the count of bytes in buffer
|
add [ebx + 24], ecx ; increment the count of bytes in buffer
|
||||||
|
|
||||||
; point to the location to store the data
|
; point to the location to store the data
|
||||||
add ebx, eax
|
add ebx, eax
|
||||||
add ebx, SOCKETHEADERSIZE
|
add ebx, SOCKETHEADERSIZE
|
||||||
|
|
||||||
; ebx = location for first byte, ecx has count,
|
; ebx = location for first byte, ecx has count,
|
||||||
; edx points to data
|
; edx points to data
|
||||||
|
|
||||||
add edx, 28 ; edx now points to the data
|
add edx, 28 ; edx now points to the data
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
|
|
||||||
cld
|
cld
|
||||||
rep movsb ; copy the data across
|
rep movsb ; copy the data across
|
||||||
|
|
||||||
; flag an event to the application
|
; flag an event to the application
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx,1
|
mov ecx,1
|
||||||
mov esi,0x3020+TASKDATA.pid
|
mov esi,TASK_DATA+TASKDATA.pid
|
||||||
|
|
||||||
newsearch:
|
newsearch:
|
||||||
cmp [esi],eax
|
cmp [esi],eax
|
||||||
je foundPID
|
je foundPID
|
||||||
inc ecx
|
inc ecx
|
||||||
add esi,0x20
|
add esi,0x20
|
||||||
cmp ecx,[0x3004]
|
cmp ecx,[TASK_COUNT]
|
||||||
jbe newsearch
|
jbe newsearch
|
||||||
|
|
||||||
foundPID:
|
foundPID:
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
or dword [ecx+0x80000+APPDATA.event_mask],dword 10000000b ; stack event
|
or dword [ecx+0x80000+APPDATA.event_mask],dword 10000000b ; stack event
|
||||||
|
|
||||||
mov [check_idle_semaphore],200
|
mov [check_idle_semaphore],200
|
||||||
|
|
||||||
udprx_001:
|
udprx_001:
|
||||||
pop eax
|
pop eax
|
||||||
call freeBuff ; Discard the packet
|
call freeBuff ; Discard the packet
|
||||||
ret
|
ret
|
||||||
|
@ -30,7 +30,7 @@ sound_interface:
|
|||||||
|
|
||||||
cmp eax,0 ; Load data
|
cmp eax,0 ; Load data
|
||||||
jne no_SB16_load_music
|
jne no_SB16_load_music
|
||||||
mov edi,[0x3010]
|
mov edi,[TASK_BASE]
|
||||||
add edi,TASKDATA.mem_start
|
add edi,TASKDATA.mem_start
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
call code_SB16_load_music
|
call code_SB16_load_music
|
||||||
@ -67,17 +67,17 @@ sound_interface:
|
|||||||
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
cmp eax, edi ; this is subfunction #55 ?
|
cmp eax, edi ; this is subfunction #55 ?
|
||||||
jne retFunc55 ; if no then return.
|
jne retFunc55 ; if no then return.
|
||||||
cmp byte [sound_flag],0
|
cmp byte [sound_flag],0
|
||||||
jne retFunc55
|
jne retFunc55
|
||||||
movzx eax, byte [countDelayNote]
|
movzx eax, byte [countDelayNote]
|
||||||
or al, al ; player is busy ?
|
or al, al ; player is busy ?
|
||||||
jnz retFunc55 ; return counter delay Note
|
jnz retFunc55 ; return counter delay Note
|
||||||
; mov eax, [0x3010]
|
; mov eax, [TASK_BASE]
|
||||||
; mov eax, [eax+0x10] ; address application im memory
|
; mov eax, [eax+0x10] ; address application im memory
|
||||||
; add eax, edx ; add offset Delay-Note string
|
; add eax, edx ; add offset Delay-Note string
|
||||||
; mov [memAdrNote], eax
|
; mov [memAdrNote], eax
|
||||||
mov [memAdrNote],edx
|
mov [memAdrNote],edx
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
mov eax,[eax+TASKDATA.pid]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [pidProcessNote],eax
|
mov [pidProcessNote],eax
|
||||||
xor eax, eax ; Ok! EAX = 0
|
xor eax, eax ; Ok! EAX = 0
|
||||||
|
@ -361,7 +361,7 @@ proc load_cursor stdcall, src:dword, flags:dword
|
|||||||
@@:
|
@@:
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
mov eax, [0x3000+eax+4]
|
mov eax, [CURRENT_TASK+eax+4]
|
||||||
mov ebx, [src]
|
mov ebx, [src]
|
||||||
mov ecx, [flags]
|
mov ecx, [flags]
|
||||||
call [create_cursor] ;eax, ebx, ecx
|
call [create_cursor] ;eax, ebx, ecx
|
||||||
@ -394,7 +394,7 @@ proc delete_cursor stdcall, hcursor:dword
|
|||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 5
|
shl ebx, 5
|
||||||
mov ebx, [0x3000+ebx+4]
|
mov ebx, [CURRENT_TASK+ebx+4]
|
||||||
cmp ebx, [esi+CURSOR.pid]
|
cmp ebx, [esi+CURSOR.pid]
|
||||||
jne .fail
|
jne .fail
|
||||||
|
|
||||||
|
@ -46,82 +46,82 @@
|
|||||||
|
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
; set_bank for S3 videocards, work on S3 ViRGE PCI (325)
|
; set_bank for S3 videocards, work on S3 ViRGE PCI (325)
|
||||||
; modified by kmeaw
|
; modified by kmeaw
|
||||||
set_bank:
|
set_bank:
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
cmp al,[0xfff2]
|
cmp al,[0xfff2]
|
||||||
je retsb
|
je retsb
|
||||||
mov [0xfff2],al
|
mov [0xfff2],al
|
||||||
push ax
|
push ax
|
||||||
push dx
|
push dx
|
||||||
push cx
|
push cx
|
||||||
mov cl, al
|
mov cl, al
|
||||||
mov dx, 0x3D4
|
mov dx, 0x3D4
|
||||||
mov al, 0x38
|
mov al, 0x38
|
||||||
out dx, al ;CR38 Register Lock 1 ;Note: Traditionally 48h is used to
|
out dx, al ;CR38 Register Lock 1 ;Note: Traditionally 48h is used to
|
||||||
;unlock and 00h to lock
|
;unlock and 00h to lock
|
||||||
inc dx
|
inc dx
|
||||||
mov al, 0x48
|
mov al, 0x48
|
||||||
out dx, al ;3d5 -?
|
out dx, al ;3d5 -?
|
||||||
dec dx
|
dec dx
|
||||||
mov al, 0x31
|
mov al, 0x31
|
||||||
out dx, al ;CR31 Memory Configuration Register
|
out dx, al ;CR31 Memory Configuration Register
|
||||||
;0 Enable Base Address Offset (CPUA BASE). Enables bank operation if set, ;disables if clear.
|
;0 Enable Base Address Offset (CPUA BASE). Enables bank operation if set, ;disables if clear.
|
||||||
;4-5 Bit 16-17 of the Display Start Address. For the 801/5,928 see index 51h,
|
;4-5 Bit 16-17 of the Display Start Address. For the 801/5,928 see index 51h,
|
||||||
;for the 864/964 see index 69h.
|
;for the 864/964 see index 69h.
|
||||||
|
|
||||||
inc dx
|
inc dx
|
||||||
in al, dx
|
in al, dx
|
||||||
dec dx
|
dec dx
|
||||||
mov ah, al
|
mov ah, al
|
||||||
mov al, 0x31
|
mov al, 0x31
|
||||||
out dx, ax
|
out dx, ax
|
||||||
mov al, ah
|
mov al, ah
|
||||||
or al, 9
|
or al, 9
|
||||||
inc dx
|
inc dx
|
||||||
out dx, al
|
out dx, al
|
||||||
dec dx
|
dec dx
|
||||||
mov al, 0x35
|
mov al, 0x35
|
||||||
out dx, al ;CR35 CRT Register Lock
|
out dx, al ;CR35 CRT Register Lock
|
||||||
inc dx
|
inc dx
|
||||||
in al, dx
|
in al, dx
|
||||||
dec dx
|
dec dx
|
||||||
and al, 0xF0
|
and al, 0xF0
|
||||||
mov ch, cl
|
mov ch, cl
|
||||||
and ch, 0x0F
|
and ch, 0x0F
|
||||||
or ch, al
|
or ch, al
|
||||||
mov al, 0x35
|
mov al, 0x35
|
||||||
out dx, al
|
out dx, al
|
||||||
inc dx
|
inc dx
|
||||||
mov al, ch
|
mov al, ch
|
||||||
out dx, ax
|
out dx, ax
|
||||||
dec dx
|
dec dx
|
||||||
mov al, 0x51 ;Extended System Control 2 Register
|
mov al, 0x51 ;Extended System Control 2 Register
|
||||||
out dx, al
|
out dx, al
|
||||||
inc dx
|
inc dx
|
||||||
in al, dx
|
in al, dx
|
||||||
dec dx
|
dec dx
|
||||||
and al, 0xF3
|
and al, 0xF3
|
||||||
shr cl, 2
|
shr cl, 2
|
||||||
and cl, 0x0C
|
and cl, 0x0C
|
||||||
or cl, al
|
or cl, al
|
||||||
mov al, 0x51
|
mov al, 0x51
|
||||||
out dx, al
|
out dx, al
|
||||||
inc dx
|
inc dx
|
||||||
mov al, cl
|
mov al, cl
|
||||||
out dx, al
|
out dx, al
|
||||||
dec dx
|
dec dx
|
||||||
mov al, 0x38
|
mov al, 0x38
|
||||||
out dx, al
|
out dx, al
|
||||||
inc dx
|
inc dx
|
||||||
xor al, al
|
xor al, al
|
||||||
out dx, al
|
out dx, al
|
||||||
dec dx
|
dec dx
|
||||||
pop cx
|
pop cx
|
||||||
pop dx
|
pop dx
|
||||||
pop ax
|
pop ax
|
||||||
retsb:
|
retsb:
|
||||||
popfd
|
popfd
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ vesa12_drawbar:
|
|||||||
push ebx
|
push ebx
|
||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
mov ecx,[0x3010]
|
mov ecx,[TASK_BASE]
|
||||||
add eax,[ecx-twdw+WDATA.box.left]
|
add eax,[ecx-twdw+WDATA.box.left]
|
||||||
add ebx,[ecx-twdw+WDATA.box.top]
|
add ebx,[ecx-twdw+WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
@ -402,17 +402,17 @@ vesa12_drawbar:
|
|||||||
|
|
||||||
push eax
|
push eax
|
||||||
push ecx
|
push ecx
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.left]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.top]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
|
||||||
cmp ecx,[0xfe00]
|
cmp ecx,[0xfe00]
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
|
||||||
cmp ecx,[0xfe04]
|
cmp ecx,[0xfe04]
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -462,7 +462,7 @@ dbpi24bit12:
|
|||||||
mov ebx,3
|
mov ebx,3
|
||||||
div ebx
|
div ebx
|
||||||
add eax,WinMapAddress
|
add eax,WinMapAddress
|
||||||
mov ebx,[0x3000]
|
mov ebx,[CURRENT_TASK]
|
||||||
cld
|
cld
|
||||||
|
|
||||||
dbnp2412:
|
dbnp2412:
|
||||||
@ -553,7 +553,7 @@ dbpi24bit12:
|
|||||||
sub eax,[0xfe80]
|
sub eax,[0xfe80]
|
||||||
shr eax,2
|
shr eax,2
|
||||||
add eax,WinMapAddress
|
add eax,WinMapAddress
|
||||||
mov ebx,[0x3000]
|
mov ebx,[CURRENT_TASK]
|
||||||
cld
|
cld
|
||||||
|
|
||||||
dbnp3212:
|
dbnp3212:
|
||||||
@ -731,7 +731,7 @@ vesa12_putimage:
|
|||||||
push edx
|
push edx
|
||||||
movzx eax,word [esp+2]
|
movzx eax,word [esp+2]
|
||||||
movzx ebx,word [esp+0]
|
movzx ebx,word [esp+0]
|
||||||
mov ecx,[0x3010]
|
mov ecx,[TASK_BASE]
|
||||||
add eax,[ecx-twdw+WDATA.box.left]
|
add eax,[ecx-twdw+WDATA.box.left]
|
||||||
add ebx,[ecx-twdw+WDATA.box.top]
|
add ebx,[ecx-twdw+WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
@ -760,15 +760,15 @@ vesa12_putimage:
|
|||||||
; check limits while draw ?
|
; check limits while draw ?
|
||||||
|
|
||||||
push ecx
|
push ecx
|
||||||
mov eax,[0x3010]
|
mov eax,[TASK_BASE]
|
||||||
cmp dword [eax+draw_data-0x3000+RECT.left], 0
|
cmp dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
cmp dword [eax+draw_data-0x3000+RECT.top], 0
|
cmp dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
|
||||||
cmp ecx,[0xfe00]
|
cmp ecx,[0xfe00]
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
mov ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
|
||||||
cmp ecx,[0xfe04]
|
cmp ecx,[0xfe04]
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -798,7 +798,7 @@ vesa12_putimage:
|
|||||||
mov ebx,3
|
mov ebx,3
|
||||||
div ebx
|
div ebx
|
||||||
add edx,WinMapAddress
|
add edx,WinMapAddress
|
||||||
mov ebx,[0x3000]
|
mov ebx,[CURRENT_TASK]
|
||||||
mov bh,[esp+4*3]
|
mov bh,[esp+4*3]
|
||||||
|
|
||||||
np2412:
|
np2412:
|
||||||
@ -867,7 +867,7 @@ vesa12_putimage:
|
|||||||
sub edx,[0xfe80]
|
sub edx,[0xfe80]
|
||||||
shr edx,2
|
shr edx,2
|
||||||
add edx,WinMapAddress
|
add edx,WinMapAddress
|
||||||
mov ebx,[0x3000]
|
mov ebx,[CURRENT_TASK]
|
||||||
mov bh,[esp+4*3]
|
mov bh,[esp+4*3]
|
||||||
|
|
||||||
np3212:
|
np3212:
|
||||||
|
@ -122,7 +122,7 @@ vesa20_putimage:
|
|||||||
mov [putimg.image_cy], edx
|
mov [putimg.image_cy], edx
|
||||||
|
|
||||||
; calculate absolute (i.e. screen) coordinates
|
; calculate absolute (i.e. screen) coordinates
|
||||||
mov eax, [0x3010]
|
mov eax, [TASK_BASE]
|
||||||
mov ebx, [eax-twdw + WDATA.box.left]
|
mov ebx, [eax-twdw + WDATA.box.left]
|
||||||
add ebx, [putimg.image_cx]
|
add ebx, [putimg.image_cx]
|
||||||
mov [putimg.abs_cx], ebx
|
mov [putimg.abs_cx], ebx
|
||||||
@ -211,7 +211,7 @@ vesa20_putimage:
|
|||||||
xchg eax, ebp
|
xchg eax, ebp
|
||||||
|
|
||||||
; get process number
|
; get process number
|
||||||
mov ebx, [0x3000]
|
mov ebx, [CURRENT_TASK]
|
||||||
|
|
||||||
cmp byte [ScreenBPP], 32
|
cmp byte [ScreenBPP], 32
|
||||||
je put_image_end_32
|
je put_image_end_32
|
||||||
@ -294,7 +294,7 @@ put_image_end_32:
|
|||||||
.finish:
|
.finish:
|
||||||
add esp, putimg.stack_data
|
add esp, putimg.stack_data
|
||||||
popad
|
popad
|
||||||
call VGA__putimage
|
call VGA__putimage
|
||||||
mov [EGA_counter],1
|
mov [EGA_counter],1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -601,7 +601,7 @@ align 4
|
|||||||
; edx ye
|
; edx ye
|
||||||
; edi color
|
; edi color
|
||||||
vesa20_drawbar:
|
vesa20_drawbar:
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
call [disable_mouse]
|
call [disable_mouse]
|
||||||
|
|
||||||
@ -619,7 +619,7 @@ vesa20_drawbar:
|
|||||||
mov [drbar.bar_cx], eax
|
mov [drbar.bar_cx], eax
|
||||||
mov [drbar.bar_cy], ebx
|
mov [drbar.bar_cy], ebx
|
||||||
|
|
||||||
mov edi, [0x3010]
|
mov edi, [TASK_BASE]
|
||||||
add eax, [edi-twdw + WDATA.box.left] ; win_cx
|
add eax, [edi-twdw + WDATA.box.left] ; win_cx
|
||||||
add ebx, [edi-twdw + WDATA.box.top] ; win_cy
|
add ebx, [edi-twdw + WDATA.box.top] ; win_cy
|
||||||
mov [drbar.abs_cx], eax
|
mov [drbar.abs_cx], eax
|
||||||
@ -638,7 +638,7 @@ vesa20_drawbar:
|
|||||||
popad
|
popad
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
inc eax
|
inc eax
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
cmp ebx, [drbar.bar_sx]
|
cmp ebx, [drbar.bar_sx]
|
||||||
@ -658,7 +658,7 @@ vesa20_drawbar:
|
|||||||
popad
|
popad
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
inc eax
|
inc eax
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
cmp ebx, [drbar.bar_sy]
|
cmp ebx, [drbar.bar_sy]
|
||||||
@ -701,7 +701,7 @@ vesa20_drawbar:
|
|||||||
xchg eax, ebp
|
xchg eax, ebp
|
||||||
|
|
||||||
; get process number
|
; get process number
|
||||||
mov ebx, [0x3000]
|
mov ebx, [CURRENT_TASK]
|
||||||
|
|
||||||
cmp byte [ScreenBPP], 24
|
cmp byte [ScreenBPP], 24
|
||||||
jne draw_bar_end_32
|
jne draw_bar_end_32
|
||||||
@ -1045,109 +1045,109 @@ vesa20_drawbackground_stretch:
|
|||||||
call calculate_edi
|
call calculate_edi
|
||||||
|
|
||||||
|
|
||||||
sdp3: ; MAIN LOOP
|
sdp3: ; MAIN LOOP
|
||||||
cmp [edi+WinMapAddress],byte 1 ; ptrBuffer^<>byte(1)
|
cmp [edi+WinMapAddress],byte 1 ; ptrBuffer^<>byte(1)
|
||||||
jne snbgp
|
jne snbgp
|
||||||
push eax
|
push eax
|
||||||
push ebx
|
push ebx
|
||||||
mov eax,dword [WinMapAddress-8]
|
mov eax,dword [WinMapAddress-8]
|
||||||
imul eax, [esp+4] ;4
|
imul eax, [esp+4] ;4
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,[ScreenWidth]
|
mov ebx,[ScreenWidth]
|
||||||
div ebx
|
div ebx
|
||||||
mov cx,dx
|
mov cx,dx
|
||||||
lea esi,[eax+eax*2]
|
lea esi,[eax+eax*2]
|
||||||
mov eax,dword [WinMapAddress-4]
|
mov eax,dword [WinMapAddress-4]
|
||||||
imul eax, [esp+0] ;0
|
imul eax, [esp+0] ;0
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,[ScreenHeight]
|
mov ebx,[ScreenHeight]
|
||||||
div ebx
|
div ebx
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
mov cx,dx
|
mov cx,dx
|
||||||
imul eax, [esp+8] ;8
|
imul eax, [esp+8] ;8
|
||||||
add esi,eax
|
add esi,eax
|
||||||
mov eax,[esi+0x300000]
|
mov eax,[esi+0x300000]
|
||||||
push eax
|
push eax
|
||||||
ror ecx,16
|
ror ecx,16
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,cx
|
mov ax,cx
|
||||||
shl eax,1 ; óìíîæåíèå íà 2
|
shl eax,1 ; óìíîæåíèå íà 2
|
||||||
lea eax,[eax+eax*4] ; óìíîæåíèå íà 5
|
lea eax,[eax+eax*4] ; óìíîæåíèå íà 5
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,[ScreenWidth]
|
mov ebx,[ScreenWidth]
|
||||||
div ebx
|
div ebx
|
||||||
cmp eax,5
|
cmp eax,5
|
||||||
pop eax
|
pop eax
|
||||||
jb @f
|
jb @f
|
||||||
mov ebx,[esi+0x300000+3]
|
mov ebx,[esi+0x300000+3]
|
||||||
call overlapping_of_points
|
call overlapping_of_points
|
||||||
@@:
|
@@:
|
||||||
push eax
|
push eax
|
||||||
ror ecx,16
|
ror ecx,16
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ax,cx
|
mov ax,cx
|
||||||
shl eax,1 ; óìíîæåíèå íà 2
|
shl eax,1 ; óìíîæåíèå íà 2
|
||||||
lea eax,[eax+eax*4] ; óìíîæåíèå íà
|
lea eax,[eax+eax*4] ; óìíîæåíèå íà
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov ebx,[ScreenHeight]
|
mov ebx,[ScreenHeight]
|
||||||
div ebx
|
div ebx
|
||||||
cmp eax,5
|
cmp eax,5
|
||||||
pop eax
|
pop eax
|
||||||
jb @f
|
jb @f
|
||||||
mov ebx,[display_data-8]
|
mov ebx,[display_data-8]
|
||||||
shl ebx,1
|
shl ebx,1
|
||||||
add ebx,[display_data-8]
|
add ebx,[display_data-8]
|
||||||
add ebx,0x300000
|
add ebx,0x300000
|
||||||
add ebx,esi
|
add ebx,esi
|
||||||
mov ebx,[ebx]
|
mov ebx,[ebx]
|
||||||
call overlapping_of_points
|
call overlapping_of_points
|
||||||
@@:
|
@@:
|
||||||
and eax,0xffffff
|
and eax,0xffffff
|
||||||
xchg edi, ebp
|
xchg edi, ebp
|
||||||
stosw
|
stosw
|
||||||
shr eax,16
|
shr eax,16
|
||||||
stosb
|
stosb
|
||||||
xchg ebp, edi ; ebp+=3
|
xchg ebp, edi ; ebp+=3
|
||||||
cmp [ScreenBPP],byte 24 ; 24 or 32 bpp ? - x size
|
cmp [ScreenBPP],byte 24 ; 24 or 32 bpp ? - x size
|
||||||
jz @f
|
jz @f
|
||||||
inc ebp ; +1
|
inc ebp ; +1
|
||||||
@@:
|
@@:
|
||||||
pop ebx
|
pop ebx
|
||||||
pop eax
|
pop eax
|
||||||
jmp shook1
|
jmp shook1
|
||||||
|
|
||||||
overlapping_of_points:
|
overlapping_of_points:
|
||||||
push ecx edi
|
push ecx edi
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,cl
|
mov al,cl
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,dl
|
mov bl,dl
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
rcr eax,1
|
rcr eax,1
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
mov di,ax
|
mov di,ax
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,ch
|
mov al,ch
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,dh
|
mov bl,dh
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
rcr eax,1
|
rcr eax,1
|
||||||
ror edi,8
|
ror edi,8
|
||||||
add edi,eax
|
add edi,eax
|
||||||
ror ecx,8
|
ror ecx,8
|
||||||
ror edx,8
|
ror edx,8
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,ch
|
mov al,ch
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,dh
|
mov bl,dh
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
rcr eax,1
|
rcr eax,1
|
||||||
ror edi,8
|
ror edi,8
|
||||||
add eax,edi
|
add eax,edi
|
||||||
ror eax,16
|
ror eax,16
|
||||||
pop edi ecx
|
pop edi ecx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
snbgp:
|
snbgp:
|
||||||
|
@ -53,8 +53,8 @@ paletteVGA:
|
|||||||
add ah,1
|
add ah,1
|
||||||
loop palvganew
|
loop palvganew
|
||||||
; mov dx, 3ceh
|
; mov dx, 3ceh
|
||||||
; mov ax, 0005h
|
; mov ax, 0005h
|
||||||
; out dx, ax
|
; out dx, ax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
palette320x200:
|
palette320x200:
|
||||||
@ -114,7 +114,7 @@ uglobal
|
|||||||
novesachecksum dd 0x0
|
novesachecksum dd 0x0
|
||||||
EGA_counter db 0
|
EGA_counter db 0
|
||||||
VGA_drawing_screen db 0
|
VGA_drawing_screen db 0
|
||||||
VGA_8_pixels:
|
VGA_8_pixels:
|
||||||
rb 16
|
rb 16
|
||||||
temp:
|
temp:
|
||||||
.cx dd 0
|
.cx dd 0
|
||||||
@ -196,7 +196,7 @@ checkVga_N13:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
VGA_drawbackground:
|
VGA_drawbackground:
|
||||||
; draw all
|
; draw all
|
||||||
cmp [0xfe0c],dword 0x12
|
cmp [0xfe0c],dword 0x12
|
||||||
jne .end
|
jne .end
|
||||||
pushad
|
pushad
|
||||||
@ -206,7 +206,7 @@ VGA_drawbackground:
|
|||||||
mov edx,480
|
mov edx,480
|
||||||
@@:
|
@@:
|
||||||
push ebx edx esi edi
|
push ebx edx esi edi
|
||||||
shl edx,9
|
shl edx,9
|
||||||
lea edx,[edx+edx*4]
|
lea edx,[edx+edx*4]
|
||||||
add esi,edx
|
add esi,edx
|
||||||
shr edx,5
|
shr edx,5
|
||||||
@ -224,7 +224,7 @@ VGA_draw_long_line:
|
|||||||
mov dx,3ceh
|
mov dx,3ceh
|
||||||
mov ax,0ff08h
|
mov ax,0ff08h
|
||||||
cli
|
cli
|
||||||
out dx, ax
|
out dx, ax
|
||||||
mov ax,0005h
|
mov ax,0005h
|
||||||
out dx, ax
|
out dx, ax
|
||||||
m12pix:
|
m12pix:
|
||||||
@ -318,7 +318,7 @@ VGA_putpixel:
|
|||||||
; ebx = y
|
; ebx = y
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov eax, [esp+32-8+4] ; color
|
mov eax, [esp+32-8+4] ; color
|
||||||
shl ebx,9
|
shl ebx,9
|
||||||
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5
|
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5
|
||||||
lea edx, [ebx+ecx*4] ; + x*BytesPerPixel (Vesa2.0 32)
|
lea edx, [ebx+ecx*4] ; + x*BytesPerPixel (Vesa2.0 32)
|
||||||
mov edi,edx
|
mov edi,edx
|
||||||
@ -346,7 +346,7 @@ VGA_putpixel:
|
|||||||
cmp ah,170
|
cmp ah,170
|
||||||
jbe .p13red
|
jbe .p13red
|
||||||
or dl,0x08
|
or dl,0x08
|
||||||
.p13red:
|
.p13red:
|
||||||
shr eax,8
|
shr eax,8
|
||||||
cmp ah,85
|
cmp ah,85
|
||||||
jbe .p13cont
|
jbe .p13cont
|
||||||
@ -369,7 +369,7 @@ VGA_putpixel:
|
|||||||
popfd
|
popfd
|
||||||
;.end:
|
;.end:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
VGA__putimage:
|
VGA__putimage:
|
||||||
; ecx = size [x|y]
|
; ecx = size [x|y]
|
||||||
; edx = coordinates [x|y]
|
; edx = coordinates [x|y]
|
||||||
@ -409,12 +409,12 @@ VGA_draw_bar:
|
|||||||
|
|
||||||
VGA_draw_bar_1:
|
VGA_draw_bar_1:
|
||||||
mov [temp.cx],eax
|
mov [temp.cx],eax
|
||||||
mov eax, [0x3010]
|
mov eax, [TASK_BASE]
|
||||||
add ebx, [eax-twdw + 4]
|
add ebx, [eax-twdw + 4]
|
||||||
mov eax, [eax-twdw + 0]
|
mov eax, [eax-twdw + 0]
|
||||||
add eax, [temp.cx]
|
add eax, [temp.cx]
|
||||||
and eax,0xfff8
|
and eax,0xfff8
|
||||||
shl ebx,9
|
shl ebx,9
|
||||||
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5
|
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5
|
||||||
lea ebx, [ebx+eax*4] ; + x*BytesPerPixel (Vesa2.0 32)
|
lea ebx, [ebx+eax*4] ; + x*BytesPerPixel (Vesa2.0 32)
|
||||||
mov esi,ebx
|
mov esi,ebx
|
||||||
@ -434,7 +434,7 @@ VGA_draw_bar_1:
|
|||||||
|
|
||||||
VGA_draw_long_line_1:
|
VGA_draw_long_line_1:
|
||||||
push ebx edx esi edi
|
push ebx edx esi edi
|
||||||
shl edx,9
|
shl edx,9
|
||||||
lea edx,[edx+edx*4]
|
lea edx,[edx+edx*4]
|
||||||
add esi,edx
|
add esi,edx
|
||||||
shr edx,5
|
shr edx,5
|
||||||
|
Loading…
Reference in New Issue
Block a user