UCSD Pascal

Last updated
UCSD Pascal/p-System
UCSD p-System.svg
Logo of Version IV
Developer University of California, San Diego, SofTech, Pecan
OS family p-code operating systems
Working stateHistoric
Initial releaseAugust 1977;47 years ago (1977-08)
Latest release IV.2.2 R1.1 / December 1987;36 years ago (1987-12)
Available in English
Platforms Apple II, DEC PDP-11, Intel 8080, Zilog Z80, MOS 6502, Motorola 68000, x86, Osborne Executive, Pascal MicroEngine, TI 99/4A, BBC Micro
Kernel type p-code virtual machine

UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UCSD).

Contents

The p-System

In 1977, the University of California, San Diego (UCSD) Institute for Information Systems developed UCSD Pascal to provide students with a common environment that could run on any of the then available microcomputers as well as campus DEC PDP-11 minicomputers. The operating system became known as UCSD p-System.

There were three operating systems that IBM offered for its original IBM PC. The first was UCSD p-System, with IBM PC DOS and CP/M-86 as the other two. [1] Vendor SofTech Microsystems [2] emphasized p-System's application portability, with virtual machines for 20 CPUs as of the IBM PC's release. It predicted that users would be able to use applications they purchased on future computers running p-System; [3] advertisements called it "the Universal Operating System". [4]

PC Magazine denounced UCSD p-System on the IBM PC, stating in a review of Context MBA, written in the language, that it "simply does not produce good code". [5] The p-System did not sell very well for the IBM PC, because of a lack of applications and because it was more expensive than the other choices. Previously, IBM had offered the UCSD p-System as an option for IBM Displaywriter, an 8086-based dedicated word processing machine. (The Displaywriter's native operating system had been developed completely internally and was not opened for end-user programming.)

Notable extensions to standard Pascal include separately compilable Units and a String type. Some intrinsics were provided to accelerate string processing (e.g. scanning in an array for a particular search pattern); other language extensions were provided to allow the UCSD p-System to be self-compiling and self-hosted.

UCSD Pascal was based on a p-code machine architecture. Its contribution to these early virtual machines was to extend p-code away from its roots as a compiler intermediate language into a full execution environment.[ clarification needed ] The UCSD Pascal p-Machine was optimized for the new small microcomputers with addressing restricted to 16-bit (only 64 KB of memory). James Gosling cites UCSD Pascal as a key influence (along with the Smalltalk virtual machine) on the design of the Java virtual machine. [6]

UCSD p-System achieved machine independence by defining a virtual machine, called the p-Machine (or pseudo-machine, which many users began to call the "Pascal-machine" like the OSalthough UCSD documentation always used "pseudo-machine") with its own instruction set called p-code (or pseudo-code). Urs Ammann, a student of Niklaus Wirth, originally presented a p-code in his PhD thesis, [7] from which the UCSD implementation was derived, the Zurich Pascal-P implementation. The UCSD implementation changed the Zurich implementation to be "byte oriented". The UCSD p-code was optimized for execution of the Pascal programming language. Each hardware platform then only needed a p-code interpreter program written for it to port the entire p-System and all the tools to run on it. Later versions also included additional languages that compiled to the p-code base. For example, Apple Computer offered a Fortran Compiler [8] (written by Silicon Valley Software, Sunnyvale California) producing p-code that ran on the Apple version of the p-system. Later, TeleSoft (also located in San Diego) offered an early Ada development environment that used p-code and was therefore able to run on a number of hardware platforms including the Motorola 68000, the System/370, and the Pascal MicroEngine.

UCSD p-System shares some concepts with the later Java platform. Both use a virtual machine to hide operating system and hardware differences, and both use programs written to that virtual machine to provide cross-platform support. Likewise both systems allow the virtual machine to be used either as the complete operating system of the target computer or to run in a "box" under another operating system.

The UCSD Pascal compiler was distributed as part of a portable operating system, the p-System.

History

UCSD p-System began around 1974 as the idea of UCSD's Kenneth Bowles, [9] who believed that the number of new computing platforms coming out at the time would make it difficult for new programming languages to gain acceptance. He based UCSD Pascal on the Pascal-P2 release of the portable compiler from Zurich. He was particularly interested in Pascal as a language to teach programming. UCSD introduced two features that were important improvements on the original Pascal: variable length strings, and "units" of independently compiled code (an idea included into the then-evolving Ada (programming language)). Niklaus Wirth credits the p-System, and UCSD Pascal in particular, with popularizing Pascal. It was not until the release of Turbo Pascal that UCSD's version started to slip from first place among Pascal users.

The Pascal dialect of UCSD Pascal came from the subset of Pascal implemented in Pascal-P2, which was not designed to be a full implementation of the language, but rather "the minimum subset that would self-compile", to fit its function as a bootstrap kit for Pascal compilers. UCSD added strings from BASIC, and several other implementation dependent features. Although UCSD Pascal later obtained many of the other features of the full Pascal language, the Pascal-P2 subset persisted in other dialects, notably Borland Pascal, which copied much of the UCSD dialect.

Versions

UCSD Pascal in use UCSD2.png
UCSD Pascal in use

There were four versions of UCSD p-code engine, each with several revisions of the p-System and UCSD Pascal. A revision of the p-code engine (i.e., the p-Machine) meant a change to the p-code language, and therefore compiled code is not portable between different p-Machine versions. Each revision was represented with a leading Roman Numeral, while operating system revisions were enumerated as the "dot" number following the p-code Roman Numeral. For example, II.3 represented the third revision of the p-System running on the second revision of the p-Machine.

Version I

Original version, never officially distributed outside of the University of California, San Diego. However, the Pascal sources for both Versions I.3 and I.5 were freely exchanged between interested users. Specifically, the patch revision I.5a was known to be one of the most stable.

Version II

Widely distributed, available on many early microcomputers. Numerous versions included Apple II ultimately Apple Pascal, DEC PDP-11, Intel 8080, Zilog Z80, and MOS 6502 based machines, Motorola 68000 and the IBM PC (Version II on the PC was restricted to one 64K code segment and one 64K stack/heap data segment; Version IV removed the code segment limit but cost a lot more[ quantify ]).

Project members from this era include Dr Kenneth L Bowles, Mark Allen, Richard Gleaves, Richard Kaufmann, Pete Lawrence, Joel McCormack, Mark Overgaard, Keith Shillington, Roger Sumner, and John Van Zandt.

Version III

Custom version written for Western Digital to run on their Pascal MicroEngine microcomputer. Included support for parallel processes for the first time.

Version IV

Commercial version, developed and sold by SofTech. Based on Version II; did not include changes from Version III. Did not sell well due to combination of their pricing structure, performance problems due to p-code interpreter, and competition with native operating systems (on top of which it often ran). After SofTech dropped the product, it was picked up by Pecan Systems, a relatively small company formed of p-System users and fans. Sales revived somewhat, due mostly to Pecan's reasonable pricing structure, but the p-System and UCSD Pascal gradually lost the market to native operating systems and compilers. Available for the TI-99/4A equipped with p-code card, Commodore CBM 8096, Sage IV, HP 9000, and BBC Micro with 6502 second processor. [10]

Further use

The Corvus Systems computer used UCSD Pascal for all its user software. The "innovative concept" of the Constellation OS was to run Pascal (interpretively or compiled) and include all common software in the manual, so users could modify as needed.

Notes

  1. Williams, Gregg (January 1982). "A Closer Look at the IBM Personal Computer". BYTE. p. 36. Retrieved 19 October 2013.
  2. "SOFTECH MICROSYSTEMS UCSD p-SYSTEM VERSION IV FOR THE APPLE II COMPUTER" (PDF).
  3. Edlin, Jim; Bunnell, David (February–March 1982). "IBM's New Personal Computer: Taking the Measure / Part One". PC Magazine. p. 42. Retrieved 20 October 2013.
  4. Advertisement (August 1982). "This person develops applications for the entire market, including the Z-80, 8080, 8086/8088, 6502, LSI-11/PDP-11, 9900, and the M68000 with the best there is". BYTE. pp. 191, 193–195. Retrieved 19 October 2013.
  5. Zachmann, Mark S. (June 1983). "Context MBA: Half A Step In The Right Direction". PC Magazine. p. 123. Retrieved 21 October 2013.
  6. Allman, Eric (1 July 2004). "A Conversation with James Gosling". ACM Queue . Association for Computing Machinery . Retrieved 24 December 2012.
  7. Ammann, U. (1977). "On code generation in a PASCAL compiler". Software: Practice and Experience. 7 (3): 391–423. doi:10.1002/spe.4380070311. hdl: 20.500.11850/68668 . S2CID   2143405.
  8. "Apple Fortran Language Reference Manual" (PDF).
  9. Bowles, Ken (22 October 2004). "Some Insights for UCSD Pascal Generation". Archived from the original on 4 March 2016. Retrieved 13 February 2011. UCSD Pascal Units probably influenced Ada Packages
  10. Maher, John (January 1985). "Acornsoft's UCSD Pascal System". Beebug. pp. 7–10. Retrieved 2 July 2024.

Further reading

Related Research Articles

Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named after French mathematician, philosopher and physicist Blaise Pascal.

In computer programming, a P-code machine is a virtual machine designed to execute P-code, the assembly language or machine code of a hypothetical central processing unit (CPU). The term "P-code machine" is applied generically to all such machines, as well as specific implementations using those machines. One of the most notable uses of P-Code machines is the P-Machine of the Pascal-P system. The developers of the UCSD Pascal implementation within this system construed the P in P-code to mean pseudo more often than portable; they adopted a unique label for pseudo-code meaning instructions for a pseudo-machine.

<span class="mw-page-title-main">Virtual machine</span> Software that emulates an entire computer

In computing, a virtual machine (VM) is the virtualization or emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination of the two. Virtual machines differ and are organized by their function, shown here:

Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. It was originally developed by Anders Hejlsberg at Borland, and was notable for its very fast compiling. Turbo Pascal, and the later but similar Turbo C, made Borland a leader in PC-based development tools.

<span class="mw-page-title-main">CP/M</span> Discontinued family of computer operating systems

CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/85-based microcomputers by Gary Kildall of Digital Research, Inc. CP/M is a disk operating system and its purpose is to organize files on a magnetic storage medium, and to load and run programs stored on a disk. Initially confined to single-tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations and were migrated to 16-bit processors.

BBC BASIC is an interpreted version of the BASIC programming language. It was developed by Acorn Computers Ltd when they were selected by the BBC to supply the computer for their BBC Literacy Project in 1981.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first version of BASIC published by Microsoft as well as the first high-level programming language available for the Altair 8800 microcomputer.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

Write once, run anywhere (WORA), or sometimes Write once, run everywhere (WORE), was a 1995 slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language. Ideally, this meant that a Java program could be developed on any device, compiled into standard bytecode, and be expected to run on any device equipped with a Java virtual machine (JVM). The installation of a JVM or Java interpreter on chips, devices, or software packages became an industry standard practice.

JRT Pascal is an implementation of the Pascal programming language. It was available in the early 1980s on the CP/M operating system.

<span class="mw-page-title-main">IBM Displaywriter System</span> 1980 office desktop computer

The IBM 6580 Displaywriter System is a 16-bit microcomputer that was marketed and sold by IBM's Office Products Division primarily as a word processor. Announced on June 17, 1980 and effectively withdrawn from marketing on July 2, 1986, the system was sold with a 5 MHz Intel 8086, 128 KB to 448 KB of RAM, a swivel-mounted monochrome CRT monitor, a detached keyboard, a detached 8" floppy disk drive enclosure with one or two drives, and a detached daisy wheel printer, or Selectric typewriter printer. The primary operating system for the Displaywriter is IBM's internally developed word processing software titled "Textpack", but UCSD p-System, CP/M-86, and MS-DOS were also offered by IBM, Digital Research, and CompuSystems, respectively.

Pascal MicroEngine is a series of microcomputer products manufactured by Western Digital from 1979 through the mid-1980s, designed specifically to run the UCSD p-System efficiently. Compared to other microcomputers, which use a machine language p-code interpreter, the Pascal MicroEngine has its interpreter implemented in microcode; p-code is its machine language. The most common programming language used on the p-System is Pascal.

XPL0 is a computer programming language that is essentially a cross between Pascal and C. It looks somewhat like Pascal but works more like 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.

<span class="mw-page-title-main">BBC Micro</span> Series of British microcomputers by Acorn

The BBC Microcomputer System, or BBC Micro, is a series of microcomputers designed and built by Acorn Computers Limited in the 1980s for the Computer Literacy Project of the BBC. The machine was the focus of a number of educational BBC TV programmes on computer literacy, starting with The Computer Programme in 1982, followed by Making the Most of the Micro, Computers in Control in 1983, and finally Micro Live in 1985.

Kenneth L. "Ken" Bowles was an American computer scientist best known for his work in initiating and directing the UCSD Pascal project, when he was a professor of computer science at the University of California, San Diego (UCSD).

The Byte Sieve is a computer-based implementation of the Sieve of Eratosthenes published by Byte as a programming language performance benchmark. It first appeared in the September 1981 edition of the magazine and was revisited on occasion. Although intended to compare the performance of different languages on the same computers, it quickly became a widely used machine benchmark.

<span class="mw-page-title-main">BASIC interpreter</span> Interpreter that enables users to enter and run programs in the BASIC language

A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BASIC interpreter to type in programs or to load programs from storage.