Chapter 3 Introduction to Operation

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.

 

 

program3.lst Page 1

 

Loc

*** PanaX series Series MN1030 Cross Assembler ***

Object

Line

Source

global

main

 

 

1

 

 

 

2

 

global

data_set,

 

 

3

 

 

time_filler

 

 

_CODE_00

section

CODE, PUBLIC, 1

8000000

 

4

9000

5

main

mov

0, A0

8000000

6

 

8000002

2CFF00

7

 

mov

0xff, D0

8000005

2D8000

8

 

mov

0x80, D1

8000008

F8FEFCFCFFF44F00

9

 

jsr

data_set

8000010

00F8FE04

9

 

jsr

time_filler

8000014

F8FEFCFCFF0C0000

10

 

800001c

00F8FE04

10

 

bra

main

8000020

CAE0

11

 

 

 

12

_DATA

section

DATA, PUBLIC, 4

8000500e

00000000

13

14

data1

ds

4

 

 

15

 

end

 

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.

Assembling and Linking Multiple Sections 35

Page 47
Image 47
Panasonic MN1030 user manual CAE0 Data