Here's the function code btw:
/*
** ===================================================================
** Method : Run_and_wait_in_RAM (bean IntFLASH)
**
** Description :
** This method runs programming or erasing process end waits
** until it ends. This routine is placed in RAM.
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
#pragma define_section RAW_RAM_section ".RAW_RAM" RWX
#pragma section RAW_RAM_section begin
static asm void Run_and_wait_in_RAM(dword address, word data, word command)
{
move.l A10,R2; /* Move given address to pointer register */
move.w Y0,p:(R2)+; /* Write data to the address in program memory */
move.w Y1,FMCMD_ASM;
move.w #$80,FMUSTAT_ASM;
wait:
moveu.w #$f020,R0;
adda #$3f3,R0,R0;
move.w X:(R0),A;
bftstl #$40,A1;
bcs wait;
rts;
}
#pragma section RAW_RAM_section end