CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old February 25th, 2005, 10:47 AM
    hany_3210 hany_3210 is offline
    Member
     
    Join Date: Dec 2004
    Posts: 25
    hany_3210 is an unknown quantity at this point (<10)
    Difference

    Hey all
    Can any one here tell the history of assembly lang
    and the difference bet. the common assemblers MASM and TASM in thier working.
    I just bring these assembler but old versions. I was in need to this and i get it, but i want to make a decisions to work on any of these.
    And i wish to append with reply a specific toutrial to one selected.
    Thx at any way
    Reply With Quote
      #2    
    Old February 27th, 2005, 03:12 PM
    NigelQ's Avatar
    NigelQ NigelQ is offline
    Elite Member
     
    Join Date: Sep 2001
    Location: San Diego
    Posts: 2,147
    NigelQ has a spectacular aura about (150+)NigelQ has a spectacular aura about (150+)
    Re: Difference

    The history of assembly language:

    First, there was no assembly language, only machine code. This machine code consisted of hexadecimal values (numbers) referring to machine instructions inside the CPU. Each machine instruction had a hexadecimal index.

    Along with the instructions were values of data being used, so your programs ended up being a mixture of hexadecimal commands and hexadecimal data elements.

    This was difficult (but predictable) to use. One day, someone came up with the idea of using mnemonics instead of command indexes. These mnemonics are easier for programmers to remember than trying to remember the entire command set for a CPU (which a lot of people did before this).

    For example, to move the contents of the BX register into the AX register, you would use machine instruction 8B C3.

    Now you might be able to remember this, but using assembler, it is much easier to remember the following assembly code, which does the same thing...

    MOV AX,BX

    To convert your mnemonics (MOV AX, BX) into something the CPU understands, you need an assembler (TASM, MASM, etc.) that is designed specifically for the CPU you are targetting. Most CPU's have a different instruction set, and therefore conventions used in the mnemonics of the assembly used.

    ...wow, that was less painful than I thought.

    Ok, references to TASM and MASM, well the original user guides that came with these would certainly be your biggest help, by far. There a subtle differences between the various assemblers out there, so you need a good reference for the one you want to use.

    You could also do a search of the Internet for many samples and tutorials for both.

    Which one is best? Well, they are all pretty good - it's not rocket science they're doing for you, so just flip a coin to decide.

    There are differences in the generated object files generated. You should Google COFF and OMF to see the differences between TASM and MASM.

    Note that there are big differences between targetting x86 platforms (as used by Windows) and those used by other processors. Little-endian and Big-endian becomes an issue when porting between the two as well as the differences in the registers available on different CPUs and also the instruction sets supported.

    Hope this helps.

    - Nigel
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:09 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009