Ticket #515: fm3.lst

File fm3.lst, 21.8 KB (added by John Small, 10 years ago)

List file for fm3.obj

Line 
1Module: D:\netlabs\fm2\trunk\fm3.c
2GROUP: 'DGROUP' CONST,CONST2,_DATA
3
4Segment: _TEXT BYTE USE32 000001EA bytes
50000                          L$1:
60000    00 00 00 00 00 00 00 00                         ........
7
8
9/***********************************************************************
10
11  $Id: fm3.c 1511 2010-04-12 16:36:48Z stevenhl $
12
13  fm/2 starter
14
15  Copyright (c) 1993-98 M. Kimes
16  Copyright (c) 2008 Steven H.Levine
17
18  05 Jan 08 SHL Sync
19  18 Jul 08 SHL Add Fortify support
20  11 Dec 08 SHL Add exception handler support
21
22***********************************************************************/
23
24#include <string.h>
25
26#define INCL_DOS
27#define INCL_WIN
28#define INCL_LONGLONG
29#define INCL_DOSEXCEPTIONS              // XCTP_...
30#define INCL_DOSERRORS                  // NO_ERROR
31
32#include "dll\fm3dll.h"
33#include "dll\mainwnd.h"                // hwndBubble
34#include "dll\version.h"                // VER...
35#include "dll\init.h"                   // StartFM3
36#include "dll\notebook.h"               // appname
37#include "dll\fortify.h"
38#include "dll\errutil.h"                // Error reporting
39#include "dll\excputil.h"               // Exception handlers
40
41static PSZ pszSrcFile = __FILE__;
42
43int main(int argc, char *argv[])
44
45Routine Size: 8 bytes,    Routine Base: _TEXT + 0000
46
470008                          main_:
480008    53                        push        ebx
490009    51                        push        ecx
50000A    56                        push        esi
51000B    57                        push        edi
52000C    C8 30 00 00               enter       0x0030,0x00
530010    50                        push        eax
540011    52                        push        edx
55
56{
57  HAB hab;
58  HMQ hmq;
59  QMSG qmsg;
60  HWND hwndFrame;
61  APIRET regRet;
62  EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
630012                          L$2:
640012    8D 7D F0                  lea         edi,-0x10[ebp]
650015    BE 00 00 00 00            mov         esi,offset L$1
66001A    A5                        movsd       
67001B    A5                        movsd       
68
69
70  strcpy(appname, "FM/3");
71001C    BE 06 00 00 00            mov         esi,offset L$26
720021    BF 00 00 00 00            mov         edi,offset _appname
730026    57                        push        edi
740027                          L$3:
750027    AC                        lodsb       
760028    88 07                     mov         byte ptr [edi],al
77002A    47                        inc         edi
78002B    3C 00                     cmp         al,0x00
79002D    75 F8                     jne         L$3
80002F    5F                        pop         edi
81
82  DosError(FERR_DISABLEHARDERR);
830030    6A 00                     push        0x00000000
840032    E8 00 00 00 00            call        DosError
850037    83 C4 04                  add         esp,0x00000004
86
87
88  regRec.ExceptionHandler = HandleException;
89003A    C7 45 F4 00 00 00 00      mov         dword ptr -0xc[ebp],offset HandleException
90
91  regRet = DosSetExceptionHandler(&regRec);
920041    8D 45 F0                  lea         eax,-0x10[ebp]
930044    50                        push        eax
940045    E8 00 00 00 00            call        DosSetExceptionHandler
95004A    83 C4 04                  add         esp,0x00000004
96004D    89 45 FC                  mov         dword ptr -0x4[ebp],eax
97
98  if (regRet != NO_ERROR) {
990050    85 C0                     test        eax,eax
1000052    74 16                     je          L$4
101
102#if 0 // 10 Dec 08 SHL fixme to report later maybe?
103    Dos_Error(MB_ENTER, regRet, HWND_DESKTOP, pszSrcFile, __LINE__,
104              "DosSetExceptionHandler");
105#endif
106    DbgMsg(pszSrcFile, __LINE__,
1070054    50                        push        eax
1080055    68 0B 00 00 00            push        offset L$27
109005A    6A 37                     push        0x00000037
110005C    FF 35 00 00 00 00         push        dword ptr _pszSrcFile
1110062    E8 00 00 00 00            call        DbgMsg_
1120067    83 C4 10                  add         esp,0x00000010
113
114           "DosSetExceptionHandler failed with error %u", regRet);
115  }
116
117  hab = WinInitialize(0);
118006A                          L$4:
119006A    6A 00                     push        0x00000000
120006C    E8 00 00 00 00            call        WinInitialize
1210071    89 C6                     mov         esi,eax
1220073    83 C4 04                  add         esp,0x00000004
1230076    89 C7                     mov         edi,eax
124
125  if (hab) {
1260078    85 C0                     test        eax,eax
127007A    0F 84 36 01 00 00         je          L$20
128
129    hmq = WinCreateMsgQueue(hab, 2048);
1300080    68 00 08 00 00            push        0x00000800
1310085    50                        push        eax
1320086    E8 00 00 00 00            call        WinCreateMsgQueue
133008B    83 C4 08                  add         esp,0x00000008
134008E    89 45 F8                  mov         dword ptr -0x8[ebp],eax
135
136    if (hmq) {
1370091                          L$5:
1380091    85 C0                     test        eax,eax
1390093    0F 84 14 01 00 00         je          L$19
140
141      if (InitFM3DLL(hab, argc, argv)) {
1420099    8B 5D C8                  mov         ebx,dword ptr -0x38[ebp]
143009C    8B 55 CC                  mov         edx,dword ptr -0x34[ebp]
144009F    89 F0                     mov         eax,esi
14500A1    E8 00 00 00 00            call        InitFM3DLL_
14600A6                          L$6:
14700A6    85 C0                     test        eax,eax
14800A8    0F 84 E7 00 00 00         je          L$18
149
150        if (CheckVersion(VERMAJOR, VERMINOR)) {
15100AE    BA 16 00 00 00            mov         edx,0x00000016
15200B3    B8 03 00 00 00            mov         eax,0x00000003
15300B8    E8 00 00 00 00            call        CheckVersion_
15400BD                          L$7:
15500BD    85 C0                     test        eax,eax
15600BF    0F 84 D0 00 00 00         je          L$18
157
158#         ifdef FORTIFY
159          Fortify_EnterScope();
160#         endif
161          hwndFrame = StartFM3(hab, argc, argv);
16200C5    8B 5D C8                  mov         ebx,dword ptr -0x38[ebp]
16300C8    8B 55 CC                  mov         edx,dword ptr -0x34[ebp]
16400CB    89 F0                     mov         eax,esi
16500CD    E8 00 00 00 00            call        StartFM3_
16600D2    89 C6                     mov         esi,eax
167
168          if (hwndFrame != (HWND) 0) {
16900D4                          L$8:
17000D4    85 C0                     test        eax,eax
17100D6    0F 84 B9 00 00 00         je          L$18
172
173            for (;;) {
174              if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
17500DC                          L$9:
17600DC    6A 00                     push        0x00000000
17700DE    6A 00                     push        0x00000000
17800E0    6A 00                     push        0x00000000
17900E2    8D 45 D0                  lea         eax,-0x30[ebp]
18000E5    50                        push        eax
18100E6    57                        push        edi
18200E7    E8 00 00 00 00            call        WinGetMsg
18300EC    83 C4 14                  add         esp,0x00000014
18400EF                          L$10:
18500EF    85 C0                     test        eax,eax
18600F1    75 11                     jne         L$12
187
188                if (qmsg.hwnd)
18900F3                          L$11:
19000F3    83 7D D0 00               cmp         dword ptr -0x30[ebp],0x00000000
19100F7    0F 84 5F 00 00 00         je          L$17
192
193                  qmsg.msg = WM_CLOSE;  // Map quit to close
19400FD    C7 45 D4 29 00 00 00      mov         dword ptr -0x2c[ebp],0x00000029
195
196                else
197                  break;
198              }
199              if (hwndBubble &&
2000104                          L$12:
2010104    83 3D 00 00 00 00 00      cmp         dword ptr _hwndBubble,0x00000000
202010B    74 40                     je          L$15
203010D    8B 45 D4                  mov         eax,dword ptr -0x2c[ebp]
2040110    83 F8 70                  cmp         eax,0x00000070
2050113    76 05                     jbe         L$13
2060115    83 F8 7A                  cmp         eax,0x0000007a
2070118    72 11                     jb          L$14
208011A                          L$13:
209011A    8B 45 D4                  mov         eax,dword ptr -0x2c[ebp]
210011D    3D 0F 04 00 00            cmp         eax,0x0000040f
2110122    76 29                     jbe         L$15
2120124    3D 1A 04 00 00            cmp         eax,0x0000041a
2130129    73 22                     jae         L$15
214012B                          L$14:
215012B    FF 35 00 00 00 00         push        dword ptr _hwndBubble
2160131    E8 00 00 00 00            call        WinIsWindowVisible
2170136    83 C4 04                  add         esp,0x00000004
2180139    85 C0                     test        eax,eax
219013B    74 10                     je          L$15
220
221                  ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
222                    qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
223                   (qmsg.msg > (WM_CHORD - 1) &&
224                    qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
225                  WinIsWindowVisible(hwndBubble))
226                WinShowWindow(hwndBubble, FALSE);
227013D    6A 00                     push        0x00000000
228013F    FF 35 00 00 00 00         push        dword ptr _hwndBubble
2290145    E8 00 00 00 00            call        WinShowWindow
230014A    83 C4 08                  add         esp,0x00000008
231
232              WinDispatchMsg(hab, &qmsg);
233014D                          L$15:
234014D    8D 45 D0                  lea         eax,-0x30[ebp]
2350150    50                        push        eax
2360151    57                        push        edi
2370152    E8 00 00 00 00            call        WinDispatchMsg
2380157    83 C4 08                  add         esp,0x00000008
239
240            }
241015A                          L$16:
242015A    EB 80                     jmp         L$9
243
244            if (WinIsWindow(hab, WinWindowFromID(hwndFrame, FID_CLIENT)))
245015C                          L$17:
246015C    68 08 80 00 00            push        0x00008008
2470161    56                        push        esi
2480162    E8 00 00 00 00            call        WinWindowFromID
2490167    83 C4 08                  add         esp,0x00000008
250016A    50                        push        eax
251016B    57                        push        edi
252016C    E8 00 00 00 00            call        WinIsWindow
2530171    83 C4 08                  add         esp,0x00000008
2540174    85 C0                     test        eax,eax
2550176    74 1D                     je          L$18
256
257              WinSendMsg(WinWindowFromID(hwndFrame, FID_CLIENT), WM_CLOSE,
2580178    6A 00                     push        0x00000000
259017A    6A 00                     push        0x00000000
260017C    6A 29                     push        0x00000029
261017E    68 08 80 00 00            push        0x00008008
2620183    56                        push        esi
2630184    E8 00 00 00 00            call        WinWindowFromID
2640189    83 C4 08                  add         esp,0x00000008
265018C    50                        push        eax
266018D    E8 00 00 00 00            call        WinSendMsg
2670192    83 C4 10                  add         esp,0x00000010
268
269                         MPVOID, MPVOID);
270          }
271#         ifdef FORTIFY
272          for (;;) {
273            UCHAR scope = Fortify_LeaveScope();
274            if ((CHAR)scope == 0)
275              break;
276            Runtime_Error(__FILE__, __LINE__, "Attempting to exit thread with scope non-zero (%u)", scope);
277            if ((CHAR)scope < 0)
278              break;
279          }
280          Fortify_DumpAllMemory();
281#         endif
282        }
283      }
284      DosSleep(250L);
2850195                          L$18:
2860195    68 FA 00 00 00            push        0x000000fa
287019A    E8 00 00 00 00            call        DosSleep
288019F    83 C4 04                  add         esp,0x00000004
289
290      WinDestroyMsgQueue(hmq);
29101A2    FF 75 F8                  push        dword ptr -0x8[ebp]
29201A5    E8 00 00 00 00            call        WinDestroyMsgQueue
29301AA    83 C4 04                  add         esp,0x00000004
294
295    }
296    WinTerminate(hab);
29701AD                          L$19:
29801AD    57                        push        edi
29901AE    E8 00 00 00 00            call        WinTerminate
30001B3    83 C4 04                  add         esp,0x00000004
301
302  }
303
304  if (regRet == NO_ERROR) {
30501B6                          L$20:
30601B6    83 7D FC 00               cmp         dword ptr -0x4[ebp],0x00000000
30701BA    75 26                     jne         L$22
308
309    regRet = DosUnsetExceptionHandler(&regRec);
31001BC    8D 45 F0                  lea         eax,-0x10[ebp]
31101BF    50                        push        eax
31201C0    E8 00 00 00 00            call        DosUnsetExceptionHandler
31301C5    83 C4 04                  add         esp,0x00000004
314
315    if (regRet != NO_ERROR) {
31601C8                          L$21:
31701C8    85 C0                     test        eax,eax
31801CA    74 16                     je          L$22
319
320      DbgMsg(pszSrcFile, __LINE__,
32101CC    50                        push        eax
32201CD    68 37 00 00 00            push        offset L$28
32301D2    6A 70                     push        0x00000070
32401D4    FF 35 00 00 00 00         push        dword ptr _pszSrcFile
32501DA    E8 00 00 00 00            call        DbgMsg_
32601DF    83 C4 10                  add         esp,0x00000010
327
328             "DosUnsetExceptionHandler failed with error %u", regRet);
329    }
330  }
331  return 0;
332}
33301E2                          L$22:
33401E2    31 C0                     xor         eax,eax
33501E4                          L$23:
33601E4    C9                        leave       
33701E5    5F                        pop         edi
33801E6    5E                        pop         esi
33901E7    59                        pop         ecx
34001E8    5B                        pop         ebx
34101E9    C3                        ret         
34201EA                          L$24:
343
344Routine Size: 482 bytes,    Routine Base: _TEXT + 0008
345
346No disassembly errors
347
348Segment: CONST DWORD USE32 00000065 bytes
3490000                          L$25:
3500000    66 6D 33 2E 63 00                               fm3.c.
3510006                          L$26:
3520006    46 4D 2F 33 00                                  FM/3.
353000B                          L$27:
354000B    44 6F 73 53 65 74 45 78 63 65 70 74 69 6F 6E 48 DosSetExceptionH
355001B    61 6E 64 6C 65 72 20 66 61 69 6C 65 64 20 77 69 andler failed wi
356002B    74 68 20 65 72 72 6F 72 20 25 75 00             th error %u.
3570037                          L$28:
3580037    44 6F 73 55 6E 73 65 74 45 78 63 65 70 74 69 6F DosUnsetExceptio
3590047    6E 48 61 6E 64 6C 65 72 20 66 61 69 6C 65 64 20 nHandler failed
3600057    77 69 74 68 20 65 72 72 6F 72 20 25 75 00       with error %u.
361
362Segment: CONST2 DWORD USE32 00000000 bytes
363
364Segment: _DATA DWORD USE32 00000004 bytes
3650000                          _pszSrcFile:
3660000    00 00 00 00                                     DD      offset L$25
367
368Segment: .debug_info BYTE USE32 00000205 bytes
3690000                          L$29:
3700000    01 02 00 00 02 00                               ......
3710006    00 00 00 00                                     DD      offset L$31
372000A    04 06 04 02 00 00 44 3A 5C 6E 65 74 6C 61 62 73 ......D:\netlabs
373001A    5C 66 6D 32 5C 74 72 75 6E 6B 5C 66 6D 33 2E 63 \fm2\trunk\fm3.c
374002A    00                                              .
375002B    00 00 00 00                                     DD      offset L$30
376002F    01 00 56 31 2E 30 20 57 41 54 43 4F 4D 00 00    ..V1.0 WATCOM..
377003E    00 00 00 00                                     DD      offset L$32
3780042    00 00 00 00 01                                  .....
3790047    04 00 00 00                                     DD      offset L$33
380004B    09 63 68 61 72 00 06 01 09 73 69 67 6E 65 64 20 .char....signed
381005B    63 68 61 72 00 06 01 09 75 6E 73 69 67 6E 65 64 char....unsigned
382006B    20 63 68 61 72 00 08 01 09 73 68 6F 72 74 00 05  char....short..
383007B    02 09 75 6E 73 69 67 6E 65 64 20 73 68 6F 72 74 ..unsigned short
384008B    00 07 02 09 69 6E 74 00 05 04 09 75 6E 73 69 67 ....int....unsig
385009B    6E 65 64 20 69 6E 74 00 07 04 09 6C 6F 6E 67 00 ned int....long.
38600AB    05 04 09 75 6E 73 69 67 6E 65 64 20 6C 6F 6E 67 ...unsigned long
38700BB    00 07 04 09 5F 5F 69 6E 74 36 34 00 05 08 09 75 ....__int64....u
38800CB    6E 73 69 67 6E 65 64 20 5F 5F 69 6E 74 36 34 00 nsigned __int64.
38900DB    07 08 09 5F 42 6F 6F 6C 00 07 01 0F 4B 00 00 00 ..._Bool....K...
39000EB    0B 01 50 53 5A 00 E6 00 00 00 D2 01 01 00 00 70 ..PSZ..........p
39100FB    73 7A 53 72 63 46 69 6C 65 00 05 03             szSrcFile...
3920107    00 00 00 00                                     DD      offset _pszSrcFile
393010B    EB 00 00 00 86 01 03 02 00 00 01 8E 00 00 00 0A ................
394011B    6D 61 69 6E 00 01 00 01 01 00 00 02 91 14       main..........
3950129    08 00 00 00                                     DD      offset main_
396012D    EA 01 00 00                                     DD      offset L$24
3970131    00 01 55 C8 01 61 72 67 63 00 00 01 50 8E 00 00 ..U..argc...P...
3980141    00 0F E6 00 00 00 C8 01 61 72 67 76 00 00 01 52 ........argv...R
3990151    42 01 00 00 D2 01 01 00 01 2E 72 65 74 75 72 6E B.........return
4000161    00 01 50 8E 00 00 00 66 02 02 00 00             ..P....f....
401016D    12 00 00 00                                     DD      offset L$2
4020171    E4 01 00 00                                     DD      offset L$23
4030175    66 83 01 00 00                                  f....
404017A    6A 00 00 00                                     DD      offset L$4
405017E    6A 00 00 00                                     DD      offset L$4
4060182    00 66 E5 01 00 00                               .f....
4070188    91 00 00 00                                     DD      offset L$5
408018C    B6 01 00 00                                     DD      offset L$20
4090190    66 E4 01 00 00                                  f....
4100195    A6 00 00 00                                     DD      offset L$6
4110199    AD 01 00 00                                     DD      offset L$19
412019D    66 E3 01 00 00                                  f....
41301A2    BD 00 00 00                                     DD      offset L$7
41401A6    95 01 00 00                                     DD      offset L$18
41501AA    66 E2 01 00 00                                  f....
41601AF    D4 00 00 00                                     DD      offset L$8
41701B3    95 01 00 00                                     DD      offset L$18
41801B7    66 E1 01 00 00                                  f....
41901BC    DC 00 00 00                                     DD      offset L$9
42001C0    95 01 00 00                                     DD      offset L$18
42101C4    66 E0 01 00 00                                  f....
42201C9    EF 00 00 00                                     DD      offset L$10
42301CD    5A 01 00 00                                     DD      offset L$16
42401D1    66 DF 01 00 00                                  f....
42501D6    F3 00 00 00                                     DD      offset L$11
42601DA    04 01 00 00                                     DD      offset L$12
42701DE    00 00 00 00 00 00 00 66 01 02 00 00             .......f....
42801EA    C8 01 00 00                                     DD      offset L$21
42901EE    E2 01 00 00                                     DD      offset L$22
43001F2    66 00 02 00 00                                  f....
43101F7    E2 01 00 00                                     DD      offset L$22
43201FB    E2 01 00 00                                     DD      offset L$22
43301FF    00 00 00 00 00 00                               ......
434
435Segment: .debug_pubnames BYTE USE32 0000001B bytes
4360000    17 00 00 00 02 00                               ......
4370006    00 00 00 00                                     DD      offset L$29
438000A    EA 01 00 00 0F 01 00 00 6D 61 69 6E 00 00 00 00 ........main....
439001A    00                                              .
440
441Segment: .debug_aranges BYTE USE32 0000002C bytes
4420000    28 00 00 00 02 00                               (.....
4430006    00 00 00 00                                     DD      offset L$29
444000A    04 00                                           ..
445000C    00 00 00 00                                     DD      offset L$1
4460010    EA 01 00 00                                     ....
4470014    00 00 00 00                                     DD      offset L$25
4480018    65 00 00 00                                     e...
449001C    00 00 00 00                                     DD      offset _pszSrcFile
4500020    04 00 00 00 00 00 00 00 00 00 00 00             ............
451
452Segment: .debug_line BYTE USE32 0000007D bytes
4530000                          L$30:
4540000    79 00 00 00 02 00 10 00 00 00 01 00 FF 04 0A 00 y...............
4550010    01 01 01 01 00 00 00 00 00 00 00 1F 03 44 3A 5C .............D:\
4560020    6E 65 74 6C 61 62 73 5C 66 6D 32 5C 74 72 75 6E netlabs\fm2\trun
4570030    6B 5C 66 6D 33 2E 63 00 00 00 00 00 05 02       k\fm3.c.......
458003E    08 00 00 00                                     DD      offset main_
4590042    06 05 01 03 23 01 03 07 33 35 5C 35 28 48 03 05 ....#...35\5(H..
4600052    1B 03 04 63 44 2C 50 2C 60 03 04 67 48 2D 68 34 ...cD,P,`..gH-h4
4610062    03 04 27 03 06 EF 4C 40 14 7C 03 10 7F 40 39 03 ..'...L@.|...@9.
4620072    03 2F 24 3C 1C 03 05 63 00 01 01                ./$<...c...
463
464Segment: .debug_loc BYTE USE32 00000000 bytes
465
466Segment: .debug_abbrev BYTE USE32 0000008D bytes
4670000                          L$31:
4680000    06 11 01 01 13 03 08 10 06 13 0F 1B 08 25 08 42 .............%.B
4690010    0F 43 06 35 10 82 41 0B 83 41 06 00 00 09 24 00 .C.5..A..A....$.
4700020    03 08 3E 0B 0B 0B 00 00 0F 0F 00 49 13 00 00 0B ..>........I....
4710030    16 00 32 0B 03 08 49 13 00 00 D2 01 34 00 32 0B ..2...I.....4.2.
4720040    3F 0C 34 0C 03 08 02 0A 49 13 00 00 86 01 2E 01 ?.4.....I.......
4730050    01 13 32 0B 49 13 2C 0F 03 08 3F 0C 20 0B 36 0B ..2.I.,...?. .6.
4740060    27 0C 4C 0B 34 0C 2A 0A 11 01 12 01 33 0B 40 0A '.L.4.*.....3.@.
4750070    00 00 C8 01 05 00 03 08 02 0A 84 41 0A 49 13 00 ...........A.I..
4760080    00 66 0B 01 01 13 11 01 12 01 00 00 00          .f...........
477
478Segment: .debug_macinfo BYTE USE32 00000001 bytes
4790000                          L$32:
4800000    00                                              .
481
482Segment: .debug_str BYTE USE32 00000000 bytes
483
484Segment: .WATCOM_references BYTE USE32 00000004 bytes
4850000    00 00 00 00                                     ....
4860004                          L$33:
487