Chapter 3 Introduction to Operation
Assembling and Linking Multiple Sections 35
Generate final list files
After link processing is complete, generate the final list files using the map file (program3.MAP). This
will show what happens to the previous '+' and 'R' marks.
as103 -l -a m103.map program3.asm
as103 -l -a m103.map program4.asm
l option Option to output a list file.
a option Option to use a map file.
Specify the map file name after the a option, followed by the source file name. Based on the link
information written in the map file, the assembler will reassemble the source file and generate a final
list file.
Let's look at the final list files with all addresses resolved.
The contents of the final list file program3.lst are as follows.
Note that the symbol table is not displayed.
Compare this listing file to the one with indeterminate addresses. Note how the plus signs have
disappeared from lines 9-11 and how the addresses start from 80000000 (hex.), the number specified
with the -T option.
program3.lst Page 1
*** PanaX series Series MN1030 Cross Assembler ***
Loc Object Line Source
1 global main
2 global data_set,
time_filler
3
4 _CODE_00 section CODE, PUBLIC, 1
8000000 5 main
8000000 9000 6 mov 0, A0
8000002 2CFF00 7 mov 0xff, D0
8000005 2D8000 8 mov 0x80, D1
8000008 F8FEFCFCFFF44F00 9 jsr data_set
8000010 00F8FE04 9
8000014 F8FEFCFCFF0C0000 10 jsr time_filler
800001c 00F8FE04 10
8000020 CAE0 11 bra main
12
13 _DATA section DATA, PUBLIC, 4
8000500e 00000000 14 data1 ds 4
15 end