| |||||
Technical Support Support Resources
Product Information | RTX166: RESTRICTIONS USING REGISTERBANKSInformation in this article applies to:
QUESTIONThe RTX166 manual warns that care must be taken to avoid using register banks that are used by the RTX. If I use the USING directive to specify a register bank for my functions, how can I determine which register banks are used by RTX166? How do I avoid using them? ANSWERRTX166 declares several register banks for its internal interrupt routines. If you look in the MAP file generated by the linker, you will find these defined after the SYSTEM stack. For example: 00FA00H 00FBFFH 000200H --- --- --- --- --- --- * SYSTEM STACK * 00FC00H 00FC1FH 000020H DATA --- BYTE --- --- --- *REG* rtx_clk_rb 00FC20H 00FC3FH 000020H DATA --- BYTE --- --- --- *REG* ?C_MAINREGISTERS 00FC40H 00FC5FH 000020H DATA --- BYTE --- --- --- *REG* rtx_int_rb In this example, RTX166 declares rtx_clk_rb and rtx_int_rb as register banks. To avoid using these register banks, don't specify these names (rtx_clk_rb or rtx_int_rb) with the USING directive in your functions. To create your own register banks, make up a name and use it with the USING directive. For example:
void my_isr (void) interrupt 0x23 using MY_REGISTER_BANK_NAME
{
}
The name is not important as long as it is unique. Last Reviewed: Sunday, March 12, 2000 | ||||
| |||||