OS/8

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
OS/8
Developer Digital Equipment Corporation
OS family DEC OS family
Working state Discontinued
Source model Closed source
Platforms PDP-8
Default user interface
Concise Command Language (CCL)
(Command line interface)
License Proprietary

OS/8 was the primary operating system used on the Digital Equipment Corporation's PDP-8 minicomputer.

Pre-OS/8 there were earlier PDP-8 operating systems:

  • R-L Monitor,[1] also referred to as MS/8.
  • P?S/8,[2] requiring only 4K of memory.
  • PDP-8 4K Disk Monitor System
  • PS/8 ("Programming System/8"), requiring 8K. This is what became OS/8 in 1971.

Other/related DEC operating systems were: OS/78, OS/278,[3] OS/12. The latter is a virtually identical version of OS/8, and was used with Digital's PDP-12 computer.

Digital released OS/8 images for non-commercial purposes[4] which can be emulated through SIMH.

Overview[edit]

OS/8 provided a simple operating environment[5] that was commensurate in complexity and scale with the PDP-8 computers on which it ran. I/O was supported via a series of supplied drivers which used polled (not interrupt-driven) techniques. The device drivers had to be cleverly written[6] as they could occupy only one or two memory pages of 128 12-bit words, and had to be able to run in any page in field 0. This often required considerable cleverness, such as the use of the OPR instruction (7XXX) for small negative constants.

The memory-resident "footprint" of OS/8 was only 256 words; 128 words at the top of Field 0 and 128 words at the top of Field 1. The rest of the operating system (the USR, "User Service Routines") was swapped in and out of memory transparently (with regard to the user's program) as needed.

The Concise Command Language[edit]

Early versions of OS/8 had a very rudimentary command line interpreter with very few basic commands: GET, SAVE, RUN, ASSIGN, DEASSIGN, and ODT. With version 3 they added a more sophisticated overlay called CCL (Concise Command Language) that implemented many more commands. OS/8's CCL was directly patterned after the CCL found on Digital's PDP-10 systems running TOPS-10. In fact, much of the OS/8 software system was deliberately designed to mimic, as closely as possible, the TOPS-10 operating environment. (The CCL command language was later used on PDP-11 computers running RT-11, RSX-11, and RSTS/E, providing a similar user operating environment across all three architectures: PDP-8s, PDP-10s, and PDP-11s.)

The basic OS and CCL implemented many rather sophisticated commands, many of which still do not exist in modern command languages, not even in MS-DOS, Windows, or Unix-like operating systems.

For example, the COMPILE command would automatically find the right compiler for a given source file and start the compile/assemble/link cycle.

The ASSIGN and DEASSIGN commands allowed one to use logical device names in a program instead of physical names (as required in MS-DOS). For example, your program could write to device FLOP:AAA.TXT, and if you first did a "ASSIGN FLOP: RXA2:" then the file would be created on physical device RXA2 (the second floppy disk drive). VAX/VMS and the Commodore Amiga's operating system AmigaOS (and other OSes built around Tripos) made considerable use of this very flexible feature.

The SET command was capable of setting many system options, albeit by the crude method of patching locations in the system binary code. One of them, a command under OS-78,[7] was SET SYS OS8, and it re-enabled the MONITOR commands that were not part of OS-78.

The BUILD command could reconfigure the OS on the fly, even adding device drivers, often without having to reboot the OS.

The OS can boot from a hard disk and present the command prompt in under half a second.

The OS/8 Filesystem[edit]

OS/8 supported a simple, flat file system on a variety of mass storage devices including:

Filenames on the PDP-8 took the form of FFFFFF.XX where "F" represents an uppercase, alphanumeric character of the filename and "X" represents an upper-case, alphanumeric character of the extension (filetype).

  • .PA : Assembly language
  • .SV : saved core-images (executable programs)
  • .FT : Fortran source files
  • .DA : Data files[10]

The contents of any given file was stored contiguously in a single "extent". PIP included an option to compress ("squeeze") the filesystem, so that all unallocated space was moved to a single extent at the end of the disk. This could be invoked by the SQuish CCL command,[11] much as MUNG could be used to run a TECO macro.

OS/8 volumes had a very limited maximum storage size (4096 blocks of 256 12-bit words) and the RK05 (2.4MB) moving-head disk exceeded this size: "1.6 million words of storage."[12] Because of this, RK05 cartridges were divided into two partitions. For example, the first RK05 on a system would be known as both RKA0: (SY:) and RKB0:. This division was commonly thought to mean "the upper surface" and "the lower surface" but this was incorrect; it in fact was "the outer cylinders" and "the inner cylinders".

ASCII files[edit]

ASCII files were stored as 3 8-bit characters per pair of 12-bit words: Characters 1 & 2 on the right of words 1 & 2, with bits 0-3 & 4-7 of the 3rd character stored in the leftmost bits of the pair of words.[7]

  • WORD 1: c0 c1 c2 c3 | a0 a1 a2 a3 a4 a5 a6 a7
  • WORD 2: c5 c6 c7 c8 | b0 b1 b2 b3 b4 b5 b6 b7
    ASCII files end with a CTRL/Z (ASCII 232).

OS/8 date format[edit]

OS/8 allocated the PDP-8's 12 bit words for storing dates per:

  • 4 bits for the month
  • 5 bits for the date therein
  • 3 bits for the year.[13][14]

Y3B! This was recognized when COS-310 was developed.[15][16]

OS/8 CUSPs (Utility Programs)[edit]

The CUSPs (Commonly-Used System Programs, that is utilities) supplied with OS/8 included:

  • BUILD (the program to install a configured OS/8 system onto mass storage)
  • DIR (the directory-listing program)
  • EDIT (A line-oriented editor)[17]
  • MACREL (A relocating assembler that, unlike PAL, implemented macros. Written by Stanley Rabinowitz of DEC's Small Systems Group. Stan had an ASCII-artwork picture of a fish in his office that said "MACREL IS A FISH")
  • FLAP (An absolute assembler derived from RALF)
  • FORTRAN-II. 4K Fortran
  • FOTP (File-Oriented Transfer Program, an alternative to PIP)
  • PAL (The assembler)
  • PIP (the Peripheral Interchange Program, used to copy files)
  • PIP10 (a version of PIP used to copy files to from PDP-10 DECtapes)
  • RALF (Another relocating assembler for the FPP)
  • TECO (Text Editor and COrrector, a much-more-sophisticated editor). The MUNG command ran TECO macros.
  • CCL, the command line interpreter, was supplied in source form and could be extended by the user.

Programming languages[edit]

A single-user BASIC and two multi-user versions of BASIC were available as options.

The single-user BASIC used several overlays to provide the full functionality of the language; when OS/8 was booted from a DECtape, a very noticeable delay occurred each time BASIC was required to switch overlays as they needed to be read from tape.

The multi-user versions of BASIC (EDU20 and EDU25) differed only in whether or not they supported block-replaceable devices (DECtape or disk). Due to cost constraints, many PDP-8s had punched paper tape readers as their only mass-storage I/O device. EDU20 loaded from paper tape and could do output to a paper tape writer if the machine had one, whereas EDU25 understood the structure of a filesystem, could load from DECtape or disk, and could create files on DECtape or disk. Both could run multiple BASIC programs simultaneously using a primitive task-scheduler that round-robined among the attached terminals. Memory was always very tight because the PDP-8 used core memory, which was extremely expensive compared to RAM technology which came along a few years later. In a mere 8K of 12-bit words EDU20 could support up to 4 terminals at once, although more memory was recommended. EDU25 required an additional 4K memory bank (for a minimum of 12K) because the code contained a disk device driver and a filesystem handler. While running, EDU20 and EDU25 were self-contained programs that didn't use any OS/8 system calls. Immediately upon being invoked from the OS/8 command interpreter they would overwrite OS/8's entire resident portion - all 256 words of it. Upon startup, EDU25 would save the contents of memory to DECtape or disk and restore it when it exited. But EDU20 could not do this as it was targeted at hardware configurations without any block-replaceable device.

There was also a rather complete FORTRAN IV compiler available at extra cost. This compiler generated code for the optional FPP-8 floating-point processor, which was essentially a separate CPU, only sharing memory with the PDP-8 CPU. If you had the FPP-8 option installed, the FORTRAN runtime code would detect it and use the FPP-8 to run the main program code, and the PDP-8 CPU would run as an I/O processor. If you did not have the FPP-8, the runtime code would instead call an FPP-8 interpreter running on the PDP-8 CPU, so the program would still run, but at considerably reduced speed.

This FORTRAN IV compiler in version 1 had the interesting bug that DO loops counted incorrectly: DO loops would count 1,2,3,5,6,7,… (skipping 4). A quick patch was released to fix this.

See also[edit]

References[edit]

  1. ^ for Richard Lary, who also was involved with OS/8 and RTS8. "What is a PDP 8?". Archived from the original on 2004-08-25. 
  2. ^ yes, with a question-mark!
  3. ^ COMPUTERWORLD, June 1984: "OS/278 is available for $74." "Decmate II 08/278 Digital Equipment Corp. has introduced a new version of its OS/8 ..." Computerworld. June 11, 1984. p. 130. 
  4. ^ File: /Licenses/os8_license.txt in os8swre.tar.Z
  5. ^ An annotated list of commands is available at "OS/8 MONITOR COMMANDS". 
  6. ^ "My PDP8/E". 
  7. ^ a b Rick Moore. "OS-8 Field Service Assistance Brochure". 
  8. ^ measured in 12 bit words "DF32/DS32 hard disk drive". The DF32 Disk File and Control is a fixed head hard drive with a total capacity of 32K 12 bit words. 
  9. ^ 256K x 12-bit words
  10. ^ although other filetypes can also be used for storing data.
  11. ^ "OS/8". Computer History Wiki. Squish is like defrag, in that it'll actually delete files, and move stuff around so you can get the maximum free space. 
  12. ^ p.6-67 in PDP 8/e Small Computer Handbook. Digital Equipment Corporation. 1973. 
  13. ^ 1970 - 1977
  14. ^ "OS/8 can only store dates for an 8 year period..." "Directory of linctape-images/os8l/ps-8-system-25.linc". 
  15. ^ "COS-310, DEC's commercial operating system for the PDP-8, supported ... but with a new text file format. The file system is almost the same as OS/8, but dates are recorded differently..."
  16. ^ "The Digital Equipment Corporation PDP-8 : Frequently Asked Questions". 
  17. ^ For a programmer's overview of OS/8 EDIT, see "Editing Files on a PDP-8 using OS/8 EDIT". 

External links[edit]