please dont rip this site

SX Embedded Controller Instruction

SKIP

Description: Skip next instruction word
Operation: PC++
Flags affected: none
Registers affected: PC
Sources referenced: -
Cycles: 1
Opcode:
Actually compiles to: sb 2.0 /snb 2.0
Microchip PIC syntax: BTFSC/BTFSS 2,0
Notes:

Actually compiles a sb 2.0 if at an odd address and a snb 2.0 if at an even address. Since register 2 is the PC, there will always be a 1 in the PC at an odd address and no 1 at an even address. There is no skip always instruction in the SX.

The SX has a built in trick which skips the next instruction after a page or bank instruction. This allows the user to skip long calls (page,call). It takes 3 cycles to skip these two instructions. It also means that if the user were just trying to skip the page, the SX would also skip the next instruction afterwards. It's a cool trick, but only once you know it's there. If you don't, it can be really frustrating to try to figure out the problem.

This trick has been built in to deal with doing bank instructions as well. It would skip the bank, and the next instruction after the bank. It makes skipping register operations extremely easy, but only once you know it is there. If you do not wish the instruction following the bank or page instruction to be skiped inserting a nop between the bank or page instruction and the next instruction would fix the problem.

Things really get interesting when there are several BANK and PAGE instructions in a row. They’re ALL skipped, and a cycle is taken for each. Interrupts do not interfere with this skipping behavior. If a non bank or page instruction is skipped, a bank or page instruction following it will not be skipped. Test with the following:

	page $700
	clc
	snc
	 setb temp.0
	page 0
	jmp $10

	page $700
	clc
	snc
	 page 0
	 bank temp
	 setb temp.0
	jmp $10

JMP and SKIP instructions take 2 cycles in >compatible mode, not 4 as stated in Table 3-7 in User's manual page 53.


file: /Techref/SCENIX/inst/skip.htm, 3KB, , updated: 2002/8/5 16:39, local time: 2024/11/30 12:28,
TOP NEW HELP FIND: 
3.15.203.246: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://sxlist.com/TECHREF/SCENIX/inst/skip.htm"> SX Embedded Controller Instruction </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 sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .