Hi,

I'm trying to compile a simple programmes but Masm gives the following errors -

'unrecognized option "z2"; ignored'
'unrecognized option "r"; ignored'

( I didn't enter any options into the comand line. )

'cannot open input file Shell.exe'

OR

'failure during conversion to coff file invalid or corrupt'

Here's an example prog...

------------------

TheStack SEGMENT STACK
DB 64 DUP ('STACK')
TheStack ENDS


TheData SEGMENT
TheData ENDS

TheProg SEGMENT
assume CS:TheProg, DS:TheData

Main PROC

Start:

mov ah, 4ch
mov al, 0
int 21h

Main ENDP

TheProg ENDS

------------

Pretty simple huh?

Any ideas would be appreciated.

S.
Posted on 2002-03-22 15:47:25 by Station
Station,

Apart from you are trying to build DOS code, it would be useful to tell us what command lines you are using with both ML.EXE and LINK.EXE.

Note that the version of LINK with MASM32 will not build DOS code, you need the older OMF linker to do that. It is available on Iczelion's site or the Microsoft site if you can find it.

For 32 bit assembly, you use the command line,

drv:\path\ml /c /coff yourfile.asm

Regards,

hutch@movsd.com
Posted on 2002-03-22 16:40:23 by hutch--
Thanks for your reply.

Originally I was using MASM which comes with 98DDK. I then downloaded MASM32 but its a similar story.

Also, I've tried compiling Iczelion's MessageBox example and its the same again.

Its been a while since I used MASM but I don't remember this kind of nonsense before.

At the command line I simply entered - ml shell.asm . This used to work so I presume the system has gotten in a pickle.

Why would it be reporting unknown options when I didn't enter any?

Thanks again,

S.
Posted on 2002-03-22 16:59:52 by Station
Station,

Have a look at the basic file structure that is used in MASM32 if its 32 bit assembler that you want to write. There is a code wizard that will generate working templates for you so you can have a look at how they work.

See the minimum memory model and processor type at the top of the file, check out the batch files in the BIN dir that build the 32 bit files and you will be close to the pace of how they are built.

Regards,

hutch@movsd.com
Posted on 2002-03-22 17:13:39 by hutch--
Thanks again for your response.

If you're up for it, could you type in the smallest possible program you can and I'll see if it compiles on my system?

Thanks,

S
Posted on 2002-03-22 18:06:13 by Station
Check your environment variables, you can have "default" options specified using the environment.
Try "echo %ml%" or "echo %masm%".

Mirno
Posted on 2002-03-22 18:07:40 by Mirno
Cool. its working now.

Masm32 compiles and links Win32 programmes and the old Linker from Iczelion's links DOS progs.

However, I'm left feeling baffled as to why the linker that I got with the 98DDK stopped working. I must have gotten mixed up somewhere...
Posted on 2002-03-22 19:45:03 by Station