Okay, I think this question is for someone like Saz. Next semester (or perhaps the one after the next) I will be taking an assembly programming class to help fulfill my core requirements for my Computer Science AS. If assembly programming is based on the type of processor, then how the hell does one go about learning assembly for each different processor available? For example, isn't it different for AMD/Pentium, 32/64 bit, and now perhaps single/dual core? Then isn't it different depending on your OS? *nix vs. windows? And now it will be different for 32bit vs. 64bit windows also? This has been bugging me for quite some time now.
I would imagine that it will be assembly language for micro processors, wouldn't it? In which case, they will be written on a platform independent program on a desktop computer and uploaded to the processor.
Assembly language does vary over the different processors quite a bit. Their are some parts of it that are fairly generic though. I learned the Motorolla language for my assembly stuff but it was different for different Motorolla chips. I can't see you having to learn all of them, lol. Oh also, the assembly language isn't difefrent for different OS's, it's differnt for different processors.
Well, the main-differences there could be whould be, not so much the CPU-bit'rate' (since that's merely a question of how much data you'll be able to run at any given time) as the registry-nameconventions. They change, as you stated yourself, from each arch, and is the main reason for the use of HLL's. If i where you, i'd start out with something like reading these books : Ralph Brown; Art of Assembly. Peter Norton; Programmers guide to the IBM-PC (AKA: the pink-shirt-guy book). Michael Abrash; Zen of code-optimization. When you've read those, you should be ready for cross-platform work. Good Luck!!
lol, no I don't have to learn all of them, I was just curious. Class descritption is for the "Intel family of processors". Which is retarded because I have an AMD, so if we have to run crap on our home computer, I may run into some problems. Kata-Kid, I was actually considering looking at the "Art of Assembly", I've heard a little bit about that book, seems good.
I think you run the code on simulators rather than on the CPU itself usually. It's easy enough to do as the language is very simple.
Even though different processors are going to have different assembly languages, the "principles" of it are basically the same. 90% (or so) of all programming is moving data, so the majority of instructions you will encounter on any system will be load and store word instructions for moving data from memory to registers, memory to memory, etc. Of course intel uses the whole CISC thing which includes a ridiculous amount of extraneous instructions. I learned on the motorola 68K and the TI MSP430. If I'm not mistaken, Intel and AMD use similar instruction sets, so I don't guess it will matter. Further, when I did assembly programming, we would program and compile and test on an emulator, then download the code to the board.
The 68K is good stuff man. Most modern assembly languages are based off of the 68K or something similar. Here at work, we design a lot of VME boards. The whole VME architecture is based off of the 68K. You pay attention in that class and learn plenty about the 68K and it will take you far har har!
Skills will transfer over. Algorithms are still algorithms. Whether it's: goto label; or: JUMP label or: 1010000000000010 i forget the opcode for jump so just made one up.
I ran across this page, which i find contains all the stuff you need to know before going to your first class. Though being specific on the x86 (88) arch, i think it might give a pretty good idea. Good luck .