News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Masm 64 bit

Started by Gunther, February 06, 2013, 06:13:03 PM

Previous topic - Next topic

anta40

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,...

Vortex

Hi frktons,

Probably, I should be more clear :

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

Gunther

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
You have to know the facts before you can distort them.

frktons

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"?
There are only two days a year when you can't do anything: one is called yesterday, the other is called tomorrow, so today is the right day to love, believe, do and, above all, live.

Dalai Lama

Gunther

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
You have to know the facts before you can distort them.

frktons

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
There are only two days a year when you can't do anything: one is called yesterday, the other is called tomorrow, so today is the right day to love, believe, do and, above all, live.

Dalai Lama

Gunther

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
You have to know the facts before you can distort them.