Category:XPL0: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "{{stub}}{{language}}")
 
No edit summary
Line 1: Line 1:
{{stub}}{{language}}
{{stub}}{{language}}
'''XPL0''' is essentially a cross between Pascal and C. It was created in 1976
by Peter J. R. Boyle, who designed it to run on a 6502 microcomputer as
an alternative to BASIC, which was the dominant language for personal
computers at the time. XPL0 is based on PL/0, an example compiler in the
book ''Algorithms + Data Structures = Programs'' by Niklaus Wirth. The first
compiler was written in ALGOL. This was used to create a compiler
written in XPL0 syntax.

The language has been implemented on over a dozen processors, but is
currently maintained for IBM-type PCs. Free, open-source versions of the
compilers (interpreted, assembly code compiled, and optimizing) are
available from the official website: xpl0.org [http://www.xpl0.org/]

Here is how the traditional Hello World program is coded:

<pre>
code Text=12;
Text(0, "Hello World!")
</pre>

Text is a built-in routine, called an ''intrinsic'', that outputs a string
of characters. The zero (0) tells where to send the string. 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.

All names must be declared before they can be used. The command word
''code'' associates the name Text to the built-in routine number 12, which
outputs strings. There are about 80 of these built-in routines that
provide capabilities such as input and output, graphics, and trig
functions.

Revision as of 02:57, 22 April 2012

This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Language
XPL0
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using XPL0.

XPL0 is essentially a cross between Pascal and C. It was created in 1976 by Peter J. R. Boyle, who designed it to run on a 6502 microcomputer as an alternative to BASIC, which was the dominant language for personal computers at the time. XPL0 is based on PL/0, an example compiler in the book Algorithms + Data Structures = Programs by Niklaus Wirth. The first compiler was written in ALGOL. This was used to create a compiler written in XPL0 syntax.

The language has been implemented on over a dozen processors, but is currently maintained for IBM-type PCs. Free, open-source versions of the compilers (interpreted, assembly code compiled, and optimizing) are available from the official website: xpl0.org [1]

Here is how the traditional Hello World program is coded:

      code Text=12;
      Text(0, "Hello World!")

Text is a built-in routine, called an intrinsic, that outputs a string of characters. The zero (0) tells where to send the string. 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.

All names must be declared before they can be used. The command word code associates the name Text to the built-in routine number 12, which outputs strings. There are about 80 of these built-in routines that provide capabilities such as input and output, graphics, and trig functions.

Subcategories

This category has the following 2 subcategories, out of 2 total.

@

Pages in category "XPL0"

The following 200 pages are in this category, out of 863 total.

(previous page) (next page)

C

(previous page) (next page)