  Context. The majority of stars that leave the main sequence are undergoing
extensive mass loss, in particular during the asymptotic giant branch (AGB)
phase of evolution. Observations show that the rate at which this phenomenon
develops differs highly from source to source, so that the time-integrated mass
loss as a function of the initial conditions (mass, metallicity, etc.) and of
the stage of evolution is presently not well understood. Aims. We are
investigating the mass loss history of AGB stars by observing the molecular and
atomic emissions of their circumstellar envelopes. Methods. In this work we
have selected two stars that are on the thermally pulsing phase of the AGB
(TP-AGB) and for which high quality data in the CO rotation lines and in the
atomic hydrogen line at 21 cm could be obained. Results. V1942 Sgr, a carbon
star of the Irregular variability type, shows a complex CO line profile that
may originate from a long-lived wind at a rate of ~ 10^-7 Msol/yr, and from a
young (< 10^4 years) fast outflow at a rate of ~ 5 10^-7 Msol/yr. Intense HI
emission indicates a detached shell with 0.044 Msol of hydrogen. This shell
probably results from the slowing-down, by surrounding matter, of the same
long-lived wind observed in CO that has been active during ~ 6 10^5 years. On
the other hand, the carbon Mira V CrB is presently undergoing mass loss at a
rate of 2 10^-7 Msol/yr, but was not detected in HI. The wind is mostly
molecular, and was active for at most 3 10^4 years, with an integrated mass
loss of at most 6.5 10^-3 Msol. Conclusions. Although both sources are carbon
stars on the TP-AGB, they appear to develop mass loss under very different
conditions, and a high rate of mass loss may not imply a high integrated mass
loss.
