9

In xcode 8.0 i have an s-file with an arm assembly block of code i've written. I want to call this asm function and pass it a pointer - from my Swift code. How do i do this?

Below is how i did the same thing in objective-c:

void my_asm_function(int *myptr); //this is prototype in my h-file my_asm_function(&myIntVar); // this is how i call the function from my obj-c code 
1
  • 5
    calling function implemented with assembly should be same as calling any C function. Commented Nov 1, 2016 at 2:26

1 Answer 1

7
+50

Just call your function like any other C function... Something like this should help you straightforward: How to call C from Swift?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.