Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Suppose you have an ancient program written in MASM (Microsoft Assembler) and you want your Linux Makefile to be able to compile it (I mean run MASM from within the Makefile just as you would run gcc). Which emulator will get you there with the least amount of work?


I have literally used this emulator to run MASM in this way. I was traveling with an ARM Chromebook and wanted to mess with a retrocomputing project.

dosemu was out because my host wasn't x86. dosbox was out because I wanted to run a process with filesystem access, not a whole system. qemu's system emulation has the same problem as dosbox, and qemu's user-mode emulation runs Linux programs, not MS-DOS programs.


In DOSBox you can mount host directories to MS-DOS drives with the "mount" command (and of course you can use Linux bind mounts and mount namespaces along with it).


Agreed. I wanted to script stuff like linking together 200 .OBJs, and running tests' stderr through sed to make it comparable with a known-good log. A DJGPP install + ancient Python inside DOSBox would've also done the job. Or even period-accurate DOS tools, but that'd cross my "is this retrocomputing or masochism?" threshold for this project.


dosemu does exactly that. It even has a dumb terminal mode for this exact purpose (-t).


I've been trying dosemu2, it's pretty good. Dosemu2 very badly needs better documentation, at least if the dosemu2 github is the starting point. Very basic things are not mentioned in the first documents you look at, like "exitemu" to exit the emulator and Ctrl-Alt-Home to grab/ungrab the mouse. The man page is incorrect for executing single commands, you need to type this to capture the output from a single command:

    dosemu -dumb -exec dir >foo
Or this if you want to see the output on the screen:

    dosemu -dumb -E dir




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: