#define SOFTWARETRIGGER0_VEC 0x72 /* vector address= 2 * channel id */static void SetupXGATE(void) { /* initialize the XGATE vector block and set the XGVBR register to its start address */ XGVBR= (unsigned int)(void*__far)(XGATE_VectorTable - XGATE_VECTOR_OFFSET); /* switch software trigger 0 interrupt to XGATE */ ROUTE_INTERRUPT(SOFTWARETRIGGER0_VEC, 0x81); /* RQST=1 and PRIO=1 */ /* enable XGATE mode and interrupts */ XGMCTL= 0xFBC1; /* XGE | XGFRZ | XGIE */ /* force execution of software trigger 0 handler */ XGSWT= 0x0101;}