Skip to content

iOS devices (ARM) for inline assembler - C++Builder (bcciosarm)

Tomohiro Takahashi, Embarcadero Japan’s Software Consultant and Evangelist, has written a blog post that shows you how to use inline assembler with C++Builder XE5 Update #2 on iOS devices. The blog post is written in Japanese but you can use Google Translate to get the a good English translation (or other spoken languages). The original blog post is at http://blogs.embarcadero.com/teamj/2014/01/10/4199/. The Google Translate automatic translation link is http://translate.google.com/translate?sl=auto&u=http://blogs.embarcadero.com/teamj/2014/01/10/4199/. Here is part of the blog post in English (quoted so you know the text is from Google Translate) along with a couple of images that are included in the blog post.

"First 1., I try to create in the target iOS Device a static library to perform a simple addition. I’ve implemented the function (int x, int y) that int MyAdd this time."

"Then 2., In order to check in advance the assembly code bcciosarm generates, let’s see generated bcciosarm command the assembler code of AT&T format for the source code above. For example, S-Bcciosarm FILE1.C I run the command."

"In 3, z = x + y;. So let’s rewrite the inline assembler of its own code. The basic structure is as follows."

__asm__ (assembler template: output operands: input operands: used registers);"

"Generated by building a static library to 4. Last MyCppProject.a I tried to call from the iOS app of C++Builder or Delphi, the 10 + 20 = 30 was labeled!"

You can find additional information about using AT&T inline assembler with C++Builder in my blog post (January 22, 2013) titled "Adding Inline Assembler to your C++Builder 64-bit applications" at http://blogs.embarcadero.com/davidi/2013/02/02/42436.

Great Job Takahashi-san!

Post a Comment

Your email is never published nor shared. Required fields are marked *

Bad Behavior has blocked 4 access attempts in the last 7 days.

Close