> On 08.07.2016 11:06, Maarten Brock wrote: >> Hello, >> >> SiLabs has no dual DPTR processors. >> >> The EMI0CN is the equivalent of P2 on a traditional 8051 for MOVX @Ri >> instructions. It is used by SDCC for pdata access. Mucking about with it >> in your code can lead to 'interesting' problems, similar to writing >> DPL/DPH in your code. Not something a 'real' programmer would do. >> >> Maarten >> > > Shouldn't writing dpl/dph in a hand-written asm function be save, as > SDCC would save/restore them if they need to be preserevd across a > function call? > > Philipp
You're right, if it's a function call it's ok. But doing that in inline asm is asking for it. Along the same lines, if you save/restore EMI0CN in a critical block around your use, it should be fine as well. Maarten ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user