a new function for startup (_main)
[fw/sdcc] / debugger / mcs51 / simi.c
index b9b60f1214b041e8dc91a1eaab7c190b66bca80c..6eb859cadf3c1ae26fdaca38edff9eb693118d5c 100644 (file)
@@ -144,7 +144,17 @@ void openSimulator (char **args, int nargs)
     int retry = 0;
     int i ;
     Dprintf(D_simi, ("simi: openSimulator\n"));
-
+#ifdef SDCDB_DEBUG
+    if (D_simi & sdcdbDebug)
+    {
+        printf("simi: openSimulator: ");
+        for (i=0; i < nargs; i++ )
+        {
+            printf("arg%d: %s ",i,args[i]);
+        }
+        printf("\n");
+    }
+#endif
     invalidateCache(XMEM_CACHE);
     invalidateCache(IMEM_CACHE);
     invalidateCache(SREG_CACHE);
@@ -321,6 +331,7 @@ int simSetValue (unsigned int addr,char mem, int size, unsigned long val)
     sendSim(buffer);
     waitForSim(100,NULL);
     simResponse();   
+    return 0;
 }
 
 
@@ -420,7 +431,7 @@ void simLoadFile (char *s)
 {
     char buff[128];
 
-    sprintf(buff,"l \"%s\"\n",s);
+    sprintf(buff,"file \"%s\"\n",s);
     printf(buff);
     sendSim(buff);
     waitForSim(500,NULL);