Muhammad Ali Dildar
Muhammad Ali Dildar

Reputation: 1527

How to execute assembly program on 64-bit OS?

I've just started assembly language. I was told that 'MASM' is used for writing code. So I downloaded MASM 6.15.

Now I am trying to run a program after the compilation in 'CMD' but it says "The version of this file is not compatible with the version of Windows you are running... you need 32-bit version..."

Please tell me how can I run these programs on my 64-bit system?

Upvotes: 0

Views: 8054

Answers (2)

龚元程
龚元程

Reputation: 417

You need to download masm64 (google)

However masm is not the way to go to make 64bit programs.

People start more and more using JWASM as it can output to elf as well as coff and others.

The easiest seems to still be goasm. Lots of tutorials and examples online.

Upvotes: 0

Rinze Smits
Rinze Smits

Reputation: 868

16-bit programs will not execute on a 64-bit Windows. So apparently you are compiling and linking 16-bit programs. If you wish to execute those (because you're following a book or tutorial) you can run them inside a VM running an 32-bit windows or DOS or you can use a DOS emulator like DosBox. If you wish to develop programs in assembly for modern Windows versions you'll have to use a newer version of MASM and learn how to develop for 32- or 64-bit Windows, the link Jason Evans provided will lead you to newer versions of MASM and has all other information you need for that.

Upvotes: 2

Related Questions