Re: [Flashforth-devel] Bug report: Can't write beyond $a300
Brought to you by:
oh2aun
|
From: Mikael N. <mik...@pp...> - 2013-06-17 20:10:28
|
Thanks Pablo for spotting that. I hope unsigned compare is used in all other places that does the memory mapping. I will include this fix. BR Mikael On 06/17/2013 08:52 PM, Pablo M. Muñoz wrote: > I think I have found a (small) bug. > > In FF 3.8 (original) compiled for a 18F2620, trying to write beyond > $a300 gives an "AD?" error. > > I have found the problem here: > > ISTORECHK: > movlw HIGH dpcode ;(dp_user_dictionary>>8) ; > subwf Srw, W, A > btfsc STATUS, N, A > bra ISTORERR > return > > The instruction subwf gives a signed result, and sets N if (Srw) - W > $7f > > This can be solved with an unsigned compare: > > ISTORECHK: > movlw HIGH dpcode ;(dp_user_dictionary>>8) ; > cpfslt Srw, A > return > bra ISTORERR > > With this change, writes work OK from $2300 to $ebff. > > I made this change in order to put the help system at the end of the > flash space. > > |