[Icc-mot] ICCV7 for CPU12, some questions
jpdi at free.fr
jpdi at free.fr
Wed Mar 28 10:05:36 PST 2007
Thanks, Edward, for a so quick response !!!
I'll try to modify my assembly files tomorrow.
Joel
-----Message d'origine-----
De : icc-mot-bounces at imagecraft.com [mailto:icc-mot-bounces at imagecraft.com] De la part de Edward Karpicz
Envoyé : mercredi 28 mars 2007 13:25
À : Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.
Objet : Re: [Icc-mot] ICCV7 for CPU12, some questions
Yes, it's possible to use V6 and paged functions to compile HCS12X code. You
should use custom target. XDx512 Expanded Memory settings should be set to
0x380000.0x3FFFFF.
Right, HCS12X don't have INITRM, INITEE, INITRG registers. RAM can't be
remapped from its default locations.
Regarding your routine with inline asm. If you remove pulls and psh'es it
will start to work again. Major step from V6 to V7 is that X register is no
more freezed to play frame pointers role. Since SP relative addressing mode
is available, it's the best to use SP as frame pointer and use X for
temporaries, maths, etc. It means more freedom for new optimizations and for
user since user doesn't have to preserve X any more.
Since SP is frame pointer, all locals are relative to SP and you should be
careful when pushing and pulling something to stack. Inline asms % operator
doesn't track if you do adjustments to SP. Here's one ways to fix your code:
"pshx \n" // sauve X
"pshy \n" // sauve Y
"ldy 4+%ptr \n" // Y pointe sur destination
"ldx 4+%nb_octets \n" // X contient nbre octets
4+ is how much did SP change after pshx and pshy.
Edward
More information about the Icc-mot
mailing list