Talk:X86 assembly language

message: Some small and working examples of how to use assembly language. Usually examples makes people leap forward in knowledge and learning. 
Thanks 193.28.147.12 08:40, 20 January 2007 (UTC)
thread_title:  Examples 

message: Perhaps this should be moved to Wikibooks? Dysprosia 12:12, 23 Oct 2003 (UTC)
thread_title:  Move to Wikibooks? 

message: maybe such a list should be created?
*Initial 8086/8088 instructions and "real mode"
**Initial 8087 (x87) instructions
*80186/80188 additions (few)
**80187 additions (few if any)
*80286 additions, "protected mode"
**80287 additions (few if any)
*80386 additions, "virtual 8086 mode", 32bit
**80387 additions
*80486 additions (few), including x87 (few if any)
*80586 (Pentium) additions (few)
*80686 (Pentium Pro) additions (few)
*80786 (Athlon, P4) - none?
*80886 (Athlon64) additions (few), "long mode", 64bit
*Intel MMX
*Cyrix MMX extensions (supported by Athlon64)
*AMD 3DNow!
*AMD 3DNow! extensions
*Intel SSE
*Intel SSE2
*Intel SSE3
**SSE3 HyperThreading instructions (2)
*Intel VMX - 10 instruction about Virtualisation Technology
*x86-64 (AMD64) undocumented instructions and behaivour not supported in EM64T (Intel)
*NexGen Nx586, Nx587 irregulars?
*Other irregualrs - NEC, UMC, Cyrix, IDT, Rise, VIA, SiS, etc.
:If you mean a complete list of instructions, that might better belong in a reference manual; we could link to Intel and AMD's reference documentation online.
:Perhaps summarizing the instruction set, including various additions done at various times, would be useful. Guy Harris 20:34, 7 February 2006 (UTC)
replies: text: It seems that there is already such list here: X86 instruction listings. But it is still incomplete 212.36.8.100 11:42, 25 February 2006 (UTC)
thread_title:  [[List of x86 assembly language instructions]] 

message: How is Framebuffer UI in the External Links related to Assembly? This proves the above point that this article is not its own purpose, but rather an ad or a comparison. —The preceding unsigned comment was added by 24.185.112.164 (talk) 02:03, 28 December 2006 (UTC)
thread_title:  Framebuffer UI 

message: The section on processor modes is just plain wrong.  The *only* difference between 16- and 32-bit modes is the *default* data and address sizes, however, one can override the default address and data sizes with prefixes (67 and 66 hex, respectively.)
The difference between real and protected modes lies in the meaning of segment register values -- in real mode, the segment base is directly computed from the segment register value by shifting right by four and the limit value is left unmodified (it defaults to 64K at boot time), whereas in protected mode it is an index (selector) into one of the Descriptor Tables (Global Descriptor Table or Local Descriptor Table) from which the base and limit are obtained.  One normally assumes 16 bits when one is discussing real mode, but it is possible to force the processor into 32-bit real mode.  (This, incidentally, is not the so-called "unreal mode", that is simply 16-bit real mode with the segment limits set to 4 GB.)
There are a handful of instructions related to descriptor tables that are unavailable in real mode.  Also, the processor will not allow paging to be enabled in real mode.  Tere is no obvious technical reason for that restriction, but it is enforced by the processor.
V86 mode is formally a submode of protected mode, and all the memory protections of protected mode are active, however, segments are handled the same way as in (16-bit) real mode.  There is no way to force the processor into any kind of "32-bit V86 mode" (that works on all processors, that is.)
32-bit and SIMD instructions are available in all these modes!
x86-64 adds a new top-level mode, long mode, with the submodes compatibility mode (which in turn can be 16 or 32 bit) and 64-bit mode, which makes considerable changes to the instruction encoding, which allows a bigger register set.  64-bit instructions and the extended register set are only available in 64-bit mode.
Thus, you have a mode chart looking like this:
* Real Mode
** 16-bit Real Mode
*** Unreal Mode (4 GB segment limits)
** 32-bit Real Mode (undocumented)
* Protected Mode
** 16-bit Protected Mode
** 32-bit Protected Mode
** V86 mode
* Long Mode
** Compatibility Mode
*** 16-bit Compatibility Mode
*** 32-bit Compatibility Mode
** 64-bit Mode
There is also System Management Mode.  This is actually not an ISA-level processor mode at all; rather, it is a special high-priority interrupt level (higher than even Non-Maskable Interrupt.)  By default, SMM is entered in 16-bit Real Mode with 4 GB limits ("Unreal mode"), but it is possible and legal to switch processor modes while in SMM.  The only instruction-level difference between SMM and ordinary execution is that the RSM (return from system management interrupt) instruction is only available after an SMM.
Hpa 00:45, 25 August 2007 (UTC)
thread_title:  Processor modes 

message: I have fixed the issues that people have been concerned about with this article.
* The article is now a basic summary of the features of x86 language
* There is a new intro which is more specific and less technical
* There is now a link to a list of assemblers
* Information about the x86 in general and not the language has been moved to x86 architecture
* Info on processor modes summarized and some of it merged as above.
Hopefully this article is much better now. Da rulz07 08:16, 14 November 2007 (UTC)
thread_title:  Issues solved 

message: I looked in this article for a summary or pointer to the pseudo instructions and meta language of intel's family of assemblers, but don't see it.  Such a description would explain the features of this non-sensical medley of examples:
 name  example
 %set (debug, 0)
 %*define (bit (b))
 	(%eval (1 shl (%b and 7)))
 %*define (set_bit (b))
 	(or     ds:byte ptr %byte(%b), %bit (%b))
 %if(%debug)then(
    ; debug stuff here
 )else(
    ; non-debug stuff here
 )fi
 
 $genonly
 $eject
 
 txt     group   rom_text
 dgroup  group   data
 assume  cs:txt, ds:dgroup, es:dgroup
 
 Init_data       segment         public          'Init_data'
  extrn table_init :WORD
 Init_data       ends
 
 stack_frame     struc
 	old_bp   dw      ?
  	old_es   dw      ? 
 	old_ds   dw      ?
 	ret_ip   dw      ?
 	ret_seg  dw      ?
 	arg2     dd      ?
 	arg1     dd      ?
 stack_frame     ends
Anybody know where I can find such a reference, whether on Wikipedia or online somewhere?  131.89.192.111 (talk) 23:53, 27 January 2010 (UTC)
thread_title:  pseudo instructions 

message: There should be no subject called "x86 assembly language" in wikipedia.
An entry should cover one concept. Even if it is controversial what the concept should be named, the content should be one subject and cohesive.
This entry invites a mishmash of miscellaneous comments, as it actually is.
An interesting reference is Randall Hyde. He compares different assemblers, including his own. It comes out very well. I will not deny that this reference has value, but is this how Wikipedia is supposed to be?
<BR>
Somewhere I had added a reference to the book of Morse, the designer of the 8086, what I consider the most seminal book of the architecture.
I can't find it back in the tangle of x86 stuff, nor can I point out which of the wikipedia subjects would be the place where this reference is to be expected. 
80.100.243.19 (talk) 14:23, 25 February 2011 (UTC)
thread_title:  This subject is unsavory 

message: In the very first sentence, backward compatibility is mentioned as a property. Yes, old programs may run unaltered on newer hardware. But that is a property of the x86 familiy of processors rather than its assembly language. Rbakels (talk) 10:07, 9 December 2011 (UTC)
thread_title:  Backward compatible? 

message: Hello fellow Wikipedians,
I have just modified  on X86 assembly language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/20131003180256/http://www.ibm.com/developerworks/linux/library/l-gas-nasm/index.html to http://www.ibm.com/developerworks/linux/library/l-gas-nasm/index.html
*Added archive https://web.archive.org/web/20140402192351/http://www.bell-labs.com/history/unix/ to http://www.bell-labs.com/history/unix/
*Added archive http://web.archive.org/web/20050306034501/http://www.intel-assembler.it:80/ to http://www.intel-assembler.it
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).
Cheers.—InternetArchiveBot (Report bug) 13:35, 21 July 2016 (UTC)
thread_title:  External links modified 

message: It says "x86 assembly has the standard mathematical operations add, sub, mul, and idiv", but should imul and div be included in this list?
Thanks  — Preceding unsigned comment added by IHeartHistory (talk • contribs) 02:27, 1 November 2017 (UTC)
thread_title:  Regarding the Integer ALU instructions Section 

message: When and how did AT&T syntax come into being, and where is (was) it documented? The article should probably address this. If you, dear reader, know of any suitable sources (man pages for an assembler that AT&T shipped as part of some version of UNIX, maybe? Something else?), please tell. Zazpot (talk) 20:25, 30 December 2018 (UTC)
replies: text: I'm pretty sure it's a GNU invention, and that the article's claim that "...AT&T syntax is dominant in the Unix world, since Unix was created at AT&T Bell Labs." is false. If you look at a Xenix programming manual from the 1980s you'll find that it used Intel syntax, and Xenix was an AT&T-licensed Unix. pburka (talk) 17:44, 6 April 2023 (UTC)
thread_title:  AT&T syntax history 

message: x86 Assembly, DOS MASM, Windows MASM, etc are all different languages. They are heavily base on x86 assembly, but NOT the same thing at all as x86 assembly. Software written in x86 assembly does not need an OS to execute on an x86 machine, however all those other examples do, because they are built on the foundation of their respective OSs along with the libraries and whatnot that those bring with them.
This section is conflating concepts which, while they are similar in some respects, are functionally very different. Nabeel_co (talk) 20:11, 5 January 2023 (UTC)
thread_title:  "Examples" section needs to be re-worked or removed.