Changeset 3350
- Timestamp:
- Oct 3, 2012 11:50:56 PM (8 months ago)
- Files:
-
- 1 added
- 2 edited
-
cpu/arm/olpc/1.75/dtcompat.fth (added)
-
cpu/arm/olpc/1.75/fw.bth (modified) (1 diff)
-
forth/lib/substrin.fth (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/1.75/fw.bth
r3331 r3350 32 32 fload ${BP}/cpu/arm/olpc/gpio-gamekeys.fth 33 33 fload ${BP}/cpu/arm/olpc/test-tweaks.fth 34 fload ${BP}/cpu/arm/olpc/1.75/dtcompat.fth 34 35 35 36 fload ${BP}/cpu/arm/olpc/save-fw.fth -
forth/lib/substrin.fth
r1 r3350 32 32 again 33 33 ; 34 35 \ This version is faster (due to bscan being a code word) and arguably more convenient than sindex 36 : $sindex ( small$ big$ -- rem$ ) 37 2 pick 0= if 4drop 0 then \ Null string is initial substring of anything 38 3 pick c@ >r ( small$ big$ r: firstchar ) 39 begin r@ bscan dup while ( small$ rem$ r: firstchar ) 40 4dup substring? if ( small$ rem$ r: firstchar ) 41 2swap r> 3drop exit ( -- rem$ ) 42 then ( small$ rem$ r: firstchar ) 43 1 /string ( small$ rem$' r: firstchar ) 44 repeat ( small$ rem$ r: firstchar ) 45 2swap r> 3drop ( rem$ ) 46 ; 47 34 48 only forth also definitions 35 49
Note: See TracChangeset
for help on using the changeset viewer.
