[OpenBIOS] r519 - ofw/termemu

svn at openbios.org svn at openbios.org
Fri Aug 3 00:14:09 CEST 2007


Author: wmb
Date: 2007-08-03 00:14:08 +0200 (Fri, 03 Aug 2007)
New Revision: 519

Modified:
   ofw/termemu/fb16.fth
Log:
fb16 - Fixed terminal emulator problem with insert-characters and
delete-characters.  Erase-to-end-of-line left garbage at the right
of the screen.



Modified: ofw/termemu/fb16.fth
===================================================================
--- ofw/termemu/fb16.fth	2007-08-02 21:37:59 UTC (rev 518)
+++ ofw/termemu/fb16.fth	2007-08-02 22:14:08 UTC (rev 519)
@@ -197,20 +197,20 @@
 headerless
 
 : move-chars16  ( source-col# dest-col# -- )
-   2dup max  #columns swap -         ( src dst #chars )
-   char-width * -rot                 \ count is linelength-maxcol#
-   swap column-adr16  swap column-adr16  ( count src-adr dst-adr )
-   char-height 0  do
-      3dup rot move   ( count src-adr dst-adr )
-      swap bytes/line16 +  swap bytes/line16 +
-   loop    2drop drop
+   2dup max  #columns swap -                    ( src dst #chars )
+   char-width 2* * -rot                         ( #bytes src dst )
+   swap column-adr16  swap column-adr16         ( #bytes src dst )
+   char-height 0  do                            ( #bytes src dst )
+      3dup rot move                             ( #bytes src dst )
+      swap bytes/line16 +  swap bytes/line16 +  ( #bytes src' dst' )
+   loop    3drop                                ( )
 ;
 : erase-chars16  ( #chars start-col# -- )
-   swap char-width * swap
-   column-adr16 char-height 0  do         ( count adr )
-      2dup swap text-background16 fb-fill  ( count adr )
-      bytes/line16 +
-   loop  2drop
+   swap char-width 2* * swap               ( #bytes start-col# )
+   column-adr16 char-height 0  do          ( #bytes adr )
+      2dup swap text-background16 fb-fill  ( #bytes adr )
+      bytes/line16 +                       ( #bytes adr' )
+   loop  2drop                             ( )
 ;
 headers
 : fb16-insert-characters  ( #chars -- )




More information about the OpenBIOS mailing list