请输入您要查询的百科知识:

 

词条 XPL0
释义

  1. Example

  2. References

  3. External links

XPL0 is a computer programming language that is essentially a cross

between Pascal and C. It was created in 1976 by Peter J. R. 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.

XPL0 is based on PL/0, an example compiler in the book Algorithms + Data Structures = Programs by Niklaus Wirth. The first XPL0 compiler was written in ALGOL. It generated instructions for a pseudo-machine that was implemented as an interpreter on a Digital Group computer based on the 6502 microprocessor. The compiler was converted from ALGOL to XPL0 and was then able to compile itself and run on a microcomputer.

XPL0 soon proved its worth in a variety of products based on the 6502. These embedded systems would otherwise have had their code written in assembly language, which is much more tedious to do.

Boyle used XPL0 to write a disk operating system called Apex. 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.

Since those early years XPL0 has migrated to other processors and many features have been added. Open source versions of the compilers for IBM-style PCs are available from the link below.

Example

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. 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.

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

References

  • Fish, Larry (February 1979). "A Block-Structured Language for Microcomputers". Kilobaud, p. 24.

External links

  • XPL0 official website
  • XPL0 Programming Language Manual
  • The story behind Apex and XPL0

2 : Procedural programming languages|Programming languages created in 1976

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 1:55:45