Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
548 | serge | 1 | |
2 | .386p |
||
3 | assume nothing |
||
4 | |||
5 | |||
6 | extrn ___begtext : near |
||
7 | extrn __STACKTOP : near |
||
8 | extrn __STACKLOW : near |
||
9 | extrn __FiniRtns : near |
||
10 | extrn _LpCmdLine : near |
||
11 | extrn _LpPgmName : near |
||
12 | |||
13 | |||
14 | |||
15 | |||
16 | public mainCRTStartup |
||
17 | public __exit_ |
||
18 | |||
19 | |||
20 | |||
21 | |||
22 | mainCRTStartup: |
||
23 | |||
24 | |||
25 | mov eax, 0xff |
||
26 | out dx, al |
||
27 | |||
28 | |||
29 | sub eax, 8192 |
||
30 | mov dword ptr [__STACKTOP],esp ; set stack top |
||
31 | mov dword ptr [__STACKLOW],eax |
||
32 | mov eax, dword ptr [ds:0x001c] |
||
33 | mov ebx, dword ptr [ds:0x0020] |
||
34 | mov dword ptr [_LpCmdLine], eax |
||
35 | mov dword ptr [_LpPgmName], ebx |
||
36 | jmp __KolibriMain |
||
37 | dd ___begtext ; reference module with segment definitions |
||
38 | ; |
||
39 | ; copyright message |
||
40 | ; |
||
41 | db "Open Watcom C/C++32 Run-Time system. " |
||
42 | db "Portions Copyright (c) Sybase, Inc. 1988-2002." |
||
43 | _cstart_ endp |
||
44 | |||
45 | |||
46 | |||
47 | mov eax,00h ; run finalizers |
||
48 | mov edx,0fh ; less than exit |
||
49 | call __FiniRtns ; call finalizer routines |
||
50 | mov eax, -1 |
||
51 | int 0x40 |
||
52 | ret |
||
53 | __exit_ endp |
||
54 | |||
55 | |||
56 | _scalbn proc |
||
57 | fild dword ptr [esp+12] |
||
58 | fld qword ptr [esp+4] |
||
59 | fscale |
||
60 | fstp st[1] |
||
61 | ret |
||
62 | _scalbn endp |
||
63 | |||
64 | |||
65 | |||
66 | |||
67 | |||
68 | |||
69 | |||
70 |