Your SlideShare is downloading. ×
Mod02 compilers
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Mod02 compilers

99
views

Published on

Application Migration to HP NonStop H- und J-Series Operating Systems

Application Migration to HP NonStop H- und J-Series Operating Systems

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
99
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • NonStop H-Series and J-Series Operating Systems Application Migration Compilers 2 - Compilers
  • Transcript

    • 1. CompilersCompilersModule 2
    • 2. 2 - Compilers 2Tool TNS/R TNS/EpTAL compiler (Guardian) PTAL EPTALC compiler (Guardian) NMC CCOMPC++ compiler (Guardian) NMCPLUS CPPCOMPCOBOL compiler (Guardian) NMCOBOL ECOBOLC compiler (OSS) c89 c8 9C++ compiler (OSS) c89 c8 9COBOL compiler (OSS) nmcobol ecobolNon-PIC linker nld Not supportedPIC linker ld eldLoader (for DLLs) rld rldObject File Utility noft enoft(command line) Debuggers DEBUG Not supportedINSPECT EINSPECTNew Names for native CompileNew Names for native Compile
    • 3. TNS/E COBOL CompilerTNS/E COBOL Compiler◦ Guardian environment: ECOBOL/IN <src-file> [,OUT <list-file>] [options]/[<obj-file>][;directives,…]◦ OSS environment: ecobol myProg.cbl –o myProg.exe◦ Creates code 800 linkfile Executable if RUNNABLE directive used2 - Compilers 3
    • 4. Obsolete DirectivesObsolete Directives◦ NON-SHARED — Ignored.All code is now position-independent code (PIC).◦ LARGEDATA: Ignored, warning generated.◦ LESS-CODE: Ignored, warning generated.◦ LD: Error generated, Replaced by ELD◦ NLD: Error generated, Replaced by ELD2 - Compilers 4
    • 5. Changed Directives and ClausesChanged Directives and Clauses◦ UL: Indicates code for a dynamic-link library (DLL).◦ SYNCHRONIZED Applies to 01 and 77 level items . May now align to a 8-byte boundary,if item is 4 or more bytes long.◦ OPTIMIZE — Level 2 provides more.◦ RENAMES — of an 01 item now correctlygives error (use REDEFINES instead)2 - Compilers 5
    • 6. New FeaturesNew Features◦ Support for some COBOL-2002 standardfeatures: BASED No storage allocated for item ALLOCATE Obtain dynamic memory FREE Release dynamic memory New reserved words Requires STANDARD 2002 directive2 - Compilers 6
    • 7. File Name ChangesFile Name ChangesGuardian API declarations:◦ NMCOBEXx changes to ECOBEXxWhere x is 0: Latest1: Next to latestT: OldestMight appear inCONSULTSEARCHSPECIAL-NAMESCALLENTER2 - Compilers 7
    • 8. Other ChangesOther Changes◦ IEEE Floating point now used for certainintrinsic functions: Trigonometric and Logarithmic Better performance Results differ from Tandem_floating point◦ Linkfiles can be flagged as NEUTRAL_FLOAT Useable in programs of either format2 - Compilers 8
    • 9. ScreenCobol CompilerScreenCobol Compiler Optional use of Pathtcp4◦ Context-sensitive support: DIALOG-BEGIN Start a dialog with single server process Optionally sends data DIALOG-SEND Continue dialog DIALOG-ABORT Cancel dialog DIALOG-END Perform Clean-up operations No data sent to server◦ Allows >32k bytes of data per transaction Server:◦ New system message: –121, PATHSEND DIALOG ABORT2 - Compilers 9
    • 10. TNS/E C/C++ CompilerTNS/E C/C++ Compiler◦ The TNS/E C/C++ compiler complies with thefollowing standards: C - ANSI X3J11/88-159 ISO/IEC 9899:1990 (E) C++ - ISO/IEC 14882 1998-09-01◦ Guardian C: CCOMP/IN <src-file> [,OUT <list-file>] [options]/[<objfile>][;directives,…]◦ Guardian C++: CPPCOMP/IN <src-file> [,OUT <list-file>] [options]/[<objfile>][;directives,…]◦ OSS C/C++: c89 myProg.c –o myProg.exe –Wtarget={TNS/E|TNS/R} OSS defaults to current platform2 - Compilers 10
    • 11. Obsolete PragmasObsolete Pragmas◦ EXTERN_DATA: (GP-relative addressing) not supported.◦ NON_SHARED: Ignored.All code is now position-independent code (PIC).◦ LD: Error generated, replaced by ELD◦ NLD: Error generated, replaced by ELD◦ VERSION1 — Not supported;VERSION3 is the default(the MIGRATION_CHECK pragma can be used with theVERSION2 pragma to aid in converting toVERSION3).◦ SRLxxxx — SRLs obsoleted by DLLs.TNS/R C/C++provided a number of SRL-related pragmas. Since TNS/Edoes not support SRLs, these pragmas are obsolete andnot supported by the TNS/E C/C++ compiler.2 - Compilers 11
    • 12. Changed PragmasChanged Pragmas◦ IEEE_FLOAT — Is now the default◦ TANDEM_FLOAT — Is still available◦ Linkfiles can be flagged as NEUTRAL_FLOAT Useable in programs of either format2 - Compilers 12
    • 13. New PragmasNew PragmasNEUTRAL◦ Compiler pragma-Wbuilding_neutral_library◦ Command line option◦ For creating a C++ version2/version3 independent DLL◦ Cannot use objects marked MODEL_DEPENDENTMODEL_DEPENDENT◦ Used in C++ standard headers only2 - Compilers 13
    • 14. New PragmasNew PragmasMAXALIGN◦ Applies to the definition of a composite type. C applies to array types, struct types, and union types. C++ applies to classes as well. TNS/E: 16 bytes alignment Does not affect the layout or alignment of thecomponents of the composite type. It only affects theoverall alignment for the composite type. To control the layout of the components of a class,struct, or union, the FIELDALIGN pragma must stillbe specified in addition to the MAXALIGN pragma.2 - Compilers 14
    • 15. New FeaturesNew Features New data type◦ unsigned long long TNS/E C/C++ supports an unsigned 64 bit integer type, Range is 0 .. 18446744073709551615. The suffixes for unsigned long long literals are ULL and ull. unsigned long long var = 18446744073709551615ULL;◦ intmax for Preprocessor Expressions Preprocessor expressions are evaluated using intmax_t and uintmax_t. Intmax_t and uintmax_t are defined in <stdint.h> to be long long andunsigned long long, respectively.◦ Supporting functions: strtoll: char string to signed long long strtoull: char string to unsigned long long wcstoll: wide-char string to signed long long wcstoull: wide-char string to unsigned long long2 - Compilers 15
    • 16. New FeaturesNew Features C99 support:◦ __func__ Identifier◦ Universal Character Names Usable in identifiers etc. to designate characters that are not in the basiccharacter set A universal character name has the form: unnnn or Unnnnnnnn (where n is a hexadecimal digit)◦ Digraph Characters Two-character sequences that represent a single character2 - Compilers 16
    • 17. New FeaturesNew Features C99 support (continued):◦ Aggregate initialization Designators initialize the components of an array or struct.◦ Nonconstant Aggregate Component Initializers The initializer expression for an automatic compositevariable can contain nonconstant subexpressions.2 - Compilers 17
    • 18. New FeaturesNew Features C99 support (continued):◦ Mixed Statements and Declarations Declarations can appear within a block.◦ New Block Scopes for Selection and IterationStatements All selection statements (if, if/else, and switch statements) anditeration statements (while, do/while, and for statements) andtheir associated substatements are considered to be blocks.2 - Compilers 18
    • 19. New FeaturesNew Features C99 support (continued):◦ Variadic Macros Variadic function-like macros with a variable number ofarguments. Example #define debug (...) fprintf (stderr, __VA_ARGS__) debug ("flag"); // expands to: fprintf (stderr, "flag"); debug ("x = %in", x); // expands to: fprintf (stderr, "x = %in", x);2 - Compilers 19
    • 20. Other ChangesOther ChangesCEXTDECS file◦ Uses int data type for 32-bit values◦ Previously used long data type◦ Gives warning during compilationNew Exception handler architecture (C++)◦ Better performance2 - Compilers 20
    • 21. Other ChangesOther ChangesCompiler order of evaluation◦ TNS/E compiler evaluates in different order◦ Incorrect code that worked on TNS/R maynot work on TNS/E char * ptr; ... ptr = strcpy(ptr, "string") + strlen(ptr);2 - Compilers 21
    • 22. Documentation ChangeDocumentation Change2 - Compilers 22Library FileNames
    • 23. Using Conditional CompilationUsing Conditional Compilation Test macros are available to control conditional compilation:◦ _TNS_E_TARGET, _TNS_R_TARGET #ifdef _TNS_E_TARGET /*TNS/E specific code goes here */ #else /*TNS/R specific code goes here */ #endif◦ _TANDEM_ARCH_: 0:TNS, 1:TNS/R, 2:TNS/E #if _TANDEM_ARCH_ = 2 /*TNS/E specific code goes here */ #else /*TNS or TNS/R specific code goes here */ #endif2 - Compilers 23
    • 24. TNS/E epTAL CompilerTNS/E epTAL Compiler◦ Guardian environment: EPTAL/IN <src-file> [,OUT <list-file>] [options]/ [<obj-file>][;directives,…]◦ Creates code 800 linkfile2 - Compilers 24
    • 25. Obsolete DirectivesObsolete Directives◦ ?SAVEGLOBALS — Gives error◦ ?USEGLOBALS — Gives error◦ ?BEGINCOMPILATION — Ignored◦ ?[NO]CALL_SHARED — Ignored◦ ?SRL — Ignored◦ ?[NO]GP_OK — Ignored◦ ?PUSHGP_OK — Ignored◦ ?POPGP_OK — Ignored2 - Compilers 25
    • 26. Changed DirectivesChanged Directives◦ ?NOOVERFLOW_TRAPS Now the default◦ ?OPTIMIZEFILE Some conditions now cause warnings: File does not exist, cannot be opened, is not code 101 Same procedure appears multiple times Procedure is unknown Invalid optimize level2 - Compilers 26
    • 27. Other ChangesOther Changes◦ INTERRUPT procedure attribute notsupported◦ AUTO and PLATFORM perform samealignment in eptal2 - Compilers 27
    • 28. Function ChangesFunction Changes$AXADR Not supported Replace with standard interface(see ref. manual)$EXECUTIO Not supported Remove from the program$FREEZE Allowed as DEFINEnameReplace with the $TRIGGER (newin TNS/E)$HALT Allowed as DEFINEnameReplace with the $TRIGGER (newin TNS/E)$INTERROGATE[H]IO Not supported Remove from the program$LOCATESPTHDR Not supported Remove from the program$LOCKPAGE Not supported Remove from the program$READBASELIMIT Not supported Remove from the program$READSPT Not supported Remove from the program$STACK_ALLOCATE Behavior change Address and size rounded up to16-bytes (was 8 bytes)$UNLOCKPAGE Not supported Remove from the program$WRITEPTE Not supported Remove from the program2 - Compilers 28
    • 29. RETURN and RETURNSCCRETURN and RETURNSCCTNS/E behavior TheTNS/E pTAL compiler issues a warningwhenever a pTAL procedure returnsboth a traditional function value and a condition code value. Read the migration guide for details on how tomigrate such a procedure2 - Compilers 29
    • 30. New epTAL FeatureNew epTAL Feature STRUCTALIGN (MAXALIGN) for 16-byte aligned data◦ Certain NonStop H-series functions require data to be alignedon 16-byte boundaries.TNS/E pTAL requires such data to be declared in a structuretemplate that provides this 16-byte alignment.STRUCTALIGN (MAXALIGN) causes data to be aligned on themaximum alignment defined for the platform, which is 16 bytesfor theTNS/E platform.◦ GETPOOL and POOL_GETSPACE_ 16-byte alignment vs. 4-byte alignment on TNS/R2 - Compilers 30
    • 31. New Guardian Procedure CallsNew Guardian Procedure Calls◦ PROCESS_DELAY_ : Supercedes DELAY◦ TIMER_START_ : Allows microseconds in time period◦ TIMER_STOP_◦ TS_NANOSECS_ : Nanoseconds since last coldload◦ TS_UNIQUE_CREATE_ Create network-wide 128-bit unique timestamp◦ TS_UNIQUE_COMPARE_◦ TS_UNIQUE_CONVERT_TO_JULIAN_ Convert 128-bit timestamp to 64-bit Julian timestamp2 - Compilers 31
    • 32. Changed Guardian ProceduresChanged Guardian Procedures◦ New return values for: PROCESSORTYPE PROCESSOR_GETNAME_ PROCESSOR_GETINFOLIST_ can also report number of IPUs (REMOTE)TOSVERSION◦ DEBUG and PROCESS_DEBUG_ Invoke NonStop H-series debuggers2 - Compilers 32
    • 33. Questions ?Questions ?33
    • 34. 2 - Compilers 34