#define B_ADR (0xFFFF0000UL)// You point it at memory
location 0xFFFF0000 which is where the cold boot function is located
#define R_ADR (0x00400072UL)
#define C_BOOT (0)
#define W_BOOT (1)
void Restart( int type )
{
void ((far *fp)()) = (void (far *)()) B_ADR;
if ( type==C_BOOT )
*(unsigned int far *) R_ADR = 0;
else
*(unsigned int far *) R_ADR = 0x1234;
(*fp)( );
}