From 13baa73c11b473601d3e21b67e96ec2005ba1a2d Mon Sep 17 00:00:00 2001 From: kvigor Date: Sat, 23 Sep 2000 05:36:04 +0000 Subject: [PATCH] Make _decdptr work properly for either DPTR on DS390 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@401 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- device/lib/_decdptr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/device/lib/_decdptr.c b/device/lib/_decdptr.c index 56acec51..00f9326b 100644 --- a/device/lib/_decdptr.c +++ b/device/lib/_decdptr.c @@ -25,12 +25,20 @@ unsigned char _decdptr () { - _asm +#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 ; + _endasm ; +#endif } -- 2.47.2