Is this what you want?
At least it works with DJGPP, I haven't tried with BC++.