Assembly Instructions
The syntax of an instruction has the following form:
[
name
:]
mnemonic
[
operand1
[,
operand2
]] [;
comment
]
where
name
:
®
label name
mnemonic
®
instruction name (keywords)
operand1
®
registers
memory address
operand2
®
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 ope - * / % (MOD)
·
SHL and SHR operators
-
Syntax
expression
SHR
c
ount
expression
SHL
count
112
A/D Type MCU
Summary of Contents for HT46R22
Page 7: ...vi A D Type MCU...
Page 9: ...viii A D Type MCU...
Page 10: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Page 11: ...2 A D Type MCU...
Page 90: ...P a r t I I Programming Language Part II Programming Language 81...
Page 91: ...82 A D Type MCU...
Page 97: ...88 A D Type MCU...
Page 128: ...P a r t I I I Development Tools Part III Development Tools 119...
Page 129: ...120 A D Type MCU...
Page 140: ...Appendix Appendix 131...
Page 141: ...132 A D Type MCU...
Page 151: ...142 A D Type MCU...
Page 152: ...A p p e n d i x B Package Information Appendix B Package Information 143 B...
Page 161: ...A D Type MCU...
Page 162: ...Amendments...