Assembly language

Most assemblers permit named constants, registers, and labels for program and memory locations, and can calculate expressions for operands.An assembler program creates object code by translating combinations of mnemonics and syntax for operations and addressing modes into their numerical equivalents.[20] The use of symbolic references is a key feature of assemblers, saving tedious calculations and manual address updates after program modifications.Most assemblers also include macro facilities for performing textual substitution – e.g., to generate common short sequences of instructions as inline, instead of called subroutines.There have also been several classes of translators and semi-automatic code generators with properties similar to both assembly and high-level languages, with Speedcode as perhaps one of the better-known examples.In both cases, the assembler must be able to determine the size of each instruction on the initial passes in order to calculate the addresses of subsequent symbols.The original reason for the use of one-pass assemblers was memory size and speed of assembly – often a second pass would require storing the symbol table in memory (to handle forward references), rewinding and rereading the program source on tape, or rereading a deck of cards or punched paper tape.A program written in assembly language consists of a series of mnemonic processor instructions and meta-statements (known variously as declarative operations, directives, pseudo-instructions, pseudo-operations and pseudo-ops), comments and data.Assembly language instructions usually consist of an opcode mnemonic followed by an operand, which might be a list of data, arguments or parameters.(The same rule also prevents ambiguity with the names of registers BH, CH, and DH, as well as with any user-defined symbol that ends with the letter H and otherwise contains only characters that are hexadecimal digits, such as the word "BEACH".)Most full-featured assemblers also provide a rich macro language (discussed below) which is used by vendors and programmers to generate more complex code and data sequences.(It is questionable whether such copyrights can be valid, and later CPU companies such as AMD[nb 4] and Cyrix republished Intel's x86/IA-32 instruction mnemonics exactly with neither permission nor legal penalty.)Another common use of pseudo-ops is to reserve storage areas for run-time data and optionally initialize their contents to known values.Judicious commenting is essential in assembly language programs, as the meaning and purpose of a sequence of binary machine instructions can be difficult to determine.They can also be used to add higher levels of structure to assembly programs, optionally introduce embedded debugging code via parameters and other similar features.Despite the power of macro processing, it fell into disuse in many high level languages (major exceptions being C, C++ and PL/I) while remaining a perennial for assemblers.The earliest example of this approach was in the Concept-14 macro set,[32] originally proposed by Harlan Mills (March 1970), and implemented by Marvin Kessler at IBM's Federal Systems Division, which provided IF/ELSE/ENDIF and similar control flow blocks for OS/360 assembler programs.Another design was A-Natural,[34] a "stream-oriented" assembler for 8080/Z80 processors from Whitesmiths Ltd. (developers of the Unix-like Idris operating system, and what was reported to be the first commercial C compiler).The language was classified as an assembler because it worked with raw machine elements such as opcodes, registers, and memory references; but it incorporated an expression syntax to indicate execution order.[35] In spite of that, they are still being developed and applied in cases where resource constraints or peculiarities in the target system's architecture prevent the effective use of higher-level languages.[citation needed] Kathleen Booth "is credited with inventing assembly language"[37][38] based on theoretical work she began in 1947, while working on the ARC2 at Birkbeck, University of London following consultation by Andrew Booth (later her husband) with mathematician John von Neumann and physicist Herman Goldstine at the Institute for Advanced Study.[38][39] In late 1948, the Electronic Delay Storage Automatic Calculator (EDSAC) had an assembler (named "initial orders") integrated into its bootstrap program.It used one-letter mnemonics developed by David Wheeler, who is credited by the IEEE Computer Society as the creator of the first "assembler".[43] Assembly languages eliminated much of the error-prone, tedious, and time-consuming first-generation programming needed with the earliest computers, freeing programmers from tedium such as remembering numeric codes and calculating addresses.[44] Today, assembly language is still used for direct hardware manipulation, access to specialized processor instructions, or to address critical performance issues.COBOL, FORTRAN and some PL/I eventually displaced assembly language, although a number of large organizations retained assembly-language application infrastructures well into the 1990s.Key software for IBM PC compatibles such as MS-DOS, Turbo Pascal, and the Lotus 1-2-3 spreadsheet was written in assembly language.[51][52][53] The complexity of modern processors and memory sub-systems makes effective optimization increasingly difficult for compilers and assembly programmers alike.[54][55] Increasing processor performance has meant that most CPUs sit idle most of the time,[56] with delays caused by predictable bottlenecks such as cache misses, I/O operations and paging, making raw code execution speed a non-issue for many programmers.Since a computer's behaviour is fundamentally defined by its instruction set, the logical way to learn such concepts is to study an assembly language.
MotorolaMC6800ParadigmImperativeunstructuredmetaprogrammingmacrosstructuredobject-orientedTyping disciplineFilename extensionscomputer programminglow-level programming languagearchitecture'smachine codeinstructionsstatementcommentsdirectiveslabelsmemory locationsregistersKathleenAndrew Donald Boothutility programassemblerWilkesWheelerThe Preparation of Programs for an Electronic Digital Computersource codecomputer architectureoperating systemsyntaxprocessorsystem callhigh-level programming languagesportableinterpretingcompilingsystems programmingapplication programmingNo Silver BulletFred BrooksLinux kernelmnemonicmachine instructionopcodedirectiveexpressionsaddressing modesoffsetsdebuggingpunched cardswhite spacemacroinstructioncross compilerembedded systemmicrocontrollerobject coderead-only memoryprogrammerIntel hexMotorola S-recordhigh-level assemblermicroassemblermicroprogramSDS 9 SeriesSDS Sigma seriesSperry UnivacUNIVAC 1100/2200 seriesinline assemblertranslatingmnemonicssymbolic namesinlinesubroutinesinstruction setoptimizationsjump-sizingRISC architecturesinstruction schedulingCPU pipelineFortrancode generatorsSpeedcodeinstruction set architectureIntel syntaxAT&T syntaxGNU Assemblerx86 assembly"errata"linkerno-operationpeephole optimizationforward referencespunched paper tapelinking processprogram loadhigh-level assemblersIBM 700 seriesIBM 7000 seriesIBM System/360Object-oriented programmingclassesobjectsabstractionpolymorphisminheritancemachine languageimmediate 8-bit valueregisterbinary codehexadecimaldecimaldisassemblerhigh-level languagesone-to-one correspondenceZilog Z80Intel 8080ANEC V20Pig LatinoperandsSystem/360System/370alignmentself-documenting codenamespacesdata structuresautocoderspre-processorC programming languageparametersunrolledvirtual machineSNOBOL4macro assemblerVM/CMScomputer reservation systemsOS/360system generationjob streamjob control languageutilityTuring-completestructured programmingHarlan Millsspaghetti codeWhitesmiths Ltd.compileropcodesstored-program computerKathleen BoothBirkbeck, University of LondonAndrew BoothJohn von NeumannHerman GoldstineInstitute for Advanced StudyElectronic Delay Storage Automatic CalculatorbootstrapDavid WheelerSymbolic Optimal Assembly ProgramIBM 650first-generationprogramming productivitydevice driversembedded systemsreal-timeBurroughs MCPExecutive Systems Problem Oriented LanguageIBM mainframeApple IIAtari 8-bit computersZX SpectrumCommodore 64InterpretedAtari 2600Nintendo Entertainment SystemIBM PC compatiblesMS-DOSTurbo PascalLotus 1-2-3Sega SaturnTMS34010Mortal KombatNBA JamTIOBE indexVisual Basicoptimizing compilerspaginggraphing calculatorsdemosceneretrogaminginterrupt handlersbitwise rotationrun-timelibrarieslinear algebradiscrete cosine transformationintrinsic functionsfly-by-wiregarbage collectionpreemptive multitaskinglower-level languagestiming attacksARM NeonComputer virusesbootloadersInstruction set simulatorsReverse engineeringbinariesVideo gamesROM hackingcomputer scienceelectronic engineeringbinary arithmeticmemory allocationstack processingcharacter setinterruptIBM-compatible PCoperating system kernelsPascalinline assemblyportable codedecompilerInteractive DisassemblerComparison of assemblersLittle man computerNibbleTyped assembly languagedon't-care termsOhio State UniversityCreateSpace Independent PublishingPrentice-HallWilkes, Maurice VincentWheeler, David JohnGill, Stanley J.Tomash PublishersStack Exchange Inc.Brooks, Frederick P.Ellis Horwood LimitedSimon & Schuster International GroupAddison WesleyHyde, RandallNo Starch PressIntel CorporationUniversity of VirginiaSPARC InternationalGriswold, Ralph E.W. H. Freeman and CompanyMicrosoft Corp.International Business Machines CorporationBooth, Andrew DonaldBritten, Kathleen Hylda ValerieBirkbeck College, LondonCampbell-Kelly, MartinIEEE Annals of the History of ComputingBibcodeColumbia UniversityJournal of the American Medical Informatics AssociationCRC PressTIOBE SoftwareMarkoff, John GregoryThe New York TimesGitHubNEC PinwritersBartlett PublishingPrentice HallUniversity of North Carolina at Chapel HillHorowitz, EllisComputer Science Press, Inc.Norton, PeterSocha, JohnJohn Wiley & SonsMorgan Kaufmann PublishersWikiWikiWebTypes of programming languagesMachineCompiledLow-levelHigh-levelVery high-levelEsotericGenerationSecondFourthBoard support packageBootloaderConsumer electronicsEmbedded databaseEmbedded hypervisorEmbedded OSEmbedded softwareMemory footprintSingle-board computerRaspberry PiFirmwareCustom firmwareProprietary firmwareClosed platformCripplewareDefective by DesignHacking of consumer electronicsHomebrew (video games)iOS jailbreakingPlayStation 3 JailbreakRooting (Android)Vendor lock-inBoot loadersU-BootBareboxSoftware librariesuClibcdietlibcEmbedded GLIBCProgramming toolsAlmquist shellBitBakeBuildrootBusyBoxOpenEmbeddedStand-alone shellToyboxYocto ProjectOperating systemsLinux on embedded systemsLinux for mobile devicesLight-weight Linux distributionReal-time operating systemWindows IoTWin CEProgramming languagesEmbedded CEmbedded C++Embedded JavaMISRA CMicroPythonLightweight browsersList of open-source hardwareOpen-source robotics