首页 professional assembly language.pdf

professional assembly language.pdf

professional assembly language.…

上传者: 我是谁是我 2012-05-14 评分1 评论0 下载47 收藏0 阅读量397 暂无简介 简介 举报

简介:本文档为《professional assembly languagepdf》,可适用于高等教育领域,主题内容包含ProfessionalAssemblyLanguageRichardBlumffirsqxd:AMPageiiiffirsqxd:AMPageii符等。

ProfessionalAssemblyLanguageRichardBlumffirsqxd:AMPageiiiffirsqxd:AMPageiiProfessionalAssemblyLanguageffirsqxd:AMPageiffirsqxd:AMPageiiProfessionalAssemblyLanguageRichardBlumffirsqxd:AMPageiiiProfessionalAssemblyLanguagePublishedbyWileyPublishing,IncCrosspointBoulevardIndianapolis,INwwwwileycomCopyrightbyWileyPublishing,Inc,Indianapolis,IndianaAllrightsreservedPublishedsimultaneouslyinCanadaISBN:ManufacturedintheUnitedStatesofAmericaMASWQRQVINNopartofthispublicationmaybereproduced,storedinaretrievalsystemortransmittedinanyformorbyanymeans,electronic,mechanical,photocopying,recording,scanningorotherwise,exceptaspermittedunderSectionsoroftheUnitedStatesCopyrightAct,withouteitherthepriorwrittenpermissionofthePublisher,orauthorizationthroughpaymentoftheappropriatepercopyfeetotheCopyrightClearanceCenter,RosewoodDrive,Danvers,MA,(),fax()RequeststothePublisherforpermissionshouldbeaddressedtotheLegalDepartment,WileyPublishing,Inc,CrosspointBlvd,Indianapolis,IN,(),fax(),email:brandreviewwileycomLIMITOFLIABILITYDISCLAIMEROFWARRANTY:THEPUBLISHERANDTHEAUTHORMAKENOREPRESENTATIONSORWARRANTIESWITHRESPECTTOTHEACCURACYORCOMPLETENESSOFTHECONTENTSOFTHISWORKANDSPECIFICALLYDISCLAIMALLWARRANTIES,INCLUDINGWITHOUTLIMITATIONWARRANTIESOFFITNESSFORAPARTICULARPURPOSENOWARRANTYMAYBECREATEDOREXTENDEDBYSALESORPROMOTIONALMATERIALSTHEADVICEANDSTRATEGIESCONTAINEDHEREINMAYNOTBESUITABLEFOREVERYSITUATIONTHISWORKISSOLDWITHTHEUNDERSTANDINGTHATTHEPUBLISHERISNOTENGAGEDINRENDERINGLEGAL,ACCOUNTING,OROTHERPROFESSIONALSERVICESIFPROFESSIONALASSISTANCEISREQUIRED,THESERVICESOFACOMPETENTPROFESSIONALPERSONSHOULDBESOUGHTNEITHERTHEPUBLISHERNORTHEAUTHORSHALLBELIABLEFORDAMAGESARISINGHEREFROMTHEFACTTHATANORGANIZATIONORWEBSITEISREFERREDTOINTHISWORKASACITATIONANDORAPOTENTIALSOURCEOFFURTHERINFORMATIONDOESNOTMEANTHATTHEAUTHORORTHEPUBLISHERENDORSESTHEINFORMATIONTHEORGANIZATIONORWEBSITEMAYPROVIDEORRECOMMENDATIONSITMAYMAKEFURTHER,READERSSHOULDBEAWARETHATINTERNETWEBSITESLISTEDINTHISWORKMAYHAVECHANGEDORDISAPPEAREDBETWEENWHENTHISWORKWASWRITTENANDWHENITISREADForgeneralinformationonourotherproductsandservicesortoobtaintechnicalsupport,pleasecontactourCustomerCareDepartmentwithintheUSat(),outsidetheUSat()orfax()WileyalsopublishesitsbooksinavarietyofelectronicformatsSomecontentthatappearsinprintmaynotbeavailableinelectronicbooksBlum,RichardProfessionalassemblylanguageRichardBlumpcmIncludesindexISBN(paperwebsite)Assemblylanguage(Computerprogramlanguage)TitleQAAB'dcTrademarks:Wiley,theWileyPublishinglogo,Wrox,theWroxlogo,ProgrammertoProgrammerandrelatedtradedressaretrademarksorregisteredtrademarksofJohnWileySons,Incandoritsaffiliates,intheUnitedStatesandothercountries,andmaynotbeusedwithoutwrittenpermissionAllothertrademarksarethepropertyoftheirrespectiveownersWileyPublishing,Inc,isnotassociatedwithanyproductorvendormentionedinthisbookffirsqxd:AMPageivAbouttheAuthorRichardBlumhasworkedforalargeUSgovernmentorganizationformorethanyearsDuringthattime,hehashadtheopportunitytoprogramutilitiesinvariousprogramminglanguages:C,C,Java,andMicrosoftVBNETandC#Withthisexperience,RichhasoftenfoundthebenefitofreviewingassemblylanguagecodegeneratedbycompilersandutilizingassemblylanguageroutinestospeeduphigherlevellanguageprogramsRichhasabachelorofsciencedegreeinelectricalengineeringfromPurdueUniversity,whereheworkedonmanyassemblylanguageprojects(Ofcourse,thiswasbackintheeightbitprocessordays)HealsohasamasterofsciencedegreeinmanagementfromPurdueUniversity,specializinginManagementInformationSystemsWhenRichisnotbeingacomputernerd,heiseitherplayingelectricbassforthechurchworshipbandorspendingtimewithhiswife,Barbara,andtwodaughters,KatieJaneandJessicaffirsqxd:AMPagevffirsqxd:AMPageviCreditsExecutiveEditorChrisWebbDevelopmentEditorAdaobiObiTultonProductionEditorWilliamABartonTechnicalEditorPaulCarterCopyEditorLuannRouffEditorialManagerKathrynMalmBourgoineVicePresidentExecutiveGroupPublisherRichardSwadleyVicePresidentandPublisherJosephBWikertProjectCoordinatorErinSmithGraphicsandProductionSpecialistsJonelleBurnsAmandaCarterCarrieAFosterLaurenGoddardDennyHagerJoyceHaugheyQualityControlTechniciansDavidFaustSusanMoritzCarlWilliamPierceMediaDevelopmentSpecialistAngieDennyProofreadingTECHBOOKSProductionServicesIndexingRichardTEvansffirsqxd:AMPageviiffirsqxd:AMPageviiiThisbookisdedicatedtomywife,Barbara,andmydaughters,KatieJaneandJessica“TrustintheLordwithallyourheartandleannotonyourownunderstandinginallwaysacknowledgehim,andhewillmakeyourpathsstraight”Pr:(NIV)ffirsqxd:AMPageixffirsqxd:AMPagexAcknowledgmentsFirst,allhonor,glory,andpraisegotoGod,whothroughHisSonmakesallthingspossibleandgivesusthegiftofeternallifeManythanksgotothegreatteamofpeopleatJohnWileySonsPublishingThankstoChrisWebb,theacquisitionseditor,forofferingmetheopportunitytowritethisbookIamforeverindebtedtoAdaobiObiTulton,thedevelopmenteditor,forherworkinmakingthisbookpresentableandheroverallguidancethroughthebookwritingprocessAlso,manythanksgotoPaulCarter,thetechnicaleditorofthebookPaul’scommentsthroughoutthebookwereinvaluableinpresentingthetopicinthebestwayandforpointingoutmygoofsandblundersIwouldalsoliketothankCaroleMcClendonatWatersideProductions,Inc,forarrangingthisopportunityforme,andforhelpingoutinmywritingcareerFinally,Iwouldliketothankmyparents,MikeandJoyceBlum,fortheirdedicationandsupportwhileraisingme,andtomywife,Barbara,anddaughters,KatieJaneandJessica,fortheirlove,patience,andunderstanding,especiallywhileIwaswritingthisbookffirsqxd:AMPagexiffirsqxd:AMPagexiiContentsAcknowledgmentsxiContentsxiiiIntroductionxxiiiChapter:WhatIsAssemblyLanguageProcessorInstructionsInstructioncodehandlingInstructioncodeformatHighLevelLanguagesTypesofhighlevellanguagesHighlevellanguagefeaturesAssemblyLanguageOpcodemnemonicsDefiningdataDirectivesSummaryChapter:TheIAPlatformCorePartsofanIAProcessorControlunitExecutionunitRegistersFlagsAdvancedIAFeaturesThexfloatingpointunitMultimediaextensions(MMX)StreamingSIMDextensions(SSE)HyperthreadingTheIAProcessorFamilyIntelprocessorsNonIntelprocessorsSummaryftocqxd:AMPagexiiixivContentsChapter:TheToolsoftheTradeTheDevelopmentToolsTheAssemblerTheLinkerTheDebuggerTheCompilerTheobjectcodedisassemblerTheProfilerTheGNUAssemblerInstallingtheassemblerUsingtheassemblerAwordaboutopcodesyntaxTheGNULinkerTheGNUCompilerDownloadingandinstallinggccUsinggccTheGNUDebuggerProgramDownloadingandinstallinggdbUsinggdbTheKDEDebuggerDownloadingandinstallingkdbgUsingkdbgTheGNUObjdumpProgramUsingobjdumpAnobjdumpexampleTheGNUProfilerProgramUsingtheprofilerAprofileexampleACompleteAssemblyDevelopmentSystemThebasicsofLinuxDownloadingandrunningMEPISYournewdevelopmentsystemSummaryChapter:ASampleAssemblyLanguageProgramThePartsofaProgramDefiningsectionsDefiningthestartingpointCreatingaSimpleProgramTheCPUIDinstructionThesampleprogramftocqxd:AMPagexivxvContentsBuildingtheexecutableRunningtheexecutableAssemblingusingacompilerDebuggingtheProgramUsinggdbUsingCLibraryFunctionsinAssemblyUsingprintfLinkingwithClibraryfunctionsSummaryChapter:MovingDataDefiningDataElementsThedatasectionDefiningstaticsymbolsThebsssectionMovingDataElementsTheMOVinstructionformatsMovingimmediatedatatoregistersandmemoryMovingdatabetweenregistersMovingdatabetweenmemoryandregistersConditionalMoveInstructionsTheCMOVinstructionsUsingCMOVinstructionsExchangingDataThedataexchangeinstructionsUsingthedataexchangeinstructionTheStackHowthestackworksPUSHingandPOPingdataPUSHingandPOPingalltheregistersManuallyusingtheESPandEBPregistersOptimizingMemoryAccessSummaryChapter:ControllingExecutionFlowTheInstructionPointerUnconditionalBranchesJumpsCallsInterruptsftocqxd:AMPagexvxviContentsConditionalBranchesConditionaljumpinstructionsThecompareinstructionExamplesofusingtheflagbitsLoopsTheloopinstructionsAloopexamplePreventingLOOPcatastrophesDuplicatingHighLevelConditionalBranchesifstatementsforloopsOptimizingBranchInstructionsBranchpredictionOptimizingtipsSummaryChapter:UsingNumbersNumericDataTypesIntegersStandardintegersizesUnsignedintegersSignedintegersUsingsignedintegersExtendingintegersDefiningintegersinGASSIMDIntegersMMXintegersMovingMMXintegersSSEintegersMovingSSEintegersBinaryCodedDecimalWhatisBCDFPUBCDvaluesMovingBCDvaluesFloatingPointNumbersWhatarefloatingpointnumbersStandardfloatingpointdatatypesIAfloatingpointvaluesDefiningfloatingpointvaluesinGASMovingfloatingpointvaluesUsingpresetfloatingpointvaluesftocqxd:AMPagexvixviiContentsSSEfloatingpointdatatypesMovingSSEfloatingpointvaluesConversionsConversioninstructionsAconversionexampleSummaryChapter:BasicMathFunctionsIntegerArithmeticAdditionSubtractionIncrementinganddecrementingMultiplicationDivisionShiftInstructionsMultiplybyshiftingDividingbyshiftingRotatingbitsDecimalArithmeticUnpackedBCDarithmeticPackedBCDarithmeticLogicalOperationsBooleanlogicBittestingSummaryChapter:AdvancedMathFunctionsTheFPUEnvironmentTheFPUregisterstackTheFPUstatus,control,andtagregistersUsingtheFPUstackBasicFloatingPointMathAdvancedFloatingPointMathFloatingpointfunctionsPartialremaindersTrigonometricfunctionsLogarithmicfunctionsFloatingPointConditionalBranchesTheFCOMinstructionfamilyTheFCOMIinstructionfamilyTheFCMOVinstructionfamilyftocqxd:AMPagexviixviiiContentsSavingandRestoringtheFPUStateSavingandrestoringtheFPUenvironmentSavingandrestoringtheFPUstateWaitingversusNonwaitingInstructionsOptimizingFloatingPointCalculationsSummaryChapter:WorkingwithStringsMovingStringsTheMOVSinstructionTheREPprefixOtherREPinstructionsStoringandLoadingStringsTheLODSinstructionTheSTOSinstructionBuildingyourownstringfunctionsComparingStringsTheCMPSinstructionUsingREPwithCMPSStringinequalityScanningStringsTheSCASinstructionScanningformultiplecharactersFindingastringlengthSummaryChapter:UsingFunctionsDefiningFunctionsAssemblyFunctionsWritingfunctionsAccessingfunctionsFunctionplacementUsingregistersUsingglobaldataPassingDataValuesinCStyleRevisitingthestackPassingfunctionparametersonthestackFunctionprologueandepilogueDefininglocalfunctiondataftocqxd:AMPagexviiixixContentsCleaningoutthestackAnexampleWatchingthestackinactionUsingSeparateFunctionFilesCreatingaseparatefunctionfileCreatingtheexecutablefileDebuggingseparatefunctionfilesUsingCommandLineParametersTheanatomyofaprogramAnalyzingthestackViewingcommandlineparametersViewingenvironmentvariablesAnexampleusingcommandlineparametersSummaryChapter:UsingLinuxSystemCallsTheLinuxKernelPartsofthekernelLinuxkernelversionSystemCallsFindingsystemcallsFindingsystemcalldefinitionsCommonsystemcallsUsingSystemCallsThesystemcallformatAdvancedSystemCallReturnValuesThesysinfosystemcallUsingthereturnstructureViewingtheresultsTracingSystemCallsThestraceprogramAdvancedstraceparametersWatchingprogramsystemcallsAttachingtoarunningprogramSystemCallsversusCLibrariesTheClibrariesTracingCfunctionsComparingsystemcallsandClibrariesSummaryftocqxd:AMPagexixxxContentsChapter:UsingInlineAssemblyWhatIsInlineAssemblyBasicInlineAssemblyCodeTheasmformatUsingglobalCvariablesUsingthevolatilemodifierUsinganalternatekeywordExtendedASMExtendedASMformatSpecifyinginputandoutputvaluesUsingregistersUsingplaceholdersReferencingplaceholdersAlternativeplaceholdersChangedregisterslistUsingmemorylocationsUsingfloatingpointvaluesHandlingjumpsUsingInlineAssemblyCodeWhataremacrosCmacrofunctionsCreatinginlineassemblymacrofunctionsSummaryChapter:CallingAssemblyLibrariesCreatingAssemblyFunctionsCompilingtheCandAssemblyProgramsCompilingassemblysourcecodefilesUsingassemblyobjectcodefilesTheexecutablefileUsingAssemblyFunctionsinCProgramsUsingintegerreturnvaluesUsingstringreturnvaluesUsingfloatingpointreturnvaluesUsingmultipleinputvaluesUsingmixeddatatypeinputvaluesUsingAssemblyFunctionsinCProgramsCreatingStaticLibrariesWhatisastaticlibraryThearcommandftocqxd:AMPagexxxxiContentsCreatingastaticlibraryfileCompilingwithstaticlibrariesUsingSharedLibrariesWhataresharedlibrariesCreatingasharedlibraryCompilingwithasharedlibraryRunningprogramsthatusesharedlibrariesDebuggingAssemblyFunctionsDebuggingCprogramsDebuggingassemblyfunctionsSummaryChapter:OptimizingRoutinesOptimizedCompilerCodeCompileroptimizationlevelCompileroptimizationlevelCompileroptimizationlevelCreatingOptimizedCodeGeneratingtheassemblylanguagecodeViewingoptimizedcodeRecompilingtheoptimizedcodeOptimizationTricksOptimizingcalculationsOptimizingvariablesOptimizingloopsOptimizingconditionalbranchesCommonsubexpressioneliminationSummaryChapter:UsingFilesTheFileHandlingSequenceOpeningandClosingFilesAccesstypesUNIXpermissionsOpenfilecodeOpenerrorreturncodesClosingfilesWritingtoFilesAsimplewriteexampleChangingfileaccessmodesHandlingfileerrorsftocqxd:AMPagexxixxiiContentsReadingFilesAsimplereadexampleAmorecomplicatedreadexampleReading,Processing,andWritingDataMemoryMappedFilesWhatarememorymappedfilesThemmapsystemcallmmapassemblylanguageformatAnmmapexampleSummaryChapter:UsingAdvancedIAFeaturesABriefReviewofSIMDMMXSSESSEDetectingSupportedSIMDOperationsDetectingsupportSIMDfeatureprogramUsingMMXInstructionsLoadingandretrievingpackedintegervaluesPerformingMMXoperationsUsingSSEInstructionsMovingdataProcessingdataUsingSSEInstructionsMovingdataProcessingdataSSEInstructionsSummaryIndexftocqxd:AMPagexxiiIntroductionAssemblylanguageisoneofthemostmisunderstoodprogramminglanguagesinuseWhenthetermassemblylanguageisused,itofteninvokestheideaoflowlevelbitshufflingandporingoverthousandpageinstructionmanualslookingfortheproperinstructionformatWiththeproliferationoffancyhighlevellanguagedevelopmenttools,itisnotuncommontoseethephrase“assemblylanguageprogrammingisdead”popupamongvariousprogrammingnewsgroupsHowever,assemblylanguageprogrammingisfarfromdeadEveryhighlevellanguageprogrammustbecompiledintoassemblylanguagebeforeitcanbelinkedintoanexecutableprogramForthehighlevellanguageprogrammer,understandinghowthecompilergeneratestheassemblylanguagecodecanbeagreatbenefit,bothfordirectlywritingroutinesinassemblylanguageandforunderstandinghowthehighlevellanguageroutinesareconvertedtoassemblylanguagebythecompilerWhoThisBookIsForTheprimarypurposeofthisbookistoteachhighlevellanguageprogrammershowtheirprogramsareconvertedtoassemblylanguage,andhowthegeneratedassemblylanguagecodecanbetweakedThatsaid,themainaudienceforthisbookisprogrammersalreadyfamiliarwithahighlevellanguage,suchasC,C,orevenJavaThisbookdoesnotspendmuchtimeteachingbasicprogrammingprinciplesItassumesthatyouarealreadyfamiliarwiththebasicsofcomputerprogramming,andareinterestedinlearningassemblylanguagetounderstandwhatishappeningunderneaththehoodHowever,ifyouarenewtoprogrammingandarelookingatassemblylanguageprogrammingasaplacetostart,thisbookdoesnottotallyignoreyouItispossibletofollowalonginthechaptersfromthestarttothefinishandobtainabasicknowledgeofhowassemblylanguageprogramming(andprogrammingingeneral)worksEachofthetopicspresentedincludesexamplecodethatdemonstrateshowtheassemblylanguageinstructionsworkIfyouarecompletelynewtoprogramming,Ire

职业精品

分销渠道选择.ppt

辞职申请书(优质范文).doc

公司年检申请书doc.doc

厂家和经销商代理合同.doc

用户评论

0/200
    暂无评论
上传我的资料

精彩专题

相关资料换一换

资料评价:

/ 577
所需积分:1 立即下载

意见
反馈

返回
顶部