I am not new to Intel assembly language. I have made programs for Windows using the MASM32 and NASM assemblers. What assemblers/linkers would work for Macintosh? And also, how do I use system calls, there?
13 replies to this topic
#1
Posted 16 June 2011 - 04:27 PM
|
|
|
#2
Posted 16 June 2011 - 05:46 PM
You are free to compile NASM from the source, i.e. with the GCC toolchain or whichever toolchain you use. Xcode is another popular option on the Mac systems.
For system calls, I have once read it was not well defined and unstable between releases of OSX, I would research this yourself to see the appropriate methods (I've no Macintosh experience.)
For system calls, I have once read it was not well defined and unstable between releases of OSX, I would research this yourself to see the appropriate methods (I've no Macintosh experience.)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 16 June 2011 - 06:08 PM
If I wanted to make an application for Windows, I would write the assembly source code, and then assemble and link it.
But what do I do to write an application for Macintosh?
I think maybe I could use NASM? Maybe write a program and assemble it using?:
\nasm\nasm -fobj %1.asm
Or does the output format need to be different? What linker do I use?
But what do I do to write an application for Macintosh?
I think maybe I could use NASM? Maybe write a program and assemble it using?:
\nasm\nasm -fobj %1.asm
Or does the output format need to be different? What linker do I use?
#4
Posted 16 June 2011 - 06:20 PM
What happened to macs? They are intel CISC based now? No more RISC?
#5
Posted 16 June 2011 - 06:33 PM
Gunner said:
What happened to macs? They are intel CISC based now? No more RISC?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#6
Posted 16 June 2011 - 06:37 PM
Are Macintosh programs assembled to .obj files first? Or do they use some other format?
#7
Posted 16 June 2011 - 06:37 PM
You'd need to use the mach o object type:
And I believe specify a start point as well:
nasm -f macho foo.asm
And I believe specify a start point as well:
ld -e _start -o foo foo.o
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#8
Posted 16 June 2011 - 06:38 PM
I apologize, I have replied to your message. My device screen is small.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#9
Posted 16 June 2011 - 06:39 PM
Are Macintosh programs extension-less, like Linux/UNIX programs?
#10
Posted 16 June 2011 - 06:44 PM
RhetoricalRuvim said:
Are Macintosh programs extension-less, like Linux/UNIX programs?
You could read about it here:
XNU - Wikipedia, the free encyclopedia
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#11
Posted 16 June 2011 - 07:39 PM
I think I could probably make functions, that I'd be able to call from the main code, that do the system call stuff.
What should I do about the system calls?
What should I do about the system calls?
#12
Posted 16 June 2011 - 08:02 PM
Okay, from reading that page, as far as I understood, Macintosh can take UNIX system calls. Is that right? The page: Mac OS X 64 bit Assembly Hello World | TheXploit | Security Blog
But I'll also need GUI functionality. I'll try Google-searching for mach system calls, and see what I come up with.
But I'll also need GUI functionality. I'll try Google-searching for mach system calls, and see what I come up with.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









