Hello,
I wrote a program for a 89C51ED2 (using C instructions, not assembler, it's easier for me...); the compilator is OK, but when I use the simulator, I get the error 65 with the return of a sub program to the main one; in the disassembly window, I can see that there is no instruction (just "NOP") at the adress after the RET instruction. I tried to modify some instructions, I get some results, but still the error 65 appears, at different locations of the program.
Some other times, the simulator goes to some used part of the program, but jumping instructions that should precede.
As I do not control the compliling process, I just don't know what to do, and what is hapening.
Does someone understand what is happening, and where I am wrong??
Thanks.
Get a C programming book!
In C, an array always starts with index 0, i.e. a 4x4 array as index 0,0 .. 3,3.
Your loop uses j = 1 .. 4. That is a big no-no!
By the way: since I did warn you about possible overwrites of the array, you really, really should have posted the declaration of the array - right now, I can only assume that your array is declared as name[4][4] or something like that.
Yes, it works with the correct indexes.
I'll get a C book...
I should have ask earlier, I would not be that tired now...Anyway, thank you very much to both of you.