Does 8086 assembly language work on a modern CPU?
Is the 8086 assembly language workable on intel开发者_如何学JAVA pentium D computer? I am learning assembly language programming from a book that talks about 8086 processor only, which is 16bit. Is the assembly language for modern processors like pentium D different?
this is what I learnt since I asked this question. Assembly language is always ISA specific. x86 assembly language is the family of the assembly languages for the x86 processors. Intel first introduced x86 ISA in 1978. that was meant for a 16-bit processor. Later as Intel developed new processors with wider data buses, new features and instructions were added in x86 ISA at every stage. so with the evolution of x86 processor, assembly language that is used to program, also expanded and developed. since I am learning assembly language from a book that talks about 8086 processor only, i would not come to know the new features and new instructions of more advance x86 processors. programs of 8086 assembly language would work on even most modern x86 family processor due to backward compatibility, which is a boon and equally a curse..
Modern processors support 32-bit assembly language, which has some differences. To use 16-bit (8086) assembly language, you'll have to assemble and link a DOS program (and run it on an OS that supports DOS emulation, such as 32-bit Windows XP).
Yes, its different. Especially modern processors run in protected mode instead of real mode which 8086 targets. You can instead download an emulator such as this:
http://www.emu8086.com/
Yes, it will still execute the old opcodes. Your program won't take advantage of the modern pentium facilities however, such as instruction pipelining and branch prediction. Only code optimized for the pentium can take advantage of those facilities.
精彩评论