* as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors
[fw/sdcc] / src / regression / configword.c
index 9710851e8a9f474c5d9661f020a5c920eb51fa55..39beb9e8729c0b05cab5cfc237a48c2746ba6e14 100644 (file)
@@ -1,11 +1,9 @@
-#define __16F873
-#include "p16f873.h"
+#include "gpsim_assert.h"
 /* configword.c - illustrates how the configuration word can
  * be assigned */
 
-unsigned char success=0;
 unsigned char failures=0;
-unsigned char dummy=0;
+unsigned char dummy;
 
 /* copied from 16f877.inc file supplied with gpasm */
 
@@ -34,22 +32,22 @@ unsigned char dummy=0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;
+//word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;
 
 
 /* to do -- write a test that puts the PIC to sleep,
  * and verify that the WDT wakes it up */
 
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
+
 void main(void)
 {
   dummy = 0;
 
-  success = failures;
   done();
 }