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

[solved] write_eeprom efficiency

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



Joined: 21 Oct 2005
Posts: 291

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

[solved] write_eeprom efficiency
PostPosted: Sat Dec 09, 2017 1:12 pm     Reply with quote

Hi! I am using PIC16LF18855 and compiler ver. 5.075.
When I compile my code I see that write_eeprom produces 'inline' code instead of calling a routine. I use it several times throughout the code and it's taking up space...
Ideas? Workaround except creating my own write_eeprom function?

Code:
....................   write_eeprom(33,b);
12D9:  MOVF   0B,W
12DA:  MOVWF  77
12DB:  BCF    0B.7
12DC:  MOVLW  21
12DD:  MOVLB  10
12DE:  MOVWF  1A
12DF:  MOVLW  70
12E0:  MOVWF  1B
12E1:  MOVLB  07
12E2:  MOVF   26,W
12E3:  MOVLB  10
12E4:  MOVWF  1C
12E5:  BSF    1E.6
12E6:  BSF    1E.2
12E7:  MOVLW  55
12E8:  MOVWF  1F
12E9:  MOVLW  AA
12EA:  MOVWF  1F
12EB:  BSF    1E.1
12EC:  BTFSC  1E.1
12ED:  GOTO   2EC
12EE:  BCF    1E.2
12EF:  BCF    1E.6
12F0:  MOVF   77,W
12F1:  IORWF  0B,F


Last edited by guy on Sat Dec 09, 2017 11:28 pm; edited 1 time in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Dec 09, 2017 1:40 pm     Reply with quote

The solution is to use a wrapper routine. One example from Ttelmah:
http://www.ccsinfo.com/forum/viewtopic.php?t=53108

A shorter version of a wrapper:
http://www.ccsinfo.com/forum/viewtopic.php?t=19221&start=1
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