2018-12-19 06:16:01 -05:00
|
|
|
```
|
|
|
|
& 'C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-objdump.exe' -S "C:\\Users\\Lehtinen\\AppData\\Local\\Temp\\arduino_build_119176/test.ino.elf" > c:\temp\koe.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2018-12-19 07:12:16 -05:00
|
|
|
cli // 1 clock
|
2018-12-19 06:16:01 -05:00
|
|
|
PORTB = *ptr; // is this atomic? probably, because ptr is 6-bit pointer.
|
2018-12-19 06:35:55 -05:00
|
|
|
f98: e0 91 26 01 lds r30, 0x0126 ; 0x800126 <__data_end> // 2 clocks
|
|
|
|
f9c: f0 91 27 01 lds r31, 0x0127 ; 0x800127 <__data_end+0x1> // 2 clocks
|
|
|
|
fa0: 80 81 ld r24, Z // 1 clock
|
|
|
|
fa2: 85 b9 out 0x05, r24 ; 5 // 1 clock
|
2018-12-19 07:12:16 -05:00
|
|
|
sei // 1 clock
|
2018-12-19 06:35:55 -05:00
|
|
|
```
|
2018-12-19 07:12:16 -05:00
|
|
|
500ns
|
2018-12-19 06:35:55 -05:00
|
|
|
|
|
|
|
```
|
2018-12-19 07:12:16 -05:00
|
|
|
cli
|
2018-12-19 06:35:55 -05:00
|
|
|
mov r31, r1
|
2018-12-19 07:12:28 -05:00
|
|
|
mov r30, gpior0
|
2018-12-19 06:35:55 -05:00
|
|
|
ld r24, Z
|
|
|
|
out 0x05, r24
|
2018-12-19 07:12:16 -05:00
|
|
|
sei
|
2018-12-19 06:16:01 -05:00
|
|
|
```
|
2018-12-19 07:12:16 -05:00
|
|
|
375ns
|
2019-05-08 01:26:57 -04:00
|
|
|
|
|
|
|
## register as variable
|
|
|
|
- https://forum.arduino.cc/index.php?topic=43760.5
|
|
|
|
- http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_regbind
|
|
|
|
- volatile register unsigned char my_register asm("r2");
|