I am not at all into shader asm, but I am very sure that somewhere the fog register is assigned a value. Also, there is no shadermodel below 1.4 (or was it 2.0?) with gamestudios directx version anymore.
Just rewrite the vertexshader in hlsl and it should work.