Chapter 8 Writing Source Statements

8.7.3Expression Syntax

Below is an expression syntax diagram

(

expression

)

expression

binary operator

expression

 

unary operator

 

 

symbol

 

 

constant

 

 

*

 

Expression Syntax

NOTE:

When the expressions starting with parenthesis are coded to the operands of

 

 

Machine language instructions, it will be regarded as an address-reference. To

 

 

be proceeded as expressions, put 0+ before the parenthesis and distinguish

 

 

them from others.

 

 

 

mov

(10+5), d0

; move the value of address 15 to d0

 

 

; equal to mov(15), d0

mov

(0+(10+5), d0

; move the value of constant 15 to d0 equal to mov 15, d0

mov

(10+5)+2, d0

; Error. "(10+5)" is regarded as an address-reference.

 

 

; It causes syntax error.

Expressions 141

Page 153
Image 153
Panasonic MN1030 user manual Expression Syntax, Mov 10+5, d0, Mov +10+5, d0, Mov 10+5+2, d0