Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: D Finnigan Newsgroups: comp.sys.apple2.programmer Subject: Re: Resolved!, was Re: Uthernet receive error: bytes swapped Date: Sat, 7 Mar 2015 17:37:00 +0000 (UTC) Organization: Mac GUI Lines: 29 Message-ID: References: <27094031-e746-4e9d-a0a4-e81ef6f82c44@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 7 Mar 2015 17:37:00 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="ac9e0e4d7dd3957fb97803ee6801bab8"; logging-data="19331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xe6pdcAdI8WR6oKYHYAXm" User-Agent: Mac GUI Usenet In-Reply-To: Cancel-Lock: sha1:p16MZNCRNb0aWDwmzlaom9XySIk= Xref: csiph.com comp.sys.apple2.programmer:1554 David Schmidt wrote: > On 3/5/2015 7:30 PM, D Finnigan wrote: >> I'm not really interested in >> looking into exactly what it was doing, just surprised that it was giving >> correct results in its broken state. > > You know what they say... even a broken [analog] clock is right twice a > day. A great saying that is applicable in so many scenarios! :-) I've had some time to think about what was going wrong. I haven't actually looked at the source yet to confirm, but I know I was using indexed Y addressing by starting Y at decimal 19, then working down to 0. Now with the loop going on twice as long, Y was rolling over beyond 0 and was ending up at $EC or $ED. That would put it at the end of the first page of the receive buffer. Depending on the length of the packets received so far, that either would have been a lot of zeros, or it would have been the tail of previous packets. It's a newbie mistake, but since it was giving correct results more often than not, it was tricky. -- ]DF$ Apple II Book: http://macgui.com/newa2guide/ Usenet: http://macgui.com/usenet/ <-- get posts by email! Apple II Web & Blog hosting: http://a2hq.com/