Assembly Programming

Discussion in 'Mixed Languages' started by splinter_, Apr 5, 2014.

  1. splinter_

    splinter_ MDL Novice

    Dec 17, 2012
    19
    3
    0
    Hello mdl ppl, Can you suggest me where to start assembly programming ? I have experience with "normal" programming languages(c#,c++ and delphi) if that helps at all ? Thank you :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. jellybelly

    jellybelly MDL Member

    Oct 30, 2009
    149
    28
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    142
    48
    10
    Hi, well yeah C++ can help, C more. Most important is to know about pointers, memory management, PE/ELF format and segmentation. You could try nasm and it's doc http://www.nasm.us/doc/nasmdoc0.html .
     
  4. Myrrh

    Myrrh MDL Expert

    Nov 26, 2008
    1,387
    491
    60
    #4 Myrrh, Apr 7, 2014
    Last edited by a moderator: Apr 20, 2017
    My third language (self-taught) was Z80 Assembler. First was Basic interpreter then Z80 machine language.

    Yes, I learned what
    Code:
    4300: C3 00 43
    did, long before I learned what it was called:
    Code:
    START EQU 4300H
    JP START
    END START
    *both of these represent an endless loop, far better than a plain old "hello world" program :)

    Helpful references included the technical reference for the processor which explained the various flags, registers and opcodes; and the source code for "Super Utility Plus" which was a popular utility program of the day.

    Of course, you are interested in Intel x86 or similar assembly language which is completely different from Zilog, but similarly-themed references should be available, and the basic concepts of memory, registers, flags, opcodes are still there.

    When you have dreams in machine code and wake up and they actually made sense, you have been working on it too hard.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,242
    1,406
    60
    First why do you want to learn assembler? For a specific task? If not then why limit yourself to a specific architecture? Direct assembler programming is really not as common these days on modern processors - it was normally used when processing power was low and you had very accurate timing/speed needs.

    It was more common on 680x0 (Amiga/Atari/some Mac's). DOS programming was fun in x86 days but these days Windows removes and prevents lots of direct stuff. Older 8 but processors (micro-processor such as PIC or Atmel are easy to learn - lots of "cheap" dev kits (Arduino is a good example - that allows you to mix AVR C and AVR assembler - and good for interfacing to external hardware like sensors and LED/LCD displays. These are especially useful when dealing with embedded systems.

    Your question is to too vague for something so specific.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. user_hidden

    user_hidden MDL Expert

    Dec 18, 2007
    1,023
    964
    60
    read "The Art of Assembly"
     
  7. osamab40

    osamab40 MDL Novice

    Nov 19, 2011
    8
    0
    0
    C++ or Delphi is enough . :eek:
     
  8. splinter_

    splinter_ MDL Novice

    Dec 17, 2012
    19
    3
    0
    Sorry for late respond,I dont really know why I want to learn it , it looks interesting no better explanation really :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. deagles

    deagles MDL Developer

    Feb 22, 2013
    239
    1,174
    10
    If you are a sophisticated c programmer then its a good idea to learn asm.

    I would create a c program (x86) with basic control flow, compile it and then open a disassembler.
    Try to understand how the control flow looks like in asm and single-step through your program.
    At the beginning you only need to know about registers, flags, calling conventions, stack, heap and the instruction reference.

    Today programming in asm is only useful if you are interested in max. performance optimization.
    What do you want to achieve?