Re: bug+workaround: code page switching
Samuel Tardieu <[email protected]> 09 Nov 2004 08:37:55 +0100
| Newsgroups | gmane.comp.lang.forth.picforth |
|---|---|
| Organization | Avian Carrier & Friends |
| Message-ID | <[email protected]> |
>>>>> "David" == David McNab <[email protected]> writes: David> After a few hours of chasing weird phenomena, I've found a bug David> with PicForth's handling of code page switching around loops. [...proposed fix...] David> This also forces an explicit PCLATH setting at the top of the David> loop, but could cause some unnecessary PCLATH setting code to David> be generated. David, I have applied your fix (using no-cbank in begin, actually in backref) with the following comment: \ In a backward reference, we cannot assume that the bank will be properly \ restored to its correct value. We could do that by remembering the \ value it should have, but this may be an underoptimization as we may \ need to explicitely call code in another bank just after the backward \ reference. I'll be releasing a new PicForth version today with this fix and others, as I regard this one as being critical. Thanks again. Sam -- Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam