XPL0 on the RPi is about having fun. With it you can make fast graphical programs, like video games.
XPL0 code looks like Pascal but works more like C. It's a hundred times faster than Python.
Version 2.1 plays sound files reliably (by reaping zombies) and mouse pointer routines are built-in. Device 0 displays extended IBM characters like device 6 always has. Intrinsics are declared automatically, and their arguments are checked for validity at compile time. There are also many minor bug fixes and adjustments accumulated over the past year since version 1.0. Download xplrpi21.zip (504k, 30-Jun-2017)
Here are screen shots of some of the example programs included in the zip file:
The PC version of the XPL0 Programming Language Manual has been revised to describe programming on the Raspberry Pi. Obsolete sections such as segment arrays, interpreted I2L code, and external procedures have been eliminated. Many new intrinsics have been added. Download manual.pdf.
It's no longer obvious how to run from a command prompt in full-screen mode. From the Desktop click on the raspberry icon in the upper-left corner. Select Preferences / Raspberry Pi Configuration. Change Boot: from Desktop to CLI, then click OK. To get to the Command Line Interface click on the raspberry icon, then select Shutdown / Reboot. From a CLI prompt you can get back to the Desktop with the command: startx
Under this latest version of Raspbian some programs, such as xed and congame, don't display characters. A temporary fix is to change the display depth back to what it was with previous versions of Raspbian using this command: fbset -depth 16
Here's a text editor. Editors are personal things so this one might not
appeal to you, but it has made writing programs much easier for some of
us. In addition to standard screen-oriented editing it has a powerful
command-line macro capability. An unusual feature moves the heavily used
Ctrl key to the position of the Caps Lock key, where it was on early
keyboards and where it prevents the affliction known as "Emacs pinky."
The features are all explained in a 25-page
manual, as well as in the built-in help screens. You even get the
source code so you can change the commands to your liking. Download xed.zip (79k, 15-Jun-2017).
TeXtris is a cross between Tetris and Scrabble. The idea is to form
words from falling letter tiles. Crammed into the executable file are
the 53,800 official Scrabble words between 3 and 7 letters long.
Download textris.zip (243k, 15-Jun-2017).
Challenge Matey to a game of chess -- or play against another
with Matey enforcing the rules. Move pieces with the mouse, specify
skill level, undo bad moves, view Matey's thinking. This is more of an
XPL0 programming example rather than a strong competitor. It rates
about 1100 at its level 4. Download matey.zip (67k, 30-Jun-2017).
Yer basic shooter...with source of course. Have fun!
Download pede.zip (106k, 11-Jun-2017).
8-Across solitaire is similar to but different than Windows
Download 8across.zip (63k, 11-Jun-2017).
Venerable Chinese tile game.
3D bamboo-laminated ivory tiles.
Download mahjongg.zip (46k, 15-Jun-2017).
This will tell you how late it is while saving lots of money
on Nixie tubes. Download nixieclk.zip (74k, 15-Jun-2017).
Here are a couple demo programs from the illusive Lenny Boreal.
The text scroller with its "jumpin' graphics" is a mere two pages of code.
As impressive as that is, it's then incorporated into a much larger demo.
Cubic is a self-referential program that requires its source code to even run.
It must be compiled with the optimizing compiler.
Download cubic.zip (56k, 15-Jun-2017).
This program understands English commands such as
"Put the red block on top of the green one."
It's inspired by a much more sophisticated
program called SHRDLU.
Download blkworld.zip (36k, 15-Jun-2017).
Here's a simple version of a raycaster like used in Wolfenstein 3-D.
The essentials are boiled down to six pages of commented code.
Use your mouse to move through the rooms.
Could this be the start of your FPS game?
Download cast.zip (35k, 15-Jun-2017).
Spirograph with standard GUI controls.
Download spiro.zip (36k, 15-Jun-2017).
Here are a couple games for young kids.
Use the arrow keys to load the truck with the
four shapes shown in the upper-right corner.
Once you've mastered that, how many hops
will it take to guide the frog to the pond
(where he can eat a delicious fly)?
Download kidgames.zip (55k, 15-Jun-2017).
Here's a selection of maze programs from simple to complex --
rectangular, hexagonal, and spherical, 2D and 3D, inside and out.
Perhaps one of these eight programs will strike your fancy. Download mazemad.zip (46k, 30-Jun-2017).
If you like demo programs, Hugi Magazine shows how to make them in XPL0.
Versions that run on the RPi are here: Download hugidemo.zip (184k, 26-Jun-2017).
Here are some utility programs useful for manipulating program files.
The main one is a cross-reference generator.
Download tools.zip (15k, 26-Jun-2017).
3D Isometric Sokoban sliding box puzzle game with 36 levels.
(Coding sound effects is so much simpler than with the Windows version.)
Download sokoban.zip (66k, 11-Jul-2017).
This waterwheel defies expectations by periodically reversing direction.
It demonstrates the Lorenz Attractor, the famous set of equations that
turned the physicist's world into chaos.
Download ww.zip (28k, 16-Jul-2017).
Stereo 3D plot of the Lorenz Attractor.
"Can the flap of a butterfly's wing stir up a tornado...?"
A mere 73 lines of XPL0 code.
Download lorenz.zip (23k, 16-Apr-2017).
Detailed Description of XPL0 on the Raspberry Pi
Simplified Assembly Language for the Raspberry Pi
How sieve.xpl Gets Compiled
The XPL0 Programming Language
Sound Library, if needed: libasound.zip (659k).
My version of the PiPad
Low-level Graphics on Raspberry Pi
ARM assembler in Raspberry Pi
ARM and Thumb Instruction Set Reference Card
Taming The Linux Keyboard
Last update: 18-Sep-2017