Muhammad bin al-Hajjaj (may Allah have mercy on him) narrates from his father, from his father (al-Sa'ib bin Abi Lubabah); he said: The Messenger of Allah (peace and blessings be upon him) said on the day of Badr: "How will you fight the enemy when you meet them?" Asim bin Thabit (may Allah be pleased with him) stood up and said: O Messenger of Allah! When the enemy is at such a distance from us that arrows can reach them, it will be a contest of shooting arrows; then when they come so close that both we and they are within reach of stones, it will be a contest of throwing stones (he took three stones in his hand and two stones in his bag); then when they come so close that both we and they are within reach of spears, it will be a contest of thrusting with spears; then when the spears are used up, it will be a contest of striking with swords. The Messenger of Allah (peace and blessings be upon him) said: "This is how war was sent down. Whoever fights, let him fight as Asim fights."
Hadith Referenceالمعجم الكبير للطبراني / باب الراء / 4498