Example Listing of Assembly Language Source Code
| Address | Label | Instruction (AT&T syntax) | Object code |
|---|---|---|---|
| .begin | |||
| .org 2048 | |||
| a_start | .equ 3000 | ||
| 2048 | ld length,% | ||
| 2064 | be done | 00000010 10000000 00000000 00000110 | |
| 2068 | addcc %r1,-4,%r1 | 10000010 10000000 01111111 11111100 | |
| 2072 | addcc %r1,%r2,%r4 | 10001000 10000000 01000000 00000010 | |
| 2076 | ld %r4,%r5 | 11001010 00000001 00000000 00000000 | |
| 2080 | ba loop | 00010000 10111111 11111111 11111011 | |
| 2084 | addcc %r3,%r5,%r3 | 10000110 10000000 11000000 00000101 | |
| 2088 | done: | jmpl %r15+4,%r0 | 10000001 11000011 11100000 00000100 |
| 2092 | length: | 20 | 00000000 00000000 00000000 00010100 |
| 2096 | address: | a_start | 00000000 00000000 00001011 10111000 |
| .org a_start | |||
| 3000 | a: |
Example of a selection of instructions (for a virtual computer) with the corresponding address in memory where each instruction will be placed. These addresses are not static, see memory management. Accompanying each instruction is the generated (by the assembler) object code that coincides with the virtual computer's architecture (or ISA).
Read more about this topic: Assembly Language
Famous quotes containing the words assembly, language, source and/or code:
“Our assembly being now formed not by ourselves but by the goodwill and sprightly imagination of our readers, we have nothing to do but to draw up the curtain ... and to discover our chief personage on the stage.”
—Sarah Fielding (17101768)
“The hypothesis I wish to advance is that ... the language of morality is in ... grave disorder.... What we possess, if this is true, are the fragments of a conceptual scheme, parts of which now lack those contexts from which their significance derived. We possess indeed simulacra of morality, we continue to use many of the key expressions. But we havevery largely if not entirelylost our comprehension, both theoretical and practical, of morality.”
—Alasdair Chalmers MacIntyre (b. 1929)
“If, for instance, they have heard something from the postman, they attribute it to a semi-official statement; if they have fallen into conversation with a stranger at a bar, they can conscientiously describe him as a source that has hitherto proved unimpeachable. It is only when the journalist is reporting a whim of his own, and one to which he attaches minor importance, that he defines it as the opinion of well-informed circles.”
—Evelyn Waugh (19031966)
“Acknowledge your will and speak to us all, This alone is what I will to be! Hang your own penal code up above you: we want to be its enforcers!”
—Friedrich Nietzsche (18441900)