Run VMS / OpenVMS PASCAL on x86 Linux
VX/PASCAL converts VMS / OpenVMS PASCAL code to ANSI X86 Intel C++ for Linux, enabling applications to run on modern platforms without manual code changes. It is a 99.99% transpiler (translator/compiler) for the compilation and migration of VMS / OpenVMS Pascal to x86 Intel C++.
VX/PASCAL migrates VMS / OpenVMS PASCAL to ANSI C++ for execution on either VMS / OpenVMS or x86 Intel Linux, allowing your OpenVMS Pascal to run seamlessly on x86 Intel Linux. VX/PASCAL also includes the ability for CDD pragmas to be left in place and the CDD maintained as a common data dictionary using VX/CDD.
VMS PASCAL often cannot be compiled with other commercial Pascal compilers due to DEC/HP's practice of extending the base 3GL with useful but incompatible language extensions. VX/PASCAL fully supports these extensions, all VMS data types, and VMS-specific stack extensions (e.g., PRESENT
- NOT PRESENT
).
Migrate VMS / OpenVMS PASCAL: 100% Transpile to ANSI C++
The goal for continuous integration is 100% transpilation (translate and compile). While initial projects might encounter unique VMS PASCAL structures, Sector7 will modify and enhance VX/PASCAL until 99.9999% of your code transpiles and, where tested, runs in exactly the same way as VMS PASCAL. Occasionally, you may need to reorganize a small portion of VMS PASCAL (e.g., less than 100 lines of code out of 3 million) to ensure it compiles and runs on VMS / OpenVMS and also transpiles with VX/PASCAL.
There is no compromise with the execution of the emitted C++. It will run identically to the same Pascal executable compiled on VMS / OpenVMS. We call this "Bug for Bug compatibility" – if there is a bug in your Pascal code, it should still be there in the C++ code.
VX/PASCAL and Continuous Integration
VX/PASCAL is part of the Sector7 continuous integration suite of migration software. For any Sector7 product to be branded "Continuous Integration," it must be capable of:
- ✔ Translating 100% of the original VMS language or API set.
- ✔ Ensuring the generated C++ compiles 100%.
- ✔ Guaranteeing the C++ executes in the identical manner as the original language/API.
For example:
# vxpascal -g *.pas
This command will translate all .pas
files in a directory to C++ and compile all .CXX
to .OBJ
(maintaining the .OBJ
extension for Linux .o
files so that MMS files can be automatically translated to make files).
We do NOT try to reorganize code extensively (though some options for inverting loops exist). Our goal is to produce C++ code that looks almost identical to the PASCAL code and works 100% identically without the C++ code needing to be manually altered.
Unless you have a transpiler that translates, compiles, and links ready for running in a single step, it is unlikely that your project will be completed efficiently. Such projects often extend into multi-year timeframes, with the C++ code always playing "catch up" with the evolving PASCAL codebase.
VX/PASCAL is fully integrated with VX/RT, which enables your VMS Pascal to execute on Linux/Windows exactly as it did on VMS / OpenVMS. VX/PASCAL is the only translator that can guarantee this, handling complexities like the PRESENT
keyword, which relies on VMS stack argument counting—a feature Linux does not natively support.
Sector7's experience allows conversion of 3 million lines of VMS PASCAL to C++ in under 6 months. After an initial "break/fix" cycle, all 3 million lines should translate, compile, link, and run with no human intervention in approximately 30 minutes.
Continuous Integration Highlights:
- Single Source Base: Continue development in VMS PASCAL.
- Zero Code Freeze: Your C++ on VMS / OpenVMS or Linux will always be current with your latest VMS Pascal release, as transpilation to C++ occurs in minutes with no manual changes.
- 32-bit vs. 64-bit: VMS PASCAL is inherently a 32-bit product. VX/PASCAL primarily translates to 32-bit C++. However, it is enhanced to identify where pointers are put into 32-bit integer spaces and will expand the integer to 64 bits. VX/PASCAL notifies you if this expansion causes issues in overlaid structures or those written to files (unless in a PSECT).
String Handling, Code Maintenance, and Code Format Options
VX/PASCAL V2 represents the pinnacle of automated language translation. The emitted C++ code is designed to look almost identical to the PASCAL, making maintenance in C++ simple, even without extensive C++ knowledge. One client's code, graded by an external agency, saw our generated C++ score better in readability and maintainability than the original VMS PASCAL.
Advanced String Handling
VX/PASCAL significantly improves string handling compared to traditional C approaches, mirroring PASCAL's intuitive syntax in C++.
This technique is applied throughout VX/PASCAL for the "sweetest" translation to C++ possible.
VMS / OpenVMS PASCAL RMS support on Intel Linux
VX/PASCAL supports all RMS operations from VMS PASCAL. When used on Linux/Windows with VX/RT and VX/RMS, your program will work in the identical manner. All RMS file organizations (INDEXED
, RELATIVE
, SEQUENTIAL
, BLOCK
), record formats (FIXED
, VARIABLE
), and access modes (KEYED
, SEQUENTIAL
, BY RFA
) are supported.
On Linux/Windows, keyed file I/O timings may differ. VX/RMS often provides faster I/O where needed as it ALWAYS keeps the B+ tree balanced, unlike VMS / OpenVMS RMS which requires reorganization. This means ADDs and DELETEs might be slightly slower, but READ/UPDATE operations are significantly faster. (See VX/RMS for details).
VX/PASCAL: Over 500 Configurable Options
VX/PASCAL has over 500 user-configurable options, including:
- VMS API Function Classes
- VMS Include and Inherit file naming
- VMS Logical translation tables
- VMS System Inheritance (STARLET .PEN's)
- VMS Inheritance PreLoads
- VMS Alignment and PSECT's
- VMS Zero initializers
- VMS "Truncate" emitted C++
- VMS CDD Top
- VMS POSIX error code abstraction (handling different numeric values for identical E_XXXXX error codes)
- PASCAL to C++ Variable naming conventions
- PASCAL to C++ datatypes (INTEGER -> int_t)
- PASCAL to C++ Array Naming and initialization
- Pascal to C++ verb naming (Writeln etc)
- PASCAL to C++ function naming (ABS etc)
- PASCAL to C++ variable naming avoidance
- PASCAL to C++ Function naming avoidance
- Code Styling options (Line breaks)
- Code formatting options (Braces, single/multi-line etc)
- Comment style handling
VMS PASCAL Translation Examples
Examples being updated to total of 50
- System Service API's Prototypes
- Templates and Item Lists
- Datetime, String Logic
Pragma Directives and Pre-Compilation
%DESCR
, %STDESCR
, %REF
, %IMMED
, %INFO
, %WARN
, %ERROR
, %MESSAGE
, %IF
, %THEN
, %ELIF
, %ELSE
, %ENDIF
, %INCLUDE
, %FROM
, %DICTIONARY
, %START_SELF_CHECK
, %STOP_SELF_CHECK
, %ENABLE_SELF_CHECK
, %TITLE
, %PAGE
, %SUBTITLE
Functions
ABS
, ADDRESS
, ARCTAN
, ARCTANH
, ARGUMENT
, ARGUMENT_LIST_LENGTH
, ASSERT
, BIN
, BITNEXT
, BITSIZE
, BITSIZEOF
, BIT_OFFSET
, BREAK
, BYTE_OFFSET
, CHR
, CONTINUE
, COS
, COSH
, C_STR
, DATE
, DATE
, DATE
, DBLE
, DEC
, DISPOSE
, EOF
, EOLN
, EQ
, EVEN
, EXP
, EXP10
, EXPO
, FIND_MEMBER
, FIND_NONMEMBER
, FLOAT
, GE
, GETTIMESTAMP
, GT
, HALT
, HEX
, IADDRESS
, INDEX
, INT
, IN_RANGE
, IPOW
, LE
, LENGTH
, LN
, LOG
, LOG10
, LOWER
, LROUND
, LSHIFT
, LT
, LTRUNC
, MALLOC
, MALLOC_C_STR
, MAX
, MIN
, NE
, NEW
, NIL
, OCT
, ODD
, ORD
, PAD
, PAS_STR
, PRED
, PRESENT
, REVERT
, ROUND
, RSHIFT
, SIN
, SINH
, SIZE
, SIZEOF
, SQRT
, STATUS
, STATUSV
, SUBSTR
, SUCC
, TAN
, TANH
, TIME
, TO
, TRUNC
, UAND
, UDEC
, UFB
, UINT
, UNOT
, UOR
, UPPER
, UTRUNC
, UXOR
, VXPASDEBUG
, XOR