| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|