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

#asm help

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



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

#asm help
PostPosted: Mon Aug 24, 2009 1:36 am     Reply with quote

Don't really know much about assembly so could some one explain this piece of code to me.

retardo is an int. Are the pieces of code the same?

Code:
         #asm
 bucle: #endasm
        delay_cycles(delay_multiple-3);
        #asm
        decfsz &retardo,f
        goto bucle
        #endasm


Code:
 bucle:   
        delay_cycles(delay_multiple-3);
           #asm
            decfsz &retardo,f
           #endasm
        goto bucle


when will the code get out of the loop?

Thanks
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Aug 24, 2009 2:08 am     Reply with quote

The loop is exited when the contents of Retardo = 0
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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