E. Relocating Macro Assembler Reference. Microware C Compiler
Annonce
Annonce
Appendix E. Relocating Macro Assembler Reference
This appendix gives a summary of the operation of the "Relocating Macro Assembler" (named c.asm as distributed with the C Compiler). This appendix and the example assembly source files supplied with the C compiler should provide the basic information on how to use the "Relocating Macro Assembler" to create relocatable-object format files (ROF). It is further assumed that you are familiar with the 6809 instruction set and mnemonics. See the Microware Relocating
Assembler Manual for a more detailed description. The main function of this appendix is to enable the reader to understand the output produced by c.asm.
The Relocating Macro Assembler allows programs to be compiled separately and then linked together, and it also allows macros to be defined within programs.
Differences between the Relocating Macro Assembler (RMA) and the Microware
Interactive Assembler (MIA):
RMA does not have an interactive mode. Only a disk file is allowed as input.
RMA output is an ROF file. The ROF file must be processed by the linker to produce an executable OS9 memory module. The layout of the ROF file is described later.
RMA has a number of new directives to control the placement of code and data in the executable module. Since RMA does not produce memory modules, the MIA directives "mod" and "emod" are not present. Instead, new directives PSECT and VSECT control the allocation of code and data areas by the linker.
RMA has no equivalent to the MIA "setdp" directive. Data (and DP) allocation is handled by the linker.
E.1. Symbolic Names
A symbolic name is valid if it consists of from one to nine uppercase or lowercase characters, decimal digits or the characters "$", "_", "." or "@". RMA does not fold lowercase letters to uppercase. The names "Hi.you" and "HI.YOU" are distinct names.
E.2. Label field
If a symbolic name in the label field of a source statement is followed by a “:”
(colon), the name will be known globally (by all modules linked together). If no colon appears, the name will be known only in the PSECT in which it was defined. PSECT will be described later.
E.3. Undefined names
If a symbolic name is used in an expression and hasn’t been defined, RMA assumes the name is external to the PSECT. RMA will record information about the reference so the linker can adjust the operand accordingly. External names cannot appear in operand expressions for assembler directives.
E.4. Listing format
|
|
|
|
00098 0032 59
00117 0045=17ffb8
^
|
|
|
^
|
|
|
^^
||
||
||
|
|
||
||
+ label
^ ^
| |
| |
| | rolb lbsr
^
|
_dmove
^
|
Comment
^
Start of comment
| Start of operand
Start of mnemonic
| Start of label
A "+" indicates a line generated by a macro
| || expansion.
| |Start of object code bytes.
123
Download
Annonce