[{"data":1,"prerenderedAt":243},["ShallowReactive",2],{"generation-2gl":3,"generation-members-2gl":230,"generation-siblings":231},{"id":4,"title":5,"author":6,"body":7,"description":197,"extension":205,"features":206,"generation":212,"homepage":6,"logo":6,"meta":213,"name":5,"navigation":214,"note":215,"path":216,"references":217,"seo":225,"status":226,"stem":227,"urls":6,"year":228,"__hash__":229},"generations\u002Fgenerations\u002F2gl.md","Second-generation language",null,{"type":8,"value":9,"toc":196},"minimark",[10,15,55,59,101,105,112,116,131,153,157,176],[11,12,14],"h2",{"id":13},"overview","Overview",[16,17,18,19,23,24,27,28,31,32,39,40,44,45,49,50,54],"p",{},"A second-generation language is an ",[20,21,22],"strong",{},"assembly language",": a ",[20,25,26],{},"mnemonic\nmapping"," onto one processor family's instruction set, converted to machine code\nby an ",[20,29,30],{},"assembler",". ",[33,34,38],"a",{"href":35,"rel":36},"https:\u002F\u002Fwww.rogerclarke.com\u002FSOS\u002FSwareGenns.html",[37],"nofollow","Clarke's model","\ncalls the translation ",[41,42,43],"em",{},"isomorphic"," — the highest level of machine activity is a\ndirect, mechanical substitution of symbols for bit patterns. It sits between\n",[33,46,48],{"href":47},"\u002Fgenerations\u002F1gl","first-generation machine code"," and the\n",[33,51,53],{"href":52},"\u002Fgenerations\u002F3gl","third-generation"," languages that broke the one-to-one mapping.",[11,56,58],{"id":57},"defining-characteristics","Defining characteristics",[60,61,62,69,75,85,95],"ul",{},[63,64,65,68],"li",{},[20,66,67],{},"Mnemonics, not numbers."," Instructions and locations get names. That is the\nwhole gain: the notation becomes readable and writable by a human while the\nunderlying shape stays identical.",[63,70,71,74],{},[20,72,73],{},"One-to-one with machine instructions."," A line of assembly corresponds to a\nprocessor command, optionally with macros expanding one line to several. Because\nthe correspondence is this tight, the language is still \"the machine's terms\"\nrather than an abstraction over them.",[63,76,77,80,81,84],{},[20,78,79],{},"An assembler is mandatory."," Unlike first-generation code, this notation\ncannot be executed as written; it ",[20,82,83],{},"requires an assembler"," to produce the\nbit patterns the hardware consumes.",[63,86,87,90,91,94],{},[20,88,89],{},"Processor-family-specific."," The language belongs to an instruction set, so\nprograms remain ",[20,92,93],{},"machine-dependent",": moving to another architecture means\nrewriting, and assemblers are themselves written per target.",[63,96,97,100],{},[20,98,99],{},"Still used where the machine is the point."," Boot loaders, interrupt\nvectors, device drivers, and hand-tuned inner loops are written here because\nnothing sits closer to the hardware.",[11,102,104],{"id":103},"status","Status",[16,106,107,108,111],{},"Historical as a general-purpose choice, active as a specialized one. Ordinary\napplication code moved upward once compilers could match hand-written assembly;\nassembly survives where the exact instruction sequence ",[41,109,110],{},"is"," the requirement.",[11,113,115],{"id":114},"why-the-tier-exists","Why the tier exists",[16,117,118,119,122,123,126,127,130],{},"Assembly is the first rung that separates ",[41,120,121],{},"what the machine executes"," from ",[41,124,125],{},"what\nthe programmer writes",". Everything above it — every later generation, beginning\nwith the ",[33,128,129],{"href":52},"third"," — inherits that separation, which is why the\nladder only becomes interesting from here on.",[16,132,133,134,139,140,143,144,147,148,152],{},"Seen through ",[33,135,138],{"href":136,"rel":137},"https:\u002F\u002Fwww.cs.yale.edu\u002Fhomes\u002Fperlis-alan\u002Fquotes.html",[37],"Perlis's criterion","\n— ",[41,141,142],{},"\"A programming language is low level when its programs require attention to\nthe irrelevant\""," — assembly buys a specific and limited improvement: it deletes\nthe ",[20,145,146],{},"instruction encoding"," from the set of things a programmer must keep in\nmind. Writing ",[149,150,151],"code",{},"MOV AX, 4C00h"," instead of the corresponding byte pattern removes\none class of irrelevant attention and leaves the rest intact. Register\nassignment, address arithmetic, the calling convention, and per-architecture\ndifferences all remain the programmer's problem, which is exactly why assembly is\nstill low level by that definition even though it is a generation higher than\nmachine code.",[11,154,156],{"id":155},"a-note-on-the-date","A note on the date",[16,158,159,160,163,164,167,168,171,172,175],{},"The ",[149,161,162],{},"year"," recorded here is ",[20,165,166],{},"1949",", and like the ",[33,169,170],{"href":47},"first-generation\npage"," it is an era marker rather than a sourced\nfirst-appearance date. Assembly has no coining moment either: mnemonic coding\nschemes were devised by individual programmers and machine vendors through the\nlate 1940s and were not named as a ",[41,173,174],{},"generation"," until the label was back-formed\nin the 1960s. 1949 is an anchor for the first assembler-like programs, not a\nclaim that assembly was invented that year.",[16,177,178,179,182,183,187,188,191,192,195],{},"What ",[41,180,181],{},"can"," be dated is the recognition, not the technique —\n",[33,184,186],{"href":35,"rel":185},[37],"Clarke"," records that the\n1GL\u002F2GL labels were applied retroactively once \"third generation\" entered use.\nThe tier is therefore better identified by what it removes than by when it\nappeared, and the Perlis criterion above is the durable description: assembly\ndeletes instruction encoding from the set of things a programmer must attend to,\nand nothing more. Compare ",[149,189,190],{},"4gl","'s 1981, which marks Martin's publication of the\nterm, and ",[149,193,194],{},"5gl","'s, which marks the launch of the Japanese project — both are\ngenuine coinages, and this page has no equivalent.",{"title":197,"searchDepth":198,"depth":198,"links":199},"",2,[200,201,202,203,204],{"id":13,"depth":198,"text":14},{"id":57,"depth":198,"text":58},{"id":103,"depth":198,"text":104},{"id":114,"depth":198,"text":115},{"id":155,"depth":198,"text":156},"md",[207,208,209,210,93,211],"mnemonic-mapping","one-to-one-with-machine","requires-assembler","processor-family-specific","attention-to-irrelevant-detail","2gl",{},true,"Symbolic mnemonics standing in for the machine instruction set, translated by an assembler. The mapping stays one-to-one, so the programmer still thinks in the processor's terms — just in readable ones.","\u002Fgenerations\u002F2gl",[218,221,223],{"url":219,"title":220},"https:\u002F\u002Farchive.org\u002Fdetails\u002Fcomputerscienceo0000broo_e5b8","Computer Science: An Overview (11th ed.) — J. Glenn Brookshear",{"url":35,"title":222},"A Contingency Approach to the Application Software Generations — Roger Clarke (1991), Exhibit 1",{"url":136,"title":224},"Epigrams in Programming — Alan J. Perlis (ACM SIGPLAN Notices, September 1982), epigram 8",{"title":5,"description":197},"historical","generations\u002F2gl",1949,"y4XvkrQenxo1eYGZ9voqbWNwaT-N6chTKmyCAv037bs",[],[232,234,235,237,240],{"name":233,"path":47},"First-generation language",{"name":5,"path":216},{"name":236,"path":52},"Third-generation language",{"name":238,"path":239},"Fourth-generation language","\u002Fgenerations\u002F4gl",{"name":241,"path":242},"Fifth-generation language","\u002Fgenerations\u002F5gl",1795219071734]