Chapter 10 Writing Assembler Control Statements

The assembled list file is shown below. You can see that the expression's value is 0, so block 2 was assembled.

 

 

 

 

ifgt.lst

Page 1

 

***

PanaX Series MN1030 Cross Assembler

***

Loc

Object

Line

Source

 

 

 

 

1

DEVICE

equ

1

 

 

2

;

 

 

 

 

3

_TEXT

section

CODE, PUBLIC, 1

 

 

4

#ifgt

DEVICE-1

 

 

 

5

 

mov

0x01, D0

 

 

6

#else

 

 

00000000

8002

7

 

mov

0x02, D0

 

 

8

#endif

 

 

 

 

9

#ifge

DEVICE-1

 

00000002

8503

10

 

mov

0x03, D1

 

 

11

#else

 

 

 

 

12X

 

mov

0x04, D1

 

 

13

#endif

 

 

Conditional Assembly 201

Page 213
Image 213
Panasonic MN1030 user manual Mov 0x01, D0 #else, Mov 0x02, D0 #endif #ifge