Production of heavy quarks on protons within the semihard QCD approach