This is a cache of https://vccplus.brianholman.com/manuals/working-with-os9/devices/. It is a snapshot of the page as it appeared on 2026-11-21T00:01:41.214+0000.
Open a device by name · Working with OS-9 — A Comprehensive Manual · VCC Plus
← Manual LibraryVCC Plus 3.7.1 · Reading on the web

Try the exercises in VCC Plus. Example links download files here; open them in the app to work beside the emulator.

The complete book · PDF editionBook 11: Working with OS-9 — A Comprehensive Manual

51 pages · VCC Plus 3.7.1 · Keep a copy to read or print.

Download PDF
Contents

Chapter 10 of 14

Open a device by name

Imagine removing the output cable from a terminal and plugging it into a disk. Programs would need radically different electrical signals for those two devices. OS-9 gives a program a simpler operation. Write bytes to an open path. The system finds the right file manager and driver for that path. See the dispatch in the live device table.

Catch the drive while it is open

Use a fresh filename on HD1. From Shell+ enter:

devs >/h1/devices
list /h1/devices
dmode /h1

There is a reason to save this particular report. While devs examines the active device table, its output file holds H1 open. If you just run devs at a prompt, an idle H1 may be absent from the display. The saved report records the conditions at the instant the utility ran.

The guest's saved device table pairs DD and H1 with EmuDsk and RBF. Term and the window devices use VTIO and SCF.

Look for H1, EmuDsk and RBF on one row. The descriptor names the device and specifies its driver, file manager and operating parameters. RBF, the random block file manager, understands directories, files and disk sectors. EmuDsk is the driver that talks to the emulated virtual disk controller. In this profile, dmode /h1 reports drive number 01, and VCC Plus assigns the second working image to HD1. A different controller can use a different driver under an RBF filesystem.

Trace three paths from the same shell

If the program sends bytes to… Follow the request
A file under /h1 IOMan dispatches through RBF. RBF resolves the file and its sectors. EmuDsk transfers blocks through the virtual hard-disk device to the image assigned to HD1.
The terminal /Term SCF handles a stream of characters and its terminal options. The VTIO driver and the CoCo keyboard and display components deliver the interaction. Read the Term row next to H1 in the figure.
A shell pipeline PipeMan manages a buffered stream with the supplied Piper driver. The writer sends bytes to one end. The reader takes them from the other. Closing the last writer lets the reader detect the end of the stream.

The program refers to an open path number during I/O. It need not resolve the pathname or understand sectors each time it writes a line. The shell can arrange path 1 before launching the child, which is how the same program can write its report to any of those three destinations. A device descriptor is a named module that tells OS-9 how to reach a device. An open path holds the state of a particular opening, such as a file’s current position and access mode.

The graphic panels in VCC Plus show which host images are attached to the emulated drives. The guest device table shows the software OS-9 is using to reach them. Compare the quick-start equipment map with the same two assignments in your current profile. For the division of responsibilities see The NitrOS-9 Project, NitrOS-9 Technical Reference, revision 0.1 (2004), chapters 4–7, pp. 33–86.

Original VCC Plus manuals © 2026 Brian K. Holman. Third-party references retain their authors’ copyrights and licenses. Artwork notices. Edition 3.7.1; source and export identity. Printable edition: PDF source and export identity.

A closer look

Open original