The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: uk_pete_2000 on August 13, 2007, 06:49:37 PM

Title: "Console Assemble and Link" getting A1000 errors
Post by: uk_pete_2000 on August 13, 2007, 06:49:37 PM
I know this is a very newbie question, and I am sure I will have plenty more to follow, but for now plse bear with me.

I am running -

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

;                 Build this with the "Project" menu using
;                       "Console Assemble and Link"

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    .486                                    ; create 32 bit code
    .model flat, stdcall                    ; 32 bit memory model
    option casemap :none                    ; case sensitive

    include \masm32\include\windows.inc     ; always first
    include \masm32\macros\macros.asm       ; MASM support macros

  ; -----------------------------------------------------------------
  ; include files that have MASM format prototypes for function calls
  ; -----------------------------------------------------------------
    include \masm32\include\masm32.inc
    include \masm32\include\gdi32.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc

  ; ------------------------------------------------
  ; Library files that have definitions for function
  ; exports and tested reliable prebuilt code.
  ; ------------------------------------------------
    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\gdi32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib

    .code                       ; Tell MASM where the code starts

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

start:                          ; The CODE entry point to the program

    print chr$("Hey, this actually works.",13,10)
    exit

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

end start                       ; Tell MASM where the program ends

Running MASM V9, and using the 'Build All' under the Project Menu I get a A1000: can not open file - Hello.asm. All the Paths are Single words and Set Paths has both masm32 and masm32\bin included.
Title: Re: "Console Assemble and Link" getting A1000 errors
Post by: Vortex on August 13, 2007, 07:08:58 PM
Hi uk_pete_2000,

Welcome to the forum.

Could you post here the full path of your source file?
Title: Re: "Console Assemble and Link" getting A1000 errors
Post by: uk_pete_2000 on August 13, 2007, 07:10:27 PM
Yes the full path is C:\masm32\Test\Hello.asm
Title: Re: "Console Assemble and Link" getting A1000 errors
Post by: Vortex on August 13, 2007, 07:20:03 PM
Hi Pete,

Here is what I found about the error message :

QuoteMicrosoft Macro Assembler Reference
ML Fatal Error A1000

cannot open file: filename

The assembler was unable to open a source, include, or output file.

One of the following may be a cause:

      The file does not exist.
   
      The file is in use by another process.
   
      The filename is not valid.
   
      A read-only file with the output filename already exists.
   
      The current drive is full.

      The current directory is the root and is full.

      The device cannot be written to.
   
      The drive is not ready.

http://msdn2.microsoft.com/zh-tw/library/xkb5t8f2(vs.80).aspx
Title: Re: "Console Assemble and Link" getting A1000 errors
Post by: uk_pete_2000 on August 13, 2007, 07:38:30 PM
Yes I read that, and none of it seems to be relevent.

The only one which I am not sure about is - A read-only file with the output filename already exists, yet the Hello.asm is not set to read only

Pete
Title: Re: "Console Assemble and Link" getting A1000 errors
Post by: uk_pete_2000 on August 13, 2007, 09:17:52 PM
Found it.

I thought it had 'asm' extension on the file, but it seems I was wrong. Correct this and Build All works fine