hi, i am using the following code in c55x simulator (ccs 1.2) to save data on stack and retrieve it. SP = SP + #100 *SP = #0x33 nop nop T2= *SP The problem is that i am not getting the correct answer.(for this code i got T2=0x30) what can be the problem? sanjay __________________________________________________ |
|
stack
Started by ●March 8, 2001
Reply by ●March 8, 20012001-03-08
Hi Sanjay, You have to set the Compiler Mode bit in ST1 register. use bit(ST1, #ST1_CPL) = #1 and then T2 will be loaded with the correct value. Cheers, Suyog. >From: sanjay r <> >To: , >CC: >Subject: stack >Date: Thu, 8 Mar 2001 06:15:27 -0800 (PST) > >hi, >i am using the following code in c55x simulator (ccs >1.2) to save data on stack and retrieve it. > > SP = SP + #100 > *SP = #0x33 > nop > nop > T2= *SP >The problem is that i am not getting the correct >answer.(for this code i got T2=0x30) >what can be the problem? > >sanjay > > >__________________________________________________ > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com |
Reply by ●March 9, 20012001-03-09
Hi, you can test these code: bset cpl mov xsp,ac0 add #10,ac0 mov ac0,xsp mov #0x0034,*sp(0) nop nop mov xsp,xar0 mov *ar0,t2 >hi, >i am using the following code in c55x simulator (ccs >1.2) to save data on stack and retrieve it. > > SP = SP + #100 > *SP = #0x33 > nop > nop > T2= *SP >The problem is that i am not getting the correct >answer.(for this code i got T2=0x30) >what can be the problem? > >sanjay > > >__________________________________________________ >_____________________________________ >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.egroups.com/group/c55x > >Other Groups: http://www.dsprelated.com > > >">http://docs.yahoo.com/info/terms/ yuxiulan |