To all gurus, I am working on a C5402 and using a Code Composer. My problem is regarding the usage of DST in a '.include' ASM file. I have a main asm file(say main.asm)and a called asm file(call.asm). I call this call.asm file using a '.include' directive like this. main.asm ---------- .mmregs - - - - .include "call.asm" - - - .end Now my main problem is when I use the DST command in the main program it works correctly placing two words in consecutive memory locations, but when i use the same statement in the call.asm file it is filling the first word in the pointed location and the next word in the PREVIOUS location !!! I have used the following statement in both cases : DST A,*AR3 ; AR3 points to 2 words in memory. Does '.include' just substitute the code in the main file or does more...? What could be the problem? Thank You All, regards, Sheetal Kiran. __________________________________________________ |
|
DST problem
Started by ●June 25, 2001
Reply by ●June 25, 20012001-06-25
On Mon, 25 Jun 2001 12:05:22 -0700 (PDT), you wrote: >Now my main problem is when I use the DST command in >the main program it works correctly placing two words >in consecutive memory locations, but when i use the >same statement in the call.asm file it is filling the >first word in the pointed location and the next word >in the PREVIOUS location !!! I have used the following >statement in both cases : Your destination address needs to be an even address for double operations. The c5xxx XORs the LSBit for the 2nd word of the store, so if you're pointing to an odd location you will see it store in the location pointed to and the previous location. Just one more of the little quirks of this DSP (actually this isn't that uncommon, I think the 68000 series works in a similar way). Brian ----------------- Brian C. Lane (KC7TYU) Programmer www.shinemicro.com RF, DSP & Microcontroller Design |
Reply by ●June 26, 20012001-06-26
What you describe has nothing to do with the ".include"
statement, the pointer in your call.asm is pointing to a ODD address: See CPU and Peripherals Manual / Section Data Types(Page 5-28, Chapter5-8): "With 32-bit accesses, the first word accessed is treated as the most-significant word (MSW), while the second word accessed is the least-significant word (LSW). If the first word accessed is at an even address, then the second word is at the next (higher) address. If the first word accessed is at an odd address, then the second word is at the previous (lower) address. Figure 5-17 shows this effect." Best regards Thomas -----Ursprungliche Nachricht----- Von: SheetalKiran Bezawada [mailto:] Gesendet: Montag, 25. Juni 2001 21:05 An: Betreff: [c54x] DST problem To all gurus, I am working on a C5402 and using a Code Composer. My problem is regarding the usage of DST in a '.include' ASM file. I have a main asm file(say main.asm)and a called asm file(call.asm). I call this call.asm file using a '.include' directive like this. main.asm ---------- .mmregs - - - - .include "call.asm" - - - .end Now my main problem is when I use the DST command in the main program it works correctly placing two words in consecutive memory locations, but when i use the same statement in the call.asm file it is filling the first word in the pointed location and the next word in the PREVIOUS location !!! I have used the following statement in both cases : DST A,*AR3 ; AR3 points to 2 words in memory. Does '.include' just substitute the code in the main file or does more...? What could be the problem? Thank You All, regards, Sheetal Kiran. __________________________________________________ _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://www.yahoogroups.com/group/c54x Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/ |
Reply by ●June 26, 20012001-06-26
Thanks for replying to all. Got the same thing just today! Merci! Franis Caron, ing. M.Sc. Concepteur, circuit ectronique Systes de SuritPublique Positron Inc. 5101 Buchan, Montrl, Quec, H4P 2R9 (514) - 345 - 2270 + 2862 (514) - 815 - 1618 (Fido) > -----Original Message----- > From: T.Hupp [SMTP:] > Sent: Tuesday, June 26, 2001 2:19 AM > To: 'SheetalKiran Bezawada'; > Subject: AW: [c54x] DST problem > > What you describe has nothing to do with the ".include" statement, > the pointer in your call.asm is pointing to a ODD address: > See CPU and Peripherals Manual / Section Data Types(Page 5-28, > Chapter5-8): > > "With 32-bit accesses, the first word accessed is treated as the > most-significant > word (MSW), while the second word accessed is the least-significant word > (LSW). If the first word accessed is at an even address, then the second > word > is at the next (higher) address. If the first word accessed is at an odd > address, > then the second word is at the previous (lower) address. Figure 5-17 shows > this effect." > > Best regards > Thomas > > -----Ursprungliche Nachricht----- > Von: SheetalKiran Bezawada [mailto:] > Gesendet: Montag, 25. Juni 2001 21:05 > An: > Betreff: [c54x] DST problem > To all gurus, > I am working on a C5402 and using a Code > Composer. My problem is regarding the usage of DST > in a '.include' ASM file. > I have a main asm file(say main.asm)and a called > asm file(call.asm). I call this call.asm file using a > '.include' directive like this. > > main.asm > ---------- > .mmregs > - > - > - > - > .include "call.asm" > - > - > - > .end > > Now my main problem is when I use the DST command in > the main program it works correctly placing two words > in consecutive memory locations, but when i use the > same statement in the call.asm file it is filling the > first word in the pointed location and the next word > in the PREVIOUS location !!! I have used the following > statement in both cases : > > DST A,*AR3 ; AR3 points to 2 words in memory. > > Does '.include' just substitute the code in the main > file or does more...? What could be the problem? > > Thank You All, > regards, > Sheetal Kiran. > __________________________________________________ > _____________________________________ > Note: If you do a simple "reply" with your email client, only the author > of > this message will receive your answer. You need to do a "reply all" if > you > want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: Send an email to > > To Post: Send an email to > > To Leave: Send an email to > > Archives: http://www.yahoogroups.com/group/c54x > > Other Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/ > > _____________________________________ > Note: If you do a simple "reply" with your email client, only the author > of this message will receive your answer. You need to do a "reply all" if > you want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: Send an email to > > To Post: Send an email to > > To Leave: Send an email to > > Archives: http://www.yahoogroups.com/group/c54x > > Other Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/ > |
Reply by ●June 27, 20012001-06-27