News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How do I compile in Quick Editor MASM?

Started by Lope, June 20, 2009, 10:22:47 PM

Previous topic - Next topic

Lope

I have experience writing assembler for PIC (microchip) microcontrollers, but this is my first experience with x86 assembler.

I want to start by compiling a single win32 masm compatible .asm file.

I've installed MASM32 successfully, no error messages (no anti virus).

I loaded up the asm file in quick editor (qeditor), but so many of the menu items are completely non-responsive. Whats going on?
Many items in the project, tools and script menus do absolutely nothing (no error messages).
So I could not compile the asm file.

I tried to compile the asm file from the command prompt with ml.exe, but it gave me an error about not finding dllimport or something.

I'm guessing that I need to go Project>Assemble & Link. Project > Build All

dedndave

i never use Qeditor to assemble
most people in here use no environment variables for assembly
i do use them, however, i know how to make it happen without them, as well
one environment variable that helps is to put C:\masm32\bin into the path
again - not required, but it allows you to assemble from anywhere
then, create a small batch file to assemble and link and place it in that folder
i made one for console mode programs called asc.bat
this one was modified to work with no environment variables set, and masm32 installed on the C: drve...

@echo off
if "x%1"=="x" goto ascusage
if exist %1.asm goto ascasm
:ascusage
echo Usage: asc asmfile
echo "asmfile" = asmfile.asm
goto batchexit
:ascasm
if exist %1.obj del %1.obj
c:\masm32\bin\ml /c /coff %1.asm >c:\masm32\bin\asmbl.txt
if errorlevel 1 goto showtxt
if exist %1.exe del %1.exe
if not exist rsrc.obj goto nores
c:\masm32\bin\Link /SUBSYSTEM:CONSOLE /OPT:NOREF %1.obj rsrc.obj >>c:\masm32\bin\asmbl.txt
goto showtxt
:nores
c:\masm32\bin\Link /SUBSYSTEM:CONSOLE /OPT:NOREF %1.obj >>c:\masm32\bin\asmbl.txt
:showtxt
if exist %1.obj del %1.obj
type c:\masm32\bin\asmbl.txt
:batchexit
dir %1.*


also, it helps when you are starting out to use this line at the beginning of your programs...

  include \masm32\include\masm32rt.inc

take a look inside that file
it contains all the header info and include files needed to assemble most apps

MichaelW

Lope,

What version of MASM32 did you install, what version of Windows are you running, and what is the full path for your MASM32 directory?
eschew obfuscation

Lope

dave: thanks will try that
michael: I installed the latest version (10 afaik) XP 64 pro SP2. C:\masm32
Any ideas why so many of those menus are unresponsive?

hutch--

Its likely to have something to do with what you code is. The simple way to test the installation is to open one of the example files and build it according to its instructions. If it builds then the problem is in your code. MASM code that is not written to use the include files and libraries provided in MASM32 will not build without the files it requires.

Give us some idea of the code you are trying to build.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

igndenok

make sure that your project is in drive C:\ (based on C:\MASM32) and don't forget to Set Current Directory (Ctrl+F12) to your project ?!