Maybe because you are altering places in memory of the PIC that you are not aware of?

In the above example, if x=0, the

Code:
botline[x-16]=32 then a=0
how does evaluate?

Do you see the consequences of?

Ioannis