Infrared experiment- wheres this code from?

Right, I tried running the above code as a seperate 38Khz generator, with the idea of feeding it to a transisitor, and externally gating the VirtualWire data with a diode.

As soon as I set the VW, however , the 38Khz dies, so I am going to use a separate 555 timer to generate the 38Khz ( cutting edge eh? ) for the experiment, and come back later to the internal gating.