Author: laurent Date: 2009-08-29 22:42:22 +0200 (Sat, 29 Aug 2009) New Revision: 572
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs Log: Implement "$=" to compare two strings (needed by BootX)
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs =================================================================== --- trunk/openbios-devel/forth/bootstrap/bootstrap.fs 2009-08-29 15:43:00 UTC (rev 571) +++ trunk/openbios-devel/forth/bootstrap/bootstrap.fs 2009-08-29 20:42:22 UTC (rev 572) @@ -533,6 +533,20 @@ drop ;
+\ compare two string + +: $= ( str1 len1 str2 len2 -- true|false ) + rot ( str1 str2 len2 len1 ) + over ( str1 str2 len2 len1 len2 ) + <> if ( str1 str2 len2 ) + 3drop + false + else ( str1 str2 len2 ) + comp + 0= + then +; + \ : +! tuck @ + swap ! ; : off false swap ! ; : on true swap ! ;