TMS320C55xAssemblyLanguageToolsUser’sGuideLiteratureNumber:SPRU280HJuly2004PrintedonRecycledPaperIMPORTANTNOTICETexasInstrumentsIncorporatedanditssubsidiaries(TI)reservetherighttomakecorrections,modifications,enhancements,improvements,andotherchangestoitsproductsandservicesatanytimeandtodiscontinueanyproductorservicewithoutnotice.Customersshouldobtainthelatestrelevantinformationbeforeplacingordersandshouldverifythatsuchinformationiscurrentandcomplete.AllproductsaresoldsubjecttoTI’stermsandconditionsofsalesuppliedatthetimeoforderacknowledgment.TIwarrantsperformanceofitshardwareproductstothespecificationsapplicableatthetimeofsaleinaccordancewithTI’sstandardwarranty.TestingandotherqualitycontroltechniquesareusedtotheextentTIdeemsnecessarytosupportthiswarranty.Exceptwheremandatedbygovernmentrequirements,testingofallparametersofeachproductisnotnecessarilyperformed.TIassumesnoliabilityforapplicationsassistanceorcustomerproductdesign.CustomersareresponsiblefortheirproductsandapplicationsusingTIcomponents.Tominimizetherisksassociatedwithcustomerproductsandapplications,customersshouldprovideadequatedesignandoperatingsafeguards.TIdoesnotwarrantorrepresentthatanylicense,eitherexpressorimplied,isgrantedunderanyTIpatentright,copyright,maskworkright,orotherTIintellectualpropertyrightrelatingtoanycombination,machine,orprocessinwhichTIproductsorservicesareused.InformationpublishedbyTIregardingthird-partyproductsorservicesdoesnotconstitutealicensefromTItousesuchproductsorservicesorawarrantyorendorsementthereof.Useofsuchinformationmayrequirealicensefromathirdpartyunderthepatentsorotherintellectualpropertyofthethirdparty,oralicensefromTIunderthepatentsorotherintellectualpropertyofTI.ReproductionofinformationinTIdatabooksordatasheetsispermissibleonlyifreproductioniswithoutalterationandisaccompaniedbyallassociatedwarranties,conditions,limitations,andnotices.Reproductionofthisinformationwithalterationisanunfairanddeceptivebusinesspractice.TIisnotresponsibleorliableforsuchaltereddocumentation.ResaleofTIproductsorserviceswithstatementsdifferentfromorbeyondtheparametersstatedbyTIforthatproductorservicevoidsallexpressandanyimpliedwarrantiesfortheassociatedTIproductorserviceandisanunfairanddeceptivebusinesspractice.TIisnotresponsibleorliableforanysuchstatements.FollowingareURLswhereyoucanobtaininformationonotherTexasInstrumentsproductsandapplicationsolutions:ProductsApplicationsAmplifiersamplifier.ti.comAudio:TexasInstrumentsPostOfficeBox655303Dallas,Texas75265Copyright2004,TexasInstrumentsIncorporatediiiReadThisFirstPreface AboutThisManualTheTMS320C55xAssemblyLanguageToolsUser’sGuidetellsyouhowtousetheseassemblylanguagetools:AssemblerArchiverLinkerAbsolutelisterCross-referencelisterHexconversionutilityDisassemblerNameutilityHowtoUseThisManualThegoalofthisbookistohelpyoulearnhowtousetheTexasInstrumentsassemblylanguagetoolsspecificallydesignedfortheTMS320C55xDSPs.Thisbookisdividedintofourparts:Introductoryinformationgivesyouanoverviewoftheassemblylanguagedevelopmenttoolsandalsodiscussescommonobjectfileformat(COFF),whichhelpsyoutousetheTMS320C55xtoolsmoreefficiently.ReadChapter2,IntroductiontoCommonObjectFileFormat,beforeusingtheassemblerandlinker.Assemblerdescriptioncontainsdetailedinformationaboutusingthemnemonicandalgebraicassemblers.Thissectionexplainshowtoinvoketheassemblersanddiscussessourcestatementformat,validconstantsandexpressions,assembleroutput,andassemblerdirectives.Italsodescribesmacroelements.Additionalassemblylanguagetoolsdescribesindetaileachofthetoolsprovidedwiththeassemblertohelpyoucreateassemblylanguagesourcefiles.Forexample,Chapter8explainshowtoinvokethelinker,howthelinkeroperates,andhowtouselinkerdirectives.Chapter14explainshowtousethehexconversionutility.NotationalConventionsivReferencematerialprovidessupplementaryinformation.ThissectioncontainstechnicaldataabouttheinternalformatandstructureofCOFFobjectfiles.ItdiscussessymbolicdebuggingdirectivesthattheC/C++compileruses.Finally,itincludeshexconversionutilityexamples,assemblerandlinkererrormessages,andaglossary.NotationalConventionsThisdocumentusesthefollowingconventions:Programlistings,programexamples,andinteractivedisplaysappearinaspecialtypeface.Examplesuseaboldversionofthespecialtypefaceforemphasis;interactivedisplaysuseaboldversionofthespecialtypefacetodistinguishcommandsthatyouenterfromitemsthatthesystemdisplays(suchasprompts,commandoutput,errormessages,etc.).Hereisasampleprogramlisting:200012fx.byte473000232z.byte5040003.textInsyntaxdescriptions,theinstruction,command,ordirective