I'm having a little problem in my BSOD code:
I can't get properly CS:EIP and EFLAGS values from stack
![Sad :(](./images/smilies/icon_sad.gif)
Here's my commented code:
Code: Select all
div_error:
mov [TempEAX],eax ;save EAX and all 32bit regs
mov [TempEBX],ebx
mov [TempECX],ecx
mov [TempEDX],edx
mov [TempESI],esi
mov [TempEDI],edi
pop eax ;get EIP
pop ebx ;get CS
pop ecx ;get EFLAGS
mov [EIPValue],eax ;store EIP
mov [CSValue],ebx ;store CS
mov [EFlagsValue],ecx ;store Eflags
push ecx ;and return them on the stack:
push bx ;sometime there will be a option
push eax ;about continuing in OS execution
mov eax,TempEAX ;and ignoring the BSOD
mov ebx,TempEBX ;return the registers
mov ecx,TempECX
mov edi,Div_Flt ;just a simple exception handling
push edx ;save EDX
mov edx,00h ;exception handling
mov [CanContinue_BSOD],1 ;....
call DoException ;draw the RSOD etc.
iret ;this will never trigger
inflater