  We demonstrate on the basis of ab initio simulations how passivated
semiconductor surfaces can be exploited to study bulklike interaction
properties and wave functions of magnetic impurities on the atomic scale with
conventional and spin-polarized scanning tunneling microscopy. By applying our
approach to the case of $3d$ transition metal impurities close to the
H/Si$(111)$ surface, we show exemplarily that their wave functions in Si are
less extended than for Mn in GaAs, thus obstructing ferromagnetism in Si.
Finally, we discuss possible applications of this method to other dilute
magnetic semiconductors.
