| ??? 03/13/09 14:13 Read: times |
#163425 - register bank, ar4? Responding to: ???'s previous message |
The "orl ar4,#0x08" in the SDCC is confusing. If ar4 is the absolute address of register r4, then the code will work only in one out of four register banks. It works in Bank 0 only, can be seen by the opcode created.
The first line "bMODECNFG |= MODECNFG_CLKOUTEN;" creates code using R4. The second line "bMODECNFG |= MODECNFG_CLKSLCT;" creates code using AR4. Either there is insufficent knowledge how to use SDCC or it's a bug, I do not know. Or, if the compiler is so smart, that it knows that the function is used in bank 0 only? |



