I want to run a dos application, how can i get the text of the dos app?

CAn anyone show me the code of running the ms-dos app to getting the text of that console windows...