Author: mcayland Date: Sun Jun 9 14:24:52 2013 New Revision: 1138 URL: http://tracker.coreboot.org/trac/openbios/changeset/1138
Log: display.fs: Fix fb8-delete-lines within the inbuilt Forth terminal emulator.
This enables us to provide a basic scrolling console terminal.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/forth/device/display.fs
Modified: trunk/openbios-devel/forth/device/display.fs ============================================================================== --- trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:24:50 2013 (r1137) +++ trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:24:52 2013 (r1138) @@ -226,12 +226,12 @@ dup #columns = if drop 0 to column# line# 1+ - dup #lines = if - drop - \ FIXME move up screen (and keep position) - else - to #lines + dup #lines >= if + line# + 0 to line# + 1 delete-lines then + to line# else to column# then @@ -295,12 +295,12 @@
: fb8-delete-lines ( n -- ) \ numcopy = ( #lines - ( line# + n )) * char-height - #lines over #line + - char-height * + #lines over line# + - char-height *
( numcopy ) 0 ?do dup line# + char-height * i + line# char-height * i + - swap fb8-copy-line + fb8-copy-line loop
#lines over - char-height *