The meat of this book is a number of source files in CP/M assembly language (MAC assembler). They are linked from the chapters where they are discussed; when you click a link, the source opens in a new window, for example: Listing 5-3.
Why put online an old book about programming for an obsolete operating system—a book in which all the programs are in machine language for an obsolete CPU architecture? Certainly the audience for such a book is very limited! But, given the global scope of the internet, it isn't quite non-existent. A few people still like to putter around with the old machines and software. For their sake, I'm putting this book online where someone looking for insight into CP/M programming might find it.
This book was written in 1981 using, of course, a CP/M system. The files of chapter text, and the files with the small pseudo-code Figures, survived through moves from that system to an early IBM PC and then through several generations of Macintosh, to the present, but the Listings, the program source files, were lost along the way. However, I had a copy of the book still in the publisher's shrink-wrap with 8-inch diskette included. Jack Rubin, a fan of classic computers, had the equipment to read the disk, and he resurrected the source and library files so this complete online edition could be created.
The text here is almost identical to the original book. I had coded the text and the pseudo-code figures in a very regular way using a simple markup scheme, so it was quite easy to convert the files to HTML. I have fixed a couple of typos, and dropped an irrelevant footnote and two unimportant drawings. The line-drawings that remain had been done by the publisher following my pencil sketches; these I recreated using OpenOffice Draw. They are not quite identical to the originals.
You can run CP/M using a software emulator, and use it to assemble and run the programs in this book. Several emulators can be found online. The one I used was SIMH. SIMH can be customized to emulate various types of hardware. I tested the programs on a version of SIMH customized to boot a CP/M system on a Z80 CPU; you can find it here.
Once you have SIMH, you can download the source and executable files from this book. They are in the form of an emulated CP/M diskette, compressed to a .zip file. Download the file linked: here. Unpack the zip file to get pnb.dsk; attach that as the second or third disk of the emulated CP/M machine.
At several points in the book I express concern about the speed at which these programs run. This concern is amusing to me now, because when I run them under SIMH, they load, run and finish almost before I have finished pressing the Return key on the command. SIMH is a software emulator but it is running on a CPU that has a clock rate about 5,000 times faster than the Z80 I used for development. The difference in disk access time is almost as great. So a program that needed 10 seconds to load and execute then finishes in 2 milliseconds now. Well, make it 20 milliseconds, to allow for the extra overhead of software emulation. Just the same there are times when a programmer needs to think about efficiency, and the examples of doing that in this book are not wrong.