Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DOSBox or something similar? #10

Open
djalilhebal opened this issue Oct 4, 2018 · 1 comment
Open

Add support for DOSBox or something similar? #10

djalilhebal opened this issue Oct 4, 2018 · 1 comment

Comments

@djalilhebal
Copy link

djalilhebal commented Oct 4, 2018

In my university, we use 16-bit MASM, and for some reason, we need to use DOSBox and other tricks to get our programs to work...
This is what I've suggested to my colleagues to make 16-bit programs work. Surely, there must be a better way to do this.

REM For a better MASM16 development envirornment~~~
REM Tested on/with Windows 10 Pro x64, VisualMASM x32 v2.00, DOSBox x32 v0.74

REM Supposing you've installed DOSBox and are using VisualMASM's default settings
REM From VisualMASM's toolbar, select "Project > Options > Link Events > Post-link"
REM then copy and past this one liner:
cmd /C ""C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" "%CD%\Projects\Program\Release\program.exe" -noconsole -c "cls"" && exit

REM Now, to run MASM16 programs, simply click 'build' or 'run' and DOSBox will start...
REM PS: You're a big boy/girl, in case your paths are different, change them by yourself!

REM ====================<< EXPLANATION SORTA >>====================

REM This longer version is easier to understand and edit.
REM It works fine with CMD, but not with VisualMASM's post-link thing, I wonder why...

rem Path to DOSBox
rem it can be different depending on your software versions, may need to be edited.
SET dosbox="C:\Program Files (x86)\DOSBox-0.74\dosbox.exe"
rem The 16-bit resulting program (this is its default path)
rem (%CD% refers to VisualMASM's Current working Directory)
SET program="%CD%\Projects\Program\Release\program.exe"
rem Command to open that program with DOSbox. Also, hide its console and clear its logo.
rem To better tweak DOSBox read its documentation or manual.
SET command="%dosbox% %program% -noconsole -c "cls""
rem To better tweak the CMD, check `cmd /?` and `start /?`
rem Run it
cmd /C %command%
rem Done executing the program, exit now
rem (Again, for some reason, VisualMASM doesn't close the post-link console.)
exit
@ThomasJaeger
Copy link
Owner

I will have to take a look and see if I can make this work better. Thank you for your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants