mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Implement "$=" to compare two strings (needed by BootX)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@572 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -533,6 +533,20 @@ variable leaves 0 leaves !
|
||||
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 ! ;
|
||||
|
||||
Reference in New Issue
Block a user