
An iOS App in Assembly (2014) - benguild
https://github.com/richardjrossiii/iOSAppInAssembly
======
biesnecker
Everyone that says "but it's insane to use assembly to write an iOS app!" is
both 100% correct and 100% missing the point. It's nice to float around on the
surface most of the time and ship useful code, but if you don't spend at least
a little of your time digging deep you'll miss out on a lot.

I'd never try to do this in prod, and neither would OP, but it's great to see
how it works under the hood.

------
FraKtus
what is more interesting is his other project to make an application in pure
C:
[https://github.com/richardjrossiii/CBasediOSApp](https://github.com/richardjrossiii/CBasediOSApp).
When you are doing cross-platform, you may be more at ease with a few lines of
C for some utilities call if you don't want to learn objective C.

~~~
tzahola
It’s definitely NOT cross-platform. He’s just calling the objective-c runtime
from C.

~~~
drb91
Maybe I'm reading wrong, but I read it more that if the Objective-C interface
is small, i.e. the bulk of your app is cross-platform C, you could easily use
C to interact with the runtime.

~~~
vlovich123
So why not just write the Objective-C part in C rather than calling the
underlying machinery directly. It's a neat project to learn the internals, but
I wouldn't ever structure a real app this way.

~~~
curyous
If you write part of it in C, then you can reuse that code on another
platform.

~~~
0x0
Objective-C is a superset of C though, so you might as well write the platform
specific stuff in an .m file rather than messing around with the .c API for
Objective-C. :)

------
jacobush
As I have seen too many times to be surprised now, the source code and setup
in assembly is much easier in asm than in higher level languages. Look for
”COM programming with assembler” if you are curious. No casting, no bullshit.
Just numbers pushed around :)

~~~
yoz-y
I dunno. The massive amount of comments necessary to make this code remotely
understandable is pretty telling.

~~~
_sdegutis
And in one file there was a magic number #1536 or something, never got
explained.

~~~
exikyut
Explanation in the form of breadcrumbs:

1\.
[https://github.com/kliment/Printrun/issues/619#issuecomment-...](https://github.com/kliment/Printrun/issues/619#issuecomment-102119718)

then

2\. [https://github.com/gnustep/libs-
corebase/blob/master/Headers...](https://github.com/gnustep/libs-
corebase/blob/master/Headers/CoreFoundation/CFString.h#L78)

------
mmjaa
Disclaimer: There are truly some madmen in the world.

Thought: I LOVE THIS! I would love to see a few more even more complicated
examples .. wouldn't it be neat if it turns out that its easier to write apps
in Assembly than Swift/ObjC, lol ..

------
anfilt
I know some people might not like this idea, but I feel more production
systems should use _some_ assembly. Although everything is a bit much.

Also of the mindset we should be using more domain specfic languages.

------
ashleyn
It's a cool stunt, but nothing more. The days of using assembly language in
everyday business applications are long gone. Questions of portability
immediately come to mind, as well as productivity losses relative to other
companies/developers who are producing code faster and more efficiently.

~~~
anta40
Well, never estimate the power of "hobby". When announcing Linux 27 years ago,
Torvalds said "just a hobby, won't be big and professional like gnu". Now name
any device and probably someone has ported Linux to it.

In a similar way, probably old-school asm programmers will gather to write
mobile app framework in assembly. You know, HTML/JS/Java/Swift is for sissies.

Of course I'm kidding :p

