mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2025-09-23 03:15:38 -04:00
change functionality of f68:15, f68:18 (discussion on forum topic 1253)
git-svn-id: svn://kolibrios.org@1074 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4cb80b2638
commit
8d75380caf
@ -468,7 +468,7 @@ struc EVENT
|
|||||||
.id dd ? ;event uid
|
.id dd ? ;event uid
|
||||||
.state dd ? ;internal flags
|
.state dd ? ;internal flags
|
||||||
.code dd ?
|
.code dd ?
|
||||||
rd 6
|
rd 5
|
||||||
.size = $ - .magic
|
.size = $ - .magic
|
||||||
.codesize = $ - .code
|
.codesize = $ - .code
|
||||||
}
|
}
|
||||||
|
@ -181,110 +181,3 @@ except_7: ;#NM exception handler
|
|||||||
iglobal
|
iglobal
|
||||||
fpu_owner dd 0
|
fpu_owner dd 0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
reg_eip equ ebp+4
|
|
||||||
reg_cs equ ebp+8
|
|
||||||
reg_eflags equ ebp+12
|
|
||||||
reg_esp equ ebp+16
|
|
||||||
reg_ss equ ebp+20
|
|
||||||
|
|
||||||
align 4 ;not used now
|
|
||||||
proc except_16 ;fpu native exceptions handler
|
|
||||||
test byte [esp+8+2], 2
|
|
||||||
jnz v86_except_16
|
|
||||||
push ebp
|
|
||||||
mov ebp, esp
|
|
||||||
|
|
||||||
push eax
|
|
||||||
push ebx
|
|
||||||
push ecx
|
|
||||||
push edx
|
|
||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
|
||||||
shl ebx, 8
|
|
||||||
|
|
||||||
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_handler]
|
|
||||||
test eax, eax
|
|
||||||
jz .default
|
|
||||||
|
|
||||||
mov ecx, [reg_eip]
|
|
||||||
mov edx, [reg_esp]
|
|
||||||
sub edx, 4
|
|
||||||
mov [edx], ecx
|
|
||||||
mov [reg_esp], edx
|
|
||||||
mov dword [reg_eip], eax
|
|
||||||
|
|
||||||
pop edx
|
|
||||||
pop ecx
|
|
||||||
pop ebx
|
|
||||||
pop eax
|
|
||||||
|
|
||||||
leave
|
|
||||||
iretd
|
|
||||||
|
|
||||||
.default:
|
|
||||||
pop edx
|
|
||||||
pop ecx
|
|
||||||
pop ebx
|
|
||||||
pop eax
|
|
||||||
leave
|
|
||||||
|
|
||||||
save_ring3_context ;debugger support
|
|
||||||
|
|
||||||
mov bl, 16
|
|
||||||
jmp exc_c
|
|
||||||
endp
|
|
||||||
|
|
||||||
align 4 ;not used now
|
|
||||||
proc except_19 ;sse exceptions handler
|
|
||||||
test byte [esp+8+2], 2
|
|
||||||
jnz v86_except_19
|
|
||||||
push ebp
|
|
||||||
mov ebp, esp
|
|
||||||
|
|
||||||
push eax
|
|
||||||
push ebx
|
|
||||||
push ecx
|
|
||||||
push edx
|
|
||||||
|
|
||||||
mov ebx, [current_slot]
|
|
||||||
|
|
||||||
mov eax, [ebx+APPDATA.sse_handler]
|
|
||||||
test eax, eax
|
|
||||||
jz .default
|
|
||||||
|
|
||||||
mov ecx, [reg_eip]
|
|
||||||
mov edx, [reg_esp]
|
|
||||||
sub edx, 4
|
|
||||||
mov [edx], ecx
|
|
||||||
mov [reg_esp], edx
|
|
||||||
mov dword [reg_eip], eax
|
|
||||||
|
|
||||||
pop edx
|
|
||||||
pop ecx
|
|
||||||
pop ebx
|
|
||||||
pop eax
|
|
||||||
|
|
||||||
leave
|
|
||||||
iretd
|
|
||||||
|
|
||||||
.default:
|
|
||||||
pop edx
|
|
||||||
pop ecx
|
|
||||||
pop ebx
|
|
||||||
pop eax
|
|
||||||
leave
|
|
||||||
|
|
||||||
save_ring3_context ;debugger support
|
|
||||||
|
|
||||||
mov bl, 19
|
|
||||||
jmp exc_c
|
|
||||||
endp
|
|
||||||
|
|
||||||
restore reg_eip
|
|
||||||
restore reg_cs
|
|
||||||
restore reg_eflags
|
|
||||||
restore reg_esp
|
|
||||||
restore reg_ss
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1033,10 +1033,11 @@ f68:
|
|||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
.15:
|
.15:
|
||||||
mov ecx, [current_slot]
|
mov eax, [current_slot]
|
||||||
mov eax, [ecx+APPDATA.fpu_handler]
|
xchg ebx, [eax+APPDATA.exc_handler]
|
||||||
mov [ecx+APPDATA.fpu_handler], ebx
|
xchg ecx, [eax+APPDATA.except_mask]
|
||||||
mov [esp+36], eax
|
mov [esp+36], ebx ; reg_eax+8
|
||||||
|
mov [esp+24], ecx ; reg_ebx+8
|
||||||
ret
|
ret
|
||||||
.16:
|
.16:
|
||||||
test ebx, ebx
|
test ebx, ebx
|
||||||
@ -1051,11 +1052,12 @@ f68:
|
|||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
.18:
|
.18:
|
||||||
mov ecx, [current_slot]
|
mov eax, [current_slot]
|
||||||
mov eax, [ecx+APPDATA.sse_handler]
|
btr [eax+APPDATA.except_mask],ebx
|
||||||
mov [ecx+APPDATA.sse_handler], ebx
|
setc byte[esp+36]
|
||||||
mov [esp+36], eax
|
jecxz @f
|
||||||
ret
|
bts [eax+APPDATA.except_mask],ebx
|
||||||
|
@@: ret
|
||||||
.19:
|
.19:
|
||||||
cmp ebx, OS_BASE
|
cmp ebx, OS_BASE
|
||||||
jae .fail
|
jae .fail
|
||||||
|
@ -124,22 +124,20 @@ exc_c: ;
|
|||||||
Mov ds,ax,app_data ; çàãðóçèì ïðàâèëüíûå çíà÷åíèÿ
|
Mov ds,ax,app_data ; çàãðóçèì ïðàâèëüíûå çíà÷åíèÿ
|
||||||
mov es,ax ; â ñåãìåíòíûå ðåãèñòðû
|
mov es,ax ; â ñåãìåíòíûå ðåãèñòðû
|
||||||
cld ; è ïðèâîäèì DF ê ñòàíäàðòó
|
cld ; è ïðèâîäèì DF ê ñòàíäàðòó
|
||||||
|
movzx ebx,bl
|
||||||
; redirect to V86 manager? (EFLAGS & 0x20000) != 0?
|
; redirect to V86 manager? (EFLAGS & 0x20000) != 0?
|
||||||
test byte[reg_eflags+2],2
|
test byte[reg_eflags+2],2
|
||||||
jnz v86_exc_c
|
jnz v86_exc_c
|
||||||
cmp bl,14 ; #PF
|
cmp bl,14 ; #PF
|
||||||
jne .l0
|
jne @f
|
||||||
call page_fault_handler
|
call page_fault_handler
|
||||||
.l0: mov esi, [current_slot]
|
@@: mov esi, [current_slot]
|
||||||
mov eax,[esi+APPDATA.fpu_handler]
|
btr [esi+APPDATA.except_mask], ebx
|
||||||
cmp bl,16 ; #MF
|
jnc @f
|
||||||
je .l1
|
mov eax,[esi+APPDATA.exc_handler]
|
||||||
cmp bl,19 ; #XF
|
test eax, eax
|
||||||
jne .l2
|
|
||||||
mov eax,[esi+APPDATA.sse_handler]
|
|
||||||
.l1: test eax, eax
|
|
||||||
jnz IRetToUserHook
|
jnz IRetToUserHook
|
||||||
.l2: cli
|
@@: cli
|
||||||
mov eax, [esi+APPDATA.debugger_slot]
|
mov eax, [esi+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .debug
|
jnz .debug
|
||||||
@ -154,15 +152,16 @@ exc_c: ;
|
|||||||
; eax=debugger PID
|
; eax=debugger PID
|
||||||
cmp bl,1 ; #DB
|
cmp bl,1 ; #DB
|
||||||
je debug_ex
|
je debug_ex
|
||||||
movzx edx, bl ; debug_message data=Number_Of_Exception
|
mov edx, ebx ; debug_message data=Number_Of_Exception
|
||||||
mov ecx,1 ; debug_message code=other_exception
|
mov ecx,1 ; debug_message code=other_exception
|
||||||
jmp debug_ex.notify ; notify debugger and suspend ourself
|
jmp debug_ex.notify ; notify debugger and suspend ourself
|
||||||
|
|
||||||
IRetToUserHook:
|
IRetToUserHook:
|
||||||
xchg eax, [reg_eip]
|
xchg eax, [reg_eip]
|
||||||
sub dword[reg_esp3], 4
|
sub dword[reg_esp3], 8
|
||||||
mov edi, [reg_esp3]
|
mov edi, [reg_esp3]
|
||||||
stosd
|
stosd
|
||||||
|
mov [edi], ebx
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
unknown_interrupt:
|
unknown_interrupt:
|
||||||
iretd
|
iretd
|
||||||
@ -176,8 +175,7 @@ show_error_parameters:
|
|||||||
cmp bl, 0x0e
|
cmp bl, 0x0e
|
||||||
jbe .l1
|
jbe .l1
|
||||||
.l0: mov bl, 0x09
|
.l0: mov bl, 0x09
|
||||||
.l1: movzx eax,bl
|
.l1: mov eax,[msg_fault_sel+ebx*4 - 0x08*4]
|
||||||
mov eax,[msg_fault_sel+eax*4 - 0x08*4]
|
|
||||||
DEBUGF 1, "K : %s\n", eax
|
DEBUGF 1, "K : %s\n", eax
|
||||||
mov eax, [reg_cs3+4]
|
mov eax, [reg_cs3+4]
|
||||||
mov edi, msg_sel_app
|
mov edi, msg_sel_app
|
||||||
|
@ -955,8 +955,8 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
|
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov [eax+SLOT_BASE+APPDATA.fpu_state], edi
|
mov [eax+SLOT_BASE+APPDATA.fpu_state], edi
|
||||||
mov [eax+SLOT_BASE+APPDATA.fpu_handler], 0
|
mov [eax+SLOT_BASE+APPDATA.exc_handler], 0
|
||||||
mov [eax+SLOT_BASE+APPDATA.sse_handler], 0
|
mov [eax+SLOT_BASE+APPDATA.except_mask], 0
|
||||||
|
|
||||||
;set default io permission map
|
;set default io permission map
|
||||||
mov [eax+SLOT_BASE+APPDATA.io_map],\
|
mov [eax+SLOT_BASE+APPDATA.io_map],\
|
||||||
|
@ -3641,30 +3641,49 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
¨«¨ ¯®¤äãªæ¨¥© 20.
|
¨«¨ ¯®¤äãªæ¨¥© 20.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
===== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 14 - ®¦¨¤ âì ¨§¢¥é¥¨ï ®â ¤à ©¢¥à . =====
|
==================== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 14 =======================
|
||||||
|
===== ަ¨¤ âì ¯®«ã票ï ᨣ « , ®â ¤àã£¨å ¯à¨«®¦¥¨©/¤à ©¢¥à®¢. =====
|
||||||
======================================================================
|
======================================================================
|
||||||
<EFBFBD> à ¬¥âàë:
|
<EFBFBD> à ¬¥âàë:
|
||||||
* eax = 68 - ®¬¥à äãªæ¨¨
|
* eax = 68 - ®¬¥à äãªæ¨¨
|
||||||
* ebx = 14 - ®¬¥à ¯®¤äãªæ¨¨
|
* ebx = 14 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
* ecx = 㪠§ â¥«ì ¡ãä¥à ¤«ï ¨ä®à¬ 樨 (8 ¡ ©â)
|
* ecx = 㪠§ â¥«ì ¡ãä¥à ¤«ï ¨ä®à¬ 樨 (24 ¡ ©â )
|
||||||
‚®§¢à é ¥¬®¥ § 票¥:
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
* ¡ãä¥à, ª®â®àë© ãª §ë¢ ¥â ecx, ᮤ¥à¦¨â á«¥¤ãîéãî ¨ä®à¬ æ¨î:
|
* ¡ãä¥à, ª®â®àë© ãª §ë¢ ¥â ecx, ᮤ¥à¦¨â á«¥¤ãîéãî ¨ä®à¬ æ¨î:
|
||||||
* +0: dword: ª®áâ â EV_INTR = 1
|
* +0: dword: ¨¤¥â¨ä¨ª â®à ¯®á«¥¤ãîé¨å ¤ ëå ᨣ «
|
||||||
* +4: dword: ¤ ë¥ ¤à ©¢¥à
|
* +4: ¤ ë¥ ¯à¨ï⮣® ᨣ « (20 ¡ ©â), ä®à¬ â ª®â®àëå
|
||||||
‡ ¬¥ç ¨ï:
|
®¯à¥¤¥«ï¥âáï ¯¥à¢ë¬ dword-®¬
|
||||||
* ’¥ªãé ï ॠ«¨§ æ¨ï ¢® ¢à¥¬ï ®¦¨¤ ¨ï âॡã¥â ¤®¢®«ì® "âï¦ñ«ëå"
|
|
||||||
®¯¥à 権 ¯¥à¥ª«îç¥¨ï ª®â¥ªáâ .
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 15 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© FPU. =
|
==== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 15 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© ===
|
||||||
======================================================================
|
======================================================================
|
||||||
<EFBFBD> à ¬¥âàë:
|
<EFBFBD> à ¬¥âàë:
|
||||||
* eax = 68 - ®¬¥à äãªæ¨¨
|
* eax = 68 - ®¬¥à äãªæ¨¨
|
||||||
* ebx = 15 - ®¬¥à ¯®¤äãªæ¨¨
|
* ebx = 15 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
* ecx = ¤à¥á ®¢®£® ®¡à ¡®â稪 ¨áª«î票©
|
* ecx = ¤à¥á ®¢®£® ®¡à ¡®â稪 ¨áª«î票©
|
||||||
|
* edx = ¬ ᪠®¡à ¡ âë¢ ¥¬ëå ¨áª«î票©
|
||||||
‚®§¢à é ¥¬®¥ § 票¥:
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
* eax = ¤à¥á áâ ண® ®¡à ¡®â稪 ¨áª«î票©
|
* eax = ¤à¥á áâ ண® ®¡à ¡®â稪 ¨áª«î票©
|
||||||
(0, ¥á«¨ ® ¥ ¡ë« ãáâ ®¢«¥)
|
(0, ¥á«¨ ® ¥ ¡ë« ãáâ ®¢«¥)
|
||||||
|
* ebx = ¬ ᪠áâ ண® ®¡à ¡®â稪 ¨áª«î票©
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* <20>®¬¥à ¡¨â ¢ ¬ ᪥ ¨áª«î票© ᮮ⢥âáâ¢ãîâ ®¬¥à㠨᪫îç¥¨ï ¯®
|
||||||
|
ᯥæ¨ä¨ª 樨 ¯à®æ¥áá®à (Intel-PC). ’ ª ¯à¨¬¥à, ¨áª«î票ï FPU
|
||||||
|
¨¬¥îâ ®¬¥à 16 (#MF), SSE - 19 (#XF).
|
||||||
|
* ‚ ¤ ®© ॠ«¨§ 樨 ¨£®à¨àã¥âáï § ¯à®á ¯¥à¥å¢ ⠨᪫î票ï 7
|
||||||
|
- á¨á⥬ ®¡à ¡ âë¢ ¥â #NM á ¬®áâ®ï⥫ì®.
|
||||||
|
* <20>®«ì§®¢ ⥫ì᪨© ®¡à ¡®â稪 ¯®«ãç ¥â ®¬¥à ¨áª«îç¥¨ï ¯ à ¬¥â஬
|
||||||
|
¢ á⥪¥. <20>®íâ®¬ã ¯à ¢¨«ìë© ¢ë室 ¨§ ®¡à ¡®â稪 : RET 4. ‚®§¢à â
|
||||||
|
¯à¨ í⮬ ¯à®¨§¢®¤¨âáï ª®¬ ¤ã, ¢ë§¢ ¢èãî ¨áª«î票¥.
|
||||||
|
* <20>ਠ¯¥à¥¤ ç¥ ã¯à ¢«¥¨ï ®¡à ¡®â稪㠨᪫î票©, á¡à áë¢ ¥âáï
|
||||||
|
ᮮ⢥âáâ¢ãî騩 ¡¨â ¢ ¬ ᪥ ¨áª«î票©. ‚®§¨ª®¢¥¨¥ í⮣® ¦¥
|
||||||
|
¨áª«îç¥¨ï ¢ ¯®á«¥¤á⢨¨ - ¯à¨¢¥¤¥â ª default-®¡à ¡®âª¥ â ª®¢®£®.
|
||||||
|
€ ¨¬¥®: ª § ¢¥à襨î à ¡®âë ¯à¨«®¦¥¨ï, ¨«¨ ¯à¨®áâ ®¢ª¥ á
|
||||||
|
®â¨ä¨ª 樥© ®â« ¦¨¢ î饬㠯ਫ®¦¥¨î.
|
||||||
|
* <20>®á«¥ § ¢¥àè¥¨ï ªà¨â¨ç¥áª¨å ¤¥©á⢨© ¢ ®¡à ¡®â稪¥ ¯®«ì§®¢ ⥫ï,
|
||||||
|
¢®ááâ ®¢«¥¨¥ ¡¨â ¬ ᪨ ¤ ®£® ¨áª«îç¥¨ï ¬®¦® ᤥ« âì
|
||||||
|
¯®¤äãªæ¨¥© 18. ‘¡à®á ä« £®¢ ¨áª«î票© ¢ ¬®¤ã«ïå FPU ¨ XMM -
|
||||||
|
â ª¦¥ ¢®§« £ ¥âáï ®¡à ¡®â稪 ¯®«ì§®¢ ⥫ï.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
=========== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 16 - § £à㧨âì ¤à ©¢¥à. ===========
|
=========== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 16 - § £à㧨âì ¤à ©¢¥à. ===========
|
||||||
@ -3705,15 +3724,19 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
* <20>।¢ à¨â¥«ì® ¤®«¦¥ ¡ëâì ¯®«ãç¥ åí¤« ¤à ©¢¥à ¯®¤äãªæ¨¥© 16.
|
* <20>।¢ à¨â¥«ì® ¤®«¦¥ ¡ëâì ¯®«ãç¥ åí¤« ¤à ©¢¥à ¯®¤äãªæ¨¥© 16.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 18 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© SSE. =
|
= ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 18 - ¨§¬¥¥¨¥ á®áâ®ï¨ï ªâ¨¢®á⨠ᨣ « =
|
||||||
======================================================================
|
======================================================================
|
||||||
<EFBFBD> à ¬¥âàë:
|
<EFBFBD> à ¬¥âàë:
|
||||||
* eax = 68 - ®¬¥à äãªæ¨¨
|
* eax = 68 - ®¬¥à äãªæ¨¨
|
||||||
* ebx = 18 - ®¬¥à ¯®¤äãªæ¨¨
|
* ebx = 18 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
* ecx = ¤à¥á ®¢®£® ®¡à ¡®â稪 ¨áª«î票©
|
* ecx = ®¬¥à ᨣ «
|
||||||
|
* edx = § 票¥ ãáâ ¢«¨¢ ¥¬®© ªâ¨¢®á⨠(0/1)
|
||||||
‚®§¢à é ¥¬®¥ § 票¥:
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
* eax = ¤à¥á áâ ண® ®¡à ¡®â稪 ¨áª«î票©
|
* eax = áâ ஥ § 票¥ ªâ¨¢®á⨠ᨣ « (0/1)
|
||||||
(0, ¥á«¨ ® ¥ ¡ë« ãáâ ®¢«¥)
|
‡ ¬¥ç ¨ï:
|
||||||
|
* ‚ ⥪ã饩 ॠ«¨§ 樨 ¨§¬¥ï¥âáï ⮫쪮 ¬ ᪠¯®«ì§®¢ ⥫ì᪮£®
|
||||||
|
®¡à ¡®â稪 ¨áª«î票©, ãáâ ®¢«¥®£® ¯®¤äãªæ¨¥© 15. <20>ਠí⮬
|
||||||
|
®¬¥à ᨣ « ᮮ⢥âáâ¢ã¥â ®¬¥à㠨᪫î票ï.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============= ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 19 - § £à㧨âì DLL. =============
|
============= ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 19 - § £à㧨âì DLL. =============
|
||||||
|
@ -3613,29 +3613,47 @@ Remarks:
|
|||||||
or subfunction 20.
|
or subfunction 20.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======== Function 68, subfunction 14 - wait for driver notify. =======
|
===================== Function 68, subfunction 14 ====================
|
||||||
|
====== Waiting delivering of signal from another program/driver ======
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Parameters:
|
||||||
* eax = 68 - function number
|
* eax = 68 - function number
|
||||||
* ebx = 14 - subfunction number
|
* ebx = 14 - subfunction number
|
||||||
* ecx = pointer to the buffer for information (8 bytes)
|
* ecx = pointer to the buffer for information (24 bytes)
|
||||||
Returned value:
|
Returned value:
|
||||||
* buffer pointed to by ecx contains the following information:
|
* buffer pointed to by ecx contains the following information:
|
||||||
* +0: dword: constant EV_INTR = 1
|
* +0: dword: identifier for underlying data of signal
|
||||||
* +4: dword: driver data
|
* +4: data of signal (20 bytes), format of which is defining by
|
||||||
Remarks:
|
first dword
|
||||||
* The current implementation at wait time uses "heavy" operations
|
|
||||||
of task switch.
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
====== Function 68, subfunction 15 - set FPU exception handler. ======
|
====== Function 68, subfunction 15 - set new exceptions handler ======
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Parameters:
|
||||||
* eax = 68 - function number
|
* eax = 68 - function number
|
||||||
* ebx = 15 - subfunction number
|
* ebx = 15 - subfunction number
|
||||||
* ecx = address of the new exception handler
|
* ecx = address of the new exception handler
|
||||||
|
* edx = the mask of processing exceptions
|
||||||
Returned value:
|
Returned value:
|
||||||
* eax = address of the old exception handler (0, if it was not set)
|
* eax = address of the old exception handler (0, if it was not set)
|
||||||
|
* ebx = the old mask of exception handler
|
||||||
|
Remarks:
|
||||||
|
* Bit number in mask of exceptions is correspond to exception number
|
||||||
|
by CPU-specification (Intel-PC). For example, FPU-exception have
|
||||||
|
number 16 (#MF), and SSE-exception - 19 (#XF)
|
||||||
|
* The current implementation ignore the inquiry for hook of 7
|
||||||
|
exception - system process #NM by one's own.
|
||||||
|
* User handler get exception number in stack parameter. So, correct
|
||||||
|
exit from handler is: RET 4. Return from handler is to the same
|
||||||
|
instruction, that was cause the exception
|
||||||
|
* When control is transfering to user handler, corresponding bit in
|
||||||
|
exception mask is clearing. Rising this exception in consequence
|
||||||
|
- reduce to default-handling. Exactly: terminating the application,
|
||||||
|
or suspending with debug-notify to owner.
|
||||||
|
* After completion of critical operations in user handler, it may be
|
||||||
|
rising corresponding bit in exception mask by using subfunction 18
|
||||||
|
Clearing exceptions flags in FPU and/or XMM modules - is
|
||||||
|
responsibility of user handler too.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============= Function 68, subfunction 16 - load driver. =============
|
============= Function 68, subfunction 16 - load driver. =============
|
||||||
@ -3676,14 +3694,19 @@ Remarks:
|
|||||||
* Previously one must obtain driver handle by subfunction 16.
|
* Previously one must obtain driver handle by subfunction 16.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
====== Function 68, subfunction 18 - set SSE exception handler. ======
|
==== Function 68, subfunction 18 - change state of signal activity ===
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Parameters:
|
||||||
* eax = 68 - function number
|
* eax = 68 - function number
|
||||||
* ebx = 15 - subfunction number
|
* ebx = 15 - subfunction number
|
||||||
* ecx = address of the new exception handler
|
* ecx = signal number
|
||||||
|
* edx = value of activity (0/1)
|
||||||
Returned value:
|
Returned value:
|
||||||
* eax = address of the old exception handler (0, if it was not set)
|
* eax = value of old activity for this signal (0/1)
|
||||||
|
Remarks:
|
||||||
|
* In current implementation, it is changed only exception mask for
|
||||||
|
user exception handler, wich was previously set by subfunction 15.
|
||||||
|
At that, number of signal correspond to exception number.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
=============== Function 68, subfunction 19 - load DLL. ==============
|
=============== Function 68, subfunction 19 - load DLL. ==============
|
||||||
|
@ -675,8 +675,8 @@ no_lib_load:
|
|||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
|
mov dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
|
||||||
mov dword [SLOT_BASE+APPDATA.fpu_handler], eax
|
mov dword [SLOT_BASE+APPDATA.exc_handler], eax
|
||||||
mov dword [SLOT_BASE+APPDATA.sse_handler], eax
|
mov dword [SLOT_BASE+APPDATA.except_mask], eax
|
||||||
|
|
||||||
; name for OS/IDLE process
|
; name for OS/IDLE process
|
||||||
|
|
||||||
@ -697,8 +697,8 @@ no_lib_load:
|
|||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
mov dword [SLOT_BASE+256+APPDATA.fpu_handler], eax
|
mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
|
||||||
mov dword [SLOT_BASE+256+APPDATA.sse_handler], eax
|
mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
|
||||||
|
|
||||||
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
|
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
|
||||||
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
|
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
|
||||||
|
@ -122,8 +122,8 @@ struc APPDATA
|
|||||||
|
|
||||||
.fpu_state dd ? ;+16
|
.fpu_state dd ? ;+16
|
||||||
.ev_count_ dd ? ;unused ;+20
|
.ev_count_ dd ? ;unused ;+20
|
||||||
.fpu_handler dd ? ;+24
|
.exc_handler dd ? ;+24
|
||||||
.sse_handler dd ? ;+28
|
.except_mask dd ? ;+28
|
||||||
.pl0_stack dd ? ;unused ;+32
|
.pl0_stack dd ? ;unused ;+32
|
||||||
.heap_base dd ? ;+36
|
.heap_base dd ? ;+36
|
||||||
.heap_top dd ? ;+40
|
.heap_top dd ? ;+40
|
||||||
|
Loading…
x
Reference in New Issue
Block a user