If that is case, then try this
Create subroutine to set 2 ports like this:
UpdateLed:
PORTB= ((HI_nibbleB<<4) & %11110000) | (LO_nibbleB & %00001111)
PORTC= ((HI_nibbleC<<4) & %11110000) | (LO_nibbleC & %00001111)
RETURN

Do what ever in main loop update variables and then CALL UpdateLed, and that is all.