I think learning x86 is close to useless.
Now assembler coding can be fun. Start easy with a Microchip Pic or Freescale microcontrollers. Or Arm could be useful.
Hello
I'm thinking of learning assembly and i was wondering is the assembly language in pc same as in a mac, and can anyone recommend me a book to start with. if there is a difference what is it
I'm new in programing so be easy on me 🙂 thank you
Please don't take this as being rude. I only mean to help.
There is no such thing as "learning assembly"!
Assembly language is specific to particular processors.
PPC assembler doesn't work on an Intel processors. (Rosetta is crutch).
Imagine doing a big app in assembler for the PowerPC, then Apple offers Macs with Intel processors. It could happen 😉 All the assembler code is close to useless.
The argument that assembler is faster is essentially wrong. Programmers are notorious for mistaking the code hot spots. Most often a better algorithm is a better solution. But with assembler it is likely too late, because so much has been invested.
So don't plan on making an app in assembler! Use C or something.
I think learning x86 is close to useless.
Now assembler coding can be fun. Start easy with a Microchip Pic or Freescale microcontrollers. Or Arm could be useful.
Not to mention that x86 is so complicated with the modern OS interactions/etc. That's what's kept me from doing anything in x86 Winbloze-land, even though I grew-up doing 6502/etc. assembly.
I will second learning ARM or PIC. Both, especially the PIC, are small enough instruction sets that you can wrap your brain around it entirely and actually begin to take advantage of the hardware/etc. rather than just scraping the surface.
The PIC MPLAB software is free and integrated nicely with a simulator, so you could get programming without even owning a chip/programmer.
Mike
Please don't take this as being rude. I only mean to help.
There is no such thing as "learning assembly"!
Assembly language is specific to particular processors.
PPC assembler doesn't work on an Intel processors. (Rosetta is crutch).
Imagine doing a big app in assembler for the PowerPC, then Apple offers Macs with Intel processors. It could happen 😉 All the assembler code is close to useless.
The argument that assembler is faster is essentially wrong. Programmers are notorious for mistaking the code hot spots. Most often a better algorithm is a better solution. But with assembler it is likely too late, because so much has been invested.
So don't plan on making an app in assembler! Use C or something.
I think learning x86 is close to useless.
Now assembler coding can be fun. Start easy with a Microchip Pic or Freescale microcontrollers. Or Arm could be useful.
The first assembly language I learned was for the PICs too. It's really simple, but it can be kinda frustrating. Look here if you feel like trying that out.
well guys I don't want to learn assembly for making programs, I'm interested in reverse engineering
well guys I don't want to learn assembly for making programs, I'm interested in reverse engineering
Write some small functions in XCode, and "Show Assembly Code" from the Build menu to see what the compiler does. Better do this in a Release build, not debug. And go to www.intel.com and look for their processor manuals.
Assembly is a low level language and dates back to the 50's. Is there any particular reason that you want to learn it? If you are new to programming and want to learn to develop applications for the mac, check out any of the threads here about Objective-C. It is fairly easy to learn the basics and get started writing your own apps. If you don't want to try a C language, maybe try a scripting language like PHP or javascript to cut your teeth.
For actual programming, assembly language is rather pointless except for very, very few special cases (if you write compilers or virtual machines, or you implement posix threads on a new machine, you better know assembler). On the other hand, if you like to know how things work, or if you read about new Nehalem processors and instead of believing Intel's marketing guys, you want to find out yourself, then knowing assembler is useful.
I'm still trying to get my AVR Butterfly working 😡. Seems like more hassle than it is worth on the Mac and I hate booting into Windows because I lose access to my e-mail and iTunes library.
If I thought a PIC worked well out of the box on the Mac I would snap one up in an instant.
As for the thread in question as I stated earlier the documentation on this is abysmal. Apple provide the odd document describing the Mac OS X ABI, but at the time I was looking they only provided the 32bit Intel ABI and not the updated 64bit ABI. The only other useful information I got was from FreeBSD dev sites and a little help from one of the NASM devs to get stuff assembling correctly using the mach-o binary format.
After about a week of frenzied Googling and reading the Intel CPU reference manuals (which by the way if you ever try and print will take about a week) I ended up with basically bugger all information. I'll probably look into again but I decided to learn assembly properly using micro controllers and then when I had a solid grasp of that I assumed it would be easier to make the jump up to 32 / 64 bit Intel ASM programming.