x86 assembly language is a family of backward-compatible assembly languages, which provide some level of compatibility all the way back to the Intel 8008 introduced in April 1972. x86 assembly languages are used to produce object code for the x86 class of processors. Like all assembly languages, it uses short mnemonics to represent the fundamental instructions that the CPU in a computer can understand and follow. Compilers sometimes produce assembly code as an intermediate step when translating a high level program into machine code. Regarded as a programming language, assembly coding is machine-specific and low level. Assembly languages are more typically used for detailed and time critical applications such as small real-time embedded systems or operating system kernels and device drivers.
History::::::::::
The Intel 8086 and 8088 were the first CPUs to have an instruction set that is now commonly referred to as x86. These 16-bit CPUs were an evolution of the previous generation of 8-bit CPUs such as the 8080, inheriting many characteristics and instructions, extended for the 16-bit era. The 8086 and 8088 both used a 20-bit address bus and 16-bit internal registers but while the 8086 had a 16-bit data bus, the 8088, intended as a low cost option for embedded applications and small computers, had an 8-bit data bus. The x86 assembly language covers the many different versions of CPUs that followed: from Intel, the 80186, 80188, 80286, 80386, 80486, Pentium, Pentium Pro, and so on, as well as non-Intel CPUs from AMD and Cyrix such as the 5x86 and K6 processors and the NEC V20 (although these mostly Intel-compatible CPUs add instructions which might not strictly be considered part of the x86 assembly language, much as the instructions that Zilog added to the Z80 to form its superset of the Intel 8080 instruction set would not be considered part of the i8080 assembly language.) (AMD also manufactured Intel 8086-family CPUs prior to the 80386 under a second-source contract, as did some other semiconductor manufacturers.) The term x86 applies to any CPU which can run the original assembly language. (Usually it will run at least some of the extensions too.)
The modern x86 instruction set is a superset of 8086 instructions and a series of extensions to this instruction set that began with the Intel 8008 microprocessor. Nearly full binary backward compatibility exists between the Intel 8086 chip through to the current generation of x86 processors, although certain exceptions do exist, mostly in the detailed semantics of infrequently-used instructions (such as POP SP) or the handling of opcodes that are undocumented or undefined on the 8086. In practice it is typical to use instructions which will execute on either anything later than an Intel 80386 (or fully compatible clone) processor or else anything later than an Intel Pentium (or compatible clone) processor, but in recent years various operating systems and application software have begun to require more modern processors or at least support for later specific extensions to the instruction set (e.g. MMX, 3DNow!, SSE/SSE2/SSE3).
Mnemonics and opcodes:::::::
Further information: x86 instruction listings
Each x86 assembly instruction is represented by a mnemonic which, often combined with one or more operands, translates to one or more bytes called an opcode; the NOP instruction translates to 0x90, for instance and the HLT instruction translates to 0xF4. There are potential opcodes with no documented mnemonic which different processors may interpret differently, making a program using them behave inconsistently or even generate an exception on some processors. These opcodes often turn up in code writing competitions as a way to make the code smaller, faster, more elegant or just show off the author's prowess.
No comments:
Post a Comment