harshvardhan:
I want to run a dc motor, using just two output pins .(I cant use a dpdt realy, and an h-bridge requires 4 pins)
{I just have tip 122, and I cant get any PNP transistors. }
You could modify a servo for continous rotation and control direction and speed just using one control line.