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

Is rotate_right broke in V4.x

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



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

Is rotate_right broke in V4.x
PostPosted: Wed Oct 11, 2006 11:25 am     Reply with quote

----------edited---------
FIXED 4.012
----------edited---------
If I put in the printf this code compiles.
But if it is removed it gives error that rotate_right expects a * pointer.
any statement will work instead of the printf,.. g=0; ect.

Could someone confirm this.
Am I missing something?

Code:
#include <16F877A.h>
#device *=16
#fuses hs,nowdt,noprotect,nolvp,put
#use delay(clock=20000000)
#use rs232(baud=19200,xmit=PIN_E2,invert,stream=debug,disable_ints)
#use rs232(baud=1200,errors,xmit=PIN_C6,rcv=PIN_C7,parity=e,enable=PIN_C5,bits=8,stream=CIM)
#case
#zero_ram

void main(void){
  int32 g;
  //fprintf(DEBUG,"STARTING\n\r");
  rotate_right(&g,4);
  while(1);
}


Last edited by treitmey on Mon Oct 16, 2006 8:44 am; edited 1 time in total
Mauricio Lopes



Joined: 11 Oct 2006
Posts: 5

View user's profile Send private message

PostPosted: Wed Oct 11, 2006 12:17 pm     Reply with quote

Hello,
I try to compile your code, and with or without the printf this works... There´s no erros...
_________________
Best Regards,
Mauricio Lopes
Benjamin



Joined: 11 Jan 2006
Posts: 21
Location: Quebec (Canada)

View user's profile Send private message Visit poster's website

PostPosted: Wed Oct 11, 2006 1:01 pm     Reply with quote

Hello treitmey,

I tried your code with version 4.011 and I get the same result: Compiles with the printf but not without. What's also odd is that changing the rotate_right fonction by rotate_left does compile. The code works fine with version 3.249, I would suggest using this version since version 4 is not yet stable.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Wed Oct 11, 2006 1:12 pm     Reply with quote

Right, I am using the 3.249 for the production code.

Just saw this as a VERY weird V4.x error. Rolling Eyes
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