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

    Pr3acher MDL Member

    Aug 24, 2012
    143
    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 .
     
  3. Myrrh

    Myrrh MDL Expert

    Nov 26, 2008
    1,511
    627
    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...
  4. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    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.
     
  5. user_hidden

    user_hidden MDL Expert

    Dec 18, 2007
    1,034
    1,061
    60
    read "The Art of Assembly"
     
  6. osamab40

    osamab40 MDL Novice

    Nov 19, 2011
    8
    0
    0
    C++ or Delphi is enough . :eek:
     
  7. 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...
  8. 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?