[comp.lang.fortran] MS FORTRAN: Need routine to get SEG and offset values

PNU@PSUVM.BITNET (12/13/89)

I have a FORTRAN problem, which I think needs to be solved with an
assembly language routine. Unfortunately, I've never done any assembly
programming and would rather not have to start now.

The problem is, I need to call a routine which expects to be passed
(by value) the segment and offset of the first element of a fixed length
character array. The intrinsic LOCATE function supplied with MS FORTRAN
supplies an offset from the start of the default data segment, which
doesn't do me much good. Routines provided for this purpose as part of
other Microsoft languages won't help. For example, the PTR86 routine
which comes with some versions of BASIC requires the use of the BASIC
intrinsic VARPTR function.

Has anyone encountered this problem before? Anyone have some ASM code that
will help me out? Ideally, I'd need a routine to which you could pass the
first element of an array, and which would return integers for the
segment and offset values. Any help would be greatly appreciated!


                              Jon Peters
                              Research Assistant
                              Pennsylvania State University
                                          Applied Research Laboratory


                              BITNET: PNU@PSUVM