??? 05/18/04 00:44 Read: times |
#70575 - RE: using all banks at the same time Responding to: ???'s previous message |
The effects on the program are:
1) You need to manage the setting and saving the register set selection bits in the PSW. 2) You need to take care that you properly design your allocation system so that banks are used properly between different tasks. See if MAIN uses bank 0 and some ISR uses bank 1 you need to make sure that the ISR does not try to ever use bank 0. 3) Remember that PUSH and POP instructions in the crazy 8051 instruction set cannot push and pop the logical registers directly. These instructions only push and pop internal RAM locations (argh). So IF you decide to make code that is modular to be used from several contexts, i.e. subroutines that are called from places where different register banks are in use by the caller....then you need to write register save/restore sequences like.... SUB: PUSH ACC MOV A, R0 PUSH ACC MOV A, R1 PUSH ACC ... body of subroutine POP ACC MOV R1, A POP ACC MOV R0, A POP ACC RET Michael Karas |
Topic | Author | Date |
using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
RE: using all banks at the same time | 01/01/70 00:00 | |
thankyou all![]() | 01/01/70 00:00 |