Since couple of weeks, I have actually been studying Assembly Language Programming, today I mounted all the crucial applications come compile one assembly program.

I download DOSBox 0.74, NASM (Assembler), and AFD (Debugger). Ns mount the drive and also see my .asm files correctly. Yet when ns execute the adhering to command:

nasm firstprogram.asm -o

it gives me the adhering to error: This program cannot be operation in dos mode

But once I translate in the record through command note (cmd) it compiles corrrectly and also then I have to go to DOSBox to operation AFD and debug the .com file.

Any idea why am I acquiring this error top top DOSBox?



If you"re executing nasm within of DOSBox, then what happens is nice straightforward...

You are watching: Dosbox this program cannot be run in dos mode

You"ve been lied by compatibility layers!

If you view the details that the Portable Executable format (a.k.a: the internal layout of .exes, .dlls, and .coms (those last used to use the common Object document Format)), you"ll notification there"s something dubbed the MS-DOS stub header. It"s purpose is to display screen the post "This regime cannot be run in DOS mode" on 16-bit real mode operating systems, such together MS-DOS, as to inform the user the the program is not compatible v the oldish system.

This method that you"re to run a Windows nasm ~ above a MS-DOS (virtual) platform. Shot using the DOS binaries instead and you must be fine.


You downloaded the variation that operation in Windows. When you open up a brochure of a details version, there room subdirectories for miscellaneous OS.

For example, here:

If friend download the one from /dos folder friend will be able to run it in DOSBox, yet if girlfriend download the one in /win32 folder, you will certainly only have the ability to run that from Windows.


Probably you room doing so called console application. It operation on console, however requires windows 95 or never ever under the hood, largely for fat32 support.


Thanks for contributing solution to ridge Overflow!

Please be sure to answer the question. Carry out details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based upon opinion; back them up with recommendations or an individual experience.

See more: What Is A Republic Of Liberia 5 Dollar Coin S, 5 Dollars 2000

To discover more, watch our tips on writing good answers.

article Your price Discard

By click “Post your Answer”, girlfriend agree come our terms of service, privacy policy and also cookie policy

Not the price you're looking for? Browse other questions tagged assembly nasm or asking your very own question.

site design / logo design © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.10.22.40552

your privacy

By clicking “Accept every cookies”, friend agree ridge Exchange can store cookie on your device and disclose details in accordance with our Cookie Policy.