diff options
Diffstat (limited to 'core/callback.inc')
-rw-r--r-- | core/callback.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/callback.inc b/core/callback.inc index 454b4522..f1332e8e 100644 --- a/core/callback.inc +++ b/core/callback.inc @@ -49,6 +49,7 @@ core_intcall: core_syscall: pushfd ; Save IF among other things... + inc dword [CallbackCtr] push ebx push ebp push esi @@ -130,6 +131,10 @@ core_syscall: ; Remove from stack pop dword [CallbackSP] + dec dword [CallbackCtr] + jnz .skip + call [core_pm_hook] +.skip: pop edi pop esi pop ebp @@ -145,6 +150,7 @@ core_syscall: global core_cfarcall:function hidden core_cfarcall: pushfd ; Save IF among other things... + inc dword [CallbackCtr] push ebx push ebp push esi @@ -199,6 +205,10 @@ core_cfarcall: mov eax,esi ; EDX already set up to be the RM return value pop dword [CallbackSP] + dec dword [CallbackCtr] + jnz .skip + call [core_pm_hook] +.skip: pop ebx pop ebp pop esi @@ -206,10 +216,11 @@ core_cfarcall: popfd ret - bits 16 section .bss16 alignb 4 + global core_pm_hook CallbackSP resd 1 ; SP saved during callback +CallbackCtr resd 1 bits 16 section .text16 |