or this

temp var byte
C1 var byte

C1=0 ; set C1 to 0
temp=PORTA ; in case PORTA changes while “processing”
if temp.5=1 then C1.0=1
if temp.2=1 then C1.1=1
if temp.1=1 then C1.2=1
if temp.0=1 then C1.3=1

Paul