Thanks Paul and Steve.

The solution I was expressing at #6 was the one Paul was describing. That is the solution. Steve clever but you do not keep the upper bits.

I have not checked if the interrupt flag for the 4:7 of port b is affected if one is trying to write on input bits of the port. That renains to be checked.

Thanks again,
Ioannis