In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Staryi wrote: I "condensed" code as soon as possible. This routine only for demonstrate this bug. The idea is that inc and dec operation my work abnormally, when interrupt is caused. Not everything, but only if the main program and interrupt service routine are on defined distance in program memory space (this distance is near 0x800). The main program (Work) has two counters - R0 and R1. The R1 is cycle counter, the start value is 200 (as example). R0 is independent counter, = 0 before cycle, and increment every loop. The interrupt service routine (serv) is dummy, and caused by RTCC rollover every 256 MCU clocks. The value of R1 after cycle must be equal R0 before it, i.e. 200, not so? But in this program conditions it is 201! If the Work routine is on other distance relativelly serv routine, all works ok. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=146451#m146466 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)