Tema: Re: Padekit pagaut bug'a (Arduino)
Autorius: Levas
Data: 2015-06-22 20:59:32
atsakysiu paprastai: kam ta isviso daryti?

On 2015.06.22 07:06, lietuvys wrote:
> O kodėl gi? Loginės funkcijos: And, Shift right, Xor.
>
> Beje, čia mano programos, jei neklystu, ISR6 ir ISR7 kompiliavimo list'as:
> 000005b4 <__vector_7>:
>       5b4:    1f 92           push    r1
>       5b6:    0f 92           push    r0
>       5b8:    0f b6           in    r0, 0x3f    ; 63
>       5ba:    0f 92           push    r0
>       5bc:    11 24           eor    r1, r1
>       5be:    2f 93           push    r18
>       5c0:    3f 93           push    r19
>       5c2:    8f 93           push    r24
>       5c4:    9f 93           push    r25
>       5c6:    af 93           push    r26
>       5c8:    bf 93           push    r27
>       5ca:    e6 9a           sbi    0x1c, 6    ; 28
>       5cc:    8c b1           in    r24, 0x0c    ; 12
>       5ce:    88 1f           adc    r24, r24
>       5d0:    88 27           eor    r24, r24
>       5d2:    88 1f           adc    r24, r24
>       5d4:    80 93 b8 03     sts    0x03B8, r24
>       5d8:    90 91 b8 03     lds    r25, 0x03B8
>       5dc:    80 91 ba 03     lds    r24, 0x03BA
>       5e0:    98 17           cp    r25, r24
>       5e2:    89 f1           breq    .+98         ; 0x646
> <__vector_7+0x92>
>       5e4:    20 91 b8 03     lds    r18, 0x03B8
>       5e8:    8c b1           in    r24, 0x0c    ; 12
>       5ea:    30 e0           ldi    r19, 0x00    ; 0
>       5ec:    82 95           swap    r24
>       5ee:    86 95           lsr    r24
>       5f0:    86 95           lsr    r24
>       5f2:    83 70           andi    r24, 0x03    ; 3
>       5f4:    90 e0           ldi    r25, 0x00    ; 0
>       5f6:    81 70           andi    r24, 0x01    ; 1
>       5f8:    90 70           andi    r25, 0x00    ; 0
>       5fa:    28 17           cp    r18, r24
>       5fc:    39 07           cpc    r19, r25
>       5fe:    61 f0           breq    .+24         ; 0x618
> <__vector_7+0x64>
>       600:    80 91 bc 03     lds    r24, 0x03BC
>       604:    90 91 bd 03     lds    r25, 0x03BD
>       608:    a0 91 be 03     lds    r26, 0x03BE
>       60c:    b0 91 bf 03     lds    r27, 0x03BF
>       610:    01 97           sbiw    r24, 0x01    ; 1
>       612:    a1 09           sbc    r26, r1
>       614:    b1 09           sbc    r27, r1
>       616:    0b c0           rjmp    .+22         ; 0x62e
> <__vector_7+0x7a>
>       618:    80 91 bc 03     lds    r24, 0x03BC
>       61c:    90 91 bd 03     lds    r25, 0x03BD
>       620:    a0 91 be 03     lds    r26, 0x03BE
>       624:    b0 91 bf 03     lds    r27, 0x03BF
>       628:    01 96           adiw    r24, 0x01    ; 1
>       62a:    a1 1d           adc    r26, r1
>       62c:    b1 1d           adc    r27, r1
>       62e:    80 93 bc 03     sts    0x03BC, r24
>       632:    90 93 bd 03     sts    0x03BD, r25
>       636:    a0 93 be 03     sts    0x03BE, r26
>       63a:    b0 93 bf 03     sts    0x03BF, r27
>       63e:    80 91 b8 03     lds    r24, 0x03B8
>       642:    80 93 ba 03     sts    0x03BA, r24
>       646:    bf 91           pop    r27
>       648:    af 91           pop    r26
>       64a:    9f 91           pop    r25
>       64c:    8f 91           pop    r24
>       64e:    3f 91           pop    r19
>       650:    2f 91           pop    r18
>       652:    0f 90           pop    r0
>       654:    0f be           out    0x3f, r0    ; 63
>       656:    0f 90           pop    r0
>       658:    1f 90           pop    r1
>       65a:    18 95           reti
>
> 0000065c <__vector_8>:
>       65c:    1f 92           push    r1
>       65e:    0f 92           push    r0
>       660:    0f b6           in    r0, 0x3f    ; 63
>       662:    0f 92           push    r0
>       664:    11 24           eor    r1, r1
>       666:    8f 93           push    r24
>       668:    9f 93           push    r25
>       66a:    af 93           push    r26
>       66c:    bf 93           push    r27
>       66e:    e7 9a           sbi    0x1c, 7    ; 28
>       670:    8c b1           in    r24, 0x0c    ; 12
>       672:    82 95           swap    r24
>       674:    86 95           lsr    r24
>       676:    86 95           lsr    r24
>       678:    81 70           andi    r24, 0x01    ; 1
>       67a:    80 93 b9 03     sts    0x03B9, r24
>       67e:    90 91 b9 03     lds    r25, 0x03B9
>       682:    80 91 bb 03     lds    r24, 0x03BB
>       686:    98 17           cp    r25, r24
>       688:    59 f1           breq    .+86         ; 0x6e0
> <__vector_8+0x84>
>       68a:    90 91 b9 03     lds    r25, 0x03B9
>       68e:    8c b1           in    r24, 0x0c    ; 12
>       690:    88 1f           adc    r24, r24
>       692:    88 27           eor    r24, r24
>       694:    88 1f           adc    r24, r24
>       696:    98 17           cp    r25, r24
>       698:    61 f0           breq    .+24         ; 0x6b2
> <__vector_8+0x56>
>       69a:    80 91 bc 03     lds    r24, 0x03BC
>       69e:    90 91 bd 03     lds    r25, 0x03BD
>       6a2:    a0 91 be 03     lds    r26, 0x03BE
>       6a6:    b0 91 bf 03     lds    r27, 0x03BF
>       6aa:    01 96           adiw    r24, 0x01    ; 1
>       6ac:    a1 1d           adc    r26, r1
>       6ae:    b1 1d           adc    r27, r1
>       6b0:    0b c0           rjmp    .+22         ; 0x6c8
> <__vector_8+0x6c>
>       6b2:    80 91 bc 03     lds    r24, 0x03BC
>       6b6:    90 91 bd 03     lds    r25, 0x03BD
>       6ba:    a0 91 be 03     lds    r26, 0x03BE
>       6be:    b0 91 bf 03     lds    r27, 0x03BF
>       6c2:    01 97           sbiw    r24, 0x01    ; 1
>       6c4:    a1 09           sbc    r26, r1
>       6c6:    b1 09           sbc    r27, r1
>       6c8:    80 93 bc 03     sts    0x03BC, r24
>       6cc:    90 93 bd 03     sts    0x03BD, r25
>       6d0:    a0 93 be 03     sts    0x03BE, r26
>       6d4:    b0 93 bf 03     sts    0x03BF, r27
>       6d8:    80 91 b9 03     lds    r24, 0x03B9
>       6dc:    80 93 bb 03     sts    0x03BB, r24
>       6e0:    bf 91           pop    r27
>       6e2:    af 91           pop    r26
>       6e4:    9f 91           pop    r25
>       6e6:    8f 91           pop    r24
>       6e8:    0f 90           pop    r0
>       6ea:    0f be           out    0x3f, r0    ; 63
>       6ec:    0f 90           pop    r0
>       6ee:    1f 90           pop    r1
>       6f0:    18 95           reti
>
>
> On 2015.06.17 08:40, Levas wrote:
>>
>>
>> On 2015.06.17 00:02, lietuvys wrote:
>>> (B ^ ((PINE >> PE7) & 1))
>>
>> sita konstrukcija turetu esti resursus.
>>
>

-- 
Bye, Levas

--
http://www.vabolis.lt