README.TXT	7-Feb-2026

The main appeal of XPLW is that it runs directly under 64-bit Windows,
which is what most people have these days. It's more accessible than
before. A free download of Microsoft's Visual Studio provides the
required assembler, ml64.exe, and GoLink is freely redistributable. The
required .dll files are provided by Windows.

XPLW programs run significantly 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 XPL is its simple graphics. Video games are
the ideal demonstration. Video Poker and Minesweeper are provided to get
you started. Cubic and Sand are further demos.

Most existing, non-graphic text-only XPL 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 the beginning to switch back to
MSB termination.

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

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

- 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 (used to prevent glitching overwritten
pixels).

WaitForVSync does not avoid flicker when a graphic is "Clear"ed before
redrawing. The image refresh timing is jittery. Graphic routines may
eventually be entirely 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.

Raspberry Pi has page flipping. Should XPLW have it too? In xpllib.xpl,
Clear2 is for a second graphic page. BigDiv needs to be modified to
handle 64-bit integers. RC's bithist.xpl relies on a second video page
(or bitmap?).

Multitasking intrinsics, such as ShareMem are missing. Rosetta Code's
concur.xpl requires these.

SetVid(1) does not give a 40 character widescreen. Ported soko.xpl. It
uses video mode 1, which doesn't handle double wide characters. Text
modes 0 and 1 now double space characters for devices 0 and 1 (like EXPL
does). However, device 6 for text mode does not because it's very
confusing to do so. Device 6 in graphic mode handles wide characters
like always.

Add print 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;

Finish generalized device I/0:
DONE 0: The Windows "console".
DONE 1: Same as device 0 for output. Unbuffered keyboard input.
2: Printer.
DONE 3: File I/O is fairly essential.
4: Serial I/O is not needed.
5: Fast printer is not needed.
DONE 6: Same as device 0 but with color. Tabs etc. are handled differently.
DONE 7: Null device is trivial.
DONE 8: Pseudo device 8, i.e. memory buffer, it's often used.

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

In windemo.xpl Overlaid Windows causes error 5. This is because it calls
GETREG, which isn't available. What's needed is the memory address of
the text buffer. This isn't available under Windows, but ChatGPT
provides a possible solution called ReadRegion.asm. This same limitation
is on the RPi, and it is avoided by using a graphic mode instead of text
mode. windemo Overlaid Windows works with graphics.
