| поискавой системы для электроныых деталей |
|
TMP88CS38 датащи(PDF) 28 Page - Toshiba Semiconductor |
|
|
|||||||||||||||||||||||||||||
TMP88CS38 датащи(HTML) 28 Page - Toshiba Semiconductor |
|
28 / 226 page ![]() TMP88CS38/CM38A/CP38A 2007-09-12 88CS38-28 (2) Saving/restoring general-purpose registers During interrupt acceptance processing, the program counter (PC) and the program status word (PSW) are automatically saved on the stack, but not the accumulator and other registers. These registers are saved by the program if necessary. Also, when nesting multiple interrupt services, it is necessary to avoid using the same data memory area for saving registers. The following method is used to save/restore the general-purpose registers. 1. General-purpose register save/restore by automatic register bank changeover The general-purpose registers can be saved at high speed by switching to a register bank that is not in use. Normally, the bank0 is used for the main task and the banks 1 to 15 are assigned to interrupt service tasks. To increase the efficiency of data memory utilization, the same bank is assigned for interrupt sources which are not nested. The switched bank is automatically restored by executing an interrupt return instruction [RETI] or [RETN]. Therefore, it is not necessary for a program to save the RBS. Example: Register bank changeover PINTxx: Interrupt processing RETI VINTxx: DP PINTxx DB 1 ; RBS ← RBS + 1 2. General-purpose register save/restore by register bank changeover The general-purpose registers can be saved at high speed by switching to a register bank that is not in use. Normally, the bank0 is used for the main tank and the banks 1 to 15 are assigned to interrupt service tasks. Example: Register bank changeover PINTxx: LD RBS, n Interrupt processing RETI ; Restores bank and returns VINTxx: DP PINTxx ; Interrupt service routine entry address DB 0 Figure 1.5.4 Saving/Restoring General-purpose Registers Acceptance of interrupt Saving registers Restoring registers Interrupt service task Interrupt return Main task (b) Saving/restoring using push/pop or data transfer instructions m Acceptance of interrupt Bank m n m m Interrupt service task Restore to bank m automatically by [RETI]/[RETN] Interrupt return Switch to bank n by LD, RBS and n instruction Switch to bank n automatically Main task (a) Saving/restoring by register bank changeover Time m |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |