🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #262

Re: HELP!!!: Doing INs and OUTs under OS/2 with BCC

#262
From: CSCHUBER
Date: Mon, 05 Jul 1993 15:17
47 lines
2883 bytes
In article <1993Jul2.165507@mantrasun2.epfl.ch>
Paolo.Ienne@di.epfl.ch (Paolo Ienne) writes:
 
>
>I'm trying to port an MSDOS application to OS/2 and I know almost nothing of
>the latter.
>
>My problem is that inp() and outp() have disappeared. I tried to rewrite them
>(essentially following an example of Ray Duncan) in a .asm declaring a
>segment MY_TEXT of class CODE, I've defined them in the C code using the
>__pascal
>modifier (as for a few API calls I used) and I linked all together.
>The .def file contains a line "SEGMENTS \n MY_TEXT IOPL". The bcc help
>description of tlink seems completely false, the accepted parameters of tlink
>being apparently those of link (in the on-line help, the IOPL modifier to the
>SEGMENTS definition is not supported).
>
>Result: without a "CODE IOPL" line in the .def the program runs normally but
>stops at the execution of the IN or OUT. With it, it stops at the very
>beginning.
>In both cases I get many "fixupp" warnings from the linker, in different
>quantity in the two cases.
>
 
I've been having the same problem.  I don't have the answer for you but
hopefully I can add to the problem description.  I've created a DLL, actually
written by Michael Thompson (tommy@msc.cornell.edu).  The .DEF file contains
LIBRARY PORTIO
CODE PRELOAD EXECUTEONLY IOPL
SEGMENTS _TEXT CLASS 'CODE' IOPL PRELOAD EXECUTEONLYSEGMENTS P@IOCODE CLASS 'COD
EXPORTS
 @inp
 @outp
 @inpw
 @outpw
 
When dynmamically linking I get a Priviledged Operation Exception.  When
statically linking, the OS/2 loader complains that the EXE file is not an
OS/2 executable.  (If I omit the SEGMENTS statements, TLINK aborts with a
"general error").  According to EXEHDR the EXE and DLL files look OK.
 
Any hints or suggestions?  IBM C Set is not an option at the present time.
 
Regards,                       Phone:  (604)389-3827
Cy Schubert                    OV/VM:  BCSC02(CSCHUBER)
MVS Support                   BITNET:  CSCHUBER@BCSC02.BITNET
BC Systems Corp.            Internet:  cschuber@bcsc02.gov.bc.ca
Technical Details
Message-ID: <16C02748F.CSCHUBER@bcsc02.gov.bc.ca>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!gatech!destroyer!cs.ubc.ca!bcsystems!bcsc02.gov.bc.ca!CSCHUBER
References: <1993Jul2.165507@mantrasun2.epfl.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cd94,a442a22b1f775864,start
X-Google-Attributes: gid10cd94,public
X-Google-Thread: 11307a,84a9ad67f9ec3d31
X-Google-Attributes: gid11307a,public
X-Google-ArrivalTime: 1993-07-05 09:24:06 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!gatech!destroyer!cs.ubc.ca!bcsystems!bcsc02.gov.bc.ca!CSCHUBER
Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l
Subject: Re: HELP!!!: Doing INs and OUTs under OS/2 with BCC
Message-ID: <16C02748F.CSCHUBER@bcsc02.gov.bc.ca>
From: CSCHUBER@bcsc02.gov.bc.ca
Date: Mon, 05 Jul 93 08:17:16 PDT
References: <1993Jul2.165507@mantrasun2.epfl.ch>
Organization: BC Systems Corporation
Keywords: os/2, asm
Nntp-Posting-Host: bcsc02.gov.bc.ca
X-Newsreader: NNR/VM S_1.3.2
Lines: 47