void sysinit() { int k; val_x=(int *)malloc(sizeof(int)*( MAX_WR_x+1)); val_x[0] = x; tsb_x=(unsigned short*)malloc(sizeof( unsigned short)*(MAX_WR_x+2)); tsm_x=(unsigned short*)malloc(sizeof( unsigned short)*(MAX_WR_x+2)); tsb_x[0]=0; tsb_x[MAX_WR_x+1]=MAX_TIME; for (int k=1; k