How does dos shell works?