
56 Md. App. 289 (1983)
467 A.2d 784
JAMES RANDOLPH MAGROGAN AKA GREGORY WILLIAM CLARKE
v.
STATE OF MARYLAND.
No. 1962, September Term, 1982.
Court of Special Appeals of Maryland.
November 7, 1983.
David B. Mitchell, Assigned Public Defender, with whom was Alan H. Murrell, Public Defender, on brief, for appellant.
Valerie V. Cloutier, Asst. Atty. Gen., with whom were Stephen H. Sachs, Atty. Gen., John L. Scarborough, State's Atty. for Cecil County and James C. McKinney, Asst. State's Atty. for Cecil County, on brief, for appellee.
Argued before LISS, BISHOP and BLOOM, JJ.
BISHOP, Judge.
On August 31, 1982, appellant, James Magrogan, also known as Gregory Clarke, pled guilty in the Circuit Court for Cecil County (Cole, J., presiding) to unauthorized use of a motor vehicle. On October 25, 1982, he received a four year sentence that commenced from October 25, 1981  one year earlier. He argues on appeal that the trial court erred (1) because it sentenced him in violation of Article 27, section 638C(a); (2) because its sentencing was improperly motivated; and (3) because his plea agreement had been breached.

Facts
Appellant was indicted for housebreaking and related offenses allegedly committed during May 12-15, 1980. From September 1980 through August 1981, appellant was incarcerated in Pennsylvania on charges of receiving stolen goods in violation of that Commonwealth's laws. On September 30, 1981, shortly after his release, appellant stole an automobile from a Plymouth dealer in Cecil County. On October 10, 1981, Pennsylvania authorities arrested him in the stolen car and charged him with two counts of receiving stolen property. He was incarcerated in Pennsylvania until November 30, 1981, when he was turned over to Delaware authorities. He was then incarcerated in Delaware until he was released on bond, on December 8, 1981. On December 17, 1981, Pennsylvania authorities arrested and charged him with possession of a Chevrolet automobile stolen in Harford County, Maryland. While he was in custody in Pennsylvania, Maryland authorities lodged a warrant on January 2, 1982, charging appellant with the Cecil County housebreaking and related offenses committed in May 1980. And in late January 1982, Maryland authorities lodged a warrant in Pennsylvania charging appellant with unauthorized use of the Plymouth automobile and related offenses.
On February 17, 1982, a Cecil County grand jury filed a three count indictment charging appellant with unauthorized use of the Plymouth automobile and related offenses.
On February 26, 1982, appellant was transferred to and arrested in Maryland on the housebreaking and Plymouth auto theft charges.
Pursuant to a plea agreement, appellant pled guilty on August 31, 1982, to one count of unauthorized use of the Plymouth automobile and agreed to pay $50.00 restitution to the victims of his housebreaking. In return, the State entered a nolle prosequi on all of the charges arising out of the housebreaking, and on the second and third counts of the indictment relating to appellant's unauthorized use of the Plymouth automobile. On October 25, 1982, the Circuit Court sentenced appellant to four years' imprisonment, commencing from October 25, 1981.

The Law
(1) Appellant initially contends that the court's sentence failed to accord him sufficient credit for time served. He cites Article 27, section 636C(a), which provides in pertinent part:
"In any case where a person has been in custody due to a charge that culminated in a dismissal or acquittal, the amount of time that would have been credited against a sentence for the charge, had one been imposed, shall be credited against any sentence that is based upon a charge for which a warrant or commitment was lodged during the pendency of such custody." (Emphasis supplied.)
Appellant suggests that this provision entitles him to credit for time he spent in custody on the housebreaking charges, which were later nol prossed.
The State argues that a nolle prosequi is only a dismissal of a charging document, not a permanent dismissal of charges. See Ward v. State, 290 Md. 76, 83-84, 427 A.2d 1008 (1981). In this case, however, the State nol prossed the housebreaking indictment as part of a plea agreement; as long as appellant complies with the terms of the agreement, the State cannot reinstitute the charges. Hence, the nolle prosequi in this case is effectively tantamount to a dismissal. See State v. Brockman, 277 Md. 687, 357 A.2d 376 (1976); Banks v. State, 56 Md. App. 38, 466 A.2d 69 (1983). Article 27 section 638C is, therefore, applicable. That statutory provision mandates that credit be granted for any sentence that is based upon a charge for which a warrant was lodged while appellant was in custody for the housebreaking charges. As the above chronology indicates, though, a warrant for unauthorized use of the Plymouth automobile was filed in late January 1982. Appellant was incarcerated in Pennsylvania then, not for the housebreaking charges, but for theft of another automobile. Only on February 26, 1982, when he was transferred to Maryland, was appellant incarcerated for the housebreaking charges after issuance of the warrant for unauthorized use of the Plymouth automobile. Consequently, the only credit to which he was entitled, if any, was the time he spent in Maryland custody between February 26, 1982, and his sentencing on October 25, 1982. The sentencing court's decision to have his sentence commence from October 25, 1981, more than accounted for this time in custody.
(2) Appellant also argues that the sentence imposed on him was dictated by passion, ill will, and prejudice. Appellant points out that the trial judge, before sentencing, referred to him as a "jail bird" and "accused him of being a manipulative, habitual criminal who was a burden to the taxpayers of the county." Further, the judge stated that he was tired of the appellant's foolishness and "accused the appellant of being a slick, cunning habitual criminal of no credibility, attempting to con and manipulate the court." The court also accused the appellant of having no credibility and of lying. Taken out of the context of the entire sentencing procedure, the above would appear to be very intemperate remarks; however, placing these remarks within their proper context, it is clear that the maximum sentence of four years imposed by the judge was not dictated by passion, ill will, and prejudice. We see no abuse of discretion. Logan v. State, 289 Md. 460, 480, 425 A.2d 632 (1981).
(3) On October 25, 1982, appellant moved to withdraw his guilty plea on the grounds that the trial court refused to implement an alleged plea agreement term that required credit for time served since October 8, 1981. Appellant subsequently withdrew the motion. His argument that the plea agreement was breached is accordingly not preserved for appellate review. Maryland Rule 1085.
JUDGMENT AFFIRMED.
COSTS TO BE PAID BY APPELLANT.
