CALL

NOTE: These items have been discontinued for a long time.
We no longer support these products or offer alternatives.

We retain these pages so that users can see what their existing tools support and to provide download links to the final documentation and software versions. We have a few replacement parts left, but not many. Available items have an 'ADD to CART' or 'Buy Now' button next to them. Otherwise they are not available.

logo has a few items in stock as well.

 

CALL        addr8                Call subroutine ('5x)


Words:        1        Cycles:        2                Affects:        none

 

'5x Operation:        The next instruction address is pushed onto the stack and addr8 is moved to the program counter  bits 0-7(PC ). The 9th bit of the program counter will always be cleared. Therefore, calls are only allowed to the first half of any 512-word page. The CALL instruction can be anywhere, but the address being called MUST be an 8bit address. If the device you are targeting has more than 512 words of code space, you will need to load the page pre-select bits ( status 5,6) to the proper value before executing the CALL.  See LCALL , LSET for '5x devices.

 

Coding:        CALL                addr8

 

 

CALL        addr11                Call subroutine ('xx)


Words:        1        Cycles:        2                Affects:        none

 

'xx Operation:        The next instruction address is pushed onto the stack and addr11 is moved to the program counter  bits 0-10 (PC ). The upper bits (11,12) of the program counter will be loaded from PCLATH (3,4).  Therefore, it is up to the user to pre-load PCLATH with the correct values BEFORE a CALL is initiated. This can be done easily by using the  LSET instruction  (for 'xx devices )  before CALL,  or simply using the LCALL instruction ( in place of CALL ),  which will set the PCLATH bits for you.  If your program appears to 'jump' to the wrong code page when executing a call, your PCLATH bits are probably incorrect.

 

Coding:        CALL                addr11