??? 08/22/08 10:40 Read: times |
#157658 - Revision... Responding to: ???'s previous message |
Sorry, just a clarification...
If you have "func() using 1" then you can indeed call it from another register bank. However, this is not useful because: (a) The function can't return a value in a register - "unsigned char func() using 1" is illegal, so this is not a general technique. (b) The overhead of "PUSH PSW, MOV PSW, #XX" at function entry and "POP PSW" at function exit generated due to "using 1" are likely to outweigh any savings of absolute register addressing anyway. It's when you try to use "#pragma registerbank(X)" to mark a function as using a register bank without generating entry/exit code to explicitly set the register bank, that you start to hit problems with calling function from ISR and also from main. |
Topic | Author | Date |
Keil C51 Compiler Bug | 01/01/70 00:00 | |
version? | 01/01/70 00:00 | |
Version | 01/01/70 00:00 | |
This is what Keil does | 01/01/70 00:00 | |
not if you follow thw rules | 01/01/70 00:00 | |
And also call from elsewhere? | 01/01/70 00:00 | |
Revision... | 01/01/70 00:00 | |
Using 2 | 01/01/70 00:00 | |
did you have using 2 in the function header ? | 01/01/70 00:00 | |
Using 2 | 01/01/70 00:00 | |
correct cde ---- | 01/01/70 00:00 | |
Using 2 | 01/01/70 00:00 | |
people like it working | 01/01/70 00:00 | |
Eee PC? | 01/01/70 00:00 | |
HiTech vs Keil | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
OCG C compiler for 8051![]() | 01/01/70 00:00 | |
incorrect code in a different place? | 01/01/70 00:00 |