Merge pull request #13 from philburk/fixrom
[pforth] / fth / strings.fth
index ff0fc91..dc998ad 100644 (file)
@@ -19,12 +19,12 @@ ANEW TASK-STRINGS.FTH
 \r
 \ Structure of string table\r
 : $ARRAY  (  )\r
 \r
 \ Structure of string table\r
 : $ARRAY  (  )\r
-    CREATE  ( #strings #chars_max --  ) \r
+    CREATE  ( #strings #chars_max --  )\r
         dup ,\r
         2+ * even-up allot\r
     DOES>    ( index -- $addr )\r
         dup @  ( get #chars )\r
         dup ,\r
         2+ * even-up allot\r
     DOES>    ( index -- $addr )\r
         dup @  ( get #chars )\r
-        rot * + +\r
+        rot * + cell+\r
 ;\r
 \r
 \ Compare two strings\r
 ;\r
 \r
 \ Compare two strings\r
@@ -42,7 +42,7 @@ ANEW TASK-STRINGS.FTH
 : TEXT=  ( addr1 addr2 count -- flag )\r
     >r -1 -rot\r
        r> 0\r
 : TEXT=  ( addr1 addr2 count -- flag )\r
     >r -1 -rot\r
        r> 0\r
-    DO  dup c@ tolower\r
+    ?DO  dup c@ tolower\r
         2 pick c@ tolower -\r
         IF rot drop 0 -rot LEAVE\r
         THEN\r
         2 pick c@ tolower -\r
         IF rot drop 0 -rot LEAVE\r
         THEN\r
@@ -80,7 +80,7 @@ ANEW TASK-STRINGS.FTH
 : ($ROM)  ( index address -- $string )\r
     ( -- index address )\r
     swap 0\r
 : ($ROM)  ( index address -- $string )\r
     ( -- index address )\r
     swap 0\r
-    DO dup c@ 1+ + aligned\r
+    ?DO dup c@ 1+ + aligned\r
     LOOP\r
 ;\r
 \r
     LOOP\r
 ;\r
 \r