@Passel: I changed the looping condition as you suggested, it still runs at CPU dependent speed. I would have to ask at the DOSBox forums whether DOSBox supports vertical retrace.