Author: afaerber Date: Sat Nov 6 02:17:02 2010 New Revision: 946 URL: http://tracker.coreboot.org/trac/openbios/changeset/946
Log: Optimize .properties array display by 0.r
Introduce a 0.r word, suggested by Segher. Optimize r890 by using this helper.
v4: * Replace ." " by space word, suggested by Segher.
Signed-off-by: Segher Boessenkool segher@kernel.crashing.org Signed-off-by: Andreas Färber andreas.faerber@web.de Acked-by: Segher Boessenkool segher@kernel.crashing.org
Modified: trunk/openbios-devel/forth/admin/devices.fs
Modified: trunk/openbios-devel/forth/admin/devices.fs ============================================================================== --- trunk/openbios-devel/forth/admin/devices.fs Tue Nov 2 23:16:32 2010 (r945) +++ trunk/openbios-devel/forth/admin/devices.fs Sat Nov 6 02:17:02 2010 (r946) @@ -276,6 +276,11 @@ . ;
+\ Print a number zero-padded +: 0.r ( u minlen -- ) + 0 swap <# 1 ?do # loop #s #> type +; + : .p-bytes? ( data len -- 1 | data len 0 ) ." -- " dup . ." : " swap >r 0 @@ -283,7 +288,7 @@ dup r@ + c@ ( len n ch )
- pocket tohexstr dup 2 <> if ." 0" then type ." " + 2 0.r space 1+ repeat 2drop r> drop 1