Chapter 3 Introduction to Operation

The contents of program2.asm are as follows.

__CODE

global

data_set

section

CODE, PUBLIC, 1

data_set

mov

0, D2

data_set_loop

cmp

D1, D2

 

 

bcc

data_set_end

 

mov

D0, (A00

 

add

1, D2

 

add

2, A0

 

bra

data_set_loop

data_set_end

rts end

program2.asm also consists of a section called _CODE (attribute CODE, link type PUBLIC), and it makes an external declaration of data_set.

Assemble

Assemble the two programs that you created to generate relocatable object files.

as103 program1.asm

as103 program2.asm

This will generate two relocatable object files (program1.rf and program2.rf). List files cannot be generated at this stage. These files will be generated after linking when the relationships of external references and external definitions are resolved.

26 Basic Operation of Assembler and Linker

Page 38
Image 38
Panasonic MN1030 user manual Assemble, Contents of program2.asm are as follows