Embed Inc Pascal

Last updated 26 June 2006

Embed Inc workstation software is written in an environment that provides interface to system services independent of the underlying operating system.  This is in part accomplished thru the use of libraries containing a well defined portability layer.  This layer is re- written for each target operating system.  The OS portability layer was designed to be small to require as little work as possible to implement a new target operating system.  A new implementation for a totally new operating system is typically a few 1000 lines of code, with the difference between related operating systems (like various flavors of Unix) typically being a few 100 lines of code. 

Another important aspect of the portable application development environment is that the source code is not passed directly to the compiler for a particular target operating system.  This allows for converting system independent features in the source code to system dependent features that differ between target compilers.  In some cases it also allows for work arounds to known bugs in the target compilers. 

This essentially treats the original source code as a meta-language that is converted to specific target languages as needed given the particulars of the target language and system.  Since the language of the original source is therefore independent from the target languages, the target languages can be different from each other and from the original source language.  This means the "best" compiler for a target system can be used, regardless of source code compatibility to the chosen target languages on other systems. 

This also means that the original source language can be chosen for criteria other than whether it is generally available.  Factors, like clarity, rich set of constructs, and ability to detect programmer errors at translation time are paramount.  The common C language fails miserably for most of these criteria. 

The Embed Inc portable application development environment uses a variant of Pascal as the system-independent source language.  Specifically it is derived from the Apollo Domain/OS version of Pascal.  This was a solid production-ready implementation of Pascal.  Most of the Aegis operating system was written in this language.  It started with the basic concept defined by Wirth and Jensen, and added features to make it actually useful in a production environment.  We have made further modifications to the Domain/OS version.  These have partly been to remove system-dependent constructs, and a few unfortunate features that should never have been there in the first place.  We have also added some new features to aid in writing portable code and to make the language richer.  A detailed list of differences from Domain/OS Pascal to Embed Inc Pascal are listed in the SST documentation file

Installing Embed Inc Pascal

Embed Inc Pascal is implemented by the SST program (Source to Source Translator).  It relies on specific existing target compilers.  For the Windows platform, this is the Microsoft Visual C++ compiler. 

To use Embed Inc Pascal go to the software downloads page and install the Host source code and everything release.  This step is NOT for beginners, and should be performed by someone familiar with Windows, installing programs, environment variables, etc.  Make sure to follow the detailed directions on how to set up your system to build source code. 

Once everything is set up, you can build a Pascal program that is all contained in a single file by running the script:

build_pas program-name

Tutorials

Pascal was originally designed as a teaching language, and is a good choice for that purpose.  While it is more useful to know languages like C, C++, Java, and others for commercially viable programming skills, it can be useful to start with Pascal to learn basic programming concepts.  Some languages (like C) rely more on special characters than easier to learn and recognize keywords.  Others (again like C) have poor type checking and enforcing of programmer discipline.  This is particularly dangerous for new programmers since it is so important to develop good habits early on.  Other languages (like C++) have overly complex syntax and complex rules that can be very intimidating when trying to learn basic programming concepts. 

Basic programming concepts and disciplines learned with a simple, clear, but useable language are applicable to almost any other language.  Pascal is a good lanaguage for this purpose, as was originally intended by its creators. 

This section introduces Embed Inc Pascal as a set of lessons or tutorials:

  1. Documentation conventions.  This is not really a tutorial, but describes the documentation conventions used in all the tutorials. 

  2. Simple Program Structure.  Introduces a few basic executable statements and the minimum program structure to use them in simple output-only programs.