[PicForth] Re: bug+workaround: code page switching
Samuel Tardieu
sam at rfc1149.net
Tue Nov 9 08:37:55 CET 2004
>>>>> "David" == David McNab <david at rebirthing.co.nz> 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 -- sam at rfc1149.net -- http://www.rfc1149.net/sam
More information about the PicForth
mailing list