
475 S.E.2d 828 (1996)
23 Va. App. 208
Boyd Oliver MILLER, Jr.
v.
COMMONWEALTH of Virginia.
Record No. 1988-95-3.
Court of Appeals of Virginia, Salem.
September 24, 1996.
Thomas B. Dickenson (King, Fulghum, Snead, Nixon & Grimes, on brief), Roanoke, for appellant.
Daniel J. Munroe, Assistant Attorney General (James S. Gilmore, III, Attorney General, on brief), for appellee.
Present: FITZPATRICK and OVERTON, JJ., and HODGES, Senior Judge.
HODGES, Senior Judge.
Boyd Oliver Miller, Jr. (appellant) was convicted of two counts of robbery and two *829 counts of use of a firearm in the commission of robbery. There was no controversy that the pistol he used in the robberies was so badly rusted that ammunition could not be loaded into it. Therefore, he contends that the pistol was not a firearm within the meaning of Code § 18.2-53.1 and thus, the evidence was insufficient to sustain his convictions for use of a firearm in the commission of robbery. We disagree and affirm the convictions.

I.
Appellant was charged with two counts of robbery, two counts of use of a firearm in the commission of robbery, and two counts of possession of a firearm after having been convicted of a felony, arising from incidents at a Hardee's restaurant and the Orange Market in Salem. Appellant entered pleas of guilty to the robbery charges and pleas of not guilty to the charges of use of a firearm and possession of a firearm by a convicted felon.[1]
The evidence established that on March 23, 1995, at 10:30 p.m., appellant entered Hardee's restaurant and ordered a cup of coffee. When the cashier opened the cash drawer, appellant produced a gun in his right hand and, with his left hand, reached into the cash drawer and took money from it. At 1:00 a.m., on March 24, 1995, appellant entered the Orange Market, retrieved a bottle of orange juice from the cooler, and brought it to the cashier. When the cash register drawer opened, appellant produced a gun in his right hand, and, with his left hand, reached across the counter and took cash from the cash register. A surveillance camera at the market recorded the events. After appellant left the market, he got into a car driven by his wife.
Appellant's wife was arrested in the City of Roanoke on unrelated charges. When appellant came to the Roanoke jail to post bail for her, he was arrested on the robbery charges. Police searched the passenger portion of the taxicab in which appellant had been riding on his way to the jail and found a small revolver. After his arrest, appellant admitted his involvement in the robberies.
Detective Meador of the Roanoke City Police Department testified that the weapon was a "small revolver that's rusted." He testified that the gun cannot be opened and cannot be fired "because you couldn't put the ammo in it." Meador opined that a gunsmith would be able to restore the weapon but would need to take the gun apart, then reassemble it.

II.
At trial, appellant argued that he could not be convicted of the use of a firearm charges and the possession of a firearm by a convicted felon charges because the weapon was inoperable and, as such, was not a firearm under the applicable statutes. The judge found appellant not guilty of the charges of possession of a firearm by a convicted felon, finding that the purpose of Code § 18.2-308.2 is "to prevent actual harm and to prevent the actual ability to do harm."
The judge found appellant guilty of the two charges of use of a firearm in the commission of robbery. The judge found that the weapon was a firearm for purposes of that statute. He noted that the rust on the gun did not affect its appearance, and the law does not require the firearm to be operable. The judge concluded, "I do not find that this weapon has lost its identity as a firearm. . . ."

III.
The issue presented on appeal is whether the rusted, inoperable revolver used in the robberies constituted a firearm within the meaning of Code § 18.2-53.1.
The word "firearm" is not defined in Code § 18.2-53.1, nor does the statute refer to any other statute defining the term. However, a court, in construing the words of a statute, "must give effect to the legislative intent" of the statute. Scott v. Commonwealth, 14 Va.App. 294, 296, 416 S.E.2d 47, 48 (1992). See Newton v. Commonwealth, 21 Va.App. 86, 89, 462 S.E.2d 117, 119 (1995).
*830 In Holloman v. Commonwealth, 221 Va. 196, 269 S.E.2d 356 (1980), the Supreme Court of Virginia discussed Code § 18.2-53.1:
The statute not only is aimed at preventing actual physical injury or death but also is designed to discourage criminal conduct that produces fear of physical harm. Such fear of harm results just as readily from employment of an instrument that gives the appearance of having a firing capability as from use of a weapon that actually has the capacity to shoot a projectile. The victim of a crime can be intimidated as much by a revolver that does not fire bullets as by one that does. . . .
Id. at 198, 269 S.E.2d at 358.
In Holloman, the Court affirmed the conviction for use of a firearm where the defendant had used a BB gun, which resembled a.45 calibre handgun, in the commission of rape. Id. at 199, 269 S.E.2d at 358. In Cox v. Commonwealth, 218 Va. 689, 240 S.E.2d 524 (1978), the Court affirmed the conviction where the defendant used a firearm, which, while capable of firing ammunition, was at the time of the robbery loaded with wooden bullets, which "were ab initio incapable of being discharged." Id. at 692, 240 S.E.2d at 526.
In Yarborough v. Commonwealth, 247 Va. 215, 441 S.E.2d 342 (1994), the Supreme Court held that to prove the offense of use of a firearm, "the Commonwealth must prove that the accused actually had a firearm in his possession and that he used or attempted to use the firearm or displayed the firearm in a threatening manner while committing or attempting to commit robbery or one of the other specified felonies." Id. at 218, 441 S.E.2d at 344. The Court stated that possession of a firearm is an "essential element" of the offense. Id. at 219, 441 S.E.2d at 344. The Court in Yarborough, however, did not hold that the accused must have an operational firearm in order to fall within the purview of the statute. Yarborough did not overrule Holloman and Cox.[2]
We affirmed the conviction for use of a firearm in the commission of robbery in Wilson v. Commonwealth, 19 Va.App. 535, 452 S.E.2d 884 (1995), where the victim, who was familiar with guns, saw only the handle of a gun protruding from the robber's pocket, and saw the defendant with his hand in his pocket next to the gun. We held that the evidence "sufficiently proved Wilson's actual possession of a firearm and his use of it in a threatening manner while committing the robbery." Id. at 537, 452 S.E.2d at 885. Cf. Sprouse v. Commonwealth, 19 Va.App. 548, 453 S.E.2d 303 (1995) (defendant may not be convicted for the use of firearm in commission of robbery where undisputed evidence established that robber used toy pistol).
Here, the trial judge found that the rust on the gun did not affect its appearance. He concluded that the weapon had not "lost its identity as a firearm." The judge did not err in convicting appellant of use of a firearm in the commission of the robberies.
We affirm the judgment of the trial court.
Affirmed.
NOTES
[1]  The Commonwealth presented a summary of the evidence concerning the robbery charges. The court heard testimony about the firearm used in the robberies.
[2]  The Court in Yarborough discussed Holloman and Cox and concluded that the cases stand for the proposition that the Commonwealth must prove that the defendant actually possessed a firearm. Yarborough, 247 Va. at 218, 441 S.E.2d at 343-44.
