The earliest portable firearms were due to development of the small cannon. The earliest known firearms were pyrotechnical and were used to frighten and stampede enemy horses. These were common in China and later spread from North Africa to Southern Europe.
It consists of a hollow iron tube A, roughly about 5-6 feet long. To one end of this tube is attached a wooden handle B. The entire metal tube A and part of B are tightly bound by hemp rope, hide sinews, horse hair etc. The right end of tube A is completely sealed off. It is then filled first with a few inches of coarse gunpowder, then a bullet made of glass, wax, steel filings etc. is added, then another few inches of gunpowder, then another bullet etc. The alternating layers of gunpowder and bullets are added until the tube is completely filled. The sides are filled with a finer gunpowder. At the muzzle end (the left end) of tube A, a thin rope fuse is added.
The weapon is then pointed at the target, using the handle B and the rope fuse is lit. The weapon will then burn a bit of gunpowder and discharge the first bullet. It will continue burning a bit more and then discharge the second bullet and so on. The weapon will continue to discharge bullets as long as there is gunpowder left in the tube and the gunner simply keeps the weapon pointed at the target. Since the bullets are made of wax and flammable materials, this weapon discharges flaming balls of fire and hot metal.
Weapons like the one above were the first portable firearms. The only advantage of this type of weapon is portability. It certainly had a number of disadvantages: it lacked accuracy, it could not be stopped once it was lit, no control of when the next bullet would be discharged, good chance of the weapon exploding due to too much pressure etc. The disadvantages of this weapon meant that it could only be used to scare masses of foot soldiers, cavalry etc.
The next development came from the French and Italians. It consisted of a small cannon called a bombarde, which was attached to a straight piece of wood. The wooden stock was curved on the bottom surface so that it could be supported on the shoulder.
To fire the weapon, the soldier would place the stock on their shoulder and use both arms to support the weapon. The soldier would also use one of his hands to light the fuse in the middle of the weapon.
A modification of this basic weapon made it suitable to be used on horseback as well. Instead of being attached to a piece of wood, a long iron rod was welded to the back of the bombarde. The other end of the iron rod ended in a ring and a rope was passed through the ring and suspended around the neck of the horseman. The front end of the bombarde was supported by a Y-shaped rest which was projecting from the front of the saddle. The horseman would carry a slow burning rope tied around his waist. To fire the weapon, the horseman would use his left hand (as shown in the illustration above) to point the weapon to the target and use the right hand to take the end of the slow burning rope and light the cannon. Such a weapon was called a petronel and was the grandfather of the modern pistol and carbine.
A better picture of these weapons is shown below, courtesy a public domain image from wikipedia: