]> git.gag.com Git - fw/sdcc/commitdiff
dattalo - Added bank1.c and string1.c to test banking and character strings in the...
authorsdattalo <sdattalo@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 15 Mar 2002 13:23:40 +0000 (13:23 +0000)
committersdattalo <sdattalo@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 15 Mar 2002 13:23:40 +0000 (13:23 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1996 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/regression/bank1.c [new file with mode: 0644]
src/regression/string1.c [new file with mode: 0644]

diff --git a/src/regression/bank1.c b/src/regression/bank1.c
new file mode 100644 (file)
index 0000000..778c1e7
--- /dev/null
@@ -0,0 +1,42 @@
+unsigned char success=0;
+unsigned char failures=0;
+unsigned char dummy=0;
+unsigned bit bit1;
+
+typedef unsigned char byte;
+
+byte d2;
+
+unsigned char uchar0 = 0xa5;
+
+data at 0xa0 unsigned char  uc_bank1_temp=0x42;
+data at 0xa2 unsigned int  ui_bank1_temp=0;
+
+void done()
+{
+
+  dummy++;
+
+}
+
+void main(void)
+{
+  dummy = 0;
+  ui_bank1_temp = 0;
+  uc_bank1_temp = 0;
+
+  bit1 = 0;
+
+  uchar0 = (uchar0<<4) | (uchar0>>4);
+
+  if(uchar0 > 7) {
+    dummy = 8;
+    uc_bank1_temp = failures;
+  }
+
+  if(uc_bank1_temp > 3)
+    bit1 = 1;
+
+  success = failures;
+  done();
+}
diff --git a/src/regression/string1.c b/src/regression/string1.c
new file mode 100644 (file)
index 0000000..27f9c7a
--- /dev/null
@@ -0,0 +1,47 @@
+unsigned char success=0;
+unsigned char failures=0;
+unsigned char dummy=0;
+//unsigned bit bit1;
+
+typedef unsigned char byte;
+data at 0x06 unsigned char  PORTB;
+
+byte uchar0;
+const byte arr[] = { 1,2,8,9,0 };
+
+bit at 0x30 B1;
+
+void done()
+{
+
+  dummy++;
+
+}
+
+void  isr(void) interrupt 1 using 1
+{
+
+  if(arr[3]!=9)
+    failures++;
+  PORTB = 7;
+  B1=1;
+}
+
+void lcd1(const unsigned char *str)
+{
+  if(str && str[2] != 'r')
+    failures++;
+
+  if(arr[3]!=9)
+    failures++;
+}
+
+void main(void)
+{
+  dummy = 0;
+
+  lcd1("str");
+  B1=0;
+  success = failures;
+  done();
+}