Ignore:
Timestamp:
Jan 20, 2004, 2:41:11 PM (22 years ago)
Author:
sandervl
Message:

Assembly wrapper for clearing the direction flag before calling our real

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptutil.asm

    r9913 r10409  
    1 ; $Id: exceptutil.asm,v 1.25 2003-03-06 12:49:08 sandervl Exp $
     1; $Id: exceptutil.asm,v 1.26 2004-01-20 13:41:11 sandervl Exp $
    22
    33;/*
     
    108108
    109109
     110        PUBLIC OS2ExceptionHandler
     111        EXTRN  OS2ExceptionHandler2ndLevel:NEAR
     112
     113OS2ExceptionHandler proc near
     114        ;Clear the direction flag (as specified by the _System calling convention)
     115        ;(OS/2 doesn't bother checking before calling our exception handler)
     116        cld
     117        jmp OS2ExceptionHandler2ndLevel
     118OS2ExceptionHandler endp
     119
    110120        PUBLIC QueryExceptionChain
    111121
     
    198208@goodthreadstack:
    199209
     210        mov     eax, esp
     211        sub     eax, 16
     212        and     eax, 0FFFFFFF0h
     213;now we make sure the stack is aligned at 16 bytes when the entrypoint is called
     214;(8+4+4(return address) = 16)
     215        add     eax, 8
     216        mov     esp, eax
     217
    200218        push    dword ptr [ebp+16]
    201219        mov     eax, dword ptr [ebp+12]
     
    247265        sub     eax, 16
    248266        and     eax, 0FFFFFFF0h
    249         add     eax, 4
     267;now we make sure the stack is aligned at 16 bytes when the entrypoint is called
     268;(8+4+4(return address) = 16)
     269        add     eax, 8
    250270        mov     esp, eax
    251271
Note: See TracChangeset for help on using the changeset viewer.