avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Wierd Calls.


From: David VanHorn
Subject: [avr-gcc-list] Wierd Calls.
Date: Tue, 10 Mar 2009 12:01:05 -0400

I'm probably doing something wrong again..
 
I've seen this on and off, as I'm stepping through the compiled code in the asm window.
I will have a call that makes no sense to me, sort of randomly appearing as I change the code, and dissapearing for no obvious reason.  It's always to the lcd_init routine, even though this code has nothing to do with the LCD...
 
Below is where it's currently happening.
This SHOULD just load BIN with a value between 0 and 31.
It has to pull data from Raw_Data[0] according to the value of Raw_Data_Index which will be between 0 and 511.   Raw_Samples is 512, and Sample_Bins is 32.
 
1051:      Bin = (Raw_Data[0][Raw_Data_Index]) / (Raw_Samples / Sample_Bins); // Find the bin for the old raw data
+0000031B:   90C00076    LDS       R12,0x0076     Load direct from data space
+0000031D:   90D00077    LDS       R13,0x0077     Load direct from data space
+0000031F:   01F6        MOVW      R30,R12        Copy register pair
+00000320:   53EC        SUBI      R30,0x3C       Subtract immediate
+00000321:   4FFF        SBCI      R31,0xFF       Subtract immediate with carry
+00000322:   8180        LDD       R24,Z+0        Load indirect with displacement
+00000323:   E06F        LDI       R22,0x0F       Load immediate
+00000324:   940E062C    CALL      0x0000062C     Call subroutine
+00000326:   2FA8        MOV       R26,R24        Copy register
+00000327:   E0B0        LDI       R27,0x00       Load immediate
I don't understand why it's calling the LCD routine..
 
609:      }/* lcd_init */
+0000062C:   1B99        SUB       R25,R25        Subtract without carry
+0000062D:   E079        LDI       R23,0x09       Load immediate
+0000062E:   C004        RJMP      PC+0x0005      Relative jump
+0000062F:   1F99        ROL       R25            Rotate Left Through Carry
+00000630:   1796        CP        R25,R22        Compare
+00000631:   F008        BRCS      PC+0x02        Branch if carry set

--
David VanHorn
Hardware Engineer
MobileFusion, Inc
2715 Sarah St
Pittsburgh PA, 15203
Phone: (001) 412-481-1111
Cell: (001) 765-215-8521
Fax: (001) 412-481-0220
address@hidden
www.mobilefusioninc.com

****************************************************************************
This communication (including any attachments) is for the use of the
intended recipient(s) only and may contain information that is
confidential, privileged or otherwise legally protected. Any
unauthorized use or dissemination of this communication is
prohibited. If you have received this communication in error, please
immediately notify the sender by return e-mail message and delete
all copies of the original communication. Thank you for your
cooperation.
****************************************************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]