public int stepthrough(int i) {
		switch(sim40.memory[i]) {

		/* stop */
		case 0: this.isProgramTerminated = true; 
		return i;

		/* print, printb, printch */
		case 1: case 2: case 3: 
			this.stdStream.getOutput().add(result(i));
			++i;
			break;

		default:
			/* jump, comp, xcomp, ycomp, jineg, jipos, jizero, jicarry */
			if(sim40.memory[i] >= 19 && sim40.memory[i] <= 26)
				i = compareExecute(i);

			else if(sim40.memory[i] >= 4 && sim40.memory[i] <= 9) 
				i = unaryExecute(i);

			else 
				i = binaryExecute(i);		

		}
		
		checkResetAllRegsAndFlags();
		sim40.updateViewVars();
		sim40.memory[Simulator.PROGRAM_COUNTER] = i;

		return i;
	}