News:

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

MASM on Linux

Started by bunnyboi, June 07, 2009, 07:12:49 AM

Previous topic - Next topic

dedndave

you can with some debuggers
but - you can't change how the API works   :P
you CAN change the code that runs under it
i guess, for linux, you can change how it works - that's why there are a million versions of it

jcfuller

Quote from: dedndave on February 16, 2011, 12:59:52 PM
i am not sure if Hutch cares about using the package on linux - or at least, parts of it

Dave,
  I don't mean to speak for him but you know how he feels about Open source so I think he does care.

James

dedndave

Hutch doesn't have a problem with open source
he does have a problem with the GPL implementation of it - lol
of course, he doesn't want you to stick a different name on it and call it your work, either

Hutch has to abide by the rules set forth by MS regarding the use of masm
because the libraries are created using masm - they probably fall under that catagory

he is a very reasonable person
he doesn't want his stuff "stolen" or used for malicious purposes
he doesn't want the forum to get into trouble, either
beyond that, it seems that he is as liberal as he can be with the material
afterall, you are able to make an application using the resources he provides and call it your own

also - he uses linux for the masm32 site, if i'm not mistaken
i am sure he has written some kind of linux asm code   :bg

brethren

Quote from: dedndave on February 16, 2011, 12:59:52 PM
i am not sure if Hutch cares about using the package on linux - or at least, parts of it
he is bound by the ms license for masm, though


i think he cares a lot about where masm32 is used but just in case i've got the wrong end of the stick i'd like this question cleared up once and for all. could a linux port of the masm32 libs/macros be attempted using jwasm?

jj2007

Quote from: jcfuller on February 16, 2011, 12:44:55 PM
Yes, but you can't use any macros or code from Hutch's masm32  package on Linux.

That's correct. I can trim MasmBasic so that it does not use \masm32\include\masm32.inc and \masm32\macros\macros.asm, but Windows.inc, gdi32, kernel etc are still needed.

dedndave

Quotecould a linux port of the masm32 libs/macros be attempted using jwasm?

only Hutch can answer that question - or sanction such a project

i would think Windows.inc, gdi32, kernel etc are pretty useless under linux   :P

the real meat for linux, then, is the code in macros and proc functions - much of which would require modification

jj2007

Quote from: dedndave on February 16, 2011, 04:53:55 PM
Quotecould a linux port of the masm32 libs/macros be attempted using jwasm?
i would think Windows.inc, gdi32, kernel etc are pretty useless under linux   :P

With Wine it should be possible to use Windows.inc, gdi32, kernel etc

brethren

what i'd like to be able to do is assemble simple programs that rely on masm macros, masmlib, and the c library between platforms. obviouslly i'm not talking about any of the windows specific header/libs, i'm talking about simple console programs, like algo demos, timing tests etc. the kind of stuff thats posted to the forum evey day
i think it should be possible with a bit of effort

dedndave

well - that doesn't sound too difficult, actually
it is just a matter of converting a few API's (unless you are using wine <--- qualifier for Jochen   :bg )
you are talking StdOut, keyboard, and a few type conversion routines

print, uhex$, str$, ustr$, inkey would cover most test programs we run
i would think uhex$, str$, ustr$ might work as is
some guys like to go nuts with string conversion macros, but those wouldn't be too hard, either
just have to replace the msvcrt stuff

MichaelW's timing macros should work

now - that applies to most algo testing
some things, like disk i/o tests, would be a job

brethren

yeah its not actually too difficult, just slow. i've done 17 macros and 11 procs (yeah basically i've not even started :P) so far but the hardest problem i see at the moment is the dynamic heap allocation. i may just skip the problem until later and focus on the easy stuff ie file i/o through syscalls

jcfuller

Here is a link with Raymond's fp library attached
http://www.masm32.com/board/index.php?topic=12932.0

I converted a number of macros myself but got side tracked on other things. I'll see if I can find them.

James

hutch--

I don't see why folks who want to write code in Linux can't use JWASM and write a reliable library for it. Libraries are accumulative things, the more you write the more you can do.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

brethren

Quote from: jcfuller on February 17, 2011, 01:43:25 PM
Here is a link with Raymond's fp library attached
http://www.masm32.com/board/index.php?topic=12932.0

I converted a number of macros myself but got side tracked on other things. I'll see if I can find them.

James


thanks:)

QuoteI don't see why folks who want to write code in Linux can't use JWASM and write a reliable library for it. Libraries are accumulative things, the more you write the more you can do.

people like to stick with what they know:)

dedndave

i guess i can understand wanting to compare algo performance between linux and windows
if everything is working the way it should, you ought to get the same result for most algos
well - that's in a perfect world   :P