You can look at this to see what changes are needed.... This is pruned down so you can read it better.

Things to do are in red.

Code:

technique Pixelshader11
{
pass p0
{

vertexShaderConstant[64]= { 20.0,20.0,20.0,20.0};
vertexShader=

asm
{
vs.1.1

dcl_position v0
dcl_normal v3
dcl_texcoord0 v7


Typical stuff...............



// Fog
mov r1.w,c20.w
dp4 r0,v0,c10
add r0,r0,-c20.x
mad r0.x,-r0.x,c20.z,r1.w
max oFog,r0.x,c95.w
};

}