I have an interrupt service routine that uses Register Bank 2. From within the ISR I call a function, passing a pointer as the argument-- e.g. XXX is defined in a typedef struct declaration The calling statement is: - myfunct(&myvar); where myvar is of type XXX and has the address X:0x00B0 The function header is: void myfunct(xxx xdata *psData) When I look at the disassembly file the parameter &myvar is correctly passed using registers R6 and R7. However, the C51 manual states that pointers are passed using R1 and R2 for the value and R3 for the memory type. It would appear that this parameter is being passed as an integer. On entering the function the address (0x00B0)should be loaded from R6 and R7 into the DPTR, but instead the DPTR is loaded from absolute data memory locations 0X06 and 0x07, WHICH ARE THE ADDRESSES FOR REGISTERS R6 AND R7 IN REGISTER BANK 0, NOT REGISTER BANK 2 I solved the problem by using #pragma NOAREGS (which is less efficient). Am I using pointers incorrectly and even if I am, why is the wrong register bank used in the called function?