Wassermann 1802 floating point, DDJ


Last update June 25 2021. Edited by Herb Johnson, (c) Herb Johnson, except for content written by others as listed. Contact Herb at www.retrotechnology.com, an email address is on that page.. I have a lot of COSMAC 1802 content on my Web pages: use Web search to find specific things. - Herb Johnson

introduction

In 1979, Paul Wasserman of Union, NJ wrote an article published in Dr Dobb's Journal #37, May 1979 Volume 4, titled “A Floating Point Subroutine Package for the 1802”. He produced code based on PL/M coded methods in the book "Microprocessor Programming for Computer Hobbyists" by Neil Graham, published by Tab books. Wasserman provided descriptions for calling the functions, provided a hex dump for the code, and means to relocate that code by changing high-order addresses within the code. But, no 1802 sources. Other than a subsequent letter to the editor to correct one subroutine address, that's all I could find about Wasserman's published code; or much about the person, or any subsequent works (as of Feb 2021). There was only one published use of the code, and that was recently (details follow), and again no source.

So I disassembled the source, based on the Graham book, and added appropriate commentary. On this page I detail the article, provide the source, and reference other uses of the binary.

Codes and article

Here's an OCR text of the article which I performed. Here's a text hex dump from the article and binary of the dump Thanks to Craig Ledbetter who published the text dump on Jul 25 2020 in the cosmacelf groups.io email list. At a later time, I'll provide a PDF or images of the 3-page article with its illustrations. The correction? An address change, "fp_sub equ 02E9H ;AC-OP -> AC" as corrected in a letter to DDJ in issue #44.

So in late 2020, I got interested and so I found the DDJ article and OCR'ed it. I reproduced the binary file. And I purchased the Graham book, to read about the algorithms. I'm not offering copies of the Graham book: even the correct exerpts would be over 50 pages. Those very interested, can obtain copies of the book - by borrowing from a library or buying a copy; I did both. I recommend the book "Microprocessor Programming for Computer Hobbyists" by Neil Graham.

So I began to disassemble the 1802 binaries back to 1802 assembly language. I found that Wasserman pretty much reproduced the 1802 code needed to replicate the PL/M (Pascal-like) sources provided in the Graham book. I had to make-up some variable names but they are similar to Graham's variables. Same with the subroutine names that Wasserman didn't identify. I was able to perform a simple disassembly which when assembled reproduced the original binary.

[For those concerned: DDJ articles of that period, appear to have permissions for non-commercial reproduction, "provided a credit line is included" which is "reprinted from Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box E, Menlo Park, CA 94025". Of course DDJ is out of printed publication and became part of other organizations and companies. My Web searching could not find activity on the Web or further publications by the named author, or a likely Web presence. - Herb]

While disassembly was not overly difficult, it took time to read both the Graham book and the disassembly, to determine the details and add commentary to my disassembled source. When that was completed, I then refined the source to remove absolute addresses (jumps and calls to memory) into labled addresses (subroutine names). I retained address-based branches (as in BC S0706 for a branch on carry to a location lable obviously based on the disassemble address). That work was completed in early March 2021. Again, the assembled source ORGed to the original location of the binary (0100H) reproduces the original binary.

Use of the 1802 code, requires use of "SCRT" or Standard Call and ReTurn methods established by RCA for the COSMAC 1802. Here's the SCRT routines from RCA's UT71 ROM monitor program. Web search will find plenty of SCRT information and UT71 information.

Articles and codes

Here's an OCR text of the article which I performed.
Here's a text hex dump from the article
and binary of the dump.

Here's the Wasserman disassembled source I created.
Here the floating-point 2*pi*r test program in Wasserman's article.

Here's the SCRT routines from RCA's UT71 ROM monitor program.

As of March 5 2021 I have not executed the disassembled code or the original binary.

I found in one use of the Wasserman code, additional 1802 code by Winston Lowe for ASCII / binary conversion of the floating point representation.

Uses of Wasserman's float codes

Winston Lowe: Web search in late 2020 found one use of Wassermans' 1802 FP code. In a github project "FPGACosmacELF" by Winston Lowe, begun sometime around Jan 2020, there was a copy of the DDJ hex dump and binary used to test a FPGA implementation of an 1802 processor. The test program testFPM.asm in his "verification" directory, has a syntax slightly different than my A18's assembler. In Jan 2021 I recoded Lowe's source and assembled it. I have not tested the resulting code as of this date. His 1802 code, slightly modified by me, supports ASCII / binary conversion of the floating point representation.

I was able to contact Winston Lowe in June 2021: he calls his work a re-creation in an FPGA design of an 1802 CPU which is cycle accurate. In 2021 he added an 1861 video controller to the FPGA, to make the result perform as a VIP computer including CHIP-8 software. Thanks to Winston for his permission for my use of his testing code.

Olduino: The Wasserman article appears on the Olduino Web site, as an example of 1802 floating point code. Here's the blog post about it. The 1802 Olduino is an Arduino connected to a modified 1802 Membership Card, itself a modern recreation of the Weisbecket "ELF" 1802 computer.

Conclusion

This is of course, work in progress. I welcome any reasonable comments, corrections and updates. I'll update the page and code accordingly. Thanks to those named for their interests, works, and cooperation.

- Herb Johnson


Contact information:
Herb Johnson
New Jersey, USA
To email @ me, see
see my home Web page.

This page and edited content is copyright Herb Johnson (c) 2021. Copyright of other contents beyond brief quotes, is held by the authors of that content. Contact Herb at www.retrotechnology.com, an email address is available on that page..