It looks like your coding a shift register D0 D1 D3 D4 you set all that for input or output don't want none of that LOL
**broken link removed**
hi Burt,
The 8255A was commonly used as a port expander, PortA and PortB could be set as bi directional and PortC could be Bit selected.
The IC performed well for the era and the applications it was designed for..