6 comments

  • haunter 44 minutes ago
    Meanwhile in the Unix world you can go as low as 45 bytes https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...
    • Bluestein 30 minutes ago
      Goodness gracious me.-
      • p00dles 13 minutes ago
        I hope that expression makes a comeback.
        • Bluestein 4 minutes ago
          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 :)

  • delta_p_delta_x 1 hour ago
    Interesting to bypass CRT and work directly against the Windows API. That said, these rely on USER.32.DLL and KERNEL32.DLL to do the majority of the heavy lifting.

    It's a bit like 'smallest hello world in assembly' but the code is just setting up the calling convention and then passing the zero-terminated character string into `write`. Cool, but that could be done a bit more straightforwardly in C, too. A lot of assembly (including in the linked repository) is book-keeping for the platform's calling convention.

    • skrellm 1 hour ago
      > That said, these rely on USER.32.DLL and KERNEL32.DLL to do the majority of the heavy lifting.

      Since the low-level Windows kernel API is undocumented and non-public, using these system DLLs is your only option on Windows.

      It's just like linking against libc.so on any POSIX systems.

    • munchler 44 minutes ago
      It’s a minimal Windows app, so the whole idea is to rely on Windows DLLs as much as possible.
      • actionfromafar 30 minutes ago
        Officially, one should not use KERNEL32.dll for instance but go via crt. In practice, most interfaces are stable.
        • delta_p_delta_x 10 minutes ago
          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.
        • neonz80 20 minutes ago
          kernel32 is an official API, you're probably thinking of ntdll. CRT is the C-runtime. Not everything is written in C.
          • actionfromafar 15 minutes ago
            Yes, you are right, must have been thinking of ntdll.
  • WillAdams 1 hour ago
    For more of the same (though I wish source was available) which actually does something useful, see the various small utilities at

    https://www.grc.com/freepopular.htm

  • eggy 1 hour ago
    I should try FASM to see if it produces a smaller size exe. COM files are small, but 16-bit DOS was the thing back in the day - 100H yeah and basically a memory dump.
    • Bluestein 1 hour ago
      > 100H yeah and basically a memory dump

      ... the days! :)

  • drdexebtjl 1 hour ago
    The developer, Dave Plummer, left Microsoft to develop and distribute malware and scams in the 90s. See previous thread at [1].

    Nowadays he spreads misinformation disguised as war stories from his time at Microsoft.

    [1]: https://news.ycombinator.com/item?id=39813625

  • taf2 1 hour ago
    love this and it's timely as I think with AI more of my code will just be native assembly for example: https://github.com/taf2/tic-tac-toe my m series native assembly based tic tac toe windowed game... very portable too you just simply execute codex --yolo port my app to x y z host...
    • eggy 1 hour ago
      I haven't played with yolo yet. I'll have to use my airgapped, old Lenovo ThinkPad for this! Whenever I see yolo, I can't stop thinking of Joseph Redmon's YOLO and his astounding resume format!