Masm32 for dos apps

Started by
6 comments, last by CProgrammer 20 years, 8 months ago
How do i compile a dos app written in assembler under masm32. The following most simple example just wont work unles i use an older tasm but this is masm syntax or not.

.model small

.data
message "Hallo",10,13,"$"

.code
.startup
lea dx, message
mov ah, 9
int 21h
.exit

end
Advertisement
I think that newer versions of Masm32 are 32-bit only...
In contrast to 16-bit Ms-DOS.
The syntax seems right, though.

Niko Suni

Do you know where i can get a 16-bit masm compiler preferably with a graphical interface.
No, sorry.
I haven't written a single line of 16-bit specific code in my life nor do i want to.

EDIT:
By the way, writing your own simple assembler isn't very hard.
All you need is the intel architecture manuals, a simple parser logic, and some knowledge of the executable and object formats.

[edited by - Nik02 on August 16, 2003 5:54:21 AM]

Niko Suni

Thanks for the feedback.

-CProgrammer
Are the Intel/AMD architecture specs free?!

"Tonight we strike,there is thunder in the sky,together we''ll fight,some of us will die,but they''ll always remember that we''ve made a stand and many will die by hand!" - ManOwaR
I cut & pasted this from the Masm32 help file

.MODEL directive

If the .MODEL directive is preceded by the .386 or .486 directive
(or their privileged counterparts), the assembler uses 32-bit
segments. If the .386 or .486 directive follows the .MODEL
directive, the default 16-bit segments are used. The flat memory
model uses 32-bit segments and must be preceded by a .386 or .486
directive.


Hope it works.



Stevie

Don''t follow me, I''m lost.
StevieDon't follow me, I'm lost.
quote:Are the Intel/AMD architecture specs free?!


Yes.

Intel Architecture Software Developer's Manual, vol.1

Most of the stuff also applies to AMD processors, naturally, but for 3dnow reference see AMD's developer site.



[edited by - Nik02 on August 17, 2003 8:49:14 AM]

Niko Suni

This topic is closed to new replies.

Advertisement