
210 Va. 318 (1969)
DAVID LEON BROOKS
v.
C. C. PEYTON, SUPERINTENDENT OF THE VIRGINIA STATE PENITENTIARY.
Record No. 6916.
Supreme Court of Virginia.
December 1, 1969.
Present, All the Justices.
1.  Petitioner with others was indicted for larceny.  At trial of another, indictment was held insufficient for robbery charge and second indictment was thereafter returned for petitioner here.  Trial court did not lack jurisdiction to try petitioner on second indictment for failure of timely prosecution under first indictment.
2.  Statutory provision implementing constitutional requirement for speedy trial is not self-operative.  Protection may be claimed or it may be waived. Failure to invoke statute until after final judgment is a waiver.
3.  Function of habeas corpus is to inquire into jurisdictional defects amounting to legal authority to detain a person.  It cannot be used as a substitute for an appeal or a writ of error.  Mere lapse of time before trial does not oust court of jurisdiction and does not render a judgment of conviction void so as to subject it to collateral attack by writ of habeas corpus.  Court had jurisdiction of person and subject matter and conviction on second indictment not void and cannot be attacked in a proceeding for a writ of habeas corpus.
4.  Petitioner complains that appointed counsel did not move to quash second indictment for lack of jurisdiction.  Counsel had no valid grounds for such a motion.  Commonwealth not barred from obtaining second indictment.  Petitioner was not held under second indictment without counting term at which indictment is returned.  Statute contemplates term actually held, not terms merely provided by law.
5.  One is deprived of effective assistance of counsel only in extreme instances where representation is so transparently inadequate as to make a farce of the trial.  Mistakes in judgment or trial tactics are not enough to show ineffective representation when it is by no means certain that a different course of action would have produced different results.  Failure to move for mistrial on denial of objection to certain evidence as prejudicial does not show ineffective counsel.
6.  Record shows petitioner did testify in his own behalf against advice of his counsel.  No denial of right to testify when court restricts testimony to answering questions prepared by counsel, rather than to permit petitioner to engage in a lengthy discourse of immaterial matters.
Error to a judgment of the Corporation Court of the City of Alexandria. Hon. Franklin P. Backus, judge presiding.
Robert T. S. Colby (Colby & Bowles,    on brief), for plaintiff in error.
Edward J. White, Assistant Attorney General (Robert Y. Button, Attorney General; Reno S. Harp, III, Assistant Attorney General,    on brief), for defendant in error.
I'ANSON
I'ANSON, J., delivered the opinion of the court.
Petitioner, David Leon Brooks, filed a petition for a writ of habeas corpus, supplemented by a bill of particulars, against the respondent, C. C. Peyton, Superintendent, Etc., alleging that by failure of the Commonwealth to timely prosecute him on an indictment charging larceny he had been denied a speedy trial in violation of the Sixth Amendment to the Constitution of the United States, | 8 of the Constitution of Virginia, and | 19.1-191, Code of 1950, as amended; that his conviction on a second indictment charging robbery, which arose out of the same factual situation as that charged in the larceny indictment, is void because the court lacked jurisdiction to try him; that he was denied the effective assistance of counsel; and that in numerous other respects he was denied certain constitutional rights.  After several hearings in the Corporation Court of the City of Alexandria, the trial court entered an order denying and dismissing the petition.  We granted a writ of error to the judgment.  *320 
From the record, it appears that the petitioner was arrested on a warrant charging him with robbery of the Norton Tallow Manufacturing Company of Alexandria on April 24, 1964.  After a preliminary hearing the case was sent on to the grand jury attending the April 1964 term of the Corporation Court of the City of Alexandria, and an indictment was returned on May 4.
Two other men were indicted for their alleged participation in the robbery, and at the trial of one of them during the June 1964 term of court on an indictment containing language similar to the one returned against the petitioner, the trial court held that the indictment charged grand larceny and not robbery as contended by the Commonwealth.  As a result of the court's holding in that case, a second and more perfect indictment charging the petitioner with robbery was returned by the September 1964 grand jury.
The petitioner was never arraigned on the first indictment and no proceedings have been had thereon.  Trial on the second indictment was set for December 3, 1964, at which time petitioner failed to appear and the case was continued.  His bond was revoked, and he was later taken into custody and committed to jail.  Thereafter, counsel of petitioner's own choosing was permitted to withdraw from the case, and on January 13, 1965, attorney William L. Cowhig was appointed to represent him.
On February 1, 1965, the petitioner was brought to trial on the second indictment.  His counsel moved to quash the first indictment on the ground that the petitioner had been held without a trial for four terms of the corporation court, which has regular terms beginning on the second Monday in each month except during the month of August, and that under the provisions of Code | 19.1-191 he was entitled to be forever discharged from prosecution under that indictment.  The trial court pointed out that since petitioner was not being arraigned and tried on the first indictment, he would take the motion under advisement (which motion has not been acted upon) and the Commonwealth proceeded, without objection, to try petitioner on the second indictment.
The petitioner was tried by a jury, found guilty of robbery, his punishment fixed at fifteen years in the State penitentiary, and he was sentenced accordingly.  A petition for a writ of error and supersedeas to the judgment was denied by us on October 14, 1965, which in effect affirmed the conviction.
  Petitioner now contends that the protection afforded by Code *321 | 19.1-191 is self-operating, and since he was entitled to be discharged from further prosecution on the first indictment due to the Commonwealth's failure to timely prosecute, the trial court lacked jurisdiction to try him on the second indictment and his conviction is void.  We do not agree.
The pertinent part of | 19.1-191 reads as follows:
{"Every person against whom an indictment is found charging a felony and held in any court for trial, whether he be in custody or not, shall be forever discharged from prosecution for the offense, if there be three regular terms of the circuit or four of the corporation or hustings court in which the case is pending after he is so held without a trial, unless the failure to try him was caused * * *."
  The statute was designed to implement the constitutional guarantee of a speedy trial under the provisions of | 8 of the Constitution of Virginia. Flanary     Commonwealth,    184 Va. 204, 208, 35 S.E.2d 135, 137 (1945).
The protection granted an accused under Code | 19.1-191 is not self-operative.  "It may be claimed or it may be waived."     Butts Commonwealth,    145 Va. 800, 806, 133 S.E. 764, 766 (1926).  Failure to invoke the provisions of the statute until after final judgment is a waiver of the protection afforded thereunder.     Rose     Commonwealth,    189 Va. 771, 774, 55 S.E.2d 33, 34 (1949).
At the petitioner's trial on the second indictment on February 1, 1965, the motion to quash was directed to the first indictment.  Petitioner did not claim that he was entitled to the protection afforded by the provisions of Code | 19.1-191 as a bar to his prosecution under the second indictment on which he was tried, convicted, and is now being held.  Hence he waived any protection that the statute could possibly have afforded him as a bar to his prosecution under the second indictment.
  In the present proceeding the petitioner is seeking to employ a writ of habeas corpus as a substitute for an appeal or writ of error.  The function of a writ of habeas corpus is to inquire into jurisdictional defects amounting to want of legal authority for the detention of a person on whose behalf it is asked.  The court in which a writ is sought examines only the power and authority of the court to act, not the correctness of its conclusions, and the petition for a writ may not be used as a substitute for an appeal or writ of error.  *322    Council     Smyth,    201 Va. 135, 139, 140, 109 S.E.2d 116, 120 (1959).
Since the right to a discharge under a statute, which provides that if a person is not tried within the specified time he shall be discharged, is not absolute in the sense that a mere lapse of time ousts the court of jurisdiction, a judgment of conviction is not void so as to subject it to collateral attack by writ of habeas corpus.  See,    Hanson     Ragen    (7th Cir.), 166 F.2d 608 (1948), cert. denied, 334 U.S. 849, 68 S.Ct. 1501, 92 L.Ed. 1772 (1948); People     Utterback,    385 Ill. 239, 52 N.E.2d 775, 777 (1944).
Hence we hold that the court had jurisdiction to try the petitioner on the second indictment; that the conviction is not void; and that it is not subject to collateral attack by habeas corpus.
  Petitioner contends that the failure of his court-appointed attorney to move the court to quash the second indictment clearly indicates that he was denied the effective assistance of counsel.  We do not agree.
Under the prior decisions of this court counsel had no valid grounds upon which to base a motion to quash the second indictment.  The second indictment was returned before the expiration of four terms of court from the date of the first indictment. [1]  The Commonwealth was not barred from obtaining another indictment which properly charged the offense of robbery.  When an original indictment is supplanted by a second indictment, the terms contemplated by the statute are to be counted from the time of the second indictment. Commonwealth     Adcock,    49 Va. (8 Gratt.) 661, 672, 675, 682 (1851); Mealy     Commonwealth,    193 Va. 216, 218, 219, 68 S.E.2d 507, 509 (1952). See also, Anno.:  "Speedy Trial-Reindictment," 30 A.L.R.2d 462, 463, 466-471.
  Petitioner also says that his counsel was ineffective in not moving for a mistrial when evidence prejudicial to him was introduced during the trial.
Ordinarily one is deprived of effective assistance of counsel only in those extreme instances where the representation is so transparently inadequate as to make a farce of the trial.  Mistakes in judgment or trial tactics are not enough to show ineffective representation when it is by no means certain that a different course of action by counsel would have produced different results. Anderson     Peyton,    209 Va. *323 798, 803, 804, 167 S.E.2d 111, 115 (1969), and the cases there cited.
Counsel objected to the introduction of the evidence which petitioner claims was prejudicial to his rights, but his failure to move for a mistrial does not show that he was ineffective.  The fact that something which might have been done was not done is not in itself enough to warrant overturning a conviction on a petition for habeas corpus.  We find nothing in the record showing that petitioner was denied the effective assistance of counsel.
  Petitioner says he was denied the right to testify in his own behalf at the trial on February 1, 1967.  The record shows that he did testify in his own behalf against the advice of his counsel.  The court only restricted his testimony to answering questions propounded by his counsel after it was apparent that petitioner desired to engage in a lengthy discourse of immaterial and irrelevant matters.  Hence the restriction placed on petitioner's testimony was only as to its form.  He was not denied the right to testify in his own behalf.
Petitioner says that he was deprived of his ability to defend himself because he was confined to jail after his bond was forfeited for failing to appear at his hearing on December 3, and was thus unable to contact his witnesses.
Counsel for petitioner testified that petitioner said he had no witnesses except his wife, who did testify in his behalf.  The trial court was justified in accepting this testimony over that of petitioner.
It would serve no useful purpose to discuss the other seventeen questions listed by petitioner under his assignments of error but not elaborated upon or argued before us.  Some of them relate to the errors assigned by petitioner in his petition for a writ of error on the merits of the case.  All the others deal with allegations which are not supported by evidence.  Suffice it to say that we have considered all of petitioner's contentions and find them to be without substance.
For the reasons stated, the judgment of the court below is
Affirmed.
NOTES
[1]    The term at which a prisoner is indicted for a felony is not to be counted as one of the terms contemplated by the statute.     Kibler Commonwealth,    94 Va. 804, 811, 26 S.E. 858, 859 (1897).  The statute also contemplates terms actually held, not terms merely provided by law.     Ex Parte Santee,    4 Va. (2 Va.Cas.) 363.
