News:

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

MASM32 problem

Started by pps, May 11, 2010, 04:14:52 PM

Previous topic - Next topic

jj2007

Quote from: pps on October 13, 2010, 12:25:41 PMI do assamble, link and then i try to start it. When i look in task manager there is a problem. The program test.exe(this is his name from last time) runns in background and has one instance for every time i start it.  Something strange I would say.... do you have any solution for this?

Most probably, your linker commandline contains SUBSYSTEM=WINDOWS. Since you have inkey in your code, it hangs there but will never show.
That is why RichMasm has an autodetect function that chooses SUBSYSTEM=CONSOLE if print, inkey and similar keywords are detected.

Hint: replace the inkey with an invoke MessageBox.

pps

i have good news. I haven't tried with invoke but i found that after i make an console aplication project and then from project i select makeit.bat it works. 
If we still are here, can u tell me what is makeit.bat? And why it is working. I will try in a few heures with invoke, for the moment i have to read about how that comand works, what arguments can take and what should i include.

pps

i tested invoke and works when i use makeit. bat.
If i want to link it how should i call the linker in the console making that subsystem setting?

jj2007

You should be a bit more explicit, i.e. post
- your complete code, from include ... to end start
- error messages, if there are errors
- describe what the prog does (e.g. does it show a MessageBox, or not?)
- post your makeit.bat
You can attach files by zipping them and clicking on "Additional Options".

dedndave

you simply aren't assembling and linking it correctly

first, this is 32-bit code, so you will need to use a 32-bit linker - not the 16-bit

second, make sure you have the following files in the \masm32\bin folder:
ML.EXE
LINK.EXE

third, try these 2 commands from the command line:

masm32\bin\ml /c /coff test.asm
masm32\bin\link /SUBSYSTEM:CONSOLE /OPT:NOREF test.obj

just to clarify:
the ML.EXE assembler included with the masm32 package will assemble either 16-bit or 32-bit code
the LINK.EXE linker included with the masm32 package will only link 32-bit OBJ's
the LINK16.EXE linker included with the masm32 package will only link 16-bit OBJ's

examine your batch file(s) to verify you are using the appropriate linker and command lines for the type of ASM file you have written

pps

sorry for the late response. I solved it. I opened the makeit file and found all what i need. Thank u again!