
if not ready and (length = 0) begin
  output := not output;
  pointer := pointer + 1;
end;
