I will soon have the next version of MASM32 in a stable form and before I write the installation for it, I was interested in any useful contributions for the example code. I have just received an OpenGL demo that works well in standard MASM32 format.

The form of example code for MASM32 is short and narrowly focused examples that other programmers can use as reference for their own work. The example must build in the MASM32 environment using the standard include files and any of the existing libraries from MASM32.

If you have any small toys that you have coded for demo purposes that are reliable, would you let me know quickly as I am trying to get this version finished so it can be distributed.

Regards,

hutch@movsd.com Please email any stuff you have to this email address.
Posted on 2001-11-06 15:42:06 by hutch--
Hi Hutch,

I have a few small demo, examples, let me see if
I can assemble them with MASM32 (if I can figure
out how). I hate to say it, but I never have used
MASM32 to assemble a program.

Ewayne
Posted on 2001-11-06 17:25:23 by Ewayne
Ewayne,

Thanks for the offer, any new ideas will be appreciated as it will help other programmers.

Something that is important is that anyone who has any demos they would like to contribute should put their name and email address at the top of the main asm file so that everyone knows who wrote the demo.

Regards,

hutch@movsd.com
Posted on 2001-11-06 17:41:22 by hutch--
Ewayne,

I think the only problem with getting things to assemble inside MASM32 is the path info for INC and LIB files. Since MASM32 doesn't use environment variables or command line options to specify the path, you need to include it in the source, like so:

include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib

That's about the only "problem" I can think of...

:)
Posted on 2001-11-06 17:51:16 by S/390

Something that is important is that anyone who has any demos they would like to contribute should put their name and email address at the top of the main asm file so that everyone knows who wrote the demo.


This way all those support questions don't go directly to hutch@movsd.com ... he he he :grin:



Thanks,
_Shawn
Posted on 2001-11-06 18:14:41 by _Shawn
Hi Hutch,

I have two demo's ready I'll send them by e-mail.

I'll see if I can find some more.

Ewayne
Posted on 2001-11-06 19:56:04 by Ewayne
Hey Hutch, I personally would love it if i could add our OOP model to the package.... I have finished examples (could use some extra documentation in some), but the Objects.inc is fully documented and ready.

There currently is an assortment of examples made from console window examples to COM.

As well i can wip up any little trinket examples in a heart-beat to demonsrate each little "trick" in OOP.

If your interested, please E-Mail me, so i can budget some time in cleaning up a set of example sources (( School is pretty rough these days, need to plan ahead )).

When were you hopping to release the next package?

EMAIL: (jay me son@hotmail.com) ~~ remove the spaces (got too much spam as is)

:alright:
NaN
Posted on 2001-11-06 21:37:46 by NaN
Hutch, I don't remember if you had an example of using NMAKE with MASM32? I don't think NMAKE comes with MASM32? I've got a simple example of modular coding, showing the use of PRIVATE procs, segments, and multiple object files.

Please, use this content if you want. (HERE)
Posted on 2001-11-06 22:28:32 by bitRAKE
Guys,

Thanks for the response so far, Ewayne sent me some nice small demos that went into MASM32 format with no problems and Brian Burns sent me a small code demo on how to code a splitter bar. Franck Charlet sent me one on OpenGL so the examples are starting to look good.

NaN,

As long as its not too big, it would be very useful to have the OOP development code that you and Thomas have been working on. I suffer a brain block on OOP (my excuse is senile decay) so having some example code by programmers who have a feel for it would be appreciated by many people.

Shawn,

What support problems ? :tongue:

It really has to do with intellectual property, if you ever bothered to read my (machine crafted in Netscape Composer) README.HTM you would note that the credits for contributors is there. Many people have contributed to MASM32 and I think it has been useful to more people because of their contribution.

Regards,

hutch@movsd.com
Posted on 2001-11-07 01:05:33 by hutch--
I still think the masm32 setup is a bit quirky... one thing is you have
to install to the root of a partition - I can live with that. But you also
have to keep your source on the same partition as the masm32
install... that's silly. And the "almost absolute" (ie, root-referencing)
includes that most people do... that's also stupid. Now, all this could
be handle very very simply if qeditor used environment variables
(which are quite easy to handle under win32), but... oh well, I already
had a discussion with hutch about this :). As it is now, the only
part of masm32 I really use are the includes (and thanks a lot for those!).

The assembler+linker I use are the one from the visual C++ processor
pack (never version), and my import libraries are the ones from
visual studio (also newer), soon to be replaced by ones from the
platformsdk. And build environment? EditPlus with some custom
tools setup, probably soon to be replaced by asmedit or an editor
of my own craft (if I weren't so lazy ;).

But keep up the good effort, hutch.
Posted on 2001-11-07 02:38:54 by f0dder
f0dder,

Glad to see you are back in one piece.

I grew up in the world of on the fly environment variables set at build time, response files and libraries but many people did not come from that world so I opted for the simplest method that could be customised the easiest way which is batch files. You can in fact set MASM32 up with absolute paths including drives and that is what the code wizard does but it makes the installation a lot more complex and it introduces many more errors.

The almost absolute paths solve the problem of which link version you use, which library set you use and this stops you from being trapped with the incorrect version of either. It can be done other ways but if you have been email bombed enough times when someone has installed the package wrongly, you would understand why I opt for a fail safe system.

Now at the moment, its demos I need so if anyone else has some small clear demos they have floating around that build in the MASM32 environment, please send them to me at hutch@movsd.com

Shawn,

As it seems you are interested in "product support", feel pressured into producing some demos for the MASM32 package, the product support will be good practice if the demo has any problems.

Regards,

hutch@movsd.com

PS This post has been written under the conditions of great sacrifice, I am setting up a new box and have not installed Netscape into it yet so this is posted with Internet Exploder 5.? which came in win98se.
Posted on 2001-11-07 04:54:54 by hutch--
All the OOP demos and files I have can be found at:
http://www.thomasbleeker.nl/exagone/page/OOPdownload.html
I don't know if NaN has some other files or updates.. The current ojbect.inc is not the final version yet but it's fully working and has all the features it will have in the final version.

Thomas
Posted on 2001-11-07 05:25:49 by Thomas
Hutch,

I'm not sure if you will like this; but, I thought I might mention that there is a very nice install programm out there called InstallMaker that is also very tiny and FREE. Check it out at http://www.clickteam.com/English/
Posted on 2001-11-07 08:01:34 by rainbird
Yep and GhostInstall is also quite clean and complete.

hitch.
Posted on 2001-11-07 08:28:51 by hitchhikr
Guys,

I would like to thank everyone who has contributed to the next version of MASM32, we have some very good example code, Japheth has sent me some DIRECTX include files that will be very useful to many people, Vladimir Kim has built a version of DBGWIN that is now installed and working correctly so all up things are looking OK.

I still have a little time left so if you have any example code that builds in the MASM32 environment that is narrowly targetted and simple to understand, it would be appreciated as it will help other programmers write more assembler easier.

Regards,

hutch@movsd.com
Posted on 2001-11-10 18:20:45 by hutch--
hutch,

I know this is a little OT here, but "robsonde" discovered a problem with WINDOWS.INC that I helped him fix. Some of the sturcture EQUs are missing the <> around the operand. Take a look at this thread:

http://www.asmcommunity.net/board/index.php?topic=1796

I just thought it may be something that you would want to fix before you ship V7.

:)
Posted on 2001-11-10 19:09:57 by S/390
Off topic but I noticed that the current version doesnt come with a make utitlity, how about including one? The only ones i know about are "nmake" by microsoft, and "make" by borland. I could send you either.
Posted on 2001-11-10 20:11:02 by ChimpFace9000
Hey hutch,

A while ago I made a program that traverses directories on a drive searching for a specific file, and I wouldn't mind sending it if you'd like :)
Posted on 2001-11-10 22:31:38 by Eagle17
Eagle17,

As long as it builds in the MASM32 environment and is a useful example I would be interested in having a look at it and if it looks OK I will add it to the example code. Thanks for the offer.

ChimpFace9000,

Thanks for the offer but I have versions of nmake from about 1990 up to the current one. One problem is I cannot supply it in MASM32 due to a licence issue, the second is I designed MASM32 from the beginning to build with batch files because they are much easier to modify.

S/390,

Thanks for the info, Iczelion used to do the maintainance on windows.inc but he has been far too busy at work for months to do any of this stuff so I am left with tweaking bits and pieces of it as I can find the data. Problem is I have to verify the format before it goes in which is a bit time consuming.

LATER: I have fixed all of the structures from RAS.H. Thanks for finding them.

Regards,

hutch@movsd.com
Posted on 2001-11-10 23:51:37 by hutch--
Here's a code snippet I wrote that may be useful:


RestrictWindowSize PROTO STDCALL :DWORD, :DWORD, :DWORD, :DWORD
;===============================================================================
; Restrict Window Size
;===============================================================================
; Place this procedure in the WM_SIZING handler (and pass wParam & lParam)
;
; Written by Thomas Bleeker [exagone]. [url]http://exagone.cjb.net[/url]
;
RestrictWindowSize proc wParam:DWORD, lParam:DWORD, minWidth:DWORD, minHeight:DWORD
; wParam contains a WMSZ_? constant indicating which edge is being
; resized. lParam is a pointer to a RECT structure with the new
; size of the window.
mov ecx, wParam
mov edx, lParam
assume edx:PTR RECT

; --- get height ---
mov eax, [edx].bottom
sub eax, [edx].top

; --- Check if height is less than minHeight ---
sub eax, minHeight
.IF SIGN?
; --- Yes, so ajust size ---
.IF ecx==WMSZ_TOP || ecx==WMSZ_TOPLEFT || ecx==WMSZ_TOPRIGHT
sub [edx].top, eax ;note that eax is negative here (height-minHeight)
.ELSE
sub [edx].bottom, eax ;seme here
.ENDIF
.ENDIF

; --- get width ---
mov eax, [edx].right
sub eax, [edx].left

; --- Check if width is less than minWidth ---
sub eax, minWidth
.IF SIGN?
; --- Yes, so ajust size ---
.IF ecx==WMSZ_LEFT || ecx==WMSZ_TOPLEFT || ecx==WMSZ_BOTTOMLEFT
sub [edx].left, eax ;note that eax is negative here (width-minWidth)
.ELSE
sub [edx].right, eax ;same here
.ENDIF
.ENDIF
assume edx:nothing
ret
RestrictWindowSize endp


This function can restrict the window size to a given minimum width & height. When you resize the window, it will never be smaller than minWidth x minHeight. The function is simply called in the WM_SIZING handler of the window you want to use it for:


...
.elseif eax==WM_SIZING
invoke RestrictWindowSize, wParam, lParam, 400,300
...


Thomas
Posted on 2001-11-11 03:25:30 by Thomas