Warning: MASM generates wrong operand size in opcodes:
smsw/sldt/str reg.
Explonation:
Intel ia32 allow 32 bit registers as operands to {smsw/sldt/str reg } opcodes.
yet MASM generates error message "bad operand size" when meet 32 registers
as operands to these instructions.
But there are more problems to it.
If you enter 16 bit register as operand with the instructions MASM actually
generates opcode for 32 register.
For example if you enter
sltd ax
MASM generates opcodes for sltd eax.
So to generate opcode sltd eax
you need enter
sldt ax
and to genrate opcode for sldt ax
you need enter
db 66h
sldt ax.
Posted on 2003-03-13 07:49:55 by The Svin
Solution:

Dont use MASM.


:grin:
Posted on 2003-03-13 08:03:14 by bazik
Hi Svin!

Did you try the new Macro Assembler version 7? (ml.exe)


This link from Natas:

http://0x86.net/MasmV.7.0.rar
Posted on 2003-03-13 09:44:34 by Vortex
Vortex,
I downloaded it twice but wasn't able to extract.
Some problems with archive?
Posted on 2003-03-13 10:34:49 by The Svin

Vortex,
I downloaded it twice but wasn't able to extract.
Some problems with archive?


Yep, its damaged and way too small.



bazik@exodus temp $ wget [url]http://0x86.net/MasmV.7.0.rar[/url]
--17:37:08-- [url]http://0x86.net/MasmV.7.0.rar[/url]
=> `MasmV.7.0.rar'
Resolving 0x86.net... done.
Connecting to 0x86.net[216.148.213.149]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,488 [text/html]

100%[====================================>] 1,488 363.28K/s ETA 00:00

17:37:08 (363.28 KB/s) - `MasmV.7.0.rar' saved [1488/1488]

bazik@exodus temp $




Ahhh, stupid forwarding url :)

Now it works:



bazik@exodus temp $ wget [url]http://home.broadpark.no/~sajohans/MasmV.7.0.rar[/url]
--17:39:12-- [url]http://home.broadpark.no/%7Esajohans/MasmV.7.0.rar[/url]
=> `MasmV.7.0.rar'
Resolving home.broadpark.no... done.
Connecting to home.broadpark.no[217.13.4.3]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,069,801 [text/plain]

100%[====================================>] 1,069,801 387.18K/s ETA 00:00

17:39:15 (387.18 KB/s) - `MasmV.7.0.rar' saved [1069801/1069801]

bazik@exodus temp $ unrar e MasmV.7.0.rar

UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal


Extracting from MasmV.7.0.rar

Extracting readme.doc OK
Extracting cvtres.exe OK
Extracting dumpbin.exe OK
Extracting editbin.exe OK
Extracting lib.exe OK
Extracting link.exe OK
Extracting ml.exe OK
Extracting nmake.exe OK
Extracting RC.Exe OK
Extracting mspdb70.dll OK
Extracting msvcr70.dll OK
Extracting msvcrt.dll OK
Extracting RcDll.Dll OK
Extracting ml.err OK
All OK
bazik@exodus temp $
Posted on 2003-03-13 10:38:18 by bazik
I downloaded it for the third time and again damaged archive.
bazik, if you secceeded with the arhive, could you, please,
extract it, make zip archive and send it to me via e-mail?
Posted on 2003-03-13 11:56:26 by The Svin
You got mail.
Posted on 2003-03-13 12:01:20 by bazik
It was accidently deleted.
I feel ashamed, blashed.
Could you please send it again?
Posted on 2003-03-13 12:28:14 by The Svin

It was accidently deleted.
I feel ashamed, blashed.
Could you please send it again?


Hehe, sent. Check your mail again and keep your finger away from the DEL key.
Posted on 2003-03-13 12:32:43 by bazik
and keep your finger away from the DEL

Yes, Sir :)
My mail-box setting was to delete any letter > 200 kb.
I'd just complitly forgotten of that :)
Thank you - I got it and everything is OK now.
Posted on 2003-03-13 12:50:36 by The Svin
Did you try the new Macro Assembler version 7

With your and bazik help I did :)
The same problem, nothing changed.
Posted on 2003-03-13 13:01:01 by The Svin
Svin,

I am sorry for being late.
Funny,I expected to see new features in ml.exe v7. I have the impression,this new
release doesn't provide much new things.

Regards,

Vortex
Posted on 2003-03-13 13:43:32 by Vortex
May be there are new features, along with old bugs :)
Posted on 2003-03-13 13:47:22 by The Svin
Yes,you are right Svin:alright:
If we could get a manual for this latest release of ml.exe. :)

Regards,

Vortex
Posted on 2003-03-13 13:49:18 by Vortex
I tried more new link and ml and got so many problems that replaced it back with an old ones.
Dont use MASM.

bazik,
Did you check other assemblers with the errors I mentioned or you just suggest me to right everything in HEX?
:)
Posted on 2003-03-13 14:52:13 by The Svin

I tried more new link and ml and got so many problems that replaced it back with an old ones.

bazik,
Did you check other assemblers with the errors I mentioned or you just suggest me to right everything in HEX?
:)


Didnt Privalov fix it in FASM ? :rolleyes:
Posted on 2003-03-13 16:15:18 by bazik
So you recommend FASM?
The question was if you did check it :)
We talked with him only about smsw and he said he fixed it. Good for FASM users.
I don't know about the other commands
But did you check it and the other commands, when you
recommend me not use MASM?
Before you have it done, your arguments are based on nothing but rumors.
FASM wins more and more respect as I can see, but I spent to many time to get used to MASM, to switch to anything else before I'm sure it's critically better.
Posted on 2003-03-13 18:01:01 by The Svin
I can't seem to download a working version either. Is there another source for it. I get 1,069,801 bytes but it's full of crc errors.

Donkey
Posted on 2003-03-13 21:00:20 by donkey
donkey,

Can you send me your e.mail address,then I can send you a zip file containing the new ml.exe and
the other tools. :)

Regards,

Vortex
Posted on 2003-03-14 07:51:19 by Vortex
Hi Vortex,

I sent it in a PM. Thanks.

Donkey
Posted on 2003-03-14 07:55:33 by donkey