Measurement of asymmetries of inclusive pion production in proton--proton interactions at 6 and 11. 8 GeV/c