Crossware

Table of Contents        Previous topic       Next topic       

CROSS ASSEMBLER->Assembly List Format->Source and Object Code list

The source and object code list shows the following information:

Field 1    Line number
Field 2    Program counter value or value of expression
Field 3    Program code
Field 4    Label field
Field 5    Operation field
Field 6    Operand field
Field 7    Comment field



Field 1 Line Number


The cross-assembler generates a line number for each line of source code starting at 1 and incrementing by one for each line.  This line number is used in error messages and is also, by default, displayed in the first field of the source and object code listing.

If a statement has been generated during the expansion of a macro, then it will not be a true line of source code.  A line number is not then listed and the first field of the listing is blank.  


Field 2 Program Counter Value or Value of Expression


When the statement is a normal microprocessor instruction, the DB, DW or DS pseudo-ops or just a label then the number displayed in field 2 is the value of the program counter.  This is the address of the code when mapped into the target system address space. It is also the value assigned to the symbol, if any, in the label field.  

If the operation is EQU, SET or IFcc then the value displayed in field 2 is the value of the operand expression.  For the EQU and SET operations, this is the value assigned to the symbol in the label field.  

For other operations field 2 is blank.



Field 3 Program Code


This field displays, in hexadecimal, the program code generated by the cross-assembler.  If the operation is a normal microprocessor instruction then a minimum of 1 and a maximum of 3 bytes of code will be generated and displayed here.  The width of field 3 is sufficient to contain 3 bytes and so if more than 3 bytes are generated, the extra bytes are carried over to be displayed in field 3 of the following lines.



Field 4 Label Field


The label field follows the program code field.  If a label is present at the beginning of the statement then it will be placed in the label field.

The label field is by default 10 characters wide.  Labels longer than this are listed in full and subsequent fields are shifted to the right.

The label field width can be altered using the FIELDS pseudo op.


Field 5 Operation Field


The operation field of the source code statement is displayed in the field following the label field.

The operation field is by default 10 characters wide.  This accommodates all operation mnemonics except macro calls which may be any length.  Macro calls longer than this are listed in full and subsequent fields are shifted to the right.

The operation field width can be altered using the FIELDS pseudo op.



Field 6 Operand Field


The operand field of the source code statement is displayed in the field following the operation field.

The operand field is 18 characters wide. Operands longer than this are listed in full and the comment field is shifted to the right.

The operand field width can be altered using the FIELDS pseudo op.



Field 7 Comment Field


The comment field of the source code statement is displayed in the field following the operand field.