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

bunnyboi

Don't really know if this exactly fits in here, but MASM is working on wine. Which should be great news for thoes of you who would like to use it on Linux as well. I got it up and running on my Linux box which is running the latest version of wine on Slackware 12.2. I also added it to the wine app database, and added myself as a maintainer.

ecube

that most likely violates Microsofts copyrights, but goodjob, I guess.

UtillMasm

VMware Workstation for Linux + Windows Vista + Masm32
it is very stable on Linux.

Vortex

Hi bunnyboi,

Have look at Jwasm, a MASM compatible assembler. It can run on Linux :

QuoteJWasm Features:
- JWasm natively supports output formats Intel OMF, MS COFF, ELF and BIN.
- JWasm binaries are available for DOS, Windows and Linux.
- Instructions up to SSSE3 are supported.
- The JWasm source is portable and has successfully been tested with Open Watcom, MS VC and GCC.
- As far as programming for Windows is concerned, JWasm can be used with both Win32Inc and Masm32.
- C header files can be converted to include files for JWasm with h2incX.

http://www.japheth.de/JWasm.html

ookami

Up. :eek

About JWasm :

Are all the MASM32 macros and procedures calls working on it, while running with Linux ?

Thanks.

hutch--

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

brethren

#6
yeah that doesn't fly with masm32's license thats why ive been trying to rewrite all the macros and procs, its going pretty well (although slooow) and so far i can compile a fair few simple programs under linux,

btw if anybody wants to donate any macros cfm$, switch or any macro coz i'd rather write code than macros:)
or you could donate code, you don't need to be a linux coder, just pick something from the masm32 docs and write it. doesn't matter how small it could be anything from szRev to the boyer moore algos

heres a small test program that work both under linux and windows (just change the include)
INCLUDE lasm32rt.inc

.data?
buf BYTE 40 DUP(?)

.code
start:
cls
mov ebx, input("a signed 32 bit number: ")

print "address: "
print hex$(ebx), " = "                      ;whats the point of a signed and unsigned hex macro uhex$, lol
print ebx, 13, 10, 13, 10

print "the number you entered is "
print ustr$(len(ebx)), " characters long", 13, 10

mov esi, sval(ebx)
        fn dw2bin_ex, esi, ADDR buf                 ;is there a macro for binary? like bin$ or something

        print ADDR buf, " = binary", 13, 10
print ustr$(esi), " = unsigned", 13, 10
print sstr$(esi), " = signed", 13, 10
print hex$(esi), " = hexadecimal", 13, 10

exit
end start

dedndave

why not use JwAsm - or some other assembler ?

ookami

But you can't use all the procs and macros...

jj2007

Quote from: ookami on February 16, 2011, 11:57:28 AM
But you can't use all the procs and macros...

JWasm is fully (99.5%) compatible with Masm. All Masm32 macros work. Even MasmBasic works fine with JWasm.

jcfuller

Quote from: jj2007 on February 16, 2011, 12:31:44 PM
Quote from: ookami on February 16, 2011, 11:57:28 AM
But you can't use all the procs and macros...

JWasm is fully (99.5%) compatible with Masm. All Masm32 macros work. Even MasmBasic works fine with JWasm.

Yes, but you can't use any macros or code from Hutch's masm32  package on Linux.

James

dedndave

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

but you aren't supposed to use masm on any OS other than windows
E^cube, Erol, Hutch, et al have already said as much - a year and a half ago

i think the effort would be better spent making a legal package that might be widely distributed
otherwise, all the effort is really only of use to you

ookami

Is there a library, i mean complete like the masm32 one, that I can use under Linux ? (even if it's not MASM compatible, I'll use NASM or another assembler).

dedndave

here's a good place to look....
http://sourceforge.net/projects/jwasm/forums/forum/927109
i am sure there are a number of linux/asm forums around, as well

if you don't have any luck, then you have at least defined the goal of a good project   :bg

Hutch's package makes it easy to get started in win32
i try to understand all the pieces of it, though
in other words, if i use the print macro - i know what it does and how it does it
i try not to rely on Hutch or anyone else to carry my ass all the way - lol - just help me out a little

ookami

Thanks :U

Quote from: dedndave on February 16, 2011, 01:44:30 PM
Hutch's package makes it easy to get started in win32
i try to understand all the pieces of it, though
in other words, if i use the print macro - i know what it does and how it does it
i try not to rely on Hutch or anyone else to carry my ass all the way - lol - just help me out a little

That's great, I try to do the same too.
But is it possible to do that with the Windows API itself ? (I mean to look inside the code to know how it's built). I guess it's not...