One of the boys miraculous escaped serious injury after being knocked down and crawled from under the coach.
However, the other youngster, then aged 13, suffered severe injuries and was trapped under a wheel as passers-by desperately tried to free him.
But witnesses said as these efforts went on, the driver remained on the bus, asking if the boy was dead.
It was feared in the days after the accident that the boy may have to have his leg and arm amputated but both limbs were saved.
The trial heard of chaotic scenes as the boy cried for help, on-lookers were screaming, while others videoed the incident for social media and the bus was vandalised.
Bus driver John Morrison is on trial accused of dangerous driving at Dunfermline Sheriff Court.
Morrison (59) of Marmion Drive, Glenrothes, appeared in the dock for the second day of the trial.
It is alleged that on February 28 last year in Allan Crescent, Dunfermline, Morrison caused serious injury to a 13-year-old boy by driving a vehicle dangerously, failed to maintain proper observations of the roadway around him and struck both boys, also causing injury to the younger boy. He denies the charge.
The boy who was seriously injured told the court he had undergone five operations since the accident.
He was trapped under the wheel of the bus as members of the public made valiant but unsuccessful efforts to raise the vehicle.
He was eventually freed after the arrival of the emergency services.
The boy, now 14, sustained multiple fractures to his right leg and right arm. He had pinsinserted in his leg, had three skin grafts and spent time in a wheelchair. He was in hospital for more than a month.
He can now walk and is continuing his recovery but said: “I can’t run that well.”
He said he was walking back home from high school with friends and passing through a car park.
“I don’t remember seeing the bus,” said the youngster, adding that he had been looking at his friend’s phone. “I think I saw a flash and the bus hit me.”
Sheriff Charles MacNair told the boy: “You have shown remarkable fortitude in the face of serious injury. Many people who come to this court would have made much more of these injuries. You should feel very proud.”
The boy’s gran said she first heard of the accident was when boys came to her home to tell her.
She described the scene at the car park after she ran from her home. “It was a massive crowd. It was like Dunfermline Gala Day, there were so many kids there.
“They wouldn’t let me near him but I could see blood running from under the bus.”
She said that the boy had recently been having nightmares.
However, she said that the family had tried to stay positive throughout the ordeal and she was proud of him. “I could tell you a hundred things he can’t do but he’s lucky to be alive.”
Graham Cork, (50) a Fife Council worker, was in his van in the car park when he heard a “commotion”.
He ran over and “dived under the bus to see to the kid, talk to him and try to keep him as calm as possible.”
Michael Dunster (21) a furniture deliveryman, witnessed the bus hitting the boys. “It was like slow motion. We couldn’t believe what we were seeing. It was like something out of a horror film.”
He went on: “The bus driver asked me if the boy was dead. I said I didn’t know.”
His work colleague Samuel Melville (29) said the bus driver made no attempt to slow down before the collision.
He said he was “angry” with the driver after the accident. “The driver asked me how the boy was. I told him to get out and look for himself. He just shrugged.”
The trial was adjourned until August 15.