[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::pascal

Title:DEC Pascal Notes
Notice:See note 1 for kits. Bug reports to CLT::DEC_PASCAL_BUGS
Moderator:TLE::REAGAN
Created:Sat Jan 25 1986
Last Modified:Tue Jun 03 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2675
Total number of notes:13409

2667.0. "Why can't a OpenVMS VAX .PEN file be used on Alpha?" by CSC32::D_SANFORD () Fri Apr 04 1997 16:56

    Customer wants an explanation why a OpenVMS VAX PEN file cannot 
    be used with OpenVMS Alpha?  The documentation does state that
    the PEN is platform specific, but some customers just don't like
    what they read!

    From the DEC Pascal User Manual for OpenVMS Systems, dated July 1995:

      9. Migrating from OpenVMS VAX to OpenVMS Alpha

      This chapter provides information on issues that affect
      programs being moved from OpenVMS VAX systems to
      OpenVMS Alpha systems.

      9.1  Sharing Environment Files Across Platforms

      DEC Pascal only inherits environment files created from a
      compiler for the same target platform. For example, you
      cannot inherit environment files generated by VAX Pascal
      with the DEC Pascal for OpenVMS Alpha compiler.

    From the customer:

      I am not ready to accept this just yet without an explanation.  The
      environment files are not processor specific output of the compile.  
      They are not consumed by the link at all, and are not used in creation 
      of the executable image.  I will proceed as if I have to keep them 
      separate but I want an explanation of why DEC has created this 
      limitation.

    Obviously this customer has written a number of compilers, surprised
    he doesn't have his own Pascal compiler.  Sorry to be so obnoxious, but
    it is the only way to survive in the support center, after all not many
    of us live past 40.

    I suspect the .PEN file is some format of an object file (ANA/OBJECT
    will look at the file with errors reported), if so this would mean it
    is platform specific...  am I right?

    Regards, Drew Sanford
    Customer Support Center
    C970404-1284
T.RTitleUserPersonal
Name
DateLines
2667.1TLE::REAGANAll of this chaos makes perfect senseFri Apr 04 1997 17:3423
    .PEN files are not .OBJ files.  You cannot use ANAL/OBJ to read/format
    them.  They are a totally private binary file that is read/written only 
    by the compiler itself (they are essentially compressed symbol tables).
    
    As for why?  Because we say so, thats why.
    
    Honestly, the reason is because it would have been more work to allow
    it.  
    
    Consider moving a PEN file from an Alpha to a VAX that contained IEEE
    floating point types.  Or moving a PEN file from VAX to Alpha that
    contained an H_Floating floating type.
    
    The part of the compiler that reads PEN files makes the assumption that 
    everything in the PEN file is OK on the platform.  We would have to add
    some code to check the PEN file as it was being inherited for things
    that wouldn't work on that platform.  Another example is moving a PEN
    file to/from Digital UNIX (where addresses are 64 bits) to OpenVMS
    Alpha/VAX (where addresses are only 32 bits).  Again, the compiler
    would be caught off guard then it inherited something from the PEN file
    that it couldn't have ever seen directly.
    
    				-John
2667.2AUSS::GARSONDECcharity Program OfficeSun Apr 06 1997 23:0016
    re .0
    
    Presumably also a platform specific format allows the internal
    structure to be made more efficient for processing on the target
    platform e.g. less "packed" structures on Alpha. Similarly, if Digital
    wanted to make improvements in the format, based on experience of many
    years of VAX, we would not want to be tied down to *ward compatibility
    for an internal format where this was never promised.
    
    Some compilations that produce .PEN files *must* also produce .OBJ files
    - and it isn't always obvious. In that situation, the compilation would
    have to be done twice, once for each platform, even if one could get away
    with throwing away one .PEN file.
    
    The customer hasn't clearly stated what *benefit* would be derived for
    the customer from a common .PEN format.
2667.3TLE::REAGANAll of this chaos makes perfect senseMon Apr 07 1997 13:3429
    RE: .2
    
    Yes, we did consider the "packing" of the fields in the PEN file when
    moving DEC Pascal to Alpha.  Fortunately, we had years of luck and the
    vast majority of the PEN file's layout was already naturally aligned.
    We decided not to make the PEN files differnent due to the 2 or 3
    fields that we're not aligned (especially since you read them only once
    from the file and we made the "in-memory" version aligned properly).
    
    As for "improvements", we have made changes to the PEN file format
    over the years to fix bugs or add new features.  At those times, we
    added code to the "inherit" code that dealt with older PEN file
    formats.  And since the "inherit" code is "common" code (the code
    is aware somewhat of address-size, etc. but those platform-specific
    values are coded as macros/symbolic-constants), adding code to support
    new formats falls out for all the platforms.  Even if we wanted to make
    drastic changes just for the Alpha platform, the fact that we have to
    understand current PEN files means we'll carry around that code
    forever.
    
    The observation that one might have to compile on each platform anyway
    to get the corresponding .OBJ file is one that I overlooked (thanks!).
    
    So, yes, in theory the physical layout of the PEN files is understood
    by all the other compilers.  It is the rest of the compiler that would
    get confused by finding symbol tables for things it didn't think was
    possible on that platform.
    
    				-John
2667.4AUSS::GARSONDECcharity Program OfficeMon Apr 07 1997 22:5317
re .3
    
>    Yes, we did consider the "packing" of the fields in the PEN file when
    
>    As for "improvements", we have made changes to the PEN file format
    
    I was "fishing" somewhat for possible reasons not to support VAX .PEN
    files on Alpha.
    
    Even so, your answer regarding improvements over time to the VAX .PEN
    file format suggests that you are making a (small?) trade-off in favour
    of ease of maintenance of the code base over carrying code into the
    Alpha compiler than can never execute? In theory Alpha gives you the
    chance not to support ancient, odd variants of PEN files in the name of
    *ward compatibility. The decision that the Alpha compiler does not
    support VAX PEN files still allows you flexibility in the future to have
    somewhat different code bases for "inherit"?
2667.5TLE::REAGANAll of this chaos makes perfect senseTue Apr 08 1997 13:3410
    Correct.  We have the option of future Alpha changes since we don't
    support inheriting PEN files from 1982.  I don't know if we'll ever
    use the opertunity, but it is there.
    
    We did consider adding some conditional %IF/%FI conditionals so the
    "old VAX PEN file" dead code wouldn't even appear in the Alpha
    compiler, but its probably only a couple of hundred bytes of code.
    So, yes, we carry around code that can't execute.
    
    				-John