HEMAS-DPM is a Monte Carlo for the simulation of very high energy cosmic ray showers, which includes the DPMJET-II code based on the two component Dual Parton Model. DPMJET-II provides also charm production in agreement with data and, for p⊥ exceeding 5 GeV/ c, with perturbative QCD results in proton-proton interactions. In this respect, a new scheme has been considered for the inclusive production of D mesons at large p⊥ in hadronic collisions in the framework of perturbative fragmentation functions, allowing an analysis at the Next to Leading Order (NLO) level which goes beyond the fixed I( α s 3) perturbative theory of open charm production. We have applied HEMAS-DPM to the calculation of the prompt muon component for E μ ≥ 1 TeV in air showers considering the two extreme cases of primary protons and Fe nuclei.