params[0] = Parameter.getLiteralParameter("0");
Label startLabel = new Label(), endLabel = new Label(), forkLabel = new Label();
CounterOperation co = new CounterOperation(template.getCurrentTemplatePosition());
template.appendOperation(co);
startLabel.setDestinationToNextCommand(template);
template.appendOperation(new LoopForkOperation(template.getCurrentTemplatePosition(), forkLabel, co, params[0], params[1]));
template.appendOperation(new JumpOperation(template.getCurrentTemplatePosition(), endLabel));
forkLabel.setDestinationToNextCommand(template);
return new LoopCommandState(template, co, startLabel, endLabel);
}