資源描述:
《雙語教學(xué)雙語教學(xué)2.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、Ch2???The?Exploitation?of??Single??Chip?MicrocomputerlKeywords:仿真器(emulator)工具軟件(facilityandsoftware)鍵盤(keyboard)電源(powersupply)通信電纜(Communication?Cable)仿真插座(Emulatorsocket)在線仿真功能(On-lineemulatorfunction)?在線仿真器(InCircuitEmulator,簡稱ICE)運行(Execute)、單步運行(Step)、跟蹤運行(Trace)
2、、斷點運行(Breakpoint)lIntroduction:?????Anassemblerisaprogramthattranslatessymboliccode(assemblylanguage)intoexecutableobjectcode.Thisobjectcodecanbeexecutedwitha80C51-compatiblemicrocontroller.Ifyouhaveeverwrittenacomputerprogramdirectlyinmachine-recognizableform,suchasbi
3、naryorhexadecimalcode,youwillappreciatetheadvantagesofprogramminginsymbolicassemblylanguage.?????Assemblylanguageoperationcodes(mnemonics)areeasilyremembered(MOVformoveinstructions,ADDforaddition,andsoon).Youcanalsosymbolicallyexpressaddressesandvaluesreferencedintheop
4、erandfieldofinstructions.Becauseyouassignthesenames,youcanmakethemasmeaningfulasthemnemonicsfortheinstructions.Forexample,ifyourprogrammustmanipulateadateasdata,youcanassignitthesymbolicnameDATE.Ifyourprogramcontainsasetofinstructionsusedasatimingloop(executedrepeatedl
5、yuntilaspecificamountoftimehaspassed),youcannametheinstructiongroupTIMER_LOOP.?????Anassemblyprogramhasthreeparts:1.Machineinstructions-Codethemachinecanexecute.Detaileddiscussionofthemachineinstructionsisinthehardwaremanualsofthe80C51microcontroller.2.Assemblerdirecti
6、ves-Definetheprogramstructureandsymbols,andgeneratenonexecutablecode(data,messages,andsoon.).3.Assemblercontrols-Setassemblymodesanddirectassemblyflow.programhasAnassemblyprogramiswrittenusingasimpletexteditor.Eachassemblerhasspecificsyntaxrulesregardingthestructureoft
7、hesourcefileandthenamesthatareusedtorepresentassemblerdirectives,opcodes,andoperands.Therearealsosyntaxrulesregardingcommentsinthefile?Assemblerdirectivesareusedbytheassemblertocontrolassembleroperation.Forexample,theassemblercanbedirectedtooutputprogramcodeataspecific
8、address(usingtheORGor.orgdirective).Assemblyprocess:1.Createsourcefileusingatexteditorandsaveit(.ASM)2.Executecommand