[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Compile Error
From: |
gouy yann |
Subject: |
Re: [avr-gcc-list] Compile Error |
Date: |
Sun, 23 Jan 2005 18:31:26 +0100 (CET) |
Hi,
yes, it is right.
substracting 255 to a byte data is the same as adding
1 considering the implict 256 modulo.
regards.
Yann
--- lgp <address@hidden> a écrit :
> Source file is:
>
> int main( void ){
> unsigned char a;
> a++;
> while(1);
> }
>
>
> List file is:
>
> int main( void ){
> 8e: ce e5 ldi r28, 0x5E ; 94
> 90: d4 e0 ldi r29, 0x04 ; 4
> 92: de bf out 0x3e, r29 ; 62
> 94: cd bf out 0x3d, r28 ; 61
> unsigned char a;
> a++;
> 96: 89 81 ldd r24, Y+1 ; 0x01
> 98: 8f 5f subi r24, 0xFF ; 255
> 9a: 89 83 std Y+1, r24 ; 0x01
> while(1);
> 9c: ff cf rjmp .-2 ; 0x9c
>
>
>
>
> Is it right??
>
> a++;
> 96: 89 81 ldd r24, Y+1 ; 0x01
> >> 98: 8f 5f subi r24, 0xFF ; 255 ??????
> 9a: 89 83 std Y+1, r24 ; 0x01
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
>
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/