News:

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

MASM32 Version 10 BETA.

Started by hutch--, January 11, 2008, 10:11:29 PM

Previous topic - Next topic

hutch--

Yves,

Its right at the end of kernel32.inc.


lstrcpynW PROTO :DWORD,:DWORD,:DWORD
lstrlenA PROTO :DWORD
lstrlen equ <lstrlenA>

lstrlenW PROTO :DWORD

ELSE
echo -----------------------------------------
echo WARNING Duplicate include file kernel32.inc
echo -----------------------------------------
ENDIF


Here is a small test p[iece.


; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

comment * -----------------------------------------------------
                        Build this  template with
                       "CONSOLE ASSEMBLE AND LINK"
        ----------------------------------------------------- *

    .data?
      value dd ?

    .data
      txt db "1234567890123456",0

    .code

start:
   
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    call main
    inkey
    exit

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

main proc

    LOCAL padd  :DWORD
    LOCAL plib  :DWORD

    mov plib, rv(LoadLibrary,"kernel32.dll")
    mov padd, rv(GetProcAddress,plib,"lstrlen")

    push OFFSET txt
    call padd
    print str$(eax),13,10

    invoke FreeLibrary,plib

    invoke lstrlen,OFFSET txt
    print str$(eax),13,10

    ret

main endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

end start
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

Jim,

Quote
Just for clarification...  Does this hold true for the rest of the masm32 package excluding the actual Microsoft copyrighted software?  (masm32.lib, macros, etc.)

No, this is why the project is covered by its own licence. I have added POASM to support Pelle and his tools and to make an alternative available to people who want to write software beyond the restrictions of the use of MASM.

The MASM32 library and the SDK libraries are built with MASM and cannot be used outside of its licence. The macro file for masm will not work with POASM and there is a seperate macros file for POASM which is not connected to MASM or its licence.

Pelle's tools are capable of producing the entire SDK library set so that is not a problem. I produce the files in the include directory so there is no problem using them with POASM in much the same way as the windows.inc file.

You are welcome to modify the source for the masm32 library so it will build with POASM but many use the masm32 macros so they will not build directly with POASM. A year or so ago I posted a test version of POASM that had some of the masm32 library converted to build with POASM which may save some of the hack work doing the conversion.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

thomas_remkus

#17
<author edited. supplied new text>
I found the following post clear in relation to what you can do with the MASM binaries and with your own code. http://www.masm32.com/board/index.php?topic=171.0

hutch--

and just for clarification .... read the licence for masm32, thats what its there for.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

Quote from: hutch-- on March 20, 2008, 09:13:55 AM
and just for clarification .... read the licence for masm32, thats what its there for.
And just to clarify, I only wanted to know what parts of the masm32 package I could use with assemblers other than Microsoft masm without restrictions, e.g. writing programs for Linux.

The license states:
Quote4. You cannot use the MASM32 Project to write software for Non-Microsoft Operating Systems.

I assumed this was if I was using Microsoft copyrighted software (ml.exe, link.exe, etc.) but not other parts of the Masm32 package, but I wanted to know for sure rather than guessing.  Passing along this restriction to non-Microsoft parts of the package is very similar to the hated GPL.  And speaking of which.....

QuoteThe MASM32 project cannot be used to create open source software or any other project under any form of licence that requires the user of the MASM32 project to surrender the rights they are afforded under the MASM32 licence. In particular the MASM32 licence completely excludes projects licenced under the GNU organisation's published GPL licence and/or variants.
has always baffled me.  I know several very highly regarded members of this forum are vehemently opposed to gpl, I just never could understand why, and I really don't want to get into an emotional debate on the issue here.

But, ultimately, my real (if somewhat unrealistic) goal is to some day write my own assembler, and I just wanted to know what parts of the Masm32 package could be used with it, without passing along the above restrictions.  The information should also be of interest to users of PoAsm, SolAsm, etc.

hutch--

Jim,

My last post was pointed at thomas. As far as using any part of the masm32 project to write an assembler, I don't see any reason why you cannot use ALL OF IT as you would be writing a freesatnding tool as long as the production of the assembler is not licenced as an open source project under the GPL or similar.

RE GPL, I have had nothing but grief from the sum total of GPL authors who put their hand out for anything they can get while hiding behind GPL for never contributing anything back. In contrast Microsoft always did deliver and they have been very helpful and have contributed a reasonable amount of effort with the masm32 project.

To satisfy people who want to write software that is prohibited under the enclosed Microsoft EULA, I have included Pelle's assembler to support his tool set which are in fact very good tools which can produce all of the necessary compoents like SDK libraries and any library module you wish to write in that format which is only marginally different to masm but there is no way to use any binary created with masm for projects licenced under the GPL.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

Thank you for your patience, Hutch.

I think I got it.  One thing that bothers me is I have run across several interesting projects over the years that were under GPL.  I would have liked to work on them, but couldn't because of the license issues.  While I am neutral on GPL myself, I understand your frustration.

So if I understood you correctly, if I wanted to work on a GPL project, and I used PoAsm, Polink, etc., I could use windows.inc but no other part of the Masm32 package.

hutch--

Jim,

You can use any of the text based files that I have produced, windows.inc, the complete include file set, the macros that work with POASM etc but nothing produced with masm can be used. Also note that use does not permit redistribution or relicencing of the text based files that I have produced.

Good luck with a new assembler, its a massive amount of work but like Bogdan, a noble endeavour.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

Excellent.  Thank you very much :U

ToutEnMasm

Hello,
Missing in the kernel32.lib and include files
Quote
AddVectoredExceptionHandler
RemoveVectoredExceptionHandler

lly99

support                     :clap:

shankle

Was wondering when MASM 10 will be out of beta testing?
Thanks in advance for all your efforts.
JPS
The greatest crime in my country is our Congress

qq98360


caraveiro

Maybe it would be useful append to dialogs.inc file this macro to create a Modeless Dialog:


    ; ------------------------------------
    ; create a modeless dialog from the data
    ; written to the memory template.
    ; ------------------------------------
      CallmodelessDialog MACRO Instance,Parent,DlgProc,lpExtra
        invoke CreateDialogIndirectParam,Instance,esi,Parent,
                                      ADDR DlgProc,lpExtra
        push eax                ;; preserve return value
        invoke GlobalFree,esi   ;; free memory
        pop eax                 ;; restore return value
        pop edi
        pop esi
      ENDM



Best Regards!
     
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

hutch--

Thanks for the comment, I had forgotten to put the later version into the project build. Done !
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php