break; }
break; } } if (repetitions == 1) { instrDumped++; fw.write("\tnop\t" + current + "\n");
    private static void toASM(String ins, String side, Repetition[] compressMe, FileWriter fw) throws Exception    {        int seq = 0;	StringTokenizer t = new StringTokenizer(ins, "\n");	if (compressMe == null) {	    //no compression --- just dump the routes with nops as the instructions	     while (t.hasMoreTokens()) {		fw.write("\tnop\t" + t.nextToken() + "\n");	     }	}	else{	    //print the switch instructions compressing according to compressMe	    int counter = 0;	    String current;	    while (t.hasMoreTokens()) {		//get the next route instruction		current = t.nextToken();		counter++;		int repetitions = 1;		for (int i = 0; i < compressMe.length; i++) {		    if (compressMe[i].hasLine(counter)) {			repetitions = compressMe[i].repetitions;			fw.write("\tmove $3, $" + i + "\n");			fw.write("seq_start" + side + seq + ":\n");			//fw.write("\tnop\t" + current + "\n");			//fw.write("\tbnezd $3, $3, seq_start" + i + "\n");			fw.write("\tbnezd $3, $3, seq_start" + side + seq + "\t" + current + "\n");                        seq++;			break;		    }		}		if (repetitions == 1)		    fw.write("\tnop\t" + current + "\n");		else {		    for (int i = 0; i < repetitions - 1; i++) {			//skip over remainders			if (t.hasMoreTokens())			    t.nextToken();			counter++;		    }		}	    }	}    }