Applied patch #2762516
[fw/sdcc] / src / regression / inline.c
index 40b3785cab91765fd4e53533793a86a19815b2d1..3198d99f09293d5918f3d61d5302ec3efdf2d22a 100644 (file)
@@ -1,5 +1,5 @@
 #include "gpsim_assert.h"
-#include "pic16f877.h"
+#include "picregs.h"
 
 #pragma preproc_asm -
 
@@ -35,12 +35,21 @@ void main(void)
 {
   TRISA = 0x0f;
 
+#if defined(__pic14)
   _asm
     BSF   STATUS,RP0
     MOVF  TRISA,W
     BCF   STATUS,RP0
     MOVWF _test_tris
   _endasm;
+#else   // !defined(__pic14)
+  _asm
+    BANKSEL _TRISA
+    MOVF    _TRISA,W
+    BANKSEL _test_tris
+    MOVWF   _test_tris
+  _endasm;
+#endif  // !defined(__pic14)
 
   if(test_tris != 0x0f)
     failures++;