Target program
Definition
Thetargetprogram(Pinyin:mùbiāochénɡxù,English:ObjectProgram)isalsocalled"purposeprogram".
Itisacollectionofmachinecodethatcanbedirectlyrunbythecomputerafterthesourceprogramiscompiled,andtheextensionis.objonthecomputerfile----bythelanguageprocessingprogram(assembler,compiler,interpreter)Thesourceprogramisprocessed(assembled,compiled,interpreted)intoanequivalentprogramcomposedofmachinecodethatcanberundirectlybythecomputer.Thisprogramiscalledthetargetprogram.
Function
Thetargetprogramhasafunctioninmanyprogrammingtools.
Thecomputercannotdirectlyacceptandexecutethesourceprogramwritteninahigh-levellanguage.Whenthesourceprogramisinputintothecomputer,itistranslatedintoatargetprograminmachinelanguagethrougha"translationprogram"beforethecomputercanrecognizeandexecuteit.Thiskindof"translation"usuallyhastwoways,namelythecompilationmethodandtheinterpretationmethod.Compilationmethodreferstotheuseofapre-compiledmachinelanguageprogramcalledacompiler,whichisstoredinthecomputerassystemsoftware.Whentheuserinputsthesourceprogramwritteninahigh-levellanguageintothecomputer,thecompilertranslatestheentiresourceprogramintoAtargetprogramequivalenttoitexpressedinmachinelanguage,andthenthecomputerexecutesthetargetprogramtocompletetheoperationtobeprocessedbythesourceprogramandobtaintheresult.Interpretationmodemeansthatafterthesourceprogramentersthecomputer,theinterpreterinterpretstheprogramwhilescanning,inputsentencebysentence,sentencebysentence,andthecomputerexecutessentencebysentencewithoutgeneratingthetargetprogram.Forexample,PASCAL,FORTRAN,COBOLandotherhigh-levellanguagesexecutecompilationmethods;BASIClanguagesarebasedonexecutioninterpretationmethods;andPASCALandClanguagesarehigh-levelprogramminglanguagesthatcanwritecompilers.
Difference
Compiler,interpreter,andassemblerarethreelanguageprocessingprograms.Themaindifferenceis:Assembler(forlow-levelservice)istotranslateasourceprogramwritteninassemblylanguageintoatargetprogramcomposedofmachineinstructionsandotherinformation.Theinterpreter(foradvancedservices)directlyexecutesthesourceprogramortheinternalformofthesourceprogram.Generally,itreadsasourceprogram,translatesasentence,andexecutesasentencewithoutgeneratingobjectcode,suchasaBASICinterpreter.Compiler(forhigh-levelservice)isatargetprogramthattranslatesasourceprogramwritteninahigh-levellanguageintoanequivalentlow-levellanguage.Oneofthedifferencesbetweenacompilerandaninterpreteristhattheformergeneratesobjectcode,whilethelatterdoesnot;inaddition,theexecutionspeedoftheobjectcodegeneratedbytheformerisfasterthanthatoftheinterpreter;thelatterhasgoodhuman-computerinteractionandissuitableforbeginners.use.ProgramswritteninlanguagessuchasCOBOLandFORTRANaregenerallycompiledprogramsconsideringtheexecutionspeed.
Andthebiggestdifferencebetweenthetwois:fortheinterpretationandexecution,thecontroloftheprogramisinthesolverratherthantheuserprogram;fortheeditingandexecution,thecontroloftheruntimeisintheuserprogram.
Relevantconceptdistinction
Program
Inordertomakethecomputerworkaccordingtopeople'swill,itisnecessarytowritethecorrespondingprogramaccordingtotherequirementsoftheproblem.Aprogramisasetofinstructionsthatacomputercanrecognizeandexecute.Eachinstructionmakesthecomputerperformaspecificoperation.
Sourceprogram
Programscanbewritteninhigh-levellanguageorassemblylanguage.Programswritteninhigh-levellanguageorassemblylanguagearecalledsourceprograms.TheextensionofClanguagesourceprogramis".c".Thesourceprogramcannotbeexecuteddirectlyonthecomputer,anda"compiler"needstobeusedtocompilethesourceprogramintobinarycode.
Targetprogram
Thebinarycodeobtainedby"compiler"compilationofthesourceprogramiscalledthetargetprogram.Theextensionofthetargetprogramis".obj".Althoughthetargetcodeisalreadyamachineinstruction,itstillcannotrun,becausethetargetprogramhasnotsolvedthefunctioncallproblem.Itisnecessarytoconnecteachtargetprogramwiththelibraryfunctiontoformacompleteexecutableprogram.
Executableprogram
Thetargetprogramisconnectedwiththelibraryfunctiontoformacompleteprogramthatcanbeexecutedindependentlyundertheoperatingsystemiscalledanexecutableprogram.Theextensionoftheexecutableprogramis".exe"(underdos/windowsenvironment).
Latest: Denver Development Screening Test
Next: Ericsson