The 573 has tri-state outputs so why would you need an extra 541?
Because I never thought about that. Never too old to learn something new. The 646 idea could work as well but the needed decoding/glue logic put me off.
I am on a business trip at the moment, but I have sketched some code out for you and will post it when I get some time.
The two low-level subroutines are PUTBYTE and GETBYTE that send (and receive) a byte respectively between the Z80 and the PC using your back-to-back 8255 arrangement in 'poll' mode (no interrupts).
......
Thank you very much but I have various working projects I can use as base for my own routines.
The Z80 has 256 I/O ports (ignoring the 16-bit I/O), which gets you 8 address lines you can use directly as chip selects.
I know what you mean: use A4 for IC1, A5 for IC2, etc. This idea has been used by Commodore for the CBM 30xx and 80xx series to decode the various I/O ICs. And I hated it because the available I/O area is completely used up now, no room left for new I/O.
I mentioned creating a Z80 card for the CBM 8032 and ran again into this problem. I solved it by using one of the two free 4 KB memory ranges meant for EPROMs. This leaves me the second 4 KB range for the terminal program (by lack of another name). Certainly not ideal but I'm only in the design phase so things can be changed yet.
The only other solution IMHO is changing the hardware of the board. But that conflicts with the idea that the Z80 board should be add-on only. I found two other challenges: 1) the 8032 has two rows of power pins. But only yesterday evening I found out there is no +5V present and 2) the expansion bus has no +5V pins either

This means I have to provide power in another way. Three solutions:
- Add +5V to three unused pins of the expansion bus.
- Tap +5V from an accessible point of the board and feed it with a line to the board.
- Add a 7805 to the design and use one of those rows with power pins.
FYI: there exists
a CP/M card for the CBM 8032, I had one but gave it away to Mike Naberezny two years before he found out what is was: the Z-RAM card. The main reason I gave it away was the missing chip. He found out by running into the original manual, software and missing IC.
This board was attached to the 8032 board by replacing the 6502. Here was a PIO and this unknown IC used for exchanging data. Power was acquired by connecting the original power connector to this board and using an extension to feed the 8032 board.
Here is the link to Mike's page but (at this moment) it seems it is not accessible for what ever reason.