back to basics = assembly question
Results 1 to 7 of 7

Thread: back to basics = assembly question

  1. #1
    Banned
    Join Date
    Feb 2003
    Posts
    44

    back to basics = assembly question

    after learning different programming languages, about various computer subjects, security & etc. I always come to what i call "the hex ceiling". basically, any computer fields eventually boils down to memory management, kernel signals, rgisters handling; your basic push and pop. IMHO not even programming in C will let you completly understatnd what's going on "in the iron" of your system. that's why i decided i must finally learn assembly. not that i want you, mind you (i know enough to relize it's not that much fun) but i think it's neccessary to really solidify everythin else I managed to understand before.

    but i need help w/ where to start:

    1. i know there are different asseblers available which really confuses me. since the accuall assembly is hardware architecture dependent i supose that they cannot be that much different, but i would like to learn the most standard assebly interpretation. which assebler should i use than.

    2. what is the difference between assebers (and the lang itself) on linux & windows since it depends on the hardware

    3. what is so called High Level Assembly and should i start w/ it instead of regular assebly (it's the assebler of choice for "The Art of Assebly" web site so i'm considering it

    4. i heard the so-called "macro assebler" was a revolution in programming. what is the differnce between maro and non macro assebler ... do all the asseblers have macro capabilities... is it better to learn macro assembly or non-macro

  2. #2
    Member
    Join Date
    Jan 2003
    Posts
    37
    Well I'll start from the bottom of your post...
    I think that what you are calling macro assembler is what everybody knows as plain assembler.The thing is that when a company develops a micro proc let's say (my favourite) Z-80 by Silog; they sell it with a group of instructions these are the assembly instructions which you've talked about in your mail and which you've heard of. This instructions are what compilers turn higher level progs into. But what lies underneth thous instructions is not the micro making directly thouse op; instead these assembler op (which for Z-80 for e.i aren't more than 30) are in fact a group of micro assembler instructions; to make it easier: there 's an instruction in Z-80 that tells the prog to go back up to a certain lable and continue from there (like a while) and decrese a counter and make this proc until the counter is 0 (the inst is called DJNZ (decrese jump if no cero) ) whell that assembly instruction is in fact a group of micro-assembly instructions. Yet as far as i know is not possible for a non-developer (i mean unless you are developing the hard) to play with micro assembly functions (and useless believe me)... Well assembler would be in fact what you called macro assembler.... and micro assembler are thos more than basic instructions. (the nop micro inst is used a lot to syncronioze everything for e-i; but you don't have to worry about it).
    As regards which assembly to learn; although they are all more or less the same the big difference between the micros if for e.i that peintuim's offer a lot of graphic assembly instructinos and registers (would be like the vars in C) of 32 bits instead of 8 bit registers of Z-80 for ei.
    So i would advice you to learn assembler of an old micro like Z-80 or 8080 or any similar because in my opinion to prog a big thing like a pentium there is C; but to prog an 8080 there's only asm... and it's much easier to prog an 8080 or a Z-80 than a pentium 4 3D-now (that's for sure)...
    Well hope i helped you (I started with Z-80 asm programming that's why i love it)...
    ampm2003.
    \"Aclaró que un Aleph es uno de los puntos del espacio que contiene todos los puntos\"... (An Aleph is a point in space that contains every point)
    Jorge Luis Borges \"El Aleph\"...

  3. #3
    Also if you want to start learning assembly you can have some good references in here http://www.phys.uu.nl/~takken/Assembly.htm that are tutoriasl for 80x86/87
    \"Knowledge is Power\"

  4. #4
    Banned
    Join Date
    Dec 2002
    Posts
    394
    Well macro asm is basically writing macro's so U don't have to re-invent the wheel for functions that U use often.

    As far as high level asm, it's only for using the win32 api to make different calls, low level doesn't use the win32 api which lets U only write 16-bit code. If uR planning to write 32-bit programs U must use the win32 api.

    As for as assemblers go it's a matter of choice: U have Masm, which is the microsoft assembler, then there my favorite Nasm, the Net-wide assembler it can be use on M$ and Linux platforms, oh yea! don't forget Tasm, which is the Borland Turbo assembler, and for Linux geeks there is also Fasm which is a different verison of Nasm but runs on M$ and Unix platforms.

    Which to go with U ask try them all cause what's right for me U might not like. Try them all but I would suggest Nasm cause with tasm and masm U have to assume directives with Nasm U don't but don't just take my word for it. Ooops! U will need some tools with any assembler.
    A instruction set for the processors get it here unless U R working with AMD processors get the instruction set from there site. Get both if U like there R only a few different instructions between the two use Go0gle or M$ or win32asm tools to get yourself a win32 api reference. It will come in handy. As for tuts checkout win32 there R some good ones there plus other tools. Then write some of your own, they are always the best ones.

  5. #5
    The Iceman Cometh
    Join Date
    Aug 2001
    Posts
    1,209
    1) The type of assembly you will most likely want to learn is the assembly for the architecture you plan to use. Assembly languages for different architectures is quite different, so start with something like 80x86 (which is for Intel processors) and learn other ones after on a needed basis.

    2) As for differences on the OSes, typically, assembly languages across platforms (running the same architecture) should have no differences. Sometimes, specific assemblers will add some extra functionality and short cuts, but if you learn basic command set, you'll be fine.

    3) Related to my answer to number 2... learn the basic command set of whatever language you plan to learn. Intel, for example, offers built-in routines to simply certain things in newer processors (which I think is what you're referring to). These commands, however, will be processor specific (i.e. not all P4 subroutines will work on a P3 or lower), so you probably want to avoid them for the timebeing.

    4) By macros, I assume you're talking about subroutines. Without subroutines, programming in assembly will get *really* messy. If you go with a well-known language, though, it shouldn't be a problem.

    AJ

  6. #6
    Banned
    Join Date
    Feb 2003
    Posts
    44
    just one last one: where can i find a good comparison for Intel/AMD/PowerPC instruction set

  7. #7
    Banned
    Join Date
    Dec 2002
    Posts
    394
    just download them all them manually compare them that what I didi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •