PIC Port - fixed pointer/array accesses. Stream line comparisons. Started function...
[fw/sdcc] / src / regression / compare10.c
index f8f045c35f68d1f291e9f722da33699da4345662..6582aad66d9f2f1cebad5e15f7338e1e6487bba3 100644 (file)
@@ -21,6 +21,40 @@ signed char char1 = 0;
 char long0 = 0;
 char long1 = 0;
 
+/* copied from 16f877.inc file supplied with gpasm */
+
+#define _CP_ALL          0x0FCF
+#define _CP_HALF         0x1FDF
+#define _CP_UPPER_256    0x2FEF
+#define _CP_OFF          0x3FFF
+#define _DEBUG_ON        0x37FF
+#define _DEBUG_OFF       0x3FFF
+#define _WRT_ENABLE_ON   0x3FFF
+#define _WRT_ENABLE_OFF  0x3DFF
+#define _CPD_ON          0x3EFF
+#define _CPD_OFF         0x3FFF
+#define _LVP_ON          0x3FFF
+#define _LVP_OFF         0x3F7F
+#define _BODEN_ON        0x3FFF
+#define _BODEN_OFF       0x3FBF
+#define _PWRTE_OFF       0x3FFF
+#define _PWRTE_ON        0x3FF7
+#define _WDT_ON          0x3FFF
+#define _WDT_OFF         0x3FFB
+#define _LP_OSC          0x3FFC
+#define _XT_OSC          0x3FFD
+#define _HS_OSC          0x3FFE
+#define _RC_OSC          0x3FFF
+
+/* *** NOTE ***  This particular test takes quite a while to run 
+ * ~ 10,000,000 instruction cycles. (2.5 seconds on a 20Mhz PIC).
+ * The WDT will reset the CPU if it's enabled. So disable it...
+*/
+
+typedef unsigned int word;
+
+word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;
+
 void
 done ()
 {