Problems with 8008 serial routines that posted

Just a heads up – the serial transmit routines that I have posted with the 8008 applications have serious issues. Though it was working for me, other were using serial ports that weren’t so forgiving and had problems with transmit. Finally Corey Cohen tracked down problems with start and stops bits used with the transmited data. As soon as I get a chance to check out the fixed routines, I’ll be updating all the applications on my 8008 application and BASIC pages. For those of you that can’t wait here is the code for a version that I think will probably work. This version is timed for 2400 baud.

My OS/X emulator was also broken and needs an update, as well.

OUTCHAR:

NDI 177 ; mask MSbit
CAL BITOUT ; STARTBIT
CAL BITOUT ; LSB
CAL BITOUT ; 1
CAL BITOUT ; 2
CAL BITOUT ; 3
CAL BITOUT ; 4
CAL BITOUT ; 5
CAL BITOUT ; 6
CAL BITOUT ; MSB
LDA ; timing delay
LAI 200
OUT OUTPORT ; stop bit
LDI 100 ; and extra for inter character spacing
JMP MORE2

BITOUT:
OUT OUTPORT
RRC ; shift to get next bit
LDI 3
MORE2:
LAA ; nop to delay 5 states to make timing work
DCD
JFZ MORE2
LDI 0 ; delay 8 states
RET

2 thoughts on “Problems with 8008 serial routines that posted

  1. One comment to this new output routine.

    You should also load a 200 into the accumulator and output it to initialize the state of the latch in the serial port “box” when your program starts. If you miss this, your first character might not appear correctly because the logic state of the serial port output is unknown. Once the driver outputs it’s first character, the port state is known until you shut off power to the latch in the serial port “box” attached to the Output port, in most cases when you power off the Scelbi.

    Cheers,
    Corey

  2. My bad memory fails me again – all my software has the serial transmitter connected to bit 0 of the transmit port. The original code was good, but wouldn’t work when connected to bit 7, which this driver is designed to support.

Comments are closed.