Converting a piece of PIC code to Arduino

//IM BLOCKED HERE

Well, this part will certainly work for both the PIC and the Arduino:

  while(1){
    //endless loop
    }

This part sets pins GP2 and GP3 as input, and sets the data bits in val_GPIO to the output pins.

    TRISIO = 0xC; //in GP2 & GP3
    GPIO = val_GPIO; //high-low