Samo Benedicic wrote: > B1_COUNT equ 0xA0 > B1_ARRAY equ 0xA0 > > Is it OK, that this is one and the same register? and Ken Pergola wrote: > Took a quick glance: > > Are B1_COUNT and B1_ARRAY aliases on purpose (since they are the same > location 0xA0) or was that just a typo? Now, and this is a rather importent point, B1_COUNT and B1_ARRAY are neither "registers" nor "locations". They are just two SYMBOLS that (in this case) happens to be set to the same value. Those values could represent anything, temperatures, times, seconds even (as might be the case in this case) addresses of memory locations. It all depends on how the symbols are used later on in the code. Jan-Erik. --- Jim Tellier wrote: > OK, I've got an "interesting" bug-hunt going on, and > it's about time I asked > a couple of sanity-check questions! I was going to > post the entire .asm, > but perhaps that's not (yet) necessary... we'll see! > > Using '16F877. I've set up a data structure in Bank > 1: > B1_COUNT equ 0xA0 > B1_ARRAY equ 0xA0 > B1_OTHERDATA equ 0xC3 > B1_MOREDATA equ 0xC4 > > ; A method "foo" is called twice by my main program > logic. > ; > foo > banksel B1_COUNT > ; This is the ONLY reference to B1_COUNT > anywhere: > incf B1_COUNT > movlw B1_ARRAY > addwf B1_COUNT, W > movwf FSR > incf INDF > return > > The interrupt service saves and restores FSR (and W, > STATUS, PCLATH) in the > "standard" manner. (FSR *is* used in the intsvc to > store characters > received from serial port, but it is set > to point to a buffer space in Bank 0). > > THE PROBLEM: sometime well after "foo" is called > (exactly twice), when I go > to read the contents of B1_COUNT.... it's > sporadically incorrect! > I note that ALL of what I expect to see elsewhere in > both Bank 0 and Bank 1 > data space is correct... except for this one > address! > > Is there anything "odd" about what I'm doing? I > can't seem to think of new > ways to look at this one! > (Oh, BTW, this one's not easily simulated, due to > the need for RS232 and I2C > I/O.. :^( > Thanks for any helpful thoughts you might have! > Jim > > > > -- > > http://www.piclist.com#nomail Going offline? Don't > AutoReply us! > > email listserv@mitvma.mit.edu with SET PICList > DIGEST in the body > > > > -- > http://www.piclist.com#nomail Going offline? Don't > AutoReply us! > email listserv@mitvma.mit.edu with SET PICList > DIGEST in the body __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu