I've been working on a program and all of a sudden when I try to simulate it the execution line jumps to weird places. It jumps from line 62 back to the beggining and I don't see any reason for it. It did this earlier and I deleated all the MPLAB files for that project and opened a new project. It was ok for quite a while but now does the same thing. I've attached the code. Any ideas?
OK. I don't know where my brain picked up that 'movfw' instruction, but it thought it was a legal instrution.
But I don't understand what you mean by "The instruction movwf instr is writing to location 2 which is the program counter". How or why does that work?
So I think you're saying that my code should have worked with the 'MOVFW'. That's how I understand that link you gave.
This then gets back to the question to POMMIE's statement "movwf instr is writing to location 2 which is the program counter". Is this so? And if so, what am I not getting?
These Fs and Ws are posibly getting mixed up in the discusion!
I,m posting a up to date code here. The program works up to the point where I have put the double row of x's. So far it has not displayed the file 'result' as a decimal number. I'm still working. I have made all the corrections suggested plus many more. Thanks