We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have two different code programs: Program "B" which is located at 1000h and Program "A" located at 0h (it ends before 1000h) and it's working properly. How can I start executing program "B" from Program "A". I have tried this software reset but it doesn't work:
((void (code *) (void)) 0x01000) ();
Thank for your reply Drew Davis, Actually what I want to do is to execute a separate code (a complete system) from my application. The problem is that I don't have the source code for that "separate code". So my idea is in somehow to place the code (the one I don't have the source code) in a empty space of the memory and then try to invoke it from my application. Do you think there is a way to do this? Than you very much.
Do you think there is a way to do this? No. Not if you're moving the code from its real address to some other position in memory. That cannot possibly work, because 8051 isn't position-independent. And that's before we even begin to look at what usage of data memory that code may have, which the .hex file you have will tell you nothing about.