🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2784

cset/2 main() except

#2784
From: richard hajinlian
Date: Sat, 12 Dec 1992 03:13
90 lines
3043 bytes
Any guesses as to why this CSET/2 generated assembler code causes a
protection exception?  The instruction indicated by <================
causes an abend.  I have no Idea.  I should have copied the icc command
line for you review but I forgot to take it home.

Thanks for your support!


        TITLE        PCFN001S.C
        .386
        .387
        INCLUDELIB OS2386.LIB
        INCLUDELIB dde4mbsi.lib
        INCLUDELIB dde4mbmi.lib
CODE32        SEGMENT DWORD USE32 PUBLIC 'CODE'
CODE32        ENDS
DATA32        SEGMENT DWORD USE32 PUBLIC 'DATA'
DATA32        ENDS
CONST32        SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST32        ENDS
BSS32        SEGMENT DWORD USE32 PUBLIC 'BSS'
BSS32        ENDS
DGROUP        GROUP CONST32, BSS32, DATA32
        ASSUME        CS:FLAT, DS:FLAT, SS:FLAT, ES:FLAT
        PUBLIC        HostName
        PUBLIC        ServiceName
        EXTRN        memcpy:PROC
        EXTRN        LogAndExit:PROC
        EXTRN        translateMessageHeader:PROC

@STAT20        DB "Inside StoreSchedulerPro"
DB "cessId.",0aH,0H
        DD        _exeentry
DATA32        ENDS
BSS32        SEGMENT
        ALIGN 04H
COMM        name:BYTE:09H
        ALIGN 04H
COMM        timeVal:DWORD
        ALIGN 04H
COMM        maxConReq:DWORD
        ALIGN 04H
COMM        serverEntry:BYTE:010H
        ALIGN 04H
COMM        sp:DWORD
BSS32        ENDS
CONST32        SEGMENT
CONST32        ENDS
CODE32        SEGMENT

;***** 196 main(SHORT argc, PCHAR argv[], PCHAR envp[])
        ALIGN 04H

        PUBLIC main
main        PROC
        PUSH        EBP
        MOV        EBP,ESP
        MOV        ECX,0570H
BLBL56:
        SUB        ECX,01000H
        MOV        BYTE PTR [ESP+ECX],0H
<=================================????
        CMP        ECX,0ffff1570H
        JG        BLBL56
        SUB        ESP,0ea90H
        PUSH        ESI
        PUSH        EDI
        SUB        ESP,0cH

;***** 201   char service[] = "fdpnetd";
        MOV        ECX,08H
        MOV        EDX,OFFSET FLAT: @STAT1
        LEA        EAX,[EBP-08H];        service
        CALL        memcpy

;***** 202   short int shutdown;
;***** 203   /*
;***** 204   *     Define the message variable.  This also contains the
user
;***** 205   *     data of the packet.
;***** 206   */
;***** 207   struct MessageHeaderStr MessageHeader;
;***** 208   /*
;***** 209   *     Work buffer for the network packet.
;***** 210   */
;***** 211   char msg[MAXMSGSIZE];

Thanks again in advance.  Rich Hajinlian Billerica, Massachusetts
--
Channel 1 (R)   Cambridge, MA
Technical Details
Message-ID: <1992Dec11.1048.5763@channel1>
Path: arc1-ca.pugleaf.net!sparky!uunet!channel1![richard.hajinlian@channel1.com]

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!channel1![richard.hajinlian@channel1.com]
From: "richard hajinlian" <richard.hajinlian@channel1.com>
Newsgroups: comp.os.os2.programmer
Subject: cset/2 main() except
Message-ID: <1992Dec11.1048.5763@channel1>
Date: 11 Dec 92 22:13:42 EST
Reply-To: "richard hajinlian" <richard.hajinlian@channel1.com>
Distribution: comp
Organization: Channel 1 Communications
Lines: 91