home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7003 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  3.5 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: ameline@vnet.ibm.com (Ian Ameline)
  3. Message-ID: <19921214.105044.392@almaden.ibm.com>
  4. Date: Mon, 14 Dec 92 13:48:35 EST
  5. Subject: cset/2 main() except
  6. Newsgroups: comp.os.os2.programmer
  7. References: <1992Dec11.1048.5763@channel1>
  8. Organization: C-Set/2 Development, IBM Canada Lab.
  9. Disclaimer: This posting represents the poster's views, not those of IBM
  10. Lines: 100
  11.  
  12. In article <1992Dec11.1048.5763@channel1>,
  13. "richard hajinlian" <richard.hajinlian@channel1.com> writes:
  14. >
  15. >Any guesses as to why this CSET/2 generated assembler code causes a
  16. >protection exception?  The instruction indicated by <================
  17. >causes an abend.  I have no Idea.  I should have copied the icc command
  18. >line for you review but I forgot to take it home.
  19. >
  20. >Thanks for your support!
  21. >
  22. >        TITLE        PCFN001S.C
  23. >        .386
  24. >        .387
  25. >        INCLUDELIB OS2386.LIB
  26. >        INCLUDELIB dde4mbsi.lib
  27. >        INCLUDELIB dde4mbmi.lib
  28. >CODE32        SEGMENT DWORD USE32 PUBLIC 'CODE'
  29. >CODE32        ENDS
  30. >DATA32        SEGMENT DWORD USE32 PUBLIC 'DATA'
  31. >DATA32        ENDS
  32. >CONST32        SEGMENT DWORD USE32 PUBLIC 'CONST'
  33. >CONST32        ENDS
  34. >BSS32        SEGMENT DWORD USE32 PUBLIC 'BSS'
  35. >BSS32        ENDS
  36. >DGROUP        GROUP CONST32, BSS32, DATA32
  37. >        ASSUME        CS:FLAT, DS:FLAT, SS:FLAT, ES:FLAT
  38. >        PUBLIC        HostName
  39. >        PUBLIC        ServiceName
  40. >        EXTRN        memcpy:PROC
  41. >        EXTRN        LogAndExit:PROC
  42. >        EXTRN        translateMessageHeader:PROC
  43. >
  44. >@STAT20        DB "Inside StoreSchedulerPro"
  45. >DB "cessId.",0aH,0H
  46. >        DD        _exeentry
  47. >DATA32        ENDS
  48. >BSS32        SEGMENT
  49. >        ALIGN 04H
  50. >COMM        name:BYTE:09H
  51. >        ALIGN 04H
  52. >COMM        timeVal:DWORD
  53. >        ALIGN 04H
  54. >COMM        maxConReq:DWORD
  55. >        ALIGN 04H
  56. >COMM        serverEntry:BYTE:010H
  57. >        ALIGN 04H
  58. >COMM        sp:DWORD
  59. >BSS32        ENDS
  60. >CONST32        SEGMENT
  61. >CONST32        ENDS
  62. >CODE32        SEGMENT
  63. >
  64. >;***** 196 main(SHORT argc, PCHAR argv[], PCHAR envp[])
  65. >        ALIGN 04H
  66. >
  67. >        PUBLIC main
  68. >main        PROC
  69. >        PUSH        EBP
  70. >        MOV        EBP,ESP
  71. >        MOV        ECX,0570H
  72. >BLBL56:
  73. >        SUB        ECX,01000H
  74. >        MOV        BYTE PTR [ESP+ECX],0H
  75. ><=================================???? [Stack Probes--Ian]
  76. >        CMP        ECX,0ffff1570H
  77. >        JG        BLBL56
  78. >        SUB        ESP,0ea90H
  79. >        PUSH        ESI
  80. >        PUSH        EDI
  81. >        SUB        ESP,0cH
  82. >
  83. >;***** 201   char service[] = "fdpnetd";
  84. >        MOV        ECX,08H
  85. >        MOV        EDX,OFFSET FLAT: @STAT1
  86. >        LEA        EAX,[EBP-08H];        service
  87. >        CALL        memcpy
  88. >
  89. >;***** 202   short int shutdown;
  90. >;***** 203   /*
  91. >;***** 204   *     Define the message variable.  This also contains the
  92. >user
  93. >;***** 205   *     data of the packet.
  94. >;***** 206   */
  95. >;***** 207   struct MessageHeaderStr MessageHeader;
  96. >;***** 208   /*
  97. >;***** 209   *     Work buffer for the network packet.
  98. >;***** 210   */
  99. >;***** 211   char msg[MAXMSGSIZE];
  100. >
  101.  
  102.    Those are stack probes -- probing the stack to make sure the guard
  103. page mechanism for stack growth works properly when you have more than
  104. 4K of locals. I suspect that your stack size is being left at the
  105. default size of 4K. Note that the guard page mechanism will grow your
  106. stack to a maximum specified size, and no larger -- that default
  107. size is 4K. You can change it by using the /Stack option on your link386
  108. command. ie LINK386 foo.obj /ST:32000;
  109.  
  110. Regards,
  111. Ian Ameline.
  112.