
355 S.E.2d 573 (1987)
Melvin C. DODSON
v.
DIRECTOR OF the DEPARTMENT OF CORRECTIONS.
Record No. 860252.
Supreme Court of Virginia.
April 24, 1987.
*574 R. Scott Pugh (Sokol & Ledbetter, Fredericksburg, on briefs), for petitioner.
Katherine B. Toone, Asst. Atty. Gen. (Mary Sue Terry, Atty. Gen., on briefs), for respondent.
Present: CARRICO, C.J., and COCHRAN,[*] POFF, COMPTON, STEPHENSON, RUSSELL and THOMAS, JJ.
STEPHENSON, Justice.
In this original jurisdiction habeas corpus proceeding, the principal issues are whether (1) an indigent criminal defendant has a right to appointed counsel on an appeal to this Court, and (2) a summary dismissal of a prior habeas corpus petition bars consideration of a subsequent petition.
Melvin C. Dodson, the petitioner, was convicted in the Circuit Court of Stafford County of (1) damaging the Stafford County jail for the purpose of escaping or rendering the jail less secure as a place of confinement in violation of Code § 53.1-203(2), (2) possessing an instrument for the purpose of escaping from a correctional facility in violation of Code § 53.1-203(3), (3) possessing an unauthorized instrument capable of causing death or bodily injury, in violation of Code § 53.1-203(4), and (4) conspiring with another prisoner to commit a crime, in violation of Code § 53.1-203(9). As a result of these convictions, Dodson was sentenced to serve a total of nine years in the penitentiary.
Dodson petitioned the Court of Appeals of Virginia for an appeal of these convictions, and, by an order entered November 18, 1985, the petition for appeal was denied. Thereafter, Dodson petitioned this Court for an appeal, and we dismissed the petition because "the appeal was not perfected in the manner provided by law.... Rule 5:14(a)."[1]
While Dodson's appeal before us was pending, he petitioned the Circuit Court of Stafford County for a writ of habeas corpus. The circuit court summarily dismissed the petition because "the grounds *575 alleged ... are not properly raised by a petition for Writ of Habeas Corpus."[2]
Dodson subsequently filed a petition for a writ of habeas corpus invoking our original jurisdiction, which is the basis of the present proceeding. Dodson's petition presents three areas of complaint. First, he alleges that he was denied the effective assistance of counsel because his court-appointed attorney failed to perfect an appeal of his case from the Court of Appeals to this Court. Second, Dodson alleges ineffective assistance of counsel at trial.[3] Finally, he alleges that the trial court committed various errors in his criminal trial.[4] The Director of the Department of Corrections (the Director) filed a motion to dismiss the petition on the grounds hereinafter discussed. We placed the cause on our argument docket, appointed counsel to represent Dodson in this proceeding, and directed the filing of briefs.
Dodson first contends that he was denied effective assistance of counsel because his court-appointed attorney failed to perfect his appeal from the Court of Appeals to this Court. (As previously noted, we dismissed Dodson's petition for appeal because the notice of appeal required by Rule 5:14(a) was not filed in the Court of Appeals.)
Relying upon Ross v. Moffitt, 417 U.S. 600, 94 S.Ct. 2437, 41 L.Ed.2d 341 (1974), the Director counters with the contention that Dodson's constitutional right to counsel extends only to his first appeal to the Court of Appeals and not to a second appeal to this Court. Therefore, continues the Director, because Dodson did not have a constitutional right to counsel in this Court, he could not have been denied the effective assistance of counsel by his attorney's failure to perfect an appeal to this Court.
We agree with the Director that before a person can assert a claim of ineffective assistance of counsel he first must establish that he has a right to counsel. See Wainwright v. Torna, 455 U.S. 586, 587-88, 102 S.Ct. 1300, 1301, 71 L.Ed.2d 475 (1982); Evitts v. Lucey, 469 U.S. 387, 396 n. 7, 105 S.Ct. 830, 836 n. 7, 83 L.Ed.2d 821 (1985); Howard v. Warden, 232 Va. 16, 19, 348 S.E.2d 211, 213 (1986).
In Douglas v. California, 372 U.S. 353, 83 S.Ct. 814, 9 L.Ed.2d 811 (1963), the Supreme Court held that a state must provide counsel for an indigent on his first appeal as of right. Douglas was grounded upon both the Due Process and Equal Protection Clauses of the Fourteenth Amendment to the Federal Constitution. Similarly, in Cabaniss v. Cunningham, 206 Va. 330, 333, 143 S.E.2d 911, 913 (1965), we said that "the failure to appoint counsel to assist an indigent defendant in making an appeal from a conviction is a denial of equal protection and due process guaranteed to him under the Federal Constitution and the Virginia Bill of Rights."
Ross holds, however, that the Equal Protection Clause does not require a state that has provided an indigent accused with appointed counsel on his appeal of right to the state's intermediate appellate court to provide appointed counsel for the accused on his discretionary appeal to the state's supreme court. After reaching this conclusion, the Ross Court observed: "We do not mean by this opinion to in any way discourage those States which have, as a matter of legislative choice, made counsel available to convicted defendants at all stages of judicial review." 417 U.S. at 618, 94 S.Ct. at 2447.
Thus, our task is to determine whether the General Assembly has made a *576 legislative choice to provide counsel to convicted indigents at all stages of judicial review in the Commonwealth.[5] To make this determination, we must examine the relevant statutes.
The Code provisions most relevant to the right of an indigent to appointed counsel provide in pertinent part:
§ 19.2-157. Duty of court when accused appears without counsel.[W]henever a person charged with a criminal offense the penalty for which may be death or confinement in the penitentiary or jail ... appears before any court without being represented by counsel, the court shall inform him of his right to counsel.
§ 19.2-159. Determination of indigency; guidelines; statement of indigence; appointment of counsel.

....
[T]he said court shall appoint competent counsel to represent the accused in the proceeding against him, including an appeal, if any, until relieved or replaced by other counsel.
§ 19.2-326. Payment of expenses of appeals of indigent defendants.In any felony or misdemeanor case wherein ... the defendant is financially unable to pay his attorneys' fees, costs and expenses incident to an appeal, the court to which an appeal is taken shall order the payment of such attorneys' fees, ... costs or necessary expenses of such attorneys.... If the conviction is upheld on appeal, the attorney's fees, costs and necessary expenses of such attorney paid by the Commonwealth ... shall be assessed against the defendant.
The Director asserts that when the Court of Appeals was established, the General Assembly intended to limit an indigent's appellate right to counsel to that court. In support of this assertion, the Director focuses on the language in Code § 19.2-159 that states: "[T]he said court shall appoint competent counsel to represent the accused in the proceeding against him, including an appeal." He also relies upon certain language in Code § 19.2-326 that provides for the ordering of payment of attorneys' fees, costs, and expenses incident to an appeal by "the court to which an appeal is taken."
The Director argues that in using the term "an" appeal in Code § 19.2-159, rather than "any" appeal, "the General Assembly clearly intended that appointment of counsel be required for only one appeal." He further argues that in providing for the payment of fees to "the" court in Code § 19.2-326, rather than to "any" court, the General Assembly intended the payment of fees for but one appeal. We do not agree.
The term, "an appeal," in present Code § 19.2-159 (1986 Cum.Supp.) was also used in the predecessor section (1983 Repl.Vol.) We conclude that the term is used in its generic sense and simply means that an indigent is entitled to counsel throughout the appellate process.
Before its amendment in 1984 (which obviously resulted from establishment of the *577 Court of Appeals), Code § 19.2-326 (1983 Repl.Vol.) provided that "the Supreme Court" shall order the payment of attorneys' fees incident to "an appeal." The 1984 amendment (1986 Cum.Supp.) replaced the term "the Supreme Court" with "the court to which an appeal is taken." Because certain criminal defendants may petition for appeal to both the Court of Appeals and this Court, the replacement language demonstrates a clear legislative intent to provide indigent defendants with counsel in both appellate courts. Indeed, had the General Assembly intended to limit court-appointed counsel to the first appeal, as the Director contends, it easily could have replaced the term "the Supreme Court" with "the Court of Appeals."
The Director also relies upon the following provision of the 1984 and 1986 appropriations acts: "Notwithstanding the provisions of Section 19.2-326 of the Code of Virginia, the amount of attorney's fees allowed counsel for indigent defendants in appeals to the Supreme Court shall be in the discretion of the Supreme Court." Acts 1984 ch. 755, p. 1781; Acts 1986 ch. 643, p. 1604 (emphasis added). The Director argues that when viewed in light of this provision in the appropriations acts, "§ 19.2-326 cannot be construed to require appointment of counsel for appeals to this Court. The statute simply enables this Court, in its discretion, to provide attorney fees for indigent appellants." We do not agree.
Clearly, this provision of the appropriations acts simply grants us discretion to fix the amount of attorneys' fees allowed counsel for representing indigent defendants in appeals to this Court, not, as the Director contends, discretion to determine whether an indigent may have court-appointed counsel represent him before us. Indeed, this provision of the appropriations acts reinforces our conclusion that the General Assembly intended to provide court-appointed counsel for an appeal to this Court.
We agree with Dodson's assertion that Code § 19.2-157, when considered with Code § 19.2-326, provides an indigent with a statutory right to court-appointed counsel at both appellate levels. The pertinent provisions of Code § 19.2-157 are clear and unambiguous. The provisions state that, "whenever a person charged with a criminal offense [punishable by death or confinement in prison] appears before any court without being represented by counsel, the court shall inform him of his right to counsel." (Emphasis added.) Unless restricted, the word "any" includes "all." Harward v. Commonwealth, 229 Va. 363, 366, 330 S.E.2d 89, 91 (1985); County of Loudoun v. Parker, 205 Va. 357, 362, 136 S.E.2d 805, 809 (1964). Thus, Code § 19.2-157 states that an indigent person charged with the commission of a crime punishable by death or imprisonment has a right to counsel in all courts of the Commonwealth.
From our analysis of the foregoing statutes, we hold that the General Assembly intended to provide an accused who is indigent a right to counsel in this Court. Therefore, Dodson is not precluded from raising the allegation that his counsel rendered ineffective assistance in an appeal to this Court.
The second issue before us relates to Dodson's allegations that he was denied the effective assistance of counsel at trial. The Director has moved to dismiss Dodson's petition as it relates to these allegations, contending that they are barred from consideration in this proceeding by Code § 8.01-654(B)(2). This section, in pertinent part, provides that "[n]o writ shall be granted on the basis of any allegation the facts of which petitioner had knowledge at the time of filing any previous petition."
As previously noted, while Dodson's direct appeal of his conviction was pending in this Court, he filed pro se a petition for a writ of habeas corpus in the Circuit Court of Stafford County. The circuit court dismissed the petition, finding that it raised the same issues that were the subject of Dodson's direct appeal.
Clearly, when Dodson filed the habeas petition in the Circuit Court of Stafford County, he had knowledge of the alleged ineffective assistance of counsel at trial. Thus, we agree with the Director and hold that Dodson's allegations of ineffective assistance *578 of counsel at trial are barred from consideration in the present proceeding by Code § 8.01-654(B)(2).
For the reasons stated, we will deny the Director's motion to dismiss as it relates to Dodson's claim of ineffective assistance of counsel on appeal[6] and grant the motion as it relates to the alleged ineffective assistance of counsel at trial. Accordingly, we will award the writ of habeas corpus returnable to the Circuit Court of Stafford County and order a plenary hearing on Dodson's allegation of ineffective assistance of counsel on appeal.
Writ awarded.
RUSSELL, J., dissenting.
CARRICO, C.J., joins in dissent.
RUSSELL, Justice, dissenting.
Our criminal justice system has many admirable qualities, but it has one notable weakness upon which commentators of various persuasions frequently agree: its disturbing lack of finality. In our scrupulous efforts to see that no defendant's claim has been overlooked, we have made it possible for a convicted felon to frustrate the finality of his sentence for years, sometimes for more than a decade, by multiple tiers of appeals, followed by nearly limitless opportunities for collateral attack in both the state and the federal courts, followed by further appeals from the results of the collateral attacks. In the great majority of those cases, the taxpayers bear the entire cost of all three sides of the litigation triangle the prosecution, the defense, and the tribunal itself. The case before us is a fair example.
Against this background, the majority opinion implicitly concedes, as it must, that no provision of either the Virginia Constitution or the Federal Constitution mandates that the taxpayers finance multiple appeals within the Virginia system. See Ross v. Moffitt, 417 U.S. 600, 94 S.Ct. 2437, 41 L.Ed.2d 341 (1974). It is equally clear that no constitutional provision requires the appointment of counsel to apply for certiorari from this Court to the Supreme Court of the United States, Id. at 617, 94 S.Ct. at 2447; see Drumm v. California, 373 U.S. 947, 83 S.Ct. 1683 (1963). Nevertheless, by an extremely strained exercise of statutory construction, the majority opinion seems to divine some legislative intent to guarantee a convicted felon two successive appeals at public expense, notwithstanding the silence of the statutes on the subject.
Historically, a convicted defendant has been entitled to appointed counsel for only one appeal in Virginia. Code § 19.2-326 was amended in 1984 to provide for the new situation arising from the creation of the Court of Appeals: thereafter, appeals involving the death penalty would go to the Supreme Court but all other criminal appeals would go to the Court of Appeals. To avoid the circumlocution of spelling that distinction out in full, the statute was amended to provide that attorney's fees would be ordered by "the court to which an appeal is taken." There is no hint in this amendment of any legislative intent to finance appeals to successive courts.
Indeed, I regard the retention of the original language of Code § 19.2-159, after the Court of Appeals was established, as dispositive. That language provided under the former system, and still provides, that the lower court shall appoint counsel to represent the accused "in the proceeding against him, including an appeal...." Id., (Emphasis added). If the General Assembly had harbored the intent the majority opinion ascribes to it, it could easily have substituted the plural for the singular in the quoted language.
Because multiple appeals at public expense have not historically been a part of our criminal justice system, and because they are nowhere constitutionally mandated, *579 I would await express action by the General Assembly before adding to the problem of lack of finality in our criminal justice system and imposing this additional burden on the taxpayers.
CARRICO, C.J., joins in dissent.
NOTES
[*]  Justice Cochran participated in the hearing and decision of this case prior to the effective date of his retirement on April 20, 1987.
[1]  Rule 5:14(a), in pertinent part, provides: "No appeal from a judgment of the Court of Appeals which is subject to appeal to this Court shall be allowed unless, within 30 days after entry of final judgment or order denying a rehearing, counsel files with the clerk of the Court of Appeals a notice of appeal."
[2]  Dodson's petition for an appeal from this decision is now pending before this Court.
[3]  Dodson claims, inter alia, that his trial counsel was ineffective in failing (1) to subpoena witnesses favorable to the defense, (2) to investigate all plausible lines of defense, (3) to request a certain jury instruction, and (4) to make a timely objection to the Commonwealth's opening statement.
[4]  Because allegations of trial court error are not cognizable by habeas corpus, habeas cannot be used as a substitute for an appeal. Slayton v. Parrigan, 215 Va. 27, 29-30, 205 S.E.2d 680, 682 (1974), cert. denied sub non., Parrigan v. Paderick, 419 U.S. 1108, 95 S.Ct. 780, 42 L.Ed.2d 804 (1975).
[5]  Because of the conclusion we reach, we need not consider the effect of Ross on the Federal and State constitutional rights of a Virginia indigent to counsel in an appeal to this Court. We observe, however, that the North Carolina appeal process considered in Ross differs substantially from Virginia's. In Virginia, aside from appeals from a capital murder conviction, criminal appeals to both the Court of Appeals and to this Court are discretionary, and "a decision to grant or refuse a petition [for appeal] is based upon one equally-applied criterionthe merits of the case." Saunders v. Reynolds, 214 Va. 697, 700, 204 S.E.2d 421, 424 (1974).

In North Carolina, however, an accused has an appeal of right to the Court of Appeals and a discretionary review in the North Carolina Supreme Court. Moreover, in the North Carolina Supreme Court, the issue
is not whether there has been "a correct adjudication of guilt" in every individual case, ... but rather whether "the subject matter of the appeal has significant public interest," whether "the cause involves legal principles of major significance to the jurisprudence of the State," or whether the decision below is in probable conflict with a decision of the Supreme Court. The Supreme Court may deny certiorari even though it believes that the decision of the Court of Appeals was incorrect... since a decision which appears incorrect may nevertheless fail to satisfy any of the criteria discussed above.
Ross, 417 U.S. at 615, 94 S.Ct. at 2446 (Citations omitted.)
[6]  Dodson filed his habeas petition in the Circuit Court of Stafford County on January 17, 1986, and on the same day, the circuit court dismissed the petition. On January 28, 1986, this Court dismissed Dodson's appeal of his convictions because the appeal was not properly perfected. Because Dodson could not have known of our dismissal of his appeal at the time he filed his habeas petition in the Circuit Court of Stafford County, Code § 8.01-654(B)(2) does not bar his claim of ineffective assistance of counsel on appeal.
