This wouldn’t be needed if shift shifts in zero values which I think it does:
Code:
SWVAR2 = SWVAR & %00001111 'Mask off bits 7:4 to 0, Only get bits 3:0