1802 RCA COSMAC ELF CDP1802

2019-02-19 I finally received the board and I am very happy! It is so much easier to work with than the Membership Card. You can learn a lot more about the CDP1802 Microprocessor Kit from Wichit Sirichote.

2019-02-19-CDP1802-01-low.jpg

blinkQ.asm

R1      EQU     1
start   ORG     8000H
        REQ
L0:     LDI     10H
        PHI     R1
L1:     DEC     R1
        GHI     R1
        BNZ     L1
        BQ      start
        SEQ
        BR      L0
        END

blinkQ.list
   0001                 R1      EQU     1
   8000                 start   ORG     8000H
   8000   7a                    REQ
   8001   f8 10         L0:     LDI     10H
   8003   b1                    PHI     R1
   8004   21            L1:     DEC     R1
   8005   91                    GHI     R1
   8006   3a 04                 BNZ     L1
   8008   31 00                 BQ      start
   800a   7b                    SEQ
   800b   30 01                 BR      L0
   800d                         END

8001  L0            8004  L1            0001  R1            8000  start

blinkQ.hex
:0D8000007AF810B121913A0431007B300173
:00800D0172

You can get a18 from Herb Johnson version of a18 It compiles fine on Ubuntu 18.02.

gcc -I. -o a18 a18.c a18util.c a18eval.c
len@spectral:~/Cosmac_Elf/a18$ ./a18 blinkQ.asm -l blinkQ.list -o blinkQ.hex
1802/1805A Cross-Assembler (Portable) Ver 2.5+
Copyright (c) 1985 William C. Colley, III
fixes for LCC/Windows by HRJ Aug 2010

No Errors
len@spectral:~/Cosmac_Elf/a18$

The best way to load programs is to use the LOAD key, which accepts input from the serial terminal.
You will need to set a character delay. I normally use Linux, so it's minicom, which is easy you enter the terminal settings menu and add (example) 4ms delay.
That was enough to solve my problems, your situation may be different depending on uart, cables, etc.

minicom-terminal-settings.jpg

Once you've set the right character delay within your terminal program paste the hex code into the terminal.

1802-load.jpg

If the paste worked you will see "0 error…" but this is a misnomer as well because I've had it drop hex characters with "0 errors" but loaded garbled code. If you use a character delay you will be fine, however.