31 lines
727 B
Markdown
31 lines
727 B
Markdown
# ARM ISA
|
|
|
|
## Syntax of Assembly
|
|
|
|
* Label: Define a symbol
|
|
```
|
|
label:
|
|
```
|
|
|
|
* Instruction
|
|
* Directive
|
|
```
|
|
.directive[;]
|
|
```
|
|
* macro_invocation
|
|
|
|
## Assembly Expression
|
|
|
|
Expressions consist of one or more integer literals or symbol references, combined using operators. Expression can be used as instruction operands or directive argument.
|
|
|
|
Assembler evaluates all expression, which means **no rum-time evaluation**.
|
|
|
|
Assembly Expressions are
|
|
* Constnats
|
|
* Symbol References
|
|
* Operators
|
|
* Unary Operators: `+`, `-`, `~`
|
|
* Binary Operators: `+`, `-`, `*`, `/`, `%`
|
|
* Binary Logical Operators: `&&`, `||`
|
|
* Binary Bitwise Operators: `&`, `|`, `^`, `>>`, `<<`
|
|
* Binary Comparison Operators: `<`, `<=`, `>`, `>=`, `==`, `!=` |