There seems to be quite a few problems here that I can see.

Dir1 does not make pin 1 and input. The TRIS register is used to tell the ports direction.

I don't believe you can access a port by saying Pin1. You have to be a little more specific like GPIO.1 for instance.

What is the purpose of Mi? From what I can see it does nothing except consume resources.