Defendant assigns as error the trial court’s denial of his pretrial motion to produce and compel the attendance of a proposed witness, George Totten.
On 27 February 1984, the day before defendant’s case was calendared for trial, defense counsel filed the following motion:
Now Comes The Defendant, by and through his attorney, and hereby moves the Court pursuant to 15A-805 to secure the attendance of George Totten, Larry Poole, Bobby James Stanley, Anthony G. Clements and Robert Powell at the trial of the defendant on February 27, 1984. As grounds thereof, he respectfully shows unto the Court the following:
1. That based upon the investigation by the defendant’s attorney, the above-named individuals are deemed to be necessary, essential and material to the defendant’s case.
2. That their attendance is essential to insure the defendant’s right to a fair and impartial trial as per the United States and North Carolina Constitution.
At the hearing on defendant’s motion, the following dialogue took place between the trial judge and defense counsel:
The Court: All right.
Mr. Murphy: Well, Your Honor-
*596THE COURT: I will allow and require habeas corpus ad testificandum as to Larry Poole and Bobby Stanley. The court finds that an affidavit was filed on the 27th of February, 1984, of Anthony Clements, but it does not relate to the trial of this matter.
Mr. MURPHY: If Your Honor please —
The COURT: And as to Robert Powell and George Totten, the court finds that no affidavits are submitted as to why they should be brought to court at this time; and the court finds that they were not witnesses in the previous trial and —
Mr. Murphy: If Your Honor please—
The COURT: Just a minute!
Mr. Murphy: Yes, sir.
The COURT: —and that their presence was requested at a very late date. The court denies the motion to secure witnesses as to Totten and Powell and Clements. EXCEPTION NO. 1
All right. Now, what’s your next motion?
Mr. MURPHY: If Your Honor please, may I be heard before we proceed?
THE COURT: I have already ruled on that.
Mr. MURPHY: Yes, Your Honor. I would like for the record to reflect that it is the defense’s contention that the motion was filed in apt time; that apt time means that it is filed in appropriate time, but I also ask the record to reflect that in 15A-805, there is no mention about anything having to be filed before time.
THE COURT: I have denied the motion—
MR. MURPHY: Yes, sir, Your Honor.
THE COURT: -as to those-
Mr. MURPHY: I would-
*597The COURT: Just a moment! I have denied the motion as to those EXCEPTION No. 2 and allowed it as to three of them; and I will request that it be issued at this time and I will sign it.
Mr. MURPHY: Your Honor, may I please be allowed to continue reading into the record—
THE COURT: What are you reading from? What was that that you are reading from?
Mr. Murphy: 15A-805.
The COURT: I have a copy of that, and the court will take judicial notice of it.
Mr. Murphy: Thank you.
The COURT: What’s your next motion?
North Carolina General Statute § 15A-805 provides, in pertinent part, as follows:
(a) Upon motion of the State or any defendant, the judge of a court in which a criminal proceeding is pending must, for good cause shown, enter an order requiring that any person confined in an institution in this State be produced and compelled to attend as a witness in the action or proceeding.
As indicated by the language of the official commentary,1 we find the procedure for obtaining habeas corpus ad testificandum to be much more complicated than the procedure pursuant to which defendant’s motion was filed. See N.C.G.S. § 17-41 et seq.
Defendant’s motion followed the language of N.C.G.S. § 17-42 which provides for the application for habeas corpus ad testificandum. Obviously his written motion was not sufficient to meet the “good cause” burden imposed by N.C.G.S. 15A-805. Nevertheless, that statute does not require that the motion to produce and com*598pel the attendance of witnesses be in writing, that it be made within a certain time, nor does it specify any particular method by which the movant must state “good cause” for the production of the person to be offered as a witness.
In addition to the statutory provisions of N.C.G.S. § 15A-805(a), the United States Supreme Court has recognized a defendant’s right to compel the attendance of witnesses as a fundamental constitutional right.
In Washington v. Texas, 388 U.S. 14 (1967) the United States Supreme Court reversed defendant’s murder conviction because the state law precluded an alleged codefendant from testifying for defendant. In holding that defendant was denied his sixth amendment right to compulsory process, the Court stated:
The right to offer the testimony of witnesses, and to compel their attendance, if necessary, is in plain terms the right to present a defense, the right to present the defendant’s version of the facts as well as the prosecution’s to the jury so it may decide where the truth lies. Just as an accused has the right to confront the prosecution’s witnesses for the purpose of challenging their testimony, he has the right to present his own witnesses to establish a defense. This right is a fundamental element of due process of law.
Id. at 19.
It appears that the trial judge denied defendant’s motion to produce the witness Totten on the grounds that (1) no affidavits were submitted as to why the witness should be brought to court; (2) the witness did not testify at the previous trial; and (3) the witness’s presence was requested at a late date.
Certainly the statute does not require that affidavits be submitted to show the “good cause” requirement of the statute. Neither can we find viable reason why a witness must have testified in a previous trial in order to be subject to production as a witness for any other given trial. We do recognize, however, that a trial judge has the duty to supervise and control the course and conduct of a trial, and that in order to discharge that duty he is invested with broad discretionary powers. Shute v. Fisher, 270 N.C. 247, 154 S.E. 2d 75 (1967).
*599A late filed motion might delay the course of a trial and invite dilatory tactics by other parties to litigation. Therefore in instant case it was incumbent on defendant to show substantial reasons why his motion to produce and compel the presence of the witness Totten was not filed until the day before the trial was to commence. Our examination of this record discloses, however, that defendant’s motion was denied without permitting him to show the “good cause” requirement of the statute or to advance any reasons, if any he had, why the motion was made at the eve of the trial. For this reason, under the particular facts of this case, we hold that defendant was effectively denied his right of compulsory process.
In considering whether the violation of a constitutional right constitutes prejudicial error, we must determine whether the error was “harmless beyond a reasonable doubt.” State v. Taylor, 280 N.C. 273, 185 S.E. 2d 677 (1972). We cannot say that the failure to produce and compel the attendance of the eyewitness to the alleged crime was harmless error beyond a reasonable doubt and therefore there must be a
New trial.
Justice VAUGHN did not participate in the consideration or decision of this case.. Official Commentary — This section replaces the old “habeas corpus ad testificandum” with a simple motion and order for the production of a prisoner (or other person confined in an institution). If a conflict arises between two cases, and it cannot be resolved at the trial level, provision is made for resort to the appellate division. The statutes in Article 8, Chapter 17 of the General Statutes are left untouched because of their preexisting applicability to other proceedings.