| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Dec 20, 2005 12:18 pm |   |  
				| 
 |  
				|  	  | 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);
 }
 | 
 |  |