Discussion in 'Off Topic Area' started by MajesticB, Nov 21, 2005.

  1. MajesticB

    MajesticB New Member

    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.
  2. mattnz

    mattnz Die or get rich tryin'!

    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.
  3. JohnnyX

    JohnnyX Map Addict

    Who says you have to learn all the different ones for your Computer Science AS?
  4. Slindsay

    Slindsay All violence is necessary

    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.
  5. Kata-Kid

    Kata-Kid New Member

    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!!
  6. MajesticB

    MajesticB New Member

    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.
  7. jonmonk

    jonmonk New Member

    Woohoo, real programming. I remember learning 6502 on BBC Bs years ago... those were the days :)
  8. Slindsay

    Slindsay All violence is necessary

    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.
  9. MajesticB

    MajesticB New Member

    Ah well yes, that would be of great help then. Didn't realize they had simulators.
  10. Yohan

    Yohan In the Spirit of Yohan Supporter

    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.
  11. harhar

    harhar I hate semaphores

    I hate assembly class. My prof plain sucks. We are using the 68k microprocessor.
  12. Yohan

    Yohan In the Spirit of Yohan Supporter

    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!
  13. kikkoman

    kikkoman Valued Member

    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.
  14. harhar

    harhar I hate semaphores

    GOTHERE <instruction> <registers and/or immediate values>
    <more stuff>
  15. Kata-Kid

    Kata-Kid New Member

    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 ;).
  16. SpinStorm

    SpinStorm Valued Member

    good link, thanks :D

Share This Page