Loops in Forth are described using a limit and start value. Fix the limit so palette entry 255 is actually set.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/device/display.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forth/device/display.fs b/forth/device/display.fs index fff44e0..f7fa2a7 100644 --- a/forth/device/display.fs +++ b/forth/device/display.fs @@ -386,7 +386,7 @@ defer fb8-invertrect to foreground-color to background-color
\ setup palette - 10101 ['] color-palette cell+ ff 0 do + 10101 ['] color-palette cell+ 100 0 do dup 2 pick i * swap ! cell+ loop 2drop
@@ -394,7 +394,7 @@ defer fb8-invertrect ffffcc ['] color-palette cell+ fe cells + !
\ load palette onto the hardware - ['] color-palette cell+ ff 0 do + ['] color-palette cell+ 100 0 do dup @ ff0000 and d# 16 rshift 1 pick @ ff00 and d# 8 rshift 2 pick @ ff and