encyclopegia.org

XPL0

XPL0 is a computer programming language that is essentially a cross between Pascal and C.[src] It looks somewhat like Pascal but works more like C.[src] It was created in 1976 by Peter J.[src] R.[src] Boyle who wanted a high-level language for his microcomputer and wanted something more sophisticated than BASIC, which was the dominant language for personal computers at the time.[src] XPL0 is based on PL/0, an example compiler in the book Algorithms + Data Structures = Programs by Niklaus Wirth.[src] The first XPL0 compiler was written in ALGOL.[src] It generated instructions for a pseudo-machine that was implemented as an interpreter on a Digital Group computer based on the 6502 microprocessor.[src] The compiler was converted from ALGOL to XPL0 and was then able to compile itself and run on a microcomputer.[src] XPL0 soon proved its worth in a variety of products based on the 6502.[src] These embedded systems would otherwise have had their code written in assembly language, which is much more tedious to do.[src] Boyle used XPL0 to write a disk operating system called Apex.[src] Beginning in 1980 this was sold, along with XPL0, as an alternative to Apple DOS for the Apple II computer, which was based on the 6502.[src] Since those early years XPL0 has been implemented on a dozen processors, and many features have been added.[src] There are now optimizing native code compilers with 32-bit integers in place of the original 16-bit versions.…[src]

XPL0 is a computer programming language that is essentially a cross between Pascal and C.[src] It looks somewhat like Pascal but works more like C.[src] It was created in 1976 by Peter J.[src] R.[src] Boyle who wanted a high-level language for his microcomputer and wanted something more sophisticated than BASIC, which was the dominant language for personal computers at the time.[src] XPL0 is based on PL/0, an example compiler in the book Algorithms + Data Structures = Programs by Niklaus Wirth.[src] The first XPL0 compiler was written in ALGOL.[src] It generated instructions for a pseudo-machine that was implemented as an interpreter on a Digital Group computer based on the 6502 microprocessor.[src] The compiler was converted from ALGOL to XPL0 and was then able to compile itself and run on a microcomputer.[src] XPL0 soon proved its worth in a variety of products based on the 6502.[src] These embedded systems would otherwise have had their code written in assembly language, which is much more tedious to do.[src] Boyle used XPL0 to write a disk operating system called Apex.[src] Beginning in 1980 this was sold, along with XPL0, as an alternative to Apple DOS for the Apple II computer, which was based on the 6502.[src] Since those early years XPL0 has been implemented on a dozen processors, and many features have been added.[src] There are now optimizing native code compilers with 32-bit integers in place of the original 16-bit versions.[src] Open source compilers for Windows and MS-DOS on PCs and Linux on the Raspberry Pi are available from the link below.[src] ==Examples== This is how the traditional Hello World program is coded in XPL0: code Text=12; Text(0, "Hello World!") Text is a built-in routine that outputs a string of characters.[src] The zero (0) tells where to send the string.[src] In this case it is sent to the display screen, but it could just as easily be sent to a printer, a file, or out a serial port by using a different number.[src] In XPL0 all names must be declared before they can be used.[src] The command word code associates the name Text to built-in routine number 12, which is the one that outputs strings.[src] There are about a hundred of these built-in routines that provide capabilities such as input and output, graphics, and trig functions.[src] The 32-bit versions of the compilers automatically insert code declarations, thus the program above can simply be written as: Text(0, "Hello World!") The TPK algorithm provides an example that can be compared to other languages: func real F(T); real T; return sqrt(abs(T)) + 5.*Pow(T, 3.); int I; real Y, A(11); [for I:= 0 to 10 do A(I):= RlIn(0); for I:= 10 downto 0 do [Y:= F(A(I)); if Y > 400.[src] then [IntOut(0, I); Text(0, " TOO LARGE")] else [IntOut(0, I); RlOut(0, Y)]; CrLf(0); ]; ] Graphics has been a feature of XPL0 since its days on the Apple II computer.[src] int X, Y, Color; [SetVid($101); \set video mode to 640x480x8 repeat for Y:= 0 to 128-1 do for X:= 0 to 128-1 do Point(X, Y, X or Y xor Color); Color:= Color+1; DelayUS(50_000); \0.05 seconds until ChkKey; ] ==References== Fish, Larry (February 1979).[src] "A Block-Structured Language for Microcomputers".[src] Kilobaud, p.[src] 24.[src] ==External links== XPL0 official website XPL0 Programming Language Manual The story behind Apex and XPL0[src]

44 sentences · 44 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"XPL0." encyclopegia.org, 2025, https://encyclopegia.org/wiki/xpl0. Accessed 26 November 2026.

Chicago

"XPL0." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/xpl0.

APA

encyclopegia.org. (2025). XPL0. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/xpl0

Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1319918220 · 0.5 · snapshot enwiki-001319918220

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.