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:
“A man may be a heretic in the truth; and if he believe things only because his pastor says so, or the assembly so determines, without knowing other reason, though his belief be true, yet the very truth he holds becomes his heresy.”
—John Milton (16081674)
“He never doubts his genius; it is only he and his God in all the world. He uses language sometimes as greatly as Shakespeare; and though there is not much straight grain in him, there is plenty of tough, crooked timber.”
—Henry David Thoreau (18171862)
“Being the dependents of the general government, and looking to its treasury as the source of all their emoluments, the state officers, under whatever names they might pass and by whatever forms their duties might be prescribed, would in effect be the mere stipendiaries and instruments of the central power.”
—Andrew Jackson (17671845)
“Many people will say to working mothers, in effect, I dont think you can have it all. The phrase for have it all is code for have your cake and eat it too. What these people really mean is that achievement in the workplace has always come at a priceusually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.”
—Anne C. Weisberg (20th century)