Re: [Sdcc-user] full assembly help

2014-09-26 Thread remi
Hello I tested your suggestion, then replaced the ADDW with INCW ... still not working this time, the carracter it self is incremented as if the syntax ldw X,[_charptr] doesnt return a pointer ... If you guys think this is not a bug, I can try forum@st and try to port their answe

Re: [Sdcc-user] full assembly help

2014-09-26 Thread Bin Shi
the _pointer is a 16-bit variable, and stm8 is big endian. you might need ld y, _pointer addw y, #1 ld _pointer, y to replace inc _pointer r...@remi.lu编写: > > >hello > >with this code i get printed : "t333" > >you think the X register gets polluted by the delay fonction ? > >Regard

Re: [Sdcc-user] full assembly help

2014-09-26 Thread remi
Sorry i forgot to add , I had to remove the .w , to make it assemble otherwise i get ASlink >> -f main.lk ASlink >> -muwx ASlink >> -i main.ihx ASlink >> -Y ASlink >> -b HOME = 0x8000 ASlink >> -b DATA = 0x0001 ASlink >> -k /usr/local/bin/../share/sdcc/lib/stm8 ASlink >> -k /usr/local/share/

Re: [Sdcc-user] full assembly help

2014-09-26 Thread remi
hello with this code i get printed : "t333" you think the X register gets polluted by the delay fonction ? Regards Le 26.09.2014 04:11, Ben Shi a écrit : > I am not sure how your function _lcdwritechar works, but I guess you might > need such kind of code, > > .area DATA >

Re: [Sdcc-user] Sane way to put C functions into a different section

2014-09-26 Thread Alan Cox
On Thu, 25 Sep 2014 23:29:03 +0200 Philipp Klaus Krause wrote: > On 25.09.2014 21:13, Alan Cox wrote: > > Is there a "proper" way to put some functions in a file into a different > > section for linking > > > > Right now I'm doing > > > > /* Force the rest of this code into common */ > > > > v