[fa.info-cpm] Using DC Hayes 80-103a modem with Z80

C70:info-cpm (07/03/82)

>From w8sdz@BRL Sat Jul  3 01:24:44 1982
The following is forwarded from my RCPM.  Replies to author,
not me, please.

---forwarded file 80-103A.DCH---

Sinec I've never seen it mentioned anywhere, I'd like to
share the following information with all those who don't know:

The DC Hayes 80-103A modem was designed to run in an 8080
system. For some reason, they decided to use the upper 8
address bits to decode the ports. While that is fine with
8080 processors, it makes life miserable for those who upgrade
to a Z-80 CPU. The Z-80 normally puts the contents of the
accumulator on the upper 8 and the port address on the lower 8.
So if you don't have a Z-80 board that can be switched to
"8080 mode" you're out of luck, right?
WRONG!
Conversion to use the 80-103A with a Z-80 CPU is very simple
for input. Simply add the following instruction before every
input:    MVI A,PORT
That will put the port address in ACC.
For output it's more complicated, but the fact that I'm able to
use the board without problems is proof that it can be done.
just replace the OUT instruction this way:
Either: OUT MACRO PORT
            PUSH B
            MVI B,PORT
            MOV C,B
            DB 0EDH,79H ; Z-80 OUT A,(C)
            POP B
            MACND
Or, if you don't have a macro assembler, simply replace every
OUT instruction to a modem port with the above code.

I have successfully converted BYE77 and XMODEM this way and it
works fine. The slowdown due to more code being executed is
negligible.
                                    S. Kluger
                                    11025 Vista Del Sol #250-II
                                    El Paso, TX  79935