The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: AiM on June 23, 2005, 11:31:29 AM

Title: A compiling Problem [ Total Newbie]
Post by: AiM on June 23, 2005, 11:31:29 AM
Hi all,

     I've just started lerning assembly programming. I've MASM 8 and i installed it in C:\masm32 on My WinXP Box.

Now whenever i open an ASM in Quickeditor and Click on Build All an error returns.

QuoteAssembling: C:\Documents.asm
MASM : fatal error A1000: cannot open file : C:\Documents.asm
Volume in drive C is Windows
Volume Serial Number is 3438-2925

Directory of C:\

I've tried the example Calender given. Please help.....
Title: Re: A compiling Problem [ Total Newbie]
Post by: hutch-- on June 23, 2005, 11:44:49 AM
As long as MASM32 installed correctly, try starting the editor and going to the EXAMPLES directory. Open one of the example files then try the "Build All" option.
Title: Re: A compiling Problem [ Total Newbie]
Post by: AiM on June 24, 2005, 07:53:05 AM
Hi hutch--,
   
          I've done exactly what you said. But it gives the same message in a dos window when i click build all. on clicking Compile ASM
the same error retuned in a text editor.

Help......
Title: Re: A compiling Problem [ Total Newbie]
Post by: brixton on June 24, 2005, 08:40:51 AM
Is the file you're trying to assemble on the same drive as MASM32?  I believe it has to be, and if it can't find it I'd say they aren't both on the same drive maybe..  :P
Title: Re: A compiling Problem [ Total Newbie]
Post by: Mirno on June 24, 2005, 09:58:31 AM
The file you are trying to assemble is in a directory with a space.
MASM uses an old command line argument parser back from the days of DOS, so it cannot deal with spaces (it thinks the space is the end of the argument).

Put the code in a directory in the root of C (make sure it's go no spaces), then try to assemble from there.

Mirno
Title: Re: A compiling Problem [ Total Newbie]
Post by: Farabi on June 24, 2005, 10:18:46 AM
Hi better see the example from RadAsm if you dont know how is it looks alike the right instalation.
Title: Re: A compiling Problem [ Total Newbie]
Post by: AeroASM on June 24, 2005, 10:31:00 AM
Quote from: brixton on June 24, 2005, 08:40:51 AM
Is the file you're trying to assemble on the same drive as MASM32? I believe it has to be, and if it can't find it I'd say they aren't both on the same drive maybe.. :P

It doesn't have to be.
Title: Re: A compiling Problem [ Total Newbie]
Post by: hutch-- on June 24, 2005, 11:50:40 AM
AiM,

Check the basics of whether the installation worked correctly, you will need to look for the libraries in the LIB directory to check that out. If they are not there then try the install again and if that fails, go to the forum web site and download the manual installation as it is designed for problem machines.
Title: Re: A compiling Problem [ Total Newbie]
Post by: Tedd on June 24, 2005, 12:03:22 PM
The problem comes from "My Documents" having a space in.
Move your program sources to a folder whose path doesn't have a space in and everything should work :green2
Title: Re: A compiling Problem [ Total Newbie]
Post by: brixton on June 24, 2005, 05:11:08 PM
Quote from: AeroASM on June 24, 2005, 10:31:00 AM
Quote from: brixton on June 24, 2005, 08:40:51 AM
Is the file you're trying to assemble on the same drive as MASM32? I believe it has to be, and if it can't find it I'd say they aren't both on the same drive maybe.. :P

It doesn't have to be.

Depends on how he declared his includes I suppose.. but yes seems you can.. it must be the space problem!  :dance:
Title: Re: A compiling Problem [ Total Newbie]
Post by: MichaelW on June 24, 2005, 05:28:16 PM
If the file were located in My Documents the name would be displayed as "My.asm". I think the files are located somewhere in Documents and Settings. MASM can deal with a path that contains spaces, but only if the path is in double quotes. I think moving the file would be the best solution, but an alternative that should work would be to type in (or select from the 10-item MRU list) the short filename path when you open the file in Quick Editor. Windows 9x displayed the short filename in the file properties. For Windows 2000/XP, you can obtain the short filename path with something like this:

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    .data
        buffer db MAX_PATH dup(0)
    .code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    invoke GetShortPathName,
      chr$("C:\Documents and Settings\Administrator\My Documents"),
      ADDR buffer, MAX_PATH
    print ADDR buffer,13,10
    mov   eax, input(13,10,"Press enter to exit...")
    exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start

Title: Re: A compiling Problem [ Total Newbie]
Post by: Tedd on June 27, 2005, 10:35:18 AM
My mistake - though the reason is still the same; and I expect the files are still in "My Documents" it's just that the full path for mydocs is actually "C:\Documents and Settings\user\My Documents" which would then be parsed into "C:\Documents"
Anyway, the simplest thing to do is have a separate folder, say "C:\Projects\Asm" or whatever :wink
Title: Re: A compiling Problem [ Total Newbie]
Post by: Rifleman on June 27, 2005, 02:23:06 PM
Michael,
It would be very easy to rewrite your little app to accept the longfilename (in quotes) as a commandline tail.  This would then make a very useful toolbox utility.  :thumbu

EDIT:  I would call it 'GetShorty'   :bdg

Paul
Title: Re: A compiling Problem [ Total Newbie]
Post by: Jeff on June 27, 2005, 02:38:31 PM
i vote Tedd for president!   :green

a problem simply solved by using smaller folders (folder names with sizes <= 8), shortnames (C:\DOCUME~1\ADMINI~1\MYDOCU~1\Program.asm), or properly quoting the lines at command line (ML "C:\Documents and Settings\Administrator\My Documents\Program.asm")   :U
Title: Re: A compiling Problem [ Total Newbie]
Post by: Tedd on June 27, 2005, 05:36:44 PM
Quote from: Jeff on June 27, 2005, 02:38:31 PM
i vote Tedd for president!   :green

Who me? :red
:bdg


Actually, the credit should go to Mirno - it's just that no-one bothers to read the previous replies ::)
Title: Re: A compiling Problem [ Total Newbie]
Post by: Jeff on June 27, 2005, 07:46:41 PM
actually i (mis)read that post.  :)