[OpenBIOS] [commit] r1213 - trunk/openbios-devel/drivers

repository service svn at openbios.org
Mon Aug 19 09:40:26 CEST 2013


Author: mcayland
Date: Mon Aug 19 09:40:26 2013
New Revision: 1213
URL: http://tracker.coreboot.org/trac/openbios/changeset/1213

Log:
tcx.fs: tidy-up lookups using (find-xt) and use openbios-* vars where appropriate

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/drivers/tcx.fs

Modified: trunk/openbios-devel/drivers/tcx.fs
==============================================================================
--- trunk/openbios-devel/drivers/tcx.fs	Mon Aug 19 09:40:22 2013	(r1212)
+++ trunk/openbios-devel/drivers/tcx.fs	Mon Aug 19 09:40:26 2013	(r1213)
@@ -14,23 +14,25 @@
 \ and height, grab the ones passed in by QEMU/generated by OpenBIOS
 \
 
-: openbios-video-addr
-  " openbios-video-addr" $find if
-    cell+ @
+: (find-xt)   \ ( str len -- xt | -1 )
+  $find if
+    exit
+  else
+    -1
   then
 ;
 
-: openbios-video-width
-  " openbios-video-width" $find if
-    cell+ @
-  then
-;
-
-: openbios-video-height
-  " openbios-video-height" $find if
-    cell+ @
-  then
-;
+" openbios-video-addr" (find-xt) cell+ value openbios-video-addr-xt
+" openbios-video-width" (find-xt) cell+ value openbios-video-width-xt
+" openbios-video-height" (find-xt) cell+ value openbios-video-height-xt
+" depth-bits" (find-xt) cell+ value depth-bits-xt
+" line-bytes" (find-xt) cell+ value line-bytes-xt
+
+: openbios-video-addr openbios-video-addr-xt @ ;
+: openbios-video-width openbios-video-width-xt @ ;
+: openbios-video-height openbios-video-height-xt @ ;
+: depth-bits depth-bits-xt @ ;
+: line-bytes line-bytes-xt @ ;
 
 \
 \ Installation
@@ -56,9 +58,10 @@
   h# 18 encode-int " hfporch" property
   h# 03dfd240 encode-int " pixfreq" property
   h# 3c encode-int " vfreq" property
-  h# 300 encode-int " height" property
-  h# 400 encode-int " width" property
-  h# 400 encode-int " linebytes" property
+
+  openbios-video-height encode-int " height" property
+  openbios-video-width encode-int " width" property
+  line-bytes encode-int " linebytes" property
 
   5 encode-int 0 encode-int encode+ " intr" property
   5 encode-int " interrupts" property



More information about the OpenBIOS mailing list