Lee Hart's 1802 8th


Lee Hart's 1802 "8th"

Last updated May 11 2010, fixes to May 9 2016. Edited by Herb Johnson, (c) Herb Johnson, except for content written by Lee Hart and others. Contact Herb at www.retrotechnology.com, an email address is on that page..

Introduction:

[1802 prototype] Ode to Eight Bits, by Lee Hart

Lee Hart and I have been friends and colleagues since the 1980's. Since the 21st century, he's become known for at least two things: electric cars, and the low-low-power COSMAC CMOS microprocessor from RCA, the 1802. Go to my Lee Hart Web page to look at some of those activities. This page is about Lee Hart's "8th" FORTH-like language. Another Web page is about Lee Hart's 1802-based "membership" card and other 1802 activities and history. Other 1802 software is available from this linked Web page.

The ressurection of 8th was discussed and coordinated through the Yahoo! cosmacelf discussion group.. I've exerpted Lee Hart's posts and emails to me (with his permission) and edited them into what amounts to his design documents and discussions. This page indexes into that edited material in the links in the sections below.

  • the 8th forth-like language
  • re-sourcing 8th
  • latest 8th news and progress
  • an 1802 cross-assembler

    - Herb Johnson


    8th

    In May 2008, Lee Hart wanted to resurrect his old reduced FORTH for the 1802, which he called "8th". His version is trapped on some VERY incompatible 8-inch diskettes. I had the ROM (on my BASYS board) for 8th version 1.2, and a copy of his two-page 8th vocabulary sheet. Then Lee sent me the printed 8th V1.0 source, which I scanned into a ZIPped PDF file. It's not really OCR-readable, so Lee started to hand-enter it. I encouraged Lee to ask others to help him, and he did and they did, as described below.

    8th V1.0 source and V1.2 ROM binary, and vocabulary docs, are in a ZIP file right here. Lee said after the source was re-established: "As I read the 8TH source, I find myself thinking about how I could change or improve it, based on what I've learned in the past 28 years. :-)" See this link for the latest news and progress on 8th. Also see this Web linked Web page, on an 1802 cross-assembler under MS-DOS. - Herb

    Latest on 8th

    May 2016: I have a crude disassembly of the 8th V1.2 hex dump from my BASYS board. It's contained in the 8th ZIP file. Compare it to the V1.0 source to make sense of it. It's very crude, prove it's useful or provide a refinement, before I improve on it. Here's where I got the disassembler.- Herb

    Jan 2014: A18 can't quite assemble the Avocet compatible code. As of Jan 2014, the ZIP file includes a version of 8th that has been fixed to do so. The code produced should match, byte for byte, the Avocet version - check the assembled listings. Herb asks, "why didn't someone notice?".

    The goal is to have a public domain assembler that anyone can use. - Lee Hart. See this Web page about the freely available A18 cross assembler written in C. - Herb Johnson

    Errors and corrections

    Dec 15 2014: It was pointed out that moving 8th above 0000H was a problem:

    
       0000                 	org 0		; origin of 8TH:
       0000   71            clr:	dis		;>disable interrupts
       0001   00            	db 0
       0002   90            	ghi r0		; initialize R3,
       0003   b3            	phi r3		;   make it the
       0004   f8 08         	ldi clear1	;   program counter,
       0006   a3            	plo r3		;   and continue
       0007   d3            	sep r3		;   at clear1:
       0008   e3            clear1: sex r3		;>disable interrupts
       0009   71            	dis
                                  ...

    If ORGged to 8000H, the code "LDI clear1" was flagged as an error. Why? because "clear1" became a value larger than 255 decimal, larger that 0FFH - it wasn't a "byte" value for the LDI instruction. This is an abiguity that Lee Hart wasn't explicit about. More clear code might have been:

                                 ldi LOW clear1

    ...to explicitly extract the low-order address value is to be loaded into R3, after the high-order address value was copied from program counter R0. The LOW operation tells the assembler which address byte is intended for use. Thanks to Abraham Moller for finding this issue; look for other such issues when relocating this code. - Herb

    Nov 13 2009 -Jan 5 2010: re-sourcing 8th

    Nov 17 - entry of 8th 1802 source code

    Lee Hart asked his colleagues on cosmacelf, to enter in parts of the 8th 1802 programming language he developed, from a PDF copy of a paper source listing. Here's what he's posted in cosmacelf, about that effort. He's using an Avocet 1802 cross assembler: I suggested he look at other assemblers as discussed in cosmacelf. - Herb Johnson

    Nov 17th 2009: Lee posts in cosmacelf a request for assistance.

    Dec 1: pages 1-10 Lee Hart; pages 11-20 Richard; pages 21-30 Ray Sills; pages 31-40 William McKee; pages 41-50 Chris Elmquist; pages 51-60 Steven Valin; pages 71-80 c t wardell; page 81 Doug Jackson

    I copied the files onto a floppy, and assembled them on my old Zenith XT clone with DOS 6.20. Worked just fine. I may also try assembling it on a Win98se computer just for fun. I also found that Microsoft's WordPad and Notepad editors bugger up the tabs. I went back to Vedit, which lets me use the "good old fashioned" tab every 8 columns.

    The source 8TH.ASM and assembled 8TH.PRN files are attached [to this email]. - Lee Hart

    As of Dec 2009, Lee is editing the sources as typed, so there's a mix of edited and "raw" sources until he's done.

    Dec 9th: Lee is also looking at the 8th dictionary document, a list of 8th words and their definitions, again from my 8th V.12 setup. "It's pretty hard to understand. Have to think about improving it. Maybe teach by example?".

    On what to do with 8th without hardware: "I'm sure 8th could be run *now* on one of the 1802 emulators. But that's not particularly interesting to me, I couldn't do much of anything useful with it. For example, it would have no real I/O. Hmmm... maybe if it were modified to do its I/O to one of the PC's actual serial or parallel port? The beauty of 8TH was to type something like

    REPEAT 0 Q! 1 Q! KEYS UNTIL

    and the 1802's Q output starts toggling high/low until you press a key. Within seconds you can be reading and writing data to I/O. " I said "This sounds like a Tech Note to me." But it's also a matter of manipulating some emulator's PC based code to support real or fake I/O in some fashion.

    Jan 5 2010: Entry of revision 1.0 source completed and assembles without errors. This ZIP file contains 8th V1.0 source, V1.2 ROM binary, and vocabulary docs. The Zip file includes a binary/hex version 1.2 from a ROM and BASYS board I [Herb] have from Lee, decades ago. I asked Lee about the version differences. Lee said "I haven't had time to look for differences. When we had the Hughes development system working, it had a bigger version of 8TH that could compile itself (what FORTH calls target compiling). So, we made a number of versions that had various words added or removed for various applications." - Lee Hart

    Jan 22 2010: someone wrote:
    > What is the 8Th interpreter status? Are you still cleaning it up for
    > your current assembler environment? Is there a newer version up on
    > Herb's page now?

    Lee responded: I finished collating and editing the individual contributions from almost a dozen contributors. The source assembles with no errors, and produces the same hex file as the original listing with my Avocet assembler.

    But since this assembler is a commercial product, Herb found a cross assembler written in C, and modified it to work for the 1802. Now it too can produce a correctly assembled file. Almost... there are a couple gotchas he's working on. For example, it is case-sensitive; it thinks GLO and glo are two different opcodes. And, it doesn't recognize the 1802 register names without you manually equating them (R3 equ 3).


    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) 2016. Contents written by Lee Hart, are copyright Lee Hart (c) 2014. Copyright of other contents beyond brief quotes, is held by those authors. Contact Herb at www.retrotechnology.com, an email address is available on that page..