from Hacker News

Hello-World iOS App in Assembly

by pabs3 on 10/30/25, 2:37 AM with 58 comments

  • by WillAdams on 10/30/25, 3:29 PM

    For folks who are curious about this sort of thing and want an approachable starting point, I would recommend:

    https://www.goodreads.com/book/show/44882.Code

    It would be way cool to see an actual application which wanted this sort of speed optimization --- the last significant assembly language program I can recall using was WriteNow, which was ~100,000 lines of assembly and to this day is my favourite word-processor (well, the NeXT version --- the Mac, even v2.0 suffered in comparison for not having access to Display PostScript and Services).

    Really wish that there was a writeup of it at folklore.org --- unfortunately, it only gets a single mention:

    https://www.folklore.org/The_Grand_Unified_Model_The_Finder....

    (or that there was an equivalent site for the early history of NeXT)

  • by sanskarix on 10/30/25, 5:49 AM

    This kind of thing is how you actually learn what's under the hood. Everyone's building with React Native and Flutter, which is fine until something breaks. Then you're stuck Googling black magic. Starting from assembly teaches you the real cost of abstraction.
  • by JimDabell on 10/30/25, 3:22 AM

    There is also an iOS app implemented in C here:

    https://stackoverflow.com/a/10290255/8427

  • by herodotus on 10/30/25, 1:58 PM

    When I was in second or third year of computer science in 1971 or '72, we (of course) learned IBM 360 assembler, but we also had to design a simple binary adder using AND OR and XOR gates. All on paper - no need for any soldering or electronics, which I regret. I cannot remember how many bits of input - probably 4 but may have been 6. But I did do quite a bit of asm programming, including a routine for calculating square roots using Chebyschev polynomials and newtons algorithm.
  • by ChrisMarshallNY on 10/30/25, 9:59 AM

    Very cool, if impractical (it’s likely that you’d never get an ASM app through the App Store Approval process).

    ARM Assembly is a much more Byzantine creature, than the old 8- and 16-bit versions I used, way back in the Pleistocene.

    I’m always a fan of starting from the “bare metal,” to learn, but these days, it’s a long trip. When I was just a wee sprog, it was only a couple of steps away.

  • by iMario on 10/30/25, 2:46 PM

    Would love to see equivalent in C, not ObjectiveC... plain C.
  • by anta40 on 10/30/25, 3:47 AM

    Even better if build steps are provided
  • by starmole on 10/30/25, 2:48 AM

    Super cool! Would love to see the build/deploy steps needed.
  • by avidphantasm on 10/30/25, 1:50 PM

    Looks more sensible than having to use XCode and Apple's atrocious developer documentation.
  • by azhenley on 10/30/25, 4:52 AM

    I’m guessing even this still requires that I use XCode.
  • by Ecco on 10/30/25, 12:45 PM

    Feels like a disassembly of a boilerplate app, as opposed to handcrafted, minimal assembly code.

    For instance I’m pretty sure the autorelease pool is unnecessary as long as you don’t use the autorelease mechanism of Objective-C, which you’re most likely not going to do if you’re writing assembly in the first place.