Ignore:
Timestamp:
Jan 24, 2021, 9:19:48 AM (5 years ago)
Author:
Paul Smedley
Message:

Code cleanups from AlexT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/include/stacktoflat.h

    r32 r655  
    2626#define __STACKTOFLAT_H__
    2727
     28#ifdef KEE
     29extern ULONG stacksel;          //16 bits stack selector
     30#pragma aux stacksel "stacksel"
     31
     32extern ULONG stackbase;         //32 bits stackbase
     33#pragma aux stackbase "stackbase"
     34
     35#else
     36
    2837extern ULONG TKSSBase;
    2938#pragma aux TKSSBase "_TKSSBase"
     
    3342  value [eax];
    3443
    35 #ifdef KEE
    36 extern ULONG stacksel;          //16 bits stack selector
    37 #pragma aux stacksel "stacksel"
    38 
    39 extern ULONG stackbase;         //32 bits stackbase
    40 #pragma aux stackbase "stackbase"
    4144#endif
    42 
    43 #ifdef FLATSTACK
    4445
    4546#ifdef KEE
     
    4950//Convert 16:16 stack based address to 0:32 flat addresss
    5051#define __Stack16ToFlat(addr)   (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase)
    51 #endif
    52 
    53 //stack is already flat
    54 #define __Stack32ToFlat(addr)   (LINEAR)addr
    55 
    56 #else
    57 //Convert 16:16 stack based address to 0:32 flat addresss
    58 #define __Stack16ToFlat(addr)   (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase)
    59 
    60 //Convert 16:16 stack based address to 0:32 flat addresss
    61 #define __Stack32ToFlat(addr)   (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase)
    6252#endif
    6353
Note: See TracChangeset for help on using the changeset viewer.