home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!wupost!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!lynx.msc.cornell.edu!boris
- From: boris@msc.cornell.edu (Boris Yost)
- Subject: BC++2.0 vs. National GPIB: Who's on DS?!?
- Message-ID: <1992Jul24.181425.12478@msc.cornell.edu>
- Sender: news@msc.cornell.edu
- Organization: Cornell-Materials-Science-Center
- Date: Fri, 24 Jul 1992 18:14:25 GMT
- Lines: 18
-
- I'm writing a data acquisition/machine control application using BC and
- National GPIB using National's software library, huge model. Ran into a
- most curious bug: one of my constant strings came out with snot in the
- middle of it. Worked fine before--until I split the source file in two for
- easier handling. Reason: TD reveals that one of my GPIB functions is
- stomping on it, and the reason for that is that the data segment for the
- GPIB functions is getting merged with the data segment for main(), but the
- calls are from another module, and DS is set for the data segment for that
- module. I'm following directions (don't tell me to RTFM) that came with it,
- which said the large library works with the huge model--or maybe Borland
- changed how their huge model works. Calls work fine if I change DS to
- main's DS immediately before each 'call far _function' and then change back
- on return, or if I cram all the source into one module (which is almost too
- big a meal for the compiler).
-
- So, how do I either get the linker to merge the data segment with the one
- that calls all the functions (there is only one), or fix it for real--so
- that any module could call the GPIB.
-