I think it will use the CHK?RP macro simply for safety sake. sure the code is not optimized in any sort, but it's always solid as rock. When you need something tight, use ASM. Hence, for safety sake and for none 18Xxxxx your asm example could be...
Code:
ASM
CHK?RP ; make sure we are on the right BANK
here
bsf PORTB,1
NOP
NOP
bcf PORTB, 1
goto here
ENDASM
PORTB.1=0 call MOVE?CT macro. wich is
Code:
MOVE?CT macro Cin, Regout, Bitout
CHK?RP Regout
if (((Cin) & 1) == 1)
bsf Regout, Bitout
else
bcf Regout, Bitout
endif
endm
there you discover the extra cycle
Bookmarks