News:

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

December edition MASM32 version 9.00 BETA

Started by hutch--, December 06, 2005, 01:27:23 PM

Previous topic - Next topic

hutch--

ld,

You can safely ignore the warnings, if Microsoft did not want the functions exported, they could have kept them as local functions but it does not effect the library build.

I don't know what is happening with the testinst.exe file as it does nothing unusual. It is in a seperate directory off the masm32 installation directory so its easy enough to check if it builds OK. There is almost nothing I can do about additional software that is running that may restrict what happens during an installation. if I had the space, its a lot easier to distribute the entire project with all of the libraries built but its a fair bit larger by doing this.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

l_d_allan

Minor nits .... this newbie-trying-to-be-helpful 2¢ worth ...

In the file: include\bldlibs.bat
There are references to:
inc2l RESOURCE.h
inc2l INC2L.EXE
inc2l bldlibs.bat

which give warnings because they don't have .inc extension. I suppose this is the result of something like:
dir /b >BldLibs_bat.txt
Perhaps you should use something like:
dir /b *.inc >BldLibs_bat.txt

Also, the last statement perhaps should use something like the following to avoid an irrelevant/extraneous warning:
move *.lib \masm32\lib > nul

(may not apply when called from ..\makelibs.bat .... )

I would also suggest using something like the following at the top of bldlibs.bat:
if "%mdir%"=="" goto past_mdir_echo
@echo mdir is set to: %mdir%
:past_mdir_echo

just to confirm exactly what version of ml and link are being used (in case it matters? .... I was doing some testing of masm32 beta-9 when built with ml and link from Microsoft's toolkit-2003)

hutch--

ld,

Just watch the later versions of ML have broken command line support for *.asm. You are stuck with using a response file which works OK but is a bit more mesing around. One of the problems with the installation builds is that command.com and cmd.exe respond differently on some things. I will probably rebuild the installation to use Pelle's library manager as it seems a lot more reliable than the method I have used with Microsoft link.

I have used the technique on the testbed for POASM and it appears to be both more reliable and faster.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

l_d_allan

Quote from: hutch-- on February 23, 2006, 12:11:43 AM
There is almost nothing I can do about additional software that is running that may restrict what happens during an installation.

Ok.  Probably just my setup.
The testinst.exe that was built worked ok on another computer with Win2k-Sp4 and another with WinXp-Home-Sp2, so I suppose it is something non-standard about my development computer .... imagine that <g>.
I turned off/disabled NortonAntiVirus script checking and the WinXp-Sp2 firewall, and still got the MS exception message-box on the development computer, so I don't know what else to try to get the MS exception message-box to go away. It is disconcerting for someone evaluating masm32 to get a MS exception during installation, but perhaps I'm the only one reporting this. I'll send this post, run chkdsk, reboot, and try again.

Quoteif I had the space, its a lot easier to distribute the entire project with all of the libraries built but its a fair bit larger by doing this.

I am profoundly ignorant about masm32, but so far, my main interest has been getting up to speed with masm32.lib. The 8.2 version is only about 80kb, and the 9-beta is about 130kb. Would a person wanting to evaluate masm32 be able to more or less get started trying out tutorial\console with a greatly reduced subset of masm32 ... perhaps with only masm32.lib and kernel32.lib (about 490kb) pre-built?

As I recall, the asm files in tutorial\console references masm32.lib, gdi.lib, user32.lib, and kernel32.lib, but only really need masm32.lib and kernel32.lib

I've used the nsis freeware installer quite a bit on four separate freeware apps, and could perhaps put together a masm32_evaluation_starterkit_setup.exe and tutorial oriented to newbies using vc6/vc7.1/vc8 (while it is still relatively fresh in this newbie's brain). I can understand that anyone seriously trying out masm32 is expected to be a relatively experienced developer (understatement), but there are perhaps some things that could be simplified for a person evaluating whether they want to put in the time and effort to get up to speed with masm32.



hutch--

ld,

To make simple installs, I use Winrar SFX files that do the job fine. I have seen the nullsoft installer but I am not impressed with the general style of installation and don't use them. The masm32 project does not write anything at all in the registry so that it is properly registry safe and all you ever need to do to uninstall it is delete the directory tree.

This much, the entire project is copyrighted so don't redistribute any of it. I have obtained permission to distribute any of the stuff I did not write myself and among the conditions of doing so is that it is not subject to redistribution. I have had to licence it very tightly so it is not commercially exploited or bits of it relicenced under different licencing systems.

I still support windows versions fom win95b upwards but its becoming ever more difficult to make an installation that works across this range because Microsoft keep changing the rules so I may have to make 2 installs, one for legacy machines running old OS versions and a later one for NT and upwards based systems.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

l_d_allan

Quote from: hutch-- on February 23, 2006, 03:25:03 AM
This much, the entire project is copyrighted so don't redistribute any of it.

Ooops .... I suspect that I was unclear in my statement about putting a nsis installer together. I intended it as a helpful offer if you thought a "training wheels subset" might be of assistance for vc6/7/8 programmers to evaluate and get up-to-speed with masm32 .... I meant the opposite of an intention to package an unauthorized subset of masm32.

Sorry .... this newbie is very impressed with masm32 and grateful for all your patient help .... and thought maybe there was something I might be able to "roll up my sleeves" and pitch in to "give something back" rather than only being the recipient of help.

Lynn D. Allan

l_d_allan

Quote from: hutch-- on February 23, 2006, 12:11:43 AM
I don't know what is happening with the testinst.exe file as it does nothing unusual.

After the following:
* reboot-with-chkdsk,
* turn off a number of security features
* delete C:\masm32\*.*
* re-install 9-beta to C:\masm32 and accept all defaults
(mdir not defined so c:\masm32\bin\ml and c:\masm32\bin\link used)

I am still getting this exception message-box each time testinst.exe runs:
Unhandled exception at 0x0422b57 in testinst.exe: 0xC0000005: Access violation writing location 0x00000028

which seems to be this instruction:
00422B57  add         byte ptr ds:[28h],al

This may be "operator error" on my part or something flawed about my computer setup. If so, please ignore and sorry for the false alarm. Just trying to help.

It wouldn't be happening because of a cmos-bios setting, because testinst.exe works ok when I reboot to another partitiion. NAV, AdAware, and SpyBot report that C:\masm32 is clean.


zooba

Looks like stack corruption - ie. returning to the wrong address.

I couldn't find testinst.exe and I'm on a slow connection atm so can't download beta 9 (btw. three months on and still beta? Why?).

Olly gave me this:
0005 28000000  add     byte ptr [28], al

Also, I don't believe the .text segment for the testinst program would extend from 00400000 (base address, unless something is built differently) all the way to 0042xxxx. That's 128kb worth of code! The question is, though, why hasn't this happened for other people?

l_d_allan

Quote from: zooba on February 23, 2006, 07:18:29 AM
The question is, though, why hasn't this happened for other people?

I wonder that also. What is different about my setup?

The testinst.asm code looks to be the same since 8.2. The CreateWindowEx looks like it just possibly might have something to do with what is going on .... with the next to last parameter being 0x00400000, which doesn't seem like what I would expect for HINSTANCE (and suspiciously similar to the IP of the exception 0x00422b57)  ... but the documentation says this is ignored by NT/2000/XP and only applicable to Win9x/Me

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/createwindowex.asp


    invoke CreateWindowEx,WS_EX_LEFT,
                          ADDR szClassName,
                          ADDR szDisplayName,
                          WS_OVERLAPPEDWINDOW,
                          150,150,500,300,
                          NULL,NULL,
                          400000h,NULL


When I change the 400000h to 0h, then it assembles+links and runs ok (but I am only guessing .... I am pretty ignorant about WinApi gui calls also)


zooba

00400000h is probably the correct value for hInstance, though (as you said) it's not required as of Windows NT. I don't like seeing it hard-coded though  :eek

If it ran fine without it, that's probably the problem :bg Maybe some other program has taken that slot and so Windows has relocated it...

hutch--

Can we short circuit this guesswork, 400000h is the instance handle for almost every running executable, only DLLs run at different address depending on what is available at load time. The testinst.exe program has run on some massive number of computers so its not the problem and it is a very simple orthodox win32 application in terms of how it creates a window and processes its messages in the WndProc.

It does not require any environment settings so there is no reason for an "mdir" variable. It appears to install and run on two of your other machines so I guess its telling you something about how your dev box is set up. I have not heard of it before but there may be some other system environment setting that interferes with the correct version of link but I don't know of other people having this problem and this is why the paths are hard coded to ensure it does not pick up the wrong binaries when building programs.

I hope you can get this stuff going as its a ton of fun once you get the swing of it. Its like having a sharp axe instead of a haybale to address a problem.  :bg
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php