Sunteți pe pagina 1din 17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Assemblylanguage
FromWikipedia,thefreeencyclopedia

Seetheterminologysectionbelowforinformationregardinginconsistentuseofthetermsassemblyand assembler. Anassemblylanguageisalowlevelprogramminglanguagefora computer,orotherprogrammabledevice,inwhichthereisavery strong(generallyonetoone)correspondencebetweenthelanguage andthearchitecture'smachinecodeinstructions.Eachassembly languageisspecifictoaparticularcomputerarchitecture,incontrast tomosthighlevelprogramminglanguages,whicharegenerally portableacrossmultiplearchitectures,butrequireinterpretingor compiling. Assemblylanguageisconvertedintoexecutablemachinecodebya utilityprogramreferredtoasanassemblertheconversionprocessis referredtoasassembly,orassemblingthecode. Assemblylanguageusesamnemonictorepresenteachlowlevel machineoperationoropcode.Someopcodesrequireoneormore operandsaspartoftheinstruction,andmostassemblerscantake labelsandsymbolsasoperandstorepresentaddressesandconstants, insteadofhardcodingthemintotheprogram.Macroassemblers includeamacroinstructionfacilitysothatassemblylanguagetextcan bepreassignedtoaname,andthatnamecanbeusedtoinsertthe textintoothercode.Manyassemblersofferadditionalmechanismsto facilitateprogramdevelopment,tocontroltheassemblyprocess,and toaiddebugging.

MotorolaMC6800Assembly Language

Contents
1Keyconcepts 1.1Assembler 1.1.1Numberofpasses 1.1.2Highlevelassemblers 1.2Assemblylanguage 2Languagedesign 2.1Basicelements 2.1.1Opcodemnemonicsandextendedmnemonics 2.1.2Datadirectives 2.1.3Assemblydirectives 2.2Macros

en.wikipedia.org/wiki/Assembly_language

1/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

2.3Supportforstructuredprogramming 3Useofassemblylanguage 3.1Historicalperspective 3.2Currentusage 3.3Typicalapplications 4Relatedterminology 5Listofassemblersfordifferentcomputerarchitectures 6Furtherdetails 7Examplelistingofassemblylanguagesourcecode 8Seealso 9References 10Furtherreading 11Externallinks

Keyconcepts
Assembler
Anassemblercreatesobjectcodebytranslatingassemblyinstructionmnemonicsintoopcodes,andby resolvingsymbolicnamesformemorylocationsandotherentities.[1]Theuseofsymbolicreferencesisakey featureofassemblers,savingtediouscalculationsandmanualaddressupdatesafterprogrammodifications. Mostassemblersalsoincludemacrofacilitiesforperformingtextualsubstitutione.g.,togeneratecommon shortsequencesofinstructionsasinline,insteadofcalledsubroutines. Assemblershavebeenavailablesincethe1950sandarefarsimplertowritethancompilersforhighlevel languagesaseachmnemonicinstruction/addressmodecombinationtranslatesdirectlyintoasinglemachine languageopcode.Modernassemblers,especiallyforRISCarchitectures,suchasSPARCorPower Architecture,aswellasx86andx8664,optimizeinstructionschedulingtoexploittheCPUpipeline efficiently.[citationneeded] Numberofpasses Therearetwotypesofassemblersbasedonhowmanypassesthroughthesourceareneededtoproducethe executableprogram. Onepassassemblersgothroughthesourcecodeonce.Anysymbolusedbeforeitisdefinedwill require"errata"attheendoftheobjectcode(or,atleast,noearlierthanthepointwherethesymbolis defined)tellingthelinkerortheloaderto"goback"andoverwriteaplaceholderwhichhadbeenleft wheretheasyetundefinedsymbolwasused. Multipassassemblerscreateatablewithallsymbolsandtheirvaluesinthefirstpasses,thenusethe tableinlaterpassestogeneratecode.

en.wikipedia.org/wiki/Assembly_language

2/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Inbothcases,theassemblermustbeabletodeterminethesizeofeachinstructionontheinitialpassesinorder tocalculatetheaddressesofsubsequentsymbols.Thismeansthatifthesizeofanoperationreferringtoan operanddefinedlaterdependsonthetypeordistanceoftheoperand,theassemblerwillmakeapessimistic estimatewhenfirstencounteringtheoperation,andifnecessarypaditwithoneormore"nooperation" instructionsinalaterpassortheerrata.Inanassemblerwithpeepholeoptimization,addressesmaybe recalculatedbetweenpassestoallowreplacingpessimisticcodewithcodetailoredtotheexactdistancefrom thetarget. Theoriginalreasonfortheuseofonepassassemblerswasspeedofassemblyoftenasecondpasswould requirerewindingandrereadingatapeorrereadingadeckofcards.Withmoderncomputersthishasceased tobeanissue.Theadvantageofthemultipassassembleristhattheabsenceoferratamakesthelinking process(ortheprogramloadiftheassemblerdirectlyproducesexecutablecode)faster.[2] Highlevelassemblers Moresophisticatedhighlevelassemblersprovidelanguageabstractionssuchas: Advancedcontrolstructures Highlevelprocedure/functiondeclarationsandinvocations Highlevelabstractdatatypes,includingstructures/records,unions,classes,andsets Sophisticatedmacroprocessing(althoughavailableonordinaryassemblerssincethelate1950sfor IBM700seriesandsincethe1960sforIBM/360,amongstothermachines) Objectorientedprogrammingfeaturessuchasclasses,objects,abstraction,polymorphism,and inheritance[3] SeeLanguagedesignbelowformoredetails.

Assemblylanguage
Aprogramwritteninassemblylanguageconsistsofaseriesof(mnemonic)processorinstructionsandmeta statements(knownvariouslyasdirectives,pseudoinstructionsandpseudoops),commentsanddata. Assemblylanguageinstructionsusuallyconsistofanopcodemnemonicfollowedbyalistofdata,arguments orparameters.[4]Thesearetranslatedbyanassemblerintomachinelanguageinstructionsthatcanbeloaded intomemoryandexecuted. Forexample,theinstructionbelowtellsanx86/IA32processortomoveanimmediate8bitvalueintoa register.Thebinarycodeforthisinstructionis10110followedbya3bitidentifierforwhichregistertouse. TheidentifierfortheALregisteris000,sothefollowingmachinecodeloadstheALregisterwiththedata 01100001.[5]
1 0 1 1 0 0 0 00 1 1 0 0 0 0 1

Thisbinarycomputercodecanbemademorehumanreadablebyexpressingitinhexadecimalasfollows.

en.wikipedia.org/wiki/Assembly_language

3/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

B 06 1

Here,B 0 means'MoveacopyofthefollowingvalueintoAL',and6 1 isahexadecimalrepresentationofthe value01100001,whichis97indecimal.IntelassemblylanguageprovidesthemnemonicMOV(an abbreviationofmove)forinstructionssuchasthis,sothemachinecodeabovecanbewrittenasfollowsin assemblylanguage,completewithanexplanatorycommentifrequired,afterthesemicolon.Thisismuch easiertoreadandtoremember.

M O VA L ,6 1 h

;L o a dA Lw i t h9 7d e c i m a l( 6 1h e x )

InsomeassemblylanguagesthesamemnemonicsuchasMOVmaybeusedforafamilyofrelated instructionsforloading,copyingandmovingdata,whethertheseareimmediatevalues,valuesinregisters,or memorylocationspointedtobyvaluesinregisters.OtherassemblersmayuseseparateopcodessuchasLfor "movememorytoregister",STfor"moveregistertomemory",LRfor"moveregistertoregister",MVIfor "moveimmediateoperandtomemory",etc. TheIntelopcode10110000(B 0 )copiesan8bitvalueintotheALregister,while10110001(B 1 )movesitinto [5] CLand10110010(B 2 )doessointoDL.Assemblylanguageexamplesforthesefollow.

M O VA L ,1 h M O VC L ,2 h M O VD L ,3 h

;L o a dA Lw i t hi m m e d i a t ev a l u e1 ;L o a dC Lw i t hi m m e d i a t ev a l u e2 ;L o a dD Lw i t hi m m e d i a t ev a l u e3

ThesyntaxofMOVcanalsobemorecomplexasthefollowingexamplesshow.[6]

M O VE A X ,[ E B X ] ;M o v et h e4b y t e si nm e m o r ya tt h ea d d r e s sc o n t a i n e di nE B Xi n t oE A X M O V[ E S I + E A X ] ,C L ;M o v et h ec o n t e n t so fC Li n t ot h eb y t ea ta d d r e s sE S I + E A X

Ineachcase,theMOVmnemonicistranslateddirectlyintoanopcodeintheranges888E,A0A3,B0B8, C6orC7byanassembler,andtheprogrammerdoesnothavetoknoworrememberwhich.[5] Transformingassemblylanguageintomachinecodeisthejobofanassembler,andthereversecanatleast partiallybeachievedbyadisassembler.Unlikehighlevellanguages,thereisusuallyaonetoone correspondencebetweensimpleassemblystatementsandmachinelanguageinstructions.However,insome cases,anassemblermayprovidepseudoinstructions(essentiallymacros)whichexpandintoseveralmachine languageinstructionstoprovidecommonlyneededfunctionality.Forexample,foramachinethatlacksa "branchifgreaterorequal"instruction,anassemblermayprovideapseudoinstructionthatexpandstothe

en.wikipedia.org/wiki/Assembly_language

4/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

machine's"setiflessthan"and"branchifzero(ontheresultofthesetinstruction)".Mostfullfeatured assemblersalsoprovidearichmacrolanguage(discussedbelow)whichisusedbyvendorsandprogrammers togeneratemorecomplexcodeanddatasequences. Eachcomputerarchitecturehasitsownmachinelanguage.Computersdifferinthenumberandtypeof operationstheysupport,inthedifferentsizesandnumbersofregisters,andintherepresentationsofdatain storage.Whilemostgeneralpurposecomputersareabletocarryoutessentiallythesamefunctionality,the waystheydosodifferthecorrespondingassemblylanguagesreflectthesedifferences. Multiplesetsofmnemonicsorassemblylanguagesyntaxmayexistforasingleinstructionset,typically instantiatedindifferentassemblerprograms.Inthesecases,themostpopularoneisusuallythatsuppliedby themanufacturerandusedinitsdocumentation.

Languagedesign
Basicelements
Thereisalargedegreeofdiversityinthewaytheauthorsofassemblerscategorizestatementsandinthe nomenclaturethattheyuse.Inparticular,somedescribeanythingotherthanamachinemnemonicorextended mnemonicasapseudooperation(pseudoop).Atypicalassemblylanguageconsistsof3typesofinstruction statementsthatareusedtodefineprogramoperations: Opcodemnemonics Datasections Assemblydirectives Opcodemnemonicsandextendedmnemonics Instructions(statements)inassemblylanguagearegenerallyverysimple,unlikethoseinhighlevellanguage. Generally,amnemonicisasymbolicnameforasingleexecutablemachinelanguageinstruction(anopcode), andthereisatleastoneopcodemnemonicdefinedforeachmachinelanguageinstruction.Eachinstruction typicallyconsistsofanoperationoropcodepluszeroormoreoperands.Mostinstructionsrefertoasingle value,orapairofvalues.Operandscanbeimmediate(valuecodedintheinstructionitself),registersspecified intheinstructionorimplied,ortheaddressesofdatalocatedelsewhereinstorage.Thisisdeterminedbythe underlyingprocessorarchitecture:theassemblermerelyreflectshowthisarchitectureworks.Extended mnemonicsareoftenusedtospecifyacombinationofanopcodewithaspecificoperand,e.g.,the System/360assemblersuseBasanextendedmnemonicforBCwithamaskof15andNOP("NO OPeration"donothingforonestep)forBCwithamaskof0. Extendedmnemonicsareoftenusedtosupportspecializedusesofinstructions,oftenforpurposesnotobvious fromtheinstructionname.Forexample,manyCPU'sdonothaveanexplicitNOPinstruction,butdohave instructionsthatcanbeusedforthepurpose.In8086CPUstheinstructionxchgax,axisusedfornop,with nopbeingapseudoopcodetoencodetheinstructionxchgax,ax.Somedisassemblersrecognizethisandwill

en.wikipedia.org/wiki/Assembly_language

5/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

decodethexchgax,axinstructionasnop.Similarly,IBMassemblersforSystem/360andSystem/370usethe extendedmnemonicsNOPandNOPRforBCandBCRwithzeromasks.FortheSPARCarchitecture,these areknownassyntheticinstructions.[7] Someassemblersalsosupportsimplebuiltinmacroinstructionsthatgeneratetwoormoremachine instructions.Forinstance,withsomeZ80assemblerstheinstructionldhl,bcisrecognizedtogenerateldl,c followedbyldh,b.[8]Thesearesometimesknownaspseudoopcodes. Mnemonicsarearbitrarysymbolsin1985theIEEEpublishedStandard694forauniformsetofmnemonics tobeusedbyallassemblers.Thestandardhassincebeenwithdrawn. Datadirectives Thereareinstructionsusedtodefinedataelementstoholddataandvariables.Theydefinethetypeofdata, thelengthandthealignmentofdata.Theseinstructionscanalsodefinewhetherthedataisavailabletooutside programs(programsassembledseparately)oronlytotheprograminwhichthedatasectionisdefined.Some assemblersclassifytheseaspseudoops. Assemblydirectives Assemblydirectives,alsocalledpseudoopcodes,pseudooperationsorpseudoops,areinstructionsthatare executedbyanassembleratassemblytime,notbyaCPUatruntime.Thenamesofpseudoopsoftenstart withadottodistinguishthemfrommachineinstructions.Pseudoopscanmaketheassemblyoftheprogram dependentonparametersinputbyaprogrammer,sothatoneprogramcanbeassembleddifferentways, perhapsfordifferentapplications.Or,apseudoopcanbeusedtomanipulatepresentationofaprogramto makeiteasiertoreadandmaintain.Anothercommonuseofpseudoopsistoreservestorageareasforrun timedataandoptionallyinitializetheircontentstoknownvalues. Symbolicassemblersletprogrammersassociatearbitrarynames(labelsorsymbols)withmemorylocations andvariousconstants.Usually,everyconstantandvariableisgivenanamesoinstructionscanreferencethose locationsbyname,thuspromotingselfdocumentingcode.Inexecutablecode,thenameofeachsubroutineis associatedwithitsentrypoint,soanycallstoasubroutinecanuseitsname.Insidesubroutines,GOTO destinationsaregivenlabels.Someassemblerssupportlocalsymbolswhicharelexicallydistinctfromnormal symbols(e.g.,theuseof"10$"asaGOTOdestination). Someassemblers,suchasNASMprovideflexiblesymbolmanagement,lettingprogrammersmanage differentnamespaces,automaticallycalculateoffsetswithindatastructures,andassignlabelsthatreferto literalvaluesortheresultofsimplecomputationsperformedbytheassembler.Labelscanalsobeusedto initializeconstantsandvariableswithrelocatableaddresses. Assemblylanguages,likemostothercomputerlanguages,allowcommentstobeaddedtoprogramsource codethatwillbeignoredduringassembly.Judiciouscommentingisessentialinassemblylanguageprograms, asthemeaningandpurposeofasequenceofbinarymachineinstructionscanbedifficulttodetermine.It shouldbenotedthatthe"raw"(uncommented)assemblylanguagegeneratedbycompilersordisassemblersis quitedifficulttoreadwhenchangesmustbemade.

en.wikipedia.org/wiki/Assembly_language

6/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Macros
Manyassemblerssupportpredefinedmacros,andotherssupportprogrammerdefined(andrepeatedlyre definable)macrosinvolvingsequencesoftextlinesinwhichvariablesandconstantsareembedded.This sequenceoftextlinesmayincludeopcodesordirectives.Onceamacrohasbeendefineditsnamemaybe usedinplaceofamnemonic.Whentheassemblerprocessessuchastatement,itreplacesthestatementwith thetextlinesassociatedwiththatmacro,thenprocessesthemasiftheyexistedinthesourcecodefile (including,insomeassemblers,expansionofanymacrosexistinginthereplacementtext). Notethatthisdefinitionof"macro"isslightlydifferentfromtheuseoftheterminothercontexts,liketheC programminglanguage.Cmacroscreatedthroughthe#definedirectivetypicallyarejustoneline,orafew linesatmost.Assemblermacroinstructionscanbelengthy"programs"bythemselves,executedby interpretationbytheassemblerduringassembly. Sincemacroscanhave'short'namesbutexpandtoseveralorindeedmanylinesofcode,theycanbeusedto makeassemblylanguageprogramsappeartobefarshorter,requiringfewerlinesofsourcecode,aswith higherlevellanguages.Theycanalsobeusedtoaddhigherlevelsofstructuretoassemblyprograms, optionallyintroduceembeddeddebuggingcodeviaparametersandothersimilarfeatures. Macroassemblersoftenallowmacrostotakeparameters.Someassemblersincludequitesophisticatedmacro languages,incorporatingsuchhighlevellanguageelementsasoptionalparameters,symbolicvariables, conditionals,stringmanipulation,andarithmeticoperations,allusableduringtheexecutionofagivenmacro, andallowingmacrostosavecontextorexchangeinformation.Thusamacromightgeneratealargenumberof assemblylanguageinstructionsordatadefinitions,basedonthemacroarguments.Thiscouldbeusedto generaterecordstyledatastructuresor"unrolled"loops,forexample,orcouldgenerateentirealgorithms basedoncomplexparameters.Anorganizationusingassemblylanguagethathasbeenheavilyextendedusing suchamacrosuitecanbeconsideredtobeworkinginahigherlevellanguage,sincesuchprogrammersare notworkingwithacomputer'slowestlevelconceptualelements. Macroswereusedtocustomizelargescalesoftwaresystemsforspecificcustomersinthemainframeeraand werealsousedbycustomerpersonneltosatisfytheiremployers'needsbymakingspecificversionsof manufactureroperatingsystems.Thiswasdone,forexample,bysystemsprogrammersworkingwithIBM's ConversationalMonitorSystem/VirtualMachine(VM/CMS)andwithIBM's"realtimetransaction processing"addons,CustomerInformationControlSystemCICS,andACP/TPF,theairline/financialsystem thatbeganinthe1970sandstillrunsmanylargecomputerreservationssystems(CRS)andcreditcard systemstoday. Itwasalsopossibletousesolelythemacroprocessingabilitiesofanassemblertogeneratecodewrittenin completelydifferentlanguages,forexample,togenerateaversionofaprograminCOBOLusingapure macroassemblerprogramcontaininglinesofCOBOLcodeinsideassemblytimeoperatorsinstructingthe assemblertogeneratearbitrarycode. Thiswasbecause,aswasrealizedinthe1960s,theconceptof"macroprocessing"isindependentofthe conceptof"assembly",theformerbeinginmoderntermsmorewordprocessing,textprocessing,than generatingobjectcode.Theconceptofmacroprocessingappeared,andappears,intheCprogramming

en.wikipedia.org/wiki/Assembly_language

7/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

language,whichsupports"preprocessorinstructions"tosetvariables,andmakeconditionaltestsontheir values.Notethatunlikecertainpreviousmacroprocessorsinsideassemblers,theCpreprocessorwasnot Turingcompletebecauseitlackedtheabilitytoeitherloopor"goto",thelatterallowingprogramstoloop. Despitethepowerofmacroprocessing,itfellintodisuseinmanyhighlevellanguages(majorexceptions beingC/C++andPL/I)whileremainingaperennialforassemblers. Macroparametersubstitutionisstrictlybyname:atmacroprocessingtime,thevalueofaparameteris textuallysubstitutedforitsname.Themostfamousclassofbugsresultingwastheuseofaparameterthat itselfwasanexpressionandnotasimplenamewhenthemacrowriterexpectedaname.Inthemacro:f o o : m a c r oal o a da * b theintentionwasthatthecallerwouldprovidethenameofavariable,andthe"global" variableorconstantbwouldbeusedtomultiply"a".Iffooiscalledwiththeparametera c ,themacro expansionofl o a da c * b occurs.Toavoidanypossibleambiguity,usersofmacroprocessorscan parenthesizeformalparametersinsidemacrodefinitions,orcallerscanparenthesizetheinputparameters.[9]

Supportforstructuredprogramming
Someassemblershaveincorporatedstructuredprogrammingelementstoencodeexecutionflow.Theearliest exampleofthisapproachwasintheConcept14macroset,originallyproposedbyDr.H.D.Mills(March, 1970),andimplementedbyMarvinKessleratIBM'sFederalSystemsDivision,whichextendedtheS/360 macroassemblerwithIF/ELSE/ENDIFandsimilarcontrolflowblocks.[10]Thiswasawaytoreduceor eliminatetheuseofGOTOoperationsinassemblycode,oneofthemainfactorscausingspaghetticodein assemblylanguage.Thisapproachwaswidelyacceptedintheearly'80s(thelatterdaysoflargescale assemblylanguageuse). AcuriousdesignwasAnatural,a"streamoriented"assemblerfor8080/Z80processors[citationneeded]from WhitesmithsLtd.(developersoftheUnixlikeIdrisoperatingsystem,andwhatwasreportedtobethefirst commercialCcompiler).Thelanguagewasclassifiedasanassembler,becauseitworkedwithrawmachine elementssuchasopcodes,registers,andmemoryreferencesbutitincorporatedanexpressionsyntaxto indicateexecutionorder.Parenthesesandotherspecialsymbols,alongwithblockorientedstructured programmingconstructs,controlledthesequenceofthegeneratedinstructions.Anaturalwasbuiltasthe objectlanguageofaCcompiler,ratherthanforhandcoding,butitslogicalsyntaxwonsomefans. Therehasbeenlittleapparentdemandformoresophisticatedassemblerssincethedeclineoflargescale assemblylanguagedevelopment.[11]Inspiteofthat,theyarestillbeingdevelopedandappliedincaseswhere resourceconstraintsorpeculiaritiesinthetargetsystem'sarchitecturepreventtheeffectiveuseofhigherlevel languages.[12]

Useofassemblylanguage
Historicalperspective
Assemblylanguagesdatetotheintroductionofthestoredprogramcomputer.TheEDSACcomputer(1949) hadanassemblercalledinitialordersfeaturingonelettermnemonics.[13]NathanielRochesterwrotean assemblerforanIBM701(1954).SOAP(SymbolicOptimalAssemblyProgram)(1955)wasanassembly

en.wikipedia.org/wiki/Assembly_language

8/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

languagefortheIBM650computerwrittenbyStanPoley.[14] Assemblylanguageseliminatedmuchoftheerrorproneandtimeconsumingfirstgenerationprogramming neededwiththeearliestcomputers,freeingprogrammersfromtediumsuchasrememberingnumericcodes andcalculatingaddresses.Theywereoncewidelyusedforallsortsofprogramming.However,bythe1980s (1990sonmicrocomputers),theirusehadlargelybeensupplantedbyhigherlevellanguages,inthesearchfor improvedprogrammingproductivity.Todayassemblylanguageisstillusedfordirecthardwaremanipulation, accesstospecializedprocessorinstructions,ortoaddresscriticalperformanceissues.Typicalusesaredevice drivers,lowlevelembeddedsystems,andrealtimesystems. Historically,alargenumberofprogramshavebeenwrittenentirelyinassemblylanguage.Operatingsystems wereentirelywritteninassemblylanguageuntiltheintroductionoftheBurroughsMCP(1961),whichwas writteninESPOL,anAlgoldialect.Manycommercialapplicationswerewritteninassemblylanguageas well,includingalargeamountoftheIBMmainframesoftwarewrittenbylargecorporations.COBOL, FORTRANandsomePL/Ieventuallydisplacedmuchofthiswork,althoughanumberoflargeorganizations retainedassemblylanguageapplicationinfrastructureswellintothe'90s. Mostearlymicrocomputersreliedonhandcodedassemblylanguage,includingmostoperatingsystemsand largeapplications.Thiswasbecausethesesystemshadsevereresourceconstraints,imposedidiosyncratic memoryanddisplayarchitectures,andprovidedlimited,buggysystemservices.Perhapsmoreimportantwas thelackoffirstclasshighlevellanguagecompilerssuitableformicrocomputeruse.Apsychologicalfactor mayhavealsoplayedarole:thefirstgenerationofmicrocomputerprogrammersretainedahobbyist,"wires andpliers"attitude. Inamorecommercialcontext,thebiggestreasonsforusingassemblylanguagewereminimalbloat(size), minimaloverhead,greaterspeed,andreliability. TypicalexamplesoflargeassemblylanguageprogramsfromthistimeareIBMPCDOSoperatingsystems andearlyapplicationssuchasthespreadsheetprogramLotus123.Evenintothe1990s,mostconsolevideo gameswerewritteninassembly,includingmostgamesfortheMegaDrive/GenesisandtheSuperNintendo EntertainmentSystem.[citationneeded]Accordingtosomeindustryinsiders,theassemblylanguagewasthe bestcomputerlanguagetousetogetthebestperformanceoutoftheSegaSaturn,aconsolethatwas notoriouslychallengingtodevelopandprogramgamesfor.[15]ThepopulararcadegameNBAJam(1993)is anotherexample.Assemblylanguagehaslongbeentheprimarydevelopmentlanguageformanypopular homecomputersofthe1980sand1990s(suchastheSinclairZXSpectrum,Commodore64,Commodore Amiga,andAtariST).ThiswasinlargepartbecauseBASICdialectsonthesesystemsofferedinsufficient executionspeed,aswellasinsufficientfacilitiestotakefulladvantageoftheavailablehardwareonthese systems.Somesystems,mostnotablytheAmiga,evenhaveIDEswithhighlyadvanceddebuggingand macrofacilities,suchasthefreewareASMOneassembler(http://www.theflamearrows.info/homepage.html), comparabletothatofMicrosoftVisualStudiofacilities(ASMOnepredatesMicrosoftVisualStudio). TheAssemblerfortheVIC20waswrittenbyDonFrenchandpublishedbyFrenchSilk.At1,639bytesin length,itsauthorbelievesitisthesmallestsymbolicassemblereverwritten.Theassemblersupportedthe usualsymbolicaddressingandthedefinitionofcharacterstringsorhexstrings.Italsoallowedaddress expressionswhichcouldbecombinedwithaddition,subtraction,multiplication,division,logicalAND, logicalOR,andexponentiationoperators.[16]

en.wikipedia.org/wiki/Assembly_language

9/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Currentusage
Therehavealwaysbeendebatesovertheusefulnessandperformanceofassemblylanguagerelativetohigh levellanguages.Assemblylanguagehasspecificnicheuseswhereitisimportantseebelow.Butingeneral, modernoptimizingcompilersareclaimed[17]torenderhighlevellanguagesintocodethatcanrunasfastas handwrittenassembly,despitethecounterexamplesthatcanbefound.[18][19][20]Thecomplexityofmodern processorsandmemorysubsystemsmakeseffectiveoptimizationincreasinglydifficultforcompilers,aswell asassemblyprogrammers.[21][22]Moreover,andtothedismayofefficiencylovers,increasingprocessor performancehasmeantthatmostCPUssitidlemostofthetime,[citationneeded]withdelayscausedby predictablebottleneckssuchasI/Ooperationsandpaging.Thishasmaderawcodeexecutionspeedanon issueformanyprogrammers. Therearesomesituationsinwhichdevelopersmightchoosetouseassemblylanguage: Astandaloneexecutableofcompactsizeisrequiredthatmustexecutewithoutrecoursetotheruntime componentsorlibrariesassociatedwithahighlevellanguagethisisperhapsthemostcommon situation.Forexample,firmwarefortelephones,automobilefuelandignitionsystems,airconditioning controlsystems,securitysystems,andsensors. Codethatmustinteractdirectlywiththehardware,forexampleindevicedriversandinterrupthandlers. Programsthatneedtouseprocessorspecificinstructionsnotimplementedinacompiler.Acommon exampleisthebitwiserotationinstructionatthecoreofmanyencryptionalgorithms. ProgramsthatcreatevectorizedfunctionsforprogramsinhigherlevellanguagessuchasC.Inthe higherlevellanguagethisissometimesaidedbycompilerintrinsicfunctionswhichmapdirectlyto SIMDmnemonics,butneverthelessresultinaonetooneassemblyconversionspecificforthegiven vectorprocessor. Programsrequiringextremeoptimization,forexampleaninnerloopinaprocessorintensivealgorithm. Gameprogrammerstakeadvantageoftheabilitiesofhardwarefeaturesinsystems,enablinggamesto runfaster.Alsolargescientificsimulationsrequirehighlyoptimizedalgorithms,e.g.linearalgebrawith BLAS[18][23]ordiscretecosinetransformation(e.g.SIMDassemblyversionfromx264[24]) Situationswherenohighlevellanguageexists,onaneworspecializedprocessor,forexample. Programsthatneedprecisetimingsuchas realtimeprogramssuchassimulations,flightnavigationsystems,andmedicalequipment.For example,inaflybywiresystem,telemetrymustbeinterpretedandacteduponwithinstricttime constraints.Suchsystemsmusteliminatesourcesofunpredictabledelays,whichmaybecreated by(some)interpretedlanguages,automaticgarbagecollection,pagingoperations,orpreemptive multitasking.However,somehigherlevellanguagesincorporateruntimecomponentsand operatingsysteminterfacesthatcanintroducesuchdelays.Choosingassemblyorlowerlevel languagesforsuchsystemsgivesprogrammersgreatervisibilityandcontroloverprocessing details. cryptographicalgorithmsthatmustalwaystakestrictlythesametimetoexecute,preventing timingattacks. Situationswherecompletecontrolovertheenvironmentisrequired,inextremelyhighsecurity situationswherenothingcanbetakenforgranted. Computerviruses,bootloaders,certaindevicedrivers,orotheritemsveryclosetothehardwareorlow

en.wikipedia.org/wiki/Assembly_language

10/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

leveloperatingsystem. Instructionsetsimulatorsformonitoring,tracinganddebuggingwhereadditionaloverheadiskepttoa minimum Reverseengineeringandmodifyingprogramfilessuchas existingbinariesthatmayormaynothaveoriginallybeenwritteninahighlevellanguage,for examplewhentryingtorecreateprogramsforwhichsourcecodeisnotavailableorhasbeenlost, orcrackingcopyprotectionofproprietarysoftware. Videogames(alsotermedROMhacking),whichispossibleviaseveralmethods.Themost widelyemployedisalteringprogramcodeattheassemblylanguagelevel. Selfmodifyingcode,towhichassemblylanguagelendsitselfwell. Gamesandothersoftwareforgraphingcalculators.[25] Assemblylanguageisstilltaughtinmostcomputerscienceandelectronicengineeringprograms.Although fewprogrammerstodayregularlyworkwithassemblylanguageasatool,theunderlyingconceptsremain veryimportant.Suchfundamentaltopicsasbinaryarithmetic,memoryallocation,stackprocessing,character setencoding,interruptprocessing,andcompilerdesignwouldbehardtostudyindetailwithoutagraspof howacomputeroperatesatthehardwarelevel.Sinceacomputer'sbehaviorisfundamentallydefinedbyits instructionset,thelogicalwaytolearnsuchconceptsistostudyanassemblylanguage.Mostmodern computershavesimilarinstructionsets.Therefore,studyingasingleassemblylanguageissufficienttolearn: I)thebasicconceptsII)torecognizesituationswheretheuseofassemblylanguagemightbeappropriateand III)toseehowefficientexecutablecodecanbecreatedfromhighlevellanguages.[26]Thisisanalogousto childrenneedingtolearnthebasicarithmeticoperations(e.g.,longdivision),althoughcalculatorsarewidely usedforallexceptthemosttrivialcalculations.

Typicalapplications
Assemblylanguageistypicallyusedinasystem'sbootcode,(BIOSonIBMcompatiblePCsystems andCP/M),thelowlevelcodethatinitializesandteststhesystemhardwarepriortobootingthe operatingsystem,andisoftenstoredinROM. Somecompilerstranslatehighlevellanguagesintoassemblyfirstbeforefullycompiling,allowingthe assemblycodetobeviewedfordebuggingandoptimizationpurposes. Relativelylowlevellanguages,suchasC,allowtheprogrammertoembedassemblylanguagedirectly inthesourcecode.Programsusingsuchfacilities,suchastheLinuxkernel,canthenconstruct abstractionsusingdifferentassemblylanguageoneachhardwareplatform.Thesystem'sportablecode canthenusetheseprocessorspecificcomponentsthroughauniforminterface. Assemblylanguageisvaluableinreverseengineering.Manyprogramsaredistributedonlyinmachine codeformwhichisstraightforwardtotranslateintoassemblylanguage,butmoredifficulttotranslate intoahigherlevellanguage.ToolssuchastheInteractiveDisassemblermakeextensiveuseof disassemblyforsuchapurpose. Assemblerscanbeusedtogenerateblocksofdata,withnohighlevellanguageoverhead,from formattedandcommentedsourcecode,tobeusedbyothercode.[citationneeded]

en.wikipedia.org/wiki/Assembly_language

11/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Relatedterminology
Assemblylanguageorassemblerlanguageiscommonlycalledassembly,assembler,ASM,or symbolicmachinecode.AgenerationofIBMmainframeprogrammerscalleditALCforAssembly LanguageCodeorBAL[27]forBasicAssemblyLanguage.Callingthelanguageassemblermightbe consideredpotentiallyconfusingandambiguous,sincethisisalsothenameoftheutilityprogramthat translatesassemblylanguagestatementsintomachinecode.However,thisusagehasbeencommon amongprofessionalsandintheliteraturefordecades.[28]Similarly,someearlycomputerscalledtheir assemblertheirassemblyprogram.[29] Thecomputationalstepwhereanassemblerisrun,includingallmacroprocessing,istermedassembly time.Theassemblerissaidtobe"assembling"thesourcecode. Theuseofthewordassemblydatesfromtheearlyyearsofcomputers(cf.shortcode,speedcode). Acrossassembler(seealsocrosscompiler)isanassemblerthatisrunonacomputeroroperating systemofadifferenttypefromthesystemonwhichtheresultingcodeistorun(thetargetsystem). Crossassemblingmaybenecessaryifthetargetsystemcannotrunanassembleritself,asistypically thecaseforsmallembeddedsystems.Thecomputeronwhichthecrossassemblerisrunmusthave somemeansoftransportingtheresultingmachinecodetothetargetsystem.Commonmethodsinvolve transmittinganexactbytebybytecopyofthemachinecodeoranASCIIrepresentationofthemachine codeinaportableformat(suchasMotorolaorIntelhexadecimal)throughacompatibleinterfacetothe targetsystemforexecution. Anassemblerdirectiveorpseudoopcodeisacommandgiventoanassembler"directingittoperform operationsotherthanassemblinginstructions."[1]Directivesaffecthowtheassembleroperatesand "mayaffecttheobjectcode,thesymboltable,thelistingfile,andthevaluesofinternalassembler parameters."Sometimesthetermpseudoopcodeisreservedfordirectivesthatgenerateobjectcode, suchasthosethatgeneratedata.[30] Ametaassembleris"aprogramthatacceptsthesyntacticandsemanticdescriptionofanassembly language,andgeneratesanassemblerforthatlanguage."[31]

Listofassemblersfordifferentcomputerarchitectures
Mainarticle:Listofassemblers

Furtherdetails
Foranygivenpersonalcomputer,mainframe,embeddedsystem,andgameconsole,bothpastandpresent,at leastonepossiblydozensofassemblershavebeenwritten.Forsomeexamples,seethelistofassemblers. OnUnixsystems,theassembleristraditionallycalledas,althoughitisnotasinglebodyofcode,being typicallywrittenanewforeachport.AnumberofUnixvariantsuseGAS. Withinprocessorgroups,eachassemblerhasitsowndialect.Sometimes,someassemblerscanreadanother assembler'sdialect,forexample,TASMcanreadoldMASMcode,butnotthereverse.FASMandNASM havesimilarsyntax,buteachsupportdifferentmacrosthatcouldmakethemdifficulttotranslatetoeachother.

en.wikipedia.org/wiki/Assembly_language

12/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Thebasicsareallthesame,buttheadvancedfeatureswilldiffer.[32] Also,assemblycansometimesbeportableacrossdifferentoperatingsystemsonthesametypeofCPU. Callingconventionsbetweenoperatingsystemsoftendifferslightlyornotatall,andwithcareitispossibleto gainsomeportabilityinassemblylanguage,usuallybylinkingwithaClibrarythatdoesnotchangebetween operatingsystems.[citationneeded]Aninstructionsetsimulatorcanprocesstheobjectcode/binaryofany assemblertoachieveportabilityevenacrossplatformswithanoverheadnogreaterthanatypicalbytecode interpreter.[citationneeded]Thisissimilartouseofmicrocodetoachievecompatibilityacrossaprocessor family. Somehigherlevelcomputerlanguages,suchasCandBorlandPascal,supportinlineassemblywheresections ofassemblycode,inpracticeusuallybrief,canbeembeddedintothehighlevellanguagecode.TheForth languagecommonlycontainsanassemblerusedinCODEwords. Anemulatorcanbeusedtodebugassemblylanguageprograms.

Examplelistingofassemblylanguagesourcecode
ThefollowingisapartiallistinggeneratedbytheNASM,anassemblerfor32bitIntelx86CPUs.Thecode isforasubroutine,notacompleteprogram.

1 0 0 .
; -

1 0 1 .
;z s t r _ c o u n t :

1 0 2 .
;C o u n t saz e r o t e r m i n a t e dA S C I Is t r i n gt od e t e r m i n ei t ss i z e

1 0 3 .
;i n :
1 0 4 .

e a x=s t a r ta d d r e s so ft h ez e r ot e r m i n a t e ds t r i n g

;o u t : e c x=c o u n t=t h el e n g t ho ft h es t r i n g

1 0 5 . 1 0 6 . 1 0 7 . 1 0 8 .
; t oc o m p e n s a t ef o rt h ei n c r e m e n t
1 0 9 .

z s t r _ c o u n t :
0 0 0 0 0 0 3 0B 9 F F F F F F F F
m o v e c x ,1

;E n t r yp o i n t

;I n i tt h el o o pc o u n t e r ,p r e d e c r e m e n t

. l o o p :

en.wikipedia.org/wiki/Assembly_language

13/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

1 1 0 . 1 1 1 . 1 1 2 .

0 0 0 0 0 0 3 54 1

i n c e c x

;A d d1t ot h el o o pc o u n t e r

0 0 0 0 0 0 3 68 0 3 C 0 8 0 0

c m p b y t e[ e a x+e c x ] , 0 ;C o m p a r et h ev a l u ea tt h es t r i n g ' s

; [ s t a r t i n gm e m o r ya d d r e s sP l u st h e

1 1 3 .
; l o o po f f s e t ] ,t oz e r o
1 1 4 .

0 0 0 0 0 0 3 A7 5 F 9

j n e . l o o p

;I ft h em e m o r yv a l u ei sn o tz e r o ,

1 1 5 .
; t h e nj u m pt ot h el a b e lc a l l e d' . l o o p ' ,

1 1 6 .
; o t h e r w i s ec o n t i n u et ot h en e x tl i n e

1 1 7 . 1 1 8 .

. d o n e :
;W ed o n ' td oaf i n a li n c r e m e n t ,

1 1 9 .

; b e c a u s ee v e nt h o u g ht h ec o u n ti sb a s e1 ,

1 2 0 .
; w ed on o ti n c l u d et h ez e r ot e r m i n a t o ri nt h e

1 2 1 .
; s t r i n g ' sl e n g t h

1 2 2 .

0 0 0 0 0 0 3 CC 3

r e t

;R e t u r nt ot h ec a l l i n gp r o g r a m

Thefirstcolumn(fromtheleft)issimplythelinenumberinthelistingandisotherwisemeaningless.The secondcolumnistherelativeaddress,inhex,ofwherethecodewillbeplacedinmemory.Thethirdcolumn istheactualcompiledcode.Forinstance,B 9 isthex86opcodefortheM O V E C X instructionF F F F F F F F is thevalue1intwo'scomplementbinaryform. Namessuffixedwithcolons(: )aresymboliclabelsthelabelsdonotcreatecode,theyaresimplyawayto telltheassemblerthatthoselocationshavesymbolicnames.The. d o n e labelisonlypresentforclarityof wheretheprogramends,itdoesnotserveanyotherpurpose.Prefixingaperiod(. )onalabelisafeatureof theassembler,declaringthelabelasbeinglocaltothesubroutine.

Seealso
Compiler Disassembler

en.wikipedia.org/wiki/Assembly_language

14/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

HighLevelAssembly Instructionset Littlemancomputeraneducationalcomputermodelwithabase10assemblylanguage Microassembler Typedassemblylanguage

References
1. ^ a bDavidSalomon(1993). AssemblersandLoaders(http://www.davidsalomon.name/assem.advertis/asl.pdf) 2. ^Beck,LelandL.(1996)."2". SystemSoftware:AnIntroductiontoSystemsProgramming.AddisonWesley. 3. ^Hyde,Randall."Chapter12ClassesandObjects".TheArtofAssemblyLanguage,2ndEdition.NoStarch Press.2010. 4. ^ IntelArchitectureSoftwareDeveloper'sManual,Volume2:InstructionSetReference (http://download.intel.com/design/PentiumII/manuals/24319102.PDF).IntelCorporation.1999.Retrieved18 November2010. 5. ^ a b c IntelArchitectureSoftwareDeveloper'sManual,Volume2:InstructionSetReference (http://download.intel.com/design/PentiumII/manuals/24319102.PDF).IntelCorporation.1999.pp.442and35. Retrieved18November2010. 6. ^Evans,David(2006)."x86AssemblyGuide"(http://www.cs.virginia.edu/~evans/cs216/guides/x86.html). UniversityofVirginia.Retrieved18November2010. 7. ^"TheSPARCArchitectureManual,Version8"(http://www.sparc.com/standards/V8.pdf).SPARC,International. 1992. 8. ^Z80OpCodesforZINT(http://www.z80.de/z80/z80code.htm).Z80.de.Retrievedon20130721. 9. ^"Macros(C/C++),MSDNLibraryforVisualStudio2008"(http://msdn.microsoft.com/en us/library/503x3e3s%28v=VS.90%29.aspx).MicrosoftCorp.Retrieved20100622. 10. ^"Concept14Macros"(http://skycoast.us/pscott/software/mvs/concept14.html).MVSSoftware.RetrievedMay 25,2009. 11. ^Answers.com."assemblylanguage:DefinitionandMuchMorefromAnswers.com" (http://www.answers.com/topic/assemblylanguage?cat=technology).Retrieved20080619. 12. ^Provinciano,Brian."NESHLA:TheHighLevel,OpenSource,6502AssemblerfortheNintendoEntertainment System"(http://neshla.sourceforge.net/). 13. ^Salomon. AssemblersandLoaders(http://www.davidsalomon.name/assem.advertis/asl.pdf).p.7.Retrieved 20120117. 14. ^"TheIBM650MagneticDrumCalculator"(http://www.columbia.edu/cu/computinghistory/650.html).Retrieved 20120117. 15. ^Eidolon'sInn:SegaBaseSaturn(http://www.eidolonsinn.net/tikiindex.php?page=SegaBase+Saturn) 16. ^JimLawless(20040521)."SpeakingwithDonFrench:TheManBehindtheFrenchSilkAssemblerTools" (http://www.radiks.net/~jimbo/art/int7.htm).Archived (http://web.archive.org/web/20080821105848/http://www.radiks.net/~jimbo/art/int7.htm)fromtheoriginalon21 August2008.Retrieved20080725. 17. ^Rusling,DavidA."TheLinuxKernel"(http://tldp.org/LDP/tlk/basics/sw.html).RetrievedMar11,2012. 18. ^ a b"WritingtheFastestCode,byHand,forFun:AHumanComputerKeepsSpeedingUpChips" (http://www.nytimes.com/2005/11/28/technology/28super.html?_r=1).NewYorkTimes,JohnMarkoff.200511 28.Retrieved20100304. 19. ^"Bitfieldbadness"(http://hardwarebug.org/2010/01/30/bitfieldbadness/).hardwarebug.org.20100130. Archived(http://web.archive.org/web/20100205120952/http://hardwarebug.org/2010/01/30/bitfieldbadness/) fromtheoriginalon5February2010.Retrieved20100304. 20. ^"GCCmakesamess"(http://hardwarebug.org/2009/05/13/gccmakesamess/).HardwareBug.org.20090513.
en.wikipedia.org/wiki/Assembly_language 15/17

1/3/14

20. ^"GCCmakesamess"(http://hardwarebug.org/2009/05/13/gccmakesamess/).HardwareBug.org.20090513. Archived(http://web.archive.org/web/20100316212040/http://hardwarebug.org/2009/05/13/gccmakesamess/) fromtheoriginalon16March2010.Retrieved20100304. 21. ^RandallHyde."TheGreatDebate"(http://webster.cs.ucr.edu/Page_TechDocs/GreatDebate/debate1.html). Archived (http://web.archive.org/web/20080616110102/http://webster.cs.ucr.edu/Page_TechDocs/GreatDebate/debate1.html) fromtheoriginalon16June2008.Retrieved20080703. 22. ^"Codesourceryfailsagain"(http://hardwarebug.org/2008/11/28/codesourceryfailsagain/).hardwarebug.org. 20100130.Archived (http://web.archive.org/web/20100402221204/http://hardwarebug.org/2008/11/28/codesourceryfailsagain/)from theoriginalon2April2010.Retrieved20100304. 23. ^"BLASBenchmarkAugust2008"(http://eigen.tuxfamily.org/index.php?title=BenchmarkAugust2008). eigen.tuxfamily.org.20080801.Retrieved20100304. 24. ^"x264.git/common/x86/dct32.asm"(http://git.videolan.org/?p=x264.gita=treef=common/x86hb=HEAD). git.videolan.org.20100929.Retrieved20100929. 25. ^"68KProgramminginFargoII"(http://tifreakware.net/tutorials/89/a/calc/fargoii.htm).Archived (http://web.archive.org/web/20080702181616/http://tifreakware.net/tutorials/89/a/calc/fargoii.htm)fromthe originalon2July2008.Retrieved20080703. 26. ^Hyde,Randall(19960930)."Foreword("Whywouldanyonelearnthisstuff?"), op.cit. " (http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/fwd.html).Archived (http://web.archive.org/web/20100325155048/http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/fwd .html)fromtheoriginalon25March2010.Retrieved20100305. 27. ^TechnicallyBALwasonlytheassemblerfor BPStheothersweremacroassemblers. 28. ^Stroustrup,Bjarne(1986). TheC++ProgrammingLanguage.AddisonWesley.ISBN020112078X."C++ wasprimarilydesignedsothattheauthorandhisfriendswouldnothavetoprograminassembler,C,orvarious modernhighlevellanguages.[useoftheterm assemblertomean assemblylanguage]" 29. ^Saxon,JamesPlette,William(1962)."ProgrammingtheIBM1401".PrenticeHall.LoC6220615.[useofthe term assemblyprogram] 30. ^MicrosoftCorporation."MASM:Directives&PseudoOpcodes"(http://flint.cs.yale.edu/cs422/doc/artof asm/pdf/CH08.PDF).RetrievedMarch19,2011. 31. ^(JohnDaintith,ed.)ADictionaryofComputing:"metaassembler"(http://www.encyclopedia.com/doc/1O11 metaassembler.html) 32. ^RandallHyde."WhichAssembleristheBest?"(http://webster.cs.ucr.edu/AsmTools/WhichAsm.html).Archived (http://web.archive.org/web/20071018014019/http://webster.cs.ucr.edu/AsmTools/WhichAsm.html)fromthe originalon18October2007.Retrieved20071019.

Assembly language - Wikipedia, the free encyclopedia

Furtherreading
Yurichev,Dennis,"AnIntroductionToReverseEngineeringforBeginners".Onlinebook: http://yurichev.com/writings/RE_for_beginnersen.pdf ASMCommunityBook(http://www.asmcommunity.net/book/)"AnonlinebookfullofhelpfulASM info,tutorialsandcodeexamples"bytheASMCommunity JonathanBartlett:ProgrammingfromtheGroundUp(http://programminggroundup.blogspot.com/). BartlettPublishing,2004.ISBN0975283847 AlsoavailableonlineasPDF(http://download.savannah.gnu.org/releases noredirect/pgubook/ProgrammingGroundUp10booksize.pdf) RobertBritton:MIPSAssemblyLanguageProgramming.PrenticeHall,2003.ISBN0131420445 PaulCarter:PCAssemblyLanguage.Freeebook,2001.

en.wikipedia.org/wiki/Assembly_language

16/17

1/3/14

Assembly language - Wikipedia, the free encyclopedia

Website(http://drpaulcarter.com/pcasm/) JeffDuntemann:AssemblyLanguageStepbyStep.Wiley,2000.ISBN0471375233 RandallHyde:TheArtofAssemblyLanguage.NoStarchPress,2003.ISBN1886411972 Draftversionsavailableonline(http://www.plantation productions.com/Webster/www.artofasm.com/index.html)asPDFandHTML PeterNorton,JohnSocha,PeterNorton'sAssemblyLanguageBookfortheIBMPC,BradyBooks, NY:1986. MichaelSinger,PDP11.AssemblerLanguageProgrammingandMachineOrganization,JohnWiley &Sons,NY:1980. DominicSweetman:SeeMIPSRun.MorganKaufmannPublishers,1999.ISBN1558604103 JohnWaldron:IntroductiontoRISCAssemblyLanguageProgramming.AddisonWesley,1998.ISBN 0201398281

Externallinks
Machinelanguageforbeginners(http://www.atariarchives.org/mlb/introduction.php) TheASMCommunity(http://www.asmcommunity.net/),aprogrammingresourceaboutassembly. UnixAssemblyLanguageProgramming(http://www.int80h.org/) LinuxAssembly(http://asm.sourceforge.net/) IBMHighLevelAssembler(http://www03.ibm.com/systems/z/os/zos/bkserv/r8pdf/index.html#hlasm) IBMmanualsonmainframeassemblerlanguage. PPR:LearningAssemblyLanguage(http://c2.com/cgi/wiki?LearningAssemblyLanguage) NASMTheNetwideAssembler(apopularassemblylanguage)(http://www.nasm.us/) AssemblyLanguageProgrammingExamples(http://www.azillionmonkeys.com/qed/asmexample.html) AuthoringWindowsApplicationsInAssemblyLanguage(http://www.grc.com/smgassembly.htm) Iczelion'sWin32AssemblyTutorial (https://web.archive.org/web/*/http://win32assembly.online.fr/tutorials.html)attheWaybackMachine AssemblyOptimizationTips(http://mark.masmcode.com/)byMarkLarson Retrievedfrom"http://en.wikipedia.org/w/index.php?title=Assembly_language&oldid=588510917" Categories: Assemblylanguages Assemblers Programminglanguageimplementation Thispagewaslastmodifiedon31December2013at11:46. TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmay apply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy. WikipediaisaregisteredtrademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.

en.wikipedia.org/wiki/Assembly_language

17/17

S-ar putea să vă placă și