public void step(){
		error=false;
		int cp = control.getCP();
		Instruction ins = program.getInstructionAt(cp);
		
		if(control.isHalted()){
			for(Observer o: observers){
				o.onError(new MVException("Maquina parada"));
			}
		}
		
		else if(program == null){
			for(Observer o: observers){
				o.onError(new MVException("Programa incorrecto"));
			}
		}
		
		else if(ins == null){
			for(Observer o: observers){
				o.onError(new MVException("Instruccion incorrecta"));
			}
		}
		else{
			try {
				ins.execute(stack, memory, control);
				control.next();
				for(Observer o: observers){
					o.onInstructionEnd(ins, memory.getData(), stack.getData(), control.getData());
				}
			} catch (MVException e) {
				// TODO Auto-generated catch block
				error = true;
				for(Observer o: observers){
					o.onError(e);
				}
			}
		}
	
	}