I am using the upsd3234. I have written a boot loader that sets bit 8 (swap) in the page register. When bit 8 is set my second program is loaded into boot space. I am sure that the second program resets the page register to 0 and bit 8. This causes my boot loader to start again. I did a test with a simple ASM program as the second program and this functions correct so my conclusion is that Keil C51 resets the page register. Paging is not enabled in uVison because once loaded into boot space it does not require any further paging at this stage. Any advice ?
"my conclusion is that Keil C51 resets the page register." I suspect not; However, the startup code might be doing it - have you checked?
Fixed the problem. :) C51 did not change or reset the page but a simple error in the code when swapping page caused the page register to change. (I did not expect this because the test with a small ASM program was found working correctly.)
" ... a simple error in the code ... " They're always the worst, aren't they?! :-( They're the ones you can look at for ages, and still not see. They're the ones that often suddenly become obvious as you try to explain your code to someone else...