* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / src / regression / configword.c
index e28c417ac7c21642d18a1e1aebf07ee1be28e796..39beb9e8729c0b05cab5cfc237a48c2746ba6e14 100644 (file)
@@ -1,9 +1,9 @@
+#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 */
 
@@ -32,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();
 }