US ribbon cable source - dipmicro electronics
Selecting which shift register to control - there are too many ways to get there.
You have to find one that you can reliably control.
For example, you might have 3 bytes of data that represent the 24 outputs you control.
Part of your code might set/clear a particular bit.
A later part of your code might compare all three to a previous value, and when one is determined to have changed, it would update the previous value to match, and send it out to the appropriate shift register.
I tend to write code that reflects my hardware design background. Others with software backgrounds might do it differently with functions and what not.