Remarks on the example:
Assembly language uses opcode
instead of binary opcodes.
Assembly language allows memory locations to be reserved
and initialized for data.
There are 12 bits available to represent an address;
hence, the address space is effectively 212 = 4096=4K
The example assumes that the first instruction is stored
at memory location 0000 and each instruction (and data item) occupies
two memory locations, each of one byte.
The example assumes signed integers are represented using
Will I ever have to write assemble language code?!
Today, it is rare
to write large assemble language programs by hand.
high-level language compilers can almost always generate efficient code;
they can do it much faster and with many fewer bugs than we can! And we
prefer to write programs in high level languages for lots of good reasons.
computational Kernels are sometimes written in assembly language
by human experts to gain the last ounce of efficiency.
And, special purpose
systems (e.g., embedded systems) may require assembly language
programming because no high-level language compiler is available.
And finally, you
will have to know assembly language well if you are going to write a compiler,
since assembly language is typically the target (output) language of a compiler.
CS1104 Main Page
Last Updated 01/05/2000
© L.Heath, 2000