??? 06/10/08 14:19 Read: times |
#155683 - Blinded Responding to: ???'s previous message |
This is quite dangerous if you are banked out on another code page:
((void (code *)(void)) 0x0000) (); This code gives the compiler/linker no opportunity to set the code bank registers back to the proper state to transfer back to the proper target address. Of course I do not fully comprehend your >64K code environment and some forced function pointers to some locations may work fine in your environment. But in general when you make calls across code bank pages there is a need to call through a "bank page" switcher routine that is located in a common bank. There are more complex schemes as well that support things like specific page swapping like Page3 to Page2 and so forth. In any case when you hard code the function pointer like shown above you have blindsided the compiler/linker and it cannot possibly hand the call correctly is there is a bank switch necessary to facilitate the actual transfer. Michael Karas |
Topic | Author | Date |
Soft-Reset and Watchdog DS80C390 problem | 01/01/70 00:00 | |
I'll bet you dollars to doughnuts | 01/01/70 00:00 | |
I bet too.. | 01/01/70 00:00 | |
who set the SFRs to the default state? | 01/01/70 00:00 | |
SFR to default state | 01/01/70 00:00 | |
it does | 01/01/70 00:00 | |
the reason I am puzzled | 01/01/70 00:00 | |
if 'then' means .... | 01/01/70 00:00 | |
Blinded | 01/01/70 00:00 | |
Watchdog issue solved | 01/01/70 00:00 | |
Soft-Reset solved as well![]() | 01/01/70 00:00 |