Panasonic PanaXSeries MN1030 Series User Manual page 43

Panasonic microcomputer user's manual
Table of Contents

Advertisement

The contents of program4.asm are as follows.
_CODE_01
data_set
data_set_
data_set_end
_CODE_00
time_filler
Time_filler
time_filler
As can be seen from the above two files, these programs are divided as follows.
main, time_filler ..._CODE_00
data_set
data1
Assemble and generate list files
Next assemble the two programs. Assemble with the option for output of list files in order to see what
the list file is like when final addresses are not resolved.
as103 -l -g program3.asm
as103 -l -g program4.asm
g option
l option
This will assemble the two source files (program3.asm and program4.asm) in the current directory. It
will add debug information (g option) to the relocatable object files (program3.rf and program4.rf), and
global
data_set, time_filler
section
CODE, PUBLIC, 1
mov
0, D2
loop
cmp
D1, D2
bcc
data_set_end
mov
D0, (A0)
add
1, D2
add
2, A0
bra
data_set_loop
rts
section
CODE, PUBLIC,1
mov
0, D2
_loop
cmp
D1, D0
bcc
time_filler_end
bra
time_filler_loop
_end
rts
end
..._CODE_01
..._DATA
Option to output debug information in the relocatable object file.
Option to output list file (not normally specified at this stage before linking, but
specify it here to see intermediate values).
Chapter 3 Introduction to Operation
Assembling and Linking Multiple Sections 31

Advertisement

Table of Contents
loading

Table of Contents