Panasonic MN1030 #include, Equ 0x32, Dataset Macro, Movw Data, A0 0x12 D0, A0 Endm, Section

Models: MN1030

1 340
Download 340 pages 45.29 Kb
Page 132
Image 132

Chapter 7 Type of Source Statements

Below is an example source file.

; SAMPLE PROGRAM

 

 

; comment

#include

"FILE1.H

 

 

;include a file

#define

 

 

 

;define identifier for conditional assembly

KEYBORD

equ

0x32

 

;define a constant

data_set

macro

data

 

;define a macro

 

movw

data, A0

 

 

mov

0x12,

D0

 

 

mov

D0, (A0)

 

 

endm

 

 

;end of macro

_CODE

section

CODE, PUBLIC,1

;blank statement

 

 

 

 

main

mov

0x10,

D1

;statement with label only

 

;machine language instruction statement

#ifdef

TYPE

 

 

;conditional assembly directive

#else

data_set

KEYBORD

 

;expand macro

mov

0, D1

 

 

#endif

 

 

end

 

 

;end of program

 

 

 

120 Program Format

Page 132
Image 132
Panasonic MN1030 #include, Equ 0x32, Dataset Macro, Movw Data, A0 0x12 D0, A0 Endm, Section, Main Mov 0x10, #ifdef