Archived

This topic is now archived and is closed to further replies.

PsyCHo puNk

masm32 newbie

Recommended Posts

Can someone show me how to get a simple dos program to assemble and link with masm32? I'm trying to learn ASM and the assembler directives are driving me nuts! (I'm use to just coding then just pushing the big compile button and BAM! its there hehehe IDEs good!). I'm trying just a very simple .com executable that simply exits to dos, like this: .186 .model tiny .code org 100h INT 20h ; Exit to dos. END I end up getting a linker error that there are multiple .data segments, or sometimes theres some wincrt symbol constant undefined when I'm not even writing a win app. I have this program working in a different assembler but I want to learn to use masm32. Thanks Edited by - PsyCHo puNk on June 10, 2001 12:47:11 AM

Share this post


Link to post
Share on other sites
I don''t use masm or visual studio, but I would suggest looking at the project settings. My guess would be entry/exit code being added into it during the link. If you can''t figure out what is going wrong then try replacing the assembler or linker temporarily with a program that just displays the parameters passed to it. Then go through the parms one by one and check if they are appropriate. Try dropping various parms when invoking the assembler and compiler from the command line until you find which parms are the problem. Then play with the project settings until you find which option is causing those parms to be added. IDEs are wonderful, but sometimes it is a pain to figure out exactly what they are doing for you.

Share this post


Link to post
Share on other sites
NASM is great IMO, "better" syntax than MASM (et al) IMHO, and A LOT better than AT&T syntax *shrugs*. Capable of handling all the "new" MMX/SSE/SSE2/etc instructions as well... portable too!


"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album

Share this post


Link to post
Share on other sites