Chapter 3 Introduction to Operation

generate list files (program3.lst and program4.lst) respectively in the current directory (l option). Adding debug information (g option) enables symbols to be used during debugging.

Let's take a look at the list files that were created.

The contents of the 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

00000000

 

4

9000

5

main

mov

0, A0

00000000

6

 

00000002

2CFF00

7

 

mov

0xff, D0

00000005

2D8000

8

 

mov

0x80, D1

00000008

F8FEFCFCFF00000

+9

 

jsr

data_set

00000010

00F8FE04

9

 

jsr

time_filler

00000014

F8FEFCFCFF000000

+10

 

0000001c

00F8FE04

10

 

bra

main

00000020

CA00

+11

 

 

 

12

_DATA

section

DATA, PUBLIC,4

00000000

00000000

13

14

data1

ds

4

 

 

15

 

end

 

There is a plus sign '+' before line numbers 9 and 10. This indicates that the object code does not have final values. This is because the two functions data_set and time_filler do not exist in this program, so the call addresses will not be resolved unless linked. That further means that this list file is not the final list file.

Line number 11 also has a plus sign. This indicator warns that the line contains a symbol that is not assigned a final value until linking.

Finally, notice that the list begins from location 000000. The start addresses of section format programs are specified with the linker. Here the assembler uses relative values beginning from 000000 as location counter values.

32 Assembling and Linking Multiple Sections

Page 44
Image 44
Panasonic MN1030 user manual DATA, PUBLIC,4