Hello. I have giant 7 segment 4 digit display, which is driven by 4 CD4543BE (Inputs tied together, latches driven separately).

Say I connected it to MCU, with 1 digit display I can do something like this

Code:
IF A=1 THEN HIGH PINA: LOW PINB: LOW PINC: LOW PIND
IF A=2 THEN HIGH PINB: LOW PINA: LOW PINC: LOW PIND
And so on. There will be 10 lines of code in case of 1 digit display. But with 2-3-4 digits same approach will generate a huge code. One way I see is to use DIG statement and loop it 4 times to get all digits decoded. Maybe there are other, more elegant ways to do this?