whatever is inside the () of while must evaluate to zero or 1
if one the while does the code following it
The major problem here is that you are using an = which assigns the value on the right to the variable on the left.
An example of this is
p-123;
Here p is assigned the value 123
when we want to check for equality we use ==
so we could say
while(p==1)
if you are using a bit variable like RA0 you would do
while(RA0==1)
but because RA0 can only be 1 or 0 we can write
while(RA0)
You also need to look at logical vrs bitwise operators
There is a diff between & and &&
Lets go back to you code
while(RD7&&RA4=1)
it is clear you do not want to assign a value so th = should be a ==
and because these are both 1 bit variables they will be 0 or 1
so we can just say
while(RD7 && RD4)
this will only be true when both are 1 which is what you want
I know you are in a hurry but you have to start reading about C
if you want to use it.