How can I configure the compiler to allow calling functions using a different register bank?
This is not possible without disregarding the advantage of register bank switching: The 8051 instruction set lacks a MOV Rdst,Rsrc instruction. In order to move data between registers, a temporay static area or a direct address replacement for either of the two operands must be used. The latter one is preferred because it doesn’t require additional MOV instructions to store/retrieve the data in the static areas. Following type of instructions are used: (1) MOV Rdst,ARsrc (2) MOV ARdst,Rsrc ARsrc and ARdst are assembler labels that refer to the corresponding register in the current registerbank. The assembler will replace those labels with the appropriate direct address based on the register bank the module was compiled for. When passing parameters from one function to another there may be circumstances when the compiler will have to use MOV instructions with this addressing mode. Therefore, these two functions must have the same using, so that the registerbank used by the caller functi
Related Questions
- If I upgrade to different ABN AMRO bank Debit/Credit card, will I need to register the replacement/ reissue card with the secure online payment services?
- My online bank forces me to change my password every month. Can PasswordMaker generate different passwords for the same site?
- What functions can be performed by people in different roles, e.g., TA, PA, Guest Instructor, etc.?