
43 Ill. App.3d 79 (1976)
356 N.E.2d 665
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
JAMES LEROY BIVENS, Defendant-Appellant.
No. 75-184.
Illinois Appellate Court  Fifth District.
Opinion filed October 25, 1976.
*80 Stephen P. Hurley and Michael J. Rosborough, both of State Appellate Defender's Office, of Mt. Vernon, for appellant.
*81 John C. Reznick, State's Attorney, of Vandalia (Bruce D. Irish, of Illinois State's Attorneys Association, of counsel), for the People.
Judgment affirmed.
Mr. JUSTICE JONES delivered the opinion of the court:
Defendant, Leroy Bivens, pled guilty to escape from Vandalia Correctional Center and was sentenced to one to two years in the penitentiary, the term to run consecutively to the sentence imposed on his underlying conviction. The only issue defendant presents for review is whether he was denied effective assistance of counsel because his court-appointed attorney failed to make a motion for discharge for want of a speedy trial pursuant to section 103-5(d) of the Code of Criminal Procedure (Ill. Rev. Stat., ch. 38, par. 103-5(d)).
The People contend that by pleading guilty defendant waived any claim to discharge pursuant to section 103-5 (Ill. Rev. Stat. 1973, ch. 38, par. 103-5). The People also assert that even if defendant had moved for discharge, he would not have been entitled to release on the present charge because he was in custody of the Department of Corrections on another charge while awaiting prosecution on the instant charge. The applicable statute, the People argue, would in this event be section 3-8-10 of the Unified Code of Corrections (Ill. Rev. Stat., ch. 38, par. XXXX-X-XX), and defendant's guilty plea would be within the 160-day limitation there provided. The People answer, therefore, that since defendant was not legally entitled to a discharge, his counsel was neither ineffective nor incompetent for failing to move for discharge under the applicable statute.
We agree with the People's initial contention that by failing to raise the question of his right to discharge under the 120-day rule in the trial court he has waived it. (People v. Thurman, 3 Ill. App.3d 828, 279 N.E.2d 137.) Moreover, since no application for discharge under that rule was made prior to his plea of guilty, defendant cannot now avail himself of the statute. People v. Kuczynski, 33 Ill.2d 412, 211 N.E.2d 687; People v. De Cola, 15 Ill.2d 527, 155 N.E.2d 622; People v. Gibson, 30 Ill. App.3d 555, 333 N.E.2d 549; People v. Ike, 10 Ill. App.3d 933, 295 N.E.2d 250.
However, defendant seeks to avert his waiver of the rule by arguing that he did not receive the effective assistance of counsel because of his counsel's failure to advise him of his right to discharge under the speedy trial statute. We cannot address this contention of defendant directly for we deem it to also have been waived by the plea of guilty. All errors or irregularities that are not jurisdictional, even those concerning rights constitutionally guaranteed, are waived by a voluntary and knowing plea of guilty. (People v. Brown, 41 Ill.2d 503, 244 N.E.2d 159; People v. De Cola.) Such waiver could extend to and include a contention that counsel was incompetent, a nonjurisdictional matter.
*82 Nevertheless, we perceive a circumstance under which we consider it appropriate to consider whether defendant's counsel was prejudicially incompetent for his failure to advise defendant of his asserted right to discharge under the speedy trial statute. In thus considering the question we are anticipating defendant's position for it is not presented in defendant's brief.
Pursuant to Supreme Court Rule 402(a) (Ill. Rev. Stat., ch. 110A, par. 402(a)) as applied in many cases too numerous to require citation, a plea of guilty may not be taken from an accused unless it is knowingly and understandingly entered. Arguably, then, the defendant here did not enter his plea of guilty knowingly and understandably because his attorney did not advise him, and he accordingly did not know, of his right to discharge under the speedy trial statute. Although obliquely inserted into the case in this fashion, the issue requires consideration.
By statute the general trial-delay rule for persons held on pending charges is:
"Every person in custody in this State for an alleged offense shall be tried by the court having jurisdiction within 120 days from the date he was taken into custody unless delay is occasioned by the defendant, * * *." Ill. Rev. Stat. 1973, ch. 38, par. 103-5(a).
A defendant's remedy for the State's noncompliance with this provision is discharge. (Ill. Rev. Stat. 1973, ch. 38, par. 103-5(d).) Even in the case of a defendant who was a prison inmate serving time on another charge prior to July 1, 1974, the above 120-day rule was applicable. The State was then required to bring the prisoner-accused to trial within 120 days of the date he was deemed held in custody on the charges in question. (People v. Vaughn, 4 Ill. App.3d 51, 280 N.E.2d 253.) Effective July 1, 1974, however, section 3-8-10 was added to the Unified Code of Corrections. This new provision extends the time in which an accused may be brought to trial where the accused is already committed to an institution, facility or program of the Department of Corrections. It requires an inmate-defendant to send a demand for trial to the State's Attorney of the county where he is charged, with a copy to the clerk of that court and a copy to the chief administrator of the Department of Corrections institution or facility to which he is confined. It also prescribes what information the demand letter must contain. In the event that a defendant-prisoner is not brought to trial within the allotted 160-day period following the date of demand (subject to certain exceptions not relevant here), then the charge for which he has requested a speedy trial shall be dismissed. Ill. Rev. Stat. 1973, ch. 38, par. XXXX-X-XX.
For purposes of either statute, we deem that the instant defendant was held in custody on the present charge as of April 1, 1974, the date his *83 arrest warrant was served and when he made his initial appearance in court on this charge. (See People v. Vaughn.) We also presume that after his recapture he remained in the custody of the Department of Corrections, for the record does not indicate otherwise, except that for a few days he was lodged in the Fayette County jail. No action was taken by the prosecutor until defendant appeared for arraignment on August 12, 1974, some 133 days after he was formally arrested and charged with the instant escape offense. At no time during the proceedings did defendant file a written or oral demand for speedy trial. Defendant entered his plea of guilty on October 22, 1974.
 1 At the time the new statute became effective, July 1, 1974, defendant would not have been entitled to discharge under the previous 120-day rule because only 91 days had elapsed since his confinement on the present charge. In deciding whether defendant was entitled to the benefit of the prior rule (Ill. Rev. Stat., ch. 38, par. 103-5(d)) or, as of July 1, 1974, was governed by the new statutory provisions, we must determine whether the General Assembly intended the statutory change to apply to pending cases.
Section 4 of "An Act to revise the law in relation to the construction of the statutes" (Ill. Rev. Stat. 1973, ch. 131, par. 4) (hereinafter Statutory Construction Act) provides in pertinent part:
"No new law shall be construed to repeal a former law, * * * as to any * * * right accrued, or claimed under the former law, or in any way whatever to affect any * * * right accrued, or claim arising before the new law takes effect, save only that the proceedings thereafter shall conform, so far as practicable, to the laws in force at the time of such proceedings."
The instant situation resembles that which the Illinois Supreme Court confronted in People v. Anderson, 53 Ill.2d 437, 292 N.E.2d 364. When defendant was initially charged in Anderson, the speedy trial statute (Ill. Rev. Stat. 1967, ch. 38, par. 103-5(b)) provided: "Every person on bail or recognizance shall be tried by the court having jurisdiction within 120 days from the date defendant demands trial unless delay is occasioned by defendant * * *." By an amendment which became effective during the pendency of trial, the statutory period was increased to 160 days (see Ill. Rev. Stat. 1967, 1969, ch. 38, par. 103-5(b)). The court found that the right to be discharged under the speedy trial statute could not be regarded as an "accrued right" within the Statutory Construction Act, until the statutory period had expired, and that the period fixed in the amendatory statute was intended to apply in all cases except those in which a defendant had become entitled to discharge before its effective date. The court held that the application of the 160-day rule to *84 defendant's case was not contrary to section 4 of the Statutory Construction Act. The court also concluded that the application of the 160-day discharge provision, instead of the 120-day provision, did not violate either the Federal or State constitutional prohibition against ex post facto laws.
 2, 3 Applying the rationale employed in Anderson to the instant facts, we are persuaded that the instant amendatory statute was intended to apply to all cases except those in which the defendant had become entitled to discharge before it became effective. The right to be discharged under the prior 120-day statute cannot be regarded as an "accrued right" under the Statutory Construction Act until the statutory period has run. We hold, therefore, that the application of the new provisions to defendant's case would not have been contrary to section 4 of the Statutory Construction Act.
 4-7 We are also of the opinion that application of the 160-day trial-delay discharge provisions conditioned upon prior demand for speedy trial, instead of the 120-day provision not conditioned upon demand for trial, would not have violated either the Federal or State constitutional prohibition against ex post facto laws. The amending provision did not make criminal an act that was innocent when done; it did not increase the punishment for a previously committed offense, and did not alter the legal rules of evidence in order to convict defendant. Nor did the new provision deprive the accused of any substantive right or defense available to him at the time of the offense. (People v. Anderson.) The instant statutory change was procedural in nature and did not serve to alter any right to acquittal or discharge, as of the effective date of the change, that defendant had acquired by the running of the original statute. Hence, defendant would not have been entitled to discharge even if his attorney had filed the appropriate motion under the previous statute. Nor on this record would defendant have been entitled to discharge if his counsel had filed a motion for discharge based on violation of a constitutional right to a speedy trial. This is because the statute implements the constitutional right, and as a practical matter operates to prevent the constitutional issue from arising, except in situations involving prolonged delay or novel issues (People v. Stuckey, 34 Ill.2d 521, 216 N.E.2d 785), neither of which situations is present here. Lastly, we note that even if defendant had filed the proper demand for speedy trial on July 1, 1974, he would not have been entitled to discharge for reason that he pled guilty prior to the running of the new 160-day statutory period.
 8 Accordingly, we find that defendant's complaint of ineffective assistance of counsel cannot be premised on defense counsel's failure to file a motion for discharge for want of a speedy trial pursuant to section 103-5(a) of the Code of Criminal Procedure (Ill. Rev. Stat. 1973, ch. 38, *85 par. 103-5(a)) or failure to demand trial under the new provisions pertaining to defendant-prisoners already confined on a prior conviction (Ill. Rev. Stat. 1973, ch. 38, par. XXXX-X-XX).
Affirmed.
EBERSPACHER, J., concurs.
G.J. MORAN, J., dissents.
