The MCore Macro Assembler, asmcore

While programs executing on a processor are capable of very powerful functions and can work with complex data structures, processors themselves understand only binary sequences of "machine code" and operate only on binary sequences of data. The machine code forms sequences of instructions for the processor to perform; the data is manipulated by these instructions.

Since humans have difficulty working with such binary sequences, each processor type has a human-readable "assembly language." Usually, there is a one-to-one correspondence between each assembly language instruction and its equivalent machine code form.

This assembly language typically supplies not only a textual representation for each instruction, but also a set of "directives" where the programmer can give instructions to the assembler itself. Directives specify data types, generate data values, specify alignment requirements for the machine code or data, and so on.

The MCore Macro Assembler asmcore takes the assembly language statements and directives of the MCore assembly language program presented to it and translates them into the equivalent MCore processor machine code and data formats. The resulting file produced is an object file, or object module. See Chapter 9, "Macro Assembler", for more information.

Usually, the linker is able to resolve all external references and produce a "fully-linked" output module which is made executable by the operating system. Alternately, if instructed to do so, the linker may simply combine several object modules into a bigger object module, perhaps still with some unresolved references.

The linker is usually instructed to link object modules together with one or more "libraries." A typical library contains a large number of object modules of its own. The linker extracts from the library only those modules which it needs in order to resolve the external references in the object modules presented to it. Libraries are useful for providing commonly used modules in an easily accessible format.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.