[Flashforth-devel] Bug report: Can't write beyond $a300
Brought to you by:
oh2aun
|
From: Pablo M. M. <ea...@ho...> - 2013-06-17 17:52:57
|
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.
Regards,
Pablo.
|