LCALL, LJMP, LSET

 

LCALL        addr11        Long call ('5x)


Words:        1-3        Cycles:        2-4                Affects:        none

 

'5x Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to point the page pre-select bits (STATUS 5,6) to addr11’s page. The bit set/clear instructions are followed by a CALL to addr8.  Long calls can be made to any page, but the routine that is being called MUST be located in the lower half of that page. This is due to the fact that bit 9 of the program counter is ALWAYS cleared when processing a CALL instruction on '5x devices (see CALL for '5x devices ).  This instruction is only useful for PICs with more than 512 words. 

 

Coding:        (BCF/BSF        3, 5)

       (BCF/BSF        3, 6)

       CALL                addr8

Note:        Please note that LCALL does not set the page select bits upon returning to the calling routine. Therefore, your program must set these bits. This can be done using LSET $, which sets the page select bits to the current page.

 

 

LCALL        addr13        Long call ('xx)


Words:        1-3        Cycles:        2-4                Affects:        none

 

'xx Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to load the PCLATH bits to addr13’s page. The bit set/clear instructions are followed by a CALL to addr11. This instruction is only useful for PICs with more than 2K words.

 

Coding:        (BCF/BSF        0A ,3)

       (BCF/BSF        0A , 4)

       CALL                addr11

 

Note:        Please note that LCALL does not set the PCLATH bits upon returning to the calling routine. Therefore, your program must set these bits. This can be done using LSET $, which sets the page select bits to the current page.

 

 

LJMP        addr11        Long jump ('5x)


Words:        1-3        Cycles:        2-4                Affects:        none

 

'5x Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to point the page pre-select bits (STATUS 5,6) to addr11’s page. The bit set/clear instructions are followed by a  jump to addr8. This instruction is only useful for PICs with more than 512 words.

 

Coding:        (BCF/BSF        3, 5)

       (BCF/BSF        3, 6)

       GOTO        addr8

 

 

LJMP        addr13        Long jump ('xx)


Words:        1-3        Cycles:        2-4                Affects:        none

 

'xx Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to load the PCLATH bits to addr13’s page. The bit set/clear instructions are followed by a jump to addr11. This instruction is only useful for PICs with more than 2K words.

 

Coding:        (BCF/BSF        0A ,3)

       (BCF/BSF        0A , 4)

       GOTO        addr11

 

 

LSET        addr11        Long set ('5x)


Words:        0-2        Cycles:        0-2                Affects:        none

 

'5x Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to point the page pre-select bits (STATUS 5,6) to addr11’s page.  This instruction is only useful for PICs with more than 512 words.

 

Coding:        (BCF/BSF        3, 5)

       (BCF/BSF        3, 6)

 

 

LSET        addr13        Long set ('xx)


Words:        0-2        Cycles:        0-2                Affects:        none

 

'xx Operation:        Depending on the device size, from zero to two BCF/BSF instructions will be assembled to load the PCLATH bits to addr13’s page. This instruction is only useful for PICs with more than 2K words.

 

Coding:        (BCF/BSF        0A ,3)

       (BCF/BSF        0A , 4)