The parametrs passed to the call to opnchn when initializing are now
authorkeie <none@none>
Fri, 25 Jan 1985 09:57:04 +0000 (09:57 +0000)
committerkeie <none@none>
Fri, 25 Jan 1985 09:57:04 +0000 (09:57 +0000)
correct string descriptors.
Programs with data statements used to crash with TRAP TYPE 11.

lang/basic/src.old/gencode.c

index d5cdbac..03bcd17 100644 (file)
@@ -543,10 +543,18 @@ prolog2()
                fprintf(emfile," loc 0\n");
                fprintf(emfile," cal $_setchan\n");
                fprintf(emfile," asp EM_WSIZE\n");
-               fprintf(emfile,"datfname\n rom \"%s\"\n", datfname);
-               fprintf(emfile," lae datfname\n");
+               fprintf(emfile,"datfname\n rom \"%s\\0\"\n", datfname);
+               fprintf(emfile,"dattyp\n rom \"i\\0\"\n");
+               fprintf(emfile,"datfdes\n rom datfname,1,%d\n",
+                       strlen(datfname));
+               fprintf(emfile,"dattdes\n rom dattyp,1,1\n");
+               fprintf(emfile," lae dattdes\n");
+               fprintf(emfile," lae datfdes\n");
+               fprintf(emfile," loc 0\n");
                fprintf(emfile," cal $_opnchn\n");
                fprintf(emfile," asp EM_PSIZE\n");
+               fprintf(emfile," asp EM_PSIZE\n");
+               fprintf(emfile," asp EM_WSIZE\n");
        }
        datatable();
 }