Assembly
1. Access all the functions/registers of ATMega328
2. Working with the program counter and the stack
3. No predefined data types
4. working directly with address or pointers
Directive:
1. Define global variables
2. Create data
3. Specify address
4. Determine what header files tobe included
Contoh:
.set untuk mendefenisikan variabel.
.equ untuk constants.
Symbols: names for values or addresses
Syntax specific addressing modes
Numerical values:
1.Decimal
2. Biner
3. Hex
Comments
Assembly code forms
Everyline of code should be one of the following
1. [label:] directive [operands] [comment]
2. [label:] instruction [operands] [Comment]
3. comment
4. Empty line
OPERANDS
1. can be a labels
2. variables defined by the .set directive
3. constants defined by the .equ directive
4. integer constants:
- Decimal: 10, 255
- Hex : 0x0a, or $0a
- Binary : 0b00001010
5. Program counter (PC)
1. Access all the functions/registers of ATMega328
2. Working with the program counter and the stack
3. No predefined data types
4. working directly with address or pointers
Directive:
1. Define global variables
2. Create data
3. Specify address
4. Determine what header files tobe included
Contoh:
.set untuk mendefenisikan variabel.
.equ untuk constants.
Symbols: names for values or addresses
Syntax specific addressing modes
Numerical values:
1.Decimal
2. Biner
3. Hex
Comments
Assembly code forms
Everyline of code should be one of the following
1. [label:] directive [operands] [comment]
2. [label:] instruction [operands] [Comment]
3. comment
4. Empty line
OPERANDS
1. can be a labels
2. variables defined by the .set directive
3. constants defined by the .equ directive
4. integer constants:
- Decimal: 10, 255
- Hex : 0x0a, or $0a
- Binary : 0b00001010
5. Program counter (PC)
No comments:
Post a Comment