projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make _decdptr work properly for either DPTR on DS390
[fw/sdcc]
/
device
/
lib
/
_decdptr.c
diff --git
a/device/lib/_decdptr.c
b/device/lib/_decdptr.c
index 56acec51b84969534cd36238a58b3b61d62349c8..00f9326b1850b72cda0bb0cba930abdb5de72f64 100644
(file)
--- 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
}