* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / device / lib / _decdptr.c
index 56acec51b84969534cd36238a58b3b61d62349c8..e08d03790d78d35a22d0778275e7364aa5484102 100644 (file)
    what you give them.   Help stamp out software-hoarding!  
 -------------------------------------------------------------------------*/
 
-unsigned char _decdptr ()
+/* the return value is already in dph/dpl */
+void
+_decdptr (char *gptr)
 {
-       _asm
-               xch     a,dpl
-               jnz     00001$
-               dec     dph
+       gptr; /* hush the compiler */
+
+#ifdef SDCC_ds390
+       __asm
+       orl     dps, #0xc0
+       inc     dptr
+       anl     dps, #0x3f
+       __endasm;
+#else
+       __asm
+       xch     a,dpl
+       jnz     00001$
+       dec     dph
 00001$:
-               dec     a
-               xch     a,dpl
-       _endasm ;       
+       dec     a
+       xch     a,dpl
+       __endasm;
+#endif
 }