Motorola HC12 Manuale Utente

Pagina di 328
Assembler Listing File
Source Listing
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Assembler Listing File
213
10.4.3  Location (Loc.) Listing
This column contains the address of the instruction. For absolute sections, the
address is preceded by the letter
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 address is a hexadecimal
number coded on six 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,
 …).
Example:
Abs. Rel.
Loc.
Obj. code  Source line
---- ----
------ ---------  -----------
1
1
;--------------------
2
2
; File: test.o
3
3
;--------------------
4
4
5
5                        INCLUDE "macro.inc"
6
1i                     cpChar: MACRO
7
2i                           LDD \1
8
3i                           STD \2
9
4i                         ENDM
10
5i
11
6                      codeSec: SECTION
12
7                      Start:
13
8                          cpChar ch1, ch2
14
2m
000000 FC xxxx    +      LDD ch1
15
3m
000003 7C xxxx    +      STD ch2
16
9
000006 A7              NOP
17
10
000007 A7              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
LDD ch1
is located at
offset 0 from the
codeSec
 section start address. The instruction
STD ch2
 is located at offset 3 from the
codeSec
 section start address.