In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: I'm getting the mysterious Index Out of Bounds error with this block of code -- the line after BANK that causes the routine to be aborted if the queue is full seems to be the offender but I cannot sort out why. [code]' Use: PUSH_QUEUE value ' -- pushes value into cicular queue if space available SUB PUT_QUEUE ASM BANK queue JB qCount.3, @PQ_Exit ' <- problem child MOV W, #qBuf ADD W, qHead MOV FSR, W MOV IND, __PARAM1 INC qHead AND qHead, #0000_0111 INC qCount PQ_Exit: BANK $00 ENDASM ENDSUB[/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=373781 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)