News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Can you use masm32 to assemby 32 bit dos ?

Started by Lassar, March 01, 2013, 02:18:22 PM

Previous topic - Next topic

Lassar

I am doing a dos program for mobile devices.

My question is can you use masm32 to assembly for 32 bit dos?

dedndave

well - strictly speaking, DOS is 16-bit
but, you can write a 16-bit DOS program and use 32-bit registers for math, etc
to use the registers, put .386 or higher in the preamble
        .MODEL  Small
        .386
        .STACK  1024
        OPTION  CaseMap:None

be sure to use the 16-bit linker for linking (link16.exe)

you could also write a 32-bit console-mode program
it's not DOS - it's Win32, but still runs in a console window

not sure what processor you are using, or OS
masm32 is for x86 processors
masm, the assembler, is supposed to be used for windows only
but, there are work-arounds, like using JwAsm, which is masm compatible

japheth

Quote from: Lassar on March 01, 2013, 02:18:22 PM
My question is can you use masm32 to assembly for 32 bit dos?

It depends on what you mean with 32-bit dos.

There's a 32-bit DOS API implemented by NTVDM+DOSX ( DPMI ).

About the legal aspect: Since this API is implemented by NTVDM one can say that it is a "Microsoft Operating System"; see the license (http://masm32.com/license.htm) why this may be relevant, but, in case you have professional legal knowledge, be sure to "fasten your suit belts" before starting to read.

About the rest: it's  possible, but, depending on what you intend to use of Masm32, you may need a layer that emulates a few Win32 functions. There are a few that might do the job. However, this is advanced stuff.