I've been writing a combination of C and assembly code for many years in many different compilers (Consolair C, Think C, MPW, Code Warrior, Visual C), either using inline assembly if it was available, or an external assembler. Now I come to Xcode and have hit a wall.
Xcode is a massively bloated and confusing thing and doesn't seem to provide a single document or example of how to do either inline assembly using clean Intel syntax (not that god awful hideous ATT syntax placed in printf like statements), nor how to use an external assembler with Xcode, such as NASM, which comes with Xcode.
There's a build option in Xcode that says Codewarrior Style Inline Assembly, but the Xcode editor doesn't like it when I type in Codewarrior style assembly, and just dumps out errors if I try to build/run the app.
Someone online mentioned the compiler option: -fasm-blocks, but of course gives no info on where compiler options like that can be entered into Xcode.
There's an Intel ".intel_syntax noprefix" setting too, but again, no clue as to where that's supposed to be placed, nor does that necessarily get rid of the all the extraneous surrounding nonsense like ("add eax,ebx\n\t); and allow a simple, add eax,ebx, syntax instead.
There's no info given on how to use an external assembler with Xcode, or link in files generated by one, nor how to pass variables and pointers between C and assembly.
So what's the deal with Xcode? They dump a big pile and stuff on my hard drive and don't explain how to use it. Where does one go to find information like this, or some examples that step a person through the process of using assembly code in C?
Thanks for any advice.
-Elhardt
Xcode is a massively bloated and confusing thing and doesn't seem to provide a single document or example of how to do either inline assembly using clean Intel syntax (not that god awful hideous ATT syntax placed in printf like statements), nor how to use an external assembler with Xcode, such as NASM, which comes with Xcode.
There's a build option in Xcode that says Codewarrior Style Inline Assembly, but the Xcode editor doesn't like it when I type in Codewarrior style assembly, and just dumps out errors if I try to build/run the app.
Someone online mentioned the compiler option: -fasm-blocks, but of course gives no info on where compiler options like that can be entered into Xcode.
There's an Intel ".intel_syntax noprefix" setting too, but again, no clue as to where that's supposed to be placed, nor does that necessarily get rid of the all the extraneous surrounding nonsense like ("add eax,ebx\n\t); and allow a simple, add eax,ebx, syntax instead.
There's no info given on how to use an external assembler with Xcode, or link in files generated by one, nor how to pass variables and pointers between C and assembly.
So what's the deal with Xcode? They dump a big pile and stuff on my hard drive and don't explain how to use it. Where does one go to find information like this, or some examples that step a person through the process of using assembly code in C?
Thanks for any advice.
-Elhardt