The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: -Alex- on June 25, 2011, 01:31:16 PM

Title: TinyPE Nasm to Masm possible?
Post by: -Alex- on June 25, 2011, 01:31:16 PM
I have found this page, where u can create the smalles possible PE file: http://www.phreedom.org/solar/code/tinype/
However, all the stuff is in Nasm, and i wanted to ask, if its possible to do the same in Masm?

Alex
Title: Re: TinyPE Nasm to Masm possible?
Post by: jj2007 on June 25, 2011, 02:39:34 PM
Sure it's possible. WebDav is fascinating, isn't it?
:bg
Title: Re: TinyPE Nasm to Masm possible?
Post by: hutch-- on June 25, 2011, 03:05:00 PM
I confess I have always laughed as this crap keeps turning up like a broken record. A cursory reading of PECOFF.DOCX from Microsoft will solve theproblem as to what is a PE file and what is not.
Title: Re: TinyPE Nasm to Masm possible?
Post by: -Alex- on June 25, 2011, 06:20:14 PM
Any example how exactly to do it? Seems like I need another keywords, because masm dont recognize them.
Title: Re: TinyPE Nasm to Masm possible?
Post by: dedndave on June 25, 2011, 06:41:59 PM
hi Alex, welcome to the forum   :U

we have another member named Alex (Antariy) that likes to play with this stuff, as well
he has made a few very small EXE's that seem to work under all OS's

you can use the forum search tool - Advanced Search - to locate threads/posts by Antariy
one that comes to mind is the "meminfomicro" program
Title: Re: TinyPE Nasm to Masm possible?
Post by: qWord on June 25, 2011, 07:00:37 PM
jwasm has such capacities - japhet has also upload an example (http://www.masm32.com/board/index.php?topic=12240.0).
However, none of the referenced EXE's work on windows 7  :boohoo:
Title: Re: TinyPE Nasm to Masm possible?
Post by: -Alex- on June 25, 2011, 07:21:48 PM
dedndave, thx, but seems like he done it with hexeditor, i make the same with a simple app i wrote, however, i wanted to get this done from the source :P
qWord, tbh, i wanted to use masm only, no other stuff, if its possible :P
Title: Re: TinyPE Nasm to Masm possible?
Post by: dedndave on June 25, 2011, 07:32:16 PM
the easiest way is probably not to create an EXE at all
instead, use the 16-bit linker and create a raw binary, similar to a .COM program but ORG'ed at 0
i am not sure if this can be done using the 32-bit linker - never tried it   :P