Tuesday 17 March 2015

Kernels are just a code.

Learn variety of interupt and registers.

Directive, instruction, labels

Function (this just an excerpt)
1. Register set
1.1 Register set to a constant
1.2 Register set to 0
1.3 Register set to 255

2. Copy
2.1 Copy register to register
2.2 Copy SRAM to register, directly
2.3 SRAM register
2.4 SRAM to register and INC
2.5 DEC, SRAM to register
2.6 SRAM, displaced to register
2.7 Port to Register
2.8 Stack to register
2.9 etc...

3. Add
3.1 Add 8 bit + 1
3.2 Add 8 bit, for example: add r1, r2
3.3 8 bit + carry
3.4 etc...

4. Substract
4.1 8 bit -1, for example: DEC r1
4.2 8 bit, for example: SUB r1, r2
4.3 8 bit, constant, SUBI rh, c255
4.4 etc

5 Shift
5.1 Shift logic left
5.2 Shift logic right

6. Binary
6.1 Binary And, for example: AND r1, r2
6.2 Binary Or, for example OR r1, r2
6.3 Binary Exclusive-OR, for example: EOR r1, r2
6.4 Ones-complement, for example: COM r1
6.5 Twos-complement: NEG r1

7. Bits change
7.1 Register, set
7.2 Register, clear

8. Status bit set
8.1 Zero flag
8.2 Carry flag
8.3 Negative flag

9. Status bit clear
9.1 Zero f

10. Compare
10.1 Compare register to register, for example: CP r1, r2
10.2 Register, Register + carry, for example: CPC r1, r2

11. Immediate jump
11.1 Relative
11.2

12. Conditional jump
12. Jump if status bit set
12.2 Jump if status bit clear, for example: BRBC b7, c127
12.3 Jump if equal, for example: BREQ c127

13. Conditioned jump
13.1 Register bit = 0, for example: SBRC r1, b7

14. Others
14.1 NOP = no operation
14.2 Sleep = Sleep
14.3 Watchdog reset = WDR




No comments:

Post a Comment