Hi there,

Is it possible to get MASM to output pure x86 instructions without embedding them inside a .exe?

I would like to be able to copy just the instructions into the boot block of a floopy disk.

S.
Posted on 2003-12-17 07:50:33 by Station
As a fast solution: you might try to assemble as an old DOS style .COM file
but you need the old MASM 16 bit linker for that. Also FASM and NASM are able to directly output .bin

However on MASM and TASM it is up to the linker to produce the output format.

For SolOS i had to use J.Finne's "Jloc" Linker its is very capable of generating absolute bin output... however its a little too complicated to use. I think ALink should also work but i was unable to use it with TASM (TASM uses OBJ and not COFF object files)

Take care at SEGMENT definitions that are needed to achieve this absolute locations

That is why i am developing y own assembler in my free time those days :grin:
Posted on 2003-12-17 08:03:17 by BogdanOntanu
Afternoon, Station.

...
also:
It's against Microsofts EULA for Masm to use it to produce anything *but* exes and drivers for a Windows OS.

Cheers,
Scronty
Posted on 2003-12-17 15:20:05 by Scronty
Hi. :)

Afternoon, Station.

...
also:
It's against Microsofts EULA for Masm to use it to produce anything *but* exes and drivers for a Windows OS.

Cheers,
Scronty

You mean PE files, right? I don't think it's in violation of the EULA to make DLLs, screen savers and control panel applets... (I'm asking just in case ;) )
Posted on 2003-12-17 18:11:58 by QvasiModo
exes = executable files, files which can be run, dlls can be run (by using rundll(32) for instace), screensavers are PE files (just that is has a few standard flags and an other extension).

Basically, you can use MASM to make whaever stuff use full or not, as long as it's for Windows only.

If you want to write your own OS or produce flat binaries, use fasm. (note the subliminal "hidden" advertisment for fasm ;))
I think fasm is the assembler that meets you needs if you want to have "plain" instrucitons assembles, with out any kind of hearders or so.
Posted on 2003-12-18 08:23:09 by scientica
i dunno if this could help you

but you can assemble directly in ollydbg and use its binary copy to get it copied to some where

remember binary copy not copy to clipboard

EDIT
oops you want it without loading an empty exe template well olly wont load it
sorry
EDIT
Posted on 2003-12-18 08:34:40 by bluffer
Hmm,

How can i do that in OllyDbg?, aka without loading a template empty exe first?
Maybe i can use Ollydbg to test my assembler encodings this way.

Now i have to use IDA Free version, because it is the only one able to load plain bin files

Yes i agree FASM looks like the best solution to ouput plain bin files and not only ...
(after all it is used to make Menuet)

But i dislike it's syntax :confused:
(it is only me dont worry its syntax is cool)
Posted on 2003-12-18 10:12:27 by BogdanOntanu
BTW why we can't use masm to OS and such why --hutch made it that way ??
Posted on 2003-12-18 10:21:08 by AceEmbler

Yes i agree FASM looks like the best solution to ouput plain bin files and not only ...
(after all it is used to make Menuet)

But i dislike it's syntax :confused:
(it is only me dont worry its syntax is cool)
Me, too; but it is a good assembler.
Posted on 2003-12-18 10:42:08 by bitRAKE

Afternoon, Station.

...
also:
It's against Microsofts EULA for Masm to use it to produce anything *but* exes and drivers for a Windows OS.

Cheers,
Scronty


No it isn't. Nowhere in the 98 DDK EULA does it restrict what you can do with MASM, that is just an urban legend :)

1. GRANT OF LICENSE. This EULA grants you the following limited, non-exclusive rights:
* SOFTWARE PRODUCT. You may make, install and use up to a maximum of ten (10) copies of the SOFTWARE PRODUCT on computers, including workstations, terminals or other digital electronic devices, residing on your premises, to design, develop, and test software products, including but not limited to device drivers and other software products ("Application(s)") for use with Microsoft Windows and/or Windows NT.


Please note the that EULA expressly says that you are not limited to those things which it mentions. This also applies to any software that you might create for another OS. Man, am I getting tired of hearing that legend.
Posted on 2003-12-18 10:46:42 by donkey
donkey,

I guess it depends on how you interpret the sentence:

..., including but not limited to device drivers and other software products ("Application(s)") for use with Microsoft Windows and/or Windows NT.


If you break it into two parts:

1) including but not limited to device drivers and other software products ("Application(s)")

and

2) for use with Microsoft Windows and/or Windows NT.

the interpretation can be different. Where 1) describes the type of products which can be produced, and 2) defines the target platforms.

I am definetly not an attorney, but this is how I have always interpretted the meaning of this section of the EULA. And in the hands of a team of $1000 / hour attorneys, they could argue three or four other interpretations!:confused:

farrier
Posted on 2003-12-18 11:02:14 by farrier
Microsoft has a fleet of lawyers that check these things for ambiguity, they would not have left a hole that big without knowing. The fact is that there is no comma so the sentence is not split it is meant to be non-limiting for all of the stuff mentioned. Now if you are using the newer versions of masm you're f*cked, you cannot even use it to create an exe :

From the NT/2K DDK :

1. GRANT OF LICENSE. This EULA grants you the following rights:
a. SOFTWARE PRODUCT. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT on computers, including workstations, terminals or other digital electronic devices ("COMPUTERS") to design, develop and test drivers for use with Microsoft Windows 2000, Windows 98 and Windows 98, Second Edition operating systems ("Drivers").


They corrected it for versions of MASM 7 and above, no other OS, no executables, no applications just drivers.
Posted on 2003-12-18 11:05:14 by donkey
The EULA was not made by hutch
The EULA is made by Microsoft, and hutch was legaly bound to include it in the packet.

And unfortunately the ledgend is true...

What the text quoted say is that indeed you are not limited to device drivers, hence you can amke any other applicatons you might consider... but the things after "for" are very clear from a lawyer's point of view :grin:

"For use with Microsoft Windows." period. ... Ask any lawyer

The fact that you do not want to understand it like that...cough...well i do not think it matters. But i agree that lawyers have a way to make things understandable both ways ... in order to confuse ppl.

Besides the licence can be removed from you at any given time by Microsoft if they so consider suited.

Because they offered MASM for free and in the intention to ease production of application for Windows not to make a competitive product with theitr OS (assuming you can)

How would you like that at the end after you have produced the most cool ASM OS on Earth to have to renounce it because M$ will remove your licence?

Of course ... dont worry ... be happy, nobody will ever look at you untill you have produced a thing that might really hurt their money interests... so until then you are perfectly safe...cough,...

BTW Donkey
ambiguity is for common ppl with no legal study :grin: lawuers know what that means and on purpose try to make you confused, it their job after all.
Posted on 2003-12-18 11:08:47 by BogdanOntanu
Hi Bogdan,

The fact is that when the 98 DKK was written there were no real competing OSes for the x86. Microsoft had no reason whatsoever to protect their product from use in another OS, as I said they later protected it from use outside of Windows without ambiguity of any kind. But the fact remains that the 98DDK liscense was written by Microsoft and does allow for that. They quickly shut down that option and the option to even write an executable program with it in Windows 2000. But if you are still using 6.xx you are not bound by the new license agreement.
Posted on 2003-12-18 11:14:07 by donkey
I hope you are right Donkey
And i will not argue with you over this anymore

Besides i own licences(3) for TASM 5.0 used in my SolOS and i am writting my own Assembler compatible with TASM and MASM as we speak :grin:
so ... :alright:
Posted on 2003-12-18 11:20:14 by BogdanOntanu
I hope you are right Donkey
And i will not argue with you over this anymore

Besides i own licences(3) for TASM 5.0 used in my SolOS and i am writting my own Assembler compatible with TASM and MASM as we speak
so ...


I manily use GoAsm now anyway as well so the point is becoming more and more moot with me as well :grin:
Posted on 2003-12-18 11:25:16 by donkey