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

Problem with disabled Interrupts

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



Joined: 06 Sep 2003
Posts: 21687

View user's profile Send private message

PostPosted: Tue Dec 20, 2005 12:18 pm     Reply with quote

Quote:
My question:
Is it possible to say the compiler to use a copy of those internal routines?


The following program shows how to use the "#org default" directive
to create a copy of the CCS math library code. Compile this program
and then go to the View / Disassembly Listing menu in MPLAB.
You will see there are two copies of the DIV1616 routine.
Code:

#include <18F452.h>   
#fuses XT,NOWDT,NOPROTECT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#org 0x1000, 0x10FF DEFAULT
#int_timer0
void my_function(void)
{
int16 x, y, z;

z = x/y;

}

#org DEFAULT

//=============================
void main()
{
int16 a, b, c;

c = a/b;


while(1);
}
Just a Guest
Guest







PostPosted: Fri Dec 23, 2005 4:41 am     Reply with quote

Hi,

it works fine, thank you very much.
Also many thanks @Ttelmah!

Just a Guest
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