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 CCS Technical Support

OT: IAR compiler forum

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Glazer. R
Guest







OT: IAR compiler forum
PostPosted: Tue May 24, 2005 12:56 am     Reply with quote

Dear all,
I am now using IAR benchmark compiler 3.30A for MSP430 series. I hardly found any technical forum for this compiler. If anyone happens to use this compiler before and know the sources, please recommend a few places i can turn to.

The problem i am facing is how to increment a 32 bit long variable using its assembly instruction. INC.
By using INC instuction, I can increase the 16bit time counter. But come to 32bit, it seems to have problem. Is it because INC instuction is only cater for up to 16 bit operand?

Sample code:
Code:

EXTERN   time_counter  ;if define as 16 bit, working fine

TB0_INT      ; when timeB 0 interrupts, increase time counter
INC   &time_counter   
RETI   
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Tue May 24, 2005 1:16 am     Reply with quote

You will need to do like we do with the 8 bit micros.

Increment the variable, test for carry and increment the high byte if necessary.

I dont know asm for the msp...

IAR has a forum, almost empty, but still a forum.
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