* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / device / lib / _decdptr.c
index 00f9326b1850b72cda0bb0cba930abdb5de72f64..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)
 {
-#ifdef SDCC_ds390    
-       _asm
-        orl dps, #0xc0
-        inc dptr
-        anl dps, #0x3f
-        _endasm ;
+       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
+       __asm
+       xch     a,dpl
+       jnz     00001$
+       dec     dph
 00001$:
-               dec     a
-               xch     a,dpl
-       _endasm ;
-#endif    
+       dec     a
+       xch     a,dpl
+       __endasm;
+#endif
 }