please dont rip this site

SX Embedded Controller Instruction

CALL addr

Description: Call to address, clear bit 8
Operation: STACK[SP++] = PC; PC = ( page << 9 ) + addr
Flags affected: none
Registers affected: PC
Sources referenced: -
Cycles: 1 *
Opcode:
Details: SX Users Manual page # 76
Microchip PIC syntax:
Notes:

The call instruction clears the 9th bit (bit 8) of the PC while loading the first 8 bits (0...7) so you can only call into the first 256 instruction half page of each 512 instruction page. To allow calls to more than one page, the PA0...2 bits from the Status register are copied to the top 3 bits of the PC. See: SX Users Manual page # 34 for a good diagram of this process.

Since the call can only be to an address in the first half of each page of memory, how about defining a macro that compiles a (dual) register load of the address of the routine and then always calls a single subroutine which is placed at a low memory address which then jumps to the address specified in the registers? The return from the subroutine jumped to will be to the original call. This is very slow compaired to the direct subroutine call, but will allow the use of the upper half page of memory in a program with a lot of subroutines.


file: /Techref/scenix/inst/call.htm, 2KB, , updated: 2003/2/15 22:52, local time: 2024/12/2 18:34,
TOP NEW HELP FIND: 
18.97.14.83:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/scenix/inst/call.htm"> SX Embedded Controller Instruction - CALL addr</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .