How to use the PIC16F628A's PORTA,4-7 as inputs?
From the datasheet, section 5.1:


  A ‘1’ in the TRISA register puts the corresponding output driver in a High-impedance mode. A ‘0’ in the TRISA register puts the contents of the output latch on the selected pin(s).


You'll have to set TRISA&lt;4-7&gt; to 1 (pseudocode):

TRISA |= 0xf0


This code ORs the TRISA register with 0xf0 and puts the result back in TRISA. Therefore, bits 4-7 are set after this, and your pins are configured as input, whilst the pins at 0-3 have an unchanged state.

In assembly, that would look like...

BANKSEL TRISA           ; switch to bank with TRISA
MOVLW  0xf0             ; Inclusive or 0xf0 with TRISA
IORWF  TRISA