Menu

Tree [8698a2] master /
 History

HTTPS access


File Date Author Commit
 compiler 2021-01-27 Daniel Weaver Daniel Weaver [8698a2] Initial commit
 test 2021-01-14 Daniel Weaver Daniel Weaver [18ac5c] Add examples for operands with an index. Add e...
 tws 2020-12-14 Daniel Weaver Daniel Weaver [1fed89] Add end-of-file support. Add TAB support. Add...
 COPYING 2021-01-19 Daniel Weaver Daniel Weaver [a40454] Initial check-in
 README 2021-01-19 Daniel Weaver Daniel Weaver [a40454] Initial check-in
 makefile 2021-01-19 Daniel Weaver Daniel Weaver [a40454] Initial check-in

Read Me

XPL is a dialect of PL/1 documented in the book "A Compiler Generator"
by McKeeman, Horning and Wortman, published by Prentice-Hall,
1970, ISBN 13-155077-2.  The original compiler was written for the IBM
S/360 and included a BNF grammar analyzer, and a skeleton compiler.

In 1996 David E. Bodenstab ported the compiler to the Intel 486 running
on FreeBSD Unix.  Bootstrapping this compiler was done with the original
IBM 360 object code and an IBM 360 emulator written by David Bodenstab.
The 486 implementation required the upper 8 bits of the memory address to
be zero so that string descriptors could use these bits for the length
of the string.  This was unacceptable for Linux.

In 2020 Daniel E. Weaver ported the compiler to Linux.  The string
descriptors were redesigned to be relative to the start address of
the data area.  This allowed the upper 8 bits of the string descriptors
to be used for the length of the string.  This port was bootstrapped
using the XPL to C translator written by Daniel Weaver which can be
found here:  https://sourceforge.net/projects/xpl-compiler/

As of November 2020 the Linux port runs on both Linux and the Apple MAC.
However Apple has deprecated the 32 bit mode of the Intel processors.
This XPL compiler is not compatible with 64 bit execution.

Fetch the XPL to C translator and unpack it.
	gunzip xpl0007.tar.gz
	tar -xf xpl0007.tar
	cd xpl0007
	make

Fetch the Intel 486 XPL compiler and build it:
	gunzip i4860000.tar.gz
	tar -xf i4860000.tar
	cd i4860000
	make
	sudo make install

The compiler source modules can be found in the compiler directory:

compiler/
  callxpl.c       - Call XPL from C for signal handlers
  compactify.xpl  - XPL string compaction routine
  cstrings.c      - C string conversion routines
  hello.xpl       - "Hello World" program written in XPL
  iAPX486.c       - i486 trace functions
  iAPX486.h       - Header file for the i486 trace functions
  magic.xpl       - XPL program to generate magic numbers
  makefile        - makefile to generate and install the compiler
  strnhex.c       - C string to hex conversion routine
  template.xpl    - Generate Intel 486 encode/decode tables
  xcom.xpl        - The Intel 486 compiler
  xpl.man         - Man page for the XPL driver script
  xpl.sh.in       - XPL driver script
  xplsm.c         - XPL submonitor.  Linux interface support
  xplsm.man       - Man page for the XPL submonitor

tws/              - Translator writer system
  analyzer.xpl    - BNF syntax analysis program and table builder
  example.bnf     - BNF for an example syntax
  makefile        - makefile for this directory
  skeleton.xpl    - skeleton compiler
  xpl.bnf         - BNF for the XPL compiler

test/             - Test programs for the XPL compiler
  bugs.xpl        - Some bugs common to many XPL compilers
  clock.xpl       - Clock interrupt test program
  file.xpl        - Test program for the File builtin function
  genline.xpl     - Generate the INLINE example program inline.xpl
  makefile        - makefile for the tests in this directory
  mode.xpl        - Address mode tests
  string.xpl      - Character string tests
  trap.xpl        - Signal trap test

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.