Live data from Hacker News

HelloAssembly: The smallest possible complete Windows application (2021)

github.com

21–30 of 53 posts

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#22

Earlier quoted context omitted.

It’s a minimal Windows app, so the whole idea is to rely on Windows DLLs as much as possible.

Officially, one should not use KERNEL32.dll for instance but go via crt. In practice, most interfaces are stable.

KERNEL32.DLL (in spite of the name) provides user-mode system services for the Windows API. The CRT provides the C99 API. There are many entry points to the same thing on Windows; you can do any of `malloc`/`HeapAlloc`/`new`/`VirtualAlloc` to get a void* memory buffer. `malloc` is from the CRT; `HeapAlloc` is from KERNEL32.DLL, and `new` is from the C++ runtime.

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#23
post #21

Earlier quoted context omitted.

Goodness gracious me.-

I hope that expression makes a comeback.

You know? FOR ONE expression our current neuralese-spewing friends could standarize on - I'd not mind this one (and the ilk) becoming "load-bearing", again.-

PS. Honest take :)

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#24
post #15

Meanwhile in the Unix world you can go as low as 45 bytes https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...

Unfair comparison. The Windows tool (FTA):

“Runs a Windows message loop Has a title bar, minimize, maximize, and close buttons, which all work as expected Has a system menu with the same Paints the background and some text centered in the middle, equal to or larger than "Dave's Tiny App"”

That Linux program:

“Let’s take an incredibly simple program, one that does nothing but return a number back to the operating system”

See https://archive.is/w01DO#selection-265.0-265.44 for a fairer comparison (97/133 bytes)

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#25

[flagged]

My how the overton window has moved. Some of violative conduct is standard practice now.

> When consumers prepared to purchase a product, additional services and products including a $9.95 back-up disc and $4.95 ‘optional extended service’ plan appeared on the check-out form. The form also listed “one free year of updates” – selected by default – but the company was then authorized to automatically charge a consumer’s credit card at the end of the year unless the buyer cancels the update plan.

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#26
post #15

Meanwhile in the Unix world you can go as low as 45 bytes https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...

97 bytes for Windows at the time this very nice walkthrough was written: http://www.phreedom.org/research/tinype/

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#27
Windows and assembly is a fun topic!

Putting the search terms "Windows" and "assembly language" turns up all sort of books. The one that got me to initially explore the topic (from 1993).... [0]

For a more up to date treatment of assembly and windows.... comes with source code for the IDE also. Ray Seyfarth's book [1].

[0] Windows Assembly Language & Systems Programming: Object Oriented & Low-Level Systems Programming in Assembly Language for Windows 3.X

[1] Introduction to 64 Bit Windows Assembly Language Programming: Fourth Edition ISBN-13: 978-1543138849, ISBN-10: 1543138845

Re: HelloAssembly: The smallest possible complete Windows application (2021)

#30
post #15

Meanwhile in the Unix world you can go as low as 45 bytes https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...

Goodness gracious me.-

https://en.wikipedia.org/wiki/Goodness_Gracious_Me_(song)
Post reply on HN