
if ( ISP_PB == 0)                         // User wants to program the flash
    {
	  display ( "ENTER ISP MODE ?" );
	  DOT_00 = 1;
	  msDelay(1000);

	  FMCON = 0x08;
	  FMDATA = 0x96;                 // Set the internal Write Enable flag ( in Case AWE=1)

	  #pragma asm 
	   PGM_MTP EQU 0FF03H            // Common entry address for IAP routines
	   push IEN0
	   clr EA                        // Stop interrupts
	   mov R0, #0FFH
	   mov @R0, #96H                 // Key to permit Flash write
	   mov A,  #02H                              
	   mov R5, #01H
	   mov R7, #03H                  // Load registers to write 01 to Boot Status byte
	   lcall PGM_MTP
	   pop IEN0                      // Chip should now enter ISP for the next power on reset                
	   #pragma endasm
       
	   display ( "ENTERED ISP MODE" ); 
	   DOT_00 = 0 ;
	   msDelay(1000);
	   AUXR1 = 0x08;                 // Do a software reset
    }
