[net.micro.pc] Segments

bursens@cui.UUCP (BURSENS Reginald) (03/19/86)

I am a student of the University of Geneva and I have a problem in linking
many large FORTRAN77 programs. I work on a personal computer (HP 150). My 
linker is the last version (version 3.2) of the Microsoft FORTRAN compiler.

As I link my FORTRAN77 programs, the MS-FORTRAN linker displays the following
error message : "Too many segments". The upper limit on segments is 256. A
segment corresponds to an 8086 register.
 
How could I declare fewer segments (without changing the structure of my pro-
grams, if possible) ?

Does exist a FORTRAN compiler (for personal computer) which :

- allows the control and the managing (assignment of the group name and the  
  class name to the segments) of the segments by the user or

- its upper limit on segments is greater than 256 or

- the managing of the segments is more optimal than the MS-FORTRAN compiler ?

If yes then what are its referencies ?

Remarks : It's not a problem of available memory !

cramer@kontron.UUCP (Clayton Cramer) (03/24/86)

> 
> I am a student of the University of Geneva and I have a problem in linking
> many large FORTRAN77 programs. I work on a personal computer (HP 150). My 
> linker is the last version (version 3.2) of the Microsoft FORTRAN compiler.
> 
> As I link my FORTRAN77 programs, the MS-FORTRAN linker displays the following
> error message : "Too many segments". The upper limit on segments is 256. A
> segment corresponds to an 8086 register.
>  
> Does exist a FORTRAN compiler (for personal computer) which :
> 
> - its upper limit on segments is greater than 256 or
> 

Microsoft Linker V3.05 allows a switch of the form:

  /SEGMENTS:nnnn
  
where nnnn is up to 1024 segments allowed.  I'm not surprised that you
don't know about this switch -- the PC-DOS 3.0 manual section on LINK
doesn't mention it at all.  I found out about it in the LINK section of
the Microsoft C compiler manual.

neff@hpvclc.UUCP (03/25/86)

The latest Microsoft linkers that I have been using support a /SEGMENTS
switch with an upper value of 1024.  You should just be able to link
using /SEGMENTS=512 and have no problems.  I have been writing a huge
program in Microsoft Pascal and get the same error if I use the default
number of segments (128 I believe).  You have an older linker that
does not allow up to 1024 segments and should update your language system.
The latest linker is included with all MS languages.  Ordering the Macro
assembler is the cheapest and the symbolic debugger that comes with it
is fairly useful in and of itself.  The linker I got with Macro assembler
4.00 also seems to use memory more efficiently (I no longer get a 
"Creating VM.TMP file.  Do not change diskette in drive C:" warning).

Of course I must confess that I have an IBM PC-XT, not a HP150 (gasp)
and have come to the conclusion that it is almost always best to buy
software from its actual source, not from the big companies like IBM and HP.
Why?  Both HP and IBM are very slow when it comes to offering updated
versions of some software that they sell -- especially the low volume language
tools.  Whereas the company that actually wrote the software update
quite often (sometimes too often).  Microsoft updates their Pascal compiler
about every 9 months.  IBM has updated the MS Pascal compiler ONCE in
5 years!  I really don't know if you can get the Microsoft language
products in the 3.5 inch media required by the HP150 but I suggest
you try.  You can also add a 5.25 inch disk to your HP150 and break
away from some of the HP sold software (the MS language tools are
straight MS DOS programs -- no ROM calls, no hardware dependencies).

Disclamer: These are obviously personal opinions and certainly do not
reflect HP's position on software purchase.  I am a mere software
flunky at a division that makes printers and have nothing to do with
HP's PC software.

Dave Neff
hpfcla!hpvcla!neff