Hello, I am fighting with 16f690 processor. I have two INT variables and add 
them together. SDCC generates following code:

;       .line   349; "main.c"   gYfilter = gYfilter + gYrotation;
        BANKSEL _gYrotation
        MOVF    _gYrotation,W
        BANKSEL _gYfilter
        ADDWF   _gYfilter,F
        BANKSEL _gYrotation
        MOVF    (_gYrotation + 1),W
        BTFSC   STATUS,0
        INCF    (_gYrotation + 1),W
        BTFSC   STATUS,2
        GOTO    _00004_DS_
        BANKSEL _gYfilter
        ADDWF   (_gYfilter + 1),F

_00004_DS_:

Is it correct ? if both low bytes are 0x00, first btfsc skips and the second 
skips as well. so there will be no addition at all.

Or did I miss something ?

Thank you,
Vasek

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to