Fix $ROM
authorPhil Burk <philburk@mobileer.com>
Sun, 27 Dec 2015 07:31:41 +0000 (23:31 -0800)
committerPhil Burk <philburk@mobileer.com>
Sun, 27 Dec 2015 07:31:41 +0000 (23:31 -0800)
Was using DO instead of ?DO
so it failed on index 0.

fth/strings.fth

index 8bead25..dc998ad 100644 (file)
@@ -19,7 +19,7 @@ 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 ,\r
         2+ * even-up allot\r
     DOES>    ( index -- $addr )\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