Line | |
---|
1 | ; $Id: odincrt.asm,v 1.3 1999-12-01 18:41:46 sandervl Exp $
|
---|
2 |
|
---|
3 | ;/*
|
---|
4 | ; * Project Odin Software License can be found in LICENSE.TXT
|
---|
5 | ; * Win32 Exception handling + misc functions for OS/2
|
---|
6 | ; *
|
---|
7 | ; * Copyright 1998 Sander van Leeuwen
|
---|
8 | ; *
|
---|
9 | ; */
|
---|
10 |
|
---|
11 | ; 1999/08/09 PH see if we can do this as INLINE functions
|
---|
12 |
|
---|
13 | .386p
|
---|
14 | NAME odinfs
|
---|
15 |
|
---|
16 | CODE32 SEGMENT DWORD PUBLIC USE32 'CODE'
|
---|
17 | ASSUME DS:FLAT, SS:FLAT
|
---|
18 |
|
---|
19 | PUBLIC __threadid
|
---|
20 | __threadid proc near
|
---|
21 | push ebp
|
---|
22 | push fs
|
---|
23 | mov ax, 150bh
|
---|
24 | mov fs, ax
|
---|
25 |
|
---|
26 | mov eax,dword ptr fs:[0000000cH]
|
---|
27 |
|
---|
28 | pop fs
|
---|
29 | mov ebp,esp
|
---|
30 | leave
|
---|
31 | ret
|
---|
32 | __threadid endp
|
---|
33 |
|
---|
34 | PUBLIC os2__nw__FUiPCcT1
|
---|
35 | EXTERN __nw__FUiPCcT1:NEAR
|
---|
36 | ;input: eax = size
|
---|
37 | ; ecx = line nr
|
---|
38 | ; edx = source filename
|
---|
39 | os2__nw__FUiPCcT1 proc near
|
---|
40 | push fs
|
---|
41 | push eax
|
---|
42 | mov ax, 150bh
|
---|
43 | mov fs, ax
|
---|
44 | pop eax
|
---|
45 | sub esp, 0Ch
|
---|
46 | call __nw__FUiPCcT1
|
---|
47 | add esp, 0Ch
|
---|
48 | pop fs
|
---|
49 | ret
|
---|
50 | os2__nw__FUiPCcT1 endp
|
---|
51 |
|
---|
52 | PUBLIC os2__dl__FPvPCcUi
|
---|
53 | EXTERN __dl__FPvPCcUi:NEAR
|
---|
54 | ;input: eax = this ptr
|
---|
55 | ; ecx = line nr
|
---|
56 | ; edx = source filename
|
---|
57 | os2__dl__FPvPCcUi proc near
|
---|
58 | push fs
|
---|
59 | push eax
|
---|
60 | mov ax, 150bh
|
---|
61 | mov fs, ax
|
---|
62 | pop eax
|
---|
63 | sub esp, 0Ch
|
---|
64 | call __dl__FPvPCcUi
|
---|
65 | add esp, 0Ch
|
---|
66 | pop fs
|
---|
67 | ret
|
---|
68 | os2__dl__FPvPCcUi endp
|
---|
69 |
|
---|
70 | PUBLIC GetFS
|
---|
71 | GetFS proc near
|
---|
72 | mov eax, fs
|
---|
73 | ret
|
---|
74 | GetFS endp
|
---|
75 |
|
---|
76 |
|
---|
77 | PUBLIC SetFS
|
---|
78 | SetFS proc near
|
---|
79 | mov eax, [esp+4]
|
---|
80 | mov fs, eax
|
---|
81 | ret
|
---|
82 | SetFS endp
|
---|
83 |
|
---|
84 |
|
---|
85 | PUBLIC SetReturnFS
|
---|
86 | SetReturnFS proc near
|
---|
87 | push fs
|
---|
88 | mov eax, [esp+8]
|
---|
89 | mov fs, eax
|
---|
90 | pop eax
|
---|
91 | ret
|
---|
92 | SetReturnFS endp
|
---|
93 |
|
---|
94 |
|
---|
95 | PUBLIC RestoreOS2FS
|
---|
96 | RestoreOS2FS proc near
|
---|
97 | push 150bh ; @@@PH that's NOT the clean way ! :)
|
---|
98 | mov ax, fs
|
---|
99 | pop fs
|
---|
100 | ret
|
---|
101 | RestoreOS2FS endp
|
---|
102 |
|
---|
103 | CODE32 ENDS
|
---|
104 | END
|
---|
Note:
See
TracBrowser
for help on using the repository browser.