Author: mcayland
Date: Sun Jun 9 14:25:14 2013
New Revision: 1145
URL: http://tracker.coreboot.org/trac/openbios/changeset/1145
Log:
display.fs: pass the colour depth and line bytes to the Forth terminal routines.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/display.fs
trunk/openbios-devel/libopenbios/video_common.c
Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:11 2013 (r1144)
+++ trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:14 2013 (r1145)
@@ -44,6 +44,9 @@
0 value foreground-color
0 value background-color
+0 value depth-bytes
+0 value line-bytes
+
\ internal values read from QEMU firmware interface
0 value qemu-video-addr
0 value qemu-video-height
Modified: trunk/openbios-devel/libopenbios/video_common.c
==============================================================================
--- trunk/openbios-devel/libopenbios/video_common.c Sun Jun 9 14:25:11 2013 (r1144)
+++ trunk/openbios-devel/libopenbios/video_common.c Sun Jun 9 14:25:14 2013 (r1145)
@@ -283,6 +283,10 @@
feval("to frame-buffer-adr");
/* Set global variables ready for fb8-install */
+ PUSH((video.fb.depth + 1) >> 3);
+ feval("to depth-bytes");
+ PUSH(video.fb.rb);
+ feval("to line-bytes");
PUSH((ucell)fontdata);
feval("to (romfont)");
PUSH(FONT_HEIGHT);
Author: mcayland
Date: Sun Jun 9 14:24:54 2013
New Revision: 1139
URL: http://tracker.coreboot.org/trac/openbios/changeset/1139
Log:
terminal.fs: Fix linefeeds on the bottom line of the Forth console.
Fix cursor position when a linefeed is entered on the bottom line.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/terminal.fs
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:24:52 2013 (r1138)
+++ trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:24:54 2013 (r1139)
@@ -230,6 +230,12 @@
endof
a of \ LF
line# 1+ to line# 0 to column#
+ line# #lines >= if
+ line# 1-
+ 0 to line#
+ 1 delete-lines
+ to line#
+ then
endof
b of \ VT
line# 0<> if