Thanks for all of the help from everybody. I now have my code fixed and it is emulating the clock signal accurately as far as I know. I had to make the bit volatile, and do the B0 interrupt. It wouldn't do it at 8 MHz, but when I switched to 20 MHz it didn't have a problem.
On a side note, BoostC is a great compiler and I highly recommend it. I just need to learn to program better.
On a side note, BoostC is a great compiler and I highly recommend it. I just need to learn to program better.