(a) Duties of assigned or retained counsel. (1) It shall be the duty of counsel assigned to or retained for the defense of a defendant in a criminal action or proceeding to represent defendant in the trial court until the action or proceeding has been terminated in that court, and to comply with the provisions of paragraph (b)(1) or (d)(2) of this section, after which the duties of assigned counsel shall be ended. (2) It shall be the duty of counsel assigned to prosecute or defend an appeal on behalf
(a) Upon conviction in the trial court or upon denial in that court of a motion made pursuant to C PL 440.10 or 440.20 or the denial or dismissal of an application in a habeas corpus or CPLR article 78 proceeding, it shall be the duty of the counsel for the defendant, immediately after the pronouncement of sentence or after service upon him of a copy of the order denying the motion or of the order or judgment denying or dismissing the application, to give, either by mail or personally, written notice
(a) After conviction or denial of post-conviction or habeas corpus relief. Where there has been a conviction after trial or otherwise, or where there has been an adverse decision upon an application for a writ of habeas corpus or upon a motion made pursuant to section 440.10 or section 440.20, Criminal Procedure Law, it shall be the duty of counsel, retained or assigned, and of the public defender, immediately after the pronouncement of sentence or the service of a copy of a judgment or order disposing