re: Long Call Octavio, this may not be of much help but I do the following (Parallaz Syntax. I need to turn off interrupts): Bank1_Call CLRB GIE ; Turn off interrupts JB GIE,Bank1_Call ; and make sure they are off... SETB PCLATH.3 ; Switch to Bank 1 CALL Bank1_Routine ; Call Bank 1 routine CLRB PCLATH.3 ; Switch to Bank 0 SETB GIE ; Enable interrupts RET - Tom At 06:35 PM 4/26/97 -0300, you wrote: >Hi PIC'ers, > >My problem: >I have routines on first and second page and this routines are called >from first and second page. I just want a macro that can set the bit >in PCLATH automatically, just if needed. > >My solution: >SCALL macro routine > >if high(routine)>=8 & high($)<8 >bsf PCLATH,3 >endif > if high(routine)<8 & high($)>=8 > bcf PCLATH,3 > endif > call routine > if (high(routine)>=8 & high($)<8) | (high(routine)<8 & high($)>=8) > movlw $>>8 > movwf PCLATH > endif > endm > >Can someone tell me what is wrong with this macro? > >Thanks > >Octavio