LCD Type MCU
Assembly Instructions
The syntax of an instruction has the following form:
[name:]
mnemonic
[operand1[,operand2]] [;comment]
where
name:
mnemonic
operand1
operand2
®
label name
®
instruction name (keywords)
®
registers
memory address
®
registers
memory address
immediate value
Name
A name is made up of letters, digits, and special characters, and is used as a label.
Mnemonic
Mnemonic is an instruction name dependent upon the type of the MCU used in the source pro-
gram.
Operand, Operator and Expression
Operands (source or destination) are the argument defining values that are to be acted on by in-
structions. They can be constants, variables, registers, expressions or keywords. When using the
instruction statements, care must be taken to select the correct operand type, i.e. source operand
or destination operand. The dollar sign $ is a special operand, namely, the current location oper-
and.
An expression consists of many operands that are combined to describe a value or a memory loca-
tion. The combined operators are evaluated at assembly time. They can contain constants, sym-
bols, or any combination of constants and symbols that are separated by arithmetic operators.
Operators specify the operations to be performed while combining the operands of an expression.
The Cross Assembler provides many operators to combine and evaluate operands. Some opera-
tors work with integer constants, some with memory values, and some with both. Operators han-
dle the calculation of constant values that are known at the assembly time. The following are some
operators provided by the Cross Assembler.
·
Arithmetic operators + - * / % (MOD)
·
SHL and SHR operators
-
Syntax
expression
SHR
count
expression
SHL
count
148
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index