Skip to content

Commit

Permalink
Removal of objc source, addition of assembly source.
Browse files Browse the repository at this point in the history
  • Loading branch information
RJ Ross committed Mar 31, 2014
1 parent f4e3728 commit a31a7ab
Show file tree
Hide file tree
Showing 19 changed files with 1,173 additions and 409 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## An iOS App In Assembly

It's just what it sounds like. Hand written, delicately debugged, well-commented, ARMv7 assembly. Work on this started before ARM64 devices were a thing, so support for them may come in the future.

### Goals

Rather simple, make an app that compiles, runs, and draws somthing on the screen, using only hand written assembly. The only times I used the assembly output of clang was to determine the proper `.section`s for things, to let lldb be able to debug my functions.

The basic structure of this app is based on my [iOS App In Pure C](https://github.com/richardjrossiii/CBasediOSApp), with a 'main' file which contains all the set-up code, and two supporting files, for each of the classes (AppDelegate, and View).

The drawing code is all done using CoreGraphics, and displays the string 'Hello, Assembly!' in red on the screen. Here's a screenshot of the app running on my iPhone 5S:

![](http://i.imgur.com/mulfx8nl.png)

### Notes

If running the app with any accessiblity features enabled (switch control, guided access, etc.) the app crashes when the runtime tries to see if my App Delegate responds to the selector `accessibilityInitialize`, and I'm not entirely sure why. This may be fixed in the future.

### Resources

- [Apple's iOS ABI Reference](https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009020-SW1)
- [The ARM ABI Reference](http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html)
- [The ARM Developer Suite Assembler Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0068b/index.html)

And, as always, the mighty power of Google.
222 changes: 44 additions & 178 deletions iOSAppInAssembly.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
<false/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<VariablesViewState
version = "1.0">
<ContextStates>
<ContextState
contextName = "View_DrawRect:(null)">
</ContextState>
<ContextState
contextName = "-[NSObject respondsToSelector:]:(null)">
</ContextState>
</ContextStates>
</VariablesViewState>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
15 changes: 0 additions & 15 deletions iOSAppInAssembly/AppDelegate.h

This file was deleted.

49 changes: 0 additions & 49 deletions iOSAppInAssembly/AppDelegate.m

This file was deleted.

Loading

0 comments on commit a31a7ab

Please sign in to comment.