
/*
 * boot(): function to warm or cold boot the system from software
 *
 * C Calling sequence:
 *    boot (int flag);
 * where flag is 0 perform a warm boot, or anything
 * to perform a cold boot.
 */

void boot(int flag)
{
                        /* flag address */
    int far *WarmFlag = (int far *) 0x0040072;
    
                        /* reboot address */
    void (far *reboot)(void) = (void far *) 0xFFFF0000;

    *WarmFlag = 0x1234 | flag;
    (*reboot)();
}
