This is obviously an old (16-bit?) piece of code you are trying to resurrect. Rarely a good idea. You should start fresh or at least find a more modern starting point.