[openfirmware] r1572 - cpu/x86/pc/olpc
svn at openfirmware.info
svn at openfirmware.info
Fri Dec 11 07:14:07 CET 2009
Author: wmb
Date: 2009-12-11 07:14:07 +0100 (Fri, 11 Dec 2009)
New Revision: 1572
Modified:
cpu/x86/pc/olpc/setwp.fth
Log:
OLPC - added ($delete-tag) for batch-editing mfg tag arrays.
Modified: cpu/x86/pc/olpc/setwp.fth
===================================================================
--- cpu/x86/pc/olpc/setwp.fth 2009-12-11 05:29:47 UTC (rev 1571)
+++ cpu/x86/pc/olpc/setwp.fth 2009-12-11 06:14:07 UTC (rev 1572)
@@ -182,6 +182,20 @@
safe-parse-word 0 parse add-null 2swap $add-tag
;
+\ Deletes a tag from a RAM image of the mfg data
+: ($delete-tag) ( adr len -- )
+ 2dup ram-find-tag 0= if 2drop exit then ( tagname$ ram-value$ )
+ 2nip ( ram-value$ )
+
+ 2dup + c@ h# 80 and ( ram-value$ tag-style )
+ if 4 else 5 then + >r ( tag-adr tag-len )
+ ram-last-mfg-data >r ( tag-adr r: len bot-adr )
+ r@ 2r@ + ( tag-adr src-adr dst-adr r: len bot-adr )
+ rot r@ - ( src-adr dst-adr copy-len r: len bot-adr )
+ move ( r: len bot-adr )
+ r> r> h# ff fill ( )
+;
+
: $delete-tag ( name$ -- )
tag-setup ( ram-value$ )
2dup + c@ h# 80 and ( ram-value$ tag-style )
More information about the openfirmware
mailing list