News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Why must the ASM file be saved in the Bin folder ? !

Started by RAFAAJ2000, January 14, 2013, 08:29:43 PM

Previous topic - Next topic

jj2007

six_L, rafaaj,

There is no need for environment variables in Masm32, and in general they do more harm than good. It's adding one layer of confusion.

We'd better find out what happens when Rafaaj clicks "Project/Build all".

RAFAAJ2000

Quote from: jj2007 on January 14, 2013, 10:34:11 PM
- click Project/Build All

What do you see when you click? Nothing??

I have already tried all the entries in the Project menu includin Build All but nothing happens .... No assembling output and no executable is created.

RAFAAJ2000

Quote from: six_L on January 14, 2013, 10:37:27 PM
1,"startup"->"run"->type: cmd
2, type: set path=E:\masm32\bin;E:\masm32\include;E:\masm32\lib;
3, test your source codes.


After doing what you suggested , the command line now shows E:\mams32> but the problem still remains after testing my source code. - No executable no errors !

Late edit :

There is now a new entry in the system variables when I right click my computer, choose Properties , Advanced tab and click on the Environment variables which means that your command line suggestion did add the system variable successfully but that didn't make a difference as the program still cannot compile

six_L

QuoteThere is now a new entry in the system variables when I right click my computer, choose Properties , Advanced tab and click on the Environment variables which means that your command line suggestion did add the system variable successfully but that didn't make a difference as the program still cannot compile
reboot your computer.

what's show when you type the "path" on the command line window?
Say you, Say me, Say the codes together for ever.

RAFAAJ2000

Quote from: six_L on January 14, 2013, 11:00:13 PM
QuoteThere is now a new entry in the system variables when I right click my computer, choose Properties , Advanced tab and click on the Environment variables which means that your command line suggestion did add the system variable successfully but that didn't make a difference as the program still cannot compile
reboot your computer.

what's show when you type the "path" on the command line window?

I'll do but i'll psot back later because I need to go now.

Thanks everybody for your help and patience.

Magnum

I can help you solve your problem.

We can take it one step at a time.

Can you re-install the Masm32 package on the C: drive ?

Andy

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

jj2007

Quote from: RAFAAJ2000 on January 14, 2013, 10:48:06 PMthe command line now shows E:\mams32>

If that is true, we've found the problem. But I assume it shows E:\masm32> , right? ;-)

Besides, qEditor is a bit stingy with error messages. I just tried it with an incomplete Masm32 installation on my secondary drive, and clicking Project/Build all does indeed produce ... silence.

Check if ml.exe and link.exe are present as E:\Masm32\bin\ml.exe and E:\Masm32\bin\link.exe

frktons

It looks like an incomplete/incorrect installation of masm32 package.

Better to reinstall everything and let the installation process to get

to the end.  :biggrin:
There are only two days a year when you can't do anything: one is called yesterday, the other is called tomorrow, so today is the right day to love, believe, do and, above all, live.

Dalai Lama

Magnum

I gotta know, so I am going to install it to my d: drive.  :t

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

RAFAAJ2000

Quote from: six_L on January 14, 2013, 11:00:13 PM
QuoteThere is now a new entry in the system variables when I right click my computer, choose Properties , Advanced tab and click on the Environment variables which means that your command line suggestion did add the system variable successfully but that didn't make a difference as the program still cannot compile
reboot your computer.

what's show when you type the "path" on the command line window?

After a reboot I get this on the commad line.
C:\Documents and Settings\Administrateur>

RAFAAJ2000

Quote from: jj2007 on January 15, 2013, 06:15:41 AM
Quote from: RAFAAJ2000 on January 14, 2013, 10:48:06 PMthe command line now shows E:\mams32>

If that is true, we've found the problem. But I assume it shows E:\masm32> , right? ;-)

Besides, qEditor is a bit stingy with error messages. I just tried it with an incomplete Masm32 installation on my secondary drive, and clicking Project/Build all does indeed produce ... silence.

Check if ml.exe and link.exe are present as E:\Masm32\bin\ml.exe and E:\Masm32\bin\link.exe

Yes that was just a spelling mistake I meant  E:\masm32>bin\link.exe


Yest the two exe files are indeed present and the respective command line outputs are :

For Link.exe :
C:\Documents and Settings\Administrateur>E:masm32\bin\link.exe
Microsoft (R) Incremental Linker Version 5.
Copyright (C) Microsoft Corp 1992-1998. All

usage: LINK [options] [files] [@commandfile

   options:

      /ALIGN:#
      /BASE:{address|@filename,key}
      /COMMENT:comment
      /DEBUG
      /DEBUGTYPE:{CV|COFF}
      /DEF:filename
      /DEFAULTLIB:library
      /DLL
      /DRIVER[:{UPONLY|WDM}]
      /ENTRY:symbol
      /EXETYPE:DYNAMIC
      /EXPORT:symbol
      /FIXED[:NO]
      /FORCE[:{MULTIPLE|UNRESOLVED}]
      /GPSIZE:#
      /HEAP:reserve[,commit]
      /IMPLIB:filename
      /INCLUDE:symbol
      /INCREMENTAL:{YES|NO}
      /LARGEADDRESSAWARE[:NO]
      /LIBPATH:dir
      /MACHINE:{ALPHA|ARM|IX86|MIPS|MIPS16|
      /MAP[:filename]
      /MAPINFO:{EXPORTS|FIXUPS|LINES}
      /MERGE:from=to
      /NODEFAULTLIB[:library]
      /NOENTRY
      /NOLOGO
      /OPT:{ICF[,iterations]|NOICF|NOREF|NO
      /ORDER:@filename
      /OUT:filename
      /PDB:{filename|NONE}
      /PDBTYPE:{CON[SOLIDATE]|SEPT[YPES]}
      /PROFILE
      /RELEASE
      /SECTION:name,[E][R][W][S][D][K][L][P
      /STACK:reserve[,commit]
      /STUB:filename
      /SUBSYSTEM:{NATIVE|WINDOWS|CONSOLE|WI
      /SWAPRUN:{CD|NET}
      /VERBOSE[:LIB]
      /VERSION:#[.#]
      /VXD
      /WARN[:warninglevel]
      /WINDOWSCE:{CONVERT|EMULATION}
      /WS:AGGRESSIVE


For ml.exe :

C:\Documents and Settings\Administrateur>E:\masm32\bin\ml.exe
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

usage: ML [ options ] filelist [ /link linkoptions]
Run "ML /help" or "ML /?" for more info

RAFAAJ2000

Quote from: Magnum on January 15, 2013, 05:56:03 AM
I can help you solve your problem.

We can take it one step at a time.

Can you re-install the Masm32 package on the C: drive ?

Andy

Thanks Andy.

I have already tried that but I can't re-install msm32 on the C drive because I first have to un-install a previous incomplete installation that I did on C .... By the way , how can one un-install masm32 ? - It doesn't show up on the control pannel Add/Remove Programs list .

I already deleted all the masm32 folders/files on the C drive but when I try to re-install it on the C drive again the masm32 install wizard tells me that masm32 is already installed on the C drive  ....  - Do I have to delete some registry keys to successfully un-install masm32 ?

RAFAAJ2000

Quote from: frktons on January 15, 2013, 11:31:21 AM
It looks like an incomplete/incorrect installation of masm32 package.

Better to reinstall everything and let the installation process to get

to the end.  :biggrin:

No - The masm32 installation process on the E: Drive was allowed to get to the end and was carried out successfully.

hutch--

Hmmmm,

The MASM32 installation creates a fully portable installation that writes NOTHING to the operating system. It is also specific to the drive you install it on so you can run multiple copies if you need to. You absolutely DO NOT NEED an environment variable to build assembler applications and it is designed specifically this way so you don't get the WRONG versions of link, rc etc ....

Now the secret to getting a proper installation is to read the installation guide on the web site, make sure your computer is set up correctly without either an AV scanner or the OS preventing disk IO.

Run the install program making sure it finishes. It will build all of the libraries and write everything it needs to the drive you select. NOTE that you must build your assembler application on the drive you select, if you try and build it from another location it will fail. This is because many programmers have other compilers and linkers on different drives.

The MASM32 SDK is primarily designed for experienced programmers who already have many different things on their development computer and the price of an installation that does not mess up anything else is that you need to read the installation guide to understand how it works.

six_L

QuoteYou absolutely DO NOT NEED an environment variable to build assembler applications and it is designed specifically this way so you don't get the WRONG versions of link, rc etc
QuoteThere is no need for environment variables in Masm32, and in general they do more harm than good.
as other fourm members said, that's really true.
if you don't add your environment variable into system environment, then modify your source codes and the bldall.bat(\masm32\bin\) file.

modify as following:
1,source codes:
.386
.model flat,stdcall
option casemap:none
include e:\masm32\include\windows.inc
include e:\masm32\include\kernel32.inc
includelib e:\masm32\lib\kernel32.lib
include e:\masm32\include\user32.inc
includelib e:\masm32\lib\user32.lib

.data
MsgBoxCaption db "An example of Cancel,Retry,Continue",0
MsgBoxText db "Hello Message Box!",0

.code
start:
invoke MessageBox,
NULL,
addr MsgBoxText,
addr MsgBoxCaption,
MB_ICONERROR OR MB_ABORTRETRYIGNORE

.IF eax==IDABORT
; Abort was pressed

.ELSEIF eax==IDRETRY
; Retry was pressed

.ELSEIF eax==IDCANCEL
; Cancel was pressed
.ENDIF

invoke ExitProcess,NULL
end start

2,bldall.bat

@echo off

if not exist rsrc.rc goto over1
e:\masm32\bin\rc /v rsrc.rc
e:\masm32\bin\cvtres /machine:ix86 rsrc.res
:over1

if exist %1.obj del %1.obj
if exist %1.exe del %1.exe

e:\masm32\bin\ml /c /coff %1.asm
if errorlevel 1 goto errasm

if not exist rsrc.obj goto nores

e:\masm32\bin\Link /SUBSYSTEM:WINDOWS /OPT:NOREF %1.obj rsrc.obj
if errorlevel 1 goto errlink

dir %1.*
goto TheEnd

:nores
e:\masm32\bin\Link /SUBSYSTEM:WINDOWS /OPT:NOREF %1.obj
if errorlevel 1 goto errlink
dir %1.*
goto TheEnd

:errlink
echo _
echo Link error
goto TheEnd

:errasm
echo _
echo Assembly Error
goto TheEnd

:TheEnd

pause


Say you, Say me, Say the codes together for ever.