The MASM Forum

Miscellaneous => Hardware & Software Corner => Topic started by: Gunther on February 06, 2013, 06:13:03 PM

Title: Masm 64 bit
Post by: Gunther on February 06, 2013, 06:13:03 PM
Which SDK must I download to get the 64 bit masm and the linker? Thank you.

Gunther
Title: Re: Masm 64 bit
Post by: hutch-- on February 06, 2013, 07:05:39 PM
Gunther,

Its been a while since I have downloaded a Microsoft SDK but the last one had ML64.EXE and the 64 bit linker. Vaguely I remember there were different directories for the x86 and 64 bit tools.
Title: Re: Masm 64 bit
Post by: sinsi on February 06, 2013, 07:09:13 PM
I think the earliest SDK with ml64 was the server 2003 r2 release, http://www.microsoft.com/en-au/download/details.aspx?id=6510
The later SDKs all have ml64 but impose a minimum version, 5.2 I think.
Title: Re: Masm 64 bit
Post by: Gunther on February 06, 2013, 09:43:19 PM
Thank you, Steve and sinsi. I've downloaded the SDK and found ml64.exe and link.exe. Both files are very hidden.

Gunther
Title: Re: Masm 64 bit
Post by: Vortex on February 07, 2013, 05:44:08 AM
I remember that ml64's HLL statement support is weak.
Title: Re: Masm 64 bit
Post by: Gunther on February 07, 2013, 07:16:38 AM
Hi Erol,

Quote from: Vortex on February 07, 2013, 05:44:08 AM
I remember that ml64's HLL statement support is weak.

that's true, but I need mainly the linker.

Gunther
Title: Re: Masm 64 bit
Post by: qWord on February 07, 2013, 07:35:09 AM
Quote from: Gunther on February 07, 2013, 07:16:38 AMthat's true, but I need mainly the linker.
you can also use the 32 bit version of link.exe to link 64 bit modules.
Title: Re: Masm 64 bit
Post by: Gunther on February 07, 2013, 08:29:56 AM
Hi qWord,

Quote from: qWord on February 07, 2013, 07:35:09 AM
you can also use the 32 bit version of link.exe to link 64 bit modules.

good hint. Thank you.  :t

Gunther
Title: Re: Masm 64 bit
Post by: Vortex on February 08, 2013, 06:32:40 AM
Hi Gunther,

Did you try JWlink?

http://japheth.de/JWlink.html
Title: Re: Masm 64 bit
Post by: Gunther on February 08, 2013, 06:38:10 AM
Hi Erol,

Quote from: Vortex on February 08, 2013, 06:32:40 AM
Hi Gunther,

Did you try JWlink?

http://japheth.de/JWlink.html

could be a good alternative. Thank you for the link. I'm searching for an assembler and linker which is useable under Windows and Linux (64 bit). Gas and ld is one opportunity, jWasm and jWlink another. I've to find out how to install it on my Linux system.

Gunther
Title: Re: Masm 64 bit
Post by: Vortex on February 08, 2013, 06:45:01 AM
Hi Gunther,

The combination of JWasm and JWlink is a very good choice. You could also visit Bogdan's site to try the Solar Assembler :

http://oby.ro/sol_asm/sol_asm_download_bin.htm

QuoteSOLAR Assembler is a modern multipass macro assembler that can compile 16/32/64 bits code and runs on Windows, Linux, MacOSX and Solar_OS

Solar Assembler can create portable executables without the usage of a linker.
Title: Re: Masm 64 bit
Post by: Greenhorn on February 08, 2013, 07:03:40 AM
Quote from: Gunther on February 08, 2013, 06:38:10 AM
I've to find out how to install it on my Linux system.
There is no need to "install" them. Just copy the files into your home directory and it should work.
Try to execute them in the Terminal. If it's not working you maybe have to set it executable via chmod (http://wiki.ubuntuusers.de/chmod) +x filename.
Edith said alternatively you can copy the files into /bin (http://wiki.ubuntuusers.de/Verzeichnisstruktur) directory (you need root permissions to do that).
Title: Re: Masm 64 bit
Post by: Gunther on February 08, 2013, 09:38:00 AM
Hi Erol,

Quote from: Vortex on February 08, 2013, 06:45:01 AM
Hi Gunther,

The combination of JWasm and JWlink is a very good choice.

I know.

Quote from: Vortex on February 08, 2013, 06:45:01 AM
You could also visit Bogdan's site to try the Solar Assembler :

http://oby.ro/sol_asm/sol_asm_download_bin.htm

QuoteSOLAR Assembler is a modern multipass macro assembler that can compile 16/32/64 bits code and runs on Windows, Linux, MacOSX and Solar_OS

Solar Assembler can create portable executables without the usage of a linker.

That would be another good choice. Both tools (jWasm & SolAsm) are very good maintained and up to date, I think. I'll check out Bogdan's site, too. And the portable exe without a linker is a definitive advantage.

Gunther
Title: Re: Masm 64 bit
Post by: Gunther on February 08, 2013, 09:42:10 AM
Hi Greenhorn,

Quote from: Greenhorn on February 08, 2013, 07:03:40 AM
There is no need to "install" them. Just copy the files into your home directory and it should work.
Try to execute them in the Terminal. If it's not working you maybe have to set it executable via chmod (http://wiki.ubuntuusers.de/chmod) +x filename.
Edith said alternatively you can copy the files into /bin (http://wiki.ubuntuusers.de/Verzeichnisstruktur) directory (you need root permissions to do that).

Thank you. Good to know; I'll try your methods. That could be a better way then using as and ld, which are available under both operating systems. But that's another story: http://masm32.com/board/index.php?topic=1449.0 (http://masm32.com/board/index.php?topic=1449.0).

Gunther
Title: Re: Masm 64 bit
Post by: frktons on February 08, 2013, 12:44:52 PM
Quote from: Vortex on February 08, 2013, 06:45:01 AM
Hi Gunther,

The combination of JWasm and JWlink is a very good choice. You could also visit Bogdan's site to try the Solar Assembler :

http://oby.ro/sol_asm/sol_asm_download_bin.htm

QuoteSOLAR Assembler is a modern multipass macro assembler that can compile 16/32/64 bits code and runs on Windows, Linux, MacOSX and Solar_OS

Solar Assembler can create portable executables without the usage of a linker.

How is it possible to create a portable executable that uses different APIs
in LINUX-WIN-MAC...?
This assertion seems to contradict the first Assembly Language dogma: the
code [even source] written in Assembly is not portable among different systems.
This is why they invented C, mainly, to bypass that problem.
If this problem has been solved by Solar-ASM it is quite a good news.
Title: Re: Masm 64 bit
Post by: anta40 on February 08, 2013, 01:58:01 PM
Quote from: frktons on February 08, 2013, 12:44:52 PM
How is it possible to create a portable executable that uses different APIs
in LINUX-WIN-MAC...?

I think what Bogdan meant is Solar assembler itself (not the executables compiled with it) are able to run on Windows, Linux, OSX,...
Title: Re: Masm 64 bit
Post by: Vortex on February 09, 2013, 06:16:31 AM
Hi frktons,

Probably, I should be more clear :

Solar Assembler can create portable executables for Windows without the usage of a linker.
Title: Re: Masm 64 bit
Post by: Gunther on February 09, 2013, 10:30:33 AM
Erol,

Quote from: Vortex on February 09, 2013, 06:16:31 AM
Hi frktons,

Probably, I should be more clear :

Solar Assembler can create portable executables for Windows without the usage of a linker.

that's true, I did try it and it works fine. The 32 bit Linux version seems to work, too; one needs the ld or gcc for linking. But the 64 bit Linux version is a problem, because I can't re-compile it; the linker brings an error, because it's a 32 bit object file.

Gunther
Title: Re: Masm 64 bit
Post by: frktons on February 09, 2013, 10:38:10 AM
Quote from: Vortex on February 09, 2013, 06:16:31 AM
Hi frktons,

Probably, I should be more clear :

Solar Assembler can create portable executables for Windows without the usage of a linker.

You mean if you assemble a program on windows it is portable on windows
itself? Or you can compile it in Linux/OSX/... with some parameters and it
can run on windows as well?
In the first case it is quite a normal behaviour, in the second one it'd be a
revolution in assembly programming world.
Many assemblers today have a version for linux, one for windows, one for
OSX etc... We speak about portable "sources" that can be assembled on
different system, and the assemblers take care of linking the appropriate DLL
from the system. This is already a big step forward towards portability,
it makes assembler look like C or other portable HLLs.

Quote from: Gunther on February 09, 2013, 10:30:33 AM
Erol,

that's true, I did try it and it works fine. The 32 bit Linux version seems to work, too; one needs the ld or gcc for linking. But the 64 bit Linux version is a problem, because I can't re-compile it; the linker brings an error, because it's a 32 bit object file.

Gunther

Again it is a crypted way of explaining things for me, and I still don't understand.

So you have assembled a program on linux and it works on windows as well?
What kind of Linux it was? Where you using Wine or an emulator, or a simple
linux "console"?
Title: Re: Masm 64 bit
Post by: Gunther on February 09, 2013, 12:06:54 PM
Hi Frank,

Quote from: frktons on February 09, 2013, 10:38:10 AM
Again it is a crypted way of explaining things for me, and I still don't understand.

So you have assembled a program on linux and it works on windows as well?
What kind of Linux it was? Where you using Wine or an emulator, or a simple
linux "console"?

Definitely: no. I've to clearify some misunderstandings and misinterpretation. What Erol means is that: With SolAsm you don't need a seperate linker (MS link, Polink etc.) to build the PE, because the Windows version has a built in linker. The resulting program runs only under Windows, of course. Sol Assembler has a small built in ressource compiler, too.

It can make output formats for 16/32/64 bit Windows, 32/64 bit Linux and 32 bit Macho (MacOS). Bogdan provides pre-compiled images for every operating system, which you can compile with the appropriate gcc to the running assembler for your prefered platform. I think that the behaviour (command line switches, syntax etc.) under the different systems is the same, because it's Sol Assembler for a specific operating system.

You're right: one can not run a Windows PE under Linux; that's only possible under Wine or a virtual machine. Vice versa, running an ELF file under Windows is the same problem; you'll need a virtual machine to do that.

But all things considered: Sol Assembler is a good tool and I hope that I can solve my problem for the Linux 64 bit platform.

Gunther
Title: Re: Masm 64 bit
Post by: frktons on February 09, 2013, 12:50:38 PM
Hi Gunther.

I had a look at SolAsm website and read about the basic features of the
assembler.  Yes, it is a very interesting tool, and the OS he is developing
is a nice project as well.

A complete OS written in ASM and an assembler on it should give you the total
control of the machine and its potential.

There are a few of these projects around, like fasm/menuetOS, unfortunately
they require an high level of knowledge to be used in a profitable way.
Nonetheless I like these projects and admire the creators of these tools.

Frank
Title: Re: Masm 64 bit
Post by: Gunther on February 10, 2013, 12:09:23 AM
Hi Frank,

you're right: SolAsm and SolOS are very interesting approaches. After solving the problem under Linux (64 bit) I think SolOS is worth a try inside a virtual machine. So we could experiment a bit.

Gunther