| Line |  | 
|---|
| 1 | /* $Id: os2sel.h,v 1.9 2001-10-10 21:22:13 phaller Exp $ */ | 
|---|
| 2 | /* | 
|---|
| 3 | * | 
|---|
| 4 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 | #ifndef __OS2SEL_H__ | 
|---|
| 8 | #define __OS2SEL_H__ | 
|---|
| 9 |  | 
|---|
| 10 |  | 
|---|
| 11 | #ifdef __cplusplus | 
|---|
| 12 | extern "C" { | 
|---|
| 13 | #endif | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 | #ifdef __WATCOMC__ | 
|---|
| 17 | unsigned short GetFS(void); | 
|---|
| 18 | #pragma aux GetFS = \ | 
|---|
| 19 | "mov  ax,fs" \ | 
|---|
| 20 | value [ax] \ | 
|---|
| 21 | parm nomemory; | 
|---|
| 22 |  | 
|---|
| 23 | void SetFS(unsigned short sel); | 
|---|
| 24 | #pragma aux SetFS = \ | 
|---|
| 25 | "mov  fs,ax" \ | 
|---|
| 26 | parm [ax]; | 
|---|
| 27 |  | 
|---|
| 28 | unsigned short RestoreOS2FS(void); | 
|---|
| 29 | #pragma aux RestoreOS2FS = \ | 
|---|
| 30 | "mov  bx, fs" \ | 
|---|
| 31 | "mov  ax, 150bh" \ | 
|---|
| 32 | "mov  fs, ax" \ | 
|---|
| 33 | value [bx] \ | 
|---|
| 34 | modify nomemory exact [ax]; | 
|---|
| 35 |  | 
|---|
| 36 | #else | 
|---|
| 37 |  | 
|---|
| 38 | unsigned short _System GetFS       (void); | 
|---|
| 39 | unsigned short _System RestoreOS2FS(void); | 
|---|
| 40 | void           _System SetFS       (unsigned short selector); | 
|---|
| 41 | unsigned short _System SetReturnFS (unsigned short selector); | 
|---|
| 42 | #endif | 
|---|
| 43 |  | 
|---|
| 44 | //SvL: Checks if thread FS & exception structure are valid | 
|---|
| 45 | int            _System CheckCurFS(void); | 
|---|
| 46 |  | 
|---|
| 47 |  | 
|---|
| 48 | #ifdef __cplusplus | 
|---|
| 49 | } | 
|---|
| 50 | #endif | 
|---|
| 51 |  | 
|---|
| 52 |  | 
|---|
| 53 | #endif //__OS2SEL_H__ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.