Lasse Madsen wrote: >=20 > Hey all >=20 > I have made some simple code for the 12C509A and when i compile it = i get: >=20 > Error[120] Call or jump not allowed at this address ((must be in l= ow half of page) > Warning[227] Substituting RETLW 0 for RETURN pseudo-op >=20 > The pice of code that is reported not to work is: >=20 > nr1 movlw 0xFF > movwf counter > loop BCF GPIO,3 > CALL pulse ; HERE IS THE ERROR 120 ! > BSF GPIO,3 > CALL farve_1 : ALSO HERE ! > decfsz counter,f > goto loop > BCF GPIO,3 > return ; HERE IS THE =B4WARNING 227 ! >=20 > Why cant i use call and return with the 12C509 ??!?!? If you visit the data sheet, you will see that RETURN is not supporte= d on 12 bit cores, only RETLW. The CALL instruction only carries enough address information to allow subroutines in the lower 256 ROM addresses. Try moving your subroutin= es closer to the start of your code. --=20 Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.