Alex Rivera | Logout

iOS assembly code

Asked 2011-12-07T22:48:09.540
8

I would like to try some ARM assembly code with apple iOS just for educational purpose. I would like to start with some in line code within Xcode. My understanding is that I need to compile for a iOS device, for example for my iPhone, which means that I need to pay $99/year for membership. I don't think I can use ASM assembly code with a iOS phone simulator. I am having an hard time on finding examples, books or documentation on ARM assembly code in Xcode env with an iPhone. Am I doing this wrong? Maybe iOS is not the most user friendly environment to learn ARM Assembly.

Edit
Report

1 Answer

14

Back up...

What are you trying to learn? Arm assembly or iOS programming? Pick one...

Do you have any assembly experience?

What is it you think you are wanting to learn in arm assembly? Jump in and write some full blown gui applications? You need to learn to put immediates in registers add and or and xor and save answers in registers. then read and write some memory locations. Learn to use the stack, make calls, etc. Then write your applications in C or whatever and use asm for hand tuning or use your asm skills to debug the compiler and or code. Writing applications or operating systems, etc in asm is for folks who want to make a statement, or have a specific reason, not for educational purposes.

There is some leaning toward a unified ARM assembly language that works both on the ARM based cores and the thumb2 based cores. Not for all of the assembly language needed but for places where you might want to write a module of code and not have to have a lot of if thumb elses littering the code. You can certainly get your feet wet with that here and take some of that code straight to full 32 bit ARM instructions on some other platform. thumbulator is thumb only, the common instruction set between the ARM based cores and the thumb2 based cores, basically it is the portable ARM instruction set, write the code once, it works on almost all of their cores.

If your goal is to learn iOS programming, get the kit or whatever and learn using whatever language they want you to learn, get proficient at that, learn the apis, etc. Then if you do some of the assembler stuff above then you can start to think about making calls to asm functions or inline assembler, etc, from your iOS programs. How much assembler, your choice. I wouldnt expect to see applications written in assembler for that platform I would instead search for how do I call this assembly code from my ios application or how do I do inline assembly. (dont learn inlin

answered 2011-12-08T03:01:59.763

Your Answer