News:

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

Quick way to Update to Masm(ml.exe) 9

Started by ecube, March 26, 2009, 04:01:46 PM

Previous topic - Next topic

ecube

This information has been posted throughout the forum but i'm putting it here to help newcomers find it, and to save others a lot of time. Masm 9.00.30729.01 fixes some old long overdue bugs.

1)Download and install Masm32 (http://www.masm32.com/masmdl.htm)
2)Download and install Microsoft Visual C++ 2008 Redistributable Package(few megabytes in size, http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en)
3) Download ml.exe verison 9.00.30729.01 from http://d01.megashares.com/?d01=2552924 (or take from the gig+ visual studio 2008 sdk)
then replace the ml in your C:\masm32\bin dir with the new one
4) Now you're good to go!(tested on fresh install of XP SP 2 and Vista Home)

I didn't include the new link because its annoying and lacks features the old which still works fine has, if you want to install the new link you'll need mspdb80.dll for it to work aswell.

ToutEnMasm


Thanks for info,
I have tested it and all isn't so good.

I used it in the \Program Files\Microsoft Visual Studio 9.0\VC\bin directory
and I keep the version 6.15 ( very stable from Iczelion site) in the masm32\bin directory


ecube

what's not good about it? i've recompilled all the big projects i've written in masm(megabytes of source code, and megabytes in output size) and it seems to compile everything fine. Plus it fixes some old bugs, that some people including myself were unaware of, like the invoke bug.

ToutEnMasm


He can generate internal errors with some headers. 6.15  make it.

ToutEnMasm


I have quickly verified,the invoke bug isn't corrected.
Quote
Microsoft (R) Macro Assembler Version 9.00.30729.01       03/26/09 17:57:26
bug.asm                          Page 1 - 1               mov bl, 123
            .LISTALL   
00000041  A0 00000000 R   *       mov    al, ab
00000046  50         *       push   eax
00000047  E8 0000003C      *       call   test1
0000004C  0F B6 C0         invoke test1, ab
               movzx eax, al

ecube


Rainstorm

e^cube wrote
QuoteThis information has been posted throughout the forum but i'm putting it here to help newcomers find it, and to save others a lot of time. Masm 9.00.30729.01 fixes some old long overdue bugs.
thanks for the info !!

ToutEnMasm



Quote
          dizz says it is, and his listing show it is...herm idk
Perhaps he say it is corrected but he is wrong.
The bug is:
Quote
When masm push a byte in the stack , he need to translate it before to a dword.
He used different methods for that,in this case
invoke test1, ab                        ;ab is a byte in data
;------------- here what he do to perform this -------------------
00000041  A0 00000000 R   *       mov    al, ab
00000046  50         *       push   eax
00000047  E8 0000003C      *       call   test1
;--------------------------------------------------------------------------------------
he put ab in al,eax is modified
usually he just push the data and there is no register modify  (32 bits data)


Vortex

As an addition to E^cube's explanation, I recommend using Polink.exe instead of link.exe  It has no extra dependencies and creates smaller executables.

Mark Jones

Erol, it sounds like you have tested this. I do not remember -- does the v9.x linker create a dependency to mspdb80.dll or the latest CRT? I tinkered with it once, but might have dropped it for this reason. Not only was this dependency an issue, but the executable was about 20% larger than the one made with the original link, and 30% larger than if it were made with polink.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

jj2007

Where are those additional dependencies? I checked the attached code with Olly but found only Kernel32...

include \masm32\include\masm32rt.inc

.code
start: exit

end start

[attachment deleted by admin]

GregL

Actually, the mspdb80.dll dependancy is for running link.exe itself.


jj2007

Quote from: Greg on March 28, 2009, 10:33:34 PM
Actually, the mspdb80.dll dependancy is for running link.exe itself.


Exactly :bg

File sizes for RichMasm:
1. with Polink: 58880 bytes
2. with link 5.12: 59392 bytes (+512 bytes = +0.87%)
3. with link 9.00: 59392 bytes (+512 bytes = +0.87%)

donkey

Actually link.exe only imports a few functions from mspdb80.dll, polink has user32 and kernel32 as dependencies, does that increase the size of the final executable ?? You would think that the people here would at least understand importing functions from a DLL  ::). 512 bytes is a section, it could easily be due to internal data alignment, and I'll bet my bottom dollar that if the alignment is different between polink and link that polink is wrong but the error is fixed up on load or is insignificant. To make a case you would have to prove that first the 512 bytes is consistently added and what it is for and also whether polink has omitted something in the PE specification that accounts for the 512 bytes or Microsoft has unnecessarily expanded a section. Just to say "this file is 512 bytes larger" means absolutely nothing, I can adjust section sizes and "hope" that my PE will run on all versions of Windows including future ones and say that I have reduced the executable size but in reality I have just played some tricks with sections. Also, my machine has 2GB of memory available to applications, I think that 512 bytes is insignificant in itself. My smallest (current) assembly application is around 75KB and my largest is around 3.5MB at best I would not even notice 512 bytes and I certainly wouldn't waste a nanosecond trying to save it (which is probably the difference in load times). Yet another pointless debate that seems to plague assembly language forums.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

mitchi

The search for the smallest code, the fastest code and the smallest executable, these are common mental illnesses among us  :green