can I call dosbox from inside matlab?

조회 수: 2 (최근 30일)
Matthew
Matthew 2013년 2월 27일
I have an ancient piece of software that I am currently forced to deal with. It runs in dosbox (32-bit emulation) on my 64-bit machine. Can I call dosbox from inside matlab and then send commands to the dos prompt? If I can call dosbox, I might be able to have matlab write a.bat file that could then run.
I don't even have an idea how to get started, but I thought someone might.
Thanks

채택된 답변

grapevine
grapevine 2013년 2월 27일

추가 답변 (1개)

Jason Ross
Jason Ross 2013년 2월 27일
Does command line redirection to pass an input file via the system command work?
myexe.exe < c:\temp\inputs.txt
You should be able to see if the "<" operator works outside of MATLAB to provide the input to dosbox, then get it working in a regular command shell, then a system() command in MATLAB where you put what works in command shell.
You can also try generating the inputs.txt file in MATLAB before you run it if you need to change inputs.
Another option -- if you call a 32-bit command shell (on 64-bit, this is in c:\windows\SysWoW64\cmd.exe) can you bypass dosbox and access your program? You might be able to eliminate at least one layer of redirection.
  댓글 수: 1
Matthew
Matthew 2013년 3월 4일
Sorry everyone, your response notifications were getting spammed. I will try to get at this soon. Alas Jason, the program will not run in a 32-bit command shell. A very sad circumstance.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by