X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Flib%2F_decdptr.c;h=e08d03790d78d35a22d0778275e7364aa5484102;hb=ac2a3bee4ffe024a919c1b360cc888679a45f326;hp=00f9326b1850b72cda0bb0cba930abdb5de72f64;hpb=13baa73c11b473601d3e21b67e96ec2005ba1a2d;p=fw%2Fsdcc diff --git a/device/lib/_decdptr.c b/device/lib/_decdptr.c index 00f9326b..e08d0379 100644 --- a/device/lib/_decdptr.c +++ b/device/lib/_decdptr.c @@ -23,22 +23,26 @@ 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 }