Bamaiyi told the court while being being cross-examined by Fred Ajudua, a lawyer, former Lagos socialite and an alleged serial fraudster before Justice Josephine Oyefeso of an Ikeja High Court.
Ajudua is standing trial for allegedly defrauding the retired General of 8.4million dollars.
The News Agency of Nigeria (NAN) reports that Ajudua cross-examined Bamaiyi because his counsel, Mr Olalekan Ojo (SAN) was not in court.
Bamaiyi told the court that he served in the Nigerian Army for 34 years after he was commissioned as a second Lieutenant on July 5, 1968.
He said that he served as the Chief of Army Staff from Nov. 17, 1993 to May 29, 1999.
The former COAS testified that he was arraigned in court on Nov. 23, 1999 alongside late CP James Danbaba and Col. J. B Yakubu over the attempted assassination of the late publisher of The Guardian Newspaper Mr Alex Ibru.
Responding to questions about his earnings Bamaiyi said: I cannot remember my earnings as the Chief of Army Staff, I was a Lieutenant General for two years and now I am a pensioner.
When I left the Nigerian Army, I was paid gratuity and then a pension which I now enjoy, I cannot remember how much I received as gratuity, as for my pension I receive what the Chief of Army Staff receive.
My Lord, I cannot come here to say how much the Chief of Army Staff receives,
But Justice Oyefeso, however insisted that Bamaiyi revealed to the court what he earned as COAS.
Bamayi then responded saying as Chief of Army Staff, you receive about N1million per month; I cannot remember the gratuity as that was many years ago.
While in the Army, we encouraged officers and soldiers to start preparing for their retirement while still in service so long as it does not compromise their normal military services.
I had my own farm which I started in 1984 when I was a Lieutenant Colonel. I have over 450 hectares of farmland which I still own.
I do animal husbandry,i grow fruits, maize, cotton, rice, soya beans and yam.
As a farmer, it is very difficult to make an estimate of earnings because of weather conditions, shortage of rain and stealing by farm workers, he told the court.
Bamaiyi told the court that when he was incarcerated at the Kirikiri Maximum Prisons, his family visited him but with restrictions while he had access to his legal team.
Following Bamaiyis revelations, Ajudua, requested for an adjournment to enable Ojo his defence counsel to further cross-examine the former Chief of Army Staff.
Justice Oyefeso adjourned the case until April 3 for continuation of trial.
Earlier, Justice Oyefeso rejected the defences request for Bamaiyi to produce some documents which included the 2005 visitors book of the Kirikiri Maximum Prisons and additional proof of the source of the $8.4million, the subject matter of the trial.
There is no doubt that the defendant facing a criminal charge should require facilities to assist or aid his defence and in the instant case, the defence has been served with documents and additional proof of evidence.
The prosecution claimed they do not have items two to eight on the schedule of documents.
The court is not compelled to force the prosecution to come up with documents which they clearly do not have.
I am satisfied with the explanation of the prosecution, the application of the defendant is hereby dismissed, Justice Oyefeso said.
NAN reports that according to the prosecution, Ajudua, who was incarcerated at the Kirikiri Maximum Prisons had alongside some accomplices allegedly approached Bamaiyi in 2004 to provide him with legal assistance.
The defendant had allegedly convinced Bamaiyi that he could hire the legal services of Chief Afe Babalola (SAN) to help secure his freedom from Kirikiri with Ajudua allegedly fraudulently receiving $8.4million as legal fees.
When the alleged fraud came to light, the law chambers of Afe Babalola and Co issued a disclaimer disassociating itself from the case.