README.TXT 2-May-2026

The main appeal of XPLW is that it runs directly under 64-bit Windows,
which is what most people use these days. This makes XPL0 more accessible
than before. Visual Studio provides the required assembler, ml64.exe, and
GoLink is freely redistributable. The required .dll files are provided by
Windows.

Programs compiled with XPLW run substantially faster than they do
anywhere else. The Sieve benchmark runs ten times faster than on the
Raspberry Pi, 20 times faster than under DOSBox, and a hundred times
faster than with EXPL.

Probably the main appeal of XPL0 is its built-in graphics. Video games
are the ideal way to demonstrate this. Video Poker and Minesweeper are
provided to get you started. Cubic and Sand are further demos.

Most existing, non-graphic text-only XPL0 programs compile and run
without any problems. Some programs require an adjustment for the
increased size of integers. They often have "IntSize = 4", which must be
changed to 8.

XPLW defaults to terminating text strings with a zero byte. All other
versions of XPL default to terminating strings by setting the most
significant bit of the last character. If this difference prevents a
program from working, add "string 1" at its beginning to switch back to
MSB termination.

Windows 11 Defender can automatically delete some .exe files without any
warning. The 2048.exe program is particularly susceptible. Prevent this
by setting Windows Defender folder exclusions (as explained on the
Internet).

This release of XPLW is unfinished. I'll be glad to help anyone trying to
get any version of XPL working.

Happy computing,
Loren
loren.blaney@gmail.com



TODO LIST

XPLW currently lacks the following features of other versions of XPL0:

There should be a way to turn off the mouse pointer, which is an
intrinsic available on the RPi.

WaitForVSync does not avoid flicker when a graphic is "Clear"ed before
redrawing. The image refresh timing is jittery. XPLW's internal graphic
routines might eventually be replaced with DirectDraw.

Add alpha transparency to Point intrinsic. Color is specified the same as
for 24-bit depth, but its transparency is determined by the highest byte.
The pattern is: AA RR GG BB. AA specifies (alpha) transparency ranging
from 0 being completely transparent (invisible) to $FF being completely
opaque. For example $80FF0000 displays red with any pixels that are
already on the screen partially showing through.

The graphic page-flipping capability in the Raspberry Pi version should
be added. In xpllib.xpl, Clear2 is for a second graphic page.

BigDiv in xpllib needs to be modified to handle 64-bit integers.

Multitasking intrinsics, such as ShareMem, are missing. The Allsorts
program requires these.

SetVid(1) does not display a 40-character widescreen in text mode. Device
6 in graphic mode handles wide characters like always.

Add printer devices 2 and 5. EXPL uses OpenO to call the printer dialog.

Where should code.xpl be located? Now it's in the current directory.

Implement compiler's detection of illegal intrinsic calls.

Clean up code in natwin.asm. Avoid MOV RAX,imm32, which should probably
be replaced with MOV EAX,imm32. Heaphi is set in an awkward way. Put code
that copies the command line into device 8 into a subroutine. Don't rely
on loaded values (such as for Format) to set up variables. That won't
work for the Restart intrinsic.

In text mode, clipped windows wrap from right to left (but do clip
bottom). Another seemingly trivial fix, but I can't see why it isn't
working!

Matey displays its countdown timer off to the left in the console area
rather than in the graphic window. Device 1 is used. (Matey displays its
own mouse pointer.)

Rosetta Code's fixedrec.xpl fails. An output file was opened and written.
It was not closed because it used the small buffer. Attempting to open it
a second time failed. This worked on RPi.

Rosetta Code's airmass.xpl gives Cos overflow error 7 when run on Intel
i7 and AMD Duron computers. However, it works on Raspberry Pi. The Intel
Manual says something about it being the programmer's responsibility to
keep the argument under 2^63.

Rosetta Code's avgloop fails for very large random numbers. Replacing
-1>>1 with $7FFF_FFFF makes it work.

Rosetta Code's extfp.xpl and extreme.xpl don't display -Inf, etc.

recurse.xpl RPi: 1,047,552 vs. Win: 128,000.

Calling Line when in a text mode causes a fatal memory access violation
(AV error).

TTT.XPL gives an AV error because it attempts to draw lines in text mode
1. Under DOSBox this doesn't show the lines, but it doesn't blow up.
Changing SetVid(1) to SetVid($13) partially works, but Move Y is not
large enough.

Text attribute colors don't use palette colors (set by SetPalette); they
use Windows colors instead.

The Paint intrinsic does not implement the IW0 windowing feature.

Optimized generated code. The new conditional MOV instruction could be
useful in GENJOC or JPC. Also, maybe in floating point comparisons.

A 20-digit floating point constant is out of range. It shouldn't be.

It would be nice to have a 'sizeof(X)' command since there are 2, 4, and
now 8 bytes in an integer. This would make going between versions
(especially 32- and 64-bit) automatic. This would mostly be for going
between EXPL and XPLW because there is not much reason to go between
16-bit XPL and RPi XPL. The new xpllib routine SizeOfInt pretty much
makes sizeof(X) obsolete.

Clicking on [X] aborts ED.exe without the chance to save its file.

CGA graphic modes 4, 5, and 6 need a 4-color palette. There is a version
of attrib that prompts for the video mode. Make sure it runs the same way
on XPLW as on EXPL.

The code: A:= N; B:= N; reloads N into the RAX register, missing a simple
optimization. (The /b /d flags were used.)

9223372036854775808 (=$8000_0000_0000_0000) is not detected as out of
range. Note that the negative value -9223372036854775808 is accepted as
in range.

Add intrinsics: SetRun, Restart, Rerun: Do these work? What should be
reinitialized? Verify that SetFont works. (GetFont was verified by
Cubic.xpl.) Ran: Increase from 31 bits to 63 bits.

Divide-by-zero simply aborts without displaying an error message. It
aborts the program with errorlevel = C0000094. There's no way to hook an
interrupt vector (0, in this case). There may be a way to use .try and
.except.

Bug:
cond false;
Text(0 "^"true^" ..."
cond true;

How much stack space is available? ChatTest5 recurses to 2_000_000.

Cannot make a null program. NULL.XPL does not declare PROGRAM as PUBLIC.
This same issue exists in xpx and xx under DOS (so it's probably not
worth worrying about). However, x does work, and so does EXPL.


DROPPED

These features are not implemented and probably will never be implemented:
 Serial device 4
 'extern' 'eproc', 'efunc' (these probably work but aren't documented by RPi)
These were never supported in the RPi version:
 ExtCal, Irq, Equip, Shrink, ExtCal, ExtJmp, IntRet, PIn, POut, Peek, Poke
 Blit, GetReg, SoftInt, Read, Write
