1. Home
  2. syntax
  3. Assembly (assembler) Language Compatibility?

Assembly (assembler) Language Compatibility?

By WinPie Posted in: syntax

I’m interested in looking into the assembler language and I’m seeing a bunch of confusion. I own a 32-bit Windows 7 system with an AMD processor. Many of the Assembler books I see talk about it’s architecture with IBM computers and programming in Linux. If I just picked up any old book of Assembler, would I need to know if the syntax they use is compatible with the system I’m using? And if I was to look into Assembler programming books about a 32 bit Windows system, what would I look for?

Get Chitika Premium
  1. Techwing Says

    The machine language for both AMD and Intel processors is practically identical. The same assembler can generate code for both types of processors. They are nearly identical because they have to be compatible with each other in order to run Windows seamlessly.
    Every hardware platform has its own machine language. So every hardware platform has its own assemblers. You can use the same C++ program on many computers, after compiling it into machine language with a compiler that is specific to each platform. But since assembly language directly represents machine instructions, which change for each machine, you need a specific assembler for each type of computer, and assembly language programs from one computer cannot be used with any other kind of computer.
    You can write assembly-language programs for Intel x86 (PC) processors on Windows, a Mac, Linux, UNIX, or whatever other system you are running on the PC. You can find assemblers for all of these operating systems. They will all use the same symbols for the machine instructions because they all generate machine code for the same (PC) hardware.
    Both Microsoft and Intel have macro assemblers, although finding them for sale can be a bit tricky. You can use third-party assemblers like A386/D386. Linux and UNIX also have assemblers that you can use to create assembly-language programs.
    Assemblers designed to run under one OS typically generate output that is designed to be loaded and executed under that OS, so a Windows assembler might not be able to generate executable files that will run under Linux, even on the same hardware. The machine instructions are the same, but the format of the executable file and the way the assembly-language program must interface with the operating system are different.
    High-level languages may also have an in-line assembly-language function, allowing you to write assembly-language code right inside a C++ or other program. Typically the language must be a compiled language, not an interpreted language like Java, in order to have this feature.

  2. juliepel Says

    The assembly language is dependent on the CPU, not the OS.
    Of course a different OS would use different libraries and ways to call them, but the language would remain the same if it’s for the same processor.

More Interesting Things

©2011 Windows Pie, All rights reserved.