(_ds390_genXINIT) added test for 0 length
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 16 Dec 2001 19:02:28 +0000 (19:02 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 16 Dec 2001 19:02:28 +0000 (19:02 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1682 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/main.c

index 8657baec381d18521120b50bad1810487637e33b..da8e5f47e7d428a62286b74a4c346e3cdac3ff31 100644 (file)
@@ -212,6 +212,9 @@ _ds390_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
 /* Generate code to copy XINIT to XISEG */
 static void _ds390_genXINIT (FILE * of) {
   fprintf (of, ";      _ds390_genXINIT() start\n");
+  fprintf (of, "       mov     a,#l_XINIT\n");
+  fprintf (of, "       add     a,#l_XINIT>>8\n");
+  fprintf (of, "       jz      00003$\n");
   fprintf (of, "       mov     a,#s_XINIT\n");
   fprintf (of, "       add     a,#l_XINIT\n");
   fprintf (of, "       mov     r1,a\n");
@@ -231,6 +234,7 @@ static void _ds390_genXINIT (FILE * of) {
   fprintf (of, "       mov     a,dph\n");
   fprintf (of, "       cjne    a,ar2,00001$\n");
   fprintf (of, "       mov     dps,#0\n");
+  fprintf (of, "00003$:\n");
   fprintf (of, ";      _ds390_genXINIT() end\n");
 }