On Wed, 8 Sep 2010, pito wrote: > Marcin, thanks! So when I dump: > > then I see at sp0 = 16383 is 0. Why the 111 is written to 16381 > (low) and 16382 (high) and not to 16382 (low) and 16383 (high)? Not > so important, only the alignment of words on odd addresses is > something unusual to see..P.
Why not? That's because that's the way loadtos and savetos macros are constructed. low byte goes to the low address (even). There is no requirement to align words on a word boundary. Which leads me to another point: On Wed, 8 Sep 2010, pito wrote: > Hi, I started with LP asm (amforth 4.0): > \ ----- Test AvrAsm ----- > : loadtos, 16 Y+ ld, 17 Y+ ld, ; \ define macro > : savetos, -Y 17 st, -Y 16 st, ; \ tosl=r22, tosh=r23 Maybe 16, 17 are wrong values for your CPU? --Marcin ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Amforth-devel mailing list Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel