Loc

This column contains the address of the instruction. For absolute sections, the address is preceded by an a and contains the absolute address of the instruction. For relocatable sections, this address is the offset of the instruction from the beginning of the relocatable section. This offset is a hexadecimal number coded on 6 digits.

A value is written in this column in front of each instruction generating code or allocating storage. This column is empty in front of each instruction that does not generate code (for example SECTION, XDEF). See the following listing:

Listing: Example Listing File - Loc column
Abs. Rel.  Loc     Obj. code   Source line
 ---- ----  ------- ---------   -----------
    1    1                      ;-------------------------------
    2    2                      ; File: test.o
    3    3                      ;-------------------------------
    4    4
    5    5                               XDEF  Start
    6    6                      MyData:  SECTION
    7    7   000000             char1:   DS.B  1
    8    8   000001             char2:   DS.B  1
    9    9                               INCLUDE "macro.inc"
   10    1i                     cpChar:  MACRO
   11    2i                                LD D0,   \1
   12    3i                                ST D0,   \2
   13    4i                              ENDM
   14   10                      CodeSec: SECTION
   15   11                      Start:
   16   12                               cpChar char1, char2
   17    2m  000000 xx xxxx    +           LD D0,   char1
   18    3m  000003 xx xxxx    +           ST D0,   char2
   19   13   000006 01                   NOP
   20   14   000007 01                   NOP

In the previous example, the hexadecimal number displayed in the column Loc. is the offset of each instruction in the section codeSec.

There is no location counter specified in front of the instruction INCLUDE"macro.inc" because this instruction does not generate code.

The instruction LD D0, char1 is located at offset 0 from the section codeSec start address.

The instruction ST D0, char2 is located at offset 3 from the section codeSec start address.