Hello Nafetts.

Can't test this code, but it can be used as Psuedo...

TRISB="11111111"
TRISD="00000000"

main:
Portd=0
If Portb.0=1 then Portd=1
if Portb.1=1 then Portd=Portd+2
If Portb.2=1 then Portd=Portd+4
if Portb.3=1 then POrtd=Portd+8
if Portb.4=1 then Portd=Portd+16
if Portb.5=1 then POrtd=Portd+32
if Portb.6=1 then POrtd=Portd+64
if Portb.7=1 then portd=Portd+128

Pause 1000 (pause 1 second)
goto main
end

I believe there is a way to access this through a loop,
but I dont' have my PBP with me to give you proper code.

Dwayne