TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: George White
from: David Noon
date: 1996-12-02 20:24:00
subject: Named Pipes

On Thursday, 96/11/28, George White wrote to David Noon about "Named
Pipes" as follows:

GW> Borland 3.1 generates duff code if set to allow 386 code
GW> generation (it can't do arithmetic on longs correctly :-( ).

Hi George,

We have found opposite results here, but they are not totally
contradictory.

GW> 100 K or so). If the code generation is set back to 286 everything
GW> works OK (well, I've not yet found any bugs with my C programs that
GW> I can blame on the compiler rather than my code).

The problem I encountered was down to the optimiser in 80286 mode. It
assumed that the initialisation value of NULLHANDLE for a HEV would
still be in place after a call to DosCreateEventSem(). Of course it
wasn't; it had been replaced by the actual semaphore handle. When I
called DosWaitEventSem() it came back with an ERROR_INVALID_HANDLE,
because the 2 PUSH instructions to place the handle onto the stack had
hard-coded zeroes.

When I recompiled in 80386 mode the single PUSH instruction pointed to
the handle location for the value to be pushed onto the stack. I didn't
bother pursuing this until this weekend, since the Watcom compiler was
working.

Ironically, the Watcom 16-bit compiler seems to produce the same
object code whether I specify 80286 or 80386 as the target CPU. [Do any
Watcom experts lurking have any input on this phenomenon?] However, its
object code is always logically correct, provided you stay away from
huge data items.

Regards

Dave


 * KWQ/2 1.2i * She won't last forever........why give her a diamond?

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 440/4 141/209 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.