* src/z80/peep.c: fixed bug #2648964: --i-code-in-asm crashes sdcc
[fw/sdcc] / src / regression / string1.c
index 51d547629db43f4f54b9c1bbbacd95a569454496..e8721c96d2bc8cb3d7c86d98f57ba1ae127ca688 100644 (file)
@@ -1,8 +1,7 @@
-#define __16F873
-#include "p16f873.h"
-unsigned char success=0;
+#include "gpsim_assert.h"
+#include "picregs.h"
+
 unsigned char failures=0;
-unsigned char dummy=0;
 //unsigned bit bit1;
 
 typedef unsigned char byte;
@@ -11,13 +10,11 @@ typedef unsigned char byte;
 byte uchar0;
 const byte arr[] = { 1,2,8,9,0 };
 
-bit at 0x30 B1;
-
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void  isr(void) interrupt 1 using 1
@@ -26,7 +23,6 @@ void  isr(void) interrupt 1 using 1
   if(arr[3]!=9)
     failures++;
   PORTB = 7;
-  B1=1;
 }
 
 void lcd1(const unsigned char *str)
@@ -52,10 +48,6 @@ void lcd1(const unsigned char *str)
 
 void main(void)
 {
-  dummy = 0;
-
   lcd1("str");
-  B1=0;
-  success = failures;
   done();
 }