Connect the dip switches to GND not Vcc
Enable portb pullups

yourvar var byte

yourvar = portb

yourvar ^ %11111111 'invert all 8 bits of the variable

'send the decimal value of yourvar to LCD screen