The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: jcfuller on November 20, 2009, 02:53:28 PM

Title: m32lib source and Linux usage
Post by: jcfuller on November 20, 2009, 02:53:28 PM
I have been experimenting with jwasm under ubuntu32 and am enjoying the experience.
I recently emailed hutch on the usage of the sources for the m32lib library but his response (after I read the actual masm32 license) confused me more than I was before so I thought I'd try again here.
I did a quick search but did not find exactly the answer I was looking for
In the Masm32 license it states not for use on other operating systems. Well many of the macros and m32lib sources are generic enough to run on any operating system.
Also I believe they were submitted by and for users and not part of any MS code? I can understand why they cannot be distributed with the jwasm package but I want to post them as separate source.
Most of the changes I have made are just to the calling convention.
Or if that is not allowable I can post how I did it so others can reinvent the wheel on their own?

James


Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 20, 2009, 03:14:23 PM
I will try again, the masm32 project is copyright freeware protected by its licence to ensure it stays that way. For anyone to try and use any of its content as GPL open source it would mean that the GNU organisation then own the code as per the restrictions in the GNU GPL licence. Over the last 12 years all I have ever got from the GPL brigade was a lot of hassles, attempts to steal the code and relicence it as the property of the GNU organisation and this is not going to happen.

The licence is not negotiable either, it cannot be picked apart on the basis of external theories about who owns what, the project is copyright software protected by its own licence which excludes any other.

If this sounds heavy handed, read the GPL licence to see why and put it in the context of about 12 years of being a target of this bunch of freeloaders and bludgers heaping as much sh*t as they could to try and get something for nothing.

In contrast Microsoft have gone out of their way for years to help out MASM assembler programmers, high quality free tools, a massive amount of technical reference material and ask nothing back.

I would like to be able to help James out but there is no copndition that will put the masm32 project code into the hands of the GNU organisation, they can in fact go write their own.
Title: Re: m32lib source and Linux usage
Post by: jcfuller on November 20, 2009, 04:33:32 PM
Ok, I understand now.
Thanks for taking the time with a detailed explanation.

James
Title: Re: m32lib source and Linux usage
Post by: japheth on November 21, 2009, 06:47:09 AM
Quote from: hutch-- on November 20, 2009, 03:14:23 PM
In contrast Microsoft have gone out of their way for years to help out MASM assembler programmers, high quality free tools, a massive amount of technical reference material and ask nothing back.

Absolutely!  :toothy

@jcfuller: virtually all functions of the Masm32 library can be replaced by C runtime functions or are thin wrappers around some Win32 API calls. So NOT using it makes your code a lot more readable IMO.

Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 21, 2009, 08:45:15 AM
 :bg

> Absolutely!  :toothy

Wait 'till they start on you. Do you think Watcom is loved by this bunch of parasites ?  :P
Title: Re: m32lib source and Linux usage
Post by: japheth on November 21, 2009, 10:39:01 AM
Quote from: hutch-- on November 21, 2009, 08:45:15 AM
Wait 'till they start on you. Do you think Watcom is loved by this bunch of parasites ?  :P

Probably no - AFAIK they don't regard the Sybase license as "free". The problem is: IMO "freedom" - or "free will" - doesn't exist at all, so the GPL guys and I are living in two different universes.

Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 21, 2009, 01:20:49 PM
 :bg

japheth,

There is hope for you yet but beware, they come like cannibals ready to suck the marrow out of your bones and when they have extracted the last drop they vapourise like ghosts and are never heard of again unless they think they can extract something else out of you.

All this is dedicated to that great pie in the sky, the hallowed GPL licence and the pile of waffle and term redefinitions contained in it that confuse most of them. Why do some honest work like writing their own PHUKING code when they can steal it from someone else ?
Title: Re: m32lib source and Linux usage
Post by: jcfuller on November 21, 2009, 03:01:30 PM
Quote from: japheth on November 21, 2009, 06:47:09 AM
@jcfuller: virtually all functions of the Masm32 library can be replaced by C runtime functions or are thin wrappers around some Win32 API calls. So NOT using it makes your code a lot more readable IMO.

Ok but you still need proto's for those functions don't you? Actually I've already started with stdio.h and will work my way through the others unless you have them all done?

James
Title: Re: m32lib source and Linux usage
Post by: japheth on November 22, 2009, 08:15:41 AM
Quote from: jcfuller on November 21, 2009, 03:01:30 PM
Ok but you still need proto's for those functions don't you? Actually I've already started with stdio.h and will work my way through the others unless you have them all done?

No. I have about 30 of them. However, they were generated by h2incX, using the MS VC 6 headers as input. This is probably not very useful for Linux.
Title: Re: m32lib source and Linux usage
Post by: jcfuller on November 22, 2009, 10:53:12 AM
Quote from: japheth on November 22, 2009, 08:15:41 AM
Quote from: jcfuller on November 21, 2009, 03:01:30 PM
Ok but you still need proto's for those functions don't you? Actually I've already started with stdio.h and will work my way through the others unless you have them all done?

No. I have about 30 of them. However, they were generated by h2incX, using the MS VC 6 headers as input. This is probably not very useful for Linux.


h2incX failed pretty miserably on the Linux headers so I wrote a little parser in BaCon and at least got a majority of the protos for stdio,stdlib,string and a couple others.
I did use  some of the #defines -> equates I needed as some had shift operators.

James
Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 23, 2009, 12:47:43 AM
James,

If you still have a windows box going, why not transfer the complete GCC header files over to it and use your PB to translate as much as you can to JWASM include format ?

The Microsoft VC headers have become progressively more messy to convert over time and I was not sure if the GCC headers were as difficult to work on.
Title: Re: m32lib source and Linux usage
Post by: jcfuller on November 23, 2009, 10:47:39 AM
Quote from: hutch-- on November 23, 2009, 12:47:43 AM
James,

If you still have a windows box going, why not transfer the complete GCC header files over to it and use your PB to translate as much as you can to JWASM include format ?

The Microsoft VC headers have become progressively more messy to convert over time and I was not sure if the GCC headers were as difficult to work on.

Oh I still have a number of windows boxes but progressively they seem to be evolving to Linux :bg

Using PowerBASIC was exactly what I was going to do but I decided to give BaCon a try first and it worked pretty well.

To me these GNU/GCC headers are a real mess to translate but I'll keep on plugging away.

Any suggestion on a politically correct way to make them available to others?

James
Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 23, 2009, 01:04:10 PM
James,

Once you do the work you can licence them any way you like, GPL if thats what you are into, copyright them yourself and distribute them any way you like. I have no doubt Japheth would be happy to see some Linux support for JWASM so I imagine it could be put under his Watcom licence if that suited you.

I have been converting C headers for a long time and with practice if you do the equates first you solve some of the problem. VC with the right options can produce its preprocessor to standard out so you can redirect that to a file to get the structures. If they have the clutter removed that are far easier to convert to an assembler form.

The functions will be more work as you need to be able to parse the name, data types and often scan multiple lines to get each one. It would certainly be useful for the type of code you are interested in if you could produce a reliable set of include files for JWASM.
Title: Re: m32lib source and Linux usage
Post by: japheth on November 23, 2009, 02:07:47 PM
Quote from: hutch-- on November 23, 2009, 01:04:10 PM
Once you do the work you can licence them any way you like, GPL if thats what you are into, copyright them yourself and distribute them any way you like. I have no doubt Japheth would be happy to see some Linux support for JWASM so I imagine it could be put under his Watcom licence if that suited you.

IMO it's questionable to add copyrights to header files, especially if these files aren't commented or contain just "technical" comments. The API info itself - and header files by definition consist of such information -  cannot be protected by copyrights.

Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 23, 2009, 03:14:08 PM
You are confusing the information and the files, the information is copyright Microsoft, the files are copyright the MASM32 Project. As per the licence they are not redistributable.
Title: Re: m32lib source and Linux usage
Post by: jcfuller on November 23, 2009, 03:59:46 PM
As I said I do have a few headers done but they are primarily just proto's using :DWORD for all parameters. My "c/c++" is poor at best so
I think I will turn to the Linux FreeBASIC include files and see what I might borrow from them. I will not be doing any low level programming and have
already found a work-a-round for a little test piece I just finished using the posix regex. Instead of using a regex_t struct ( which I could not figure out),
I wrote a quick and dirty "c" snippit that printed out sizeof(regex_t) and used that number (32) to malloc some memory instead ,and passed that pointer.
Worked like a charm.

James
Title: Re: m32lib source and Linux usage
Post by: japheth on November 23, 2009, 04:27:17 PM
Quote from: hutch-- on November 23, 2009, 03:14:08 PM
You are confusing the information and the files, the information is copyright Microsoft, the files are copyright the MASM32 Project.

I'm not confused. For a work to be protected by copyright law it has to have - at the very least - some "creative" part. Any work which can be done by a machine - and a translation of a C header file to assembly clearly falls under this category - is considered "non-creative" and thus isn't protected.

Comments are different. However, I doubt if a comment like "Hello, I'm Steve Hutchesson and hereby proudly present the newest Windows.inc to the Masm32 community" at the top of Masm32's windows.inc would turn this file into a copyright work.

Quote
As per the licence they are not redistributable.

What's the purpose of this comment?
Title: Re: m32lib source and Linux usage
Post by: hutch-- on November 24, 2009, 01:08:17 AM
It would not matter if the production of the file was done by trained microbes chewing away at the processor core, the files are published as an original work under copyright.

Addressing the nonsense in the GPL licence when applied to a non unix environment, forget the CopyLEFT or CopyWRONG waffle or the attempt to redefine the idea of FREEDOM to stealing anyone elses software, the GPL licence is COPYRIGHT of its intelectual property.

> What's the purpose of this comment?

As per the licence they are not redistributable.
Title: Re: m32lib source and Linux usage
Post by: oex on November 24, 2009, 05:06:41 AM
Quote from: hutch-- on November 24, 2009, 01:08:17 AM
It would not matter if the production of the file was done by trained microbes chewing away at the processor core

Damn gotta get me some of those :lol
Title: Re: m32lib source and Linux usage
Post by: sinsi on November 24, 2009, 05:16:08 AM
Quote from: oex on November 24, 2009, 05:06:41 AM
Quote from: hutch-- on November 24, 2009, 01:08:17 AM
It would not matter if the production of the file was done by trained microbes chewing away at the processor core

Damn gotta get me some of those :lol
The trouble is that you need to install the wetware from a sloppy disk, and not too many PCs have a SDD.