Genady,
Have you given up on the IP and ID bits? That was what your thread started on? Are you asking a new question now, or how should I follow this, in case I am doing that incorrectly?
What have you determined by debug of this new problem. Have you run to the while loop and examined the register to see if its value is stuck or if it was ever changed?
Have you considered using our CSL to help you get past problems that were solved a long time ago in the implementation of the CSL? There are constants and pointers and data types and functions that we have written to do these things. And there are examples that go with these. Please consider using the CSL to avoid having to teach yourself all of the things that were solved previously.
Regards,
RandyP