CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

%e crash

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
miro



Joined: 15 Jan 2011
Posts: 62

View user's profile Send private message

%e crash
PostPosted: Tue Apr 26, 2011 1:31 pm     Reply with quote

Can somebody verify whether %e in printf (pic24, 4.120) crashes the code? Thx,M.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Apr 26, 2011 3:34 pm     Reply with quote

Yes, it's apparently causing a stack fault due to an incorrect branch statement. The bug is already present in V4.119, while V4.112 is working correctly.

V4.112
Code:
00566:  ADD     W3,W13,W3
00568:  RETURN 
0056A:  MOV     W3,W13
0056C:  MOV     W2,W12
0056E:  MOV     W1,W11
00570:  MOV     W0,W10
00572:  RETURN 
00574:  MOV     W10,[W14+#8]
00576:  MOV     W11,[W14+#A]
00578:  MOV     W12,[W14+#C]
0057A:  MOV     W13,[W14+#E]
0057C:  MOV     [W14],W10
0057E:  MOV     [W14+#2],W11
00580:  MOV     [W14+#4],W12
00582:  MOV     [W14+#6],W13
00584:  RETURN 
00586:  MOV     W10,[W14]
00588:  MOV     W11,[W14+#2]
0058A:  MOV     W12,[W14+#4]
0058C:  MOV     W13,[W14+#6]
0058E:  MOV     [W14+#8],W10
00590:  MOV     [W14+#A],W11
00592:  MOV     [W14+#C],W12
00594:  MOV     [W14+#E],W13
00596:  RETURN 
00598:  ULNK   
0059A:  MOV     #1A,W5
0059C:  REPEAT  #7
0059E:  MOV     [--W15],[W5--]
005A0:  MOV     [--W15],W5
005A2:  RETURN 


V4.120
Code:
00566:  ADD     W3,W13,W3
00568:  BRA     59A ; SHOULD BE RETURN
0056A:  MOV     W3,W13
0056C:  MOV     W2,W12
0056E:  MOV     W1,W11
00570:  MOV     W0,W10
00572:  BRA     59A ; SHOULD BE RETURN
00574:  MOV     W10,[W14+#8]
00576:  MOV     W11,[W14+#A]
00578:  MOV     W12,[W14+#C]
0057A:  MOV     W13,[W14+#E]
0057C:  MOV     [W14],W10
0057E:  MOV     [W14+#2],W11
00580:  MOV     [W14+#4],W12
00582:  MOV     [W14+#6],W13
00584:  RETURN 
00586:  MOV     W10,[W14]
00588:  MOV     W11,[W14+#2]
0058A:  MOV     W12,[W14+#4]
0058C:  MOV     W13,[W14+#6]
0058E:  MOV     [W14+#8],W10
00590:  MOV     [W14+#A],W11
00592:  MOV     [W14+#C],W12
00594:  MOV     [W14+#E],W13
00596:  RETURN 
00598:  ULNK   
0059A:  MOV     #1A,W5
0059C:  REPEAT  #7
0059E:  MOV     [--W15],[W5--]
005A0:  MOV     [--W15],W5
005A2:  RETURN 
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group