forked from KolibriOS/kolibrios
Introduced APPDATA, TASKDATA, WNDDATA, RECT, BOX structures.
git-svn-id: svn://kolibrios.org@115 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
9a27b206b3
commit
3e2bc5b35f
@ -19,7 +19,7 @@ sys_cd_audio:
|
|||||||
cmp eax,2
|
cmp eax,2
|
||||||
jnz nocdtl
|
jnz nocdtl
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
call sys_cdtracklist
|
call sys_cdtracklist
|
||||||
ret
|
ret
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
; Àäàïòàöèÿ è äîðàáîòêà Mario79
|
; Àäàïòàöèÿ è äîðàáîòêà Mario79
|
||||||
|
|
||||||
give_back_application_data: ; ïåðåñëàòü ïðèëîæåíèþ
|
give_back_application_data: ; ïåðåñëàòü ïðèëîæåíèþ
|
||||||
mov edi,[3010h]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+10h]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ecx
|
add edi,ecx
|
||||||
give_back_application_data_1:
|
give_back_application_data_1:
|
||||||
mov esi,0xD000 ;FDD_DataBuffer ;0x40000
|
mov esi,0xD000 ;FDD_DataBuffer ;0x40000
|
||||||
@ -17,8 +17,8 @@ give_back_application_data_1:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
take_data_from_application: ; âçÿòü èç ïðèëîæåíèÿ
|
take_data_from_application: ; âçÿòü èç ïðèëîæåíèÿ
|
||||||
mov esi,[3010h]
|
mov esi,[0x3010]
|
||||||
mov esi,[esi+10h]
|
mov esi,[esi+TASKDATA.mem_start]
|
||||||
add esi,ecx
|
add esi,ecx
|
||||||
take_data_from_application_1:
|
take_data_from_application_1:
|
||||||
mov edi,0xD000 ;FDD_DataBuffer ;0x40000
|
mov edi,0xD000 ;FDD_DataBuffer ;0x40000
|
||||||
|
@ -11,8 +11,8 @@ sysfn_saveramdisk: ; 18.6 = SAVE FLOPPY IMAGE (HD version only)
|
|||||||
img_save_hd_2:
|
img_save_hd_2:
|
||||||
cmp ebx,3
|
cmp ebx,3
|
||||||
jnz exit_for_anyone
|
jnz exit_for_anyone
|
||||||
mov edx,[3010h]
|
mov edx,[0x3010]
|
||||||
mov edx,[edx+10h]
|
mov edx,[edx+TASKDATA.mem_start]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
img_save_hd_3:
|
img_save_hd_3:
|
||||||
call reserve_hd1
|
call reserve_hd1
|
||||||
|
@ -21,7 +21,7 @@ debug_set_event_data:
|
|||||||
; destroys eax
|
; destroys eax
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov [eax+0x80000+0xBC], ebx
|
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
get_debuggee_slot:
|
get_debuggee_slot:
|
||||||
@ -37,7 +37,7 @@ get_debuggee_slot:
|
|||||||
shl eax, 5
|
shl eax, 5
|
||||||
push ebx
|
push ebx
|
||||||
mov ebx, [0x3000]
|
mov ebx, [0x3000]
|
||||||
cmp [0x80000+eax*8+0xAC], ebx
|
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
|
||||||
pop ebx
|
pop ebx
|
||||||
jnz .ret_bad
|
jnz .ret_bad
|
||||||
; clc ; automatically
|
; clc ; automatically
|
||||||
@ -51,7 +51,7 @@ debug_detach:
|
|||||||
; destroys eax,ebx
|
; destroys eax,ebx
|
||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .ret
|
jc .ret
|
||||||
and dword [eax*8+0x80000+0xAC], 0
|
and dword [eax*8+0x80000+APPDATA.debugger_slot], 0
|
||||||
call do_resume
|
call do_resume
|
||||||
.ret:
|
.ret:
|
||||||
sti
|
sti
|
||||||
@ -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+0xA] ; process state
|
mov bl, [0x3000+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+0xA], bl
|
.2: mov [0x3000+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+0xA]
|
mov bl, [0x3000+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+0xA], bl
|
.2: mov [0x3000+eax+TASKDATA.state], bl
|
||||||
.ret: ret
|
.ret: ret
|
||||||
.1: dec ebx
|
.1: dec ebx
|
||||||
jmp .2
|
jmp .2
|
||||||
@ -227,7 +227,7 @@ debug_set_drx:
|
|||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .errret
|
jc .errret
|
||||||
mov ebp, eax
|
mov ebp, eax
|
||||||
lea eax, [eax*8+0x80000+0xC0]
|
lea eax, [eax*8+0x80000+APPDATA.dbg_regs]
|
||||||
; [eax]=dr0, [eax+4]=dr1, [eax+8]=dr2, [eax+C]=dr3
|
; [eax]=dr0, [eax+4]=dr1, [eax+8]=dr2, [eax+C]=dr3
|
||||||
; [eax+10]=dr7
|
; [eax+10]=dr7
|
||||||
add edx, std_application_base_address
|
add edx, std_application_base_address
|
||||||
@ -358,7 +358,7 @@ debugger_notify:
|
|||||||
.1:
|
.1:
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov edx, [0x80000+eax+0xBC]
|
mov edx, [0x80000+eax+APPDATA.dbg_event_mem]
|
||||||
test edx, edx
|
test edx, edx
|
||||||
jz .ret
|
jz .ret
|
||||||
; read buffer header
|
; read buffer header
|
||||||
@ -414,7 +414,7 @@ debugger_notify:
|
|||||||
; new debug event
|
; new debug event
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
or byte [0x80000+eax+0xA8+1], 1 ; set flag 100h
|
or byte [0x80000+eax+APPDATA.event_mask+1], 1 ; set flag 100h
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ debug_exc:
|
|||||||
; set DRx registers for task and continue
|
; set DRx registers for task and continue
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, 0x80000+0xC0
|
add eax, 0x80000+APPDATA.dbg_regs
|
||||||
mov ecx, [eax+0]
|
mov ecx, [eax+0]
|
||||||
mov dr0, ecx
|
mov dr0, ecx
|
||||||
mov ecx, [eax+4]
|
mov ecx, [eax+4]
|
||||||
@ -455,7 +455,7 @@ debug_exc:
|
|||||||
cli
|
cli
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+0xAC]
|
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .debug
|
jnz .debug
|
||||||
sti
|
sti
|
||||||
@ -464,7 +464,7 @@ debug_exc:
|
|||||||
mov [error_interrupt], 1
|
mov [error_interrupt], 1
|
||||||
call show_error_parameters
|
call show_error_parameters
|
||||||
mov edx, [0x3010]
|
mov edx, [0x3010]
|
||||||
mov byte [edx+0xA], 4
|
mov byte [edx+TASKDATA.state], 4
|
||||||
jmp change_task
|
jmp change_task
|
||||||
.debug:
|
.debug:
|
||||||
; we are debugged process, notify debugger and suspend ourself
|
; we are debugged process, notify debugger and suspend ourself
|
||||||
@ -484,7 +484,7 @@ debug_exc:
|
|||||||
jnz .l1
|
jnz .l1
|
||||||
push edx ; DR6 image
|
push edx ; DR6 image
|
||||||
mov ecx, [0x3010]
|
mov ecx, [0x3010]
|
||||||
push dword [ecx+4] ; PID
|
push dword [ecx+TASKDATA.pid] ; PID
|
||||||
push 12
|
push 12
|
||||||
pop ecx
|
pop ecx
|
||||||
push 3 ; 3 = debug exception
|
push 3 ; 3 = debug exception
|
||||||
@ -493,7 +493,7 @@ debug_exc:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
mov edx, [0x3010]
|
mov edx, [0x3010]
|
||||||
mov byte [edx+0xA], 1 ; suspended
|
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||||
call change_task
|
call change_task
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iretd
|
iretd
|
||||||
|
@ -188,7 +188,7 @@ create_app_cr3_table:
|
|||||||
mov eax,[general_page_table]
|
mov eax,[general_page_table]
|
||||||
call simple_clone_cr3_table ;clone general page table
|
call simple_clone_cr3_table ;clone general page table
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
mov [second_base_address+0x80000+ebx+0xB8],eax ;save address of page directory
|
mov [second_base_address+0x80000+ebx+APPDATA.dir_table],eax ;save address of page directory
|
||||||
|
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
@ -199,7 +199,7 @@ get_cr3_table:
|
|||||||
;result:
|
;result:
|
||||||
; eax - physical address of page directory
|
; eax - physical address of page directory
|
||||||
shl eax,8 ;size of process extended information=256 bytes
|
shl eax,8 ;size of process extended information=256 bytes
|
||||||
mov eax,[second_base_address+0x80000+eax+0xB8]
|
mov eax,[second_base_address+0x80000+eax+APPDATA.dir_table]
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
dispose_app_cr3_table:
|
dispose_app_cr3_table:
|
||||||
@ -213,7 +213,7 @@ dispose_app_cr3_table:
|
|||||||
mov ebp,eax
|
mov ebp,eax
|
||||||
;ebp = process slot in the procedure.
|
;ebp = process slot in the procedure.
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[second_base_address+0x80000+eax+0xB8]
|
mov eax,[second_base_address+0x80000+eax+APPDATA.dir_table]
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
;ebx = physical address of page directory
|
;ebx = physical address of page directory
|
||||||
call MEM_Get_Linear_Address
|
call MEM_Get_Linear_Address
|
||||||
@ -234,10 +234,10 @@ dispose_app_cr3_table:
|
|||||||
;eax = current slot of process
|
;eax = current slot of process
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
shl ecx,5
|
shl ecx,5
|
||||||
cmp byte [second_base_address+0x3000+ecx+0xa],9 ;if process running?
|
cmp byte [second_base_address+0x3000+ecx+TASKDATA.state],9 ;if process running?
|
||||||
jz .next ;skip empty slots
|
jz .next ;skip empty slots
|
||||||
shl ecx,3
|
shl ecx,3
|
||||||
cmp [second_base_address+0x80000+ecx+0xB8],ebx ;compare page directory addresses
|
cmp [second_base_address+0x80000+ecx+APPDATA.dir_table],ebx ;compare page directory addresses
|
||||||
jnz .next
|
jnz .next
|
||||||
inc edx ;thread found
|
inc edx ;thread found
|
||||||
.next:
|
.next:
|
||||||
|
@ -33,7 +33,7 @@ find_new_process_place:
|
|||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jz .endnewprocessplace ;empty slot after high boundary
|
jz .endnewprocessplace ;empty slot after high boundary
|
||||||
add eax,0x20
|
add eax,0x20
|
||||||
cmp word [eax+0xa],9 ;check process state, 9 means that process slot is empty
|
cmp word [eax+TASKDATA.state],9 ;check process state, 9 means that process slot is empty
|
||||||
jnz .newprocessplace
|
jnz .newprocessplace
|
||||||
.endnewprocessplace:
|
.endnewprocessplace:
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@ -41,7 +41,7 @@ find_new_process_place:
|
|||||||
shr eax,5 ;calculate slot index
|
shr eax,5 ;calculate slot index
|
||||||
cmp eax,256
|
cmp eax,256
|
||||||
jge .failed ;it should be <256
|
jge .failed ;it should be <256
|
||||||
mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary)
|
mov word [ebx+TASKDATA.state],9 ;set process state to 9 (for slot after hight boundary)
|
||||||
mov [new_process_place],eax ;save process slot
|
mov [new_process_place],eax ;save process slot
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
@ -113,7 +113,7 @@ new_start_application_floppy:
|
|||||||
; mov eax,[esp] ;eax - pointer to file name
|
; mov eax,[esp] ;eax - pointer to file name
|
||||||
mov ebx,[new_process_place]
|
mov ebx,[new_process_place]
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
add ebx,0x80000
|
add ebx,0x80000 + APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
call memmove
|
call memmove
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ new_start_application_floppy:
|
|||||||
;so free directory entry
|
;so free directory entry
|
||||||
mov eax,[new_process_place]
|
mov eax,[new_process_place]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[0x80000+eax+0xB8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
call MEM_Free_Page
|
call MEM_Free_Page
|
||||||
.cleanfailed_mem:
|
.cleanfailed_mem:
|
||||||
;there is no mem for directory entry, display message.
|
;there is no mem for directory entry, display message.
|
||||||
@ -219,7 +219,7 @@ new_start_application_floppy:
|
|||||||
;this avoid problems with panel application.
|
;this avoid problems with panel application.
|
||||||
mov edi,[new_process_place]
|
mov edi,[new_process_place]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000 + APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
mov eax,' '
|
mov eax,' '
|
||||||
cld
|
cld
|
||||||
@ -280,7 +280,7 @@ new_start_application_fl:
|
|||||||
mov eax,[esp] ;eax - pointer to file name
|
mov eax,[esp] ;eax - pointer to file name
|
||||||
mov ebx,[new_process_place]
|
mov ebx,[new_process_place]
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
add ebx,0x80000
|
add ebx,0x80000 + APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
call memmove
|
call memmove
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ new_start_application_fl:
|
|||||||
;so free directory entry
|
;so free directory entry
|
||||||
mov eax,[new_process_place]
|
mov eax,[new_process_place]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[0x80000+eax+0xB8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
call MEM_Free_Page
|
call MEM_Free_Page
|
||||||
.cleanfailed_mem:
|
.cleanfailed_mem:
|
||||||
;there is no mem for directory entry, display message.
|
;there is no mem for directory entry, display message.
|
||||||
@ -383,7 +383,7 @@ new_start_application_fl:
|
|||||||
;this avoid problems with panel application.
|
;this avoid problems with panel application.
|
||||||
mov edi,[new_process_place]
|
mov edi,[new_process_place]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000+APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
mov eax,' '
|
mov eax,' '
|
||||||
cld
|
cld
|
||||||
@ -417,13 +417,13 @@ new_start_application_fl:
|
|||||||
;(size of application memory)
|
;(size of application memory)
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
mov eax,[app_mem]
|
mov eax,[app_mem]
|
||||||
mov [second_base_address+0x80000+0x8c+ebx],eax
|
mov [second_base_address+0x80000+APPDATA.mem_size+ebx],eax
|
||||||
;set 0x10 field of information about process
|
;set 0x10 field of information about process
|
||||||
;(application base address)
|
;(application base address)
|
||||||
; mov ebx,[new_process_place]
|
; mov ebx,[new_process_place]
|
||||||
; shl ebx,5
|
; shl ebx,5
|
||||||
shr ebx,3
|
shr ebx,3
|
||||||
mov dword [second_base_address+0x3000+ebx+0x10],std_application_base_address
|
mov dword [second_base_address+0x3000+ebx+TASKDATA.mem_start],std_application_base_address
|
||||||
|
|
||||||
;add command line parameters
|
;add command line parameters
|
||||||
.add_command_line:
|
.add_command_line:
|
||||||
@ -466,29 +466,29 @@ new_start_application_fl:
|
|||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,0x3000 ;ebx - pointer to information about process
|
add ebx,0x3000 ;ebx - pointer to information about process
|
||||||
mov [ebx+0xe],al ;set window number on screen = process slot
|
mov [ebx+TASKDATA.wnd_number],al ;set window number on screen = process slot
|
||||||
|
|
||||||
mov [ebx],dword 1+2+4 ;set default event flags (see 40 function)
|
mov [ebx+TASKDATA.event_mask],dword 1+2+4 ;set default event flags (see 40 function)
|
||||||
|
|
||||||
inc dword [process_number]
|
inc dword [process_number]
|
||||||
mov eax,[process_number]
|
mov eax,[process_number]
|
||||||
mov [ebx+4],eax ;set PID
|
mov [ebx+TASKDATA.pid],eax ;set PID
|
||||||
|
|
||||||
mov ecx,ebx
|
mov ecx,ebx
|
||||||
add ecx,draw_data-0x3000 ;ecx - pointer to draw data
|
add ecx,draw_data-0x3000 ;ecx - pointer to draw data
|
||||||
;set draw data to full screen
|
;set draw data to full screen
|
||||||
mov [ecx+0],dword 0
|
mov [ecx+RECT.left],dword 0
|
||||||
mov [ecx+4],dword 0
|
mov [ecx+RECT.top],dword 0
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
mov [ecx+8],eax
|
mov [ecx+RECT.right],eax
|
||||||
mov eax,[0xfe04]
|
mov eax,[0xfe04]
|
||||||
mov [ecx+12],eax
|
mov [ecx+RECT.bottom],eax
|
||||||
;set window state to 'normal' (non-minimized/maximized/rolled-up) state
|
;set window state to 'normal' (non-minimized/maximized/rolled-up) state
|
||||||
mov [ecx+WDATA.fl_wstate],WSTATE_NORMAL
|
mov [ecx+WDATA.fl_wstate],WSTATE_NORMAL
|
||||||
;set cr3 register in TSS of application
|
;set cr3 register in TSS of application
|
||||||
mov ecx,[new_process_place]
|
mov ecx,[new_process_place]
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
mov eax,[0x800B8+ecx]
|
mov eax,[0x80000+APPDATA.dir_table+ecx]
|
||||||
add eax,8+16 ;add flags
|
add eax,8+16 ;add flags
|
||||||
mov [l.cr3],eax
|
mov [l.cr3],eax
|
||||||
|
|
||||||
@ -566,12 +566,12 @@ new_start_application_fl:
|
|||||||
; set if debuggee
|
; set if debuggee
|
||||||
test byte [esp+28], 1
|
test byte [esp+28], 1
|
||||||
jz .no_debug
|
jz .no_debug
|
||||||
mov [0x3000+ebx+0xa], byte 1 ; set process state - suspended
|
mov [0x3000+ebx+TASKDATA.state], 1 ; set process state - suspended
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
mov [0x80000+ebx*8+0xac], eax ;set debugger PID - current
|
mov [0x80000+ebx*8+APPDATA.debugger_slot], eax ;set debugger PID - current
|
||||||
jmp .debug
|
jmp .debug
|
||||||
.no_debug:
|
.no_debug:
|
||||||
mov [0x3000+ebx+0xa], byte 0 ; set process state - running
|
mov [0x3000+ebx+TASKDATA.state], 0 ; set process state - running
|
||||||
.debug:
|
.debug:
|
||||||
|
|
||||||
mov esi,new_process_running
|
mov esi,new_process_running
|
||||||
@ -622,22 +622,22 @@ new_sys_threads:
|
|||||||
|
|
||||||
mov esi,[0x3000]
|
mov esi,[0x3000]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add esi,0x80000
|
add esi,0x80000+APPDATA.app_name
|
||||||
mov ebx,esi ;ebx=esi - pointer to extended information about current thread
|
mov ebx,esi ;ebx=esi - pointer to extended information about current thread
|
||||||
|
|
||||||
mov edi,[new_process_place]
|
mov edi,[new_process_place]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000
|
||||||
mov edx,edi ;edx=edi - pointer to extended infomation about new thread
|
lea edx, [edi+APPDATA.app_name] ;edx=edi - pointer to extended infomation about new thread
|
||||||
mov ecx,256/4
|
mov ecx,256/4
|
||||||
rep stosd ;clean extended information about new thread
|
rep stosd ;clean extended information about new thread
|
||||||
mov edi,edx
|
mov edi,edx
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
rep movsb ;copy process name
|
rep movsb ;copy process name
|
||||||
mov eax,[ebx+0x8c]
|
mov eax,[ebx+APPDATA.mem_size]
|
||||||
mov [app_mem],eax ;set memory size
|
mov [app_mem],eax ;set memory size
|
||||||
mov eax,[ebx+0xb8]
|
mov eax,[ebx+APPDATA.dir_table]
|
||||||
mov [edx+0xb8],eax ;copy page directory
|
mov dword [edx-APPDATA.app_name+APPDATA.dir_table],eax ;copy page directory
|
||||||
; mov eax,[new_process_place]
|
; mov eax,[new_process_place]
|
||||||
; mov ebx,[0x3000]
|
; mov ebx,[0x3000]
|
||||||
; call addreference_app_cr3_table
|
; call addreference_app_cr3_table
|
||||||
@ -669,10 +669,10 @@ new_mem_resize:
|
|||||||
and ebx,not (4096-1) ;round up size
|
and ebx,not (4096-1) ;round up size
|
||||||
mov ecx,[0x3000]
|
mov ecx,[0x3000]
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
mov edx,[0x8008C+ecx]
|
mov edx,[0x80000 + APPDATA.mem_size +ecx]
|
||||||
add edx,4095
|
add edx,4095
|
||||||
and edx,not (4096-1) ;old size
|
and edx,not (4096-1) ;old size
|
||||||
mov eax,[0x800B8+ecx]
|
mov eax,[0x80000 + APPDATA.dir_table+ecx]
|
||||||
call MEM_Get_Linear_Address
|
call MEM_Get_Linear_Address
|
||||||
;eax - linear address of page directory
|
;eax - linear address of page directory
|
||||||
call MEM_Heap_Lock ;guarantee that two threads willn't
|
call MEM_Heap_Lock ;guarantee that two threads willn't
|
||||||
@ -704,10 +704,10 @@ new_mem_resize:
|
|||||||
mov ebx,esi
|
mov ebx,esi
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov [eax+0x8008c],ebx ;write new memory size
|
mov [eax+0x80000 + APPDATA.mem_size],ebx ;write new memory size
|
||||||
;search threads and update
|
;search threads and update
|
||||||
;application memory size infomation
|
;application memory size infomation
|
||||||
mov ecx,[eax+0x800b8]
|
mov ecx,[eax+0x80000 + APPDATA.dir_table]
|
||||||
mov eax,2
|
mov eax,2
|
||||||
|
|
||||||
.search_threads:
|
.search_threads:
|
||||||
@ -718,12 +718,12 @@ new_mem_resize:
|
|||||||
jg .search_threads_end
|
jg .search_threads_end
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
shl edx,5
|
shl edx,5
|
||||||
cmp word [0x3000+edx+0xa],9 ;if slot empty?
|
cmp word [0x3000+edx+TASKDATA.state],9 ;if slot empty?
|
||||||
jz .search_threads_next
|
jz .search_threads_next
|
||||||
shl edx,3
|
shl edx,3
|
||||||
cmp [edx+0x800b8],ecx ;if it is our thread?
|
cmp [edx+0x80000+APPDATA.dir_table],ecx ;if it is our thread?
|
||||||
jnz .search_threads_next
|
jnz .search_threads_next
|
||||||
mov [edx+0x8008c],ebx ;update memory size
|
mov [edx+0x80000+APPDATA.mem_size],ebx ;update memory size
|
||||||
.search_threads_next:
|
.search_threads_next:
|
||||||
inc eax
|
inc eax
|
||||||
jmp .search_threads
|
jmp .search_threads
|
||||||
@ -753,9 +753,9 @@ pid_to_slot:
|
|||||||
.loop:
|
.loop:
|
||||||
;ecx=offset of current process info entry
|
;ecx=offset of current process info entry
|
||||||
;ebx=maximum permitted offset
|
;ebx=maximum permitted offset
|
||||||
cmp byte [second_base_address+0x3000+ecx+0xa],9
|
cmp byte [second_base_address+0x3000+ecx+TASKDATA.state],9
|
||||||
jz .endloop ;skip empty slots
|
jz .endloop ;skip empty slots
|
||||||
cmp [second_base_address+0x3000+ecx+0x4],eax ;check PID
|
cmp [second_base_address+0x3000+ecx+TASKDATA.pid],eax ;check PID
|
||||||
jz .pid_found
|
jz .pid_found
|
||||||
.endloop:
|
.endloop:
|
||||||
add ecx,32
|
add ecx,32
|
||||||
@ -801,7 +801,7 @@ write_process_memory:
|
|||||||
; eax - number of bytes written
|
; eax - number of bytes written
|
||||||
pushad
|
pushad
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[0x80000+eax+0xB8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
call MEM_Get_Linear_Address
|
call MEM_Get_Linear_Address
|
||||||
mov ebp,eax
|
mov ebp,eax
|
||||||
;ebp=linear address of page directory of other process.
|
;ebp=linear address of page directory of other process.
|
||||||
@ -906,7 +906,7 @@ read_process_memory:
|
|||||||
; eax - number of bytes read.
|
; eax - number of bytes read.
|
||||||
pushad
|
pushad
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[0x80000+eax+0xB8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
call MEM_Get_Linear_Address
|
call MEM_Get_Linear_Address
|
||||||
mov ebp,eax
|
mov ebp,eax
|
||||||
add edx,std_application_base_address
|
add edx,std_application_base_address
|
||||||
@ -1009,10 +1009,10 @@ check_process_region:
|
|||||||
test ecx,ecx
|
test ecx,ecx
|
||||||
jle .ok
|
jle .ok
|
||||||
shl eax,5
|
shl eax,5
|
||||||
cmp word [0x3000+eax+0xa],0
|
cmp word [0x3000+eax+TASKDATA.state],0
|
||||||
jnz .failed
|
jnz .failed
|
||||||
shl eax,3
|
shl eax,3
|
||||||
mov eax,[0x80000+eax+0xb8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .failed
|
jz .failed
|
||||||
call MEM_Get_Linear_Address
|
call MEM_Get_Linear_Address
|
||||||
@ -1081,8 +1081,8 @@ new_sys_ipc:
|
|||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000
|
||||||
cli
|
cli
|
||||||
mov [edi+0xA0],ebx ;set fields in extended information area
|
mov [edi+APPDATA.ipc_start],ebx ;set fields in extended information area
|
||||||
mov [edi+0xA4],ecx
|
mov [edi+APPDATA.ipc_size],ecx
|
||||||
sti
|
sti
|
||||||
mov [esp+36],dword 0 ;success
|
mov [esp+36],dword 0 ;success
|
||||||
ret
|
ret
|
||||||
@ -1100,10 +1100,10 @@ new_sys_ipc:
|
|||||||
mov ebp,eax
|
mov ebp,eax
|
||||||
;ebp = slot of other process
|
;ebp = slot of other process
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov edi,[eax+0x80000+0xa0] ;is ipc area defined?
|
mov edi,[eax+0x80000+APPDATA.ipc_start] ;is ipc area defined?
|
||||||
test edi,edi
|
test edi,edi
|
||||||
jz .no_ipc_area
|
jz .no_ipc_area
|
||||||
mov esi,[eax+0x80000+0xa4] ;esi - size of buffer
|
mov esi,[eax+0x80000+APPDATA.ipc_size] ;esi - size of buffer
|
||||||
push dword -1 ;temp variable for read_process_memory
|
push dword -1 ;temp variable for read_process_memory
|
||||||
mov ebx,esp
|
mov ebx,esp
|
||||||
push ecx
|
push ecx
|
||||||
@ -1131,7 +1131,7 @@ new_sys_ipc:
|
|||||||
add edx,esi
|
add edx,esi
|
||||||
sub edx,4 ;move to beginning of place for our message
|
sub edx,4 ;move to beginning of place for our message
|
||||||
mov eax,[second_base_address+0x3010]
|
mov eax,[second_base_address+0x3010]
|
||||||
mov eax,[eax+0x4] ;eax - our PID
|
mov eax,[eax+TASKDATA.pid] ;eax - our PID
|
||||||
mov [esp+8],eax
|
mov [esp+8],eax
|
||||||
mov eax,ebp
|
mov eax,ebp
|
||||||
call write_process_memory ;write PID
|
call write_process_memory ;write PID
|
||||||
@ -1151,7 +1151,7 @@ new_sys_ipc:
|
|||||||
;awake other process
|
;awake other process
|
||||||
shl ebp,8
|
shl ebp,8
|
||||||
mov eax,ebp
|
mov eax,ebp
|
||||||
or [eax+0x800A8],dword 0x40
|
or [eax+0x80000+APPDATA.event_mask],dword 0x40
|
||||||
|
|
||||||
cmp dword [check_idle_semaphore],20
|
cmp dword [check_idle_semaphore],20
|
||||||
jge .ipc_no_cis
|
jge .ipc_no_cis
|
||||||
@ -1237,7 +1237,7 @@ new_start_application_hd:
|
|||||||
lea esi,[eax-11] ;last 11 bytes = application name
|
lea esi,[eax-11] ;last 11 bytes = application name
|
||||||
mov edi,[new_process_place]
|
mov edi,[new_process_place]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000+APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
cld
|
cld
|
||||||
rep movsb ;copy name to extended information about process
|
rep movsb ;copy name to extended information about process
|
||||||
@ -1366,7 +1366,7 @@ new_start_application_hd:
|
|||||||
;so free directory entry
|
;so free directory entry
|
||||||
mov eax,[new_process_place]
|
mov eax,[new_process_place]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov eax,[0x80000+eax+0xB8]
|
mov eax,[0x80000+eax+APPDATA.dir_table]
|
||||||
call MEM_Free_Page
|
call MEM_Free_Page
|
||||||
.cleanfailed_mem:
|
.cleanfailed_mem:
|
||||||
;there is no mem for directory entry, display message.
|
;there is no mem for directory entry, display message.
|
||||||
@ -1378,7 +1378,7 @@ new_start_application_hd:
|
|||||||
;this avoid problems with panel application.
|
;this avoid problems with panel application.
|
||||||
mov edi,[new_process_place]
|
mov edi,[new_process_place]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000+APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
mov eax,' '
|
mov eax,' '
|
||||||
cld
|
cld
|
||||||
@ -1455,7 +1455,7 @@ fs_execute:
|
|||||||
mov ecx, 8 ; 8 chars for name
|
mov ecx, 8 ; 8 chars for name
|
||||||
mov edi, [new_process_place]
|
mov edi, [new_process_place]
|
||||||
shl edi, cl
|
shl edi, cl
|
||||||
add edi, 0x80000
|
add edi, 0x80000+APPDATA.app_name
|
||||||
.copy_process_name_loop:
|
.copy_process_name_loop:
|
||||||
lodsb
|
lodsb
|
||||||
cmp al, '.'
|
cmp al, '.'
|
||||||
@ -1600,7 +1600,7 @@ fs_execute:
|
|||||||
; clean process name, this avoid problems with @panel
|
; clean process name, this avoid problems with @panel
|
||||||
mov edi, [new_process_place]
|
mov edi, [new_process_place]
|
||||||
shl edi, 8
|
shl edi, 8
|
||||||
add edi, 0x80000
|
add edi, 0x80000+APPDATA.app_name
|
||||||
mov ecx, 11
|
mov ecx, 11
|
||||||
mov al, ' '
|
mov al, ' '
|
||||||
rep stosb
|
rep stosb
|
||||||
|
@ -95,7 +95,7 @@ Allocate_Physical_Block:
|
|||||||
mov eax,[esi+physical_mem_block.start]
|
mov eax,[esi+physical_mem_block.start]
|
||||||
mov [esp+28],eax
|
mov [esp+28],eax
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov eax,[eax+0x4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [esi+physical_mem_block.flags],eax
|
mov [esi+physical_mem_block.flags],eax
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -105,7 +105,7 @@ Allocate_Physical_Block:
|
|||||||
mov eax,[esi+physical_mem_block.start]
|
mov eax,[esi+physical_mem_block.start]
|
||||||
mov [esp+28],eax
|
mov [esp+28],eax
|
||||||
mov ecx,[0x3010]
|
mov ecx,[0x3010]
|
||||||
mov ecx,[ecx+0x4]
|
mov ecx,[ecx+TASKDATA.pid]
|
||||||
mov [esi+physical_mem_block.flags],ecx
|
mov [esi+physical_mem_block.flags],ecx
|
||||||
mov ecx,[esi+physical_mem_block.size]
|
mov ecx,[esi+physical_mem_block.size]
|
||||||
mov [esi+physical_mem_block.size],ebx
|
mov [esi+physical_mem_block.size],ebx
|
||||||
|
@ -91,11 +91,11 @@ endg
|
|||||||
|
|
||||||
update_counters:
|
update_counters:
|
||||||
mov edi, [0x3010]
|
mov edi, [0x3010]
|
||||||
mov ebx, [edi+0x18] ; time stamp counter add
|
mov ebx, [edi+TASKDATA.counter_add] ; time stamp counter add
|
||||||
call _rdtsc
|
call _rdtsc
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
add eax, [edi+0x14] ; counter sum
|
add eax, [edi+TASKDATA.counter_sum] ; counter sum
|
||||||
mov [edi+0x14], eax
|
mov [edi+TASKDATA.counter_sum], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ find_next_task:
|
|||||||
add edi,0x20
|
add edi,0x20
|
||||||
inc ebx
|
inc ebx
|
||||||
|
|
||||||
mov al, byte [edi+0xA]
|
mov al, byte [edi+TASKDATA.state]
|
||||||
test al, al
|
test al, al
|
||||||
jz .found
|
jz .found
|
||||||
cmp al, 1
|
cmp al, 1
|
||||||
@ -146,13 +146,13 @@ find_next_task:
|
|||||||
test eax, eax
|
test eax, eax
|
||||||
jz .waiting_for_event
|
jz .waiting_for_event
|
||||||
mov [event_sched], eax
|
mov [event_sched], eax
|
||||||
mov [edi+0xA], byte 0
|
mov [edi+TASKDATA.state], byte 0
|
||||||
.noevents:
|
.noevents:
|
||||||
.found:
|
.found:
|
||||||
mov [0x3000],ebx
|
mov [0x3000],ebx
|
||||||
mov [0x3010],edi
|
mov [0x3010],edi
|
||||||
call _rdtsc
|
call _rdtsc
|
||||||
mov [edi+0x18],eax
|
mov [edi+TASKDATA.counter_add],eax
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
cmp ebx, [prev_slot]
|
cmp ebx, [prev_slot]
|
||||||
@ -181,9 +181,9 @@ updatecputimes:
|
|||||||
mov ecx, [0x3004]
|
mov ecx, [0x3004]
|
||||||
mov edi, 0x3020
|
mov edi, 0x3020
|
||||||
.newupdate:
|
.newupdate:
|
||||||
mov ebx,[edi+0x14]
|
mov ebx,[edi+TASKDATA.counter_sum]
|
||||||
mov [edi+0x1c],ebx
|
mov [edi+TASKDATA.cpu_usage],ebx
|
||||||
mov [edi+0x14],dword 0
|
mov [edi+TASKDATA.counter_sum],dword 0
|
||||||
add edi,0x20
|
add edi,0x20
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .newupdate
|
jnz .newupdate
|
||||||
|
@ -27,7 +27,7 @@ start_wait=$
|
|||||||
ok=$
|
ok=$
|
||||||
push eax
|
push eax
|
||||||
mov eax,dword [0x3010+second_base_address]
|
mov eax,dword [0x3010+second_base_address]
|
||||||
mov eax,[eax+0x4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [name],eax
|
mov [name],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
@ -61,7 +61,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,[0x3010+second_base_address]
|
||||||
mov eax,[eax+0x4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
start_wait=$
|
start_wait=$
|
||||||
cli
|
cli
|
||||||
cmp [name],dword 0
|
cmp [name],dword 0
|
||||||
@ -93,7 +93,7 @@ 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,[0x3000+second_base_address]
|
||||||
mov eax,[eax+0x4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
cmp [name],eax
|
cmp [name],eax
|
||||||
jz ok
|
jz ok
|
||||||
cmp [name],0
|
cmp [name],0
|
||||||
|
@ -228,7 +228,7 @@ exc_c:
|
|||||||
cli
|
cli
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+0xAC]
|
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .debug
|
jnz .debug
|
||||||
sti
|
sti
|
||||||
@ -239,7 +239,7 @@ exc_c:
|
|||||||
call show_error_parameters
|
call show_error_parameters
|
||||||
|
|
||||||
mov edx, [0x3010]
|
mov edx, [0x3010]
|
||||||
mov [edx + 0xA], byte 4
|
mov [edx + TASKDATA.state], byte 4
|
||||||
|
|
||||||
jmp change_task
|
jmp change_task
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ exc_c:
|
|||||||
movzx ecx, bl
|
movzx ecx, bl
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [0x3010]
|
mov ecx, [0x3010]
|
||||||
push dword [ecx+4] ; PID of current process
|
push dword [ecx+TASKDATA.pid] ; PID of current process
|
||||||
push 12
|
push 12
|
||||||
pop ecx
|
pop ecx
|
||||||
push 1 ; 1=exception
|
push 1 ; 1=exception
|
||||||
@ -259,7 +259,7 @@ exc_c:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
mov edx, [0x3010]
|
mov edx, [0x3010]
|
||||||
mov byte [edx+0xA], 1 ; suspended
|
mov byte [edx+TASKDATA.state], 1 ; suspended
|
||||||
call change_task
|
call change_task
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iretd
|
iretd
|
||||||
@ -278,18 +278,18 @@ e7:
|
|||||||
|
|
||||||
mov eax, [prev_user_of_fpu]
|
mov eax, [prev_user_of_fpu]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, 0x80000 + 0x10
|
add eax, 0x80000 + APPDATA.fpu_save_area
|
||||||
fsave [eax]
|
fsave [eax]
|
||||||
|
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
mov [prev_user_of_fpu], eax
|
mov [prev_user_of_fpu], eax
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, 0x80000
|
add eax, 0x80000
|
||||||
cmp [eax + 0x7f], byte 0
|
cmp [eax + APPDATA.is_fpu_saved], 0
|
||||||
je @f
|
je @f
|
||||||
frstor [eax+0x10]
|
frstor [eax+APPDATA.fpu_save_area]
|
||||||
@@:
|
@@:
|
||||||
mov [eax + 0x7f], byte 1
|
mov [eax + APPDATA.is_fpu_saved], 1
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iret
|
iret
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ show_error_parameters:
|
|||||||
mov [write_error_to],process_pid+43
|
mov [write_error_to],process_pid+43
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
mov eax,[0x3000+4+eax]
|
mov eax,[0x3000+TASKDATA.pid+eax]
|
||||||
call writehex
|
call writehex
|
||||||
|
|
||||||
mov [write_error_to],process_error+43
|
mov [write_error_to],process_error+43
|
||||||
@ -556,7 +556,7 @@ set_application_table_status:
|
|||||||
|
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax,0x3000+4
|
add eax,0x3000+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
|
|
||||||
mov [application_table_status],eax
|
mov [application_table_status],eax
|
||||||
@ -571,7 +571,7 @@ clear_application_table_status:
|
|||||||
|
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax,0x3000+4
|
add eax,0x3000+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
|
|
||||||
cmp eax,[application_table_status]
|
cmp eax,[application_table_status]
|
||||||
@ -676,17 +676,17 @@ uglobal
|
|||||||
app_esp dd 0x0
|
app_esp dd 0x0
|
||||||
app_i_param dd 0x0
|
app_i_param dd 0x0
|
||||||
app_i_icon dd 0x0
|
app_i_icon dd 0x0
|
||||||
app_mem_pos dd 0x0
|
;app_mem_pos dd 0x0
|
||||||
appl_path dd 0x0
|
appl_path dd 0x0
|
||||||
appl_path_size dd 0x0
|
appl_path_size dd 0x0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
iglobal
|
;iglobal
|
||||||
hd_app_string db 'HDAPP '
|
;hd_app_string db 'HDAPP '
|
||||||
process_loading db 'K : Process - loading ',13,10,0
|
;process_loading db 'K : Process - loading ',13,10,0
|
||||||
process_running db 'K : Process - done',13,10,0
|
;process_running db 'K : Process - done',13,10,0
|
||||||
first_gdt_search dd 0x2
|
;first_gdt_search dd 0x2
|
||||||
endg
|
;endg
|
||||||
|
|
||||||
|
|
||||||
sys_threads:
|
sys_threads:
|
||||||
@ -812,10 +812,10 @@ terminate: ; terminate application
|
|||||||
mov [esi+WDATA.box.top],eax
|
mov [esi+WDATA.box.top],eax
|
||||||
mov [esi+WDATA.box.height], 5
|
mov [esi+WDATA.box.height], 5
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [esi+16],eax
|
mov [esi+WDATA.cl_workarea],eax
|
||||||
mov [esi+20],eax
|
mov [esi+WDATA.cl_titlebar],eax
|
||||||
mov [esi+24],eax
|
mov [esi+WDATA.cl_frames],eax
|
||||||
mov [esi+28],eax
|
mov dword [esi+WDATA.reserved],eax ; clear all flags: wstate, redraw, wdrawn
|
||||||
lea edi, [esi-window_data+draw_data]
|
lea edi, [esi-window_data+draw_data]
|
||||||
mov ecx,32/4
|
mov ecx,32/4
|
||||||
rep stosd
|
rep stosd
|
||||||
@ -825,12 +825,12 @@ terminate: ; terminate application
|
|||||||
pushad
|
pushad
|
||||||
mov edi, esi
|
mov edi, esi
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
mov eax, [0x80000+edi*8+0xAC]
|
mov eax, [0x80000+edi*8+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .nodebug
|
jz .nodebug
|
||||||
push 8
|
push 8
|
||||||
pop ecx
|
pop ecx
|
||||||
push dword [0x3000+edi+0x4] ; PID
|
push dword [0x3000+edi+TASKDATA.pid] ; PID
|
||||||
push 2
|
push 2
|
||||||
call debugger_notify
|
call debugger_notify
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -850,7 +850,7 @@ terminate: ; terminate application
|
|||||||
pusha ; name to spaces
|
pusha ; name to spaces
|
||||||
mov edi,esi
|
mov edi,esi
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000+APPDATA.app_name
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
mov eax,' '
|
mov eax,' '
|
||||||
rep stosb
|
rep stosb
|
||||||
@ -869,7 +869,7 @@ terminate: ; terminate application
|
|||||||
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 + 0xa], byte 9 ; skip dead slots
|
cmp [0x3000 + edi + TASKDATA.state], byte 9 ; skip dead slots
|
||||||
je .check_next_window
|
je .check_next_window
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
call waredraw
|
call waredraw
|
||||||
@ -896,8 +896,8 @@ terminate: ; terminate application
|
|||||||
|
|
||||||
pusha ; remove all irq reservations
|
pusha ; remove all irq reservations
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
shl eax, 5 ;imul edx,0x20
|
shl eax, 5
|
||||||
mov eax,[edx+0x3000+4]
|
mov eax,[edx+0x3000+TASKDATA.pid]
|
||||||
mov edi,irq_owner
|
mov edi,irq_owner
|
||||||
mov ecx,16
|
mov ecx,16
|
||||||
newirqfree:
|
newirqfree:
|
||||||
@ -911,9 +911,9 @@ terminate: ; terminate application
|
|||||||
|
|
||||||
pusha ; remove all port reservations
|
pusha ; remove all port reservations
|
||||||
mov edx,esi
|
mov edx,esi
|
||||||
shl edx, 5 ;imul edx,0x20
|
shl edx, 5
|
||||||
add edx,0x3000
|
add edx,0x3000
|
||||||
mov edx,[edx+4]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
|
|
||||||
rmpr0:
|
rmpr0:
|
||||||
|
|
||||||
@ -956,10 +956,10 @@ terminate: ; terminate application
|
|||||||
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+0x300A],byte 9
|
mov [edi+0x3000 + 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+0xAC
|
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
|
||||||
.xd0:
|
.xd0:
|
||||||
cmp eax, [0x3004]
|
cmp eax, [0x3004]
|
||||||
ja .xd1
|
ja .xd1
|
||||||
|
@ -40,7 +40,7 @@ i40:
|
|||||||
align 4
|
align 4
|
||||||
save_registers:
|
save_registers:
|
||||||
mov esi, [0x3010]
|
mov esi, [0x3010]
|
||||||
mov eax, [esi+0x4] ; load PID
|
mov eax, [esi+TASKDATA.pid] ; load PID
|
||||||
lea esi, [esp+4]
|
lea esi, [esp+4]
|
||||||
inc [save_syscall_count]
|
inc [save_syscall_count]
|
||||||
mov edi,[save_syscall_count]
|
mov edi,[save_syscall_count]
|
||||||
|
@ -33,7 +33,7 @@ reserve_flp:
|
|||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+4]
|
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||||
mov [flp_status],eax
|
mov [flp_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
|
@ -124,7 +124,7 @@ reserve_hd1:
|
|||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+4]
|
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||||
mov [hd1_status],eax
|
mov [hd1_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
|
@ -25,7 +25,7 @@ reserve_cd:
|
|||||||
push eax
|
push eax
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
mov eax,[eax+0x3000+4]
|
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||||
mov [cd_status],eax
|
mov [cd_status],eax
|
||||||
pop eax
|
pop eax
|
||||||
sti
|
sti
|
||||||
|
@ -70,8 +70,8 @@ drawbuttonframes:
|
|||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
|
|
||||||
add eax,[edx-twdw]
|
add eax,[edx-twdw + WDATA.box.left]
|
||||||
add ebx,[edx-twdw+4]
|
add ebx,[edx-twdw + WDATA.box.top]
|
||||||
mov cx,ax
|
mov cx,ax
|
||||||
mov dx,bx
|
mov dx,bx
|
||||||
shl eax,16
|
shl eax,16
|
||||||
@ -198,8 +198,8 @@ sys_button:
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov esi,[edx-twdw]
|
mov esi,[edx-twdw + WDATA.box.left]
|
||||||
mov edi,[edx-twdw+4]
|
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
|
||||||
@ -237,9 +237,6 @@ sys_button:
|
|||||||
|
|
||||||
and ecx,0xffff
|
and ecx,0xffff
|
||||||
|
|
||||||
mov edi,[0x3010]
|
|
||||||
sub edi,twdw
|
|
||||||
|
|
||||||
mov edi,[0xfe88]
|
mov edi,[0xfe88]
|
||||||
movzx eax,word [edi]
|
movzx eax,word [edi]
|
||||||
cmp eax,max_buttons
|
cmp eax,max_buttons
|
||||||
@ -331,7 +328,7 @@ find_pressed_button_frames:
|
|||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,window_data
|
add ebx,window_data
|
||||||
movzx ecx,word [ebx+0] ; window x start
|
mov ecx, [ebx+ WDATA.box.left] ; window x start
|
||||||
movzx edx,word [eax+4] ; button x start
|
movzx edx,word [eax+4] ; button x start
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
push ecx
|
push ecx
|
||||||
@ -340,7 +337,7 @@ find_pressed_button_frames:
|
|||||||
add cx,dx
|
add cx,dx
|
||||||
mov esi,ecx
|
mov esi,ecx
|
||||||
inc esi
|
inc esi
|
||||||
mov cx,[ebx+4] ; window y start
|
mov ecx, [ebx+WDATA.box.top] ; window y start
|
||||||
mov dx,[eax+8] ; button y start
|
mov dx,[eax+8] ; button y start
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
@ -521,12 +518,12 @@ checkbuttons:
|
|||||||
; add ebx,window_data
|
; add ebx,window_data
|
||||||
; mov ecx,[window_data+ebx+8] ; window end X
|
; mov ecx,[window_data+ebx+8] ; window end X
|
||||||
movzx edx,word [eax+4] ; button start X
|
movzx edx,word [eax+4] ; button start X
|
||||||
cmp edx, [window_data+ebx+8] ;ecx
|
cmp edx, [window_data+ebx+WDATA.box.width] ;ecx
|
||||||
jge buttonnewcheck
|
jge buttonnewcheck
|
||||||
|
|
||||||
; mov ecx,[window_data+ebx+12] ; window end Y
|
; mov ecx,[window_data+ebx+12] ; window end Y
|
||||||
movzx edx, word [eax+8] ; button start Y
|
movzx edx, word [eax+8] ; button start Y
|
||||||
cmp edx, [window_data+ebx+12] ;ecx
|
cmp edx, [window_data+ebx+WDATA.box.height] ;ecx
|
||||||
jge buttonnewcheck
|
jge buttonnewcheck
|
||||||
|
|
||||||
; check coordinates
|
; check coordinates
|
||||||
@ -534,7 +531,7 @@ checkbuttons:
|
|||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,window_data
|
add ebx,window_data
|
||||||
movzx ecx,word [ebx+0] ; window x start
|
mov ecx, [ebx+WDATA.box.left] ; window x start
|
||||||
movzx edx,word [eax+4] ; button x start
|
movzx edx,word [eax+4] ; button x start
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
mov cx,[0xfb0a]
|
mov cx,[0xfb0a]
|
||||||
@ -550,7 +547,7 @@ checkbuttons:
|
|||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,window_data
|
add ebx,window_data
|
||||||
movzx ecx,word [ebx+4] ; window y start
|
mov ecx, [ebx+WDATA.box.top] ; window y start
|
||||||
movzx edx,word [eax+8] ; button y start
|
movzx edx,word [eax+8] ; button y start
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
mov cx,[0xfb0c]
|
mov cx,[0xfb0c]
|
||||||
@ -605,7 +602,7 @@ checkbuttons:
|
|||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,window_data
|
add ebx,window_data
|
||||||
movzx ecx,word [ebx+0] ; window x start
|
mov ecx, [ebx+WDATA.box.left] ; window x start
|
||||||
movzx edx,word [eax+4] ; button x start
|
movzx edx,word [eax+4] ; button x start
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
mov cx,[0xfb0a]
|
mov cx,[0xfb0a]
|
||||||
@ -621,7 +618,7 @@ checkbuttons:
|
|||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
add ebx,window_data
|
add ebx,window_data
|
||||||
movzx ecx,word [ebx+4] ; window y start
|
mov ecx, [ebx+WDATA.box.top] ; window y start
|
||||||
movzx edx,word [eax+8] ; button y start
|
movzx edx,word [eax+8] ; button y start
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
mov cx,[0xfb0c]
|
mov cx,[0xfb0c]
|
||||||
|
@ -37,7 +37,7 @@ sys_waitforevent:
|
|||||||
newwait:
|
newwait:
|
||||||
|
|
||||||
mov eax, [0x3010]
|
mov eax, [0x3010]
|
||||||
mov [eax+0xA], byte 5
|
mov [eax+TASKDATA.state], byte 5
|
||||||
call change_task
|
call change_task
|
||||||
|
|
||||||
mov eax, [event_sched]
|
mov eax, [event_sched]
|
||||||
@ -52,10 +52,10 @@ get_event_for_app:
|
|||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edi,[0x3010] ; WINDOW REDRAW
|
mov edi,[0x3010] ; WINDOW REDRAW
|
||||||
test [edi],dword 1
|
test [edi+TASKDATA.event_mask],dword 1
|
||||||
jz no_eventoccur1
|
jz no_eventoccur1
|
||||||
;mov edi,[0x3010]
|
;mov edi,[0x3010]
|
||||||
cmp [edi-twdw+31],byte 0
|
cmp [edi-twdw+WDATA.fl_redraw],byte 0
|
||||||
je no_eventoccur1
|
je no_eventoccur1
|
||||||
popad
|
popad
|
||||||
mov eax,1
|
mov eax,1
|
||||||
@ -63,7 +63,7 @@ get_event_for_app:
|
|||||||
no_eventoccur1:
|
no_eventoccur1:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; KEY IN BUFFER
|
;mov edi,[0x3010] ; KEY IN BUFFER
|
||||||
test [edi],dword 2
|
test [edi+TASKDATA.event_mask],dword 2
|
||||||
jz no_eventoccur2
|
jz no_eventoccur2
|
||||||
mov ecx, [0x3000]
|
mov ecx, [0x3000]
|
||||||
movzx edx,word [0xC000+ecx*2]
|
movzx edx,word [0xC000+ecx*2]
|
||||||
@ -87,7 +87,7 @@ get_event_for_app:
|
|||||||
no_eventoccur2:
|
no_eventoccur2:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; BUTTON IN BUFFER
|
;mov edi,[0x3010] ; BUTTON IN BUFFER
|
||||||
test [edi],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
|
||||||
@ -113,13 +113,13 @@ get_event_for_app:
|
|||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; mouse event
|
;mov edi,[0x3010] ; mouse event
|
||||||
test [edi],dword 00100000b
|
test [edi+TASKDATA.event_mask],dword 00100000b
|
||||||
jz no_mouse_event
|
jz no_mouse_event
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+0xA8],dword 00100000b
|
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
|
||||||
jz no_mouse_event
|
jz no_mouse_event
|
||||||
and [eax+0x80000+0xA8],dword 0xffffffff-00100000b
|
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-00100000b
|
||||||
popad
|
popad
|
||||||
mov eax,6
|
mov eax,6
|
||||||
ret
|
ret
|
||||||
@ -127,7 +127,7 @@ get_event_for_app:
|
|||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; DESKTOP BACKGROUND REDRAW
|
;mov edi,[0x3010] ; DESKTOP BACKGROUND REDRAW
|
||||||
test [edi],dword 16
|
test [edi+TASKDATA.event_mask],dword 16
|
||||||
jz no_eventoccur5
|
jz no_eventoccur5
|
||||||
cmp [0xfff0],byte 2
|
cmp [0xfff0],byte 2
|
||||||
jnz no_eventoccur5
|
jnz no_eventoccur5
|
||||||
@ -137,13 +137,13 @@ get_event_for_app:
|
|||||||
no_eventoccur5:
|
no_eventoccur5:
|
||||||
|
|
||||||
;mov edi,[0x3010] ; IPC
|
;mov edi,[0x3010] ; IPC
|
||||||
test [edi],dword 01000000b
|
test [edi+TASKDATA.event_mask],dword 01000000b
|
||||||
jz no_ipc
|
jz no_ipc
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+0xA8],dword 01000000b
|
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
|
||||||
jz no_ipc
|
jz no_ipc
|
||||||
and [eax+0x80000+0xA8],dword 0xffffffff-01000000b
|
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-01000000b
|
||||||
popad
|
popad
|
||||||
mov eax,7
|
mov eax,7
|
||||||
ret
|
ret
|
||||||
@ -151,31 +151,31 @@ get_event_for_app:
|
|||||||
|
|
||||||
|
|
||||||
;mov edi,[0x3010] ; STACK
|
;mov edi,[0x3010] ; STACK
|
||||||
test [edi],dword 10000000b
|
test [edi+TASKDATA.event_mask],dword 10000000b
|
||||||
jz no_stack_event
|
jz no_stack_event
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+0xA8],dword 10000000b
|
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
|
||||||
jz no_stack_event
|
jz no_stack_event
|
||||||
and [eax+0x80000+0xA8],dword 0xffffffff-10000000b
|
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-10000000b
|
||||||
popad
|
popad
|
||||||
mov eax,8
|
mov eax,8
|
||||||
ret
|
ret
|
||||||
no_stack_event:
|
no_stack_event:
|
||||||
|
|
||||||
test byte [edi+1], 1 ; DEBUG
|
test byte [edi+TASKDATA.event_mask+1], 1 ; DEBUG
|
||||||
jz no_debug_event
|
jz no_debug_event
|
||||||
mov eax, [0x3000]
|
mov eax, [0x3000]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
test [eax+0x80000+0xA8+1], byte 1
|
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
|
||||||
jz no_debug_event
|
jz no_debug_event
|
||||||
and byte [eax+0x80000+0xA8+1], not 1
|
and byte [eax+0x80000+APPDATA.event_mask+1], not 1
|
||||||
popad
|
popad
|
||||||
mov eax, 9
|
mov eax, 9
|
||||||
ret
|
ret
|
||||||
no_debug_event:
|
no_debug_event:
|
||||||
|
|
||||||
cmp dword [edi], 0xFFFF
|
cmp dword [edi+TASKDATA.event_mask], 0xFFFF
|
||||||
jbe no_events
|
jbe no_events
|
||||||
|
|
||||||
mov esi,0x2e0000 ; IRQ'S AND DATA
|
mov esi,0x2e0000 ; IRQ'S AND DATA
|
||||||
@ -183,14 +183,14 @@ get_event_for_app:
|
|||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
irq_event_test:
|
irq_event_test:
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
test [edi],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,[0x3010]
|
||||||
mov eax,[eax+0x4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
cmp edx,eax
|
cmp edx,eax
|
||||||
jne no_irq_event
|
jne no_irq_event
|
||||||
cmp [esi],dword 0
|
cmp [esi],dword 0
|
||||||
|
@ -203,7 +203,7 @@ drawwindow_IV_caption:
|
|||||||
@@:
|
@@:
|
||||||
|
|
||||||
mov esi,[esp+4]
|
mov esi,[esp+4]
|
||||||
mov eax,[esi+8] ; window width
|
mov eax,[esi+WDATA.box.width] ; window width
|
||||||
mov edx,[ebp+SKIN_DATA.left.left]
|
mov edx,[ebp+SKIN_DATA.left.left]
|
||||||
shl edx,16
|
shl edx,16
|
||||||
mov ecx,[ebp+SKIN_DATA.left.width]
|
mov ecx,[ebp+SKIN_DATA.left.width]
|
||||||
@ -214,7 +214,7 @@ drawwindow_IV_caption:
|
|||||||
call sys_putimage_with_check
|
call sys_putimage_with_check
|
||||||
|
|
||||||
mov esi,[esp+4]
|
mov esi,[esp+4]
|
||||||
mov eax,[esi+8]
|
mov eax,[esi+WDATA.box.width]
|
||||||
sub eax,[ebp+SKIN_DATA.left.width]
|
sub eax,[ebp+SKIN_DATA.left.width]
|
||||||
sub eax,[ebp+SKIN_DATA.oper.width]
|
sub eax,[ebp+SKIN_DATA.oper.width]
|
||||||
cmp eax,[ebp+SKIN_DATA.base.left]
|
cmp eax,[ebp+SKIN_DATA.base.left]
|
||||||
@ -247,7 +247,7 @@ drawwindow_IV_caption:
|
|||||||
.non_base:
|
.non_base:
|
||||||
|
|
||||||
mov esi,[esp+4]
|
mov esi,[esp+4]
|
||||||
mov edx,[esi+8]
|
mov edx,[esi+WDATA.box.width]
|
||||||
sub edx,[ebp+SKIN_DATA.oper.width]
|
sub edx,[ebp+SKIN_DATA.oper.width]
|
||||||
inc edx
|
inc edx
|
||||||
shl edx,16
|
shl edx,16
|
||||||
@ -278,14 +278,14 @@ drawwindow_IV:
|
|||||||
mov ebp,skin_inactive
|
mov ebp,skin_inactive
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
mov eax,[edi+0]
|
mov eax,[edi+WDATA.box.left]
|
||||||
shl eax,16
|
shl eax,16
|
||||||
mov ax,[edi+0]
|
mov ax,word [edi+WDATA.box.left]
|
||||||
add ax,[edi+8]
|
add ax,word [edi+WDATA.box.width]
|
||||||
mov ebx,[edi+4]
|
mov ebx,[edi+WDATA.box.top]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx,[edi+4]
|
mov bx,word [edi+WDATA.box.top]
|
||||||
add bx,[edi+12]
|
add bx,word [edi+WDATA.box.height]
|
||||||
; mov esi,[edi+24]
|
; mov esi,[edi+24]
|
||||||
; shr esi,1
|
; shr esi,1
|
||||||
; and esi,0x007f7f7f
|
; and esi,0x007f7f7f
|
||||||
@ -317,7 +317,7 @@ drawwindow_IV:
|
|||||||
xor eax,eax
|
xor eax,eax
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov esi,[esp]
|
mov esi,[esp]
|
||||||
mov ecx,[esi+8]
|
mov ecx,[esi+WDATA.box.width]
|
||||||
inc ecx
|
inc ecx
|
||||||
mov edx,[_skinh]
|
mov edx,[_skinh]
|
||||||
mov edi,[common_colours+4] ; standard grab color
|
mov edi,[common_colours+4] ; standard grab color
|
||||||
@ -332,19 +332,19 @@ drawwindow_IV:
|
|||||||
|
|
||||||
mov esi,[esp]
|
mov esi,[esp]
|
||||||
|
|
||||||
mov edx,[esi+04] ; WORK AREA
|
mov edx,[esi+WDATA.box.top] ; WORK AREA
|
||||||
add edx,21+5
|
add edx,21+5
|
||||||
mov ebx,[esi+04]
|
mov ebx,[esi+WDATA.box.top]
|
||||||
add ebx,[esi+12]
|
add ebx,[esi+WDATA.box.height]
|
||||||
cmp edx,ebx
|
cmp edx,ebx
|
||||||
jg _noinside2
|
jg _noinside2
|
||||||
mov eax,5
|
mov eax,5
|
||||||
mov ebx,[_skinh]
|
mov ebx,[_skinh]
|
||||||
mov ecx,[esi+8]
|
mov ecx,[esi+WDATA.box.width]
|
||||||
mov edx,[esi+12]
|
mov edx,[esi+WDATA.box.height]
|
||||||
sub ecx,4
|
sub ecx,4
|
||||||
sub edx,4
|
sub edx,4
|
||||||
mov edi,[esi+16]
|
mov edi,[esi+WDATA.cl_workarea]
|
||||||
call [drawbar]
|
call [drawbar]
|
||||||
_noinside2:
|
_noinside2:
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ drawwindow_IV:
|
|||||||
cmp [skin_btn_close.left],0
|
cmp [skin_btn_close.left],0
|
||||||
jge _bCx_at_right
|
jge _bCx_at_right
|
||||||
mov ebx,[esp]
|
mov ebx,[esp]
|
||||||
mov ebx,[ebx+8]
|
mov ebx,[ebx+WDATA.box.width]
|
||||||
inc ebx
|
inc ebx
|
||||||
_bCx_at_right:
|
_bCx_at_right:
|
||||||
add ebx,[skin_btn_close.left]
|
add ebx,[skin_btn_close.left]
|
||||||
@ -412,7 +412,7 @@ drawwindow_IV:
|
|||||||
cmp [skin_btn_minimize.left],0
|
cmp [skin_btn_minimize.left],0
|
||||||
jge _bMx_at_right
|
jge _bMx_at_right
|
||||||
mov ebx,[esp]
|
mov ebx,[esp]
|
||||||
mov ebx,[ebx+8]
|
mov ebx,[ebx+WDATA.box.width]
|
||||||
inc ebx
|
inc ebx
|
||||||
_bMx_at_right:
|
_bMx_at_right:
|
||||||
add ebx,[skin_btn_minimize.left]
|
add ebx,[skin_btn_minimize.left]
|
||||||
|
@ -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+0xa], byte 9
|
cmp [0x3000+edi+TASKDATA.state], byte 9
|
||||||
je .not_wnd
|
je .not_wnd
|
||||||
|
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
@ -147,8 +147,8 @@ setscreen:
|
|||||||
pushad
|
pushad
|
||||||
mov edi, esi ;;;word [esi*2+0xc400]
|
mov edi, esi ;;;word [esi*2+0xc400]
|
||||||
shl edi, 8
|
shl edi, 8
|
||||||
add edi, 0x80000+0x80 ; address of random shaped window area
|
add edi, 0x80000 ; address of random shaped window area
|
||||||
cmp [edi], dword 0
|
cmp [edi+APPDATA.wnd_shape], dword 0
|
||||||
jne .free_form
|
jne .free_form
|
||||||
|
|
||||||
; get x&y size
|
; get x&y size
|
||||||
@ -214,7 +214,7 @@ pushad
|
|||||||
inc ecx
|
inc ecx
|
||||||
inc edx
|
inc edx
|
||||||
|
|
||||||
push dword [edi+4] ; push scale first -> for loop
|
push dword [edi+APPDATA.wnd_shape_scale] ; push scale first -> for loop
|
||||||
|
|
||||||
; get WinMap start -> ebp
|
; get WinMap start -> ebp
|
||||||
push eax
|
push eax
|
||||||
@ -225,7 +225,7 @@ pushad
|
|||||||
add eax, WinMapAddress
|
add eax, WinMapAddress
|
||||||
mov ebp, eax
|
mov ebp, eax
|
||||||
|
|
||||||
mov edi, [edi]
|
mov edi, [edi+APPDATA.wnd_shape]
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
; eax = x_start
|
; eax = x_start
|
||||||
@ -364,7 +364,7 @@ display_settings:
|
|||||||
jne no_com_colours
|
jne no_com_colours
|
||||||
mov [windowtypechanged],dword 1
|
mov [windowtypechanged],dword 1
|
||||||
mov esi,[0x3010]
|
mov esi,[0x3010]
|
||||||
add esi,0x10
|
add esi,TASKDATA.mem_start
|
||||||
add ebx,[esi]
|
add ebx,[esi]
|
||||||
mov esi,ebx
|
mov esi,ebx
|
||||||
mov edi,common_colours
|
mov edi,common_colours
|
||||||
@ -378,7 +378,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,[0x3010]
|
||||||
add esi,0x10
|
add esi,TASKDATA.mem_start
|
||||||
add ebx,[esi]
|
add ebx,[esi]
|
||||||
mov edi,ebx
|
mov edi,ebx
|
||||||
mov esi,common_colours
|
mov esi,common_colours
|
||||||
@ -457,7 +457,7 @@ display_settings:
|
|||||||
jne no_set_skin
|
jne no_set_skin
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ebx,[edi+0x10] ; 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
|
||||||
mov dword[ebx+4],0 ; from the beginning
|
mov dword[ebx+4],0 ; from the beginning
|
||||||
@ -567,16 +567,16 @@ check_window_position:
|
|||||||
|
|
||||||
pushad ; window inside screen ?
|
pushad ; window inside screen ?
|
||||||
|
|
||||||
movzx eax,word [edi+0]
|
movzx eax,word [edi+WDATA.box.left]
|
||||||
movzx ebx,word [edi+4]
|
movzx ebx,word [edi+WDATA.box.top]
|
||||||
movzx ecx,word [edi+8]
|
movzx ecx,word [edi+WDATA.box.width]
|
||||||
movzx edx,word [edi+12]
|
movzx edx,word [edi+WDATA.box.height]
|
||||||
|
|
||||||
mov esi,ecx ; check x pos
|
mov esi,ecx ; check x pos
|
||||||
add esi,eax
|
add esi,eax
|
||||||
cmp esi,[0xfe00]
|
cmp esi,[0xfe00]
|
||||||
jbe x_pos_ok
|
jbe x_pos_ok
|
||||||
mov [edi+0],dword 0
|
mov [edi+WDATA.box.left],dword 0
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
x_pos_ok:
|
x_pos_ok:
|
||||||
|
|
||||||
@ -584,7 +584,7 @@ check_window_position:
|
|||||||
add esi,ebx
|
add esi,ebx
|
||||||
cmp esi,[0xfe04]
|
cmp esi,[0xfe04]
|
||||||
jbe y_pos_ok
|
jbe y_pos_ok
|
||||||
mov [edi+4],dword 0
|
mov [edi+WDATA.box.top],dword 0
|
||||||
mov ebx,0
|
mov ebx,0
|
||||||
y_pos_ok:
|
y_pos_ok:
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ check_window_position:
|
|||||||
cmp esi,[0xfe00]
|
cmp esi,[0xfe00]
|
||||||
jbe x_size_ok
|
jbe x_size_ok
|
||||||
mov ecx,[0xfe00]
|
mov ecx,[0xfe00]
|
||||||
mov [edi+8],ecx
|
mov [edi+WDATA.box.width],ecx
|
||||||
x_size_ok:
|
x_size_ok:
|
||||||
|
|
||||||
mov esi,edx ; check y size
|
mov esi,edx ; check y size
|
||||||
@ -601,7 +601,7 @@ check_window_position:
|
|||||||
cmp esi,[0xfe04]
|
cmp esi,[0xfe04]
|
||||||
jbe y_size_ok
|
jbe y_size_ok
|
||||||
mov edx,[0xfe04]
|
mov edx,[0xfe04]
|
||||||
mov [edi+12],edx
|
mov [edi+WDATA.box.height],edx
|
||||||
y_size_ok:
|
y_size_ok:
|
||||||
|
|
||||||
popad
|
popad
|
||||||
@ -618,7 +618,7 @@ sys_window_mouse:
|
|||||||
|
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
mov eax,[timer_ticks] ;[0xfdf0]
|
mov eax,[timer_ticks]
|
||||||
cmp [new_window_starting],eax
|
cmp [new_window_starting],eax
|
||||||
jb swml1
|
jb swml1
|
||||||
|
|
||||||
@ -638,15 +638,15 @@ sys_window_mouse:
|
|||||||
|
|
||||||
drawwindow_I_caption:
|
drawwindow_I_caption:
|
||||||
|
|
||||||
mov ecx,[edx+20] ; grab bar
|
mov ecx,[edx+WDATA.cl_titlebar] ; grab bar
|
||||||
push ecx
|
push ecx
|
||||||
mov esi,edx
|
mov esi,edx
|
||||||
mov edx,[esi+04]
|
mov edx,[esi+WDATA.box.top]
|
||||||
add edx,1
|
add edx,1
|
||||||
mov ebx,[esi+04]
|
mov ebx,[esi+WDATA.box.top]
|
||||||
add ebx,21
|
add ebx,21
|
||||||
mov eax,[esi+04]
|
mov eax,[esi+WDATA.box.top]
|
||||||
add eax,[esi+12]
|
add eax,[esi+WDATA.box.height]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jb .wdsizeok
|
jb .wdsizeok
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@ -656,25 +656,25 @@ drawwindow_I_caption:
|
|||||||
mov ebx,edx
|
mov ebx,edx
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,edx
|
add ebx,edx
|
||||||
mov eax,[esi+00]
|
mov eax,[esi+WDATA.box.left]
|
||||||
inc eax
|
inc eax
|
||||||
shl eax,16
|
shl eax,16
|
||||||
add eax,[esi+00]
|
add eax,[esi+WDATA.box.left]
|
||||||
add eax,[esi+8]
|
add eax,[esi+WDATA.box.width]
|
||||||
sub eax,1
|
sub eax,1
|
||||||
push edx
|
push edx
|
||||||
mov edx,0x80000000
|
mov edx,0x80000000
|
||||||
mov ecx,[esi+20]
|
mov ecx,[esi+WDATA.cl_titlebar]
|
||||||
and ecx,edx
|
and ecx,edx
|
||||||
cmp ecx,edx
|
cmp ecx,edx
|
||||||
jnz .nofa
|
jnz .nofa
|
||||||
mov ecx,[esi+20]
|
mov ecx,[esi+WDATA.cl_titlebar]
|
||||||
sub ecx,0x00040404
|
sub ecx,0x00040404
|
||||||
mov [esi+20],ecx
|
mov [esi+WDATA.cl_titlebar],ecx
|
||||||
and ecx,0x00ffffff
|
and ecx,0x00ffffff
|
||||||
jmp .faj
|
jmp .faj
|
||||||
.nofa:
|
.nofa:
|
||||||
mov ecx,[esi+20]
|
mov ecx,[esi+WDATA.cl_titlebar]
|
||||||
and ecx,0x00ffffff
|
and ecx,0x00ffffff
|
||||||
.faj:
|
.faj:
|
||||||
pop edx
|
pop edx
|
||||||
@ -685,7 +685,7 @@ drawwindow_I_caption:
|
|||||||
jb .drwi
|
jb .drwi
|
||||||
add esp,4
|
add esp,4
|
||||||
pop ecx
|
pop ecx
|
||||||
mov [esi+20],ecx
|
mov [esi+WDATA.cl_titlebar],ecx
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -694,30 +694,30 @@ drawwindow_I:
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov esi,[edx+24] ; rectangle
|
mov esi,[edx+WDATA.cl_frames] ; rectangle
|
||||||
mov eax,[edx+0]
|
mov eax,[edx+WDATA.box.left]
|
||||||
shl eax,16
|
shl eax,16
|
||||||
add eax,[edx+0]
|
add eax,[edx+WDATA.box.left]
|
||||||
add eax,[edx+8]
|
add eax,[edx+WDATA.box.width]
|
||||||
mov ebx,[edx+04]
|
mov ebx,[edx+WDATA.box.top]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[edx+4]
|
add ebx,[edx+WDATA.box.top]
|
||||||
add ebx,[edx+12]
|
add ebx,[edx+WDATA.box.height]
|
||||||
call draw_rectangle
|
call draw_rectangle
|
||||||
|
|
||||||
call drawwindow_I_caption
|
call drawwindow_I_caption
|
||||||
|
|
||||||
mov edx,[esi+04] ; inside work area
|
mov edx,[esi+WDATA.box.top] ; inside work area
|
||||||
add edx,21+5
|
add edx,21+5
|
||||||
mov ebx,[esi+04]
|
mov ebx,[esi+WDATA.box.top]
|
||||||
add ebx,[esi+12]
|
add ebx,[esi+WDATA.box.height]
|
||||||
cmp edx,ebx
|
cmp edx,ebx
|
||||||
jg noinside
|
jg noinside
|
||||||
mov eax,1
|
mov eax,1
|
||||||
mov ebx,21
|
mov ebx,21
|
||||||
mov ecx,[esi+8]
|
mov ecx,[esi+WDATA.box.width]
|
||||||
mov edx,[esi+12]
|
mov edx,[esi+WDATA.box.height]
|
||||||
mov edi,[esi+16]
|
mov edi,[esi+WDATA.cl_workarea]
|
||||||
call [drawbar]
|
call [drawbar]
|
||||||
noinside:
|
noinside:
|
||||||
|
|
||||||
@ -771,15 +771,15 @@ r_bx equ [esp+18] ; y end
|
|||||||
|
|
||||||
drawwindow_III_caption:
|
drawwindow_III_caption:
|
||||||
|
|
||||||
mov ecx,[edx+20] ; GRAB BAR
|
mov ecx,[edx+WDATA.cl_titlebar] ; GRAB BAR
|
||||||
push ecx
|
push ecx
|
||||||
mov esi,edx
|
mov esi,edx
|
||||||
mov edx,[esi+04]
|
mov edx,[esi+WDATA.box.top]
|
||||||
add edx,4
|
add edx,4
|
||||||
mov ebx,[esi+04]
|
mov ebx,[esi+WDATA.box.top]
|
||||||
add ebx,20
|
add ebx,20
|
||||||
mov eax,[esi+04]
|
mov eax,[esi+WDATA.box.top]
|
||||||
add eax,[esi+12]
|
add eax,[esi+WDATA.box.height]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
jb .wdsizeok
|
jb .wdsizeok
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@ -789,12 +789,12 @@ drawwindow_III_caption:
|
|||||||
mov ebx,edx
|
mov ebx,edx
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,edx
|
add ebx,edx
|
||||||
mov eax,[esi+00]
|
mov eax,[esi+WDATA.box.left]
|
||||||
shl eax,16
|
shl eax,16
|
||||||
add eax,[esi+00]
|
add eax,[esi+WDATA.box.left]
|
||||||
add eax,[esi+8]
|
add eax,[esi+WDATA.box.width]
|
||||||
add eax,4*65536-4
|
add eax,4*65536-4
|
||||||
mov ecx,[esi+20]
|
mov ecx,[esi+WDATA.cl_titlebar]
|
||||||
test ecx,0x40000000
|
test ecx,0x40000000
|
||||||
jz .nofa
|
jz .nofa
|
||||||
add ecx,0x040404
|
add ecx,0x040404
|
||||||
@ -803,7 +803,7 @@ drawwindow_III_caption:
|
|||||||
jz .nofa2
|
jz .nofa2
|
||||||
sub ecx,0x040404
|
sub ecx,0x040404
|
||||||
.nofa2:
|
.nofa2:
|
||||||
mov [esi+20],ecx
|
mov [esi+WDATA.cl_titlebar],ecx
|
||||||
and ecx,0xffffff
|
and ecx,0xffffff
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
call [draw_line]
|
call [draw_line]
|
||||||
@ -812,7 +812,7 @@ drawwindow_III_caption:
|
|||||||
jb .drwi
|
jb .drwi
|
||||||
add esp,4
|
add esp,4
|
||||||
pop ecx
|
pop ecx
|
||||||
mov [esi+20],ecx
|
mov [esi+WDATA.cl_titlebar],ecx
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -822,15 +822,15 @@ drawwindow_III:
|
|||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edi,edx ; RECTANGLE
|
mov edi,edx ; RECTANGLE
|
||||||
mov eax,[edi+0]
|
mov eax,[edi+WDATA.box.left]
|
||||||
shl eax,16
|
shl eax,16
|
||||||
mov ax,[edi+0]
|
mov ax, word [edi+WDATA.box.left]
|
||||||
add ax,[edi+8]
|
add ax, word [edi+WDATA.box.width]
|
||||||
mov ebx,[edi+4]
|
mov ebx,[edi+WDATA.box.top]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx,[edi+4]
|
mov bx, word [edi+WDATA.box.top]
|
||||||
add bx,[edi+12]
|
add bx, word [edi+WDATA.box.height]
|
||||||
mov esi,[edi+24]
|
mov esi,[edi+WDATA.cl_frames]
|
||||||
shr esi,1
|
shr esi,1
|
||||||
and esi,0x007f7f7f
|
and esi,0x007f7f7f
|
||||||
push esi
|
push esi
|
||||||
@ -839,7 +839,7 @@ drawwindow_III:
|
|||||||
dw3l:
|
dw3l:
|
||||||
add eax,1*65536-1
|
add eax,1*65536-1
|
||||||
add ebx,1*65536-1
|
add ebx,1*65536-1
|
||||||
mov esi,[edi+24]
|
mov esi,[edi+WDATA.cl_frames]
|
||||||
call draw_rectangle
|
call draw_rectangle
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz dw3l
|
jnz dw3l
|
||||||
@ -850,19 +850,19 @@ drawwindow_III:
|
|||||||
|
|
||||||
call drawwindow_III_caption
|
call drawwindow_III_caption
|
||||||
|
|
||||||
mov edx,[esi+04] ; WORK AREA
|
mov edx,[esi+WDATA.box.top] ; WORK AREA
|
||||||
add edx,21+5
|
add edx,21+5
|
||||||
mov ebx,[esi+04]
|
mov ebx,[esi+WDATA.box.top]
|
||||||
add ebx,[esi+12]
|
add ebx,[esi+WDATA.box.height]
|
||||||
cmp edx,ebx
|
cmp edx,ebx
|
||||||
jg noinside2
|
jg noinside2
|
||||||
mov eax,5
|
mov eax,5
|
||||||
mov ebx,20
|
mov ebx,20
|
||||||
mov ecx,[esi+8]
|
mov ecx,[esi+WDATA.box.width]
|
||||||
mov edx,[esi+12]
|
mov edx,[esi+WDATA.box.height]
|
||||||
sub ecx,4
|
sub ecx,4
|
||||||
sub edx,4
|
sub edx,4
|
||||||
mov edi,[esi+16]
|
mov edi,[esi+WDATA.cl_workarea]
|
||||||
call [drawbar]
|
call [drawbar]
|
||||||
noinside2:
|
noinside2:
|
||||||
|
|
||||||
@ -971,31 +971,31 @@ checkwindowdraw:
|
|||||||
|
|
||||||
movzx eax, word [esi]
|
movzx eax, word [esi]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
cmp [0x3000 + eax + 0xa], byte 9
|
cmp [0x3000 + 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]
|
||||||
|
|
||||||
mov ebx, [edi+4] ; y0
|
mov ebx, [edi+WDATA.box.top] ; y0
|
||||||
mov edx, [edi+12]
|
mov edx, [edi+WDATA.box.height]
|
||||||
add edx, ebx ; y0e
|
add edx, ebx ; y0e
|
||||||
|
|
||||||
mov ecx, [esi+4] ; 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+12]
|
mov eax, [esi+WDATA.box.height]
|
||||||
add ecx, eax ; ye
|
add ecx, eax ; ye
|
||||||
cmp ebx, ecx ; y0 >= ye
|
cmp ebx, ecx ; y0 >= ye
|
||||||
ja .new_check
|
ja .new_check
|
||||||
|
|
||||||
mov eax, [edi+0] ; x0
|
mov eax, [edi+WDATA.box.left] ; x0
|
||||||
mov ecx, [edi+8]
|
mov ecx, [edi+WDATA.box.width]
|
||||||
add ecx, eax ; x0e
|
add ecx, eax ; x0e
|
||||||
|
|
||||||
mov edx, [esi+0] ; x ; x check
|
mov edx, [esi+WDATA.box.left] ; x ; x check
|
||||||
cmp edx, ecx
|
cmp edx, ecx
|
||||||
jae .new_check ; x < x0e
|
jae .new_check ; x < x0e
|
||||||
mov ecx, [esi+8]
|
mov ecx, [esi+WDATA.box.width]
|
||||||
add edx, ecx
|
add edx, ecx
|
||||||
cmp eax, edx
|
cmp eax, edx
|
||||||
ja .new_check
|
ja .new_check
|
||||||
@ -1035,10 +1035,10 @@ waredraw: ; if redraw necessary at activate
|
|||||||
add esi, window_data
|
add esi, window_data
|
||||||
|
|
||||||
; coordinates of the upper window
|
; coordinates of the upper window
|
||||||
mov eax, [esi+00] ; cx
|
mov eax, [esi + WDATA.box.left] ; cx
|
||||||
mov ebx, [esi+04] ; cy
|
mov ebx, [esi + WDATA.box.top] ; cy
|
||||||
mov ecx, [esi+08] ; sx
|
mov ecx, [esi + WDATA.box.width] ; sx
|
||||||
mov edx, [esi+12] ; sy
|
mov edx, [esi + WDATA.box.height] ; sy
|
||||||
|
|
||||||
add ecx, eax ; ecx = x_end
|
add ecx, eax ; ecx = x_end
|
||||||
add edx, ebx ; edx = y_end
|
add edx, ebx ; edx = y_end
|
||||||
@ -1048,7 +1048,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
call setscreen
|
call setscreen
|
||||||
popad
|
popad
|
||||||
|
|
||||||
mov [edi+31],byte 1 ; redraw flag for app
|
mov [edi + WDATA.fl_redraw], 1 ; redraw flag for app
|
||||||
mov [0xfb44],byte 0 ; mouse down checks
|
mov [0xfb44],byte 0 ; mouse down checks
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@ -1175,8 +1175,8 @@ checkwindows:
|
|||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
; mov edi, ebx
|
; mov edi, ebx
|
||||||
mov ecx, [edi+0]
|
mov ecx, [edi + WDATA.box.left]
|
||||||
mov edx, [edi+4]
|
mov edx, [edi + WDATA.box.top]
|
||||||
|
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,edx
|
mov ebx,edx
|
||||||
@ -1190,8 +1190,8 @@ checkwindows:
|
|||||||
jae cwloop
|
jae cwloop
|
||||||
cmp edx, ebx
|
cmp edx, ebx
|
||||||
jae cwloop
|
jae cwloop
|
||||||
add ecx, [edi+8]
|
add ecx, [edi + WDATA.box.width]
|
||||||
add edx, [edi+12]
|
add edx, [edi + WDATA.box.height]
|
||||||
cmp eax, ecx
|
cmp eax, ecx
|
||||||
jae cwloop
|
jae cwloop
|
||||||
cmp ebx, edx
|
cmp ebx, edx
|
||||||
@ -1218,7 +1218,7 @@ checkwindows:
|
|||||||
popad
|
popad
|
||||||
|
|
||||||
; Check for user enabled fixed window
|
; Check for user enabled fixed window
|
||||||
mov edx, [edi+0x14]
|
mov edx, [edi + WDATA.cl_titlebar]
|
||||||
and edx, 0x0f000000
|
and edx, 0x0f000000
|
||||||
cmp edx, 0x01000000
|
cmp edx, 0x01000000
|
||||||
jne .window_move_enabled_for_user
|
jne .window_move_enabled_for_user
|
||||||
@ -1230,13 +1230,13 @@ checkwindows:
|
|||||||
jnz .no_resize_2
|
jnz .no_resize_2
|
||||||
|
|
||||||
mov [do_resize_from_corner],byte 0 ; resize for skinned window
|
mov [do_resize_from_corner],byte 0 ; resize for skinned window
|
||||||
mov edx, [edi+0x10]
|
mov edx, [edi + WDATA.cl_workarea]
|
||||||
and edx, 0x0f000000
|
and edx, 0x0f000000
|
||||||
cmp edx, 0x02000000
|
cmp edx, 0x02000000
|
||||||
jb .no_resize_2 ; not type 2 wnd
|
jb .no_resize_2 ; not type 2 wnd
|
||||||
|
|
||||||
mov edx, [edi+4]
|
mov edx, [edi + WDATA.box.top]
|
||||||
add edx, [edi+12]
|
add edx, [edi + WDATA.box.height]
|
||||||
sub edx, 6 ; edx = y_end - 6
|
sub edx, 6 ; edx = y_end - 6
|
||||||
cmp ebx, edx ; ebx = mouse_y
|
cmp ebx, edx ; ebx = mouse_y
|
||||||
jb .no_resize_2
|
jb .no_resize_2
|
||||||
@ -1246,7 +1246,7 @@ checkwindows:
|
|||||||
|
|
||||||
push eax
|
push eax
|
||||||
call get_titlebar_height
|
call get_titlebar_height
|
||||||
add eax,[edi+4]
|
add eax,[edi + WDATA.box.top]
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
pop eax
|
pop eax
|
||||||
jae .exit
|
jae .exit
|
||||||
@ -1267,15 +1267,15 @@ checkwindows:
|
|||||||
mov cl, [0xfb40] ; save for shade check
|
mov cl, [0xfb40] ; save for shade check
|
||||||
mov [do_resize], cl
|
mov [do_resize], cl
|
||||||
no_emulation_righ_button:
|
no_emulation_righ_button:
|
||||||
mov ecx, [edi+0]
|
mov ecx, [edi + WDATA.box.left]
|
||||||
mov edx, [edi+4]
|
mov edx, [edi + WDATA.box.top]
|
||||||
|
|
||||||
push eax ecx edx
|
push eax ecx edx
|
||||||
mov [dlx], ecx ; save for drawlimits
|
mov [dlx], ecx ; save for drawlimits
|
||||||
mov [dly], edx
|
mov [dly], edx
|
||||||
mov eax, [edi+8]
|
mov eax, [edi + WDATA.box.width]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
mov eax, [edi+12]
|
mov eax, [edi + WDATA.box.height]
|
||||||
add edx, eax
|
add edx, eax
|
||||||
mov [dlxe], ecx
|
mov [dlxe], ecx
|
||||||
mov [dlye], edx
|
mov [dlye], edx
|
||||||
@ -1290,22 +1290,22 @@ checkwindows:
|
|||||||
pushad ; wait for putimages to finish
|
pushad ; wait for putimages to finish
|
||||||
; mov eax,5
|
; mov eax,5
|
||||||
; call delay_hs
|
; call delay_hs
|
||||||
mov eax,[edi+0]
|
mov eax,[edi + WDATA.box.left]
|
||||||
mov [npx],eax
|
mov [npx],eax
|
||||||
mov eax,[edi+4]
|
mov eax,[edi + WDATA.box.top]
|
||||||
mov [npy],eax
|
mov [npy],eax
|
||||||
popad
|
popad
|
||||||
|
|
||||||
push eax ; save old coordinates
|
push eax ; save old coordinates
|
||||||
mov ax,[edi+00]
|
mov ax, word [edi + WDATA.box.left]
|
||||||
mov word [oldc+00],ax
|
mov word [oldc+BOX.left],ax
|
||||||
mov ax,[edi+04]
|
mov ax, word [edi + WDATA.box.top]
|
||||||
mov word [oldc+04],ax
|
mov word [oldc+BOX.top],ax
|
||||||
mov ax,[edi+8]
|
mov ax, word [edi + WDATA.box.width]
|
||||||
mov word [oldc+8],ax
|
mov word [oldc+BOX.width],ax
|
||||||
mov word [npxe],ax
|
mov word [npxe],ax
|
||||||
mov ax,[edi+12]
|
mov ax, word [edi + WDATA.box.height]
|
||||||
mov word [oldc+12],ax
|
mov word [oldc+BOX.height],ax
|
||||||
mov word [npye],ax
|
mov word [npye],ax
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
@ -1388,14 +1388,15 @@ checkwindows:
|
|||||||
|
|
||||||
mov edx,edi
|
mov edx,edi
|
||||||
sub edx,window_data
|
sub edx,window_data
|
||||||
shr edx,5
|
;shr edx,5
|
||||||
shl edx,8
|
;shl edx,8
|
||||||
add edx,0x80000 ; process base at 0x80000+
|
;add edx,0x80000 ; process base at 0x80000+
|
||||||
|
lea edx, [0x80000 + edx*8]
|
||||||
|
|
||||||
movzx eax,word [0xfb0a]
|
movzx eax,word [0xfb0a]
|
||||||
cmp eax,[edi+0]
|
cmp eax,[edi + WDATA.box.left]
|
||||||
jb nnepx
|
jb nnepx
|
||||||
sub eax,[edi+0]
|
sub eax,[edi + WDATA.box.left]
|
||||||
cmp eax,32 ; [edx+0x90+8]
|
cmp eax,32 ; [edx+0x90+8]
|
||||||
jge nnepx2
|
jge nnepx2
|
||||||
mov eax,32 ; [edx+0x90+8]
|
mov eax,32 ; [edx+0x90+8]
|
||||||
@ -1406,9 +1407,9 @@ checkwindows:
|
|||||||
call get_rolledup_height
|
call get_rolledup_height
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
movzx eax,word [0xfb0c]
|
movzx eax,word [0xfb0c]
|
||||||
cmp eax,[edi+4]
|
cmp eax,[edi + WDATA.box.top]
|
||||||
jb nnepy
|
jb nnepy
|
||||||
sub eax,[edi+4]
|
sub eax,[edi + WDATA.box.top]
|
||||||
cmp eax,ebx ; [edx+0x90+12]
|
cmp eax,ebx ; [edx+0x90+12]
|
||||||
jge nnepy2
|
jge nnepy2
|
||||||
mov eax,ebx ; [edx+0x90+12]
|
mov eax,ebx ; [edx+0x90+12]
|
||||||
@ -1443,13 +1444,13 @@ checkwindows:
|
|||||||
call drawwindowframes
|
call drawwindowframes
|
||||||
|
|
||||||
mov eax,[npx]
|
mov eax,[npx]
|
||||||
mov [edi+0],eax
|
mov [edi + WDATA.box.left],eax
|
||||||
mov eax,[npy]
|
mov eax,[npy]
|
||||||
mov [edi+4],eax
|
mov [edi + WDATA.box.top],eax
|
||||||
mov eax,[npxe]
|
mov eax,[npxe]
|
||||||
mov [edi+8],eax
|
mov [edi + WDATA.box.width],eax
|
||||||
mov eax,[npye]
|
mov eax,[npye]
|
||||||
mov [edi+12],eax
|
mov [edi + WDATA.box.height],eax
|
||||||
|
|
||||||
@@: mov [reposition],cl
|
@@: mov [reposition],cl
|
||||||
|
|
||||||
@ -1464,7 +1465,7 @@ checkwindows:
|
|||||||
@@: sub edi,window_data
|
@@: sub edi,window_data
|
||||||
shr edi,5
|
shr edi,5
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000+0x90
|
add edi,0x80000+APPDATA.saved_box
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
pop ecx edi esi
|
pop ecx edi esi
|
||||||
@ -1492,7 +1493,7 @@ checkwindows:
|
|||||||
jmp @f
|
jmp @f
|
||||||
wnd_rolldown:
|
wnd_rolldown:
|
||||||
and [edi+WDATA.fl_wstate],not WSTATE_ROLLEDUP
|
and [edi+WDATA.fl_wstate],not WSTATE_ROLLEDUP
|
||||||
mov eax,[edx+0x90+BOX.height]
|
mov eax,[edx + APPDATA.saved_box.height] ; 0x90+BOX.height
|
||||||
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
jz @f
|
jz @f
|
||||||
mov eax,[screen_workarea.bottom]
|
mov eax,[screen_workarea.bottom]
|
||||||
@ -1527,7 +1528,7 @@ checkwindows:
|
|||||||
and [edi+WDATA.fl_wstate],not WSTATE_MAXIMIZED
|
and [edi+WDATA.fl_wstate],not WSTATE_MAXIMIZED
|
||||||
push [edi+WDATA.box.height]
|
push [edi+WDATA.box.height]
|
||||||
push edi ; restore
|
push edi ; restore
|
||||||
lea esi, [edx + 0x90]
|
lea esi, [edx + APPDATA.saved_box]
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -1540,20 +1541,20 @@ checkwindows:
|
|||||||
|
|
||||||
no_fullscreen_restore:
|
no_fullscreen_restore:
|
||||||
|
|
||||||
mov eax,[edi+4] ; check Y inside screen
|
mov eax,[edi+WDATA.box.top] ; check Y inside screen
|
||||||
add eax,[edi+12]
|
add eax,[edi+WDATA.box.height]
|
||||||
cmp eax,[0xfe04]
|
cmp eax,[0xfe04]
|
||||||
jbe no_window_sizing
|
jbe no_window_sizing
|
||||||
mov eax,[edi+0] ; check X inside screen
|
mov eax,[edi+WDATA.box.left] ; check X inside screen
|
||||||
add eax,[edi+8]
|
add eax,[edi+WDATA.box.width]
|
||||||
cmp eax,[0xfe00]
|
cmp eax,[0xfe00]
|
||||||
jbe no_window_sizing
|
jbe no_window_sizing
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
sub eax,[edi+8]
|
sub eax,[edi+WDATA.box.width]
|
||||||
mov [edi+0],eax
|
mov [edi+WDATA.box.left],eax
|
||||||
mov eax,[0xfe04]
|
mov eax,[0xfe04]
|
||||||
sub eax,[edi+12]
|
sub eax,[edi+WDATA.box.height]
|
||||||
mov [edi+4],eax
|
mov [edi+WDATA.box.top],eax
|
||||||
no_window_sizing:
|
no_window_sizing:
|
||||||
|
|
||||||
popad
|
popad
|
||||||
@ -1565,18 +1566,18 @@ checkwindows:
|
|||||||
|
|
||||||
|
|
||||||
push eax ebx ecx edx
|
push eax ebx ecx edx
|
||||||
mov eax,[edi+00]
|
mov eax,[edi+WDATA.box.left]
|
||||||
mov ebx,[edi+04]
|
mov ebx,[edi+WDATA.box.top]
|
||||||
mov ecx,[edi+8]
|
mov ecx,[edi+WDATA.box.width]
|
||||||
mov edx,[edi+12]
|
mov edx,[edi+WDATA.box.height]
|
||||||
add ecx,eax
|
add ecx,eax
|
||||||
add edx,ebx
|
add edx,ebx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
|
|
||||||
mov eax,[oldc+00]
|
mov eax,[oldc+BOX.left]
|
||||||
mov ebx,[oldc+04]
|
mov ebx,[oldc+BOX.top]
|
||||||
mov ecx,[oldc+8]
|
mov ecx,[oldc+BOX.width]
|
||||||
mov edx,[oldc+12]
|
mov edx,[oldc+BOX.height]
|
||||||
add ecx,eax
|
add ecx,eax
|
||||||
add edx,ebx
|
add edx,ebx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
@ -1701,7 +1702,7 @@ drawwindowframes:
|
|||||||
mov edi,[0x3000]
|
mov edi,[0x3000]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
add edi,window_data
|
add edi,window_data
|
||||||
mov [edi+30],byte 1
|
mov [edi+WDATA.fl_wdrawn],byte 1
|
||||||
pop edi
|
pop edi
|
||||||
|
|
||||||
popad
|
popad
|
||||||
@ -1715,7 +1716,7 @@ random_shaped_window:
|
|||||||
;
|
;
|
||||||
; eax = 0 giving address of data area
|
; eax = 0 giving address of data area
|
||||||
; ebx address
|
; ebx address
|
||||||
; ebx = 1 shape area scale
|
; eax = 1 shape area scale
|
||||||
; ebx 2^ebx scale
|
; ebx 2^ebx scale
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -1723,14 +1724,14 @@ random_shaped_window:
|
|||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
|
|
||||||
mov [eax+0x80000+0x80],ebx
|
mov [eax+0x80000+APPDATA.wnd_shape],ebx
|
||||||
rsw_no_address:
|
rsw_no_address:
|
||||||
|
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jne rsw_no_scale
|
jne rsw_no_scale
|
||||||
mov eax,[0x3000]
|
mov eax,[0x3000]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov [eax+0x80000+0x84],bl
|
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
|
||||||
rsw_no_scale:
|
rsw_no_scale:
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
@ -91,10 +91,10 @@ irq1:
|
|||||||
mov ds, ax
|
mov ds, ax
|
||||||
mov es, ax
|
mov es, ax
|
||||||
|
|
||||||
movzx eax,word[0x3004] ; top window process
|
mov eax, [0x3004] ; top window process
|
||||||
movzx eax,word[0xC400+eax*2]
|
movzx eax,word[0xC400+eax*2]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov al,[0x800B4+eax]
|
mov al,[0x80000+eax+APPDATA.keyboard_mode]
|
||||||
mov [keyboard_mode],al
|
mov [keyboard_mode],al
|
||||||
|
|
||||||
in al,0x60
|
in al,0x60
|
||||||
|
@ -644,12 +644,12 @@ finit ;reset the registers, contents which are still equal RM
|
|||||||
mov esi,boot_setostask
|
mov esi,boot_setostask
|
||||||
call boot_log
|
call boot_log
|
||||||
; name for OS/IDLE process
|
; name for OS/IDLE process
|
||||||
mov [0x80000+256+0],dword 'OS/I'
|
mov dword [0x80000+256+APPDATA.app_name], dword 'OS/I'
|
||||||
mov [0x80000+256+4],dword 'DLE '
|
mov dword [0x80000+256+APPDATA.app_name+4], dword 'DLE '
|
||||||
; task list
|
; task list
|
||||||
mov [0x3020+0xE],byte 1 ; on screen number
|
mov [0x3020+TASKDATA.wnd_number], 1 ; on screen number
|
||||||
mov [0x3020+0x4],dword 1 ; process id number
|
mov [0x3020+TASKDATA.pid], 1 ; process id number
|
||||||
mov [0x3020+0x10], dword 0 ; process base address
|
mov [0x3020+TASKDATA.mem_start], 0 ; process base address
|
||||||
|
|
||||||
; set default flags & stacks
|
; set default flags & stacks
|
||||||
mov [l.eflags],dword 0x11202 ; sti and resume
|
mov [l.eflags],dword 0x11202 ; sti and resume
|
||||||
@ -1442,7 +1442,7 @@ display_number:
|
|||||||
cmp al,1 ; ecx is a pointer ?
|
cmp al,1 ; ecx is a pointer ?
|
||||||
jne displnl1
|
jne displnl1
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+0x10]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,[edi+ebx]
|
mov ebx,[edi+ebx]
|
||||||
displnl1:
|
displnl1:
|
||||||
sub esp,64
|
sub esp,64
|
||||||
@ -1452,8 +1452,6 @@ display_number:
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
;mov edi,[0x3010]
|
|
||||||
;mov edi,[edi+0x10]
|
|
||||||
mov edi,esp
|
mov edi,esp
|
||||||
add edi,4+64
|
add edi,4+64
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
@ -1478,8 +1476,6 @@ display_number:
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
;mov edi,[0x3010]
|
|
||||||
;mov edi,[edi+0x10]
|
|
||||||
mov edi,esp
|
mov edi,esp
|
||||||
add edi,4+64
|
add edi,4+64
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
@ -1505,8 +1501,6 @@ display_number:
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
;mov edi,[0x3010]
|
|
||||||
;mov edi,[edi+0x10]
|
|
||||||
mov edi,esp
|
mov edi,esp
|
||||||
add edi,4+64
|
add edi,4+64
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
@ -1551,9 +1545,9 @@ draw_num_text:
|
|||||||
push edx ; add window start x & y
|
push edx ; add window start x & y
|
||||||
push ebx
|
push ebx
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov ebx,[edx-twdw]
|
mov ebx,[edx-twdw+WDATA.box.left]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[edx-twdw+4]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
pop ebx
|
pop ebx
|
||||||
pop edx
|
pop edx
|
||||||
@ -1615,7 +1609,7 @@ midi_base dw 0
|
|||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
jnz kbnobase
|
jnz kbnobase
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap
|
mov ebx,keymap
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1625,7 +1619,7 @@ midi_base dw 0
|
|||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jnz kbnoshift
|
jnz kbnoshift
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap_shift
|
mov ebx,keymap_shift
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1635,7 +1629,7 @@ midi_base dw 0
|
|||||||
cmp ebx,3
|
cmp ebx,3
|
||||||
jne kbnoalt
|
jne kbnoalt
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
mov ebx,keymap_alt
|
mov ebx,keymap_alt
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1827,7 +1821,7 @@ sys_getsetup:
|
|||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
jnz kbnobaseret
|
jnz kbnobaseret
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap
|
mov eax,keymap
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1837,7 +1831,7 @@ sys_getsetup:
|
|||||||
cmp ebx,2
|
cmp ebx,2
|
||||||
jnz kbnoshiftret
|
jnz kbnoshiftret
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap_shift
|
mov eax,keymap_shift
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1847,7 +1841,7 @@ sys_getsetup:
|
|||||||
cmp ebx,3
|
cmp ebx,3
|
||||||
jne kbnoaltret
|
jne kbnoaltret
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add ecx,[edi+0x10]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
mov eax,keymap_alt
|
mov eax,keymap_alt
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@ -1950,10 +1944,9 @@ readmousepos:
|
|||||||
shl eax,16
|
shl eax,16
|
||||||
mov ax,[0xfb0c]
|
mov ax,[0xfb0c]
|
||||||
mov esi,[0x3010]
|
mov esi,[0x3010]
|
||||||
sub esi,twdw
|
mov bx, word [esi-twdw+WDATA.box.left]
|
||||||
mov bx,[esi]
|
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx,[esi+4]
|
mov bx, word [esi-twdw+WDATA.box.top]
|
||||||
sub eax,ebx
|
sub eax,ebx
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
@ -2081,8 +2074,7 @@ include 'detect/ps2mouse.inc'
|
|||||||
sys_end:
|
sys_end:
|
||||||
|
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
add eax,0xa
|
mov [eax+TASKDATA.state], 3 ; terminate this program
|
||||||
mov [eax],byte 3 ; terminate this program
|
|
||||||
|
|
||||||
waitterm: ; wait here for termination
|
waitterm: ; wait here for termination
|
||||||
mov eax,5
|
mov eax,5
|
||||||
@ -2141,8 +2133,8 @@ sysfn_terminate: ; 18.2 = TERMINATE
|
|||||||
ja noprocessterminate
|
ja noprocessterminate
|
||||||
mov eax,[0x3004]
|
mov eax,[0x3004]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
mov edx,[ebx+0x3000+4]
|
mov edx,[ebx+0x3000+TASKDATA.pid]
|
||||||
add ebx,0x3000+0xa
|
add ebx,0x3000+TASKDATA.state
|
||||||
cmp byte [ebx], 9
|
cmp byte [ebx], 9
|
||||||
jz noprocessterminate
|
jz noprocessterminate
|
||||||
|
|
||||||
@ -2262,8 +2254,8 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
|
|||||||
rep movsb
|
rep movsb
|
||||||
ret
|
ret
|
||||||
for_all_tables:
|
for_all_tables:
|
||||||
mov edi,[3010h]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+10h]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ecx
|
add edi,ecx
|
||||||
mov esi,0x40000
|
mov esi,0x40000
|
||||||
ret
|
ret
|
||||||
@ -2281,8 +2273,8 @@ 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,[3010h]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+10h]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ebx
|
add edi,ebx
|
||||||
mov esi,version_inf
|
mov esi,version_inf
|
||||||
mov ecx,version_end-version_inf
|
mov ecx,version_end-version_inf
|
||||||
@ -2447,7 +2439,7 @@ draw_background_temp:
|
|||||||
jnz nosb5
|
jnz nosb5
|
||||||
; bughere
|
; bughere
|
||||||
mov edi, [0x3010]
|
mov edi, [0x3010]
|
||||||
add ebx, [edi+0x10]
|
add ebx, [edi+TASKDATA.mem_start]
|
||||||
; mov esi, ebx
|
; mov esi, ebx
|
||||||
; mov edi, ecx
|
; mov edi, ecx
|
||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
@ -2589,8 +2581,7 @@ sys_cpuusage:
|
|||||||
;
|
;
|
||||||
|
|
||||||
mov edi,[0x3010] ; eax = return area
|
mov edi,[0x3010] ; eax = return area
|
||||||
add edi,0x10
|
add eax,[edi + TASKDATA.mem_start]
|
||||||
add eax,[edi]
|
|
||||||
|
|
||||||
cmp ebx,-1 ; who am I ?
|
cmp ebx,-1 ; who am I ?
|
||||||
jne no_who_am_i
|
jne no_who_am_i
|
||||||
@ -2609,27 +2600,20 @@ sys_cpuusage:
|
|||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov eax,0x20
|
mov eax,0x20
|
||||||
mul ebx
|
mul ebx
|
||||||
add eax,0x3000+0x1c
|
add eax,0x3000+TASKDATA.cpu_usage
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx,[ebx]
|
mov ecx,[ebx]
|
||||||
mov [eax],ecx
|
mov [eax],ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
; mov ebx,[esp]
|
|
||||||
; shl ebx,1
|
|
||||||
; add ebx,0xc000
|
|
||||||
mov cx, [0xC000 + ebx * 2]
|
mov cx, [0xC000 + ebx * 2]
|
||||||
mov [eax+4],cx
|
mov [eax+4],cx
|
||||||
; mov ebx,[esp]
|
|
||||||
; shl ebx,1
|
|
||||||
; add ebx,0xc400
|
|
||||||
mov cx, [0xC400 + ebx * 2]
|
mov cx, [0xC400 + ebx * 2]
|
||||||
mov [eax+6],cx
|
mov [eax+6],cx
|
||||||
; pop ebx
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
shl eax,8
|
shl eax,8
|
||||||
add eax,0x80000
|
add eax,0x80000+APPDATA.app_name
|
||||||
pop ebx
|
pop ebx
|
||||||
add ebx,10
|
add ebx,10
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
@ -2643,19 +2627,9 @@ sys_cpuusage:
|
|||||||
cmp ecx,1
|
cmp ecx,1
|
||||||
je os_mem
|
je os_mem
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
mov edx,[0x80000+ecx+0x8c]
|
mov edx,[0x80000+ecx+APPDATA.mem_size] ;0x8c
|
||||||
mov eax,std_application_base_address
|
mov eax,std_application_base_address
|
||||||
;add ecx,0x80000+0x88
|
|
||||||
;mov ecx,[ecx]
|
|
||||||
; shl ecx,3
|
|
||||||
; eax run base -> edx used memory
|
; eax run base -> edx used memory
|
||||||
; mov al,[ecx+gdts+ app_code-3 +4] ; base 23:16
|
|
||||||
; mov ah,[ecx+gdts+ app_code-3 +7] ; base 31:24
|
|
||||||
; shl eax,16
|
|
||||||
; mov ax,[ecx+gdts+ app_code-3 +2] ; base 0:15
|
|
||||||
; movzx edx,word [ecx+gdts+ app_code-3 +0]
|
|
||||||
; shl edx,12
|
|
||||||
|
|
||||||
os_mem:
|
os_mem:
|
||||||
dec edx
|
dec edx
|
||||||
mov [ebx+12],eax
|
mov [ebx+12],eax
|
||||||
@ -2665,7 +2639,7 @@ sys_cpuusage:
|
|||||||
|
|
||||||
mov eax,[esp]
|
mov eax,[esp]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add eax,0x3000+0x4
|
add eax,0x3000+TASKDATA.pid
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
mov [ebx+20],eax
|
mov [ebx+20],eax
|
||||||
|
|
||||||
@ -2673,18 +2647,18 @@ sys_cpuusage:
|
|||||||
|
|
||||||
mov esi,[esp]
|
mov esi,[esp]
|
||||||
shl esi,5
|
shl esi,5
|
||||||
add esi,window_data
|
add esi,window_data + WDATA.box
|
||||||
mov edi,[esp+4]
|
mov edi,[esp+4]
|
||||||
add edi,34
|
add edi,34
|
||||||
mov ecx,4*4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsb
|
rep movsd
|
||||||
|
|
||||||
; Process state (+50)
|
; Process state (+50)
|
||||||
|
|
||||||
mov eax,[esp]
|
mov eax,[esp]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add eax,0x3000+0xa
|
add eax,0x3000+TASKDATA.state
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
mov [ebx+40],ax
|
mov [ebx+40],ax
|
||||||
|
|
||||||
@ -2826,16 +2800,15 @@ sys_redrawstat:
|
|||||||
|
|
||||||
mov edx,[0x3010] ; return whole screen draw area for this app
|
mov edx,[0x3010] ; return whole screen draw area for this app
|
||||||
add edx,draw_data-0x3000
|
add edx,draw_data-0x3000
|
||||||
mov [edx+0],dword 0
|
mov [edx+RECT.left], 0
|
||||||
mov [edx+4],dword 0
|
mov [edx+RECT.top], 0
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
mov [edx+8],eax
|
mov [edx+RECT.right],eax
|
||||||
mov eax,[0xfe04]
|
mov eax,[0xfe04]
|
||||||
mov [edx+12],eax
|
mov [edx+RECT.bottom],eax
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
sub edi,twdw
|
mov [edi-twdw+WDATA.fl_wdrawn], 1 ; no new position & buttons from app
|
||||||
mov [edi+30],byte 1 ; no new position & buttons from app
|
|
||||||
|
|
||||||
call sys_window_mouse
|
call sys_window_mouse
|
||||||
|
|
||||||
@ -2961,7 +2934,7 @@ draw_window_caption:
|
|||||||
mov ecx,[edi*8+0x80000+APPDATA.wnd_caption]
|
mov ecx,[edi*8+0x80000+APPDATA.wnd_caption]
|
||||||
or ecx,ecx
|
or ecx,ecx
|
||||||
jz @f
|
jz @f
|
||||||
add ecx,[edi+twdw+0x10]
|
add ecx,[edi+twdw+TASKDATA.mem_start]
|
||||||
|
|
||||||
movzx eax,[edi+window_data+WDATA.fl_wstyle]
|
movzx eax,[edi+window_data+WDATA.fl_wstyle]
|
||||||
and al,0x0F
|
and al,0x0F
|
||||||
@ -3118,15 +3091,16 @@ sys_set_window:
|
|||||||
|
|
||||||
sub edi,window_data
|
sub edi,window_data
|
||||||
shl edi,3
|
shl edi,3
|
||||||
add edi,0x80000+0x90
|
add edi,0x80000
|
||||||
|
|
||||||
and cl,0x0F
|
and cl,0x0F
|
||||||
mov [edi-0x90+APPDATA.wnd_caption],0
|
mov [edi+APPDATA.wnd_caption],0
|
||||||
cmp cl,3
|
cmp cl,3
|
||||||
jne @f
|
jne @f
|
||||||
mov [edi-0x90+APPDATA.wnd_caption],esi
|
mov [edi+APPDATA.wnd_caption],esi
|
||||||
@@: mov esi,[esp+0]
|
@@: mov esi,[esp+0]
|
||||||
|
|
||||||
|
add edi, APPDATA.saved_box
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -3135,10 +3109,10 @@ sys_set_window:
|
|||||||
push eax ebx ecx edx
|
push eax ebx ecx edx
|
||||||
;;; mov eax, 1
|
;;; mov eax, 1
|
||||||
;;; call delay_hs
|
;;; call delay_hs
|
||||||
movzx eax, word [edi+00]
|
mov eax, [edi+WDATA.box.left]
|
||||||
movzx ebx, word [edi+04]
|
mov ebx, [edi+WDATA.box.top]
|
||||||
movzx ecx, word [edi+8]
|
mov ecx, [edi+WDATA.box.width]
|
||||||
movzx edx, word [edi+12]
|
mov edx, [edi+WDATA.box.height]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
@ -3148,7 +3122,7 @@ sys_set_window:
|
|||||||
mov [0xf500],byte 0 ; empty button buffer
|
mov [0xf500],byte 0 ; empty button buffer
|
||||||
|
|
||||||
newd:
|
newd:
|
||||||
mov [edi+31],byte 0 ; no redraw
|
mov [edi+WDATA.fl_redraw],byte 0 ; no redraw
|
||||||
mov edx,edi
|
mov edx,edi
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@ -3195,25 +3169,25 @@ syscall_windowsettings:
|
|||||||
|
|
||||||
sys_window_move:
|
sys_window_move:
|
||||||
|
|
||||||
mov edi,[0x00003000]
|
mov edi,[0x3000]
|
||||||
shl edi,5
|
shl edi,5
|
||||||
add edi,window_data
|
add edi,window_data
|
||||||
|
|
||||||
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
jnz .window_move_return
|
jnz .window_move_return
|
||||||
|
|
||||||
push dword [edi+0] ; save old coordinates
|
push dword [edi + WDATA.box.left] ; save old coordinates
|
||||||
push dword [edi+4]
|
push dword [edi + WDATA.box.top]
|
||||||
push dword [edi+8]
|
push dword [edi + WDATA.box.width]
|
||||||
push dword [edi+12]
|
push dword [edi + WDATA.box.height]
|
||||||
|
|
||||||
cmp eax,-1 ; set new position and size
|
cmp eax,-1 ; set new position and size
|
||||||
je .no_x_reposition
|
je .no_x_reposition
|
||||||
mov [edi+0],eax
|
mov [edi + WDATA.box.left], eax
|
||||||
.no_x_reposition:
|
.no_x_reposition:
|
||||||
cmp ebx,-1
|
cmp ebx,-1
|
||||||
je .no_y_reposition
|
je .no_y_reposition
|
||||||
mov [edi+4],ebx
|
mov [edi + WDATA.box.top], ebx
|
||||||
.no_y_reposition:
|
.no_y_reposition:
|
||||||
|
|
||||||
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
@ -3221,11 +3195,11 @@ sys_window_move:
|
|||||||
|
|
||||||
cmp ecx,-1
|
cmp ecx,-1
|
||||||
je .no_x_resizing
|
je .no_x_resizing
|
||||||
mov [edi+8],ecx
|
mov [edi + WDATA.box.width], ecx
|
||||||
.no_x_resizing:
|
.no_x_resizing:
|
||||||
cmp edx,-1
|
cmp edx,-1
|
||||||
je .no_y_resizing
|
je .no_y_resizing
|
||||||
mov [edi+12],edx
|
mov [edi + WDATA.box.height], edx
|
||||||
.no_y_resizing:
|
.no_y_resizing:
|
||||||
|
|
||||||
call check_window_position
|
call check_window_position
|
||||||
@ -3235,17 +3209,17 @@ sys_window_move:
|
|||||||
sub edi,window_data
|
sub edi,window_data
|
||||||
shr edi,5
|
shr edi,5
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000+0x90
|
add edi, 0x80000 + APPDATA.saved_box
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
popad
|
popad
|
||||||
|
|
||||||
pushad ; calculcate screen at new position
|
pushad ; calculcate screen at new position
|
||||||
mov eax,[edi+00]
|
mov eax, [edi + WDATA.box.left]
|
||||||
mov ebx,[edi+04]
|
mov ebx, [edi + WDATA.box.top]
|
||||||
mov ecx,[edi+8]
|
mov ecx, [edi + WDATA.box.width]
|
||||||
mov edx,[edi+12]
|
mov edx, [edi + WDATA.box.height]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
@ -3263,7 +3237,7 @@ sys_window_move:
|
|||||||
mov [dlye],edx
|
mov [dlye],edx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
|
|
||||||
mov [edi+31],byte 1 ; flag the process as redraw
|
mov [edi + WDATA.fl_redraw], 1 ; flag the process as redraw
|
||||||
|
|
||||||
mov eax,edi ; redraw screen at old position
|
mov eax,edi ; redraw screen at old position
|
||||||
xor esi,esi
|
xor esi,esi
|
||||||
@ -3463,7 +3437,7 @@ checkmisc:
|
|||||||
mov ecx, [0x3004]
|
mov ecx, [0x3004]
|
||||||
set_mouse_event:
|
set_mouse_event:
|
||||||
add edi, 256
|
add edi, 256
|
||||||
or [edi+0x80000+0xA8], dword 00100000b
|
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
|
||||||
loop set_mouse_event
|
loop set_mouse_event
|
||||||
mouse_not_active:
|
mouse_not_active:
|
||||||
|
|
||||||
@ -3474,12 +3448,12 @@ checkmisc:
|
|||||||
jz nobackgr
|
jz nobackgr
|
||||||
mov [0xfff0],byte 2
|
mov [0xfff0],byte 2
|
||||||
call change_task
|
call change_task
|
||||||
mov [draw_data+32+0],dword 0
|
mov [draw_data+32 + RECT.left],dword 0
|
||||||
mov [draw_data+32+4],dword 0
|
mov [draw_data+32 + RECT.top],dword 0
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
mov ebx,[0xfe04]
|
mov ebx,[0xfe04]
|
||||||
mov [draw_data+32+8],eax
|
mov [draw_data+32 + RECT.right],eax
|
||||||
mov [draw_data+32+12],ebx
|
mov [draw_data+32 + RECT.bottom],ebx
|
||||||
call drawbackground
|
call drawbackground
|
||||||
mov [0xfff0],byte 0
|
mov [0xfff0],byte 0
|
||||||
mov [0xfff4],byte 0
|
mov [0xfff4],byte 0
|
||||||
@ -3502,7 +3476,7 @@ checkmisc:
|
|||||||
movzx ecx,byte [0xff00]
|
movzx ecx,byte [0xff00]
|
||||||
add ecx,5
|
add ecx,5
|
||||||
markz:
|
markz:
|
||||||
mov [edx+0xa],byte 3
|
mov [edx+TASKDATA.state],byte 3
|
||||||
add edx,0x20
|
add edx,0x20
|
||||||
loop markz
|
loop markz
|
||||||
|
|
||||||
@ -3519,7 +3493,7 @@ checkmisc:
|
|||||||
|
|
||||||
|
|
||||||
mov eax,[0x3004] ; termination
|
mov eax,[0x3004] ; termination
|
||||||
mov ebx,0x3020+0xa
|
mov ebx,0x3020+TASKDATA.state
|
||||||
mov esi,1
|
mov esi,1
|
||||||
|
|
||||||
newct:
|
newct:
|
||||||
@ -3570,10 +3544,10 @@ redrawscreen:
|
|||||||
cmp ecx,1 ; limit for background
|
cmp ecx,1 ; limit for background
|
||||||
jz bgli
|
jz bgli
|
||||||
|
|
||||||
mov eax,[edi+0]
|
mov eax, [edi + WDATA.box.left]
|
||||||
mov ebx,[edi+4]
|
mov ebx, [edi + WDATA.box.top]
|
||||||
mov ecx,[edi+8]
|
mov ecx, [edi + WDATA.box.width]
|
||||||
mov edx,[edi+12]
|
mov edx, [edi + WDATA.box.height]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
|
|
||||||
@ -3585,10 +3559,10 @@ redrawscreen:
|
|||||||
cmp ecx,eax
|
cmp ecx,eax
|
||||||
jb ricino
|
jb ricino
|
||||||
|
|
||||||
mov eax,[edi+0]
|
mov eax, [edi + WDATA.box.left]
|
||||||
mov ebx,[edi+4]
|
mov ebx, [edi + WDATA.box.top]
|
||||||
mov ecx,[edi+8]
|
mov ecx, [edi + WDATA.box.width]
|
||||||
mov edx,[edi+12]
|
mov edx, [edi + WDATA.box.height]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
|
|
||||||
@ -3609,13 +3583,13 @@ redrawscreen:
|
|||||||
add eax,draw_data-window_data
|
add eax,draw_data-window_data
|
||||||
|
|
||||||
mov ebx,[dlx] ; set limits
|
mov ebx,[dlx] ; set limits
|
||||||
mov [eax+0],ebx
|
mov [eax + RECT.left], ebx
|
||||||
mov ebx,[dly]
|
mov ebx,[dly]
|
||||||
mov [eax+4],ebx
|
mov [eax + RECT.top], ebx
|
||||||
mov ebx,[dlxe]
|
mov ebx,[dlxe]
|
||||||
mov [eax+8],ebx
|
mov [eax + RECT.right], ebx
|
||||||
mov ebx,[dlye]
|
mov ebx,[dlye]
|
||||||
mov [eax+12],ebx
|
mov [eax + RECT.bottom], ebx
|
||||||
|
|
||||||
sub eax,draw_data-window_data
|
sub eax,draw_data-window_data
|
||||||
|
|
||||||
@ -3628,7 +3602,7 @@ redrawscreen:
|
|||||||
newdw8:
|
newdw8:
|
||||||
nobgrd:
|
nobgrd:
|
||||||
|
|
||||||
mov [eax+31],byte 1 ; mark as redraw
|
mov [eax + WDATA.fl_redraw],byte 1 ; mark as redraw
|
||||||
|
|
||||||
ricino:
|
ricino:
|
||||||
|
|
||||||
@ -3707,7 +3681,7 @@ set_app_param:
|
|||||||
push edi
|
push edi
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov [edi],eax
|
mov [edi+TASKDATA.event_mask],eax
|
||||||
|
|
||||||
pop edi
|
pop edi
|
||||||
ret
|
ret
|
||||||
@ -3719,11 +3693,11 @@ delay_hs: ; delay in 1/100 secs
|
|||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
|
|
||||||
mov edx,[timer_ticks];[0xfdf0]
|
mov edx,[timer_ticks]
|
||||||
add edx,eax
|
add edx,eax
|
||||||
|
|
||||||
newtic:
|
newtic:
|
||||||
mov ecx,[timer_ticks];[0xfdf0]
|
mov ecx,[timer_ticks]
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
jbe zerodelay
|
jbe zerodelay
|
||||||
|
|
||||||
@ -3824,13 +3798,12 @@ align 4
|
|||||||
sys_programirq:
|
sys_programirq:
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add eax,[edi+TASKDATA.mem_start]
|
||||||
add eax,[edi]
|
|
||||||
|
|
||||||
cmp ebx,16
|
cmp ebx,16
|
||||||
jae .not_owner
|
jae .not_owner
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+0x4]
|
mov edi,[edi+TASKDATA.pid]
|
||||||
cmp edi,[irq_owner+ebx*4]
|
cmp edi,[irq_owner+ebx*4]
|
||||||
je spril1
|
je spril1
|
||||||
.not_owner:
|
.not_owner:
|
||||||
@ -3859,7 +3832,7 @@ get_irq_data:
|
|||||||
add edx,irq_owner
|
add edx,irq_owner
|
||||||
mov edx,[edx]
|
mov edx,[edx]
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+0x4]
|
mov edi,[edi+TASKDATA.pid]
|
||||||
cmp edx,edi
|
cmp edx,edi
|
||||||
je gidril1
|
je gidril1
|
||||||
.not_owner:
|
.not_owner:
|
||||||
@ -4011,7 +3984,7 @@ r_f_port_area:
|
|||||||
shl edi,4
|
shl edi,4
|
||||||
add edi,0x2d0000
|
add edi,0x2d0000
|
||||||
mov esi,[0x3010]
|
mov esi,[0x3010]
|
||||||
mov esi,[esi+0x4]
|
mov esi,[esi+TASKDATA.pid]
|
||||||
mov [edi],esi
|
mov [edi],esi
|
||||||
mov [edi+4],ebx
|
mov [edi+4],ebx
|
||||||
mov [edi+8],ecx
|
mov [edi+8],ecx
|
||||||
@ -4030,7 +4003,7 @@ free_port_area:
|
|||||||
test esi,esi
|
test esi,esi
|
||||||
je frpal2
|
je frpal2
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov edx,[edx+4]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
frpal3:
|
frpal3:
|
||||||
mov edi,esi
|
mov edi,esi
|
||||||
shl edi,4
|
shl edi,4
|
||||||
@ -4104,7 +4077,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,[0x3010]
|
||||||
cmp edx,[eax+0x4]
|
cmp edx,[eax+TASKDATA.pid]
|
||||||
jne fril1
|
jne fril1
|
||||||
dec ecx
|
dec ecx
|
||||||
mov [edi],ecx
|
mov [edi],ecx
|
||||||
@ -4119,7 +4092,7 @@ reserve_free_irq:
|
|||||||
jnz ril1
|
jnz ril1
|
||||||
|
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov edx,[edx+0x4]
|
mov edx,[edx+TASKDATA.pid]
|
||||||
mov [edi],edx
|
mov [edi],edx
|
||||||
dec ecx
|
dec ecx
|
||||||
ril1:
|
ril1:
|
||||||
@ -4597,7 +4570,7 @@ sys_trace:
|
|||||||
|
|
||||||
mov esi,save_syscall_data ; data
|
mov esi,save_syscall_data ; data
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov edi,[edi+0x10]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ebx
|
add edi,ebx
|
||||||
cld
|
cld
|
||||||
rep movsb
|
rep movsb
|
||||||
@ -4619,7 +4592,7 @@ sys_process_def:
|
|||||||
jne no_set_keyboard_setup
|
jne no_set_keyboard_setup
|
||||||
|
|
||||||
shl edi,8
|
shl edi,8
|
||||||
mov [edi+0x800B4],bl
|
mov [edi+0x80000 + APPDATA.keyboard_mode],bl
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -4629,7 +4602,7 @@ sys_process_def:
|
|||||||
jne no_get_keyboard_setup
|
jne no_get_keyboard_setup
|
||||||
|
|
||||||
shl edi,8
|
shl edi,8
|
||||||
movzx eax, byte [0x800B4+edi]
|
movzx eax, byte [0x80000+edi + APPDATA.keyboard_mode]
|
||||||
|
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
|
|
||||||
@ -4734,8 +4707,8 @@ sys_ipc:
|
|||||||
mov edi,[0x3000]
|
mov edi,[0x3000]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,0x80000
|
||||||
mov [edi+0xA0],ebx
|
mov [edi + APPDATA.ipc_start], ebx
|
||||||
mov [edi+0xA4],ecx
|
mov [edi + APPDATA.ipc_size], ecx
|
||||||
mov [esp+36],dword 0
|
mov [esp+36],dword 0
|
||||||
ret
|
ret
|
||||||
no_ipc_def:
|
no_ipc_def:
|
||||||
@ -4745,7 +4718,7 @@ sys_ipc:
|
|||||||
mov esi,1
|
mov esi,1
|
||||||
mov edi,0x3020
|
mov edi,0x3020
|
||||||
ipcs1:
|
ipcs1:
|
||||||
cmp [edi+4],ebx
|
cmp [edi+TASKDATA.pid], ebx
|
||||||
je ipcs2
|
je ipcs2
|
||||||
add edi,0x20
|
add edi,0x20
|
||||||
inc esi
|
inc esi
|
||||||
@ -4760,22 +4733,22 @@ sys_ipc:
|
|||||||
push esi
|
push esi
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov ebx,[eax+0x80000+0xa0]
|
mov ebx,[eax+0x80000 + APPDATA.ipc_start]
|
||||||
test ebx,ebx ; ipc area not defined ?
|
test ebx,ebx ; ipc area not defined ?
|
||||||
je ipc_err1
|
je ipc_err1
|
||||||
|
|
||||||
add ebx,[eax+0x80000+0xa4]
|
add ebx,[eax+0x80000 + APPDATA.ipc_size]
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add ebx,[eax+0x3000+0x10] ; ebx <- max data position
|
add ebx,[eax+0x3000 + TASKDATA.mem_start] ; ebx <- max data position
|
||||||
|
|
||||||
mov eax,esi ; to
|
mov eax,esi ; to
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add esi,0x80000
|
add esi,0x80000
|
||||||
mov edi,[esi+0xa0]
|
mov edi,[esi+APPDATA.ipc_start]
|
||||||
shl eax,5
|
shl eax,5
|
||||||
add eax,0x3000
|
add eax,0x3000
|
||||||
add edi,[eax+0x10]
|
add edi,[eax+TASKDATA.mem_start]
|
||||||
|
|
||||||
cmp [edi],byte 0 ; overrun ?
|
cmp [edi],byte 0 ; overrun ?
|
||||||
jne ipc_err2
|
jne ipc_err2
|
||||||
@ -4786,7 +4759,7 @@ sys_ipc:
|
|||||||
|
|
||||||
mov esi,ecx ; from
|
mov esi,ecx ; from
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov eax,[eax+0x10]
|
mov eax,[eax+TASKDATA.mem_start]
|
||||||
add esi,eax
|
add esi,eax
|
||||||
|
|
||||||
mov ecx,edx ; size
|
mov ecx,edx ; size
|
||||||
@ -4799,7 +4772,7 @@ sys_ipc:
|
|||||||
push ecx
|
push ecx
|
||||||
|
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov eax,[eax+4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [edi-8],eax
|
mov [edi-8],eax
|
||||||
mov [edi-4],ecx
|
mov [edi-4],ecx
|
||||||
cld
|
cld
|
||||||
@ -4813,7 +4786,7 @@ sys_ipc:
|
|||||||
|
|
||||||
mov edi,[esp]
|
mov edi,[esp]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
or dword [edi+0x80000+0xA8],dword 01000000b ; ipc message
|
or dword [edi+0x80000+APPDATA.event_mask],dword 01000000b ; ipc message
|
||||||
|
|
||||||
cmp [check_idle_semaphore],dword 20
|
cmp [check_idle_semaphore],dword 20
|
||||||
jge ipc_no_cis
|
jge ipc_no_cis
|
||||||
@ -4897,8 +4870,8 @@ syscall_setpixel: ; SetPixel
|
|||||||
|
|
||||||
|
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
add eax,[edx-twdw]
|
add eax,[edx-twdw+WDATA.box.left]
|
||||||
add ebx,[edx-twdw+4]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
mov edi,[0x3000]
|
mov edi,[0x3000]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
@ -4913,15 +4886,14 @@ align 4
|
|||||||
syscall_writetext: ; WriteText
|
syscall_writetext: ; WriteText
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov ebp,[edi-twdw]
|
mov ebp,[edi-twdw+WDATA.box.left]
|
||||||
mov esi,[0x3000]
|
mov esi,[0x3000]
|
||||||
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
|
||||||
add ebp,[edi-twdw+4]
|
add ebp,[edi-twdw+WDATA.box.top]
|
||||||
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
add edi,0x10
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
add ecx,[edi]
|
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
jmp dtext
|
jmp dtext
|
||||||
@ -4932,7 +4904,7 @@ syscall_openramdiskfile: ; OpenRamdiskFile
|
|||||||
|
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi, TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
mov esi,12
|
mov esi,12
|
||||||
@ -4978,7 +4950,7 @@ align 4
|
|||||||
|
|
||||||
syscall_startapp: ; StartApp
|
syscall_startapp: ; StartApp
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi, TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
test ebx,ebx
|
test ebx,ebx
|
||||||
jz noapppar
|
jz noapppar
|
||||||
@ -5032,7 +5004,7 @@ align 4
|
|||||||
syscall_delramdiskfile: ; DelRamdiskFile
|
syscall_delramdiskfile: ; DelRamdiskFile
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi, TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
call filedelete
|
call filedelete
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
@ -5043,7 +5015,7 @@ align 4
|
|||||||
syscall_writeramdiskfile: ; WriteRamdiskFile
|
syscall_writeramdiskfile: ; WriteRamdiskFile
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi, TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
call filesave
|
call filesave
|
||||||
@ -5069,7 +5041,7 @@ align 4
|
|||||||
syscall_readstring: ; ReadString
|
syscall_readstring: ; ReadString
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi, TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
call read_string
|
call read_string
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
@ -5080,7 +5052,7 @@ align 4
|
|||||||
syscall_drawline: ; DrawLine
|
syscall_drawline: ; DrawLine
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
movzx edx,word[edi-twdw]
|
movzx edx,word[edi-twdw+WDATA.box.left]
|
||||||
mov ebp,edx
|
mov ebp,edx
|
||||||
mov esi,[0x3000]
|
mov esi,[0x3000]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
@ -5088,7 +5060,7 @@ syscall_drawline: ; DrawLine
|
|||||||
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
shl edx,16
|
shl edx,16
|
||||||
add ebp,edx
|
add ebp,edx
|
||||||
movzx edx,word[edi-twdw+4]
|
movzx edx,word[edi-twdw+WDATA.box.top]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
mov ebp,edx
|
mov ebp,edx
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
@ -5167,7 +5139,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,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ecx,[edi]
|
add ecx,[edi]
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
@ -5184,7 +5156,7 @@ align 4
|
|||||||
write_to_hd: ; Write a file to hd
|
write_to_hd: ; Write a file to hd
|
||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ecx,[edi]
|
add ecx,[edi]
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
|
@ -107,12 +107,13 @@ WSTATE_WNDDRAWN = 00000010b
|
|||||||
WSTYLE_HASCAPTION = 00010000b
|
WSTYLE_HASCAPTION = 00010000b
|
||||||
WSTYLE_CLIENTRELATIVE = 00100000b
|
WSTYLE_CLIENTRELATIVE = 00100000b
|
||||||
|
|
||||||
struc TASKLIST
|
struc TASKDATA
|
||||||
{
|
{
|
||||||
.event_mask dd ?
|
.event_mask dd ?
|
||||||
.pid dd ?
|
.pid dd ?
|
||||||
dw ?
|
dw ?
|
||||||
.state dw ?
|
.state db ?
|
||||||
|
db ?
|
||||||
dw ?
|
dw ?
|
||||||
.wnd_number db ?
|
.wnd_number db ?
|
||||||
db ?
|
db ?
|
||||||
@ -122,7 +123,7 @@ struc TASKLIST
|
|||||||
.cpu_usage dd ?
|
.cpu_usage dd ?
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
TASKLIST TASKLIST
|
TASKDATA TASKDATA
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
; structures definition
|
; structures definition
|
||||||
@ -145,19 +146,19 @@ struc APPDATA
|
|||||||
{
|
{
|
||||||
.app_name db 11 dup(?)
|
.app_name db 11 dup(?)
|
||||||
db 5 dup(?)
|
db 5 dup(?)
|
||||||
.fpu_save_area db 108 dup(?)
|
.fpu_save_area: db 108 dup(?)
|
||||||
db 3 dup(?)
|
db 3 dup(?)
|
||||||
.is_fpu_saved db ?
|
.is_fpu_saved db ?
|
||||||
.wnd_shape dd ?
|
.wnd_shape dd ?
|
||||||
.wnd_shape_scale dd ?
|
.wnd_shape_scale dd ?
|
||||||
.gdt dd ?
|
dd ?
|
||||||
.mem_size dd ?
|
.mem_size dd ?
|
||||||
.saved_box BOX
|
.saved_box BOX
|
||||||
.ipc_start dd ?
|
.ipc_start dd ?
|
||||||
.ipc_size dd ?
|
.ipc_size dd ?
|
||||||
.event_mask dd ?
|
.event_mask dd ?
|
||||||
.debugger_slot dd ?
|
.debugger_slot dd ?
|
||||||
.int40_handler dd ?
|
dd ?
|
||||||
.keyboard_mode db ?
|
.keyboard_mode db ?
|
||||||
db 3 dup(?)
|
db 3 dup(?)
|
||||||
.dir_table dd ?
|
.dir_table dd ?
|
||||||
|
@ -44,7 +44,9 @@
|
|||||||
;
|
;
|
||||||
; 20 dword application event mask
|
; 20 dword application event mask
|
||||||
; 24 dword PID - process identification number
|
; 24 dword PID - process identification number
|
||||||
; 2a word 0, state 1,2=suspended 3=zombie, 4=terminate
|
; 2a byte slot state: 0=running, 1,2=suspended
|
||||||
|
; 3=zombie, 4=terminate,
|
||||||
|
; 5=waiting for event, 9 = not used
|
||||||
; 2e byte window number on screen
|
; 2e byte window number on screen
|
||||||
; 30 dword exact position in memory
|
; 30 dword exact position in memory
|
||||||
; 34 dword counter sum
|
; 34 dword counter sum
|
||||||
@ -134,7 +136,7 @@
|
|||||||
; 7f byte 0= no fpu saved , 1= fpu saved to 0x10 -> restore
|
; 7f byte 0= no fpu saved , 1= fpu saved to 0x10 -> restore
|
||||||
; 80 dword address of random shaped window area
|
; 80 dword address of random shaped window area
|
||||||
; 84 byte shape area scale
|
; 84 byte shape area scale
|
||||||
; 88 dword used GDT of TSS
|
; 88 dword free
|
||||||
; 8C dword application memory size
|
; 8C dword application memory size
|
||||||
; 90 dword window X position save
|
; 90 dword window X position save
|
||||||
; 94 dword window Y position save
|
; 94 dword window Y position save
|
||||||
@ -144,7 +146,7 @@
|
|||||||
; A4 dword IPC memory size
|
; A4 dword IPC memory size
|
||||||
; A8 dword event bits: mouse, stack,..
|
; A8 dword event bits: mouse, stack,..
|
||||||
; AC dword 0 or debugger slot
|
; AC dword 0 or debugger slot
|
||||||
; B0 dword int40 handler in use ; 0 if not in use
|
; B0 dword free
|
||||||
; B4 byte keyboard mode: 0 = keymap, 1 = scancodes
|
; B4 byte keyboard mode: 0 = keymap, 1 = scancodes
|
||||||
; B8 dword physical address of directory table
|
; B8 dword physical address of directory table
|
||||||
; BC dword address of debug event memory
|
; BC dword address of debug event memory
|
||||||
|
@ -995,7 +995,7 @@ stack_get_packet:
|
|||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
|
|
||||||
@ -1058,7 +1058,7 @@ stack_insert_packet:
|
|||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
|
|
||||||
@ -1117,7 +1117,7 @@ socket_open:
|
|||||||
mov [eax + 24], dword 0 ; recieved data count
|
mov [eax + 24], dword 0 ; recieved data count
|
||||||
|
|
||||||
mov esi, [0x3010]
|
mov esi, [0x3010]
|
||||||
mov ebx, [esi+0x4]
|
mov ebx, [esi+TASKDATA.pid]
|
||||||
mov [eax + 4], ebx ; save the process ID
|
mov [eax + 4], 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
|
||||||
|
|
||||||
@ -1176,7 +1176,7 @@ sot_001:
|
|||||||
mov [eax + 28], ebx ; Indicate the state of the TCB
|
mov [eax + 28], ebx ; Indicate the state of the TCB
|
||||||
|
|
||||||
mov esi, [0x3010]
|
mov esi, [0x3010]
|
||||||
mov ecx, [esi+0x4]
|
mov ecx, [esi+TASKDATA.pid]
|
||||||
mov [eax + 4], ecx ; save the process ID
|
mov [eax + 4], ecx ; save the process ID
|
||||||
|
|
||||||
cmp ebx, TCB_LISTEN
|
cmp ebx, TCB_LISTEN
|
||||||
@ -1548,7 +1548,7 @@ socket_write:
|
|||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
|
|
||||||
@ -1671,7 +1671,7 @@ socket_write_tcp:
|
|||||||
|
|
||||||
; Get the address of the callers data
|
; Get the address of the callers data
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add edx,[edi]
|
add edx,[edi]
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
|
|
||||||
|
@ -1004,7 +1004,7 @@ 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+0x4
|
mov esi,0x3020+TASKDATA.pid
|
||||||
|
|
||||||
news:
|
news:
|
||||||
cmp [esi],eax
|
cmp [esi],eax
|
||||||
@ -1016,7 +1016,7 @@ news:
|
|||||||
|
|
||||||
foundPID1:
|
foundPID1:
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
or dword [ecx+0x80000+0xA8],dword 10000000b ; stack event
|
or dword [ecx+0x80000+APPDATA.event_mask],dword 10000000b ; stack event
|
||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ udprx_002:
|
|||||||
; 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+0x4
|
mov esi,0x3020+TASKDATA.pid
|
||||||
|
|
||||||
newsearch:
|
newsearch:
|
||||||
cmp [esi],eax
|
cmp [esi],eax
|
||||||
@ -126,7 +126,7 @@ newsearch:
|
|||||||
|
|
||||||
foundPID:
|
foundPID:
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
or dword [ecx+0x80000+0xA8],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
|
||||||
|
|
||||||
|
@ -31,7 +31,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,[0x3010]
|
||||||
add edi,0x10
|
add edi,TASKDATA.mem_start
|
||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
call code_SB16_load_music
|
call code_SB16_load_music
|
||||||
ret
|
ret
|
||||||
@ -78,7 +78,7 @@ sound_interface:
|
|||||||
; mov [memAdrNote], eax
|
; mov [memAdrNote], eax
|
||||||
mov [memAdrNote],edx
|
mov [memAdrNote],edx
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov eax,[eax+4]
|
mov eax,[eax+TASKDATA.pid]
|
||||||
mov [pidProcessNote],eax
|
mov [pidProcessNote],eax
|
||||||
xor eax, eax ; Ok! EAX = 0
|
xor eax, eax ; Ok! EAX = 0
|
||||||
retFunc55:
|
retFunc55:
|
||||||
|
@ -208,8 +208,8 @@ vesa12_drawbackground:
|
|||||||
mov ebx,3
|
mov ebx,3
|
||||||
mul ebx
|
mul ebx
|
||||||
mov [imax],eax
|
mov [imax],eax
|
||||||
mov eax,[draw_data+32+0]
|
mov eax,[draw_data+32+RECT.left]
|
||||||
mov ebx,[draw_data+32+4]
|
mov ebx,[draw_data+32+RECT.top]
|
||||||
mov edi,0 ;no force
|
mov edi,0 ;no force
|
||||||
|
|
||||||
v12dp3:
|
v12dp3:
|
||||||
@ -330,15 +330,15 @@ vesa12_drawbackground:
|
|||||||
popa
|
popa
|
||||||
add esi,3
|
add esi,3
|
||||||
inc eax
|
inc eax
|
||||||
cmp eax,[draw_data+32+8]
|
cmp eax,[draw_data+32+RECT.right]
|
||||||
jg v12nodp31
|
jg v12nodp31
|
||||||
jmp v12dp3
|
jmp v12dp3
|
||||||
|
|
||||||
v12nodp31:
|
v12nodp31:
|
||||||
|
|
||||||
mov eax,[draw_data+32+0]
|
mov eax,[draw_data+32+RECT.left]
|
||||||
inc ebx
|
inc ebx
|
||||||
cmp ebx,[draw_data+32+12]
|
cmp ebx,[draw_data+32+RECT.bottom]
|
||||||
jg v12dp4
|
jg v12dp4
|
||||||
jmp v12dp3
|
jmp v12dp3
|
||||||
|
|
||||||
@ -365,8 +365,8 @@ vesa12_drawbar:
|
|||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
mov ecx,[0x3010]
|
mov ecx,[0x3010]
|
||||||
add eax,[ecx-twdw]
|
add eax,[ecx-twdw+WDATA.box.left]
|
||||||
add ebx,[ecx-twdw+4]
|
add ebx,[ecx-twdw+WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
mov eax,ebx ; y
|
mov eax,ebx ; y
|
||||||
mov ebx,[0xfe08]
|
mov ebx,[0xfe08]
|
||||||
@ -403,16 +403,16 @@ vesa12_drawbar:
|
|||||||
push eax
|
push eax
|
||||||
push ecx
|
push ecx
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov ecx,[eax+draw_data-0x3000+0]
|
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+4]
|
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+8]
|
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||||
cmp ecx,[0xfe00]
|
cmp ecx,[0xfe00]
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
mov ecx,[eax+draw_data-0x3000+12]
|
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||||
cmp ecx,[0xfe04]
|
cmp ecx,[0xfe04]
|
||||||
jnz dbcblimitlset12
|
jnz dbcblimitlset12
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -726,8 +726,8 @@ vesa12_putimage:
|
|||||||
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,[0x3010]
|
||||||
add eax,[ecx-twdw]
|
add eax,[ecx-twdw+WDATA.box.left]
|
||||||
add ebx,[ecx-twdw+4]
|
add ebx,[ecx-twdw+WDATA.box.top]
|
||||||
push eax
|
push eax
|
||||||
mov eax,ebx ; y
|
mov eax,ebx ; y
|
||||||
mov ebx,[0xfe08]
|
mov ebx,[0xfe08]
|
||||||
@ -765,16 +765,16 @@ vesa12_putimage:
|
|||||||
push eax
|
push eax
|
||||||
push ecx
|
push ecx
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov ecx,[eax+draw_data-0x3000+0]
|
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
mov ecx,[eax+draw_data-0x3000+4]
|
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
mov ecx,[eax+draw_data-0x3000+8]
|
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||||
cmp ecx,[0xfe00]
|
cmp ecx,[0xfe00]
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
mov ecx,[eax+draw_data-0x3000+12]
|
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||||
cmp ecx,[0xfe04]
|
cmp ecx,[0xfe04]
|
||||||
jnz dbcblimitlset212
|
jnz dbcblimitlset212
|
||||||
pop ecx
|
pop ecx
|
||||||
|
@ -118,15 +118,15 @@ vesa20_putimage:
|
|||||||
|
|
||||||
; calculate absolute (i.e. screen) coordinates
|
; calculate absolute (i.e. screen) coordinates
|
||||||
mov eax, [0x3010]
|
mov eax, [0x3010]
|
||||||
mov ebx, [eax-twdw + 0]
|
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
|
||||||
mov ebx, [eax-twdw + 4]
|
mov ebx, [eax-twdw + WDATA.box.top]
|
||||||
add ebx, [putimg.image_cy]
|
add ebx, [putimg.image_cy]
|
||||||
mov [putimg.abs_cy], ebx
|
mov [putimg.abs_cy], ebx
|
||||||
|
|
||||||
; real_sx = MIN(wnd_sx-image_cx, image_sx);
|
; real_sx = MIN(wnd_sx-image_cx, image_sx);
|
||||||
mov ebx, [eax-twdw + 8] ; ebx = wnd_sx
|
mov ebx, [eax-twdw + WDATA.box.width] ; ebx = wnd_sx
|
||||||
sub ebx, [putimg.image_cx]
|
sub ebx, [putimg.image_cx]
|
||||||
ja @f
|
ja @f
|
||||||
add esp, putimg.stack_data
|
add esp, putimg.stack_data
|
||||||
@ -142,7 +142,7 @@ vesa20_putimage:
|
|||||||
mov [putimg.real_sx], ebx
|
mov [putimg.real_sx], ebx
|
||||||
|
|
||||||
; init real_sy
|
; init real_sy
|
||||||
mov ebx, [eax-twdw + 12] ; ebx = wnd_sy
|
mov ebx, [eax-twdw + WDATA.box.height] ; ebx = wnd_sy
|
||||||
sub ebx, [putimg.image_cy]
|
sub ebx, [putimg.image_cy]
|
||||||
ja @f
|
ja @f
|
||||||
add esp, putimg.stack_data
|
add esp, putimg.stack_data
|
||||||
@ -602,13 +602,13 @@ vesa20_drawbar:
|
|||||||
mov [drbar.bar_cy], ebx
|
mov [drbar.bar_cy], ebx
|
||||||
|
|
||||||
mov edi, [0x3010]
|
mov edi, [0x3010]
|
||||||
add eax, [edi-twdw + 0] ; win_cx
|
add eax, [edi-twdw + WDATA.box.left] ; win_cx
|
||||||
add ebx, [edi-twdw + 4] ; win_cy
|
add ebx, [edi-twdw + WDATA.box.top] ; win_cy
|
||||||
mov [drbar.abs_cx], eax
|
mov [drbar.abs_cx], eax
|
||||||
mov [drbar.abs_cy], ebx
|
mov [drbar.abs_cy], ebx
|
||||||
|
|
||||||
; real_sx = MIN(wnd_sx-bar_cx, bar_sx);
|
; real_sx = MIN(wnd_sx-bar_cx, bar_sx);
|
||||||
mov ebx, [edi-twdw + 8] ; ebx = wnd_sx
|
mov ebx, [edi-twdw + WDATA.box.width] ; ebx = wnd_sx
|
||||||
sub ebx, [drbar.bar_cx]
|
sub ebx, [drbar.bar_cx]
|
||||||
ja @f
|
ja @f
|
||||||
.exit: ;// mike.dld, 2005-01-29
|
.exit: ;// mike.dld, 2005-01-29
|
||||||
@ -626,7 +626,7 @@ vesa20_drawbar:
|
|||||||
mov [drbar.real_sx], ebx
|
mov [drbar.real_sx], ebx
|
||||||
|
|
||||||
; real_sy = MIN(wnd_sy-bar_cy, bar_sy);
|
; real_sy = MIN(wnd_sy-bar_cy, bar_sy);
|
||||||
mov ebx, [edi-twdw + 12] ; ebx = wnd_sy
|
mov ebx, [edi-twdw + WDATA.box.height] ; ebx = wnd_sy
|
||||||
sub ebx, [drbar.bar_cy]
|
sub ebx, [drbar.bar_cy]
|
||||||
ja @f
|
ja @f
|
||||||
add esp, drbar.stack_data
|
add esp, drbar.stack_data
|
||||||
@ -852,8 +852,8 @@ vesa20_drawbackground_tiled:
|
|||||||
add edx,dword [WinMapAddress-8] ; +B
|
add edx,dword [WinMapAddress-8] ; +B
|
||||||
push edx
|
push edx
|
||||||
|
|
||||||
mov ebp,[draw_data+32+0] ; x start:=(x+Xwin)
|
mov ebp,[draw_data+32+RECT.left] ; x start:=(x+Xwin)
|
||||||
mov ebx,[draw_data+32+4] ; y start:=(y+Ywin)
|
mov ebx,[draw_data+32+RECT.top] ; y start:=(y+Ywin)
|
||||||
|
|
||||||
mov eax,[BytesPerScanLine]
|
mov eax,[BytesPerScanLine]
|
||||||
mul ebx
|
mul ebx
|
||||||
@ -934,14 +934,14 @@ vesa20_drawbackground_tiled:
|
|||||||
inc edi ; ptrBuffer++
|
inc edi ; ptrBuffer++
|
||||||
add esi,3 ; ptrImage+=3
|
add esi,3 ; ptrImage+=3
|
||||||
inc eax
|
inc eax
|
||||||
cmp eax,[draw_data+32+8] ; X > xend?
|
cmp eax,[draw_data+32+RECT.right] ; X > xend?
|
||||||
; jg nodp3
|
; jg nodp3
|
||||||
; jmp dp3
|
; jmp dp3
|
||||||
;
|
;
|
||||||
; nodp3:
|
; nodp3:
|
||||||
jle dp3
|
jle dp3
|
||||||
|
|
||||||
mov ebp,[draw_data+32+0]
|
mov ebp,[draw_data+32+RECT.left]
|
||||||
|
|
||||||
inc ebx
|
inc ebx
|
||||||
|
|
||||||
@ -961,7 +961,7 @@ vesa20_drawbackground_tiled:
|
|||||||
|
|
||||||
call calculate_edi
|
call calculate_edi
|
||||||
|
|
||||||
cmp ebx,[draw_data+32+12]
|
cmp ebx,[draw_data+32+RECT.bottom]
|
||||||
; jg dp4
|
; jg dp4
|
||||||
;
|
;
|
||||||
; jmp dp3
|
; jmp dp3
|
||||||
@ -997,8 +997,8 @@ vesa20_drawbackground_stretch:
|
|||||||
add edx,dword [WinMapAddress-8] ; +B
|
add edx,dword [WinMapAddress-8] ; +B
|
||||||
push edx
|
push edx
|
||||||
|
|
||||||
mov ebp,[draw_data+32+0] ; x start:=(x+Xwin)
|
mov ebp,[draw_data+32+RECT.left] ; x start:=(x+Xwin)
|
||||||
mov ebx,[draw_data+32+4] ; y start:=(y+Ywin)
|
mov ebx,[draw_data+32+RECT.top] ; y start:=(y+Ywin)
|
||||||
|
|
||||||
mov eax,[BytesPerScanLine]
|
mov eax,[BytesPerScanLine]
|
||||||
mul ebx
|
mul ebx
|
||||||
@ -1070,10 +1070,10 @@ vesa20_drawbackground_stretch:
|
|||||||
inc edi ; ptrBuffer++
|
inc edi ; ptrBuffer++
|
||||||
add esi,3 ; ptrImage+=3
|
add esi,3 ; ptrImage+=3
|
||||||
inc eax
|
inc eax
|
||||||
cmp eax,[draw_data+32+8] ; X > xend?
|
cmp eax,[draw_data+32+RECT.right] ; X > xend?
|
||||||
jle sdp3
|
jle sdp3
|
||||||
|
|
||||||
mov ebp,[draw_data+32+0]
|
mov ebp,[draw_data+32+RECT.left]
|
||||||
|
|
||||||
inc ebx
|
inc ebx
|
||||||
|
|
||||||
@ -1093,7 +1093,7 @@ vesa20_drawbackground_stretch:
|
|||||||
|
|
||||||
call calculate_edi
|
call calculate_edi
|
||||||
|
|
||||||
cmp ebx,[draw_data+32+12]
|
cmp ebx,[draw_data+32+RECT.bottom]
|
||||||
jle sdp3
|
jle sdp3
|
||||||
|
|
||||||
add esp,4
|
add esp,4
|
||||||
|
@ -71,8 +71,8 @@ vga_putimage:
|
|||||||
movzx eax,word [esp+2] ; eax:=x
|
movzx eax,word [esp+2] ; eax:=x
|
||||||
movzx ebx,word [esp+0] ; ebx:=y
|
movzx ebx,word [esp+0] ; ebx:=y
|
||||||
mov ecx,[0x3010] ;
|
mov ecx,[0x3010] ;
|
||||||
add eax,[ecx-twdw] ; eax+=Xwin
|
add eax,[ecx-twdw+WDATA.box.left] ; eax+=Xwin
|
||||||
add ebx,[ecx-twdw+4] ; ebx+=Ywin
|
add ebx,[ecx-twdw+WDATA.box.top] ; ebx+=Ywin
|
||||||
mov ecx,ebx ; ecx = y+Ywin
|
mov ecx,ebx ; ecx = y+Ywin
|
||||||
mov edx,eax ; edx = x+Xwin
|
mov edx,eax ; edx = x+Xwin
|
||||||
|
|
||||||
@ -104,19 +104,19 @@ vga_putimage:
|
|||||||
push eax ; LFB address
|
push eax ; LFB address
|
||||||
|
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
mov ecx,[eax+draw_data-0x3000+0]
|
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset_vga
|
jnz dbcblimitlset_vga
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+4]
|
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset_vga
|
jnz dbcblimitlset_vga
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+8]
|
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||||
cmp ecx,[0xfe00] ; ecx <> Screen X size
|
cmp ecx,[0xfe00] ; ecx <> Screen X size
|
||||||
jnz dbcblimitlset_vga
|
jnz dbcblimitlset_vga
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+12]
|
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||||
cmp ecx,[0xfe04] ; ecx <> Screen Y size
|
cmp ecx,[0xfe04] ; ecx <> Screen Y size
|
||||||
jnz dbcblimitlset_vga
|
jnz dbcblimitlset_vga
|
||||||
|
|
||||||
@ -323,8 +323,8 @@ vga_drawbar:
|
|||||||
push edx ; +0
|
push edx ; +0
|
||||||
|
|
||||||
mov ecx,[0x3010] ;
|
mov ecx,[0x3010] ;
|
||||||
add eax,[ecx-twdw] ; eax:=Xwin+x
|
add eax,[ecx-twdw+WDATA.box.left] ; eax:=Xwin+x
|
||||||
add ebx,[ecx-twdw+4] ; ebx:=Ywin+y
|
add ebx,[ecx-twdw+WDATA.box.top] ; ebx:=Ywin+y
|
||||||
mov ecx, eax ; ecx:=(x+Xwin)
|
mov ecx, eax ; ecx:=(x+Xwin)
|
||||||
mov edx, ebx ; edx:=(y+Ywin)
|
mov edx, ebx ; edx:=(y+Ywin)
|
||||||
|
|
||||||
@ -377,19 +377,19 @@ vga_drawbar:
|
|||||||
|
|
||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+0]
|
mov ecx,[eax+draw_data-0x3000+RECT.left]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset_vga2
|
jnz dbcblimitlset_vga2
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+4]
|
mov ecx,[eax+draw_data-0x3000+RECT.top]
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
jnz dbcblimitlset_vga2
|
jnz dbcblimitlset_vga2
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+8]
|
mov ecx,[eax+draw_data-0x3000+RECT.right]
|
||||||
cmp ecx,[0xfe00]
|
cmp ecx,[0xfe00]
|
||||||
jnz dbcblimitlset_vga2
|
jnz dbcblimitlset_vga2
|
||||||
|
|
||||||
mov ecx,[eax+draw_data-0x3000+12]
|
mov ecx,[eax+draw_data-0x3000+RECT.bottom]
|
||||||
cmp ecx,[0xfe04]
|
cmp ecx,[0xfe04]
|
||||||
jnz dbcblimitlset_vga2
|
jnz dbcblimitlset_vga2
|
||||||
|
|
||||||
@ -514,8 +514,8 @@ vga_drawbackground_tiled:
|
|||||||
add edx,dword [WinMapAddress-8] ; +B
|
add edx,dword [WinMapAddress-8] ; +B
|
||||||
push edx
|
push edx
|
||||||
|
|
||||||
mov eax,[draw_data+32+0] ; x start:=(x+Xwin)
|
mov eax,[draw_data+32+RECT.left] ; x start:=(x+Xwin)
|
||||||
mov ebx,[draw_data+32+4] ; y start:=(y+Ywin)
|
mov ebx,[draw_data+32+RECT.top] ; y start:=(y+Ywin)
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
|
|
||||||
@ -587,7 +587,7 @@ vga_drawbackground_tiled:
|
|||||||
nbgpvga:
|
nbgpvga:
|
||||||
|
|
||||||
inc eax ; x++
|
inc eax ; x++
|
||||||
cmp eax,[draw_data+32+8] ; X > xend?
|
cmp eax,[draw_data+32+RECT.right] ; X > xend?
|
||||||
jg nodp3vga
|
jg nodp3vga
|
||||||
|
|
||||||
test eax,0x07 ; x test modulo 8
|
test eax,0x07 ; x test modulo 8
|
||||||
@ -602,7 +602,7 @@ vga_drawbackground_tiled:
|
|||||||
|
|
||||||
nodp3vga:
|
nodp3vga:
|
||||||
|
|
||||||
mov eax,[draw_data+32+0] ; x+Xwin
|
mov eax,[draw_data+32+RECT.left] ; x+Xwin
|
||||||
inc ebx ; y position
|
inc ebx ; y position
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
@ -622,7 +622,7 @@ vga_drawbackground_tiled:
|
|||||||
|
|
||||||
call calculate_edi
|
call calculate_edi
|
||||||
|
|
||||||
cmp ebx,[draw_data+32+12] ; Y > yend
|
cmp ebx,[draw_data+32+RECT.bottom] ; Y > yend
|
||||||
jg dp4vga
|
jg dp4vga
|
||||||
|
|
||||||
jmp dp3vga
|
jmp dp3vga
|
||||||
@ -657,8 +657,8 @@ vga_drawbackground_stretch:
|
|||||||
add edx,dword [WinMapAddress-8] ; +B
|
add edx,dword [WinMapAddress-8] ; +B
|
||||||
push edx
|
push edx
|
||||||
|
|
||||||
mov eax,[draw_data+32+0] ; x start:=(x+Xwin)
|
mov eax,[draw_data+32+RECT.left] ; x start:=(x+Xwin)
|
||||||
mov ebx,[draw_data+32+4] ; y start:=(y+Ywin)
|
mov ebx,[draw_data+32+RECT.top] ; y start:=(y+Ywin)
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
|
|
||||||
@ -731,7 +731,7 @@ vga_drawbackground_stretch:
|
|||||||
snbgpvga:
|
snbgpvga:
|
||||||
|
|
||||||
inc eax ; x++
|
inc eax ; x++
|
||||||
cmp eax,[draw_data+32+8] ; X > xend?
|
cmp eax,[draw_data+32+RECT.right] ; X > xend?
|
||||||
jg snodp3vga
|
jg snodp3vga
|
||||||
|
|
||||||
test eax,0x07 ; x test modulo 8
|
test eax,0x07 ; x test modulo 8
|
||||||
@ -746,7 +746,7 @@ vga_drawbackground_stretch:
|
|||||||
|
|
||||||
snodp3vga:
|
snodp3vga:
|
||||||
|
|
||||||
mov eax,[draw_data+32+0] ; x+Xwin
|
mov eax,[draw_data+32+RECT.left] ; x+Xwin
|
||||||
inc ebx ; y position
|
inc ebx ; y position
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
@ -766,7 +766,7 @@ vga_drawbackground_stretch:
|
|||||||
|
|
||||||
call calculate_edi
|
call calculate_edi
|
||||||
|
|
||||||
cmp ebx,[draw_data+32+12] ; Y > yend
|
cmp ebx,[draw_data+32+RECT.bottom] ; Y > yend
|
||||||
jg sdp4vga
|
jg sdp4vga
|
||||||
|
|
||||||
jmp sdp3vga
|
jmp sdp3vga
|
||||||
|
Loading…
Reference in New Issue
Block a user