XPL0 on the RPi is about having fun. With it you can make fast graphics programs, like video games.
XPL0 code looks like Pascal but works more like C. It's a hundred times faster than Python.
Version 2.2 solves an incompatibility with NOOBS 2.4.5 for some display modes (notably used by xed and congame). Among the many changes are new intrinsics: Pow, Floor, Ceil, and SetHexDigits. The arrow keys can now operate like push buttons--handy for games. A library with over a hundred commonly used routines is included. Download xplrpi22.zip (526k, 16-Mar-2018)
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 minor bug fixes and adjustments accumulated since version 1.0.
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.
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 (80k, 16-Mar-2018).
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 (45k, 16-Nov-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: 16-Mar-2018