Dear everyone,

I have a quick question regarding what could be a trivial problem, I am driving a complex LED matrix which is fed through a series of shift registers. The output are out of order, so I have to reconstruct the correct sequence using a brightness array. I then used some modifiers to get the right order:

Code:
LEDPattern VAR BYTE[80]

RedSegment1 VAR LEDPattern[23]
RedSegment2 VAR LEDPattern[21]
RedSegment3 VAR LEDPattern[15]
RedSegment4 VAR LEDPattern[12]
RedSegment5 VAR LEDPattern[6]
RedSegment6 VAR LEDPattern[4]
RedSegment7 VAR LEDPattern[26]
....
Now I have a series of subroutines designed to display a series of patterns. Some are quite complex, but some are simple like this one to turn all the red segments on:

Code:
RedSegment1 = 8
RedSegment2 = 8
RedSegment3 = 8
RedSegment4 = 8
RedSegment5 = 8
RedSegment6 = 8
....
Is there a better solution for doing this to save some code space? I could use a FOR loop but I cannot refer to the variable change as with an array...

Thanks for the help!