News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Dave Plummers Smallest Windows App 801 bytes

Started by Shintaro, January 06, 2023, 07:33:18 AM

Previous topic - Next topic

Shintaro

Hi,
This might be interesting, Dave Plummer and friends got the Windows App down to 801 bytes.
YouTube video is HERE.

Code on GitHub is HERE.
Cheers.
"Wyrd bið ful āræd. Fate is inexorable."

jj2007

Have you looked at Tiny.asm? It's not impressive.

zedd151

I wonder what the AV scanners will think of it ...
The 'hacky' coding to obtain kernel32 looks kinda suspicious. There was once a Masm32 example 'no imports' or something like that, that does something similar to obtain kernel32. Very fishy coding.

NoCforMe

Quote from: jj2007 on January 06, 2023, 08:05:25 AM
Have you looked at Tiny.asm? It's not impressive.

That was my reaction. Give me half and hour and I could write a smaller one. (We're talking executable size, not code size, right?)
Assembly language programming should be fun. That's why I do it.

hutch--

It really is a gimmick, the specification for a 32 bit PE file is 2 x 512 byte sections. You can use the old driver alignment to set smaller sections but there is no garrantee that it will run on all Windows versions. You can build them a lot smaller that 801 bytes but they are all useless, if you want an app that runs and is useful, use the spec section sizes.

Shintaro

Interesting.

The criteria is:

1- Top level frame window
2- Caption
3- Title bar
4- Working minimize
5- Working maximize
6- Working close
7- Working system menu
8- Must paint its client area fully
9- Render CENTRED text in the middle of window
10 - Resizable from all sides and repaint itself properly.

YT link to criteria HERE.

I am not familiar with "tiny.asm" so I will try to find it.


EDIT: Sorry he was using masm, so not some other assembler.
"Wyrd bið ful āræd. Fate is inexorable."

jj2007

Quote from: Shintaro on January 06, 2023, 10:36:57 AMI am not familiar with "tiny.asm" so I will try to find it.

It's in the GitHub code archive. Attached an even tinier one.

See also http://masm32.com/board/index.php?topic=6595.0

Shintaro

My apologies, I should have made the criteria part of the first post.
Tiny.asm is interesting, but does not meet the criteria above.
"Wyrd bið ful āræd. Fate is inexorable."

zedd151

Quote from: jj2007 on January 06, 2023, 10:38:27 AM
Attached an even tinier one.
133 bytes of code, impressive!  :thumbsup:
Quote from: Shintaro on January 06, 2023, 11:11:41 AM
Tiny.asm is interesting, but does not meet the criteria above.
almost ...  :tongue:

jj2007


zedd151

Code only. Not the other stuff (headers, sections, etc...) ... and not including the imports jump table.  :azn:  85h bytes = 133d bytes  :tongue:

zedd151



zedd151

#13
Quote from: jj2007 on January 06, 2023, 11:24:33 AM
Done, of course :bgrin:
I just assembled & linked it (no merge) ... that was 2,560 bytes. That's why I asked.
There is a masm32 example "masm1k" that weighs in at 1024 bytes ... you mean that you can't beat that?   :tongue:
Attachment removed it can be found in /Masm32/examples...you need to have Masm32 SDK installed of course.

jj2007

masm1k is not a function Windows application afaik